@skybridge/devtools 0.0.0-dev.e5d04e2 → 0.0.0-dev.e652e49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=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)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),p=s(((e,t)=>{t.exports=f()})),m=s((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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function H(e){0>B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),W=V(null),te=V(null),ne=V(null);function re(e,t){switch(U(te,t),U(W,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ie(){H(ee),H(W),H(te)}function ae(e){e.memoizedState!==null&&U(ne,e);var t=ee.current,n=Wd(t,e.type);t!==n&&(U(W,e),U(ee,n))}function oe(e){W.current===e&&(H(ee),H(W)),ne.current===e&&(H(ne),ep._currentValue=R)}var se,ce;function le(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``,ce=-1<e.stack.indexOf(`
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=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)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),p=s(((e,t)=>{t.exports=f()})),m=s((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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function H(e){0>B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),W=V(null),te=V(null),ne=V(null);function re(e,t){switch(U(te,t),U(W,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ie(){H(ee),H(W),H(te)}function ae(e){e.memoizedState!==null&&U(ne,e);var t=ee.current,n=Wd(t,e.type);t!==n&&(U(W,e),U(ee,n))}function oe(e){W.current===e&&(H(ee),H(W)),ne.current===e&&(H(ne),ep._currentValue=R)}var se,ce;function le(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``,ce=-1<e.stack.indexOf(`
2
2
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
3
  `+se+e+ce}var ue=!1;function de(e,t){if(!e||ue)return``;ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
4
  `),l=s.split(`
@@ -6,10 +6,10 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
6
6
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?le(n):``}function fe(e,t){switch(e.tag){case 26:case 27:case 5:return le(e.type);case 16:return le(`Lazy`);case 13:return e.child!==t&&t!==null?le(`Suspense Fallback`):le(`Suspense`);case 19:return le(`SuspenseList`);case 0:case 15:return de(e.type,!1);case 11:return de(e.type.render,!1);case 1:return de(e.type,!0);case 31:return le(`Activity`);default:return``}}function pe(e){try{var t=``,n=null;do t+=fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
7
  Error generating stack: `+e.message+`
8
8
  `+e.stack}}var me=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(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 ze(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=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(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 Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function G(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 Ve(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(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-je(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&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(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 Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=L.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function Ze(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[$e])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=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]*$`),vt={},yt={};function bt(e){return me.call(yt,e)?!0:me.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(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 St(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 Ct(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 wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(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=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(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=``+wt(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 It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=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 Bt(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||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(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 Ut=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`]]),Wt=/^[\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 Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(Su(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,`passive`,{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,K=null;function sn(){if(K)return K;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return K=i.slice(e,1<r?1-r:void 0)}function cn(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 ln(){return!0}function un(){return!1}function dn(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)?ln:un,this.isPropagationStopped=un,this}return f(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=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=f({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=f({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,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!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(f({},yn,{dataTransfer:0})),Sn=dn(f({},mn,{relatedTarget:0})),Cn=dn(f({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(f({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(f({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={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`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(f({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(f({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(f({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(f({},yn,{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})),In=dn(f({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=tn&&`CompositionEvent`in window,zn=null;tn&&`documentMode`in document&&(zn=document.documentMode);var Bn=tn&&`TextEvent`in window&&!zn,Vn=tn&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),K=on=an=null,Kn=!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 Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Dd(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){yd(e,0)}function tr(e){if(Ot(ut(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(tn){var ir;if(tn){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,Jt(e)),$t(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!me.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(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=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function br(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 xr=tn&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==kt(r)||(r=Sr,`selectionStart`in r&&br(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}),wr&&hr(wr,r)||(wr=r,r=Dd(Cr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};tn&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`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(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),ht(t,[e])}var Hr=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)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[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&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(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-je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(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 ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(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 ri(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 ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ei(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ai(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ei(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ei(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ei(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:pe(t)},li.set(e,t),t):n}return{value:e,source:t,stack:pe(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-je(r)-1;r&=~(1<<i),n+=1;var a=32-je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-je(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,q=null,Oi=!1,ki=Error(i(519));function Ai(e){throw Ii(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Lt(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||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:Ti=Ti.return}}function Ni(e){if(e!==Ti)return!1;if(!Di)return Mi(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&Ei&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else t===27?(t=Ei,$d(e.type)?(e=df,df=null,Ei=e):Ei=t):Ei=Ti?uf(e.stateNode.nextSibling):null;return!0}function Pi(){Ei=Ti=null,Di=!1}function Fi(){var e=q;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),q=null),e}function Ii(e){q===null?q=[e]:q.push(e)}var Li=V(null),Ri=null,zi=null;function Bi(e,t,n){U(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,H(Li)}function Hi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ui(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Hi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Hi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Wi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ne.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(i(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Zi=t.unstable_scheduleCallback,Qi=t.unstable_NormalPriority,$i={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=dd(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=I.S;I.S=function(e,t){ru=ye(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=V(null);function da(){var e=ua.current;return e===null?Rl.pooledCache:e}function fa(e,t){t===null?U(ua,ua.current):U(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(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=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ii(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=ci(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(F(t)||M(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ba(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===C)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ba(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ea(r),i);if(r.$$typeof===C)return m(e,t,n,Ji(t,r),i);Oa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Di&&bi(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 Di&&bi(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)}),Di&&bi(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Di&&bi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Di&&bi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Di&&bi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Bl&p)===p:(r&p)===p){p!==0&&p===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ma=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;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),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=V(null),Ga=V(0);function Ka(e,t){e=Kl,U(Ga,e),U(Wa,t),Kl=e|t.baseLanes}function qa(){U(Ga,Kl),U(Wa,Wa.current)}function Ja(){Kl=Ga.current,H(Wa),H(Ga)}var Ya=V(null),Xa=null;function Za(e){var t=e.alternate;U(no,no.current&1),U(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){U(no,no.current),U(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(U(no,no.current),U(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){U(no,no.current),U(Ya,Ya.current)}function to(e){H(Ya),Xa===e&&(Xa=null),H(no)}var no=V(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){I.H=Ps;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Gi(e)&&($s=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return qi(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.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=Do(),ao.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 jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(Bl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ao.lanes|=p,Jl|=p;f=u.action,uo&&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,ao.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&($s=!0,d&&(n=aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Bo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){Ae(!0);try{n()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Di){var n=Rl.formState;if(n!==null){a:{var r=ao;if(Di){if(Ei){b:{for(var i=Ei,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=uf(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.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 ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(ao.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(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 fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||io&1073741824&&!(Bl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),ao.lanes|=e,Jl|=e,n)}function _s(e,t,n,r){return mr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Bl&261930)?($s=!0,e.memoizedState=n):(e=gu(),ao.lanes|=e,Jl|=e,t):(e=gs(e,n,r),mr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,As(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),hu(e)):ks(e,t,r,hu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,R,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},hu())}function Cs(){return qi(ep)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(_u(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,hu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(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,mr(s,o))return qr(e,t,i,0),Rl===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Ae(!0);try{n(t)}finally{Ae(!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=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Bl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(_u(t,e,n),La(t,e,n))}};function Bs(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?!hr(n,r)||!hr(i,a):!0}function Vs(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&&zs.enqueueReplaceState(t,t.state,null)}function Hs(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Hr(e)}function Ws(e){console.error(e)}function Gs(e){Hr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(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 Js(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Fa(e),e.tag=3,e}function Xs(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(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(J===null?J=new Set([this]):J.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?ku():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),ku(),!1}if(Di)return t=Ya.current,t===null?(r!==ki&&(t=Error(i(423),{cause:r}),Ii(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Js(e.stateNode,r,a),Ra(e,a),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ki&&(e=Error(i(422),{cause:r}),Ii(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(J===null||!J.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ki(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Di&&s&&Si(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(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 oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Aa(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(Qa(t),(e=Ei)?(e=of(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Wi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Rl,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),Qs;ku(),t=cc(e,t,n)}else e=o.treeContext,Ei=uf(s.nextSibling),Ti=t,Di=!0,q=null,Oi=!1,e!==null&&wi(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return Ki(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Di&&r&&Si(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(Di&&r&&Si(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(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&&zs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Ma||Bs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Ma||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Pi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:pa()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Za(t):eo(t),(e=Ei)?(e=of(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw Ai(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Za(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Rl,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),Qs;sf(c)||ku(),t=xc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=uf(c.nextSibling),Ti=t,Di=!0,q=null,Oi=!1,e!==null&&wi(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ni(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 yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Aa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Cc(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 wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,U(no,o),ec(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:re(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:ae(t);break;case 4:re(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(no,no.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(re(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Ii(a),t=mc(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(Ei=uf(e.firstChild),Ti=t,Di=!0,q=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Hd(te.current).createElement(n),r[$e]=t,r[et]=e,Id(r,n,e),ft(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Di&&(r=t.stateNode=mf(t.type,t.pendingProps,te.current),Ti=t,Oi=!0,a=Ei,$d(t.type)?(df=a,Ei=uf(r.firstChild)):Ei=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=rf(r,t.type,t.pendingProps,Oi),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=uf(r.firstChild),Oi=!1,a=!0)),a||Ai(t)),ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(a,o)?r=null:s!==null&&Gd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),ep._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=af(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||Ai(t)),null;case 13:return vc(e,t,n);case 4:return re(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ki(t),a=qi(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(a=da(),a===null&&(a=Rl,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Bi(t,$i,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Bi(t,$i,r),r!==a.cache&&Ui(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Bi(t,$i,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(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(Eu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Eu())e.flags|=8192;else throw xa=_a,ha}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Ql|=t)}function Nc(e,t){if(!Di)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 Pc(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 Fc(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),ie(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(oe(t),n=te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ee.current,Ni(t)?ji(t,e):(e=mf(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ee.current,Ni(t))ji(t,o);else{var s=Hd(te.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[$e]=t,o[et]=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(Id(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ai(t,!0)}else e=Hd(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[$e]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[$e]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return ie(),e===null&&Cd(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(H(no),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return U(no,no.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>iu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Pc(t),null}else 2*ye()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,a=!0,Nc(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?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=no.current,U(no,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(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&&H(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),ie(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(no),null;case 4:return ie(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&H(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ci(t),t.tag){case 3:Vi($i),ie();break;case 26:case 27:case 5:oe(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:H(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&H(ua);break;case 24:Vi($i)}}function Rc(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){Gu(t,t.return,e)}}function zc(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){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Gu(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Hc(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){Gu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(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){Gu(e,t,n)}else n.current=null}function Wc(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){Gu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[et]=t}catch(t){Gu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(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&&$d(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 Jc(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=Kt));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,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&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[$e]=e,t[et]=n}catch(t){Gu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Bd=lp,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},lp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(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 al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(ke&&typeof ke.onCommitFiberUnmount==`function`)try{ke.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;$d(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),hf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):ef(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){Gu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){Gu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Id(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Hf=null,a=ml,ml=vf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Gu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=vf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=ye()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Gu(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,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:hf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(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:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ta(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e)));break;case 12:if(i&2048){Cl(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){Gu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(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:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(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:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&qf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=vf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(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 jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}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];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,zl=null,Bl=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,J=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Ll&2&&Bl!==0?Bl&-Bl:I.T===null?Xe():dd()}function gu(){if(Zl===0)if(!(Bl&536870912)||Di){var e=Ie;Ie<<=1,!(Ie&3932160)&&(Ie=262144),Zl=e}else Zl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Zl}function _u(e,t,n){(e===Rl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,Bl,Zl,!1)),Ue(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(Yl|=n),ql===4&&xu(e,Bl,Zl,!1)),rd(e))}function vu(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Be(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Wl&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,a=4;break a}o=eu,eu=a,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=nu+300-ye(),10<a)){if(xu(r,t,Zl,!Ul),ze(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Jd(yu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),a);break a}yu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);rd(e)}function yu(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:Kt},kl(t,a,d);var m=(a&62914560)===a?nu-ye():(a&4194048)===a?ru-ye():0;if(m=Yf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(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(!mr(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 xu(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function Su(){return Ll&6?!0:(id(0,!1),!1)}function Cu(){if(zl!==null){if(Vl===0)var e=zl.return;else e=zl,zi=Ri=null,wo(e),wa=null,Ta=0,e=zl;for(;e!==null;)Lc(e.alternate,e),e=e.return;zl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Yd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Rl=e,zl=n=ni(e.current,null),Bl=t,Vl=0,Hl=null,Ul=!1,Wl=Be(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-je(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,Kr(),n}function Tu(e,t){ao=null,I.H=Ps,t===ma||t===ga?(t=Sa(),Vl=3):t===ha?(t=Sa(),Vl=4):Vl=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,zl===null&&(ql=1,Ks(e,ui(t,e.current)))}function Eu(){var e=Ya.current;return e===null?!0:(Bl&4194048)===Bl?Xa===null:(Bl&62914560)===Bl||Bl&536870912?e===Xa:!1}function Du(){var e=I.H;return I.H=Ps,e===null?Ps:e}function Ou(){var e=I.A;return I.A=Fl,e}function ku(){ql=4,Ul||(Bl&4194048)!==Bl&&Ya.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Rl===null||xu(Rl,Bl,Zl,!1)}function Au(e,t,n){var r=Ll;Ll|=2;var i=Du(),a=Ou();(Rl!==e||Bl!==t)&&(au=null,wu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&zl!==null){var s=zl,c=Hl;switch(Vl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Iu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Iu(e,s,c,l)}}ju(),o=ql;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Ll=r,I.H=i,I.A=a,zl===null&&(Rl=null,Bl=0,Kr()),o}function ju(){for(;zl!==null;)Pu(zl)}function Mu(e,t){var n=Ll;Ll|=2;var r=Du(),a=Ou();Rl!==e||Bl!==t?(au=null,iu=ye()+500,wu(e,t)):Wl=Be(e,t);a:do try{if(Vl!==0&&zl!==null){t=zl;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Iu(e,t,o,1);break;case 2:case 9:if(va(o)){Vl=0,Hl=null,Fu(t);break}t=function(){Vl!==2&&Vl!==9||Rl!==e||(Vl=7),rd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:va(o)?(Vl=0,Hl=null,Fu(t)):(Vl=0,Hl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(zl.tag){case 26:s=zl.memoizedState;case 5:case 27:var c=zl;if(s?Kf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)zl=l;else{var u=c.return;u===null?zl=null:(zl=u,Lu(u))}break b}}Vl=0,Hl=null,Iu(e,t,o,5);break;case 6:Vl=0,Hl=null,Iu(e,t,o,6);break;case 8:Cu(),ql=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return zi=Ri=null,I.H=r,I.A=a,Ll=n,zl===null?(Rl=null,Bl=0,Kr(),ql):0}function Nu(){for(;zl!==null&&!_e();)Pu(zl)}function Pu(e){var t=Oc(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Bl);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Bl);break;case 5:wo(t);default:Lc(n,t),t=zl=ri(t,Kl),t=Oc(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Iu(e,t,n,r){zi=Ri=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Zs(e,i,t,n,Bl)){ql=1,Ks(e,ui(n,e.current)),zl=null;return}}catch(t){if(i!==null)throw zl=i,t;ql=1,Ks(e,ui(n,e.current)),zl=null;return}t.flags&32768?(Di||r===1?e=!0:Wl||Bl&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Ul);return}e=t.return;var n=Fc(t.alternate,t,Kl);if(n!==null){zl=n;return}if(t=t.sibling,t!==null){zl=t;return}zl=t=e}while(t!==null);ql===0&&(ql=5)}function Ru(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,zl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){zl=e;return}zl=e=n}while(e!==null);ql=6,zl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Y();while(ou!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,We(e,n,o,s,c,l),e===Rl&&(zl=Rl=null,Bl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(Ce,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,L.p=a,I.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=Vd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(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 _=_r(s,h),v=_r(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}}lp=!!Bd,Vd=Bd=null}finally{Ll=i,L.p=r,I.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,L.p=r,I.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,ve();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(J=null),Ye(n),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot==`function`)try{ke.onCommitFiberRoot(Oe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.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{I.T=t,L.p=i}}lu&3&&Y(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,id(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Y(){return Bu(),Vu(),Hu(),Wu()}function Wu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Ye(lu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,id(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{L.p=a,I.T=r,Uu(e,t)}}function X(e,t,n){t=ui(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ue(e,2),rd(e))}function Gu(e,t,n){if(e.tag===3)X(e,e,n);else for(;t!==null;){if(t.tag===3){X(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(J===null||!J.has(r))){e=ui(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),Ue(r,2),rd(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;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)||(Gl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>ye()-nu?!(Ll&2)&&wu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),rd(e)}function Ju(e,t){t===0&&(t=Ve()),e=Yr(e,t),e!==null&&(Ue(e,t),rd(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return he(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,Z=0;function rd(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,ud())}function id(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;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-je(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=Bl,a=ze(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,ld(r,a));r=r.next}while(n);nd=!1}}function ad(){od()}function od(){td=ed=!1;var e=0;Z!==0&&qd()&&(e=Z);for(var t=ye(),n=null,r=Qu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}ou!==0&&ou!==5||id(e,!1),Z!==0&&(Z=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-je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=G(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Bl,n=ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ge(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Be(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ge(r),Ye(n)){case 2:case 8:n=Se;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=cd.bind(null,e),n=he(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ge(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Y()&&e.callbackNode!==n)return null;var r=Bl;return r=ze(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),sd(e,ye()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Y())return null;vu(e,t,!0)}function ud(){Zd(function(){Ll&6?he(xe,ad):od()})}function dd(){if(Z===0){var e=ia;e===0&&(e=Fe,Fe<<=1,!(Fe&261888)&&(Fe=256)),Z=e}return Z}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+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[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Z!==0){var e=o?pd(i,o):new FormData(i);bs(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),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Br.length;hd++){var gd=Br[hd];Vr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`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){Hr(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){Hr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!nn||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 Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;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=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Mr:case Nr:case Pr:l=Cn;break;case Rr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}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=en(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))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?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(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=Od,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&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)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 Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(an=i,on=`value`in an?an.value:an.textContent,Kn=!0)),y=Dd(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=en(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
9
- `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(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=Gt(``+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`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+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`:bd(`beforetoggle`,e),bd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(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=Ut.get(n)||n,xt(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}It(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:Pd(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:Pd(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)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(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||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(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||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){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&&Rd(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&&Rd(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 Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(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 Wd(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 Gd(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 Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(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),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(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 nf(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`:nf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(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[ot])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=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(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 uf(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 df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(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 mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=L.d;L.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=Su();return e||t}function xf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=dt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);ft(c),Id(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,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=te.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.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},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+jt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(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}),Id(t,`link`,n),ft(t),e.head.appendChild(t))}function If(e){return`[src="`+jt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,ft(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(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 Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,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[ot]||a[$e]||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 Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(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 Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(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=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(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=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.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=Xf.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 ep={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function tp(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=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(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 np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function rp(e){return e?(e=Qr,e):Qr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=hu();t=Je(t);var n=Yr(e,t);n!==null&&_u(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function dp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Ll&6)&&(iu=ye()+500,id(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Jt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(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(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`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 Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(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=lt(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){cp(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 kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=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(hp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.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[et]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){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 Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,hu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),Su(),t[tt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.4`)throw Error(i(527,zp,`19.2.4`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Bp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Oe=Vp.inject(Bp),ke=Vp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[tt]=t.current,Cd(e),new Lp(t)}})),y=s(((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=v()})),b=u(p(),1),x=y(),S=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},C=new class extends S{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function E(e){setTimeout(e,0)}var D=typeof window>`u`||`Deno`in globalThis;function O(){}function k(e,t){return typeof e==`function`?e(t):e}function A(e){return typeof e==`number`&&e>=0&&e!==1/0}function j(e,t){return Math.max(e+(t||0)-Date.now(),0)}function M(e,t){return typeof e==`function`?e(t):e}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==I(o,t.options))return!1}else if(!R(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(L(t.options.mutationKey)!==L(a))return!1}else if(!R(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I(e,t){return(t?.queryKeyHashFn||L)(e)}function L(e){return JSON.stringify(e,(e,t)=>U(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function R(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>R(e[n],t[n])):!1}var z=Object.prototype.hasOwnProperty;function B(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=H(e)&&H(t);if(!r&&!(U(e)&&U(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:z.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=B(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function V(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function H(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function U(e){if(!ee(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ee(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function W(e){return new Promise(t=>{T.setTimeout(t,e)})}function te(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:B(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ie=Symbol();function ae(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ie?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oe(e,t){return typeof e==`function`?e(...t):!!e}function se(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ce=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function le(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ue=E;function de(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ue,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var fe=de(),pe=new class extends S{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function me(e){return Math.min(1e3*2**e,3e4)}function he(e){return(e??`online`)===`online`?pe.isOnline():!0}var ge=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function _e(e){let t=!1,n=0,r,i=le(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ge(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||pe.isOnline())&&e.canRun(),u=()=>he(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(ce.isServer()?0:3),o=e.retryDelay??me,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),W(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ve=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ce.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(T.clearTimeout(this.#e),void 0)}},ye=class extends ve{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Se(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Se(this.options);e.data!==void 0&&(this.setState(xe(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=te(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ie||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>M(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!j(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=ae(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=_e({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ge&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ge){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...be(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xe(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),fe.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:he(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Se(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ce=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=le(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Te(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ee(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ee(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!V(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&De(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||M(this.options.staleTime,this.#t)!==M(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ke(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=M(this.options.staleTime,this.#t);if(ce.isServer()||this.#r.isStale||!A(e))return;let t=j(this.#r.dataUpdatedAt,e)+1;this.#d=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(ce.isServer()||N(this.options.enabled,this.#t)===!1||!A(this.#p)||this.#p===0)&&(this.#f=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(T.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(T.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Te(e,t),o=i&&De(e,n,t,r);(a||o)&&(l={...l,...be(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=te(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=te(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Oe(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=le())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!V(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){fe.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function we(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Te(e,t){return we(e,t)||e.state.data!==void 0&&Ee(e,t,t.refetchOnMount)}function Ee(e,t,n){if(N(t.enabled,e)!==!1&&M(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Oe(e,t)}return!1}function De(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Oe(e,n)}function Oe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function ke(e,t){return!V(e.getCurrentResult(),t)}function Ae(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{se(e,()=>t.signal,()=>n=!0)},u=ae(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?re:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Me:je,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:je(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function je(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Me(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ne=class extends ve{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Pe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_e({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),fe.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Pe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Fe=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ne({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Ie(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){fe.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return fe.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Ie(e){return e.options.scope?.id}var Le=class extends S{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),V(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&L(t.mutationKey)!==L(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Pe();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){fe.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Re=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??I(r,t),a=this.get(i);return a||(a=new ye({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){fe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){fe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){fe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ze=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Re,this.#t=e.mutationCache||new Fe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(M(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=k(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return fe.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;fe.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return fe.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=fe.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return fe.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=fe.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(M(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e.behavior=Ae(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e.behavior=Ae(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(L(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{R(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(L(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{R(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=I(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ie&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Be=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=s(((e,t)=>{t.exports=Be()}))(),Ve=b.createContext(void 0),He=e=>{let t=b.useContext(Ve);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ue=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Ve.Provider,{value:e,children:t})),We=b.createContext(!1),Ge=()=>b.useContext(We);We.Provider;function Ke(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qe=b.createContext(Ke()),Je=()=>b.useContext(qe),Ye=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?oe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Xe=e=>{b.useEffect(()=>{e.clearReset()},[e])},Ze=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||oe(n,[e.error,r])),Qe=(e,t)=>t.state.data===void 0,$e=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},et=(e,t)=>e.isLoading&&e.isFetching&&!t,tt=(e,t)=>e?.suspense&&t.isPending,nt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rt(e,t,n){let r=Ge(),i=Je(),a=He(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,$e(o),Ye(o,i,s),Xe(i);let c=!a.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(e=>{let t=d?l.subscribe(fe.batchCalls(e)):O;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),tt(o,u))throw nt(o,l,i);if(Ze({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!ce.isServer()&&et(u,r)&&(c?nt(o,l,i):s?.promise)?.catch(O).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function it(e,t){return rt({...e,enabled:!0,suspense:!0,throwOnError:Qe,placeholderData:void 0},Ce,t)}function at(e,t){let n=He(t),[r]=b.useState(()=>new Le(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(fe.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&oe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ot=ut();function st(e,...t){if(!ot)return;let n=lt(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function ct(e,...t){ot&&console.warn(e,...t)}function lt(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function ut(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var dt={303:`Multiple adapter contexts detected. This might happen in monorepos.`,404:`nuqs requires an adapter to work with your framework.`,409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:`Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.`,422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:`Empty search params cache. Search params can't be accessed in Layouts.`,501:"Search params cache already populated. Have you called `parse` twice?"};function ft(e){return`[nuqs] ${dt[e]}
9
+ `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(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=Gt(``+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`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+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`:bd(`beforetoggle`,e),bd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(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=Ut.get(n)||n,xt(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}It(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:Pd(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:Pd(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)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(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||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(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||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){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&&Rd(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&&Rd(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 Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(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 Wd(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 Gd(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 Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(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),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(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 nf(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`:nf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(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[ot])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=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(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 uf(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 df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(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 mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=L.d;L.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=Su();return e||t}function xf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=dt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);ft(c),Id(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,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=dt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ft(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=te.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.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},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+jt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(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}),Id(t,`link`,n),ft(t),e.head.appendChild(t))}function If(e){return`[src="`+jt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,ft(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(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 Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,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[ot]||a[$e]||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 Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(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 Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(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=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(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=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.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=Xf.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 ep={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function tp(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=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(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 np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function rp(e){return e?(e=Qr,e):Qr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=hu();t=Je(t);var n=Yr(e,t);n!==null&&_u(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function dp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Ll&6)&&(iu=ye()+500,id(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Jt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(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(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`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 Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(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=lt(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){cp(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 kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=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(hp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.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[et]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){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 Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,hu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),Su(),t[tt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.5`)throw Error(i(527,zp,`19.2.5`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Bp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Oe=Vp.inject(Bp),ke=Vp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[tt]=t.current,Cd(e),new Lp(t)}})),y=s(((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=v()})),b=u(p(),1),x=y(),S=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},C=new class extends S{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function E(e){setTimeout(e,0)}var D=typeof window>`u`||`Deno`in globalThis;function O(){}function k(e,t){return typeof e==`function`?e(t):e}function A(e){return typeof e==`number`&&e>=0&&e!==1/0}function j(e,t){return Math.max(e+(t||0)-Date.now(),0)}function M(e,t){return typeof e==`function`?e(t):e}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==I(o,t.options))return!1}else if(!R(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(L(t.options.mutationKey)!==L(a))return!1}else if(!R(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I(e,t){return(t?.queryKeyHashFn||L)(e)}function L(e){return JSON.stringify(e,(e,t)=>U(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function R(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>R(e[n],t[n])):!1}var z=Object.prototype.hasOwnProperty;function B(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=H(e)&&H(t);if(!r&&!(U(e)&&U(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:z.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=B(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function V(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function H(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function U(e){if(!ee(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ee(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function W(e){return new Promise(t=>{T.setTimeout(t,e)})}function te(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:B(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ie=Symbol();function ae(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ie?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oe(e,t){return typeof e==`function`?e(...t):!!e}function se(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ce=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function le(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ue=E;function de(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ue,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var fe=de(),pe=new class extends S{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function me(e){return Math.min(1e3*2**e,3e4)}function he(e){return(e??`online`)===`online`?pe.isOnline():!0}var ge=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function _e(e){let t=!1,n=0,r,i=le(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ge(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||pe.isOnline())&&e.canRun(),u=()=>he(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(ce.isServer()?0:3),o=e.retryDelay??me,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),W(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ve=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ce.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}},ye=class extends ve{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Se(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Se(this.options);e.data!==void 0&&(this.setState(xe(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=te(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ie||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>M(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!j(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=ae(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=_e({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ge&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ge){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...be(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xe(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),fe.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:he(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Se(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ce=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=le(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Te(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ee(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ee(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!V(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&De(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||M(this.options.staleTime,this.#t)!==M(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ke(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=M(this.options.staleTime,this.#t);if(ce.isServer()||this.#r.isStale||!A(e))return;let t=j(this.#r.dataUpdatedAt,e)+1;this.#d=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(ce.isServer()||N(this.options.enabled,this.#t)===!1||!A(this.#p)||this.#p===0)&&(this.#f=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(T.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(T.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Te(e,t),o=i&&De(e,n,t,r);(a||o)&&(l={...l,...be(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=te(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=te(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Oe(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=le())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!V(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){fe.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function we(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Te(e,t){return we(e,t)||e.state.data!==void 0&&Ee(e,t,t.refetchOnMount)}function Ee(e,t,n){if(N(t.enabled,e)!==!1&&M(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Oe(e,t)}return!1}function De(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Oe(e,n)}function Oe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function ke(e,t){return!V(e.getCurrentResult(),t)}function Ae(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{se(e,()=>t.signal,()=>n=!0)},u=ae(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?re:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Me:je,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:je(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function je(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Me(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ne=class extends ve{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Pe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_e({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),fe.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Pe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Fe=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ne({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ie(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Ie(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){fe.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return fe.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Ie(e){return e.options.scope?.id}var Le=class extends S{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),V(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&L(t.mutationKey)!==L(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Pe();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){fe.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Re=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??I(r,t),a=this.get(i);return a||(a=new ye({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){fe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){fe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){fe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){fe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ze=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Re,this.#t=e.mutationCache||new Fe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(M(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=k(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return fe.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;fe.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return fe.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=fe.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return fe.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=fe.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(M(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e.behavior=Ae(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e.behavior=Ae(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(L(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{R(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(L(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{R(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=I(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ie&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Be=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=s(((e,t)=>{t.exports=Be()}))(),Ve=b.createContext(void 0),He=e=>{let t=b.useContext(Ve);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ue=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Ve.Provider,{value:e,children:t})),We=b.createContext(!1),Ge=()=>b.useContext(We);We.Provider;function Ke(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qe=b.createContext(Ke()),Je=()=>b.useContext(qe),Ye=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?oe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Xe=e=>{b.useEffect(()=>{e.clearReset()},[e])},Ze=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||oe(n,[e.error,r])),Qe=(e,t)=>t.state.data===void 0,$e=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},et=(e,t)=>e.isLoading&&e.isFetching&&!t,tt=(e,t)=>e?.suspense&&t.isPending,nt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rt(e,t,n){let r=Ge(),i=Je(),a=He(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,$e(o),Ye(o,i,s),Xe(i);let c=!a.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(e=>{let t=d?l.subscribe(fe.batchCalls(e)):O;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),tt(o,u))throw nt(o,l,i);if(Ze({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!ce.isServer()&&et(u,r)&&(c?nt(o,l,i):s?.promise)?.catch(O).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function it(e,t){return rt({...e,enabled:!0,suspense:!0,throwOnError:Qe,placeholderData:void 0},Ce,t)}function at(e,t){let n=He(t),[r]=b.useState(()=>new Le(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(fe.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&oe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ot=ut();function st(e,...t){if(!ot)return;let n=lt(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function ct(e,...t){ot&&console.warn(e,...t)}function lt(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function ut(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var dt={303:`Multiple adapter contexts detected. This might happen in monorepos.`,404:`nuqs requires an adapter to work with your framework.`,409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:`Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.`,422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:`Empty search params cache. Search params can't be accessed in Layouts.`,501:"Search params cache already populated. Have you called `parse` twice?"};function ft(e){return`[nuqs] ${dt[e]}
10
10
  See https://nuqs.dev/NUQS-${e}`}function pt(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${mt(r)}`)}return`?`+t.join(`&`)}function mt(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}var ht=(0,b.createContext)({useAdapter(){throw Error(ft(404))}});ht.displayName=`NuqsAdapterContext`,ot&&typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==ht&&console.error(ft(303)),window.__NuqsAdapterContext=ht);function gt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(ht.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function _t(e){let t=(0,b.useContext)(ht);if(!(`useAdapter`in t))throw Error(ft(404));return t.useAdapter(e)}var vt=()=>(0,b.useContext)(ht).defaultOptions,yt=()=>(0,b.useContext)(ht).processUrlSearchParams;function bt(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function xt(e){return{method:`throttle`,timeMs:e}}var St=xt(bt());function Ct(e){return e===null||Array.isArray(e)&&e.length===0}function wt(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function Tt(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function Et(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function Dt(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function Ot(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function kt(){return new URLSearchParams(location.search)}var At=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=St.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=St.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),st(`[nuqs gtq] Enqueueing %s=%s %O`,e,t,n),this.updateMap.set(e,t),n.history===`push`&&(this.options.history=`push`),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=kt}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=kt,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return st(`[nuqs gtq] Skipping flush due to throttleMs=Infinity`),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Dt();let i=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);i===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return Et(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);st(`[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)`,r,n,t),r===0?i():Et(i,r,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return st(`[nuqs gtq] Resetting queue %s`,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=St.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(st(`[nuqs gtq] Applying %d pending update(s) on top of %s`,this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];let a=Array.from(this.updateMap.entries()),o={...this.options},s=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),st(`[nuqs gtq] Flushing queue %O with options %O`,a,o);for(let[e,t]of a)t===null?i.delete(e):i=wt(t,e,i);t&&(i=t(i));try{return Ot(s,()=>{n(i,o)}),[i,null]}catch(e){return console.error(ft(429),a.map(([e])=>e).join(),e),[i,e]}}},jt=new At;function Mt(e,t,n){let r=(0,b.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(`,`),n]),i=(0,b.useRef)(null);return i.current===null&&(i.current=r()),(0,b.useSyncExternalStore)((0,b.useCallback)(n=>{let r=e.map(e=>t(e,n));return()=>r.forEach(e=>e())},[e.join(`,`),t]),()=>{let[e,t]=r();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}var Nt=class{callback;resolvers=Dt();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,Et(()=>{let t=this.resolvers;try{st(`[nuqs dq] Flushing debounce queue`,e);let n=this.callback(e);st(`[nuqs dq] Reset debounce queue %O`,this.queuedValue),this.queuedValue=void 0,this.resolvers=Dt(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},Pt=new class{throttleQueue;queues=new Map;queuedQuerySync=Tt();constructor(e=new At){this.throttleQueue=e}useQueuedQueries(e){return Mt(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??kt;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){st("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new Nt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(st("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}st(`[nuqs dqc] Enqueueing debounce update %O`,e);let a=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),a}abort(e){let t=this.queues.get(e);return t?(st(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())st(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}}(jt);function Ft(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}function It(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!Ft(r.getAll(t),e.getAll(t)))))return st("[nuqs `%s`] no change, returning previous",t.join(`,`),r),r;let i=Lt(e,t,n);return st(`[nuqs \`%s\`] subbed search params change
11
11
  from %O
12
- to %O`,t.join(`,`),r,i),i}}function Lt(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var Rt=`__nuqs__`,zt=Tt();function Bt(e){return function(t,n){let r=new URL(location.href);r.search=pt(t),st(`[nuqs react] Updating url: %s`,r),e&&n.shallow===!1?(n.history===`push`?location.assign:location.replace).call(location,r):(n.history===`push`?history.pushState:history.replaceState).call(history,history.state,Rt,r),zt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Vt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1});function Ht(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Vt),[n,r]=(0,b.useState)(()=>typeof location>`u`?new URLSearchParams:Lt(new URLSearchParams(location.search),e,!1));return(0,b.useEffect)(()=>{let t=()=>{r(It(new URLSearchParams(location.search),e,!1))},n=t=>{r(It(t,e,!0))};return zt.on(`update`,n),window.addEventListener(`popstate`,t),()=>{zt.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),{searchParams:n,updateUrl:(0,b.useMemo)(()=>Bt(t),[t])}}var Ut=gt(Ht);function Wt({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Vt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)(Ut,{...n,children:e}))}var Gt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Kt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),qt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Jt=e=>{let t=qt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Xt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Zt=(0,b.createContext)({}),Qt=()=>(0,b.useContext)(Zt),$t=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Qt()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Yt,width:t??l??Yt.width,height:t??l??Yt.height,stroke:e??f,strokeWidth:m,className:Gt(`lucide`,p,i),...!a&&!Xt(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),en=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)($t,{ref:i,iconNode:t,className:Gt(`lucide-${Kt(Jt(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Jt(e),n},tn=en(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),nn=en(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),rn=en(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),an=en(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),on=en(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),K=en(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),sn=en(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),cn=en(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ln=en(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),un=en(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),dn=en(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),fn=en(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),pn=en(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),mn=en(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),hn=en(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),gn=en(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function _n(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function vn(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function yn(e){return e/100*window.innerHeight}function bn(e){return e/100*window.innerWidth}function xn(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function Sn({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=xn(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=vn(t,i);break;case`em`:r=_n(t,i);break;case`vh`:r=yn(i);break;case`vw`:r=bn(i);break}return r}function Cn(e){return parseFloat(e.toFixed(3))}function wn({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function Tn(e){let{panels:t}=e,n=wn({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function En(e,t=`Assertion error`){if(!e)throw Error(t)}function Dn(e,t){return Array.from(t).sort(e===`horizontal`?On:kn)}function On(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function kn(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function An(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function jn(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Mn({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=jn(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return En(i,`No rect found`),i}var Nn;function Pn(){return Nn===void 0&&(Nn=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),Nn}function Fn(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=Dn(n,Array.from(t.children).filter(An).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,Mn({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=Pn()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:wn({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var In=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},Ln=new Map,Rn=new In;function zn(e){Ln=new Map(Ln),Ln.delete(e)}function Bn(e,t){for(let[t]of Ln)if(t.id===e)return t}function Vn(e,t){for(let[t,n]of Ln)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Hn(){return Ln}function Un(e,t){return Rn.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Wn(e,t){let n=Ln.get(e);Ln=new Map(Ln),Ln.set(e,t),Rn.emit(`groupChange`,{group:e,prev:n,next:t})}function Gn(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=jn(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function Kn(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function qn(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:$n(e),b:$n(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();En(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:Qn(Zn(n.a)),b:Qn(Zn(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Jn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Yn(e){let t=getComputedStyle(er(e)??e).display;return t===`flex`||t===`inline-flex`}function Xn(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Yn(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Jn.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Zn(e){let t=e.length;for(;t--;){let n=e[t];if(En(n,`Missing node`),Xn(n))return n}return null}function Qn(e){return e&&Number(getComputedStyle(e).zIndex)||0}function $n(e){let t=[];for(;e;)t.push(e),e=er(e);return t}function er(e){let{parentNode:t}=e;return Kn(t)?t.host:t}function tr(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function nr({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!An(n)||n.contains(e)||e.contains(n))return!0;if(qn(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(tr(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function rr(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Fn(r),a=Gn(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&nr({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ir(e,t){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 ar(e,t,n=0){return Math.abs(Cn(e)-Cn(t))<=n}function or(e,t){return ar(e,t)?0:e>t?1:-1}function sr({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(or(r,c)<0)if(a){let e=(i+c)/2;r=or(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=Cn(r),r}function cr({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(ar(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;En(u!=null,`Invalid first pivot index`),En(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];En(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,i)){let t=o-n;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];En(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,o)){let t=n-i;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];En(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&or(i,c)<0)if(e>0){let t=c-o,n=t/2;or(i+e,c)<0&&(e=or(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;or(i-e,c)<0&&(e=or(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];En(e!=null,`Previous layout not found for panel index ${r}`);let a=sr({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];En(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!ar(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(ir(c,l))return i;{let t=e<0?d:u,r=s[t];En(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!ar(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];En(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=sr({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(ar(i,s)||(t-=s-i,l[r]=s),ar(t,0))break;e>0?r--:r++}}}if(!ar(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function lr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||or(e[n],t[n])!==0)return!1;return!0}function ur({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!ar(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];En(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];En(i!=null,`No layout data found for index ${e}`);let o=r[e];En(o!=null,`No layout data found for index ${e}`);let s=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!ar(a,0))for(let e=0;e<t.length;e++){let n=r[e];En(n!=null,`No layout data found for index ${e}`);let i=n+a,o=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,ar(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function dr({groupId:e,panelId:t}){let n=()=>{let t=Hn();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=ur({layout:cr({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});lr(l,p)||Wn(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&ar(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=wn({group:t});o(Cn(Sn({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function fr(e){e.defaultPrevented||rr(e,Hn()).forEach(t=>{if(t.separator){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=dr({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function pr(e){let t=Hn();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function mr({groupId:e}){let t=()=>{let t=Hn();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=ur({layout:e,panelConstraints:r});return n?o:(lr(o,c)||Wn(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function hr(e,t){let n=pr(e),r=Vn(n.id,!0),i=n.separators.find(t=>t.element===e);En(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);En(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=mr({groupId:n.id}).getLayout(),c=ur({layout:cr({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});lr(s,c)||Wn(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function gr(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=pr(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&hr(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&hr(t,-5);break;case`End`:e.preventDefault(),hr(t,100);break;case`Enter`:{e.preventDefault();let n=pr(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Vn(n.id,!0),o=n.separators.find(e=>e.element===t);En(o,`Matching separator not found`);let s=a.get(o);En(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(En(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];hr(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=pr(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);En(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),hr(t,-100);break}}var _r={cursorFlags:0,state:`inactive`},vr=new In;function yr(){return _r}function br(e){return vr.addListener(`change`,e)}function xr(e){let t=_r,n={..._r};n.cursorFlags=e,_r=n,vr.emit(`change`,{prev:t,next:n})}function Sr(e){let t=_r;_r=e,vr.emit(`change`,{prev:t,next:e})}function Cr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Hn(),n=rr(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Sr({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var wr=e=>e,Tr=()=>{},Er=1,Dr=2,Or=4,kr=8,Ar=3,jr=12,Mr;function Nr(){return Mr===void 0&&(Mr=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Mr=!0)),Mr}function Pr({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Nr()){let t=(e&Er)!==0,n=(e&Dr)!==0,r=(e&Or)!==0,i=(e&kr)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Nr()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Fr=new WeakMap;function Ir(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Fr.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=yr();switch(r.state){case`active`:case`hover`:{let e=Pr({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Fr.set(e,{prevStyle:t,styleSheet:n})}function Lr({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=cr({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(lr(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Er:Dr;break;case`vertical`:s|=d<0?Or:kr;break}}else Wn(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ar:c|=s&Ar,t.movementY===0?c|=o&jr:c|=s&jr,xr(c),Ir(e)}function Rr(e){let t=Hn(),n=yr();switch(n.state){case`active`:Lr({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function zr(e){if(e.defaultPrevented)return;let t=yr(),n=Hn();switch(t.state){case`active`:if(e.buttons===0){Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Lr({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=rr(e,n);r.length===0?t.state!==`inactive`&&Sr({cursorFlags:0,state:`inactive`}):Sr({cursorFlags:0,hitRegions:r,state:`hover`}),Ir(e.currentTarget);break}}}function Br(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(yr().state){case`hover`:Sr({cursorFlags:0,state:`inactive`})}}function Vr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=yr();switch(t.state){case`active`:Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ir(e.currentTarget),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)}),e.preventDefault())}}function Hr(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Cn(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Cn((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Ur(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=wn({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Cn(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Wr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Gr({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=Cn(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=Cn((r[e]??0)/a*l);else{let e=Cn(l/c.length);for(let t of c)u[t]=e}return u}function Kr(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var qr=new Map;function Jr(e){let t=!0;En(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=wn({group:e});if(t===0)return;let n=Vn(e.id);if(!n)return;let r=Tn(e),i=n.defaultLayoutDeferred?Hr(r):n.layout,a=ur({layout:Gr({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&lr(n.layout,a)&&Wr(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Wn(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Ur(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{En(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=wn({group:e}),s=Tn(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Kr(e.panels,l)||(l=void 0));let u=ur({layout:e.mutableState.layouts[c]??l??Hr(s),panelConstraints:s}),d=e.element.ownerDocument;qr.set(d,(qr.get(d)??0)+1);let f=new Map;return Fn(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Wn(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{En(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,gr)}),qr.get(d)===1&&(d.addEventListener(`dblclick`,fr,!0),d.addEventListener(`pointerdown`,Cr,!0),d.addEventListener(`pointerleave`,Rr),d.addEventListener(`pointermove`,zr),d.addEventListener(`pointerout`,Br),d.addEventListener(`pointerup`,Vr,!0)),function(){t=!1,qr.set(d,Math.max(0,(qr.get(d)??0)-1)),zn(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,gr)}),qr.get(d)||(d.removeEventListener(`dblclick`,fr,!0),d.removeEventListener(`pointerdown`,Cr,!0),d.removeEventListener(`pointerleave`,Rr),d.removeEventListener(`pointermove`,zr),d.removeEventListener(`pointerout`,Br),d.removeEventListener(`pointerup`,Vr,!0)),a.disconnect()}}function Yr(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Xr(e){let t=(0,b.useId)();return`${e??t}`}var Zr=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Qr(e){let t=(0,b.useRef)(e);return Zr(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function $r(...e){return Qr(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function ei(e){let t=(0,b.useRef)({...e});return Zr(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var ti=(0,b.createContext)(null);function ni(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:wr});(0,b.useImperativeHandle)(t,()=>n.current,[]),Zr(()=>{Object.assign(n.current,mr({groupId:e}))})}function ri({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,b.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Qr(e=>{lr(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Qr(e=>{lr(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=Xr(s),v=(0,b.useRef)(null),[y,x]=Yr(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=$r(v,a);ni(_,o);let w=Qr((e,t)=>{let r=yr(),i=Bn(e),a=Vn(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=ei({defaultLayout:n,disableCursor:r}),E=(0,b.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=S.current;return t.panels=Dn(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=Dn(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},togglePanelDisabled:(e,t)=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Bn(_),i=Vn(_);r&&i&&Wn(r,{...i,derivedPanelConstraints:Tn(r)})},toggleSeparatorDisabled:(e,t)=>{let n=S.current.separators.find(t=>t.id===e);n&&(n.disabled=t)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Zr(()=>{let e=v.current;if(e===null)return;let t=S.current,n;if(T.defaultLayout!==void 0&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=T.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:S.current.lastExpandedPanelSizes,layouts:S.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Jr(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Vn(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=Un(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=ar(t.collapsedSize,i[t.panelId]),a=ar(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=yr().state!==`active`;h(i),o&&g(i)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,b.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,G.jsx)(ti.Provider,{value:E,children:(0,G.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:C,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}ri.displayName=`Group`;function ii(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function ai({id:e,panelIds:t,storage:n}){let r=ii(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function oi({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){let i=t!==void 0,a=`id`in r?r.id:r.groupId,o=ii(a,t??[]),s=(0,b.useSyncExternalStore)(si,()=>n.getItem(o),()=>n.getItem(o)),c=(0,b.useMemo)(()=>{if(s){let e=JSON.parse(s),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[s]),l=(0,b.useMemo)(()=>{if(!c)return ai({id:a,panelIds:t,storage:n})},[c,a,t,n]),u=c??l,d=(0,b.useRef)(null),f=(0,b.useCallback)(()=>{let e=d.current;e&&(d.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{f()},[f]);let p=(0,b.useCallback)(e=>{f();let t;t=i?ii(a,Object.keys(e)):ii(a,[]);try{n.setItem(t,JSON.stringify(e))}catch(e){console.error(e)}},[f,i,a,n]);return{defaultLayout:u,onLayoutChange:(0,b.useCallback)(t=>{f(),e===0?p(t):d.current=setTimeout(()=>{p(t)},e)},[f,e,p]),onLayoutChanged:p}}function si(){return function(){}}function ci(){let e=(0,b.useContext)(ti);return En(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function li(e,t){let{id:n}=ci(),r=(0,b.useRef)({collapse:Tr,expand:Tr,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Tr});(0,b.useImperativeHandle)(t,()=>r.current,[]),Zr(()=>{Object.assign(r.current,dr({groupId:n,panelId:e}))})}function ui({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Xr(c),_=ei({disabled:a}),v=(0,b.useRef)(null),y=$r(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,togglePanelDisabled:T}=ci(),E=d!==null,D=Qr((e,t,n)=>{d?.(e,c,n)});Zr(()=>{let e=v.current;if(e!==null)return w({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:E?D:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,!!a)},[a,g,T]),li(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Un(S,e),O,O),A;return A=k?JSON.parse(k):i?{flexGrow:void 0,flexShrink:void 0,flexBasis:i}:{flexGrow:1},(0,G.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...di,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,G.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}ui.displayName=`Panel`;var di={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function fi({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=ur({layout:cr({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ur({layout:cr({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function pi({children:e,className:t,disabled:n,elementRef:r,id:i,style:a,...o}){let s=Xr(i),c=ei({disabled:n}),[l,u]=(0,b.useState)({}),[d,f]=(0,b.useState)(`inactive`),p=(0,b.useRef)(null),m=$r(p,r),{disableCursor:h,id:g,orientation:_,registerSeparator:v,toggleSeparatorDisabled:y}=ci(),x=_===`horizontal`?`vertical`:`horizontal`;Zr(()=>{let e=p.current;if(e!==null){let t={disabled:c.disabled,element:e,id:s},n=v(t),r=br(e=>{f(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Un(g,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);u(fi({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[g,s,v,c]),(0,b.useEffect)(()=>{y(s,!!n)},[n,s,y]);let S;return n&&!h&&(S=`not-allowed`),(0,G.jsx)(`div`,{...o,"aria-controls":l.valueControls,"aria-disabled":n||void 0,"aria-orientation":x,"aria-valuemax":l.valueMax,"aria-valuemin":l.valueMin,"aria-valuenow":l.valueNow,children:e,className:t,"data-separator":n?`disabled`:d,"data-testid":s,id:s,ref:m,role:`separator`,style:{flexBasis:`auto`,cursor:S,...a,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}pi.displayName=`Separator`;var mi=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},hi=(e=>e?mi(e):mi),gi=e=>e;function _i(e,t=gi){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var vi=e=>{let t=hi(e),n=e=>_i(t,e);return Object.assign(n,t),n},yi=(e=>e?vi(e):vi),bi=yi()(e=>({status:`idle`,requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,error:null})})),xi=globalThis.crypto;async function Si(e){return(await xi).getRandomValues(new Uint8Array(e))}async function Ci(e){let t=``;for(;t.length<e;){let n=await Si(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function wi(e){return await Ci(e)}async function Ti(e){let t=await(await xi).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function Ei(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await wi(e);return{code_verifier:t,code_challenge:await Ti(t)}}var Di=Object.freeze({status:`aborted`});function q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Oi=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ki=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Ai={};function ji(e){return e&&Object.assign(Ai,e),Ai}function Mi(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ni(e,t){return typeof t==`bigint`?t.toString():t}function Pi(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Fi(e){return e==null}function Ii(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Li(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var Ri=Symbol(`evaluating`);function zi(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ri)return r===void 0&&(r=Ri,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vi(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Hi(e){return JSON.stringify(e)}function Ui(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Wi=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Gi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ki=Pi(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function qi(e){if(Gi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Gi(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ji(e){return qi(e)?{...e}:Array.isArray(e)?[...e]:e}var Yi=new Set([`string`,`number`,`symbol`]);function Xi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Zi(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Qi(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function $i(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ea={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ta(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Zi(e,Vi(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Bi(this,`shape`,e),e},checks:[]}))}function na(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Zi(e,Vi(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Bi(this,`shape`,r),r},checks:[]}))}function ra(e,t){if(!qi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function ia(e,t){if(!qi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function aa(e,t){return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Bi(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function oa(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Zi(t,Vi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Bi(this,`shape`,i),i},checks:[]}))}function sa(e,t,n){return Zi(t,Vi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Bi(this,`shape`,i),i}}))}function ca(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function la(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ua(e){return typeof e==`string`?e:e?.message}function da(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=ua(e.inst?._zod.def?.error?.(e))??ua(t?.error?.(e))??ua(n.customError?.(e))??ua(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function fa(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function pa(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var ma=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ni,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ha=q(`$ZodError`,ma),ga=q(`$ZodError`,ma,{Parent:Error});function _a(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function va(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var ya=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Oi;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},ba=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},xa=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Oi;return a.issues.length?{success:!1,error:new(e??ha)(a.issues.map(e=>da(e,i,ji())))}:{success:!0,data:a.value}},Sa=xa(ga),Ca=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>da(e,i,ji())))}:{success:!0,data:a.value}},wa=Ca(ga),Ta=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ya(e)(t,n,i)},Ea=e=>(t,n,r)=>ya(e)(t,n,r),Da=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ba(e)(t,n,i)},Oa=e=>async(t,n,r)=>ba(e)(t,n,r),ka=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xa(e)(t,n,i)},Aa=e=>(t,n,r)=>xa(e)(t,n,r),ja=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ca(e)(t,n,i)},Ma=e=>async(t,n,r)=>Ca(e)(t,n,r),Na=/^[cC][^\s-]{8,}$/,Pa=/^[0-9a-z]+$/,Fa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ia=/^[0-9a-vA-V]{20}$/,La=/^[A-Za-z0-9]{27}$/,Ra=/^[a-zA-Z0-9_-]{21}$/,za=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ba=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Va=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ha=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ua=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Wa(){return new RegExp(Ua,`u`)}var Ga=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ka=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ja=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ya=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xa=/^[A-Za-z0-9_-]*$/,Za=/^\+[1-9]\d{6,14}$/,Qa=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,$a=RegExp(`^${Qa}$`);function eo(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function to(e){return RegExp(`^${eo(e)}$`)}function no(e){let t=eo({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Qa}T(?:${r})$`)}var ro=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},io=/^-?\d+$/,ao=/^-?\d+(?:\.\d+)?$/,oo=/^(?:true|false)$/i,so=/^null$/i,co=/^undefined$/i,lo=/^[^A-Z]*$/,uo=/^[^a-z]*$/,fo=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),po={number:`number`,bigint:`bigint`,object:`date`},mo=q(`$ZodCheckLessThan`,(e,t)=>{fo.init(e,t);let n=po[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ho=q(`$ZodCheckGreaterThan`,(e,t)=>{fo.init(e,t);let n=po[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),go=q(`$ZodCheckMultipleOf`,(e,t)=>{fo.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Li(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_o=q(`$ZodCheckNumberFormat`,(e,t)=>{fo.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ea[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=io)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),vo=q(`$ZodCheckMaxLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=fa(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yo=q(`$ZodCheckMinLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=fa(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bo=q(`$ZodCheckLengthEquals`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=fa(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xo=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;fo.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),So=q(`$ZodCheckRegex`,(e,t)=>{xo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Co=q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lo,xo.init(e,t)}),wo=q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=uo,xo.init(e,t)}),To=q(`$ZodCheckIncludes`,(e,t)=>{fo.init(e,t);let n=Xi(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Eo=q(`$ZodCheckStartsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`^${Xi(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Do=q(`$ZodCheckEndsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`.*${Xi(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Oo=q(`$ZodCheckOverwrite`,(e,t)=>{fo.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ko=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
12
+ to %O`,t.join(`,`),r,i),i}}function Lt(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var Rt=`__nuqs__`,zt=Tt();function Bt(e){return function(t,n){let r=new URL(location.href);r.search=pt(t),st(`[nuqs react] Updating url: %s`,r),e&&n.shallow===!1?(n.history===`push`?location.assign:location.replace).call(location,r):(n.history===`push`?history.pushState:history.replaceState).call(history,history.state,Rt,r),zt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Vt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1});function Ht(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Vt),[n,r]=(0,b.useState)(()=>typeof location>`u`?new URLSearchParams:Lt(new URLSearchParams(location.search),e,!1));return(0,b.useEffect)(()=>{let t=()=>{r(It(new URLSearchParams(location.search),e,!1))},n=t=>{r(It(t,e,!0))};return zt.on(`update`,n),window.addEventListener(`popstate`,t),()=>{zt.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),{searchParams:n,updateUrl:(0,b.useMemo)(()=>Bt(t),[t])}}var Ut=gt(Ht);function Wt({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Vt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)(Ut,{...n,children:e}))}var Gt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Kt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),qt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Jt=e=>{let t=qt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Xt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Zt=(0,b.createContext)({}),Qt=()=>(0,b.useContext)(Zt),$t=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Qt()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Yt,width:t??l??Yt.width,height:t??l??Yt.height,stroke:e??f,strokeWidth:m,className:Gt(`lucide`,p,i),...!a&&!Xt(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),en=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)($t,{ref:i,iconNode:t,className:Gt(`lucide-${Kt(Jt(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Jt(e),n},tn=en(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),nn=en(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),rn=en(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),an=en(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),on=en(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),K=en(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),sn=en(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),cn=en(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ln=en(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),un=en(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),dn=en(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),fn=en(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),pn=en(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),mn=en(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),hn=en(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),gn=en(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function _n(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function vn(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function yn(e){return e/100*window.innerHeight}function bn(e){return e/100*window.innerWidth}function xn(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function Sn({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=xn(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=vn(t,i);break;case`em`:r=_n(t,i);break;case`vh`:r=yn(i);break;case`vw`:r=bn(i);break}return r}function Cn(e){return parseFloat(e.toFixed(3))}function wn({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function Tn(e){let{panels:t}=e,n=wn({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=Cn(Sn({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function En(e,t=`Assertion error`){if(!e)throw Error(t)}function Dn(e,t){return Array.from(t).sort(e===`horizontal`?On:kn)}function On(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function kn(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function An(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function jn(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Mn({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=jn(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return En(i,`No rect found`),i}var Nn;function Pn(){return Nn===void 0&&(Nn=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),Nn}function Fn(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=Dn(n,Array.from(t.children).filter(An).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,Mn({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=Pn()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:wn({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var In=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},Ln=new Map,Rn=new In;function zn(e){Ln=new Map(Ln),Ln.delete(e)}function Bn(e,t){for(let[t]of Ln)if(t.id===e)return t}function Vn(e,t){for(let[t,n]of Ln)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Hn(){return Ln}function Un(e,t){return Rn.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Wn(e,t){let n=Ln.get(e);Ln=new Map(Ln),Ln.set(e,t),Rn.emit(`groupChange`,{group:e,prev:n,next:t})}function Gn(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=jn(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function Kn(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function qn(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:$n(e),b:$n(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();En(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:Qn(Zn(n.a)),b:Qn(Zn(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Jn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Yn(e){let t=getComputedStyle(er(e)??e).display;return t===`flex`||t===`inline-flex`}function Xn(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Yn(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Jn.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Zn(e){let t=e.length;for(;t--;){let n=e[t];if(En(n,`Missing node`),Xn(n))return n}return null}function Qn(e){return e&&Number(getComputedStyle(e).zIndex)||0}function $n(e){let t=[];for(;e;)t.push(e),e=er(e);return t}function er(e){let{parentNode:t}=e;return Kn(t)?t.host:t}function tr(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function nr({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!An(n)||n.contains(e)||e.contains(n))return!0;if(qn(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(tr(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function rr(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Fn(r),a=Gn(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&nr({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ir(e,t){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 ar(e,t,n=0){return Math.abs(Cn(e)-Cn(t))<=n}function or(e,t){return ar(e,t)?0:e>t?1:-1}function sr({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(or(r,c)<0)if(a){let e=(i+c)/2;r=or(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=Cn(r),r}function cr({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(ar(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;En(u!=null,`Invalid first pivot index`),En(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];En(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,i)){let t=o-n;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];En(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(En(n!=null,`Previous layout not found for panel index ${t}`),ar(n,o)){let t=n-i;or(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];En(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&or(i,c)<0)if(e>0){let t=c-o,n=t/2;or(i+e,c)<0&&(e=or(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;or(i-e,c)<0&&(e=or(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];En(e!=null,`Previous layout not found for panel index ${r}`);let a=sr({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];En(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!ar(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(ir(c,l))return i;{let t=e<0?d:u,r=s[t];En(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=sr({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!ar(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];En(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=sr({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(ar(i,s)||(t-=s-i,l[r]=s),ar(t,0))break;e>0?r--:r++}}}if(!ar(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function lr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||or(e[n],t[n])!==0)return!1;return!0}function ur({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!ar(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];En(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];En(i!=null,`No layout data found for index ${e}`);let o=r[e];En(o!=null,`No layout data found for index ${e}`);let s=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!ar(a,0))for(let e=0;e<t.length;e++){let n=r[e];En(n!=null,`No layout data found for index ${e}`);let i=n+a,o=sr({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,ar(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function dr({groupId:e,panelId:t}){let n=()=>{let t=Hn();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=ur({layout:cr({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});lr(l,p)||Wn(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&ar(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=wn({group:t});o(Cn(Sn({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function fr(e){e.defaultPrevented||rr(e,Hn()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=dr({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function pr(e){let t=Hn();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function mr({groupId:e}){let t=()=>{let t=Hn();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=ur({layout:e,panelConstraints:r});return n?o:(lr(o,c)||Wn(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function hr(e,t){let n=pr(e),r=Vn(n.id,!0),i=n.separators.find(t=>t.element===e);En(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);En(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=mr({groupId:n.id}).getLayout(),c=ur({layout:cr({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});lr(s,c)||Wn(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function gr(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=pr(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&hr(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&hr(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&hr(t,-5);break;case`End`:e.preventDefault(),hr(t,100);break;case`Enter`:{e.preventDefault();let n=pr(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Vn(n.id,!0),o=n.separators.find(e=>e.element===t);En(o,`Matching separator not found`);let s=a.get(o);En(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(En(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];hr(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=pr(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);En(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),hr(t,-100);break}}var _r={cursorFlags:0,state:`inactive`},vr=new In;function yr(){return _r}function br(e){return vr.addListener(`change`,e)}function xr(e){let t=_r,n={..._r};n.cursorFlags=e,_r=n,vr.emit(`change`,{prev:t,next:n})}function Sr(e){let t=_r;_r=e,vr.emit(`change`,{prev:t,next:e})}function Cr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Hn(),n=rr(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Sr({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var wr=e=>e,Tr=()=>{},Er=1,Dr=2,Or=4,kr=8,Ar=3,jr=12,Mr;function Nr(){return Mr===void 0&&(Mr=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Mr=!0)),Mr}function Pr({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Nr()){let t=(e&Er)!==0,n=(e&Dr)!==0,r=(e&Or)!==0,i=(e&kr)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Nr()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Fr=new WeakMap;function Ir(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Fr.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=yr();switch(r.state){case`active`:case`hover`:{let e=Pr({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Fr.set(e,{prevStyle:t,styleSheet:n})}function Lr({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=cr({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(lr(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Er:Dr;break;case`vertical`:s|=d<0?Or:kr;break}}else Wn(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ar:c|=s&Ar,t.movementY===0?c|=o&jr:c|=s&jr,xr(c),Ir(e)}function Rr(e){let t=Hn(),n=yr();switch(n.state){case`active`:Lr({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function zr(e){if(e.defaultPrevented)return;let t=yr(),n=Hn();switch(t.state){case`active`:if(e.buttons===0){Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Lr({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=rr(e,n);r.length===0?t.state!==`inactive`&&Sr({cursorFlags:0,state:`inactive`}):Sr({cursorFlags:0,hitRegions:r,state:`hover`}),Ir(e.currentTarget);break}}}function Br(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(yr().state){case`hover`:Sr({cursorFlags:0,state:`inactive`})}}function Vr(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=yr();switch(t.state){case`active`:Sr({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ir(e.currentTarget),t.hitRegions.forEach(e=>{let t=Vn(e.group.id,!0);Wn(e.group,t)}),e.preventDefault())}}function Hr(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Cn(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Cn((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Ur(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=wn({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Cn(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Wr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Gr({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=Cn(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=Cn((r[e]??0)/a*l);else{let e=Cn(l/c.length);for(let t of c)u[t]=e}return u}function Kr(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var qr=new Map;function Jr(e){let t=!0;En(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=wn({group:e});if(t===0)return;let n=Vn(e.id);if(!n)return;let r=Tn(e),i=n.defaultLayoutDeferred?Hr(r):n.layout,a=ur({layout:Gr({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&lr(n.layout,a)&&Wr(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Wn(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Ur(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{En(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=wn({group:e}),s=Tn(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Kr(e.panels,l)||(l=void 0));let u=ur({layout:e.mutableState.layouts[c]??l??Hr(s),panelConstraints:s}),d=e.element.ownerDocument;qr.set(d,(qr.get(d)??0)+1);let f=new Map;return Fn(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Wn(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{En(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,gr)}),qr.get(d)===1&&(d.addEventListener(`dblclick`,fr,!0),d.addEventListener(`pointerdown`,Cr,!0),d.addEventListener(`pointerleave`,Rr),d.addEventListener(`pointermove`,zr),d.addEventListener(`pointerout`,Br),d.addEventListener(`pointerup`,Vr,!0)),function(){t=!1,qr.set(d,Math.max(0,(qr.get(d)??0)-1)),zn(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,gr)}),qr.get(d)||(d.removeEventListener(`dblclick`,fr,!0),d.removeEventListener(`pointerdown`,Cr,!0),d.removeEventListener(`pointerleave`,Rr),d.removeEventListener(`pointermove`,zr),d.removeEventListener(`pointerout`,Br),d.removeEventListener(`pointerup`,Vr,!0)),a.disconnect()}}function Yr(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Xr(e){let t=(0,b.useId)();return`${e??t}`}var Zr=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Qr(e){let t=(0,b.useRef)(e);return Zr(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function $r(...e){return Qr(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function ei(e){let t=(0,b.useRef)({...e});return Zr(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var ti=(0,b.createContext)(null);function ni(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:wr});(0,b.useImperativeHandle)(t,()=>n.current,[]),Zr(()=>{Object.assign(n.current,mr({groupId:e}))})}function ri({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,b.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Qr(e=>{lr(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Qr(e=>{lr(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=Xr(s),v=(0,b.useRef)(null),[y,x]=Yr(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=$r(v,a);ni(_,o);let w=Qr((e,t)=>{let r=yr(),i=Bn(e),a=Vn(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=ei({defaultLayout:n,disableCursor:r}),E=(0,b.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=S.current;return t.panels=Dn(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=Dn(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},updatePanelProps:(e,{disabled:t})=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Bn(_),i=Vn(_);r&&i&&Wn(r,{...i,derivedPanelConstraints:Tn(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=S.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Zr(()=>{let e=v.current;if(e===null)return;let t=S.current,n;if(T.defaultLayout!==void 0&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=T.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:S.current.lastExpandedPanelSizes,layouts:S.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Jr(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Vn(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=Un(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=ar(t.collapsedSize,i[t.panelId]),a=ar(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=yr().state!==`active`;h(i),o&&g(i)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,b.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,G.jsx)(ti.Provider,{value:E,children:(0,G.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:C,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}ri.displayName=`Group`;function ii(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function ai({id:e,panelIds:t,storage:n}){let r=ii(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function oi({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){let i=t!==void 0,a=`id`in r?r.id:r.groupId,o=ii(a,t??[]),s=(0,b.useSyncExternalStore)(si,()=>n.getItem(o),()=>n.getItem(o)),c=(0,b.useMemo)(()=>{if(s){let e=JSON.parse(s),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[s]),l=(0,b.useMemo)(()=>{if(!c)return ai({id:a,panelIds:t,storage:n})},[c,a,t,n]),u=c??l,d=(0,b.useRef)(null),f=(0,b.useCallback)(()=>{let e=d.current;e&&(d.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{f()},[f]);let p=(0,b.useCallback)(e=>{f();let t;t=i?ii(a,Object.keys(e)):ii(a,[]);try{n.setItem(t,JSON.stringify(e))}catch(e){console.error(e)}},[f,i,a,n]);return{defaultLayout:u,onLayoutChange:(0,b.useCallback)(t=>{f(),e===0?p(t):d.current=setTimeout(()=>{p(t)},e)},[f,e,p]),onLayoutChanged:p}}function si(){return function(){}}function ci(){let e=(0,b.useContext)(ti);return En(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function li(e,t){let{id:n}=ci(),r=(0,b.useRef)({collapse:Tr,expand:Tr,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Tr});(0,b.useImperativeHandle)(t,()=>r.current,[]),Zr(()=>{Object.assign(r.current,dr({groupId:n,panelId:e}))})}function ui({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Xr(c),_=ei({disabled:a}),v=(0,b.useRef)(null),y=$r(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=ci(),E=d!==null,D=Qr((e,t,n)=>{d?.(e,c,n)});Zr(()=>{let e=v.current;if(e!==null)return w({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:E?D:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,{disabled:a})},[a,g,T]),li(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Un(S,e),O,O),A;return A=k?JSON.parse(k):i?{flexGrow:void 0,flexShrink:void 0,flexBasis:i}:{flexGrow:1},(0,G.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...di,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,G.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}ui.displayName=`Panel`;var di={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function fi({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=ur({layout:cr({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ur({layout:cr({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function pi({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Xr(a),l=ei({disabled:n,disableDoubleClick:r}),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(`inactive`),m=(0,b.useRef)(null),h=$r(m,i),{disableCursor:g,id:_,orientation:v,registerSeparator:y,updateSeparatorProps:x}=ci(),S=v===`horizontal`?`vertical`:`horizontal`;Zr(()=>{let e=m.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=y(t),r=br(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Un(_,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(fi({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[_,c,y,l]),(0,b.useEffect)(()=>{x(c,{disabled:n,disableDoubleClick:r})},[n,r,c,x]);let C;return n&&!g&&(C=`not-allowed`),(0,G.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":S,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":n?`disabled`:f,"data-testid":c,id:c,ref:h,role:`separator`,style:{flexBasis:`auto`,cursor:C,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}pi.displayName=`Separator`;var mi=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},hi=(e=>e?mi(e):mi),gi=e=>e;function _i(e,t=gi){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var vi=e=>{let t=hi(e),n=e=>_i(t,e);return Object.assign(n,t),n},yi=(e=>e?vi(e):vi),bi=yi()(e=>({status:`idle`,requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,error:null})})),xi=globalThis.crypto;async function Si(e){return(await xi).getRandomValues(new Uint8Array(e))}async function Ci(e){let t=``;for(;t.length<e;){let n=await Si(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function wi(e){return await Ci(e)}async function Ti(e){let t=await(await xi).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function Ei(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await wi(e);return{code_verifier:t,code_challenge:await Ti(t)}}var Di=Object.freeze({status:`aborted`});function q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Oi=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ki=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Ai={};function ji(e){return e&&Object.assign(Ai,e),Ai}function Mi(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ni(e,t){return typeof t==`bigint`?t.toString():t}function Pi(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Fi(e){return e==null}function Ii(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Li(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var Ri=Symbol(`evaluating`);function zi(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ri)return r===void 0&&(r=Ri,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vi(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Hi(e){return JSON.stringify(e)}function Ui(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Wi=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Gi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ki=Pi(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function qi(e){if(Gi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Gi(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ji(e){return qi(e)?{...e}:Array.isArray(e)?[...e]:e}var Yi=new Set([`string`,`number`,`symbol`]);function Xi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Zi(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Qi(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function $i(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ea={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ta(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Zi(e,Vi(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Bi(this,`shape`,e),e},checks:[]}))}function na(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Zi(e,Vi(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Bi(this,`shape`,r),r},checks:[]}))}function ra(e,t){if(!qi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function ia(e,t){if(!qi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bi(this,`shape`,n),n}}))}function aa(e,t){return Zi(e,Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Bi(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function oa(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Zi(t,Vi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Bi(this,`shape`,i),i},checks:[]}))}function sa(e,t,n){return Zi(t,Vi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Bi(this,`shape`,i),i}}))}function ca(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function la(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ua(e){return typeof e==`string`?e:e?.message}function da(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=ua(e.inst?._zod.def?.error?.(e))??ua(t?.error?.(e))??ua(n.customError?.(e))??ua(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function fa(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function pa(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var ma=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ni,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ha=q(`$ZodError`,ma),ga=q(`$ZodError`,ma,{Parent:Error});function _a(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function va(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var ya=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Oi;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},ba=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>da(e,a,ji())));throw Wi(t,i?.callee),t}return o.value},xa=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Oi;return a.issues.length?{success:!1,error:new(e??ha)(a.issues.map(e=>da(e,i,ji())))}:{success:!0,data:a.value}},Sa=xa(ga),Ca=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>da(e,i,ji())))}:{success:!0,data:a.value}},wa=Ca(ga),Ta=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ya(e)(t,n,i)},Ea=e=>(t,n,r)=>ya(e)(t,n,r),Da=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ba(e)(t,n,i)},Oa=e=>async(t,n,r)=>ba(e)(t,n,r),ka=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xa(e)(t,n,i)},Aa=e=>(t,n,r)=>xa(e)(t,n,r),ja=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ca(e)(t,n,i)},Ma=e=>async(t,n,r)=>Ca(e)(t,n,r),Na=/^[cC][^\s-]{8,}$/,Pa=/^[0-9a-z]+$/,Fa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ia=/^[0-9a-vA-V]{20}$/,La=/^[A-Za-z0-9]{27}$/,Ra=/^[a-zA-Z0-9_-]{21}$/,za=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ba=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Va=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ha=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ua=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Wa(){return new RegExp(Ua,`u`)}var Ga=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ka=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ja=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ya=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xa=/^[A-Za-z0-9_-]*$/,Za=/^\+[1-9]\d{6,14}$/,Qa=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,$a=RegExp(`^${Qa}$`);function eo(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function to(e){return RegExp(`^${eo(e)}$`)}function no(e){let t=eo({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Qa}T(?:${r})$`)}var ro=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},io=/^-?\d+$/,ao=/^-?\d+(?:\.\d+)?$/,oo=/^(?:true|false)$/i,so=/^null$/i,co=/^undefined$/i,lo=/^[^A-Z]*$/,uo=/^[^a-z]*$/,fo=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),po={number:`number`,bigint:`bigint`,object:`date`},mo=q(`$ZodCheckLessThan`,(e,t)=>{fo.init(e,t);let n=po[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ho=q(`$ZodCheckGreaterThan`,(e,t)=>{fo.init(e,t);let n=po[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),go=q(`$ZodCheckMultipleOf`,(e,t)=>{fo.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Li(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_o=q(`$ZodCheckNumberFormat`,(e,t)=>{fo.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ea[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=io)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),vo=q(`$ZodCheckMaxLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=fa(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yo=q(`$ZodCheckMinLength`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=fa(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bo=q(`$ZodCheckLengthEquals`,(e,t)=>{var n;fo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=fa(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xo=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;fo.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),So=q(`$ZodCheckRegex`,(e,t)=>{xo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Co=q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lo,xo.init(e,t)}),wo=q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=uo,xo.init(e,t)}),To=q(`$ZodCheckIncludes`,(e,t)=>{fo.init(e,t);let n=Xi(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Eo=q(`$ZodCheckStartsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`^${Xi(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Do=q(`$ZodCheckEndsWith`,(e,t)=>{fo.init(e,t);let n=RegExp(`.*${Xi(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Oo=q(`$ZodCheckOverwrite`,(e,t)=>{fo.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ko=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
13
13
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
14
14
  `))}},Ao={major:4,minor:3,patch:6},jo=q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ao;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=ca(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Oi;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ca(e,t))});else{if(e.issues.length===t)continue;r||=ca(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ca(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Oi;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Oi;return o.then(e=>t(e,r,a))}return t(o,r,a)}}zi(e,`~standard`,()=>({validate:t=>{try{let n=Sa(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return wa(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Mo=q(`$ZodString`,(e,t)=>{jo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ro(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),No=q(`$ZodStringFormat`,(e,t)=>{xo.init(e,t),Mo.init(e,t)}),Po=q(`$ZodGUID`,(e,t)=>{t.pattern??=Ba,No.init(e,t)}),Fo=q(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Va(e)}else t.pattern??=Va();No.init(e,t)}),Io=q(`$ZodEmail`,(e,t)=>{t.pattern??=Ha,No.init(e,t)}),Lo=q(`$ZodURL`,(e,t)=>{No.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ro=q(`$ZodEmoji`,(e,t)=>{t.pattern??=Wa(),No.init(e,t)}),zo=q(`$ZodNanoID`,(e,t)=>{t.pattern??=Ra,No.init(e,t)}),Bo=q(`$ZodCUID`,(e,t)=>{t.pattern??=Na,No.init(e,t)}),Vo=q(`$ZodCUID2`,(e,t)=>{t.pattern??=Pa,No.init(e,t)}),Ho=q(`$ZodULID`,(e,t)=>{t.pattern??=Fa,No.init(e,t)}),Uo=q(`$ZodXID`,(e,t)=>{t.pattern??=Ia,No.init(e,t)}),Wo=q(`$ZodKSUID`,(e,t)=>{t.pattern??=La,No.init(e,t)}),Go=q(`$ZodISODateTime`,(e,t)=>{t.pattern??=no(t),No.init(e,t)}),Ko=q(`$ZodISODate`,(e,t)=>{t.pattern??=$a,No.init(e,t)}),qo=q(`$ZodISOTime`,(e,t)=>{t.pattern??=to(t),No.init(e,t)}),Jo=q(`$ZodISODuration`,(e,t)=>{t.pattern??=za,No.init(e,t)}),Yo=q(`$ZodIPv4`,(e,t)=>{t.pattern??=Ga,No.init(e,t),e._zod.bag.format=`ipv4`}),Xo=q(`$ZodIPv6`,(e,t)=>{t.pattern??=Ka,No.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Zo=q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=qa,No.init(e,t)}),Qo=q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ja,No.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function $o(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var es=q(`$ZodBase64`,(e,t)=>{t.pattern??=Ya,No.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$o(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function ts(e){if(!Xa.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $o(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ns=q(`$ZodBase64URL`,(e,t)=>{t.pattern??=Xa,No.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ts(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rs=q(`$ZodE164`,(e,t)=>{t.pattern??=Za,No.init(e,t)});function is(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var as=q(`$ZodJWT`,(e,t)=>{No.init(e,t),e._zod.check=n=>{is(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),os=q(`$ZodNumber`,(e,t)=>{jo.init(e,t),e._zod.pattern=e._zod.bag.pattern??ao,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ss=q(`$ZodNumberFormat`,(e,t)=>{_o.init(e,t),os.init(e,t)}),cs=q(`$ZodBoolean`,(e,t)=>{jo.init(e,t),e._zod.pattern=oo,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ls=q(`$ZodUndefined`,(e,t)=>{jo.init(e,t),e._zod.pattern=co,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),us=q(`$ZodNull`,(e,t)=>{jo.init(e,t),e._zod.pattern=so,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ds=q(`$ZodAny`,(e,t)=>{jo.init(e,t),e._zod.parse=e=>e}),fs=q(`$ZodUnknown`,(e,t)=>{jo.init(e,t),e._zod.parse=e=>e}),ps=q(`$ZodNever`,(e,t)=>{jo.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function ms(e,t,n){e.issues.length&&t.issues.push(...la(n,e.issues)),t.value[n]=e.value}var hs=q(`$ZodArray`,(e,t)=>{jo.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>ms(t,n,e))):ms(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function gs(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...la(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function _s(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=$i(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vs(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>gs(e,n,i,t,u))):gs(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var ys=q(`$ZodObject`,(e,t)=>{if(jo.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=Pi(()=>_s(t));zi(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Gi,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>gs(n,t,e,s,r))):gs(i,t,e,s,r)}return i?vs(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),bs=q(`$ZodObjectJIT`,(e,t)=>{ys.init(e,t);let n=e._zod.parse,r=Pi(()=>_s(t)),i=e=>{let t=new ko([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Hi(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Hi(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
15
15
  if (${n}.issues.length) {
@@ -126,7 +126,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
126
126
 
127
127
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
128
128
 
129
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},D$=`DialogDescriptionWarning`,O$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${T$(D$).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},k$=t$,A$=s$,j$=l$,M$=p$,N$=`[cmdk-group=""]`,P$=`[cmdk-group-items=""]`,F$=`[cmdk-group-heading=""]`,I$=`[cmdk-item=""]`,L$=`${I$}:not([aria-disabled="true"])`,R$=`cmdk-item-select`,z$=`data-value`,B$=(e,t,n)=>XX(e,t,n),V$=b.createContext(void 0),H$=()=>b.useContext(V$),U$=b.createContext(void 0),W$=()=>b.useContext(U$),G$=b.createContext(void 0),K$=b.forwardRef((e,t)=>{let n=o1(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=o1(()=>new Set),i=o1(()=>new Map),a=o1(()=>new Map),o=o1(()=>new Set),s=i1(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=qJ(),y=qJ(),x=qJ(),S=b.useRef(null),C=l1();a1(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),a1(()=>{C(6,A)},[]);let w=b.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=b.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:x,labelId:y,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??B$;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(P$);t?t.appendChild(e.parentElement===t?e:e.closest(`${P$} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${P$} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${N$}[${z$}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(z$);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(N$)?.querySelector(F$))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${I$}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(L$)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(z$))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(z$))}function F(e){let t=j()?.closest(N$),n;for(;t&&!n;)t=e>0?n1(t,N$):r1(t,N$),n=t?.querySelector(L$);n?w.setState(`value`,n.getAttribute(z$)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(Rq.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(R$);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:f1},c),d1(e,e=>b.createElement(U$.Provider,{value:w},b.createElement(V$.Provider,{value:T},e))))}),q$=b.forwardRef((e,t)=>{let n=qJ(),r=b.useRef(null),i=b.useContext(G$),a=H$(),o=i1(e),s=o.current?.forceMount??i?.forceMount;a1(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=c1(n,r,[e.value,e.children,r],e.keywords),l=W$(),u=s1(e=>e.value&&e.value===c.current),d=s1(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(R$,f),()=>t.removeEventListener(R$,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return b.createElement(Rq.div,{ref:XK(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),J$=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=qJ(),s=b.useRef(null),c=b.useRef(null),l=qJ(),u=H$(),d=s1(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);a1(()=>u.group(o),[]),c1(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(Rq.div,{ref:XK(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),d1(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(G$.Provider,{value:f},e))))}),Y$=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=s1(e=>!e.search);return!n&&!a?null:b.createElement(Rq.div,{ref:XK(i,t),...r,"cmdk-separator":``,role:`separator`})}),X$=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=W$(),o=s1(e=>e.search),s=s1(e=>e.selectedItemId),c=H$();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(Rq.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Z$=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=s1(e=>e.selectedItemId),c=H$();return b.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),b.createElement(Rq.div,{ref:XK(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},d1(e,e=>b.createElement(`div`,{ref:XK(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Q$=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(k$,{open:n,onOpenChange:r},b.createElement(A$,{container:o},b.createElement(j$,{"cmdk-overlay":``,className:i}),b.createElement(M$,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(K$,{ref:t,...s}))))}),$$=b.forwardRef((e,t)=>s1(e=>e.filtered.count===0)?b.createElement(Rq.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),e1=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(Rq.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},d1(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),t1=Object.assign(K$,{List:Z$,Item:q$,Input:X$,Group:J$,Separator:Y$,Dialog:Q$,Empty:$$,Loading:e1});function n1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function r1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function i1(e){let t=b.useRef(e);return a1(()=>{t.current=e}),t}var a1=typeof window>`u`?b.useEffect:b.useLayoutEffect;function o1(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function s1(e){let t=W$(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function c1(e,t,n,r=[]){let i=b.useRef(),a=H$();return a1(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(z$,s),i.current=s}),i}var l1=()=>{let[e,t]=b.useState(),n=o1(()=>new Map);return a1(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function u1(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function d1({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(u1(t),{ref:t.ref},n(t.props.children)):n(t)}var f1={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},p1=BE(`inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function m1({className:e,variant:t,asChild:n=!1,...r}){return(0,G.jsx)(n?rq:`span`,{"data-slot":`badge`,className:lq(p1({variant:t}),e),...r})}var h1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(t1,{ref:n,"data-slot":`command`,className:lq(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),g1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,G.jsx)(KK,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,G.jsx)(t1.Input,{ref:n,className:lq(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));g1.displayName=t1.Input.displayName;function _1({className:e,...t}){return(0,G.jsx)(t1.List,{"data-slot":`command-list`,className:lq(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function v1({className:e,...t}){return(0,G.jsx)(t1.Group,{"data-slot":`command-group`,className:lq(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function y1({className:e,...t}){return(0,G.jsx)(t1.Item,{"data-slot":`command-item`,className:lq(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function b1({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:a=!1,ariaDescribedby:o,ariaPlaceholder:s,onFocus:c,onBlur:l,className:u,id:d}){let f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useMemo)(()=>t.filter(e=>n.some(t=>dS(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>dS(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!dS(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||!f.current||f.current.value!==``))if(e.key===`Delete`||e.key===`Backspace`){let e=_.slice(0,-1);r?.(e.map(e=>e.index))}else e.key===`Escape`&&f.current.blur()},[_,r,a]),S=(0,b.useCallback)(t=>{if(a)return;g(``);let n=e?[..._,t]:[t];r?.(n.map(e=>e.index))},[e,_,r,a]),C=(0,b.useCallback)(e=>{a||m(!0),c?.(e)},[a,c]);return(0,G.jsxs)(h1,{onKeyDown:x,className:lq(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,G.jsx)(`div`,{className:lq(`group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1`,a&&`opacity-50 cursor-not-allowed`),children:(0,G.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,G.jsxs)(m1,{variant:`secondary`,children:[e.label,(0,G.jsx)(`button`,{type:`button`,className:`rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1`,onKeyDown:t=>t.key===`Enter`&&!a&&y(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>y(e),disabled:a,children:(0,G.jsx)(JK,{className:lq(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,G.jsx)(t1.Input,{ref:f,value:h,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!a&&m(!0),placeholder:`Select ...`,className:`rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1`,disabled:a,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),p&&!a&&v.length>0&&(0,G.jsx)(`div`,{className:`relative mt-2`,children:(0,G.jsx)(`div`,{className:`absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in`,children:(0,G.jsx)(v1,{className:`h-full overflow-auto`,children:(0,G.jsx)(_1,{children:v.map(e=>(0,G.jsx)(y1,{disabled:e.disabled,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},"aria-controls":`${e.value}-command-item`,"aria-labelledby":`${e.value}-command-item`,id:`${e.value}-command-item`,onSelect:()=>S(e),className:`cursor-pointer`,children:e.label},`${e.value}-command-item`))})})})})]})}function x1({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:a=!1,placeholder:o=`Select...`,ariaDescribedby:s,ariaPlaceholder:c,onFocus:l,onBlur:u,className:d}){let[f,p]=(0,b.useState)(!1),m=e?.find(e=>e.value===t),h=(0,b.useRef)(null),g=(0,b.useRef)(null);(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]);let _=e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)};return(0,G.jsxs)(h1,{ref:g,className:lq(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:_,onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,G.jsxs)(`div`,{onClick:()=>!i&&p(!f),className:lq(`flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,!m&&a&&`border-red-500`,i&&`opacity-50 cursor-not-allowed`,d),children:[(0,G.jsx)(`span`,{className:lq(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,G.jsx)(BK,{className:`h-4 w-4 opacity-50`})]}),(0,G.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,G.jsx)(`div`,{style:{top:`0.5rem`},className:`absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none`,children:(0,G.jsx)(v1,{className:`h-full overflow-auto`,children:(0,G.jsx)(_1,{children:e.map(e=>(0,G.jsxs)(y1,{ref:e.value===t?h:void 0,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:lq(`cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse`,e.value===t&&`font-semibold`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[(0,G.jsx)(`span`,{children:e.label}),(0,G.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,G.jsx)(zK,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function S1({id:e,options:t,required:n,disabled:r,readonly:i,value:a,multiple:o,autofocus:s,onChange:c,onBlur:l,onFocus:u,defaultValue:d,placeholder:f,rawErrors:p=[],className:m}){let{enumOptions:h,enumDisabled:g,emptyValue:_}=t,v=()=>{u(e,VB(a,h,_))},y=()=>{l(e,VB(a,h,_))},b=h?.map(({value:e,label:t},n)=>({value:o?e:n.toString(),label:t,index:n,disabled:Array.isArray(g)&&g.includes(e)})),x=lq({"border-destructive":p.length>0},m);return(0,G.jsx)(`div`,{className:`p-0.5`,children:o?(0,G.jsx)(b1,{id:e,autoFocus:s,disabled:r||i,multiple:!0,className:x,items:b,selected:a,onValueChange:e=>{c(VB(e,h,_))},onFocus:v,onBlur:y}):(0,G.jsx)(x1,{items:b,selected:WB(a??d,h,!1),onValueChange:e=>{c(VB(e,h,_))},autoFocus:s,disabled:r||i,required:n,placeholder:f,className:x,onFocus:v,onBlur:y,ariaDescribedby:_V(e)})})}function C1({className:e,...t}){return(0,G.jsx)(`textarea`,{"data-slot":`textarea`,className:lq(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...t})}function w1({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:a,autofocus:o,readonly:s,onBlur:c,onFocus:l,onChange:u,options:d,className:f}){return(0,G.jsx)(`div`,{className:`flex p-0.5`,children:(0,G.jsx)(C1,{id:e,name:t||e,placeholder:n,disabled:a,readOnly:s,value:r??``,required:i,autoFocus:o,rows:d.rows||5,onChange:({target:{value:e}})=>u(e===``?d.emptyValue:e),onBlur:({target:t})=>c(e,t&&t.value),onFocus:({target:t})=>l(e,t&&t.value),"aria-describedby":_V(e),className:f})})}function T1(){return{CheckboxWidget:HJ,CheckboxesWidget:UJ,RadioWidget:KY,RangeWidget:FX,SelectWidget:S1,TextareaWidget:w1}}function E1(){return{templates:Jq(),widgets:T1()}}E1();function D1(){return vK(E1())}var O1=D1();function k1({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i?e:a,b.useCallback(e=>{i||o(e)},[])]}var A1=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function j1(){return b.useContext(A1)}function M1(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=zT(i),o=b.useRef(0),s=IT(P1).current,c=IT(N1).current,[l,u]=b.useState(0),d=b.useRef(l),f=zT((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=zT(e=>{c.delete(e),d.current+=1,u(d.current)}),m=b.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(F1).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);$(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),$(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),$(()=>()=>{n.current=[]},[n]),$(()=>()=>{r&&(r.current=[])},[r]);let h=zT(e=>(s.add(e),()=>{s.delete(e)}));$(()=>{s.forEach(e=>e(m))},[s,m]);let g=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(A1.Provider,{value:g,children:t})}function N1(){return new Map}function P1(){return new Set}function F1(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var I1=b.createContext(void 0);function L1(){return b.useContext(I1)?.direction??`ltr`}var R1=b.createContext(void 0);function z1(){let e=b.useContext(R1);if(e===void 0)throw Error(rE(64));return e}var B1=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),V1={tabActivationDirection:e=>({[B1.activationDirection]:e})},H1=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,...c}=e,l=L1(),u=Object.hasOwn(e,`defaultValue`),d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=k1({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),[y,x]=b.useState(`none`),S=zT((e,t)=>{i?.(e,t),!t.isCanceled&&(h(e),x(t.activationDirection))}),C=zT((e,t)=>{p(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),w=zT((e,t)=>{p(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),T=b.useCallback(e=>f.get(e),[f]),E=b.useCallback(e=>{for(let t of _.values())if(e===t?.value)return t?.id},[_]),D=b.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of _.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[_]),O=b.useMemo(()=>({direction:l,getTabElementBySelectedValue:D,getTabIdByPanelValue:E,getTabPanelIdByValue:T,onValueChange:S,orientation:a,registerMountedTabPanel:C,setTabMap:v,unregisterMountedTabPanel:w,tabActivationDirection:y,value:m}),[l,D,E,T,S,a,C,v,w,y,m]),k=b.useMemo(()=>{for(let e of _.values())if(e!=null&&e.value===m)return e},[_,m]),A=b.useMemo(()=>{for(let e of _.values())if(e!=null&&!e.disabled)return e.value},[_]);$(()=>{if(g||_.size===0)return;let e=k?.disabled;if(u&&e&&m===r||!e&&!(k==null&&m!==null))return;let t=A??null;m!==t&&(h(t),x(`none`))},[r,A,u,g,k,x,h,_,m]);let j=AE(`div`,e,{state:{orientation:a,tabActivationDirection:y},ref:t,props:c,stateAttributesMapping:V1});return(0,G.jsx)(R1.Provider,{value:O,children:(0,G.jsx)(M1,{elementsRef:d,children:j})})});function U1(e){return e?.ownerDocument||document}var W1=0;function G1(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(W1+=1,r(`${t}-${W1}`))},[n,t]),i}var K1=HT.useId;function q1(e,t){if(K1!==void 0){let n=K1();return e??(t?`${t}-${n}`:n)}return G1(e,t)}function J1(e){return q1(e,`base-ui`)}var Y1=`data-composite-item-active`,X1=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Z1(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=j1(),f=b.useRef(-1),[p,m]=b.useState(a??(i===X1.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return $(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),$(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}function Q1(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=aE(),{ref:i,index:a}=Z1(e),o=n===a,s=b.useRef(null),c=uE(i,s);return{compositeProps:b.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var $1=b.createContext(void 0);function e0(){let e=b.useContext($1);if(e===void 0)throw Error(rE(65));return e}var t0=`none`,n0=`trigger-press`,r0=`trigger-hover`,i0=`outside-press`,a0=`item-press`,o0=`close-press`,s0=`focus-out`,c0=`escape-key`,l0=`list-navigation`,u0=`cancel-open`,d0=`imperative-action`,f0=`window-resize`;function p0(e,t,n,r){let i=!1,a=!1,o=r??wE;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var m0=typeof navigator<`u`,h0=C0(),g0=T0(),_0=w0(),v0=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),y0=h0.platform===`MacIntel`&&h0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(h0.platform);m0&&/firefox/i.test(_0);var b0=m0&&/apple/i.test(navigator.vendor);m0&&/Edg/i.test(_0);var x0=m0&&/android/i.test(g0)||/android/i.test(_0);m0&&g0.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var S0=_0.includes(`jsdom/`);function C0(){if(!m0)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function w0(){if(!m0)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function T0(){if(!m0)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var E0=`data-base-ui-focusable`,D0=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,O0=`ArrowLeft`,k0=`ArrowRight`,A0=`ArrowUp`,j0=`ArrowDown`;function M0(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function N0(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&_T(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function P0(e,t){if(!hT(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(N0(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function F0(e){return`composedPath`in e?e.composedPath()[0]:e.target}function I0(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function L0(e){return e.matches(`html,body`)}function R0(e){return gT(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function z0(e){return e?e.getAttribute(`role`)===`combobox`&&R0(e):!1}function B0(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function V0(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...V0(e,t.id,n)])}function H0(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function U0(e){e.preventDefault(),e.stopPropagation()}function W0(e){return`nativeEvent`in e}function G0(e){return e.pointerType===``&&e.isTrusted?!0:x0&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function K0(e){return S0?!1:!x0&&e.width===0&&e.height===0||x0&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function q0(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function J0(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Y0=[`top`,`right`,`bottom`,`left`],X0=Math.min,Z0=Math.max,Q0=Math.round,$0=Math.floor,e2=e=>({x:e,y:e}),t2={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function n2(e,t,n){return Z0(e,X0(t,n))}function r2(e,t){return typeof e==`function`?e(t):e}function i2(e){return e.split(`-`)[0]}function a2(e){return e.split(`-`)[1]}function o2(e){return e===`x`?`y`:`x`}function s2(e){return e===`y`?`height`:`width`}function c2(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function l2(e){return o2(c2(e))}function u2(e,t,n){n===void 0&&(n=!1);let r=a2(e),i=l2(e),a=s2(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=y2(o)),[o,y2(o)]}function d2(e){let t=y2(e);return[f2(e),t,f2(t)]}function f2(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var p2=[`left`,`right`],m2=[`right`,`left`],h2=[`top`,`bottom`],g2=[`bottom`,`top`];function _2(e,t,n){switch(e){case`top`:case`bottom`:return n?t?m2:p2:t?p2:m2;case`left`:case`right`:return t?h2:g2;default:return[]}}function v2(e,t,n,r){let i=a2(e),a=_2(i2(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(f2)))),a}function y2(e){let t=i2(e);return t2[t]+e.slice(t.length)}function b2(e){return{top:0,right:0,bottom:0,left:0,...e}}function x2(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:b2(e)}function S2(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 C2(e,t,n){return Math.floor(e/t)!==n}function w2(e,t){return t<0||t>=e.current.length}function T2(e,t){return D2(e,{disabledIndices:t})}function E2(e,t){return D2(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function D2(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&M2(e,a,r));return a}function O2(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!M2(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=$0(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!M2(e,r,o))return r}};u&&U0(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=D2(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=D2(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}w2(e,d)&&(d=l)}if(n===`both`){let n=$0(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&U0(t),l%a===a-1?r&&(d=D2(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=D2(e,{startingIndex:l,disabledIndices:o}),r&&C2(d,a,n)&&(d=D2(e,{startingIndex:l-l%a-1,disabledIndices:o}))),C2(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&U0(t),l%a===0?r&&(d=D2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=D2(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&C2(d,a,n)&&(d=D2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),C2(d,a,n)&&(d=l));let s=$0(c/a)===n;w2(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:D2(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function k2(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function A2(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function j2(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function M2(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?N2(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function N2(e){return kT(e).display!==`none`}var P2=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),F2=typeof Element>`u`,I2=F2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,L2=!F2&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},R2=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):R2(e.parentNode))},z2=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},B2=function(e,t,n){if(R2(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(P2));return t&&I2.call(e,P2)&&r.unshift(e),r=r.filter(n),r},V2=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!R2(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=V2(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{I2.call(a,P2)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!R2(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=V2(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},H2=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},U2=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||z2(e))&&!H2(e)?0:e.tabIndex},W2=function(e,t){var n=U2(e);return n<0&&t&&!H2(e)?0:n},G2=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},K2=function(e){return e.tagName===`INPUT`},q2=function(e){return K2(e)&&e.type===`hidden`},J2=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Y2=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},X2=function(e){if(!e.name)return!0;var t=e.form||L2(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Y2(r,e.form);return!i||i===e},Z2=function(e){return K2(e)&&e.type===`radio`},Q2=function(e){return Z2(e)&&!X2(e)},$2=function(e){var t=e&&L2(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=L2(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},e4=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},t4=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=I2.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(I2.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=L2(e);if(o&&!o.shadowRoot&&r(o)===!0)return e4(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if($2(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return e4(e);return!1},n4=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return I2.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},r4=function(e,t){return!(t.disabled||q2(t)||t4(t,e)||J2(t)||n4(t))},i4=function(e,t){return!(Q2(t)||U2(t)<0||!r4(e,t))},a4=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},o4=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=W2(a,i),s=i?o4(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(G2).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},s4=function(e,t){return t||={},o4(t.getShadowRoot?V2([e],t.includeContainer,{filter:i4.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:a4}):B2(e,t.includeContainer,i4.bind(null,t)))},c4=function(e,t){return t||={},t.getShadowRoot?V2([e],t.includeContainer,{filter:r4.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):B2(e,t.includeContainer,r4.bind(null,t))},l4=function(e,t){if(t||={},!e)throw Error(`No node provided`);return I2.call(e,P2)===!1?!1:i4(t,e)},u4=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function d4(e,t){let n=s4(e,u4()),r=n.length;if(r===0)return;let i=M0(U1(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function f4(e){return d4(U1(e).body,1)||e}function p4(e){return d4(U1(e).body,-1)||e}function m4(e,t){if(!e)return null;let n=s4(U1(e).body,u4()),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function h4(e){return m4(e,1)}function g4(e){return m4(e,-1)}function _4(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!N0(n,r)}function v4(e){s4(e,u4()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function y4(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var b4=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:d}=z1(),{activateOnFocus:f,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:h,setHighlightedTabIndex:g,tabsListElement:_}=e0(),v=J1(o),{compositeProps:y,compositeRef:x,index:S}=Q1({metadata:b.useMemo(()=>({disabled:r,id:v,value:a}),[r,v,a])}),C=a===l,w=b.useRef(!1),T=b.useRef(null);b.useEffect(()=>{let e=T.current;if(e)return h(e)},[h]),$(()=>{if(w.current){w.current=!1;return}if(!(C&&S>-1&&p!==S))return;let e=_;if(e!=null){let t=M0(U1(e));if(t&&N0(e,t))return}r||g(S)},[C,S,p,g,r,_]);let{getButtonProps:E,buttonRef:D}=sE({disabled:r,native:s,focusableWhenDisabled:!0}),O=u(a),k=b.useRef(!1),A=b.useRef(!1);function j(e){C||r||m(a,p0(t0,e.nativeEvent,void 0,{activationDirection:`none`}))}function M(e){C||(S>-1&&!r&&g(S),!r&&f&&(!k.current||k.current&&A.current)&&m(a,p0(t0,e.nativeEvent,void 0,{activationDirection:`none`})))}function N(e){if(C||r)return;k.current=!0;function t(){k.current=!1,A.current=!1}(!e.button||e.button===0)&&(A.current=!0,U1(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return AE(`button`,e,{state:{disabled:r,active:C,orientation:d},ref:[t,D,x,T],props:[y,{role:`tab`,"aria-controls":O,"aria-selected":C,id:v,onClick:j,onFocus:M,onPointerDown:N,[Y1]:C?``:void 0,onKeyDownCapture(){w.current=!0}},c,E]})}),x4=[];function S4(e){b.useEffect(e,x4)}var C4=b.createContext(void 0),w4={disableStyleElements:!1};function T4(){return b.useContext(C4)??w4}function E4(e){return _E(19)?e:e?`true`:void 0}var D4=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),O4={[D4.startingStyle]:``},k4={[D4.endingStyle]:``},A4={transitionStatus(e){return e===`starting`?O4:e===`ending`?k4:null}},j4=null;globalThis.requestAnimationFrame;var M4=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},N4=class e{static create(){return new e}static request(e){return M4.request(e)}static cancel(e){return M4.cancel(e)}currentId=j4;request(e){this.cancel(),this.currentId=M4.request(()=>{this.currentId=j4,e()})}cancel=()=>{this.currentId!==j4&&(M4.cancel(this.currentId),this.currentId=j4)};disposeEffect=()=>this.cancel};function P4(){let e=IT(N4.create).current;return S4(e.disposeEffect),e}function F4(e){return e==null?e:`current`in e?e.current:e}function I4(e,t=!1,n=!0){let r=P4();return zT((i,a=null)=>{r.cancel();function o(){Lq.flushSync(i)}let s=F4(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=D4.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function L4(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=zT(i),o=I4(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function R4(e,t=!1,n=!1){let[r,i]=b.useState(e&&t?`idle`:void 0),[a,o]=b.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),$(()=>{if(!e&&a&&r!==`ending`&&n){let e=N4.request(()=>{i(`ending`)});return()=>{N4.cancel(e)}}},[e,a,r,n]),$(()=>{if(!e||t)return;let n=N4.request(()=>{i(void 0)});return()=>{N4.cancel(n)}},[t,e]),$(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=N4.request(()=>{i(`idle`)});return()=>{N4.cancel(n)}},[t,e,a,i,r]),b.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var z4=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=D4.startingStyle]=`startingStyle`,e[e.endingStyle=D4.endingStyle]=`endingStyle`,e}({}),B4={...V1,...A4},V4=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:d,unregisterMountedTabPanel:f}=z1(),p=J1(),{ref:m,index:h}=Z1({metadata:b.useMemo(()=>({id:p,value:r}),[p,r])}),g=r===s,{mounted:_,transitionStatus:v,setMounted:y}=R4(g),x=!_,S=c(r),C={hidden:x,orientation:l,tabActivationDirection:u,transitionStatus:v},w=b.useRef(null),T=AE(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:E4(!g),[z4.index]:h},o],stateAttributesMapping:B4});return L4({open:g,ref:w,onComplete(){g||y(!1)}}),$(()=>{if(!(x&&!a)&&p!=null)return d(r,p),()=>{f(r,p)}},[x,a,r,p,d,f]),a||_?T:null});function H4(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var U4=`ArrowUp`,W4=`ArrowDown`,G4=`ArrowLeft`,K4=`ArrowRight`,q4=`Home`,J4=new Set([G4,K4]),Y4=new Set([G4,K4,q4,`End`]),X4=new Set([U4,W4]),Z4=new Set([U4,W4,q4,`End`]),Q4=new Set([...J4,...X4]),$4=new Set([...Q4,q4,`End`]),e3=new Set([U4,W4,G4,K4,q4,`End`]),t3=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function n3(e){return gT(e)&&e.tagName===`INPUT`}function r3(e){return!!(n3(e)&&e.selectionStart!=null||gT(e)&&e.tagName===`TEXTAREA`)}function i3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=a3(e,t,`left`),a=o3(e),o=o3(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=a3(e,t,`top`),r=o3(e),i=o3(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function a3(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function o3(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var s3=[];function c3(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:p=s3}=e,[m,h]=b.useState(0),g=n>1,_=b.useRef(null),v=uE(_,l),y=b.useRef([]),x=b.useRef(!1),S=s??m,C=zT((e,t=!1)=>{if((c??h)(e),t){let t=y.current[e];i3(_.current,t,o,a)}}),w=zT(e=>{if(e.size===0||x.current)return;x.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&C(r),i3(_.current,n,o,a)}),T=b.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:v,onFocus(e){!_.current||!r3(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?$4:Q4;if(!s.has(e.key)||l3(e,p)||!_.current)return;let c=o===`rtl`,l=c?G4:K4,m={horizontal:l,vertical:W4,both:l}[a],h=c?K4:G4,v={horizontal:h,vertical:U4,both:h}[a];if(r3(e.target)&&!H4(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==m&&t>0)return}let b=S,x=T2(y,f),w=E2(y,f);if(g){let o=t||Array.from({length:y.current.length},()=>({width:1,height:1})),s=k2(o,n,i),l=s.findIndex(e=>e!=null&&!M2(y,e,f)),u=s.reduce((e,t,n)=>t!=null&&!M2(y,t,f)?n:e,-1);b=s[O2({current:s.map(e=>e?y.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:j2([...f||y.current.map((e,t)=>M2(y,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:A2(S>w?x:S,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[W4],both:[l,W4]}[a],E={horizontal:[h],vertical:[U4],both:[h,U4]}[a],D=g?s:{horizontal:u?Y4:J4,vertical:u?Z4:X4,both:s}[a];u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(T.includes(e.key)||E.includes(e.key))&&(b=r&&b===w&&T.includes(e.key)?x:r&&b===x&&E.includes(e.key)?w:D2(y,{startingIndex:b,decrement:E.includes(e.key),disabledIndices:f})),b!==S&&!w2(y,b)&&(d&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))}}),[n,i,o,f,y,u,S,g,t,r,v,p,C,a,d]);return b.useMemo(()=>({props:T,highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,disabledIndices:f,onMapChange:w,relayKeyboardEvent:T.onKeyDown}),[T,S,C,y,f,w])}function l3(e,t){for(let n of t3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function u3(e){let{render:t,className:n,refs:r=CE,props:i=CE,state:a=wE,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:d,loopFocus:f,cols:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=c3({itemSizes:d,cols:p,loopFocus:f,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:L1(),disabledIndices:v,modifierKeys:y}),A=AE(S,e,{state:a,ref:r,props:[w,...i,C],stateAttributesMapping:o}),j=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,G.jsx)(iE.Provider,{value:j,children:(0,G.jsx)(M1,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var d3=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=z1(),[p,m]=b.useState(0),[h,g]=b.useState(null),_=b.useRef(new Set),v=b.useRef(new Set),y=b.useRef(null),x=zT(()=>{_.current.forEach(e=>{e()})});b.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.size&&x()});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h,x]);let S=zT(e=>(_.current.add(e),()=>{_.current.delete(e)})),C=zT(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),w=p3(u,l,h,s),T=zT((e,t)=>{e!==u&&(t.activationDirection=w(e),c(e,t))}),E={orientation:l,tabActivationDirection:f},D={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},O=b.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:C,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,S,C,T,m,h]);return(0,G.jsx)($1.Provider,{value:O,children:(0,G.jsx)(u3,{render:a,className:r,state:E,refs:[t,g],props:[D,o],stateAttributesMapping:V1,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:CE})})});function f3(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function p3(e,t,n,r){let[i,a]=b.useState(null);return $(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=f3(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),b.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=f3(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}function m3({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(H1,{"data-slot":`tabs`,"data-orientation":t,className:cO(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,e),...n})}var h3=BE(`rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function g3({className:e,variant:t=`default`,...n}){return(0,G.jsx)(d3,{"data-slot":`tabs-list`,"data-variant":t,className:cO(h3({variant:t}),e),...n})}function _3({className:e,...t}){return(0,G.jsx)(b4,{"data-slot":`tabs-trigger`,className:cO(`gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground`,`after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function v3({className:e,...t}){return(0,G.jsx)(V4,{"data-slot":`tabs-content`,className:cO(`text-xs/relaxed flex-1 outline-none`,e),...t})}function y3({className:e,size:t=`default`,...n}){return(0,G.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:cO(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col`,e),...n})}function b3({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`card-content`,className:cO(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}var x3=function(e){return typeof e==`function`},S3=function(e){return typeof e==`string`},C3=function(e){return typeof e==`number`};function w3(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function T3(e){var t=(0,b.useRef)(e);return t.current=e,t}var E3=function(e){var t=T3(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},D3=!!(typeof window<`u`&&window.document&&window.document.createElement);function O3(e,t){if(D3)return e?x3(e)?e():`current`in e?e.current:e:t}var k3=function(e){return function(t,n,r){var i=(0,b.useRef)(!1),a=(0,b.useRef)([]),o=(0,b.useRef)([]),s=(0,b.useRef)(void 0);e(function(){var e,c=(Array.isArray(r)?r:[r]).map(function(e){return O3(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!w3(a.current,c)||!w3(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),E3(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),A3=u(s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}))()),j3=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,A3.default)(e,t)},M3=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);j3(t,r.current)||(i.current+=1),r.current=t,k3(e,[i.current],n)},N3=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``),P3={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,control:17,alt:18,pausebreak:19,pause:19,capslock:20,esc:27,escape:27,space:32,spacebar:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,arrowleft:37,uparrow:38,arrowup:38,rightarrow:39,arrowright:39,downarrow:40,arrowdown:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:N3?[91,93]:[91,92],selectkey:93,contextmenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},F3={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type===`keyup`?P3.meta.includes(e.keyCode):e.metaKey}};function I3(e){return S3(e)||C3(e)}function L3(e){var t=Object.keys(F3).reduce(function(t,n){return F3[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function R3(e,t,n){var r,i;if(!e.key)return!1;if(C3(t))return e.keyCode===t?t:!1;var a=t.split(`.`),o=0;try{for(var s=PZ(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=F3[l],d=P3[l.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n?o===a.length&&L3(e)===a.length?t:!1:o===a.length?t:!1}function z3(e,t){return x3(e)?e:I3(e)?function(n){return R3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return R3(n,e,t)})}:function(){return!!e}}var B3=[`keydown`];function V3(e,t,n){var r=n||{},i=r.events,a=i===void 0?B3:i,o=r.target,s=r.exactMatch,c=s===void 0?!1:s,l=r.useCapture,u=l===void 0?!1:l,d=T3(t),f=T3(e);M3(function(){var e,t,n,r=O3(o,window);if(r){var i=function(e){var t=e,n=z3(f.current,c)(t),r=I3(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=PZ(a),l=s.next();!l.done;l=s.next()){var p=l.value;(n=r?.addEventListener)==null||n.call(r,p,i,u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=PZ(a),s=o.next();!s.done;s=o.next()){var c=s.value;(n=r?.removeEventListener)==null||n.call(r,c,i,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[a],o)}var H3=({validateForm:e,formData:t})=>{let n=cT(),{mutateAsync:r,isPending:i}=oT(),a=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return V3(`Enter`,a),(0,G.jsx)(`div`,{className:`flex flex-col items-end gap-1`,children:(0,G.jsxs)(lO,{onClick:a,variant:`default`,disabled:i,children:[i?(0,G.jsx)(cn,{className:`h-4 w-4 animate-spin`}):(0,G.jsx)(dn,{className:`h-4 w-4`}),`Call Tool`]})})},U3=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(p()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(p()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],`channels`,{value:t}),Object.defineProperty(a[e],`labels`,{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],`channels`,{value:r[e].channels}),Object.defineProperty(a[e],`labels`,{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0)this.model=t||`rgb`,l=i[this.model].channels,this.color=f(Array.prototype.slice.call(e,0,l),l),this.valpha=typeof e[l]==`number`?e[l]:1;else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var i={};return(()=>{function e(t){return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>kr});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
129
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},D$=`DialogDescriptionWarning`,O$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${T$(D$).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},k$=t$,A$=s$,j$=l$,M$=p$,N$=`[cmdk-group=""]`,P$=`[cmdk-group-items=""]`,F$=`[cmdk-group-heading=""]`,I$=`[cmdk-item=""]`,L$=`${I$}:not([aria-disabled="true"])`,R$=`cmdk-item-select`,z$=`data-value`,B$=(e,t,n)=>XX(e,t,n),V$=b.createContext(void 0),H$=()=>b.useContext(V$),U$=b.createContext(void 0),W$=()=>b.useContext(U$),G$=b.createContext(void 0),K$=b.forwardRef((e,t)=>{let n=o1(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=o1(()=>new Set),i=o1(()=>new Map),a=o1(()=>new Map),o=o1(()=>new Set),s=i1(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=qJ(),y=qJ(),x=qJ(),S=b.useRef(null),C=l1();a1(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),a1(()=>{C(6,A)},[]);let w=b.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=b.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:x,labelId:y,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??B$;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(P$);t?t.appendChild(e.parentElement===t?e:e.closest(`${P$} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${P$} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${N$}[${z$}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(z$);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(N$)?.querySelector(F$))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${I$}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(L$)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(z$))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(z$))}function F(e){let t=j()?.closest(N$),n;for(;t&&!n;)t=e>0?n1(t,N$):r1(t,N$),n=t?.querySelector(L$);n?w.setState(`value`,n.getAttribute(z$)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(Rq.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(R$);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:f1},c),d1(e,e=>b.createElement(U$.Provider,{value:w},b.createElement(V$.Provider,{value:T},e))))}),q$=b.forwardRef((e,t)=>{let n=qJ(),r=b.useRef(null),i=b.useContext(G$),a=H$(),o=i1(e),s=o.current?.forceMount??i?.forceMount;a1(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=c1(n,r,[e.value,e.children,r],e.keywords),l=W$(),u=s1(e=>e.value&&e.value===c.current),d=s1(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(R$,f),()=>t.removeEventListener(R$,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return b.createElement(Rq.div,{ref:XK(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),J$=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=qJ(),s=b.useRef(null),c=b.useRef(null),l=qJ(),u=H$(),d=s1(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);a1(()=>u.group(o),[]),c1(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(Rq.div,{ref:XK(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),d1(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(G$.Provider,{value:f},e))))}),Y$=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=s1(e=>!e.search);return!n&&!a?null:b.createElement(Rq.div,{ref:XK(i,t),...r,"cmdk-separator":``,role:`separator`})}),X$=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=W$(),o=s1(e=>e.search),s=s1(e=>e.selectedItemId),c=H$();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(Rq.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Z$=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=s1(e=>e.selectedItemId),c=H$();return b.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),b.createElement(Rq.div,{ref:XK(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},d1(e,e=>b.createElement(`div`,{ref:XK(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Q$=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(k$,{open:n,onOpenChange:r},b.createElement(A$,{container:o},b.createElement(j$,{"cmdk-overlay":``,className:i}),b.createElement(M$,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(K$,{ref:t,...s}))))}),$$=b.forwardRef((e,t)=>s1(e=>e.filtered.count===0)?b.createElement(Rq.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),e1=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(Rq.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},d1(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),t1=Object.assign(K$,{List:Z$,Item:q$,Input:X$,Group:J$,Separator:Y$,Dialog:Q$,Empty:$$,Loading:e1});function n1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function r1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function i1(e){let t=b.useRef(e);return a1(()=>{t.current=e}),t}var a1=typeof window>`u`?b.useEffect:b.useLayoutEffect;function o1(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function s1(e){let t=W$(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function c1(e,t,n,r=[]){let i=b.useRef(),a=H$();return a1(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(z$,s),i.current=s}),i}var l1=()=>{let[e,t]=b.useState(),n=o1(()=>new Map);return a1(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function u1(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function d1({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(u1(t),{ref:t.ref},n(t.props.children)):n(t)}var f1={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},p1=BE(`inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function m1({className:e,variant:t,asChild:n=!1,...r}){return(0,G.jsx)(n?rq:`span`,{"data-slot":`badge`,className:lq(p1({variant:t}),e),...r})}var h1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsx)(t1,{ref:n,"data-slot":`command`,className:lq(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),g1=(0,b.forwardRef)(({className:e,...t},n)=>(0,G.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,G.jsx)(KK,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,G.jsx)(t1.Input,{ref:n,className:lq(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));g1.displayName=t1.Input.displayName;function _1({className:e,...t}){return(0,G.jsx)(t1.List,{"data-slot":`command-list`,className:lq(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function v1({className:e,...t}){return(0,G.jsx)(t1.Group,{"data-slot":`command-group`,className:lq(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function y1({className:e,...t}){return(0,G.jsx)(t1.Item,{"data-slot":`command-item`,className:lq(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function b1({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:a=!1,ariaDescribedby:o,ariaPlaceholder:s,onFocus:c,onBlur:l,className:u,id:d}){let f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useMemo)(()=>t.filter(e=>n.some(t=>dS(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>dS(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!dS(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||!f.current||f.current.value!==``))if(e.key===`Delete`||e.key===`Backspace`){let e=_.slice(0,-1);r?.(e.map(e=>e.index))}else e.key===`Escape`&&f.current.blur()},[_,r,a]),S=(0,b.useCallback)(t=>{if(a)return;g(``);let n=e?[..._,t]:[t];r?.(n.map(e=>e.index))},[e,_,r,a]),C=(0,b.useCallback)(e=>{a||m(!0),c?.(e)},[a,c]);return(0,G.jsxs)(h1,{onKeyDown:x,className:lq(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,G.jsx)(`div`,{className:lq(`group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1`,a&&`opacity-50 cursor-not-allowed`),children:(0,G.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,G.jsxs)(m1,{variant:`secondary`,children:[e.label,(0,G.jsx)(`button`,{type:`button`,className:`rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1`,onKeyDown:t=>t.key===`Enter`&&!a&&y(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>y(e),disabled:a,children:(0,G.jsx)(JK,{className:lq(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,G.jsx)(t1.Input,{ref:f,value:h,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!a&&m(!0),placeholder:`Select ...`,className:`rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1`,disabled:a,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),p&&!a&&v.length>0&&(0,G.jsx)(`div`,{className:`relative mt-2`,children:(0,G.jsx)(`div`,{className:`absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in`,children:(0,G.jsx)(v1,{className:`h-full overflow-auto`,children:(0,G.jsx)(_1,{children:v.map(e=>(0,G.jsx)(y1,{disabled:e.disabled,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},"aria-controls":`${e.value}-command-item`,"aria-labelledby":`${e.value}-command-item`,id:`${e.value}-command-item`,onSelect:()=>S(e),className:`cursor-pointer`,children:e.label},`${e.value}-command-item`))})})})})]})}function x1({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:a=!1,placeholder:o=`Select...`,ariaDescribedby:s,ariaPlaceholder:c,onFocus:l,onBlur:u,className:d}){let[f,p]=(0,b.useState)(!1),m=e?.find(e=>e.value===t),h=(0,b.useRef)(null),g=(0,b.useRef)(null);(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]);let _=e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)};return(0,G.jsxs)(h1,{ref:g,className:lq(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:_,onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,G.jsxs)(`div`,{onClick:()=>!i&&p(!f),className:lq(`flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,!m&&a&&`border-red-500`,i&&`opacity-50 cursor-not-allowed`,d),children:[(0,G.jsx)(`span`,{className:lq(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,G.jsx)(BK,{className:`h-4 w-4 opacity-50`})]}),(0,G.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,G.jsx)(`div`,{style:{top:`0.5rem`},className:`absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none`,children:(0,G.jsx)(v1,{className:`h-full overflow-auto`,children:(0,G.jsx)(_1,{children:e.map(e=>(0,G.jsxs)(y1,{ref:e.value===t?h:void 0,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:lq(`cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse`,e.value===t&&`font-semibold`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[(0,G.jsx)(`span`,{children:e.label}),(0,G.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,G.jsx)(zK,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function S1({id:e,options:t,required:n,disabled:r,readonly:i,value:a,multiple:o,autofocus:s,onChange:c,onBlur:l,onFocus:u,defaultValue:d,placeholder:f,rawErrors:p=[],className:m}){let{enumOptions:h,enumDisabled:g,emptyValue:_}=t,v=()=>{u(e,VB(a,h,_))},y=()=>{l(e,VB(a,h,_))},b=h?.map(({value:e,label:t},n)=>({value:o?e:n.toString(),label:t,index:n,disabled:Array.isArray(g)&&g.includes(e)})),x=lq({"border-destructive":p.length>0},m);return(0,G.jsx)(`div`,{className:`p-0.5`,children:o?(0,G.jsx)(b1,{id:e,autoFocus:s,disabled:r||i,multiple:!0,className:x,items:b,selected:a,onValueChange:e=>{c(VB(e,h,_))},onFocus:v,onBlur:y}):(0,G.jsx)(x1,{items:b,selected:WB(a??d,h,!1),onValueChange:e=>{c(VB(e,h,_))},autoFocus:s,disabled:r||i,required:n,placeholder:f,className:x,onFocus:v,onBlur:y,ariaDescribedby:_V(e)})})}function C1({className:e,...t}){return(0,G.jsx)(`textarea`,{"data-slot":`textarea`,className:lq(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...t})}function w1({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:a,autofocus:o,readonly:s,onBlur:c,onFocus:l,onChange:u,options:d,className:f}){return(0,G.jsx)(`div`,{className:`flex p-0.5`,children:(0,G.jsx)(C1,{id:e,name:t||e,placeholder:n,disabled:a,readOnly:s,value:r??``,required:i,autoFocus:o,rows:d.rows||5,onChange:({target:{value:e}})=>u(e===``?d.emptyValue:e),onBlur:({target:t})=>c(e,t&&t.value),onFocus:({target:t})=>l(e,t&&t.value),"aria-describedby":_V(e),className:f})})}function T1(){return{CheckboxWidget:HJ,CheckboxesWidget:UJ,RadioWidget:KY,RangeWidget:FX,SelectWidget:S1,TextareaWidget:w1}}function E1(){return{templates:Jq(),widgets:T1()}}E1();function D1(){return vK(E1())}var O1=D1();function k1({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i?e:a,b.useCallback(e=>{i||o(e)},[])]}var A1=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function j1(){return b.useContext(A1)}function M1(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=zT(i),o=b.useRef(0),s=IT(P1).current,c=IT(N1).current,[l,u]=b.useState(0),d=b.useRef(l),f=zT((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=zT(e=>{c.delete(e),d.current+=1,u(d.current)}),m=b.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(F1).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);$(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),$(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),$(()=>()=>{n.current=[]},[n]),$(()=>()=>{r&&(r.current=[])},[r]);let h=zT(e=>(s.add(e),()=>{s.delete(e)}));$(()=>{s.forEach(e=>e(m))},[s,m]);let g=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(A1.Provider,{value:g,children:t})}function N1(){return new Map}function P1(){return new Set}function F1(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var I1=b.createContext(void 0);function L1(){return b.useContext(I1)?.direction??`ltr`}var R1=b.createContext(void 0);function z1(){let e=b.useContext(R1);if(e===void 0)throw Error(rE(64));return e}var B1=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),V1={tabActivationDirection:e=>({[B1.activationDirection]:e})},H1=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,...c}=e,l=L1(),u=Object.hasOwn(e,`defaultValue`),d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=k1({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),[y,x]=b.useState(`none`),S=zT((e,t)=>{i?.(e,t),!t.isCanceled&&(h(e),x(t.activationDirection))}),C=zT((e,t)=>{p(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),w=zT((e,t)=>{p(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),T=b.useCallback(e=>f.get(e),[f]),E=b.useCallback(e=>{for(let t of _.values())if(e===t?.value)return t?.id},[_]),D=b.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of _.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[_]),O=b.useMemo(()=>({direction:l,getTabElementBySelectedValue:D,getTabIdByPanelValue:E,getTabPanelIdByValue:T,onValueChange:S,orientation:a,registerMountedTabPanel:C,setTabMap:v,unregisterMountedTabPanel:w,tabActivationDirection:y,value:m}),[l,D,E,T,S,a,C,v,w,y,m]),k=b.useMemo(()=>{for(let e of _.values())if(e!=null&&e.value===m)return e},[_,m]),A=b.useMemo(()=>{for(let e of _.values())if(e!=null&&!e.disabled)return e.value},[_]);$(()=>{if(g||_.size===0)return;let e=k?.disabled;if(u&&e&&m===r||!e&&!(k==null&&m!==null))return;let t=A??null;m!==t&&(h(t),x(`none`))},[r,A,u,g,k,x,h,_,m]);let j=AE(`div`,e,{state:{orientation:a,tabActivationDirection:y},ref:t,props:c,stateAttributesMapping:V1});return(0,G.jsx)(R1.Provider,{value:O,children:(0,G.jsx)(M1,{elementsRef:d,children:j})})});function U1(e){return e?.ownerDocument||document}var W1=0;function G1(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(W1+=1,r(`${t}-${W1}`))},[n,t]),i}var K1=HT.useId;function q1(e,t){if(K1!==void 0){let n=K1();return e??(t?`${t}-${n}`:n)}return G1(e,t)}function J1(e){return q1(e,`base-ui`)}var Y1=`data-composite-item-active`,X1=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Z1(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=j1(),f=b.useRef(-1),[p,m]=b.useState(a??(i===X1.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return $(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),$(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}function Q1(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=aE(),{ref:i,index:a}=Z1(e),o=n===a,s=b.useRef(null),c=uE(i,s);return{compositeProps:b.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var $1=b.createContext(void 0);function e0(){let e=b.useContext($1);if(e===void 0)throw Error(rE(65));return e}var t0=`none`,n0=`trigger-press`,r0=`trigger-hover`,i0=`outside-press`,a0=`item-press`,o0=`close-press`,s0=`focus-out`,c0=`escape-key`,l0=`list-navigation`,u0=`cancel-open`,d0=`imperative-action`,f0=`window-resize`;function p0(e,t,n,r){let i=!1,a=!1,o=r??wE;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var m0=typeof navigator<`u`,h0=C0(),g0=T0(),_0=w0(),v0=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),y0=h0.platform===`MacIntel`&&h0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(h0.platform);m0&&/firefox/i.test(_0);var b0=m0&&/apple/i.test(navigator.vendor);m0&&/Edg/i.test(_0);var x0=m0&&/android/i.test(g0)||/android/i.test(_0);m0&&g0.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var S0=_0.includes(`jsdom/`);function C0(){if(!m0)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function w0(){if(!m0)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function T0(){if(!m0)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var E0=`data-base-ui-focusable`,D0=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,O0=`ArrowLeft`,k0=`ArrowRight`,A0=`ArrowUp`,j0=`ArrowDown`;function M0(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function N0(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&_T(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function P0(e,t){if(!hT(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(N0(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function F0(e){return`composedPath`in e?e.composedPath()[0]:e.target}function I0(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function L0(e){return e.matches(`html,body`)}function R0(e){return gT(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function z0(e){return e?e.getAttribute(`role`)===`combobox`&&R0(e):!1}function B0(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function V0(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...V0(e,t.id,n)])}function H0(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function U0(e){e.preventDefault(),e.stopPropagation()}function W0(e){return`nativeEvent`in e}function G0(e){return e.pointerType===``&&e.isTrusted?!0:x0&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function K0(e){return S0?!1:!x0&&e.width===0&&e.height===0||x0&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function q0(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function J0(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Y0=[`top`,`right`,`bottom`,`left`],X0=Math.min,Z0=Math.max,Q0=Math.round,$0=Math.floor,e2=e=>({x:e,y:e}),t2={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function n2(e,t,n){return Z0(e,X0(t,n))}function r2(e,t){return typeof e==`function`?e(t):e}function i2(e){return e.split(`-`)[0]}function a2(e){return e.split(`-`)[1]}function o2(e){return e===`x`?`y`:`x`}function s2(e){return e===`y`?`height`:`width`}function c2(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function l2(e){return o2(c2(e))}function u2(e,t,n){n===void 0&&(n=!1);let r=a2(e),i=l2(e),a=s2(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=y2(o)),[o,y2(o)]}function d2(e){let t=y2(e);return[f2(e),t,f2(t)]}function f2(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var p2=[`left`,`right`],m2=[`right`,`left`],h2=[`top`,`bottom`],g2=[`bottom`,`top`];function _2(e,t,n){switch(e){case`top`:case`bottom`:return n?t?m2:p2:t?p2:m2;case`left`:case`right`:return t?h2:g2;default:return[]}}function v2(e,t,n,r){let i=a2(e),a=_2(i2(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(f2)))),a}function y2(e){let t=i2(e);return t2[t]+e.slice(t.length)}function b2(e){return{top:0,right:0,bottom:0,left:0,...e}}function x2(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:b2(e)}function S2(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 C2(e,t,n){return Math.floor(e/t)!==n}function w2(e,t){return t<0||t>=e.current.length}function T2(e,t){return D2(e,{disabledIndices:t})}function E2(e,t){return D2(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function D2(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&M2(e,a,r));return a}function O2(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!M2(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=$0(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!M2(e,r,o))return r}};u&&U0(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=D2(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=D2(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}w2(e,d)&&(d=l)}if(n===`both`){let n=$0(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&U0(t),l%a===a-1?r&&(d=D2(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=D2(e,{startingIndex:l,disabledIndices:o}),r&&C2(d,a,n)&&(d=D2(e,{startingIndex:l-l%a-1,disabledIndices:o}))),C2(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&U0(t),l%a===0?r&&(d=D2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=D2(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&C2(d,a,n)&&(d=D2(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),C2(d,a,n)&&(d=l));let s=$0(c/a)===n;w2(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:D2(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function k2(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function A2(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function j2(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function M2(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?N2(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function N2(e){return kT(e).display!==`none`}var P2=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),F2=typeof Element>`u`,I2=F2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,L2=!F2&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},R2=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):R2(e.parentNode))},z2=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},B2=function(e,t,n){if(R2(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(P2));return t&&I2.call(e,P2)&&r.unshift(e),r=r.filter(n),r},V2=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!R2(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=V2(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{I2.call(a,P2)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!R2(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=V2(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},H2=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},U2=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||z2(e))&&!H2(e)?0:e.tabIndex},W2=function(e,t){var n=U2(e);return n<0&&t&&!H2(e)?0:n},G2=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},K2=function(e){return e.tagName===`INPUT`},q2=function(e){return K2(e)&&e.type===`hidden`},J2=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Y2=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},X2=function(e){if(!e.name)return!0;var t=e.form||L2(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Y2(r,e.form);return!i||i===e},Z2=function(e){return K2(e)&&e.type===`radio`},Q2=function(e){return Z2(e)&&!X2(e)},$2=function(e){var t=e&&L2(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=L2(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},e4=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},t4=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=I2.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(I2.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=L2(e);if(o&&!o.shadowRoot&&r(o)===!0)return e4(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if($2(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return e4(e);return!1},n4=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return I2.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},r4=function(e,t){return!(t.disabled||q2(t)||t4(t,e)||J2(t)||n4(t))},i4=function(e,t){return!(Q2(t)||U2(t)<0||!r4(e,t))},a4=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},o4=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=W2(a,i),s=i?o4(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(G2).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},s4=function(e,t){return t||={},o4(t.getShadowRoot?V2([e],t.includeContainer,{filter:i4.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:a4}):B2(e,t.includeContainer,i4.bind(null,t)))},c4=function(e,t){return t||={},t.getShadowRoot?V2([e],t.includeContainer,{filter:r4.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):B2(e,t.includeContainer,r4.bind(null,t))},l4=function(e,t){if(t||={},!e)throw Error(`No node provided`);return I2.call(e,P2)===!1?!1:i4(t,e)},u4=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function d4(e,t){let n=s4(e,u4()),r=n.length;if(r===0)return;let i=M0(U1(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function f4(e){return d4(U1(e).body,1)||e}function p4(e){return d4(U1(e).body,-1)||e}function m4(e,t){if(!e)return null;let n=s4(U1(e).body,u4()),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function h4(e){return m4(e,1)}function g4(e){return m4(e,-1)}function _4(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!N0(n,r)}function v4(e){s4(e,u4()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function y4(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var b4=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:d}=z1(),{activateOnFocus:f,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:h,setHighlightedTabIndex:g,tabsListElement:_}=e0(),v=J1(o),{compositeProps:y,compositeRef:x,index:S}=Q1({metadata:b.useMemo(()=>({disabled:r,id:v,value:a}),[r,v,a])}),C=a===l,w=b.useRef(!1),T=b.useRef(null);b.useEffect(()=>{let e=T.current;if(e)return h(e)},[h]),$(()=>{if(w.current){w.current=!1;return}if(!(C&&S>-1&&p!==S))return;let e=_;if(e!=null){let t=M0(U1(e));if(t&&N0(e,t))return}r||g(S)},[C,S,p,g,r,_]);let{getButtonProps:E,buttonRef:D}=sE({disabled:r,native:s,focusableWhenDisabled:!0}),O=u(a),k=b.useRef(!1),A=b.useRef(!1);function j(e){C||r||m(a,p0(t0,e.nativeEvent,void 0,{activationDirection:`none`}))}function M(e){C||(S>-1&&!r&&g(S),!r&&f&&(!k.current||k.current&&A.current)&&m(a,p0(t0,e.nativeEvent,void 0,{activationDirection:`none`})))}function N(e){if(C||r)return;k.current=!0;function t(){k.current=!1,A.current=!1}(!e.button||e.button===0)&&(A.current=!0,U1(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return AE(`button`,e,{state:{disabled:r,active:C,orientation:d},ref:[t,D,x,T],props:[y,{role:`tab`,"aria-controls":O,"aria-selected":C,id:v,onClick:j,onFocus:M,onPointerDown:N,[Y1]:C?``:void 0,onKeyDownCapture(){w.current=!0}},c,E]})}),x4=[];function S4(e){b.useEffect(e,x4)}var C4=b.createContext(void 0),w4={disableStyleElements:!1};function T4(){return b.useContext(C4)??w4}function E4(e){return _E(19)?e:e?`true`:void 0}var D4=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),O4={[D4.startingStyle]:``},k4={[D4.endingStyle]:``},A4={transitionStatus(e){return e===`starting`?O4:e===`ending`?k4:null}},j4=null;globalThis.requestAnimationFrame;var M4=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},N4=class e{static create(){return new e}static request(e){return M4.request(e)}static cancel(e){return M4.cancel(e)}currentId=j4;request(e){this.cancel(),this.currentId=M4.request(()=>{this.currentId=j4,e()})}cancel=()=>{this.currentId!==j4&&(M4.cancel(this.currentId),this.currentId=j4)};disposeEffect=()=>this.cancel};function P4(){let e=IT(N4.create).current;return S4(e.disposeEffect),e}function F4(e){return e==null?e:`current`in e?e.current:e}function I4(e,t=!1,n=!0){let r=P4();return zT((i,a=null)=>{r.cancel();function o(){Lq.flushSync(i)}let s=F4(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=D4.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function L4(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=zT(i),o=I4(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function R4(e,t=!1,n=!1){let[r,i]=b.useState(e&&t?`idle`:void 0),[a,o]=b.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),$(()=>{if(!e&&a&&r!==`ending`&&n){let e=N4.request(()=>{i(`ending`)});return()=>{N4.cancel(e)}}},[e,a,r,n]),$(()=>{if(!e||t)return;let n=N4.request(()=>{i(void 0)});return()=>{N4.cancel(n)}},[t,e]),$(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=N4.request(()=>{i(`idle`)});return()=>{N4.cancel(n)}},[t,e,a,i,r]),b.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var z4=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=D4.startingStyle]=`startingStyle`,e[e.endingStyle=D4.endingStyle]=`endingStyle`,e}({}),B4={...V1,...A4},V4=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:d,unregisterMountedTabPanel:f}=z1(),p=J1(),{ref:m,index:h}=Z1({metadata:b.useMemo(()=>({id:p,value:r}),[p,r])}),g=r===s,{mounted:_,transitionStatus:v,setMounted:y}=R4(g),x=!_,S=c(r),C={hidden:x,orientation:l,tabActivationDirection:u,transitionStatus:v},w=b.useRef(null),T=AE(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:E4(!g),[z4.index]:h},o],stateAttributesMapping:B4});return L4({open:g,ref:w,onComplete(){g||y(!1)}}),$(()=>{if(!(x&&!a)&&p!=null)return d(r,p),()=>{f(r,p)}},[x,a,r,p,d,f]),a||_?T:null});function H4(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var U4=`ArrowUp`,W4=`ArrowDown`,G4=`ArrowLeft`,K4=`ArrowRight`,q4=`Home`,J4=new Set([G4,K4]),Y4=new Set([G4,K4,q4,`End`]),X4=new Set([U4,W4]),Z4=new Set([U4,W4,q4,`End`]),Q4=new Set([...J4,...X4]),$4=new Set([...Q4,q4,`End`]),e3=new Set([U4,W4,G4,K4,q4,`End`]),t3=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function n3(e){return gT(e)&&e.tagName===`INPUT`}function r3(e){return!!(n3(e)&&e.selectionStart!=null||gT(e)&&e.tagName===`TEXTAREA`)}function i3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=a3(e,t,`left`),a=o3(e),o=o3(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=a3(e,t,`top`),r=o3(e),i=o3(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function a3(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function o3(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var s3=[];function c3(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:p=s3}=e,[m,h]=b.useState(0),g=n>1,_=b.useRef(null),v=uE(_,l),y=b.useRef([]),x=b.useRef(!1),S=s??m,C=zT((e,t=!1)=>{if((c??h)(e),t){let t=y.current[e];i3(_.current,t,o,a)}}),w=zT(e=>{if(e.size===0||x.current)return;x.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&C(r),i3(_.current,n,o,a)}),T=b.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:v,onFocus(e){!_.current||!r3(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?$4:Q4;if(!s.has(e.key)||l3(e,p)||!_.current)return;let c=o===`rtl`,l=c?G4:K4,m={horizontal:l,vertical:W4,both:l}[a],h=c?K4:G4,v={horizontal:h,vertical:U4,both:h}[a];if(r3(e.target)&&!H4(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==m&&t>0)return}let b=S,x=T2(y,f),w=E2(y,f);if(g){let o=t||Array.from({length:y.current.length},()=>({width:1,height:1})),s=k2(o,n,i),l=s.findIndex(e=>e!=null&&!M2(y,e,f)),u=s.reduce((e,t,n)=>t!=null&&!M2(y,t,f)?n:e,-1);b=s[O2({current:s.map(e=>e?y.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:j2([...f||y.current.map((e,t)=>M2(y,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:A2(S>w?x:S,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[W4],both:[l,W4]}[a],E={horizontal:[h],vertical:[U4],both:[h,U4]}[a],D=g?s:{horizontal:u?Y4:J4,vertical:u?Z4:X4,both:s}[a];u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(T.includes(e.key)||E.includes(e.key))&&(b=r&&b===w&&T.includes(e.key)?x:r&&b===x&&E.includes(e.key)?w:D2(y,{startingIndex:b,decrement:E.includes(e.key),disabledIndices:f})),b!==S&&!w2(y,b)&&(d&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))}}),[n,i,o,f,y,u,S,g,t,r,v,p,C,a,d]);return b.useMemo(()=>({props:T,highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,disabledIndices:f,onMapChange:w,relayKeyboardEvent:T.onKeyDown}),[T,S,C,y,f,w])}function l3(e,t){for(let n of t3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function u3(e){let{render:t,className:n,refs:r=CE,props:i=CE,state:a=wE,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:d,loopFocus:f,cols:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=c3({itemSizes:d,cols:p,loopFocus:f,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:L1(),disabledIndices:v,modifierKeys:y}),A=AE(S,e,{state:a,ref:r,props:[w,...i,C],stateAttributesMapping:o}),j=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,G.jsx)(iE.Provider,{value:j,children:(0,G.jsx)(M1,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var d3=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=z1(),[p,m]=b.useState(0),[h,g]=b.useState(null),_=b.useRef(new Set),v=b.useRef(new Set),y=b.useRef(null),x=zT(()=>{_.current.forEach(e=>{e()})});b.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.size&&x()});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h,x]);let S=zT(e=>(_.current.add(e),()=>{_.current.delete(e)})),C=zT(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),w=p3(u,l,h,s),T=zT((e,t)=>{e!==u&&(t.activationDirection=w(e),c(e,t))}),E={orientation:l,tabActivationDirection:f},D={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},O=b.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:C,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,S,C,T,m,h]);return(0,G.jsx)($1.Provider,{value:O,children:(0,G.jsx)(u3,{render:a,className:r,state:E,refs:[t,g],props:[D,o],stateAttributesMapping:V1,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:CE})})});function f3(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function p3(e,t,n,r){let[i,a]=b.useState(null);return $(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=f3(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),b.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=f3(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}function m3({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(H1,{"data-slot":`tabs`,"data-orientation":t,className:cO(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,e),...n})}var h3=BE(`rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function g3({className:e,variant:t=`default`,...n}){return(0,G.jsx)(d3,{"data-slot":`tabs-list`,"data-variant":t,className:cO(h3({variant:t}),e),...n})}function _3({className:e,...t}){return(0,G.jsx)(b4,{"data-slot":`tabs-trigger`,className:cO(`gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground`,`after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function v3({className:e,...t}){return(0,G.jsx)(V4,{"data-slot":`tabs-content`,className:cO(`text-xs/relaxed flex-1 outline-none`,e),...t})}function y3({className:e,size:t=`default`,...n}){return(0,G.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:cO(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col`,e),...n})}function b3({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`card-content`,className:cO(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}var x3=function(e){return typeof e==`function`},S3=function(e){return typeof e==`string`},C3=function(e){return typeof e==`number`};function w3(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function T3(e){var t=(0,b.useRef)(e);return t.current=e,t}var E3=function(e){var t=T3(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},D3=!!(typeof window<`u`&&window.document&&window.document.createElement);function O3(e,t){if(D3)return e?x3(e)?e():`current`in e?e.current:e:t}var k3=function(e){return function(t,n,r){var i=(0,b.useRef)(!1),a=(0,b.useRef)([]),o=(0,b.useRef)([]),s=(0,b.useRef)(void 0);e(function(){var e,c=(Array.isArray(r)?r:[r]).map(function(e){return O3(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!w3(a.current,c)||!w3(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),E3(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),A3=u(s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}))()),j3=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,A3.default)(e,t)},M3=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);j3(t,r.current)||(i.current+=1),r.current=t,k3(e,[i.current],n)},N3=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``),P3={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,control:17,alt:18,pausebreak:19,pause:19,capslock:20,esc:27,escape:27,space:32,spacebar:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,arrowleft:37,uparrow:38,arrowup:38,rightarrow:39,arrowright:39,downarrow:40,arrowdown:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:N3?[91,93]:[91,92],selectkey:93,contextmenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},F3={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type===`keyup`?P3.meta.includes(e.keyCode):e.metaKey}};function I3(e){return S3(e)||C3(e)}function L3(e){var t=Object.keys(F3).reduce(function(t,n){return F3[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function R3(e,t,n){var r,i;if(!e.key)return!1;if(C3(t))return e.keyCode===t?t:!1;var a=t.split(`.`),o=0;try{for(var s=PZ(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=F3[l],d=P3[l.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n?o===a.length&&L3(e)===a.length?t:!1:o===a.length?t:!1}function z3(e,t){return x3(e)?e:I3(e)?function(n){return R3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return R3(n,e,t)})}:function(){return!!e}}var B3=[`keydown`];function V3(e,t,n){var r=n||{},i=r.events,a=i===void 0?B3:i,o=r.target,s=r.exactMatch,c=s===void 0?!1:s,l=r.useCapture,u=l===void 0?!1:l,d=T3(t),f=T3(e);M3(function(){var e,t,n,r=O3(o,window);if(r){var i=function(e){var t=e,n=z3(f.current,c)(t),r=I3(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=PZ(a),l=s.next();!l.done;l=s.next()){var p=l.value;(n=r?.addEventListener)==null||n.call(r,p,i,u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=PZ(a),s=o.next();!s.done;s=o.next()){var c=s.value;(n=r?.removeEventListener)==null||n.call(r,c,i,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[a],o)}var H3=({validateForm:e,formData:t})=>{let n=cT(),{mutateAsync:r,isPending:i}=oT(),a=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return V3(`Enter`,a),(0,G.jsx)(`div`,{className:`flex flex-col items-end gap-1`,children:(0,G.jsxs)(lO,{onClick:a,variant:`default`,disabled:i,children:[i?(0,G.jsx)(cn,{className:`h-4 w-4 animate-spin`}):(0,G.jsx)(dn,{className:`h-4 w-4`}),`Call Tool`]})})},U3=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(p()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(p()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],`channels`,{value:t}),Object.defineProperty(a[e],`labels`,{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],`channels`,{value:r[e].channels}),Object.defineProperty(a[e],`labels`,{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0)this.model=t||`rgb`,l=i[this.model].channels,this.color=f(Array.prototype.slice.call(e,0,l),l),this.valpha=typeof e[l]==`number`?e[l]:1;else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var i={};return(()=>{function e(t){return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>Ar});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
130
130
 
131
131
  `+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:`
132
132
  `+n)+(r===null?``:`
@@ -138,7 +138,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
138
138
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(e,t){if(t&&e?.constructor===t)return`bigNumber`;var n=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return n===`number`&&(n=isNaN(e)?`nan`:(0|e)===e?`integer`:`float`),n}function O(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(/\r/g,`\\r`).replace(/\f/g,`\\f`)}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var k=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=(e.parent_type,e.namespace),n=e.quotesOnKeys,r=e.indentWidth,i=e.theme,a=e.singleIndent,o=e.showComma,s=e.isLast,c=e.jsvRoot,l=e.name?e.name:``;return _().createElement(`div`,{className:`variable-row`},_().createElement(`span`,Object.assign({},K(i,`object-name`),{key:t},K(i,`objectKeyVal`,{paddingLeft:r*a})),_().createElement(`span`,{className:`object-key`},n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(i,`colon`),`:`)),_().createElement(`span`,K(i,`circularReference`),`[CIRCULAR REFERENCE]`),o&&!s&&!c&&_().createElement(`span`,K(i,`comma`),`,`))}}])}(_().PureComponent),A={scheme:`rjv-default`,author:`mac gainor`,base00:`rgba(0, 0, 0, 0)`,base01:`rgb(245, 245, 245)`,base02:`rgb(235, 235, 235)`,base03:`#93a1a1`,base04:`rgba(0, 0, 0, 0.3)`,base05:`#586e75`,base06:`#073642`,base07:`#002b36`,base08:`#d33682`,base09:`#cb4b16`,base0A:`#dc322f`,base0B:`#859900`,base0C:`#6c71c4`,base0D:`#586e75`,base0E:`#2aa198`,base0F:`#268bd2`},j={scheme:`rjv-grey`,author:`mac gainor`,base00:`rgba(1, 1, 1, 0)`,base01:`rgba(1, 1, 1, 0.1)`,base02:`rgba(0, 0, 0, 0.2)`,base03:`rgba(1, 1, 1, 0.3)`,base04:`rgba(0, 0, 0, 0.4)`,base05:`rgba(1, 1, 1, 0.5)`,base06:`rgba(1, 1, 1, 0.6)`,base07:`rgba(1, 1, 1, 0.7)`,base08:`rgba(1, 1, 1, 0.8)`,base09:`rgba(1, 1, 1, 0.8)`,base0A:`rgba(1, 1, 1, 0.8)`,base0B:`rgba(1, 1, 1, 0.8)`,base0C:`rgba(1, 1, 1, 0.8)`,base0D:`rgba(1, 1, 1, 0.8)`,base0E:`rgba(1, 1, 1, 0.8)`,base0F:`rgba(1, 1, 1, 0.8)`};let M={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,undefinedPadding:`1px 2px`,undefinedBorderRadius:`3px`,dataTypeFontSize:`11px`,dataTypeMarginRight:`4px`,datatypeOpacity:`0.8`,objectSizeBorderRadius:`3px`,objectSizeFontStyle:`italic`,objectSizeMargin:`0px 6px 0px 0px`,clipboardCursor:`pointer`,clipboardCheckMarginLeft:`-12px`,metaDataPadding:`0px 0px 0px 10px`,arrayGroupMetaPadding:`0px 0px 0px 4px`,iconContainerWidth:`17px`,tooltipPadding:`4px`,editInputMinWidth:`130px`,editInputBorderRadius:`2px`,editInputPadding:`5px`,editInputMarginRight:`4px`,editInputFontFamily:`monospace`,iconCursor:`pointer`,iconFontSize:`15px`,iconPaddingRight:`1px`,dateValueMarginLeft:`2px`,iconMarginRight:`3px`,detectedRowPaddingTop:`3px`,addKeyCoverBackground:`rgba(255, 255, 255, 0.3)`,addKeyCoverPosition:`absolute`,addKeyCoverPositionPx:`0px`,addKeyModalWidth:`200px`,addKeyModalMargin:`auto`,addKeyModalPadding:`10px`,addKeyModalRadius:`3px`,commaColor:`#666`,commaFontSize:`12px`,commaMarginRight:`4px`};var N=r(742);let P=function(e){return e},F=typeof global==`object`&&global&&global.Object===Object&&global;var I=typeof self==`object`&&self&&self.Object===Object&&self;let L=F||I||Function(`return this`)(),R=L.Symbol;var z=Object.prototype,B=z.hasOwnProperty,V=z.toString,H=R?R.toStringTag:void 0;let U=function(e){var t=B.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch{}var i=V.call(e);return r&&(t?e[H]=n:delete e[H]),i};var ee=Object.prototype.toString;let W=function(e){return ee.call(e)};var te=R?R.toStringTag:void 0;let ne=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:te&&te in Object(e)?U(e):W(e)},re=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},ie=function(e){if(!re(e))return!1;var t=ne(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},ae=L[`__core-js_shared__`];var oe,se=(oe=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||``))?`Symbol(src)_1.`+oe:``;let ce=function(e){return!!se&&se in e};var le=Function.prototype.toString;let ue=function(e){if(e!=null){try{return le.call(e)}catch{}try{return e+``}catch{}}return``};var de=/^\[object .+?Constructor\]$/,fe=Function.prototype,pe=Object.prototype,me=fe.toString,he=pe.hasOwnProperty,ge=RegExp(`^`+me.call(he).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);let _e=function(e){return!(!re(e)||ce(e))&&(ie(e)?ge:de).test(ue(e))},ve=function(e,t){return e?.[t]},ye=function(e,t){var n=ve(e,t);return _e(n)?n:void 0};var be=ye(L,`WeakMap`);let xe=be&&new be,Se=xe?function(e,t){return xe.set(e,t),e}:P;var Ce=Object.create;let we=function(){function e(){}return function(t){if(!re(t))return{};if(Ce)return Ce(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Te=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=we(e.prototype),r=e.apply(n,t);return re(r)?r:n}},Ee=function(e,t,n){var r=1&t,i=Te(e);return function t(){return(this&&this!==L&&this instanceof t?i:e).apply(r?n:this,arguments)}},De=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var Oe=Math.max;let ke=function(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Oe(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u};var Ae=Math.max;let je=function(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Ae(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d},Me=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},Ne=function(){};function Pe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Pe.prototype=we(Ne.prototype),Pe.prototype.constructor=Pe;let Fe=Pe,Ie=xe?function(e){return xe.get(e)}:function(){},Le={};var Re=Object.prototype.hasOwnProperty;let ze=function(e){for(var t=e.name+``,n=Le[t],r=Re.call(Le,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t};function Be(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Be.prototype=we(Ne.prototype),Be.prototype.constructor=Be;let G=Be,Ve=Array.isArray,He=function(e){return typeof e==`object`&&!!e},Ue=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t},We=function(e){if(e instanceof Fe)return e.clone();var t=new G(e.__wrapped__,e.__chain__);return t.__actions__=Ue(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t};var Ge=Object.prototype.hasOwnProperty;function Ke(e){if(He(e)&&!Ve(e)&&!(e instanceof Fe)){if(e instanceof G)return e;if(Ge.call(e,`__wrapped__`))return We(e)}return new G(e)}Ke.prototype=Ne.prototype,Ke.prototype.constructor=Ke;let qe=Ke,Je=function(e){var t=ze(e),n=qe[t];if(typeof n!=`function`||!(t in Fe.prototype))return!1;if(e===n)return!0;var r=Ie(n);return!!r&&e===r[0]};var Ye=Date.now;let Xe=function(e){var t=0,n=0;return function(){var r=Ye(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Ze=Xe(Se);var Qe=/\{\n\/\* \[wrapped with (.+)\] \*/,$e=/,? & /;let et=function(e){var t=e.match(Qe);return t?t[1].split($e):[]};var tt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;let nt=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(tt,`{
139
139
  /* [wrapped with `+t+`] */
140
140
  `)},rt=function(e){return function(){return e}},it=function(){try{var e=ye(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),at=Xe(it?function(e,t){return it(e,`toString`,{configurable:!0,enumerable:!1,value:rt(t),writable:!0})}:P),ot=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},st=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1},ct=function(e){return e!=e},lt=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},ut=function(e,t,n){return t==t?lt(e,t,n):st(e,ct,n)},dt=function(e,t){return!!(e!=null&&e.length)&&ut(e,t,0)>-1};var ft=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]];let pt=function(e,t){return ot(ft,function(n){var r=`_.`+n[0];t&n[1]&&!dt(e,r)&&e.push(r)}),e.sort()},mt=function(e,t,n){var r=t+``;return at(e,nt(r,pt(et(r),n)))},ht=function(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l],f=n.apply(void 0,d);return Je(e)&&Ze(f,d),f.placeholder=r,mt(f,e,t)},gt=function(e){return e.placeholder};var _t=/^(?:0|[1-9]\d*)$/;let vt=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&_t.test(e))&&e>-1&&e%1==0&&e<t};var yt=Math.min;let bt=function(e,t){for(var n=e.length,r=yt(t.length,n),i=Ue(e);r--;){var a=t[r];e[r]=vt(a,n)?i[a]:void 0}return e};var xt=`__lodash_placeholder__`;let St=function(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==xt||(e[n]=xt,a[i++]=n)}return a},Ct=function e(t,n,r,i,a,o,s,c,l,u){var d=128&n,f=1&n,p=2&n,m=24&n,h=512&n,g=p?void 0:Te(t);return function _(){for(var v=arguments.length,y=Array(v),b=v;b--;)y[b]=arguments[b];if(m)var x=gt(_),S=Me(y,x);if(i&&(y=ke(y,i,a,m)),o&&(y=je(y,o,s,m)),v-=S,m&&v<u){var C=St(y,x);return ht(t,n,e,_.placeholder,r,y,C,c,l,u-v)}var w=f?r:this,T=p?w[t]:t;return v=y.length,c?y=bt(y,c):h&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==L&&this instanceof _&&(T=g||Te(T)),T.apply(w,y)}},wt=function(e,t,n){var r=Te(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=gt(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:St(o,c);return(a-=l.length)<n?ht(e,t,Ct,i.placeholder,void 0,o,l,void 0,void 0,n-a):De(this&&this!==L&&this instanceof i?r:e,this,o)}},Tt=function(e,t,n,r){var i=1&t,a=Te(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==L&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return De(d,i?n:this,u)}};var Et=`__lodash_placeholder__`,Dt=128,Ot=Math.min;let kt=function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==Dt&&n==8||r==Dt&&n==256&&e[7].length<=t[8]||r==384&&t[7].length<=t[8]&&n==8;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?ke(c,s,t[4]):s,e[4]=c?St(e[3],Et):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?je(c,s,t[6]):s,e[6]=c?St(e[5],Et):t[6]),(s=t[7])&&(e[7]=s),r&Dt&&(e[8]=e[8]==null?t[8]:Ot(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e};var At=/\s/;let jt=function(e){for(var t=e.length;t--&&At.test(e.charAt(t)););return t};var Mt=/^\s+/;let Nt=function(e){return e&&e.slice(0,jt(e)+1).replace(Mt,``)},Pt=function(e){return typeof e==`symbol`||He(e)&&ne(e)==`[object Symbol]`};var Ft=/^[-+]0x[0-9a-f]+$/i,It=/^0b[01]+$/i,Lt=/^0o[0-7]+$/i,Rt=parseInt;let zt=function(e){if(typeof e==`number`)return e;if(Pt(e))return NaN;if(re(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=re(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Nt(e);var n=It.test(e);return n||Lt.test(e)?Rt(e.slice(2),n?2:8):Ft.test(e)?NaN:+e};var Bt=1/0;let Vt=function(e){return e?(e=zt(e))===Bt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0},Ht=function(e){var t=Vt(e),n=t%1;return t==t?n?t-n:t:0};var Ut=Math.max;let Wt=function(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:Ut(Ht(o),0),s=s===void 0?s:Ht(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=c?void 0:Ie(e),p=[e,t,n,r,i,u,d,a,o,s];if(f&&kt(p,f),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],!(s=p[9]=p[9]===void 0?c?0:e.length:Ut(p[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)m=t==8||t==16?wt(e,t,s):t!=32&&t!=33||i.length?Ct.apply(void 0,p):Tt(e,t,n,r);else var m=Ee(e,t,n);return mt((f?Se:Ze)(m,p),e,t)};function Gt(e,t,n){var r=Wt(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Gt.placeholder,r}Gt.placeholder={};let Kt=Gt,qt={threezerotwofour:{scheme:`threezerotwofour`,author:`jan t. sott (http://github.com/idleberg)`,base00:`#090300`,base01:`#3a3432`,base02:`#4a4543`,base03:`#5c5855`,base04:`#807d7c`,base05:`#a5a2a2`,base06:`#d6d5d4`,base07:`#f7f7f7`,base08:`#db2d20`,base09:`#e8bbd0`,base0A:`#fded02`,base0B:`#01a252`,base0C:`#b5e4f4`,base0D:`#01a0e4`,base0E:`#a16a94`,base0F:`#cdab53`},apathy:{scheme:`apathy`,author:`jannik siebert (https://github.com/janniks)`,base00:`#031A16`,base01:`#0B342D`,base02:`#184E45`,base03:`#2B685E`,base04:`#5F9C92`,base05:`#81B5AC`,base06:`#A7CEC8`,base07:`#D2E7E4`,base08:`#3E9688`,base09:`#3E7996`,base0A:`#3E4C96`,base0B:`#883E96`,base0C:`#963E4C`,base0D:`#96883E`,base0E:`#4C963E`,base0F:`#3E965B`},ashes:{scheme:`ashes`,author:`jannik siebert (https://github.com/janniks)`,base00:`#1C2023`,base01:`#393F45`,base02:`#565E65`,base03:`#747C84`,base04:`#ADB3BA`,base05:`#C7CCD1`,base06:`#DFE2E5`,base07:`#F3F4F5`,base08:`#C7AE95`,base09:`#C7C795`,base0A:`#AEC795`,base0B:`#95C7AE`,base0C:`#95AEC7`,base0D:`#AE95C7`,base0E:`#C795AE`,base0F:`#C79595`},atelierDune:{scheme:`atelier dune`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)`,base00:`#20201d`,base01:`#292824`,base02:`#6e6b5e`,base03:`#7d7a68`,base04:`#999580`,base05:`#a6a28c`,base06:`#e8e4cf`,base07:`#fefbec`,base08:`#d73737`,base09:`#b65611`,base0A:`#cfb017`,base0B:`#60ac39`,base0C:`#1fad83`,base0D:`#6684e1`,base0E:`#b854d4`,base0F:`#d43552`},atelierForest:{scheme:`atelier forest`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)`,base00:`#1b1918`,base01:`#2c2421`,base02:`#68615e`,base03:`#766e6b`,base04:`#9c9491`,base05:`#a8a19f`,base06:`#e6e2e0`,base07:`#f1efee`,base08:`#f22c40`,base09:`#df5320`,base0A:`#d5911a`,base0B:`#5ab738`,base0C:`#00ad9c`,base0D:`#407ee7`,base0E:`#6666ea`,base0F:`#c33ff3`},atelierHeath:{scheme:`atelier heath`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)`,base00:`#1b181b`,base01:`#292329`,base02:`#695d69`,base03:`#776977`,base04:`#9e8f9e`,base05:`#ab9bab`,base06:`#d8cad8`,base07:`#f7f3f7`,base08:`#ca402b`,base09:`#a65926`,base0A:`#bb8a35`,base0B:`#379a37`,base0C:`#159393`,base0D:`#516aec`,base0E:`#7b59c0`,base0F:`#cc33cc`},atelierLakeside:{scheme:`atelier lakeside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)`,base00:`#161b1d`,base01:`#1f292e`,base02:`#516d7b`,base03:`#5a7b8c`,base04:`#7195a8`,base05:`#7ea2b4`,base06:`#c1e4f6`,base07:`#ebf8ff`,base08:`#d22d72`,base09:`#935c25`,base0A:`#8a8a0f`,base0B:`#568c3b`,base0C:`#2d8f6f`,base0D:`#257fad`,base0E:`#5d5db1`,base0F:`#b72dd2`},atelierSeaside:{scheme:`atelier seaside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)`,base00:`#131513`,base01:`#242924`,base02:`#5e6e5e`,base03:`#687d68`,base04:`#809980`,base05:`#8ca68c`,base06:`#cfe8cf`,base07:`#f0fff0`,base08:`#e6193c`,base09:`#87711d`,base0A:`#c3c322`,base0B:`#29a329`,base0C:`#1999b3`,base0D:`#3d62f5`,base0E:`#ad2bee`,base0F:`#e619c3`},bespin:{scheme:`bespin`,author:`jan t. sott`,base00:`#28211c`,base01:`#36312e`,base02:`#5e5d5c`,base03:`#666666`,base04:`#797977`,base05:`#8a8986`,base06:`#9d9b97`,base07:`#baae9e`,base08:`#cf6a4c`,base09:`#cf7d34`,base0A:`#f9ee98`,base0B:`#54be0d`,base0C:`#afc4db`,base0D:`#5ea6ea`,base0E:`#9b859d`,base0F:`#937121`},brewer:{scheme:`brewer`,author:`timothée poisot (http://github.com/tpoisot)`,base00:`#0c0d0e`,base01:`#2e2f30`,base02:`#515253`,base03:`#737475`,base04:`#959697`,base05:`#b7b8b9`,base06:`#dadbdc`,base07:`#fcfdfe`,base08:`#e31a1c`,base09:`#e6550d`,base0A:`#dca060`,base0B:`#31a354`,base0C:`#80b1d3`,base0D:`#3182bd`,base0E:`#756bb1`,base0F:`#b15928`},bright:{scheme:`bright`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#303030`,base02:`#505050`,base03:`#b0b0b0`,base04:`#d0d0d0`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ffffff`,base08:`#fb0120`,base09:`#fc6d24`,base0A:`#fda331`,base0B:`#a1c659`,base0C:`#76c7b7`,base0D:`#6fb3d2`,base0E:`#d381c3`,base0F:`#be643c`},chalk:{scheme:`chalk`,author:`chris kempson (http://chriskempson.com)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#eda987`,base0A:`#ddb26f`,base0B:`#acc267`,base0C:`#12cfc0`,base0D:`#6fc2ef`,base0E:`#e1a3ee`,base0F:`#deaf8f`},codeschool:{scheme:`codeschool`,author:`brettof86`,base00:`#232c31`,base01:`#1c3657`,base02:`#2a343a`,base03:`#3f4944`,base04:`#84898c`,base05:`#9ea7a6`,base06:`#a7cfa3`,base07:`#b5d8f6`,base08:`#2a5491`,base09:`#43820d`,base0A:`#a03b1e`,base0B:`#237986`,base0C:`#b02f30`,base0D:`#484d79`,base0E:`#c59820`,base0F:`#c98344`},colors:{scheme:`colors`,author:`mrmrs (http://clrs.cc)`,base00:`#111111`,base01:`#333333`,base02:`#555555`,base03:`#777777`,base04:`#999999`,base05:`#bbbbbb`,base06:`#dddddd`,base07:`#ffffff`,base08:`#ff4136`,base09:`#ff851b`,base0A:`#ffdc00`,base0B:`#2ecc40`,base0C:`#7fdbff`,base0D:`#0074d9`,base0E:`#b10dc9`,base0F:`#85144b`},default:{scheme:`default`,author:`chris kempson (http://chriskempson.com)`,base00:`#181818`,base01:`#282828`,base02:`#383838`,base03:`#585858`,base04:`#b8b8b8`,base05:`#d8d8d8`,base06:`#e8e8e8`,base07:`#f8f8f8`,base08:`#ab4642`,base09:`#dc9656`,base0A:`#f7ca88`,base0B:`#a1b56c`,base0C:`#86c1b9`,base0D:`#7cafc2`,base0E:`#ba8baf`,base0F:`#a16946`},eighties:{scheme:`eighties`,author:`chris kempson (http://chriskempson.com)`,base00:`#2d2d2d`,base01:`#393939`,base02:`#515151`,base03:`#747369`,base04:`#a09f93`,base05:`#d3d0c8`,base06:`#e8e6df`,base07:`#f2f0ec`,base08:`#f2777a`,base09:`#f99157`,base0A:`#ffcc66`,base0B:`#99cc99`,base0C:`#66cccc`,base0D:`#6699cc`,base0E:`#cc99cc`,base0F:`#d27b53`},embers:{scheme:`embers`,author:`jannik siebert (https://github.com/janniks)`,base00:`#16130F`,base01:`#2C2620`,base02:`#433B32`,base03:`#5A5047`,base04:`#8A8075`,base05:`#A39A90`,base06:`#BEB6AE`,base07:`#DBD6D1`,base08:`#826D57`,base09:`#828257`,base0A:`#6D8257`,base0B:`#57826D`,base0C:`#576D82`,base0D:`#6D5782`,base0E:`#82576D`,base0F:`#825757`},flat:{scheme:`flat`,author:`chris kempson (http://chriskempson.com)`,base00:`#2C3E50`,base01:`#34495E`,base02:`#7F8C8D`,base03:`#95A5A6`,base04:`#BDC3C7`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ECF0F1`,base08:`#E74C3C`,base09:`#E67E22`,base0A:`#F1C40F`,base0B:`#2ECC71`,base0C:`#1ABC9C`,base0D:`#3498DB`,base0E:`#9B59B6`,base0F:`#be643c`},google:{scheme:`google`,author:`seth wright (http://sethawright.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#CC342B`,base09:`#F96A38`,base0A:`#FBA922`,base0B:`#198844`,base0C:`#3971ED`,base0D:`#3971ED`,base0E:`#A36AC7`,base0F:`#3971ED`},grayscale:{scheme:`grayscale`,author:`alexandre gavioli (https://github.com/alexx2/)`,base00:`#101010`,base01:`#252525`,base02:`#464646`,base03:`#525252`,base04:`#ababab`,base05:`#b9b9b9`,base06:`#e3e3e3`,base07:`#f7f7f7`,base08:`#7c7c7c`,base09:`#999999`,base0A:`#a0a0a0`,base0B:`#8e8e8e`,base0C:`#868686`,base0D:`#686868`,base0E:`#747474`,base0F:`#5e5e5e`},greenscreen:{scheme:`green screen`,author:`chris kempson (http://chriskempson.com)`,base00:`#001100`,base01:`#003300`,base02:`#005500`,base03:`#007700`,base04:`#009900`,base05:`#00bb00`,base06:`#00dd00`,base07:`#00ff00`,base08:`#007700`,base09:`#009900`,base0A:`#007700`,base0B:`#00bb00`,base0C:`#005500`,base0D:`#009900`,base0E:`#00bb00`,base0F:`#005500`},harmonic:{scheme:`harmonic16`,author:`jannik siebert (https://github.com/janniks)`,base00:`#0b1c2c`,base01:`#223b54`,base02:`#405c79`,base03:`#627e99`,base04:`#aabcce`,base05:`#cbd6e2`,base06:`#e5ebf1`,base07:`#f7f9fb`,base08:`#bf8b56`,base09:`#bfbf56`,base0A:`#8bbf56`,base0B:`#56bf8b`,base0C:`#568bbf`,base0D:`#8b56bf`,base0E:`#bf568b`,base0F:`#bf5656`},hopscotch:{scheme:`hopscotch`,author:`jan t. sott`,base00:`#322931`,base01:`#433b42`,base02:`#5c545b`,base03:`#797379`,base04:`#989498`,base05:`#b9b5b8`,base06:`#d5d3d5`,base07:`#ffffff`,base08:`#dd464c`,base09:`#fd8b19`,base0A:`#fdcc59`,base0B:`#8fc13e`,base0C:`#149b93`,base0D:`#1290bf`,base0E:`#c85e7c`,base0F:`#b33508`},isotope:{scheme:`isotope`,author:`jan t. sott`,base00:`#000000`,base01:`#404040`,base02:`#606060`,base03:`#808080`,base04:`#c0c0c0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#ff0000`,base09:`#ff9900`,base0A:`#ff0099`,base0B:`#33ff00`,base0C:`#00ffff`,base0D:`#0066ff`,base0E:`#cc00ff`,base0F:`#3300ff`},marrakesh:{scheme:`marrakesh`,author:`alexandre gavioli (http://github.com/alexx2/)`,base00:`#201602`,base01:`#302e00`,base02:`#5f5b17`,base03:`#6c6823`,base04:`#86813b`,base05:`#948e48`,base06:`#ccc37a`,base07:`#faf0a5`,base08:`#c35359`,base09:`#b36144`,base0A:`#a88339`,base0B:`#18974e`,base0C:`#75a738`,base0D:`#477ca1`,base0E:`#8868b3`,base0F:`#b3588e`},mocha:{scheme:`mocha`,author:`chris kempson (http://chriskempson.com)`,base00:`#3B3228`,base01:`#534636`,base02:`#645240`,base03:`#7e705a`,base04:`#b8afad`,base05:`#d0c8c6`,base06:`#e9e1dd`,base07:`#f5eeeb`,base08:`#cb6077`,base09:`#d28b71`,base0A:`#f4bc87`,base0B:`#beb55b`,base0C:`#7bbda4`,base0D:`#8ab3b5`,base0E:`#a89bb9`,base0F:`#bb9584`},monokai:{scheme:`monokai`,author:`wimer hazenberg (http://www.monokai.nl)`,base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`},nicinabox:{scheme:`nicinabox`,author:`nicinabox (http://github.com/nicinabox)`,base00:`#2A2F3A`,base01:`#3C444F`,base02:`#4F5A65`,base03:`#BEBEBE`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#FFFFFF`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#FC6D24`,base0A:`#ddb26f`,base0B:`#A1C659`,base0C:`#12cfc0`,base0D:`#6FB3D2`,base0E:`#D381C3`,base0F:`#deaf8f`},ocean:{scheme:`ocean`,author:`chris kempson (http://chriskempson.com)`,base00:`#2b303b`,base01:`#343d46`,base02:`#4f5b66`,base03:`#65737e`,base04:`#a7adba`,base05:`#c0c5ce`,base06:`#dfe1e8`,base07:`#eff1f5`,base08:`#bf616a`,base09:`#d08770`,base0A:`#ebcb8b`,base0B:`#a3be8c`,base0C:`#96b5b4`,base0D:`#8fa1b3`,base0E:`#b48ead`,base0F:`#ab7967`},paraiso:{scheme:`paraiso`,author:`jan t. sott`,base00:`#2f1e2e`,base01:`#41323f`,base02:`#4f424c`,base03:`#776e71`,base04:`#8d8687`,base05:`#a39e9b`,base06:`#b9b6b0`,base07:`#e7e9db`,base08:`#ef6155`,base09:`#f99b15`,base0A:`#fec418`,base0B:`#48b685`,base0C:`#5bc4bf`,base0D:`#06b6ef`,base0E:`#815ba4`,base0F:`#e96ba8`},pop:{scheme:`pop`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#eb008a`,base09:`#f29333`,base0A:`#f8ca12`,base0B:`#37b349`,base0C:`#00aabb`,base0D:`#0e5a94`,base0E:`#b31e8d`,base0F:`#7a2d00`},railscasts:{scheme:`railscasts`,author:`ryan bates (http://railscasts.com)`,base00:`#2b2b2b`,base01:`#272935`,base02:`#3a4055`,base03:`#5a647e`,base04:`#d4cfc9`,base05:`#e6e1dc`,base06:`#f4f1ed`,base07:`#f9f7f3`,base08:`#da4939`,base09:`#cc7833`,base0A:`#ffc66d`,base0B:`#a5c261`,base0C:`#519f50`,base0D:`#6d9cbe`,base0E:`#b6b3eb`,base0F:`#bc9458`},shapeshifter:{scheme:`shapeshifter`,author:`tyler benziger (http://tybenz.com)`,base00:`#000000`,base01:`#040404`,base02:`#102015`,base03:`#343434`,base04:`#555555`,base05:`#ababab`,base06:`#e0e0e0`,base07:`#f9f9f9`,base08:`#e92f2f`,base09:`#e09448`,base0A:`#dddd13`,base0B:`#0ed839`,base0C:`#23edda`,base0D:`#3b48e3`,base0E:`#f996e2`,base0F:`#69542d`},solarized:{scheme:`solarized`,author:`ethan schoonover (http://ethanschoonover.com/solarized)`,base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`},summerfruit:{scheme:`summerfruit`,author:`christopher corley (http://cscorley.github.io/)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#B0B0B0`,base05:`#D0D0D0`,base06:`#E0E0E0`,base07:`#FFFFFF`,base08:`#FF0086`,base09:`#FD8900`,base0A:`#ABA800`,base0B:`#00C918`,base0C:`#1faaaa`,base0D:`#3777E6`,base0E:`#AD00A1`,base0F:`#cc6633`},tomorrow:{scheme:`tomorrow`,author:`chris kempson (http://chriskempson.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#cc6666`,base09:`#de935f`,base0A:`#f0c674`,base0B:`#b5bd68`,base0C:`#8abeb7`,base0D:`#81a2be`,base0E:`#b294bb`,base0F:`#a3685a`},tube:{scheme:`london tube`,author:`jan t. sott`,base00:`#231f20`,base01:`#1c3f95`,base02:`#5a5758`,base03:`#737171`,base04:`#959ca1`,base05:`#d9d8d8`,base06:`#e7e7e8`,base07:`#ffffff`,base08:`#ee2e24`,base09:`#f386a1`,base0A:`#ffd204`,base0B:`#00853e`,base0C:`#85cebc`,base0D:`#009ddc`,base0E:`#98005d`,base0F:`#b06110`},twilight:{scheme:`twilight`,author:`david hart (http://hart-dev.com)`,base00:`#1e1e1e`,base01:`#323537`,base02:`#464b50`,base03:`#5f5a60`,base04:`#838184`,base05:`#a7a7a7`,base06:`#c3c3c3`,base07:`#ffffff`,base08:`#cf6a4c`,base09:`#cda869`,base0A:`#f9ee98`,base0B:`#8f9d6a`,base0C:`#afc4db`,base0D:`#7587a6`,base0E:`#9b859d`,base0F:`#9b703f`}},Jt=qt.default,Yt=Object.keys(Jt),Xt=e=>{let[t,n,r]=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}(N(e).array());var i;let a=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;return i=1*t+0*n+1.13983*r,a=1*t+-.39465*n+-.5806*r,o=1*t+2.02311*n+0*r,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]}([(i=t,i<.25?1:i<.5?.9-i:1.1-i),n,r]);return N.rgb(a).hex()},Zt=e=>t=>({className:[t.className,e.className].filter(Boolean).join(` `),style:{...t.style||{},...e.style||{}}}),Qt=(e,t)=>{let n=Object.keys(t);for(let t in e)n.indexOf(t)===-1&&n.push(t);return n.reduce((n,r)=>(n[r]=((e,t)=>{if(e===void 0)return t;if(t===void 0)return e;let n=typeof t;switch(typeof e){case`string`:switch(n){case`string`:return[t,e].filter(Boolean).join(` `);case`object`:return Zt({className:e,style:t});case`function`:return(n,...r)=>Zt({className:e})(t(n,...r))}break;case`object`:switch(n){case`string`:return Zt({className:t,style:e});case`object`:return{...t,...e};case`function`:return(n,...r)=>Zt({style:e})(t(n,...r))}break;case`function`:switch(n){case`string`:return(n,...r)=>e(Zt(n)({className:t}),...r);case`object`:return(n,...r)=>e(Zt(n)({style:t}),...r);case`function`:return(n,...r)=>e(t(n,...r),...r)}}})(e[r],t[r]),n),{})},$t=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);let r=t.map(t=>e[t]).filter(Boolean).reduce((e,t)=>(typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):typeof t==`object`?e.style={...e.style,...t}:typeof t==`function`&&(e={...e,...t(e,...n)}),e),{className:``,style:{}});return r.className||delete r.className,Object.keys(r.style).length===0&&delete r.style,r},en=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?Xt(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t),{}),tn=Kt((e,t={},n={},...r)=>{let{defaultBase16:i=Jt,base16Themes:a=null}=t,o=rn(n,a);o&&(n={...o,...n});let s=Yt.reduce((e,t)=>(e[t]=n[t]||i[t],e),{}),c=Qt(Object.keys(n).reduce((e,t)=>(Yt.indexOf(t)===-1&&(e[t]=n[t]),e),{}),e(s));return Kt($t,2)(c,...r)},3),nn=e=>!!e.extend,rn=(e,t)=>{if(e&&nn(e)&&e.extend&&(e=e.extend),typeof e==`string`){let[n,r]=e.split(`:`);e=t?t[n]:qt[n],r===`inverted`&&(e=en(e))}return e&&Object.prototype.hasOwnProperty.call(e,`base00`)?e:void 0};var an=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02,bigNumber:e.base09},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:M.globalFontFamily,cursor:M.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:M.braceCursor,fontWeight:M.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:M.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:o({paddingTop:M.keyValPaddingTop,paddingRight:M.keyValPaddingRight,paddingBottom:M.keyValPaddingBottom,borderLeft:M.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:M.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:M.keyValPadding},"pushed-content":{marginLeft:M.pushedContentMarginLeft},variableValue:function(e,t){return{style:o({display:`inline-block`,paddingRight:M.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:M.objectSizeBorderRadius,fontStyle:M.objectSizeFontStyle,margin:M.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:M.dataTypeFontSize,marginRight:M.dataTypeMarginRight,opacity:M.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:M.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},bigNumber:{display:`inline-block`,color:t.dataTypes.bigNumber},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:M.nanFontSize,fontWeight:M.nanFontWeight,backgroundColor:t.dataTypes.background,padding:M.nanPadding,borderRadius:M.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:M.undefinedFontSize,padding:M.undefinedPadding,borderRadius:M.undefinedBorderRadius,backgroundColor:t.dataTypes.background},circularReference:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:M.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:M.iconFontSize,marginRight:M.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:M.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:M.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:M.metaDataPadding},"icon-container":{display:`inline-block`,width:M.iconContainerWidth},tooltip:{padding:M.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.checkIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.cancelIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:M.editInputMinWidth,borderRadius:M.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:M.editInputPadding,marginRight:M.editInputMarginRight,fontFamily:M.editInputFontFamily},"detected-row":{paddingTop:M.detectedRowPaddingTop},"key-modal-request":{position:M.addKeyCoverPosition,top:M.addKeyCoverPositionPx,left:M.addKeyCoverPositionPx,right:M.addKeyCoverPositionPx,bottom:M.addKeyCoverPositionPx,backgroundColor:M.addKeyCoverBackground},"key-modal":{width:M.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:M.addKeyModalMargin,marginRight:M.addKeyModalMargin,padding:M.addKeyModalPadding,borderRadius:M.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:`2px`,marginBottom:`5px`,fontSize:`11px`},"key-modal-input-container":{overflow:`hidden`},"key-modal-input":{width:`100%`,padding:`3px 6px`,fontFamily:`monospace`,color:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:M.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},comma:{display:`inline-block`,color:M.commaColor,fontSize:M.commaFontSize,marginRight:M.commaMarginRight,cursor:`default`}}},on=function(e){var t=A;return!1!==e&&e!==`none`||(t=j),tn(an,{defaultBase16:t})(e)};function K(e,t,n){return e||console.error(`theme has not been set`),on(e)(t,n)}var sn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.typeName,n=e.displayDataTypes,r=e.theme;return n?_().createElement(`span`,Object.assign({className:`data-type-label`},K(r,`data-type-label`)),t):null}}])}(_().PureComponent),cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`boolean`),_().createElement(sn,Object.assign({typeName:`bool`},e)),e.value?`true`:`false`)}}])}(_().PureComponent),ln=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`date`),_().createElement(sn,Object.assign({typeName:`date`},e)),_().createElement(`span`,Object.assign({className:`date-value`},K(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}])}(_().PureComponent),un=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`float`),_().createElement(sn,Object.assign({typeName:`float`},e)),this.props.value)}}])}(_().PureComponent),dn=r(784),fn=function(){return l(function e(){s(this,e),this.handler=function(){}},[{key:`register`,value:function(e){this.handler=e}},{key:`dispatch`,value:function(e){var t;(t=this.handler)==null||t.call(this,e)}}])}();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new fn);let pn=globalThis.__globalDispatcherInstance;var mn=`updated_src`,hn=new(function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]===void 0?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data[mn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=n.variable_removed;i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,E(i)),u=l,d=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
141
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(dn.EventEmitter));pn.register(hn.handleAction.bind(hn));let gn=hn;var _n=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,K(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,K(e.theme,`function`),_().createElement(sn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},K(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),vn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),yn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),bn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`integer`),_().createElement(sn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),xn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`regexp`),_().createElement(sn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),Sn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,K(r,`ellipsis`),` ...`)))),_().createElement(`div`,K(r,`string`),_().createElement(sn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),Cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),wn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`bigNumber`),_().createElement(sn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(null,arguments)}var En=g.useLayoutEffect,Dn=function(e,t){typeof e==`function`?e(t):e.current=t},On={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},kn=function(e){Object.keys(On).forEach(function(t){e.style.setProperty(t,On[t],`important`)})},An=null,jn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Mn=function(){},Nn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Pn=!!document.documentElement.currentStyle,Fn=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Nn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Pn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function In(e,t,n){var r,i,a=(r=n,i=_().useRef(r),En(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Ln=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Rn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Mn:a,s=e.onHeightChange,c=s===void 0?Mn:s,l=S(e,Ln),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&Dn(n.current,null),n.current=t,t&&Dn(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Fn(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),An||((An=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),An.setAttribute(`aria-hidden`,`true`),kn(An)),An.parentNode===null&&document.body.appendChild(An);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;An.style[t]=o[t]}),kn(An),An.value=t;var c=jn(An,e);An.value=t,c=jn(An,e),An.value=`x`;var l=An.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){In(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),In(window,`resize`,h),function(e){In(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,Tn({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function zn(e,t){e=e.trim();try{if((e=structuredClone(e))[0]===`[`)return Bn(`array`,JSON.parse(e));if(e[0]===`{`)return Bn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Bn(`bigNumber`,e):Bn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Bn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Bn(`bigNumber`,e):Bn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Bn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Bn(`undefined`,void 0);case`nan`:return Bn(`nan`,NaN);case`null`:return Bn(`null`,null);case`true`:return Bn(`boolean`,!0);case`false`:return Bn(`boolean`,!1);default:if(e=Date.parse(e))return Bn(`date`,new Date(e))}return Bn(!1,null)}function Bn(e,t){return{type:e,value:t}}var Vn=[`style`],Hn=[`style`],Un=[`style`],Wn=[`style`],Gn=[`style`],Kn=[`style`],qn=[`style`],Jn=[`style`],Yn=[`style`],Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Vn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7`})))}}])}(_().PureComponent),er=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Hn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}])}(_().PureComponent),tr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Un),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),nr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Wn),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),rr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Gn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),ir=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Kn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),ar=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}])}(_().PureComponent),or=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Jn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),sr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Yn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}])}(_().PureComponent),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}])}(_().PureComponent),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent);function dr(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var fr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(ar,Object.assign({className:`copy-icon`},K(e,`copy-icon`))),_().createElement(`span`,K(e,`copy-icon-copied`),`✔`)):_().createElement(ar,Object.assign({className:`copy-icon`},K(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=K(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let pr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(lr,Object.assign({className:`click-to-edit-icon`},K(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n}(e.value,n.props.bigNumber),r=zn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},K(i,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(Sn,Object.assign({value:e.value},i));case`integer`:return _().createElement(bn,Object.assign({value:e.value},i));case`float`:return _().createElement(un,Object.assign({value:e.value},i));case`boolean`:return _().createElement(cn,Object.assign({value:e.value},i));case`function`:return _().createElement(_n,Object.assign({value:e.value},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:e.value},i));case`regexp`:return _().createElement(xn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(wn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(Rn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=zn(t,n.props.bigNumber);n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},K(i,`edit-input`))),_().createElement(`div`,K(i,`edit-icon-container`),_().createElement(or,Object.assign({className:`edit-cancel`},K(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(ur,Object.assign({className:`edit-check string-value`},K(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),pn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,K(e,`detected-row`),t,_().createElement(ur,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},K(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(Sn,Object.assign({value:r},i));case`integer`:return _().createElement(bn,Object.assign({value:r},i));case`float`:return _().createElement(un,Object.assign({value:r},i));case`boolean`:return _().createElement(cn,Object.assign({value:r},i));case`function`:return _().createElement(_n,Object.assign({value:r},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(wn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},K(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},K(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,K(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},K(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},K(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,K(a,`comma`),`,`),l?_().createElement(fr,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var mr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},K(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(sr,Object.assign({className:`click-to-add-icon`},K(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?pn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):pn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},K(r,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},K(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(fr,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function hr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},K(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},K(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null)}function gr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(ir,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(tr,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement($n,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}))}}function _r(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(rr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(nr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(er,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var vr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],yr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(gr,{theme:n,iconStyle:r}):_().createElement(_r,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,vr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},K(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(mr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},K(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,K(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},K(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(Cr,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},K(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},K(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},K(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),br=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],xr=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){gn.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},K(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},K(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(mr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new Sr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`)if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(Cr,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=Cr;c&&r.value.length>c&&(g=yr),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(pr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`));var a=t?gr:_r;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},K(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},K(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`)))}},{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,br),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},K(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,K(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);xr.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:gn.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var Sr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(xr);let Cr=xr;var wr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=Cr;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=yr),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Tr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){pn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},K(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},K(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,K(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},K(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(ur,Object.assign({},K(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,K(n,`key-modal-cancel`),_().createElement(cr,Object.assign({},K(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){pn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Er=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,pn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Tr,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},K(r,`validation-failure`),{onClick:function(){pn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,K(r,`validation-failure-label`),t),_().createElement(cr,K(r,`validation-failure-clear`))):null}}])}(_().PureComponent),Or=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=gn.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(gn.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){gn.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)gn.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&gn.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)gn.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},K(i,`app-container`).style),l)},_().createElement(Dr,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(wr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Er,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);Or.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0},Or.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(Or);let kr=Or})(),i})())}))(),1),W3=U3.default.default||U3.default,G3=b.createContext(void 0);function K3(e){let t=b.useContext(G3);if(e===!1&&t===void 0)throw Error(rE(27));return t}var q3=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=D4.startingStyle]=`startingStyle`,e[e.endingStyle=D4.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),J3=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Y3={[J3.popupOpen]:``},X3={[J3.popupOpen]:``,[J3.pressed]:``},Z3={[q3.open]:``},Q3={[q3.closed]:``},$3={[q3.anchorHidden]:``},e6={open(e){return e?Y3:null}},t6={open(e){return e?X3:null}},n6={open(e){return e?Z3:Q3},anchorHidden(e){return e?$3:null}},r6={...n6,...A4},i6=b.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=K3(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return AE(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:r6,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),a6=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{store:s}=K3(),c=s.useState(`open`);function l(e){c&&s.setOpen(!1,p0(o0,e.nativeEvent))}let{getButtonProps:u,buttonRef:d}=sE({disabled:i,native:a});return AE(`button`,e,{state:{disabled:i},ref:[t,d],props:[{onClick:l},o,u]})}),o6=0,s6=class e{static create(){return new e}currentId=o6;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=o6,t()},e)}isStarted(){return this.currentId!==o6}clear=()=>{this.currentId!==o6&&(clearTimeout(this.currentId),this.currentId=o6)};disposeEffect=()=>this.clear};function c6(){let e=IT(s6.create).current;return S4(e.disposeEffect),e}function l6(e,t){return t!=null&&!q0(t)?0:typeof e==`function`?e():e}function u6(e,t,n){let r=l6(e,n);return typeof r==`number`?r:r?.[t]}function d6(e){return typeof e==`function`?e():e}function f6(e,t){return t||e===`click`||e===`mousedown`}function p6(e){let t=IT(m6,e).current;return t.next=e,$(t.effect),t}function m6(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var h6={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},g6={...h6,position:`fixed`,top:0,left:0},_6={...h6,position:`absolute`},v6=b.forwardRef(function(e,t){let[n,r]=b.useState();$(()=>{b0&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:g6,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function y6(e){return`data-base-ui-${e}`}var b6=0;function x6(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(b6);let a=()=>e?.focus({preventScroll:n});i?a():b6=requestAnimationFrame(a)}var S6={inert:new WeakMap,"aria-hidden":new WeakMap},C6=`data-base-ui-inert`,w6={inert:new WeakSet,"aria-hidden":new WeakSet},T6=new WeakMap,E6=0;function D6(e){return w6[e]}function O6(e){return e?_T(e)?e.host:O6(e.parentNode):null}var k6=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=O6(t);return e.contains(n)?n:null}).filter(e=>e!=null),A6=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},j6=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{dT(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function M6(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=k6(t,e),u=i?k6(t,a):[],d=new Set(u),f=i?j6(t,A6(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=S6[o],n=D6(o);c=n,s=e;let r=k6(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);j6(t,A6(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(T6.get(e)||0)+1;T6.set(e,t),m.push(e),t===1&&e.setAttribute(C6,``)}),E6+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(T6.get(e)||0)-1;T6.set(e,t),t||e.removeAttribute(C6)}),--E6,E6||(S6.inert=new WeakMap,S6[`aria-hidden`]=new WeakMap,w6.inert=new WeakSet,w6[`aria-hidden`]=new WeakSet,T6=new WeakMap)}}function N6(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=U1(e[0]).body;return M6(e,o,n,r,{mark:i,markerIgnoreElements:a})}var P6=b.createContext(null),F6=()=>b.useContext(P6),I6=y6(`portal`);function L6(e={}){let{ref:t,container:n,componentProps:r=wE,elementProps:i}=e,a=q1(),o=F6()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=zT(e=>{e!==null&&u(e)}),f=b.useRef(null);$(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(mT(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=AE(`div`,r,{ref:[t,d],props:[{id:a,[I6]:``},i]});return{portalNode:l,portalSubtree:s&&p?Lq.createPortal(p,s):null}}var R6=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=L6({container:r,ref:t,componentProps:e,elementProps:s}),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),g=m?.modal,_=m?.open,v=typeof o==`boolean`?o:!!m&&!m.modal&&m.open&&!!c;b.useEffect(()=>{if(!c||g)return;function e(e){c&&e.relatedTarget&&_4(e)&&(e.type===`focusin`?y4:v4)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,g]),b.useEffect(()=>{!c||_||y4(c)},[_,c]);let y=b.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:c,setFocusManagerState:h}),[c]);return(0,G.jsxs)(b.Fragment,{children:[l,(0,G.jsxs)(P6.Provider,{value:y,children:[v&&c&&(0,G.jsx)(v6,{"data-type":`outside`,ref:u,onFocus:e=>{_4(e,c)?f.current?.focus():p4(m?m.domReference:null)?.focus()}}),v&&c&&(0,G.jsx)(`span`,{"aria-owns":c.id,style:kE}),c&&Lq.createPortal(n,c),v&&c&&(0,G.jsx)(v6,{"data-type":`outside`,ref:d,onFocus:e=>{_4(e,c)?p.current?.focus():(f4(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,p0(`focus-out`,e.nativeEvent)))}})]})]})});function z6(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var B6=class{nodesRef={current:[]};events=z6();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},V6=b.createContext(null),H6=b.createContext(null),U6=()=>b.useContext(V6)?.id||null,W6=e=>{let t=b.useContext(H6);return e??t};function G6(e){let t=q1(),n=W6(e),r=U6();return $(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function K6(e){let{children:t,id:n}=e,r=U6();return(0,G.jsx)(V6.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function q6(e){let{children:t,externalTree:n}=e,r=IT(()=>n??new B6).current;return(0,G.jsx)(H6.Provider,{value:r,children:t})}function J6(e,t){let n=fT(e.target);return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Y6=20,X6=[];function Z6(){X6=X6.filter(e=>e.deref()?.isConnected)}function Q6(e){Z6(),e&&dT(e)!==`body`&&(X6.push(new WeakRef(e)),X6.length>Y6&&(X6=X6.slice(-Y6)))}function $6(){return Z6(),X6[X6.length-1]?.deref()}function e8(e){if(!e)return null;let t=u4();return l4(e,t)?e:s4(e,t)[0]||e}function t8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():N2(e)}function n8(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=u4(),r=c4(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return l4(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function r8(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=zT(()=>x.current.floatingContext?.nodeId),C=i===!1,w=z0(_)&&C,T=b.useRef([`content`]),E=p6(i),D=p6(a),O=p6(l),k=W6(p),A=F6(),j=b.useRef(!1),M=b.useRef(!1),N=b.useRef(!1),P=b.useRef(-1),F=b.useRef(``),I=b.useRef(``),L=b.useRef(null),R=b.useRef(null),z=uE(L,f,A?.beforeInsideRef),B=uE(R,A?.afterInsideRef),V=c6(),H=c6(),U=P4(),ee=A!=null,W=B0(v),te=zT((e=W)=>e?s4(e,u4()):[]),ne=zT(()=>m?.().filter(e=>e!=null)??[]),re=zT(e=>{let t=te(e);return T.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&N0(W,M0(U1(W)))&&te().length===0&&!w&&U0(e)}let t=U1(W);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,_,W,s,T,w,te,re]),b.useEffect(()=>{if(r||!g)return;let e=U1(W);function t(){N.current=!1}function n(e){let t=F0(e),n=ne();N.current=!(N0(v,t)||N0(_,t)||N0(A?.portalNode,t)||n.some(e=>e===t||N0(e,t))),I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0)}function i(){I.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,v,_,W,g,A,ne]),b.useEffect(()=>{if(r||!c)return;let e=U1(W);function t(){M.current=!0,H.start(0,()=>{M.current=!1})}function n(e){let t=F0(e),n=te().indexOf(t);n!==-1&&(P.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=F0(t);queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ne(),f=n?.hasAttribute(y6(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,F4(d),F4(u)].includes(n),p=!(N0(_,n)||N0(v,n)||N0(n,v)||N0(A?.portalNode,n)||l.some(e=>e===n||N0(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>N0(e,n))||f||k&&(V0(k.nodesRef.current,a).find(e=>N0(e.context?.elements.floating,n)||N0(e.context?.elements.domReference,n))||H0(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,B0(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&n8(W,T),o&&r!==_&&!t8(i)&&M0(e)===e.body){if(gT(W)&&(W.focus(),o===`popup`)){U.request(()=>{W.focus()});return}let e=P.current,t=te(),n=t[e]||t[t.length-1]||W;gT(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==$6())&&(j.current=!0,h.setOpen(!1,p0(s0,t)))})}function a(){N.current||(x.current.insideReactTree=!0,V.start(0,()=>{x.current.insideReactTree=!1}))}let l=gT(_)?_:null,f=[];if(!(!v&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),v&&(v.addEventListener(`focusin`,n),v.addEventListener(`focusout`,i),A&&(v.addEventListener(`focusout`,a,!0),f.push(()=>{v.removeEventListener(`focusout`,a,!0)})),f.push(()=>{v.removeEventListener(`focusin`,n),v.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,_,v,W,s,k,A,h,c,o,te,w,S,T,x,V,H,U,u,d,ne]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${y6(`portal`)}]`)||[]),t=(k?H0(k.nodesRef.current,S()):[]).find(e=>z0(e.context?.elements.domReference||null))?.context?.elements.domReference,n=N6([...[v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne()],t,F4(d),F4(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=N6([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,T,A,w,k,S,u,d,ne]),$(()=>{if(!g||r||!gT(W))return;let e=M0(U1(W));queueMicrotask(()=>{let t=re(W),n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||W:F4(r),i=i||t[0]||W,!N0(W,e)&&x6(i,{preventScroll:i===W})})},[r,g,W,C,re,E,O]),$(()=>{if(r||!W)return;let e=U1(W);Q6(M0(e));function t(e){if(e.open||(F.current=J6(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(G0(e.nativeEvent)||K0(e.nativeEvent))j.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,t);function n(){let e=D.current,t=typeof e==`function`?e(F.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||$6();return e&&e.isConnected?e:null}let n=_||$6();return F4(t)||n||null}return()=>{y.off(`openchange`,t);let r=M0(e),i=ne(),a=N0(v,r)||i.some(e=>e===r||N0(e,r))||k&&V0(k.nodesRef.current,S(),!1).some(e=>N0(e.context?.elements.floating,r)),o=n();queueMicrotask(()=>{let t=e8(o),n=typeof D.current!=`boolean`;D.current&&!j.current&&gT(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),j.current=!1})}},[r,v,W,D,x,y,k,_,S,ne]),$(()=>{if(!v0||g||!v)return;let e=M0(U1(v));!gT(e)||!R0(e)||N0(v,e)&&e.blur()},[g,v]),$(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),$(()=>{if(!(r||!W))return n8(W,T),()=>{queueMicrotask(Z6)}},[r,W,T]);let ie=!r&&(s?!w:!0)&&(ee||s);return(0,G.jsxs)(b.Fragment,{children:[ie&&(0,G.jsx)(v6,{"data-type":`inside`,ref:z,onFocus:e=>{if(s){let e=re();x6(e[e.length-1])}else A?.portalNode&&(j.current=!1,_4(e,A.portalNode)?f4(_)?.focus():F4(d??A.beforeOutsideRef)?.focus())}}),n,ie&&(0,G.jsx)(v6,{"data-type":`inside`,ref:B,onFocus:e=>{s?x6(re()[0]):A?.portalNode&&(c&&(j.current=!0),_4(e,A.portalNode)?p4(_)?.focus():F4(u??A.afterOutsideRef)?.focus())}})]})}function i8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=n0}=t,d=b.useRef(void 0),f=P4(),p=c6(),m=b.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||q0(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(R0(i.target)){let e=p0(u,i,i.target);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;f.request(()=>{let e=p0(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(q0(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||J0(f))),g=p0(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return b.useMemo(()=>i?{reference:m}:wE,[i,m])}var a8={intentional:`onClick`,sloppy:`onPointerDown`};function o8(){return!1}function s8(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function c8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=o8,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=W6(p),h=zT(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=zT(()=>l),y=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),{escapeKey:C,outsidePress:w}=s8(f),T=b.useRef(null),E=c6(),D=c6(),O=zT(()=>{D.clear(),a.current.insideReactTree=!1}),k=b.useRef(!1),A=b.useRef(``),j=zT(u),M=zT(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?V0(m.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=p0(c0,W0(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=zT(()=>{a.current.insideReactTree=!0,D.start(0,O)});b.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new s6,t=new s6;function c(){e.clear(),k.current=!0}function l(){e.start(DT()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){y.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&V0(m.nodesRef.current,t).some(t=>I0(e,t.context?.elements.floating));return I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||r}function b(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=F0(e),i=`[${y6(`inert`)}]`,o=Array.from(U1(n.select(`floatingElement`)).querySelectorAll(i)),s=hT(r)?r.getRootNode():null;_T(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>N0(e,r))))return;let l=hT(r)?r:null;for(;l&&!OT(l);){let e=jT(l);if(OT(e)||!hT(e))break;l=e}if(o.length&&hT(r)&&!L0(r)&&!N0(r,n.select(`floatingElement`))&&o.every(e=>!N0(l,e)))return;if(gT(r)&&!(`touches`in e)){let t=OT(r),n=kT(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?V0(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,p0(i0,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||b(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e){A.current=`touch`;let t=F0(e);function n(){j(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let t=F0(e);function n(){e.type===`pointerdown`?D(e):b(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!y.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),S.current=!0,O())}}}function I(e){if(f()!==`sloppy`||!T.current||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(b(e),E.clear(),T.current=null)}function L(e){let t=F0(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function R(e){f()!==`sloppy`||!T.current||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&b(e),E.clear(),T.current=null)}function z(e){let t=F0(e);function n(){R(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let B=U1(i);return s&&(B.addEventListener(`keydown`,M),B.addEventListener(`compositionstart`,c),B.addEventListener(`compositionend`,l)),_&&(B.addEventListener(`click`,P,!0),B.addEventListener(`pointerdown`,P,!0),B.addEventListener(`pointerup`,F,!0),B.addEventListener(`pointercancel`,F,!0),B.addEventListener(`mousedown`,P,!0),B.addEventListener(`mouseup`,F,!0),B.addEventListener(`touchstart`,N,!0),B.addEventListener(`touchmove`,L,!0),B.addEventListener(`touchend`,z,!0)),()=>{s&&(B.removeEventListener(`keydown`,M),B.removeEventListener(`compositionstart`,c),B.removeEventListener(`compositionend`,l)),_&&(B.removeEventListener(`click`,P,!0),B.removeEventListener(`pointerdown`,P,!0),B.removeEventListener(`pointerup`,F,!0),B.removeEventListener(`pointercancel`,F,!0),B.removeEventListener(`mousedown`,P,!0),B.removeEventListener(`mouseup`,F,!0),B.removeEventListener(`touchstart`,N,!0),B.removeEventListener(`touchmove`,L,!0),B.removeEventListener(`touchend`,z,!0)),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,_,g,r,o,C,w,M,O,v,m,n,E]),b.useEffect(O,[g,O]);let P=b.useMemo(()=>({onKeyDown:M,[a8[d]]:e=>{j()&&n.setOpen(!1,p0(n0,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,p0(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=zT(e=>{if(!r||!o||e.button!==0)return;let t=F0(e.nativeEvent);N0(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,x.current=!1))}),I=zT(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(x.current=!0)}),L=b.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return b.useMemo(()=>o?{reference:P,floating:L,trigger:P}:{},[o,P,L])}function l8(e,t,n){let{reference:r,floating:i}=e,a=c2(t),o=l2(t),s=s2(o),c=i2(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(a2(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 u8(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}=r2(t,e),p=x2(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=S2(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=S2(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 d8=50,f8=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:u8},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=l8(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<d8&&(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}=l8(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},p8=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}=r2(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=i2(r),_=c2(o),v=i2(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[y2(o)]:d2(o)),x=p!==`none`;!d&&x&&b.push(...v2(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=u2(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`&&_!==c2(t))||T.every(e=>c2(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=c2(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 m8(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function h8(e){return Y0.some(t=>e[t]>=0)}var g8=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=r2(e,t);switch(i){case`referenceHidden`:{let e=m8(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:h8(e)}}}case`escaped`:{let e=m8(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:h8(e)}}}default:return{}}}}},_8=new Set([`left`,`top`]);async function v8(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=i2(n),s=a2(n),c=c2(n)===`y`,l=_8.has(o)?-1:1,u=a&&c?-1:1,d=r2(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 y8=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 v8(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}}}}},b8=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}=r2(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=c2(i2(i)),p=o2(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=n2(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=n2(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}}}}}},x8=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}=r2(e,t),u={x:n,y:r},d=c2(i),f=o2(d),p=u[f],m=u[d],h=r2(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=_8.has(i2(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}}}},S8=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}=r2(e,t),u=await o.detectOverflow(t,l),d=i2(i),f=a2(i),p=c2(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=X0(h-u[g],v),x=X0(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=Z0(u.left,0),t=Z0(u.right,0),n=Z0(u.top,0),r=Z0(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Z0(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Z0(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 C8(e){let t=kT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gT(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Q0(n)!==a||Q0(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function w8(e){return hT(e)?e:e.contextElement}function T8(e){let t=w8(e);if(!gT(t))return e2(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=C8(t),o=(a?Q0(n.width):n.width)/r,s=(a?Q0(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var E8=e2(0);function D8(e){let t=fT(e);return!DT()||!t.visualViewport?E8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fT(e)?!1:t}function k8(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=w8(e),o=e2(1);t&&(r?hT(r)&&(o=T8(r)):o=T8(e));let s=O8(a,n,r)?D8(a):e2(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=fT(a),t=r&&hT(r)?fT(r):r,n=e,i=PT(n);for(;i&&r&&t!==n;){let e=T8(i),t=i.getBoundingClientRect(),r=kT(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=fT(i),i=PT(n)}}return S2({width:u,height:d,x:c,y:l})}function A8(e,t){let n=AT(e).scrollLeft;return t?t.left+n:k8(pT(e)).left+n}function j8(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-A8(e,n),y:n.top+t.scrollTop}}function M8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pT(r),s=t?bT(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=e2(1),u=e2(0),d=gT(r);if((d||!d&&!a)&&((dT(r)!==`body`||vT(o))&&(c=AT(r)),d)){let e=k8(r);l=T8(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?j8(o,c):e2(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 N8(e){return Array.from(e.getClientRects())}function P8(e){let t=pT(e),n=AT(e),r=e.ownerDocument.body,i=Z0(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Z0(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+A8(e),s=-n.scrollTop;return kT(r).direction===`rtl`&&(o+=Z0(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var F8=25;function I8(e,t){let n=fT(e),r=pT(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=DT();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=A8(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<=F8&&(a-=o)}else l<=F8&&(a+=l);return{width:a,height:o,x:s,y:c}}function L8(e,t){let n=k8(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=gT(e)?T8(e):e2(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function R8(e,t,n){let r;if(t===`viewport`)r=I8(e,n);else if(t===`document`)r=P8(pT(e));else if(hT(t))r=L8(t,n);else{let n=D8(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S2(r)}function z8(e,t){let n=jT(e);return n===t||!hT(n)||OT(n)?!1:kT(n).position===`fixed`||z8(n,t)}function B8(e,t){let n=t.get(e);if(n)return n;let r=NT(e,[],!1).filter(e=>hT(e)&&dT(e)!==`body`),i=null,a=kT(e).position===`fixed`,o=a?jT(e):e;for(;hT(o)&&!OT(o);){let t=kT(o),n=TT(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||vT(o)&&!n&&z8(e,o))?r=r.filter(e=>e!==o):i=t,o=jT(o)}return t.set(e,r),r}function V8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bT(t)?[]:B8(t,this._c):[].concat(n),r],o=R8(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=R8(t,a[e],i);s=Z0(n.top,s),c=X0(n.right,c),l=X0(n.bottom,l),u=Z0(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function H8(e){let{width:t,height:n}=C8(e);return{width:t,height:n}}function U8(e,t,n){let r=gT(t),i=pT(t),a=n===`fixed`,o=k8(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=e2(0);function l(){c.x=A8(i)}if(r||!r&&!a)if((dT(t)!==`body`||vT(i))&&(s=AT(t)),r){let e=k8(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?j8(i,s):e2(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 W8(e){return kT(e).position===`static`}function G8(e,t){if(!gT(e)||kT(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pT(e)===n&&(n=n.ownerDocument.body),n}function K8(e,t){let n=fT(e);if(bT(e))return n;if(!gT(e)){let t=jT(e);for(;t&&!OT(t);){if(hT(t)&&!W8(t))return t;t=jT(t)}return n}let r=G8(e,t);for(;r&&yT(r)&&W8(r);)r=G8(r,t);return r&&OT(r)&&W8(r)&&!TT(r)?n:r||ET(e)||n}var q8=async function(e){let t=this.getOffsetParent||K8,n=this.getDimensions,r=await n(e.floating);return{reference:U8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function J8(e){return kT(e).direction===`rtl`}var Y8={convertOffsetParentRelativeRectToViewportRelativeRect:M8,getDocumentElement:pT,getClippingRect:V8,getOffsetParent:K8,getElementRects:q8,getClientRects:N8,getDimensions:H8,getScale:T8,isElement:hT,isRTL:J8};function X8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Z8(e,t){let n=null,r,i=pT(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=$0(d),h=$0(i.clientWidth-(u+f)),g=$0(i.clientHeight-(d+p)),_=$0(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Z0(0,X0(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&&!X8(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 Q8(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=w8(e),u=i||a?[...l?NT(l):[],...t?NT(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Z8(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?k8(e):null;c&&g();function g(){let t=k8(e);h&&!X8(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 $8=y8,e5=b8,t5=p8,n5=S8,r5=g8,i5=x8,a5=(e,t,n)=>{let r=new Map,i={platform:Y8,...n},a={...i.platform,_c:r};return f8(e,t,{...i,platform:a})},o5=typeof document<`u`?b.useLayoutEffect:function(){};function s5(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(!s5(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)&&!s5(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function c5(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l5(e,t){let n=c5(e);return Math.round(t*n)/n}function u5(e){let t=b.useRef(e);return o5(()=>{t.current=e}),t}function Zne(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]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);s5(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=u5(c),O=u5(i),k=u5(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),a5(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!s5(T.current,t)&&(T.current=t,Lq.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);o5(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);o5(()=>(j.current=!0,()=>{j.current=!1}),[]),o5(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=l5(N.floating,u.x),r=l5(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...c5(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Qne=(e,t)=>{let n=$8(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ne=(e,t)=>{let n=e5(e);return{name:n.name,fn:n.fn,options:[e,t]}},ere=(e,t)=>({fn:i5(e).fn,options:[e,t]}),tre=(e,t)=>{let n=t5(e);return{name:n.name,fn:n.fn,options:[e,t]}},nre=(e,t)=>{let n=n5(e);return{name:n.name,fn:n.fn,options:[e,t]}},rre=(e,t)=>{let n=r5(e);return{name:n.name,fn:n.fn,options:[e,t]}},d5=Symbol(`NOT_FOUND`);function ire(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function are(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function ore(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var f5=e=>Array.isArray(e)?e:[e];function sre(e){let t=Array.isArray(e[0])?e[0]:e;return ore(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function cre(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function lre(e){let t;return{get(n){return t&&e(t.key,n)?t.value:d5},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function ure(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return d5}function i(t,i){r(t)===d5&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var dre=(e,t)=>e===t;function fre(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function pre(e,t){let{equalityCheck:n=dre,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=fre(n),o=0,s=r<=1?lre(a):ure(r,a);function c(){let t=s.get(arguments);if(t===d5){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var mre=class{constructor(e){this.value=e}deref(){return this.value}},hre=typeof WeakRef<`u`?WeakRef:mre,gre=0,p5=1;function m5(){return{s:gre,v:void 0,o:null,p:null}}function h5(e,t={}){let n=m5(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=m5(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=m5(),e.set(n,t)):t=r}}let s=t,c;if(t.s===p5)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new hre(c):c}return s.s=p5,s.v=c,c}return o.clearCache=()=>{n=m5(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function g5(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ire(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=h5,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=f5(c),p=f5(u),m=sre(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=cre(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var _re=g5(h5),vre=Object.assign((e,t=_re)=>{are(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>vre});g5({memoize:pre,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var _5=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(rE(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},yre=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),v5=s(((e,t)=>{t.exports=yre()})),bre=s((e=>{var t=p(),n=v5();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),xre=s(((e,t)=>{t.exports=bre()})),Sre=[],Cre=void 0;function wre(){return Cre}function Tre(e){Sre.push(e)}var y5=v5(),Ere=xre(),Dre=_E(19)?kre:Are;function b5(e,t,n,r,i){return Dre(e,t,n,r,i)}function Ore(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,y5.useSyncExternalStore)(e.subscribe,a,a)}Tre({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,y5.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function kre(e,t,n,r,i){let a=wre();if(!a)return Ore(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Are(e,t,n,r,i){return(0,Ere.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var x5=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return b5(this,e,t,n,r)}},S5=class extends x5{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),$(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;$(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=t!==void 0;$(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),b5(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=zT(t??SE);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jre={open:_5(e=>e.open),domReferenceElement:_5(e=>e.domReferenceElement),referenceElement:_5(e=>e.positionReference??e.referenceElement),floatingElement:_5(e=>e.floatingElement),floatingId:_5(e=>e.floatingId)},C5=class extends S5{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:z6(),nested:t,noEmit:n,triggerElements:i},jre)}setOpen=(e,t)=>{if((!e||!this.state.open||J0(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function Mre(e,t){let n=b.useRef(null),r=b.useRef(null);return b.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Nre(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Mre(e,n),o=zT(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return $(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function w5(e){let t=e.useState(`open`);$(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function T5(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=R4(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=zT(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return L4({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var E5=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Pre(){return new C5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new E5,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function D5(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:Pre(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:wE,inactiveTriggerProps:wE,popupProps:wE}}var O5=_5(e=>e.triggerIdProp??e.activeTriggerId),k5={open:_5(e=>e.openProp??e.open),mounted:_5(e=>e.mounted),transitionStatus:_5(e=>e.transitionStatus),floatingRootContext:_5(e=>e.floatingRootContext),preventUnmountingOnClose:_5(e=>e.preventUnmountingOnClose),payload:_5(e=>e.payload),activeTriggerId:O5,activeTriggerElement:_5(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:_5((e,t)=>t!==void 0&&O5(e)===t),isOpenedByTrigger:_5((e,t)=>t!==void 0&&O5(e)===t&&e.open),isMountedByTrigger:_5((e,t)=>t!==void 0&&O5(e)===t&&e.mounted),triggerProps:_5((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:_5(e=>e.popupProps),popupElement:_5(e=>e.popupElement),positionerElement:_5(e=>e.positionerElement)};function A5(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=q1(),a=U6()!=null,o=IT(()=>new C5({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new E5,floatingId:i,nested:a,noEmit:!1})).current;return $(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=hT(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function Fre(e={}){let{nodeId:t,externalTree:n}=e,r=A5(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=b.useState(null),c=b.useRef(null),l=W6(n);$(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=Zne({...e,elements:{...a,...o&&{reference:o}}}),d=b.useCallback(e=>{let t=hT(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,hT(f)?f:null),i.useSyncedValue(`floatingElement`,m);let g=b.useCallback(e=>{(hT(e)||e===null)&&(c.current=e,p(e)),(hT(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!hT(e))&&u.refs.setReference(e)},[u.refs,p]),_=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),v=b.useMemo(()=>({...u.refs,setReference:g,setFloating:_,setPositionReference:d,domReference:c}),[u.refs,g,_,d]),y=b.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=b.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:v,elements:y,nodeId:t,rootStore:i}),[u,v,y,t,i,x,S]);return $(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),b.useMemo(()=>({...u,context:C,refs:v,elements:y,rootStore:i}),[u,v,y,C,i])}function j5(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=q1(),o=U6()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=IT(()=>new C5({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return $(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};hT(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var Ire=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${D0}`;function Lre(e){return e?!!e.closest(Ire):!1}var Rre=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new s6,this.restTimeout=new s6,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function M5(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function zre(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;M5(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function N5(e){let t=IT(Rre.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,S4(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Bre(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=N5(n),u=W6(),d=U6(),f=zT(()=>f6(o.current.openEvent?.type,l.interactedInside)),p=zT(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),m=zT(e=>P0(e,n.context.triggerElements)),h=b.useCallback(e=>{let t=u6(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,p0(r0,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),g=zT(()=>{M5(l)}),_=zT(e=>{let t=F0(e);if(!Lre(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});$(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,g())},[r,l,g]),b.useEffect(()=>g,[g]),$(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&hT(a)&&i){let e=a,t=i,n=U1(i),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),zre(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[s,r,a,i,l,p,u,d,g]);let v=c6();b.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),v.clear(),u?.events.off(`floating.closed`,r),g()}function t(e){if(u&&d&&V0(u.nodesRef.current,d).length>0){u.events.on(`floating.closed`,r);return}if(!m(e.relatedTarget)){if(l.handler){l.handler(e);return}g(),f()||h(e)}}function r(e){!u||!d||V0(u.nodesRef.current,d).length>0||v.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,p0(r0,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,_,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,_,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,f,m,h,g,_,l,u,d,v])}var Vre={current:null};function Hre(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=Vre,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=W6(f),g=N5(n),_=p6(s),v=p6(o),y=p6(l),x=p6(a);p&&(g.handleCloseOptions=_.current?.__options);let S=zT(()=>f6(r.current.openEvent?.type,g.interactedInside)),C=zT(e=>P0(e,n.context.triggerElements)),w=zT((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!N0(e,t);if(!hT(r))return!1;let a=r;return i.hasMatchingElement(e=>N0(e,a))&&(!e||!N0(e,a))}),T=b.useCallback((e,t=!0)=>{let r=u6(v.current,`close`,g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,p0(r0,e)),h?.events.emit(`floating.closed`,e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,p0(r0,e)),h?.events.emit(`floating.closed`,e))},[v,n,g,h]),E=zT(()=>{g.handler&&=(U1(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,g.handler),void 0)});b.useEffect(()=>E,[E]);let D=zT(()=>{M5(g)});return b.useEffect(()=>{if(!a)return;function e(e){e.open||(E(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g,E]),b.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!hT(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!q0(g.pointerType)||d6(y.current)>0&&!u6(v.current,`open`))return;let t=u6(v.current,`open`,g.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:w(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,p0(r0,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,p0(r0,e,r))}):s&&n.setOpen(!0,p0(r0,e,r))}function i(e){if(S()){D();return}E();let t=U1(n.select(`domReferenceElement`));g.restTimeout.clear(),g.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!C(e.relatedTarget)){if(_.current&&i){n.select(`open`)||g.openChangeTimeout.clear();let r=d.current;g.handler=_.current({...i,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),E(),x.current&&!S()&&r===n.select(`domReferenceElement`)&&T(e,!0)}}),t.addEventListener(`mousemove`,g.handler),g.handler(e);return}(g.pointerType!==`touch`||!N0(n.select(`floatingElement`),e.relatedTarget))&&T(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[E,D,r,v,T,n,a,_,g,p,w,S,C,c,u,y,d,h,x,m]),b.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=w(i,r,e.target);if(c&&!q0(g.pointerType))return;let s=d6(y.current);if(a&&!o||s===0||!o&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,S())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||o)&&n.setOpen(!0,p0(r0,t,r))}g.pointerType===`touch`?Lq.flushSync(()=>{l()}):o&&a?l():(g.restTimeoutPending=!0,g.restTimeout.start(s,l))}}},[a,g,S,w,c,n,y])}function P5(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=b.useCallback(t=>F5(t,e,`reference`),t),o=b.useCallback(t=>F5(t,e,`floating`),n),s=b.useCallback(t=>F5(t,e,`item`),r),c=b.useCallback(t=>F5(t,e,`trigger`),i);return b.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function F5(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[E0]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&I5(a,s,i,r)}return I5(a,e,i,r),a}function I5(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Ure=`Escape`;function L5(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function R5(e,t){return L5(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function z5(e,t,n){return L5(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Wre(e,t,n){return L5(t,n?e===O0:e===k0,e===j0)}function Gre(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Ure:L5(t,n?e===k0:e===O0,e===A0)}function Kre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=p6(B0(i)),k=U6(),A=W6(D);$(()=>{o.current.orientation=S},[o,S]);let j=z0(a),M=b.useRef(_),N=b.useRef(d??-1),P=b.useRef(null),F=b.useRef(!0),I=zT(e=>{l(N.current===-1?null:N.current,e)}),L=b.useRef(I),R=b.useRef(!!i),z=b.useRef(r),B=b.useRef(!1),V=b.useRef(!1),H=p6(x),U=p6(r),ee=p6(d),W=p6(E),te=zT(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):x6(e,{sync:B.current,preventScroll:!0})}let t=s.current[N.current],n=V.current;t&&e(t),(B.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),re&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});$(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(V.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),$(()=>{if(u){if(!r){B.current=!1;return}if(i)if(c==null){if(B.current=!1,ee.current!=null)return;if(R.current&&(N.current=-1,te()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||z5(P.current,S,h)||m?T2(s):E2(s),P.current=null,I())};t()}}else w2(s,c)||(N.current=c,te(),V.current=!1)}},[u,r,i,c,ee,m,s,S,h,I,te,H]),$(()=>{if(!u||i||!A||g||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=M0(U1(i)),r=e.some(e=>e.context&&N0(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),$(()=>{L.current=I,z.current=r,R.current=!!i}),$(()=>{r||(P.current=null,M.current=_)},[r,_]);let ne=c!=null,re=b.useMemo(()=>{function e(e){if(!U.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,V.current=!1,v&&e(t)},onPointerLeave(e){if(!U.current||!F.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&W.current&&(x6(null,{sync:!0}),N.current=-1,I(e),!g)){let e=O.current,t=M0(U1(e));e&&N0(e,t)&&e.focus({preventScroll:!0})}}}},[U,O,v,s,I,W,g]),ie=b.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),ae=zT(e=>{if(F.current=!1,B.current=!0,e.which===229||!U.current&&e.currentTarget===O.current)return;if(m&&Gre(e.key,S,h,w)){R5(e.key,ie())||U0(e),n.setOpen(!1,p0(l0,e.nativeEvent)),gT(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=T2(s,x),o=E2(s,x);if(j||(e.key===`Home`&&(U0(e),N.current=i,I(e)),e.key===`End`&&(U0(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=k2(t,w,!1),r=n.findIndex(e=>e!=null&&!M2(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!M2(s,t,x)?n:e,-1),c=n[O2({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:p,rtl:h,cols:w,disabledIndices:j2([...(typeof x==`function`?null:x)||s.current.map((e,t)=>M2(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:A2(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(R5(e.key,S)){if(U0(e),r&&!g&&M0(e.currentTarget.ownerDocument)===e.currentTarget){N.current=z5(e.key,S,h)?i:o,I(e);return}z5(e.key,S,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(B.current=!1,N.current=i):N.current=D2(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,D2(s,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(B.current=!1,N.current=o):N.current=D2(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,D2(s,{startingIndex:t,decrement:!0,disabledIndices:x})),w2(s,N.current)&&(N.current=-1),I(e)}}),oe=b.useMemo(()=>g&&r&&ne&&{"aria-activedescendant":`${T}-${c}`},[g,r,ne,T,c]),se=b.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:oe,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=F0(e.nativeEvent);if(t&&!N0(O.current,t))return;U0(e),n.setOpen(!1,p0(s0,e.nativeEvent)),gT(a)&&a.focus();return}ae(e)},onPointerMove(){F.current=!0}}),[oe,ae,O,S,j,n,r,g,a]),ce=b.useMemo(()=>{function e(e){_===`auto`&&G0(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&K0(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Wre(e.key,ie(),h),a=R5(e.key,S),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return ae(e);if(!(!t&&!y&&r)){if(o){let t=R5(e.key,ie());P.current=m&&t?null:e.key}if(m){i&&(U0(e),t?(N.current=T2(s,H.current),I(e)):n.setOpen(!0,p0(l0,e.nativeEvent,e.currentTarget)));return}a&&(ee.current!=null&&(N.current=ee.current),U0(e),!t&&y?n.setOpen(!0,p0(l0,e.nativeEvent,e.currentTarget)):ae(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ae,H,_,s,m,I,n,y,S,ie,h,ee,g]),le=b.useMemo(()=>({...oe,...ce}),[oe,ce]);return b.useMemo(()=>u?{reference:le,floating:se,item:re,trigger:ce}:{},[u,le,se,ce,re])}var qre=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function B5(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=q1(),l=a?.id||c,u=b.useMemo(()=>B0(o)?.id||i,[o,i]),d=qre.get(s)??s,f=U6()!=null,p=b.useMemo(()=>d===`tooltip`||s===`label`?wE:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=b.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function Jre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=c6(),m=b.useRef(``),h=b.useRef(f??s??-1),g=b.useRef(null);$(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),$(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=zT(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=zT(e=>{function t(e){let t=o?.current[e];return!t||N2(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(U0(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(U0(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=zT(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=N0(r,t),o=N0(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),x=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),S=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return b.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var V5=.1,Yre=V5*V5,H5=.5;function U5(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function W5(e,t,n,r,i,a,o,s,c,l){let u=!1;return U5(e,t,n,r,i,a)&&(u=!u),U5(e,t,i,a,o,s)&&(u=!u),U5(e,t,o,s,c,l)&&(u=!u),U5(e,t,c,l,n,r)&&(u=!u),u}function Xre(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function G5(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Zre(e={}){let{blockPointerEvents:t=!1}=e,n=new s6,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Yre;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=F0(r),g=r.type===`mouseleave`,_=N0(u,h),v=N0(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&hT(r.relatedTarget)&&N0(u,r.relatedTarget))return;function y(){return!!(s&&V0(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=G5(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=G5(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=G5(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=G5(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Xre(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?H5/2:H5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+H5+1,o=C||T?S.bottom-H5:S.top,s=C?T?S.bottom-H5:S.top:S.bottom-H5;M=W5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?H5/2:H5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-H5,o=C||T?S.top+H5:S.bottom,s=C?T?S.top+H5:S.bottom:S.top+H5;M=W5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?H5/2:H5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+H5+1,o=w||E?S.right-H5:S.left,s=w?E?S.right-H5:S.left:S.right-H5;M=W5(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?H5/2:H5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-H5,o=w||E?S.left+H5:S.right,s=w?E?S.left+H5:S.right:S.left+H5;M=W5(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var Qre=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),$re=function(e){return e[e.open=q3.open]=`open`,e[e.closed=q3.closed]=`closed`,e[e.startingStyle=q3.startingStyle]=`startingStyle`,e[e.endingStyle=q3.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),K5=b.createContext(void 0);function eie(){let e=b.useContext(K5);if(e===void 0)throw Error(rE(26));return e}var tie={...n6,...A4,nestedDialogOpen(e){return e?{[$re.nestedDialogOpen]:``}:null}},nie=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=K3(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);eie(),L4({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=AE(`div`,e,{state:{open:g,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){e3.has(e.key)&&e.stopPropagation()},style:{[Qre.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:tie});return(0,G.jsx)(r8,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:C})}),q5=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
141
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(dn.EventEmitter));pn.register(hn.handleAction.bind(hn));let gn=hn;var _n=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,K(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,K(e.theme,`function`),_().createElement(sn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},K(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),vn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),yn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),bn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`integer`),_().createElement(sn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),xn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`regexp`),_().createElement(sn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),Sn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){gn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:gn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,K(r,`ellipsis`),` ...`)))),_().createElement(`div`,K(r,`string`),_().createElement(sn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),Cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,K(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),wn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,K(e.theme,`bigNumber`),_().createElement(sn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(null,arguments)}var En=g.useLayoutEffect,Dn=function(e,t){typeof e==`function`?e(t):e.current=t},On={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},kn=function(e){Object.keys(On).forEach(function(t){e.style.setProperty(t,On[t],`important`)})},An=null,jn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Mn=function(){},Nn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Pn=!!document.documentElement.currentStyle,Fn=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Nn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Pn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function In(e,t,n){var r,i,a=(r=n,i=_().useRef(r),En(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Ln=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Rn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Mn:a,s=e.onHeightChange,c=s===void 0?Mn:s,l=S(e,Ln),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&Dn(n.current,null),n.current=t,t&&Dn(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Fn(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),An||((An=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),An.setAttribute(`aria-hidden`,`true`),kn(An)),An.parentNode===null&&document.body.appendChild(An);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;An.style[t]=o[t]}),kn(An),An.value=t;var c=jn(An,e);An.value=t,c=jn(An,e),An.value=`x`;var l=An.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){In(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),In(window,`resize`,h),function(e){In(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,Tn({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function zn(e,t){e=e.trim();try{if((e=structuredClone(e))[0]===`[`)return Bn(`array`,JSON.parse(e));if(e[0]===`{`)return Bn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Bn(`bigNumber`,e):Bn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Bn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Bn(`bigNumber`,e):Bn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Bn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Bn(`undefined`,void 0);case`nan`:return Bn(`nan`,NaN);case`null`:return Bn(`null`,null);case`true`:return Bn(`boolean`,!0);case`false`:return Bn(`boolean`,!1);default:if(e=Date.parse(e))return Bn(`date`,new Date(e))}return Bn(!1,null)}function Bn(e,t){return{type:e,value:t}}let Vn=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n};Reflect.getOwnPropertyDescriptor(Vn,`name`).writable||Reflect.defineProperty(Vn,`name`,{value:`default`,configurable:!0});var Hn=[`style`],Un=[`style`],Wn=[`style`],Gn=[`style`],Kn=[`style`],qn=[`style`],Jn=[`style`],Yn=[`style`],Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=[`style`],er=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Hn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7`})))}}])}(_().PureComponent),tr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Un);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}])}(_().PureComponent),nr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Wn),r=fr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),rr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Gn),r=fr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),ir=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Kn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},fr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),ar=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,qn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},fr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),or=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Jn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}])}(_().PureComponent),sr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Yn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}])}(_().PureComponent),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}])}(_().PureComponent),dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,$n);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},fr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent);function fr(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var pr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(or,Object.assign({className:`copy-icon`},K(e,`copy-icon`))),_().createElement(`span`,K(e,`copy-icon-copied`),`✔`)):_().createElement(or,Object.assign({className:`copy-icon`},K(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=K(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let mr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(ur,Object.assign({className:`click-to-edit-icon`},K(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=Vn(e.value,n.props.bigNumber),r=zn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(sr,Object.assign({className:`click-to-remove-icon`},K(i,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(Sn,Object.assign({value:e.value},i));case`integer`:return _().createElement(bn,Object.assign({value:e.value},i));case`float`:return _().createElement(un,Object.assign({value:e.value},i));case`boolean`:return _().createElement(cn,Object.assign({value:e.value},i));case`function`:return _().createElement(_n,Object.assign({value:e.value},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:e.value},i));case`regexp`:return _().createElement(xn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(wn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(Rn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=zn(t,n.props.bigNumber);n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},K(i,`edit-input`))),_().createElement(`div`,K(i,`edit-icon-container`),_().createElement(sr,Object.assign({className:`edit-cancel`},K(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(dr,Object.assign({className:`edit-check string-value`},K(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),pn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,K(e,`detected-row`),t,_().createElement(dr,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},K(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},K(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(Sn,Object.assign({value:r},i));case`integer`:return _().createElement(bn,Object.assign({value:r},i));case`float`:return _().createElement(un,Object.assign({value:r},i));case`boolean`:return _().createElement(cn,Object.assign({value:r},i));case`function`:return _().createElement(_n,Object.assign({value:r},i));case`null`:return _().createElement(yn,i);case`nan`:return _().createElement(vn,i);case`undefined`:return _().createElement(Cn,i);case`date`:return _().createElement(ln,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(wn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},K(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},K(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,K(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},K(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},K(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,K(a,`comma`),`,`),l?_().createElement(pr,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var hr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},K(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(cr,Object.assign({className:`click-to-add-icon`},K(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?pn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):pn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(sr,Object.assign({className:`click-to-remove-icon`},K(r,`removeVarIcon`),{onClick:function(){pn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},K(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(pr,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function gr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},K(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},K(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,K(i,`colon`),`:`)):_().createElement(`span`,null)}function _r(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(ar,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(nr,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement(er,Object.assign({},K(t,`expanded-icon`),{className:`expanded-icon`}))}}function vr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(ir,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(rr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(tr,Object.assign({},K(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var yr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],br=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(_r,{theme:n,iconStyle:r}):_().createElement(vr,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,yr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},K(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(gr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(hr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},K(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,K(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},K(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(wr,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},K(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},K(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},K(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),xr=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],Sr=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){gn.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},K(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},K(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(hr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new Cr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`)if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(wr,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=wr;c&&r.value.length>c&&(g=br),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(mr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`));var a=t?_r:vr;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},K(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},K(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(gr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,K(r,`brace`),e===`array`?`[`:`{`)))}},{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,xr),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},K(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},K(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,K(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);Sr.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:gn.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var Cr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(Sr);let wr=Sr;var Tr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=wr;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=br),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Er=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){pn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},K(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},K(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,K(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},K(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(dr,Object.assign({},K(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,K(n,`key-modal-cancel`),_().createElement(lr,Object.assign({},K(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){pn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Dr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=gn.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,pn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Er,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Or=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},K(r,`validation-failure`),{onClick:function(){pn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,K(r,`validation-failure-label`),t),_().createElement(lr,K(r,`validation-failure-clear`))):null}}])}(_().PureComponent),kr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=gn.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(gn.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){gn.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)gn.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&gn.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)gn.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},K(i,`app-container`).style),l)},_().createElement(Or,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(Tr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Dr,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);kr.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0},kr.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(kr);let Ar=kr})(),i})())}))(),1),W3=U3.default.default||U3.default,G3=b.createContext(void 0);function K3(e){let t=b.useContext(G3);if(e===!1&&t===void 0)throw Error(rE(27));return t}var q3=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=D4.startingStyle]=`startingStyle`,e[e.endingStyle=D4.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),J3=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Y3={[J3.popupOpen]:``},X3={[J3.popupOpen]:``,[J3.pressed]:``},Z3={[q3.open]:``},Q3={[q3.closed]:``},$3={[q3.anchorHidden]:``},e6={open(e){return e?Y3:null}},t6={open(e){return e?X3:null}},n6={open(e){return e?Z3:Q3},anchorHidden(e){return e?$3:null}},r6={...n6,...A4},i6=b.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=K3(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return AE(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:r6,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),a6=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{store:s}=K3(),c=s.useState(`open`);function l(e){c&&s.setOpen(!1,p0(o0,e.nativeEvent))}let{getButtonProps:u,buttonRef:d}=sE({disabled:i,native:a});return AE(`button`,e,{state:{disabled:i},ref:[t,d],props:[{onClick:l},o,u]})}),o6=0,s6=class e{static create(){return new e}currentId=o6;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=o6,t()},e)}isStarted(){return this.currentId!==o6}clear=()=>{this.currentId!==o6&&(clearTimeout(this.currentId),this.currentId=o6)};disposeEffect=()=>this.clear};function c6(){let e=IT(s6.create).current;return S4(e.disposeEffect),e}function l6(e,t){return t!=null&&!q0(t)?0:typeof e==`function`?e():e}function u6(e,t,n){let r=l6(e,n);return typeof r==`number`?r:r?.[t]}function d6(e){return typeof e==`function`?e():e}function f6(e,t){return t||e===`click`||e===`mousedown`}function p6(e){let t=IT(m6,e).current;return t.next=e,$(t.effect),t}function m6(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var h6={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},g6={...h6,position:`fixed`,top:0,left:0},_6={...h6,position:`absolute`},v6=b.forwardRef(function(e,t){let[n,r]=b.useState();$(()=>{b0&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:g6,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function y6(e){return`data-base-ui-${e}`}var b6=0;function x6(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(b6);let a=()=>e?.focus({preventScroll:n});i?a():b6=requestAnimationFrame(a)}var S6={inert:new WeakMap,"aria-hidden":new WeakMap},C6=`data-base-ui-inert`,w6={inert:new WeakSet,"aria-hidden":new WeakSet},T6=new WeakMap,E6=0;function D6(e){return w6[e]}function O6(e){return e?_T(e)?e.host:O6(e.parentNode):null}var k6=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=O6(t);return e.contains(n)?n:null}).filter(e=>e!=null),A6=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},j6=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{dT(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function M6(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=k6(t,e),u=i?k6(t,a):[],d=new Set(u),f=i?j6(t,A6(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=S6[o],n=D6(o);c=n,s=e;let r=k6(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);j6(t,A6(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(T6.get(e)||0)+1;T6.set(e,t),m.push(e),t===1&&e.setAttribute(C6,``)}),E6+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(T6.get(e)||0)-1;T6.set(e,t),t||e.removeAttribute(C6)}),--E6,E6||(S6.inert=new WeakMap,S6[`aria-hidden`]=new WeakMap,w6.inert=new WeakSet,w6[`aria-hidden`]=new WeakSet,T6=new WeakMap)}}function N6(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=U1(e[0]).body;return M6(e,o,n,r,{mark:i,markerIgnoreElements:a})}var P6=b.createContext(null),F6=()=>b.useContext(P6),I6=y6(`portal`);function L6(e={}){let{ref:t,container:n,componentProps:r=wE,elementProps:i}=e,a=q1(),o=F6()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=zT(e=>{e!==null&&u(e)}),f=b.useRef(null);$(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(mT(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=AE(`div`,r,{ref:[t,d],props:[{id:a,[I6]:``},i]});return{portalNode:l,portalSubtree:s&&p?Lq.createPortal(p,s):null}}var R6=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=L6({container:r,ref:t,componentProps:e,elementProps:s}),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),g=m?.modal,_=m?.open,v=typeof o==`boolean`?o:!!m&&!m.modal&&m.open&&!!c;b.useEffect(()=>{if(!c||g)return;function e(e){c&&e.relatedTarget&&_4(e)&&(e.type===`focusin`?y4:v4)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,g]),b.useEffect(()=>{!c||_||y4(c)},[_,c]);let y=b.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:c,setFocusManagerState:h}),[c]);return(0,G.jsxs)(b.Fragment,{children:[l,(0,G.jsxs)(P6.Provider,{value:y,children:[v&&c&&(0,G.jsx)(v6,{"data-type":`outside`,ref:u,onFocus:e=>{_4(e,c)?f.current?.focus():p4(m?m.domReference:null)?.focus()}}),v&&c&&(0,G.jsx)(`span`,{"aria-owns":c.id,style:kE}),c&&Lq.createPortal(n,c),v&&c&&(0,G.jsx)(v6,{"data-type":`outside`,ref:d,onFocus:e=>{_4(e,c)?p.current?.focus():(f4(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,p0(`focus-out`,e.nativeEvent)))}})]})]})});function z6(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var B6=class{nodesRef={current:[]};events=z6();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},V6=b.createContext(null),H6=b.createContext(null),U6=()=>b.useContext(V6)?.id||null,W6=e=>{let t=b.useContext(H6);return e??t};function G6(e){let t=q1(),n=W6(e),r=U6();return $(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function K6(e){let{children:t,id:n}=e,r=U6();return(0,G.jsx)(V6.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function q6(e){let{children:t,externalTree:n}=e,r=IT(()=>n??new B6).current;return(0,G.jsx)(H6.Provider,{value:r,children:t})}function J6(e,t){let n=fT(e.target);return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Y6=20,X6=[];function Z6(){X6=X6.filter(e=>e.deref()?.isConnected)}function Q6(e){Z6(),e&&dT(e)!==`body`&&(X6.push(new WeakRef(e)),X6.length>Y6&&(X6=X6.slice(-Y6)))}function $6(){return Z6(),X6[X6.length-1]?.deref()}function e8(e){if(!e)return null;let t=u4();return l4(e,t)?e:s4(e,t)[0]||e}function t8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():N2(e)}function n8(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=u4(),r=c4(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return l4(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function r8(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=zT(()=>x.current.floatingContext?.nodeId),C=i===!1,w=z0(_)&&C,T=b.useRef([`content`]),E=p6(i),D=p6(a),O=p6(l),k=W6(p),A=F6(),j=b.useRef(!1),M=b.useRef(!1),N=b.useRef(!1),P=b.useRef(-1),F=b.useRef(``),I=b.useRef(``),L=b.useRef(null),R=b.useRef(null),z=uE(L,f,A?.beforeInsideRef),B=uE(R,A?.afterInsideRef),V=c6(),H=c6(),U=P4(),ee=A!=null,W=B0(v),te=zT((e=W)=>e?s4(e,u4()):[]),ne=zT(()=>m?.().filter(e=>e!=null)??[]),re=zT(e=>{let t=te(e);return T.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&N0(W,M0(U1(W)))&&te().length===0&&!w&&U0(e)}let t=U1(W);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,_,W,s,T,w,te,re]),b.useEffect(()=>{if(r||!g)return;let e=U1(W);function t(){N.current=!1}function n(e){let t=F0(e),n=ne();N.current=!(N0(v,t)||N0(_,t)||N0(A?.portalNode,t)||n.some(e=>e===t||N0(e,t))),I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0)}function i(){I.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,v,_,W,g,A,ne]),b.useEffect(()=>{if(r||!c)return;let e=U1(W);function t(){M.current=!0,H.start(0,()=>{M.current=!1})}function n(e){let t=F0(e),n=te().indexOf(t);n!==-1&&(P.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=F0(t);queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ne(),f=n?.hasAttribute(y6(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,F4(d),F4(u)].includes(n),p=!(N0(_,n)||N0(v,n)||N0(n,v)||N0(A?.portalNode,n)||l.some(e=>e===n||N0(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>N0(e,n))||f||k&&(V0(k.nodesRef.current,a).find(e=>N0(e.context?.elements.floating,n)||N0(e.context?.elements.domReference,n))||H0(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,B0(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&W&&n8(W,T),o&&r!==_&&!t8(i)&&M0(e)===e.body){if(gT(W)&&(W.focus(),o===`popup`)){U.request(()=>{W.focus()});return}let e=P.current,t=te(),n=t[e]||t[t.length-1]||W;gT(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==$6())&&(j.current=!0,h.setOpen(!1,p0(s0,t)))})}function a(){N.current||(x.current.insideReactTree=!0,V.start(0,()=>{x.current.insideReactTree=!1}))}let l=gT(_)?_:null,f=[];if(!(!v&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),v&&(v.addEventListener(`focusin`,n),v.addEventListener(`focusout`,i),A&&(v.addEventListener(`focusout`,a,!0),f.push(()=>{v.removeEventListener(`focusout`,a,!0)})),f.push(()=>{v.removeEventListener(`focusin`,n),v.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,_,v,W,s,k,A,h,c,o,te,w,S,T,x,V,H,U,u,d,ne]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${y6(`portal`)}]`)||[]),t=(k?H0(k.nodesRef.current,S()):[]).find(e=>z0(e.context?.elements.domReference||null))?.context?.elements.domReference,n=N6([...[v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ne()],t,F4(d),F4(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=N6([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,T,A,w,k,S,u,d,ne]),$(()=>{if(!g||r||!gT(W))return;let e=M0(U1(W));queueMicrotask(()=>{let t=re(W),n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||W:F4(r),i=i||t[0]||W,!N0(W,e)&&x6(i,{preventScroll:i===W})})},[r,g,W,C,re,E,O]),$(()=>{if(r||!W)return;let e=U1(W);Q6(M0(e));function t(e){if(e.open||(F.current=J6(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(G0(e.nativeEvent)||K0(e.nativeEvent))j.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,t);function n(){let e=D.current,t=typeof e==`function`?e(F.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||$6();return e&&e.isConnected?e:null}let n=_||$6();return F4(t)||n||null}return()=>{y.off(`openchange`,t);let r=M0(e),i=ne(),a=N0(v,r)||i.some(e=>e===r||N0(e,r))||k&&V0(k.nodesRef.current,S(),!1).some(e=>N0(e.context?.elements.floating,r)),o=n();queueMicrotask(()=>{let t=e8(o),n=typeof D.current!=`boolean`;D.current&&!j.current&&gT(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),j.current=!1})}},[r,v,W,D,x,y,k,_,S,ne]),$(()=>{if(!v0||g||!v)return;let e=M0(U1(v));!gT(e)||!R0(e)||N0(v,e)&&e.blur()},[g,v]),$(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),$(()=>{if(!(r||!W))return n8(W,T),()=>{queueMicrotask(Z6)}},[r,W,T]);let ie=!r&&(s?!w:!0)&&(ee||s);return(0,G.jsxs)(b.Fragment,{children:[ie&&(0,G.jsx)(v6,{"data-type":`inside`,ref:z,onFocus:e=>{if(s){let e=re();x6(e[e.length-1])}else A?.portalNode&&(j.current=!1,_4(e,A.portalNode)?f4(_)?.focus():F4(d??A.beforeOutsideRef)?.focus())}}),n,ie&&(0,G.jsx)(v6,{"data-type":`inside`,ref:B,onFocus:e=>{s?x6(re()[0]):A?.portalNode&&(c&&(j.current=!0),_4(e,A.portalNode)?p4(_)?.focus():F4(u??A.afterOutsideRef)?.focus())}})]})}function i8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=n0}=t,d=b.useRef(void 0),f=P4(),p=c6(),m=b.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||q0(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(R0(i.target)){let e=p0(u,i,i.target);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;f.request(()=>{let e=p0(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(q0(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||J0(f))),g=p0(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return b.useMemo(()=>i?{reference:m}:wE,[i,m])}var a8={intentional:`onClick`,sloppy:`onPointerDown`};function o8(){return!1}function s8(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function c8(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=o8,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=W6(p),h=zT(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=zT(()=>l),y=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),{escapeKey:C,outsidePress:w}=s8(f),T=b.useRef(null),E=c6(),D=c6(),O=zT(()=>{D.clear(),a.current.insideReactTree=!1}),k=b.useRef(!1),A=b.useRef(``),j=zT(u),M=zT(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?V0(m.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=p0(c0,W0(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=zT(()=>{a.current.insideReactTree=!0,D.start(0,O)});b.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new s6,t=new s6;function c(){e.clear(),k.current=!0}function l(){e.start(DT()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){y.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&V0(m.nodesRef.current,t).some(t=>I0(e,t.context?.elements.floating));return I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||r}function b(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=F0(e),i=`[${y6(`inert`)}]`,o=Array.from(U1(n.select(`floatingElement`)).querySelectorAll(i)),s=hT(r)?r.getRootNode():null;_T(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>N0(e,r))))return;let l=hT(r)?r:null;for(;l&&!OT(l);){let e=jT(l);if(OT(e)||!hT(e))break;l=e}if(o.length&&hT(r)&&!L0(r)&&!N0(r,n.select(`floatingElement`))&&o.every(e=>!N0(l,e)))return;if(gT(r)&&!(`touches`in e)){let t=OT(r),n=kT(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?V0(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,p0(i0,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||b(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e){A.current=`touch`;let t=F0(e);function n(){j(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let t=F0(e);function n(){e.type===`pointerdown`?D(e):b(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!y.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),S.current=!0,O())}}}function I(e){if(f()!==`sloppy`||!T.current||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(b(e),E.clear(),T.current=null)}function L(e){let t=F0(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function R(e){f()!==`sloppy`||!T.current||I0(e,n.select(`floatingElement`))||I0(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&b(e),E.clear(),T.current=null)}function z(e){let t=F0(e);function n(){R(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let B=U1(i);return s&&(B.addEventListener(`keydown`,M),B.addEventListener(`compositionstart`,c),B.addEventListener(`compositionend`,l)),_&&(B.addEventListener(`click`,P,!0),B.addEventListener(`pointerdown`,P,!0),B.addEventListener(`pointerup`,F,!0),B.addEventListener(`pointercancel`,F,!0),B.addEventListener(`mousedown`,P,!0),B.addEventListener(`mouseup`,F,!0),B.addEventListener(`touchstart`,N,!0),B.addEventListener(`touchmove`,L,!0),B.addEventListener(`touchend`,z,!0)),()=>{s&&(B.removeEventListener(`keydown`,M),B.removeEventListener(`compositionstart`,c),B.removeEventListener(`compositionend`,l)),_&&(B.removeEventListener(`click`,P,!0),B.removeEventListener(`pointerdown`,P,!0),B.removeEventListener(`pointerup`,F,!0),B.removeEventListener(`pointercancel`,F,!0),B.removeEventListener(`mousedown`,P,!0),B.removeEventListener(`mouseup`,F,!0),B.removeEventListener(`touchstart`,N,!0),B.removeEventListener(`touchmove`,L,!0),B.removeEventListener(`touchend`,z,!0)),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,_,g,r,o,C,w,M,O,v,m,n,E]),b.useEffect(O,[g,O]);let P=b.useMemo(()=>({onKeyDown:M,[a8[d]]:e=>{j()&&n.setOpen(!1,p0(n0,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,p0(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=zT(e=>{if(!r||!o||e.button!==0)return;let t=F0(e.nativeEvent);N0(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,x.current=!1))}),I=zT(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(x.current=!0)}),L=b.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return b.useMemo(()=>o?{reference:P,floating:L,trigger:P}:{},[o,P,L])}function l8(e,t,n){let{reference:r,floating:i}=e,a=c2(t),o=l2(t),s=s2(o),c=i2(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(a2(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 u8(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}=r2(t,e),p=x2(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=S2(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=S2(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 d8=50,f8=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:u8},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=l8(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<d8&&(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}=l8(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},p8=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}=r2(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=i2(r),_=c2(o),v=i2(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[y2(o)]:d2(o)),x=p!==`none`;!d&&x&&b.push(...v2(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=u2(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`&&_!==c2(t))||T.every(e=>c2(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=c2(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 m8(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function h8(e){return Y0.some(t=>e[t]>=0)}var g8=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=r2(e,t);switch(i){case`referenceHidden`:{let e=m8(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:h8(e)}}}case`escaped`:{let e=m8(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:h8(e)}}}default:return{}}}}},_8=new Set([`left`,`top`]);async function v8(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=i2(n),s=a2(n),c=c2(n)===`y`,l=_8.has(o)?-1:1,u=a&&c?-1:1,d=r2(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 y8=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 v8(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}}}}},b8=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}=r2(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=c2(i2(i)),p=o2(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=n2(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=n2(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}}}}}},x8=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}=r2(e,t),u={x:n,y:r},d=c2(i),f=o2(d),p=u[f],m=u[d],h=r2(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=_8.has(i2(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}}}},S8=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}=r2(e,t),u=await o.detectOverflow(t,l),d=i2(i),f=a2(i),p=c2(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=X0(h-u[g],v),x=X0(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=Z0(u.left,0),t=Z0(u.right,0),n=Z0(u.top,0),r=Z0(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Z0(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Z0(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 C8(e){let t=kT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gT(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Q0(n)!==a||Q0(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function w8(e){return hT(e)?e:e.contextElement}function T8(e){let t=w8(e);if(!gT(t))return e2(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=C8(t),o=(a?Q0(n.width):n.width)/r,s=(a?Q0(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var E8=e2(0);function D8(e){let t=fT(e);return!DT()||!t.visualViewport?E8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fT(e)?!1:t}function k8(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=w8(e),o=e2(1);t&&(r?hT(r)&&(o=T8(r)):o=T8(e));let s=O8(a,n,r)?D8(a):e2(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=fT(a),t=r&&hT(r)?fT(r):r,n=e,i=PT(n);for(;i&&r&&t!==n;){let e=T8(i),t=i.getBoundingClientRect(),r=kT(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=fT(i),i=PT(n)}}return S2({width:u,height:d,x:c,y:l})}function A8(e,t){let n=AT(e).scrollLeft;return t?t.left+n:k8(pT(e)).left+n}function j8(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-A8(e,n),y:n.top+t.scrollTop}}function M8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pT(r),s=t?bT(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=e2(1),u=e2(0),d=gT(r);if((d||!d&&!a)&&((dT(r)!==`body`||vT(o))&&(c=AT(r)),d)){let e=k8(r);l=T8(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?j8(o,c):e2(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 N8(e){return Array.from(e.getClientRects())}function P8(e){let t=pT(e),n=AT(e),r=e.ownerDocument.body,i=Z0(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Z0(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+A8(e),s=-n.scrollTop;return kT(r).direction===`rtl`&&(o+=Z0(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var F8=25;function I8(e,t){let n=fT(e),r=pT(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=DT();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=A8(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<=F8&&(a-=o)}else l<=F8&&(a+=l);return{width:a,height:o,x:s,y:c}}function L8(e,t){let n=k8(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=gT(e)?T8(e):e2(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function R8(e,t,n){let r;if(t===`viewport`)r=I8(e,n);else if(t===`document`)r=P8(pT(e));else if(hT(t))r=L8(t,n);else{let n=D8(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S2(r)}function z8(e,t){let n=jT(e);return n===t||!hT(n)||OT(n)?!1:kT(n).position===`fixed`||z8(n,t)}function B8(e,t){let n=t.get(e);if(n)return n;let r=NT(e,[],!1).filter(e=>hT(e)&&dT(e)!==`body`),i=null,a=kT(e).position===`fixed`,o=a?jT(e):e;for(;hT(o)&&!OT(o);){let t=kT(o),n=TT(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||vT(o)&&!n&&z8(e,o))?r=r.filter(e=>e!==o):i=t,o=jT(o)}return t.set(e,r),r}function V8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bT(t)?[]:B8(t,this._c):[].concat(n),r],o=R8(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=R8(t,a[e],i);s=Z0(n.top,s),c=X0(n.right,c),l=X0(n.bottom,l),u=Z0(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function H8(e){let{width:t,height:n}=C8(e);return{width:t,height:n}}function U8(e,t,n){let r=gT(t),i=pT(t),a=n===`fixed`,o=k8(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=e2(0);function l(){c.x=A8(i)}if(r||!r&&!a)if((dT(t)!==`body`||vT(i))&&(s=AT(t)),r){let e=k8(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?j8(i,s):e2(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 W8(e){return kT(e).position===`static`}function G8(e,t){if(!gT(e)||kT(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pT(e)===n&&(n=n.ownerDocument.body),n}function K8(e,t){let n=fT(e);if(bT(e))return n;if(!gT(e)){let t=jT(e);for(;t&&!OT(t);){if(hT(t)&&!W8(t))return t;t=jT(t)}return n}let r=G8(e,t);for(;r&&yT(r)&&W8(r);)r=G8(r,t);return r&&OT(r)&&W8(r)&&!TT(r)?n:r||ET(e)||n}var q8=async function(e){let t=this.getOffsetParent||K8,n=this.getDimensions,r=await n(e.floating);return{reference:U8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function J8(e){return kT(e).direction===`rtl`}var Y8={convertOffsetParentRelativeRectToViewportRelativeRect:M8,getDocumentElement:pT,getClippingRect:V8,getOffsetParent:K8,getElementRects:q8,getClientRects:N8,getDimensions:H8,getScale:T8,isElement:hT,isRTL:J8};function X8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Z8(e,t){let n=null,r,i=pT(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=$0(d),h=$0(i.clientWidth-(u+f)),g=$0(i.clientHeight-(d+p)),_=$0(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Z0(0,X0(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&&!X8(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 Q8(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=w8(e),u=i||a?[...l?NT(l):[],...t?NT(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Z8(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?k8(e):null;c&&g();function g(){let t=k8(e);h&&!X8(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 $8=y8,e5=b8,t5=p8,n5=S8,r5=g8,i5=x8,a5=(e,t,n)=>{let r=new Map,i={platform:Y8,...n},a={...i.platform,_c:r};return f8(e,t,{...i,platform:a})},o5=typeof document<`u`?b.useLayoutEffect:function(){};function s5(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(!s5(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)&&!s5(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function c5(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l5(e,t){let n=c5(e);return Math.round(t*n)/n}function u5(e){let t=b.useRef(e);return o5(()=>{t.current=e}),t}function Zne(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]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);s5(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=u5(c),O=u5(i),k=u5(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),a5(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!s5(T.current,t)&&(T.current=t,Lq.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);o5(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);o5(()=>(j.current=!0,()=>{j.current=!1}),[]),o5(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=l5(N.floating,u.x),r=l5(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...c5(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Qne=(e,t)=>{let n=$8(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ne=(e,t)=>{let n=e5(e);return{name:n.name,fn:n.fn,options:[e,t]}},ere=(e,t)=>({fn:i5(e).fn,options:[e,t]}),tre=(e,t)=>{let n=t5(e);return{name:n.name,fn:n.fn,options:[e,t]}},nre=(e,t)=>{let n=n5(e);return{name:n.name,fn:n.fn,options:[e,t]}},rre=(e,t)=>{let n=r5(e);return{name:n.name,fn:n.fn,options:[e,t]}},d5=Symbol(`NOT_FOUND`);function ire(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function are(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function ore(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var f5=e=>Array.isArray(e)?e:[e];function sre(e){let t=Array.isArray(e[0])?e[0]:e;return ore(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function cre(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function lre(e){let t;return{get(n){return t&&e(t.key,n)?t.value:d5},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function ure(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return d5}function i(t,i){r(t)===d5&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var dre=(e,t)=>e===t;function fre(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function pre(e,t){let{equalityCheck:n=dre,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=fre(n),o=0,s=r<=1?lre(a):ure(r,a);function c(){let t=s.get(arguments);if(t===d5){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var mre=class{constructor(e){this.value=e}deref(){return this.value}},hre=typeof WeakRef<`u`?WeakRef:mre,gre=0,p5=1;function m5(){return{s:gre,v:void 0,o:null,p:null}}function h5(e,t={}){let n=m5(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=m5(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=m5(),e.set(n,t)):t=r}}let s=t,c;if(t.s===p5)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new hre(c):c}return s.s=p5,s.v=c,c}return o.clearCache=()=>{n=m5(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function g5(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ire(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=h5,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=f5(c),p=f5(u),m=sre(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=cre(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var _re=g5(h5),vre=Object.assign((e,t=_re)=>{are(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>vre});g5({memoize:pre,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var _5=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(rE(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},yre=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),v5=s(((e,t)=>{t.exports=yre()})),bre=s((e=>{var t=p(),n=v5();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),xre=s(((e,t)=>{t.exports=bre()})),Sre=[],Cre=void 0;function wre(){return Cre}function Tre(e){Sre.push(e)}var y5=v5(),Ere=xre(),Dre=_E(19)?kre:Are;function b5(e,t,n,r,i){return Dre(e,t,n,r,i)}function Ore(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,y5.useSyncExternalStore)(e.subscribe,a,a)}Tre({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,y5.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function kre(e,t,n,r,i){let a=wre();if(!a)return Ore(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Are(e,t,n,r,i){return(0,Ere.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var x5=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return b5(this,e,t,n,r)}},S5=class extends x5{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),$(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;$(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=t!==void 0;$(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),b5(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=zT(t??SE);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jre={open:_5(e=>e.open),domReferenceElement:_5(e=>e.domReferenceElement),referenceElement:_5(e=>e.positionReference??e.referenceElement),floatingElement:_5(e=>e.floatingElement),floatingId:_5(e=>e.floatingId)},C5=class extends S5{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:z6(),nested:t,noEmit:n,triggerElements:i},jre)}setOpen=(e,t)=>{if((!e||!this.state.open||J0(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function Mre(e,t){let n=b.useRef(null),r=b.useRef(null);return b.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Nre(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Mre(e,n),o=zT(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return $(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function w5(e){let t=e.useState(`open`);$(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function T5(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=R4(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=zT(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return L4({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var E5=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Pre(){return new C5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new E5,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function D5(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:Pre(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:wE,inactiveTriggerProps:wE,popupProps:wE}}var O5=_5(e=>e.triggerIdProp??e.activeTriggerId),k5={open:_5(e=>e.openProp??e.open),mounted:_5(e=>e.mounted),transitionStatus:_5(e=>e.transitionStatus),floatingRootContext:_5(e=>e.floatingRootContext),preventUnmountingOnClose:_5(e=>e.preventUnmountingOnClose),payload:_5(e=>e.payload),activeTriggerId:O5,activeTriggerElement:_5(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:_5((e,t)=>t!==void 0&&O5(e)===t),isOpenedByTrigger:_5((e,t)=>t!==void 0&&O5(e)===t&&e.open),isMountedByTrigger:_5((e,t)=>t!==void 0&&O5(e)===t&&e.mounted),triggerProps:_5((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:_5(e=>e.popupProps),popupElement:_5(e=>e.popupElement),positionerElement:_5(e=>e.positionerElement)};function A5(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=q1(),a=U6()!=null,o=IT(()=>new C5({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new E5,floatingId:i,nested:a,noEmit:!1})).current;return $(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=hT(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function Fre(e={}){let{nodeId:t,externalTree:n}=e,r=A5(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=b.useState(null),c=b.useRef(null),l=W6(n);$(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=Zne({...e,elements:{...a,...o&&{reference:o}}}),d=b.useCallback(e=>{let t=hT(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,hT(f)?f:null),i.useSyncedValue(`floatingElement`,m);let g=b.useCallback(e=>{(hT(e)||e===null)&&(c.current=e,p(e)),(hT(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!hT(e))&&u.refs.setReference(e)},[u.refs,p]),_=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),v=b.useMemo(()=>({...u.refs,setReference:g,setFloating:_,setPositionReference:d,domReference:c}),[u.refs,g,_,d]),y=b.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=b.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:v,elements:y,nodeId:t,rootStore:i}),[u,v,y,t,i,x,S]);return $(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),b.useMemo(()=>({...u,context:C,refs:v,elements:y,rootStore:i}),[u,v,y,C,i])}function j5(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=q1(),o=U6()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=IT(()=>new C5({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return $(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};hT(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var Ire=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${D0}`;function Lre(e){return e?!!e.closest(Ire):!1}var Rre=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new s6,this.restTimeout=new s6,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function M5(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function zre(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;M5(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function N5(e){let t=IT(Rre.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,S4(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Bre(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=N5(n),u=W6(),d=U6(),f=zT(()=>f6(o.current.openEvent?.type,l.interactedInside)),p=zT(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),m=zT(e=>P0(e,n.context.triggerElements)),h=b.useCallback(e=>{let t=u6(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,p0(r0,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),g=zT(()=>{M5(l)}),_=zT(e=>{let t=F0(e);if(!Lre(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});$(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,g())},[r,l,g]),b.useEffect(()=>g,[g]),$(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&hT(a)&&i){let e=a,t=i,n=U1(i),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),zre(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[s,r,a,i,l,p,u,d,g]);let v=c6();b.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),v.clear(),u?.events.off(`floating.closed`,r),g()}function t(e){if(u&&d&&V0(u.nodesRef.current,d).length>0){u.events.on(`floating.closed`,r);return}if(!m(e.relatedTarget)){if(l.handler){l.handler(e);return}g(),f()||h(e)}}function r(e){!u||!d||V0(u.nodesRef.current,d).length>0||v.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,p0(r0,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,_,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,_,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,f,m,h,g,_,l,u,d,v])}var Vre={current:null};function Hre(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=Vre,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=W6(f),g=N5(n),_=p6(s),v=p6(o),y=p6(l),x=p6(a);p&&(g.handleCloseOptions=_.current?.__options);let S=zT(()=>f6(r.current.openEvent?.type,g.interactedInside)),C=zT(e=>P0(e,n.context.triggerElements)),w=zT((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!N0(e,t);if(!hT(r))return!1;let a=r;return i.hasMatchingElement(e=>N0(e,a))&&(!e||!N0(e,a))}),T=b.useCallback((e,t=!0)=>{let r=u6(v.current,`close`,g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,p0(r0,e)),h?.events.emit(`floating.closed`,e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,p0(r0,e)),h?.events.emit(`floating.closed`,e))},[v,n,g,h]),E=zT(()=>{g.handler&&=(U1(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,g.handler),void 0)});b.useEffect(()=>E,[E]);let D=zT(()=>{M5(g)});return b.useEffect(()=>{if(!a)return;function e(e){e.open||(E(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g,E]),b.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!hT(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!q0(g.pointerType)||d6(y.current)>0&&!u6(v.current,`open`))return;let t=u6(v.current,`open`,g.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:w(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,p0(r0,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,p0(r0,e,r))}):s&&n.setOpen(!0,p0(r0,e,r))}function i(e){if(S()){D();return}E();let t=U1(n.select(`domReferenceElement`));g.restTimeout.clear(),g.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!C(e.relatedTarget)){if(_.current&&i){n.select(`open`)||g.openChangeTimeout.clear();let r=d.current;g.handler=_.current({...i,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),E(),x.current&&!S()&&r===n.select(`domReferenceElement`)&&T(e,!0)}}),t.addEventListener(`mousemove`,g.handler),g.handler(e);return}(g.pointerType!==`touch`||!N0(n.select(`floatingElement`),e.relatedTarget))&&T(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[E,D,r,v,T,n,a,_,g,p,w,S,C,c,u,y,d,h,x,m]),b.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=w(i,r,e.target);if(c&&!q0(g.pointerType))return;let s=d6(y.current);if(a&&!o||s===0||!o&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,S())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||o)&&n.setOpen(!0,p0(r0,t,r))}g.pointerType===`touch`?Lq.flushSync(()=>{l()}):o&&a?l():(g.restTimeoutPending=!0,g.restTimeout.start(s,l))}}},[a,g,S,w,c,n,y])}function P5(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=b.useCallback(t=>F5(t,e,`reference`),t),o=b.useCallback(t=>F5(t,e,`floating`),n),s=b.useCallback(t=>F5(t,e,`item`),r),c=b.useCallback(t=>F5(t,e,`trigger`),i);return b.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function F5(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[E0]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&I5(a,s,i,r)}return I5(a,e,i,r),a}function I5(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Ure=`Escape`;function L5(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function R5(e,t){return L5(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function z5(e,t,n){return L5(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Wre(e,t,n){return L5(t,n?e===O0:e===k0,e===j0)}function Gre(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Ure:L5(t,n?e===k0:e===O0,e===A0)}function Kre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=p6(B0(i)),k=U6(),A=W6(D);$(()=>{o.current.orientation=S},[o,S]);let j=z0(a),M=b.useRef(_),N=b.useRef(d??-1),P=b.useRef(null),F=b.useRef(!0),I=zT(e=>{l(N.current===-1?null:N.current,e)}),L=b.useRef(I),R=b.useRef(!!i),z=b.useRef(r),B=b.useRef(!1),V=b.useRef(!1),H=p6(x),U=p6(r),ee=p6(d),W=p6(E),te=zT(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):x6(e,{sync:B.current,preventScroll:!0})}let t=s.current[N.current],n=V.current;t&&e(t),(B.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),re&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});$(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(V.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),$(()=>{if(u){if(!r){B.current=!1;return}if(i)if(c==null){if(B.current=!1,ee.current!=null)return;if(R.current&&(N.current=-1,te()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||z5(P.current,S,h)||m?T2(s):E2(s),P.current=null,I())};t()}}else w2(s,c)||(N.current=c,te(),V.current=!1)}},[u,r,i,c,ee,m,s,S,h,I,te,H]),$(()=>{if(!u||i||!A||g||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=M0(U1(i)),r=e.some(e=>e.context&&N0(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),$(()=>{L.current=I,z.current=r,R.current=!!i}),$(()=>{r||(P.current=null,M.current=_)},[r,_]);let ne=c!=null,re=b.useMemo(()=>{function e(e){if(!U.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,V.current=!1,v&&e(t)},onPointerLeave(e){if(!U.current||!F.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&W.current&&(x6(null,{sync:!0}),N.current=-1,I(e),!g)){let e=O.current,t=M0(U1(e));e&&N0(e,t)&&e.focus({preventScroll:!0})}}}},[U,O,v,s,I,W,g]),ie=b.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),ae=zT(e=>{if(F.current=!1,B.current=!0,e.which===229||!U.current&&e.currentTarget===O.current)return;if(m&&Gre(e.key,S,h,w)){R5(e.key,ie())||U0(e),n.setOpen(!1,p0(l0,e.nativeEvent)),gT(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=T2(s,x),o=E2(s,x);if(j||(e.key===`Home`&&(U0(e),N.current=i,I(e)),e.key===`End`&&(U0(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=k2(t,w,!1),r=n.findIndex(e=>e!=null&&!M2(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!M2(s,t,x)?n:e,-1),c=n[O2({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:p,rtl:h,cols:w,disabledIndices:j2([...(typeof x==`function`?null:x)||s.current.map((e,t)=>M2(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:A2(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(R5(e.key,S)){if(U0(e),r&&!g&&M0(e.currentTarget.ownerDocument)===e.currentTarget){N.current=z5(e.key,S,h)?i:o,I(e);return}z5(e.key,S,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(B.current=!1,N.current=i):N.current=D2(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,D2(s,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(B.current=!1,N.current=o):N.current=D2(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,D2(s,{startingIndex:t,decrement:!0,disabledIndices:x})),w2(s,N.current)&&(N.current=-1),I(e)}}),oe=b.useMemo(()=>g&&r&&ne&&{"aria-activedescendant":`${T}-${c}`},[g,r,ne,T,c]),se=b.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:oe,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=F0(e.nativeEvent);if(t&&!N0(O.current,t))return;U0(e),n.setOpen(!1,p0(s0,e.nativeEvent)),gT(a)&&a.focus();return}ae(e)},onPointerMove(){F.current=!0}}),[oe,ae,O,S,j,n,r,g,a]),ce=b.useMemo(()=>{function e(e){_===`auto`&&G0(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&K0(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Wre(e.key,ie(),h),a=R5(e.key,S),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return ae(e);if(!(!t&&!y&&r)){if(o){let t=R5(e.key,ie());P.current=m&&t?null:e.key}if(m){i&&(U0(e),t?(N.current=T2(s,H.current),I(e)):n.setOpen(!0,p0(l0,e.nativeEvent,e.currentTarget)));return}a&&(ee.current!=null&&(N.current=ee.current),U0(e),!t&&y?n.setOpen(!0,p0(l0,e.nativeEvent,e.currentTarget)):ae(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ae,H,_,s,m,I,n,y,S,ie,h,ee,g]),le=b.useMemo(()=>({...oe,...ce}),[oe,ce]);return b.useMemo(()=>u?{reference:le,floating:se,item:re,trigger:ce}:{},[u,le,se,ce,re])}var qre=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function B5(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=q1(),l=a?.id||c,u=b.useMemo(()=>B0(o)?.id||i,[o,i]),d=qre.get(s)??s,f=U6()!=null,p=b.useMemo(()=>d===`tooltip`||s===`label`?wE:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=b.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function Jre(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=c6(),m=b.useRef(``),h=b.useRef(f??s??-1),g=b.useRef(null);$(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),$(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=zT(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=zT(e=>{function t(e){let t=o?.current[e];return!t||N2(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(U0(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(U0(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=zT(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=N0(r,t),o=N0(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),x=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),S=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return b.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var V5=.1,Yre=V5*V5,H5=.5;function U5(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function W5(e,t,n,r,i,a,o,s,c,l){let u=!1;return U5(e,t,n,r,i,a)&&(u=!u),U5(e,t,i,a,o,s)&&(u=!u),U5(e,t,o,s,c,l)&&(u=!u),U5(e,t,c,l,n,r)&&(u=!u),u}function Xre(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function G5(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Zre(e={}){let{blockPointerEvents:t=!1}=e,n=new s6,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Yre;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=F0(r),g=r.type===`mouseleave`,_=N0(u,h),v=N0(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&hT(r.relatedTarget)&&N0(u,r.relatedTarget))return;function y(){return!!(s&&V0(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=G5(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=G5(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=G5(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=G5(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Xre(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?H5/2:H5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+H5+1,o=C||T?S.bottom-H5:S.top,s=C?T?S.bottom-H5:S.top:S.bottom-H5;M=W5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?H5/2:H5*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-H5,o=C||T?S.top+H5:S.bottom,s=C?T?S.top+H5:S.bottom:S.top+H5;M=W5(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?H5/2:H5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+H5+1,o=w||E?S.right-H5:S.left,s=w?E?S.right-H5:S.left:S.right-H5;M=W5(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?H5/2:H5*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-H5,o=w||E?S.left+H5:S.right,s=w?E?S.left+H5:S.right:S.left+H5;M=W5(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var Qre=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),$re=function(e){return e[e.open=q3.open]=`open`,e[e.closed=q3.closed]=`closed`,e[e.startingStyle=q3.startingStyle]=`startingStyle`,e[e.endingStyle=q3.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),K5=b.createContext(void 0);function eie(){let e=b.useContext(K5);if(e===void 0)throw Error(rE(26));return e}var tie={...n6,...A4,nestedDialogOpen(e){return e?{[$re.nestedDialogOpen]:``}:null}},nie=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=K3(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);eie(),L4({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=AE(`div`,e,{state:{open:g,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){e3.has(e.key)&&e.stopPropagation()},style:{[Qre.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:tie});return(0,G.jsx)(r8,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:C})}),q5=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
142
142
  0% 0%,
143
143
  100% 0%,
144
144
  100% 100%,
@@ -149,7 +149,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
149
149
  ${e.right}px ${e.bottom}px,
150
150
  ${e.right}px ${e.top}px,
151
151
  ${e.left}px ${e.top}px
152
- )`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),rie=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=K3(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(K5.Provider,{value:n,children:(0,G.jsxs)(R6,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(q5,{ref:i.context.internalBackdropRef,inert:E4(!s)}),e.children]})}):null});function J5(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}var Y5={},X5={},Z5=``;function iie(e){if(typeof document>`u`)return!1;let t=U1(e);return fT(t).innerWidth-t.documentElement.clientWidth>0}function aie(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=U1(e),n=t.documentElement,r=t.body,i=vT(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function oie(e){let t=U1(e),n=t.documentElement,r=t.body,i=vT(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function sie(e){let t=U1(e),n=t.documentElement,r=t.body,i=fT(n),a=0,o=0,s=!1,c=N4.create();if(v0&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Y5={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Z5=n.style.scrollBehavior,X5={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=vT(n)?n:r;if(s=aie(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Y5),Object.assign(r.style,X5),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Z5)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var cie=new class{lockCount=0;restore=null;timeoutLock=s6.create();timeoutUnlock=s6.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=U1(e).documentElement,n=fT(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=SE;return}this.restore=y0||!iie(e)?oie(e):sie(e)}};function Q5(e=!0,t=null){$(()=>{if(e)return cie.acquire(t)},[e,t])}function lie(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function $5(e,t){let n=b.useRef(e),r=zT(t);$(()=>{n.current!==e&&r(n.current)},[e,r]),$(()=>{n.current=e},[e])}function e7(e){let[t,n]=b.useState(null),r=zT((t,r)=>{e||n(r||(y0?`touch`:``))});$5(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=lie(r);return b.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function uie(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l}=e7(i);w5(t);let{forceUnmount:u}=T5(i,t),d=zT(e=>{let n=p0(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),f=b.useCallback(()=>{t.setOpen(!1,d(d0))},[t,d]);b.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=j5({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=m===0,_=B5(p),v=c8(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=F0(e);if(g&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||N0(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:g});Q5(i&&o===!0,s);let{getReferenceProps:y,getFloatingProps:x,getTriggerProps:S}=P5([_,v]);t.useContextCallback(`onNestedDialogOpen`,e=>{h(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);let C=b.useMemo(()=>y(l),[y,l]),w=b.useMemo(()=>S(l),[S,l]),T=b.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:p,nestedOpenDialogCount:m})}var die={...k5,modal:_5(e=>e.modal),nested:_5(e=>e.nested),nestedOpenDialogCount:_5(e=>e.nestedOpenDialogCount),disablePointerDismissal:_5(e=>e.disablePointerDismissal),openMethod:_5(e=>e.openMethod),descriptionElementId:_5(e=>e.descriptionElementId),titleElementId:_5(e=>e.titleElementId),viewportElement:_5(e=>e.viewportElement),role:_5(e=>e.role)},fie=class extends S5{constructor(e){super(pie(e),{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new E5,onOpenChange:void 0,onOpenChangeComplete:void 0},die)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function pie(e={}){return{...D5(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function mie(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=K3(!0),p=!!f,m=IT(()=>l?.store??new fie({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:p})).current;J5(()=>{n===void 0&&m.state.open===!1&&r===!0&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp(`openProp`,n),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);uie({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=b.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(G3.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}var hie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=K3(),s=J1(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),AE(`h2`,e,{ref:t,props:[{id:s},a]})});function gie({...e}){return(0,G.jsx)(mie,{"data-slot":`dialog`,...e})}function _ie({...e}){return(0,G.jsx)(rie,{"data-slot":`dialog-portal`,...e})}function vie({className:e,...t}){return(0,G.jsx)(i6,{"data-slot":`dialog-overlay`,className:cO(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,e),...t})}function yie({className:e,children:t,showCloseButton:n=!0,...r}){return(0,G.jsxs)(_ie,{children:[(0,G.jsx)(vie,{}),(0,G.jsxs)(nie,{"data-slot":`dialog-content`,className:cO(`bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,e),...r,children:[t,n&&(0,G.jsxs)(a6,{"data-slot":`dialog-close`,render:(0,G.jsx)(lO,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,G.jsx)(gn,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function bie({className:e,...t}){return(0,G.jsx)(hie,{"data-slot":`dialog-title`,className:cO(`text-sm font-medium`,e),...t})}var xie=()=>{let e=cT(),[t,n]=(0,b.useState)(!1);return e._meta&&Object.keys(e._meta).length>0?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(lO,{variant:`ghost`,size:`default`,onClick:()=>n(!0),"aria-label":`View tool metadata`,title:`View tool metadata`,children:[(0,G.jsx)(sn,{className:`h-4 w-4`}),`Metadata`]}),(0,G.jsx)(gie,{open:t,onOpenChange:n,children:(0,G.jsxs)(yie,{className:`sm:max-w-2xl`,children:[(0,G.jsx)(bie,{children:`Tool Metadata`}),(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(W3,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},Sie={"ui:submitButtonOptions":{norender:!0}},Cie=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This tool requires no input`})}):(0,G.jsx)(y3,{children:(0,G.jsx)(b3,{children:(0,G.jsx)(O1,{ref:r,schema:e??{},validator:AK,uiSchema:Sie,formData:t,onChange:e=>n(e.formData),showErrorList:!1,templates:{FieldTemplate:e=>{let{id:t,classNames:n,style:r,label:i,required:a,errors:o,children:s}=e;return(0,G.jsxs)(`div`,{className:cO(`flex flex-col gap-2`,n),style:r,children:[(0,G.jsxs)(`label`,{htmlFor:t,className:`text-sm text-foreground`,children:[i,a&&(0,G.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,o]})]})},FieldErrorTemplate:e=>e.errors&&e.errors.length>0?(0,G.jsx)(`div`,{className:`text-sm text-destructive mt-1 flex items-center gap-1`,children:(0,G.jsx)(`span`,{children:e.errors.join(`, `)})}):null}})})}),wie=({formData:e,setFormData:t})=>{let[n,r]=(0,b.useState)(JSON.stringify(e,null,2));(0,b.useEffect)(()=>{r(JSON.stringify(e,null,2))},[e]);let i=e=>{r(e);try{t(JSON.parse(e))}catch{}};return(0,G.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,G.jsx)(`textarea`,{className:`w-full h-full p-2 rounded-md border border-border`,rows:12,value:n,onChange:e=>i(e.target.value)})})},Tie=()=>{let e=(0,b.useRef)(null),t=cT(),{setToolData:n}=GS(),r=KS(t.name)?.input??{},i=e=>{n(t.name,{input:e??{}})};return(0,G.jsxs)(`div`,{className:cO(`flex flex-col h-full overflow-hidden border-r border-border`),children:[(0,G.jsxs)(`div`,{className:`shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]`,children:[(0,G.jsx)(`h2`,{className:`font-semibold text-foreground`,children:t.name}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(xie,{}),(0,G.jsx)(H3,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:r})]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-auto px-6 py-6 bg-muted/50`,children:(0,G.jsxs)(m3,{defaultValue:`form`,children:[(0,G.jsxs)(g3,{children:[(0,G.jsx)(_3,{value:`form`,children:`Form`}),(0,G.jsx)(_3,{value:`json`,children:`JSON`})]}),(0,G.jsx)(v3,{value:`form`,children:(0,G.jsx)(Cie,{schema:t.inputSchema,formData:r,setFormData:i,ref:e},t.name)}),(0,G.jsx)(v3,{value:`json`,children:(0,G.jsx)(wie,{formData:r,setFormData:i},t.name)})]})})]})},Eie=BE(`rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none`,vertical:`flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none`}},defaultVariants:{orientation:`horizontal`}});function Die({className:e,orientation:t,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:cO(Eie({orientation:t}),e),...n})}function Oie({className:e,...t}){return(0,G.jsx)(`label`,{"data-slot":`label`,className:cO(`gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,e),...t})}function kie({className:e,...t}){return(0,G.jsx)(`fieldset`,{"data-slot":`field-set`,className:cO(`gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col`,e),...t})}var Aie=BE(`data-[invalid=true]:text-destructive gap-2 group/field flex w-full`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function t7({className:e,orientation:t=`vertical`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:cO(Aie({orientation:t}),e),...n})}function n7({className:e,...t}){return(0,G.jsx)(Oie,{"data-slot":`field-label`,className:cO(`has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}var r7=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),jie={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},i7={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mie={disabled:!1,...i7},a7={valid(e){return e===null?null:e?{[r7.valid]:``}:{[r7.invalid]:``}}},Nie=b.createContext({invalid:void 0,name:void 0,validityData:{state:jie,errors:[],error:``,value:``,initialValue:null},setValidityData:SE,disabled:void 0,touched:i7.touched,setTouched:SE,dirty:i7.dirty,setDirty:SE,filled:i7.filled,setFilled:SE,focused:i7.focused,setFocused:SE,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mie,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=wE)=>e,getInputValidationProps:(e=wE)=>e,inputRef:{current:null},commit:async()=>{}}});function o7(e=!0){let t=b.useContext(Nie);if(t.setValidityData===SE&&!e)throw Error(rE(28));return t}var Pie=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:SE,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function s7(){return b.useContext(Pie)}var Fie=b.createContext({controlId:void 0,registerControlId:SE,labelId:void 0,setLabelId:SE,messageIds:[],setMessageIds:SE,getDescriptionProps:e=>e});function c7(){return b.useContext(Fie)}function Iie(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function l7(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=c7(),o=J1(t),s=n?i:void 0,c=IT(()=>Symbol(`labelable-control`)),l=b.useRef(!1),u=b.useRef(t!=null),d=zT(()=>{!l.current||a===SE||(l.current=!1,a(c.current,void 0))});return $(()=>{if(a===SE)return;let e;if(n){let n=r?.current;e=hT(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),b.useEffect(()=>d,[d]),i??o}function u7(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=s7(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=o7(),f=zT(e.getValue);$(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),$(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:Iie(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?Lq.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),$(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var Lie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:_,setFocused:v,setFilled:y,validationMode:x,validation:S}=o7(),C=m||s,w=p??a,T={...f,disabled:C},{labelId:E}=c7(),D=l7({id:i});$(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?y(!0):e&&o===``&&y(!1)},[S.inputRef,y,o]);let O=b.useRef(null);$(()=>{u&&O.current===M0(U1(O.current))&&v(!0)},[u,v]);let[k]=k1({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0;return u7({id:D,name:w,commit:S.commit,value:j,getValue:()=>S.inputRef.current?.value,controlRef:S.inputRef}),AE(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,p0(t0,e.nativeEvent)),g(t!==_.initialValue),y(t!==``)},onFocus(){v(!0)},onBlur(e){h(!0),v(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(h(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),d],stateAttributesMapping:a7})}),Rie=b.forwardRef(function(e,t){return(0,G.jsx)(Lie,{ref:t,...e})});function d7({className:e,type:t,...n}){return(0,G.jsx)(Rie,{type:t,"data-slot":`input`,className:cO(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,e),...n})}var f7=b.createContext(null),p7=b.createContext(null);function m7(){let e=b.useContext(f7);if(e===null)throw Error(rE(60));return e}function h7(){let e=b.useContext(p7);if(e===null)throw Error(rE(61));return e}var zie=(e,t)=>Object.is(e,t);function g7(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Bie(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:g7(t,e,n))}function _7(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:g7(e,t,n))}function Vie(e,t,n){return e.filter(e=>!g7(t,e,n))}function v7(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function y7(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Hie(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(y7(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Uie(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return v7(e)}function b7(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?v7(e.value):v7(e)}function x7(e,t,n){function r(){return Uie(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=y7(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Wie(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,G.jsx)(b.Fragment,{children:x7(r,t,n)},i)),e),[])}var S7={id:_5(e=>e.id),labelId:_5(e=>e.labelId),modal:_5(e=>e.modal),multiple:_5(e=>e.multiple),items:_5(e=>e.items),itemToStringLabel:_5(e=>e.itemToStringLabel),itemToStringValue:_5(e=>e.itemToStringValue),isItemEqualToValue:_5(e=>e.isItemEqualToValue),value:_5(e=>e.value),hasSelectedValue:_5(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:b7(t,r)!==``}),hasNullItemLabel:_5((e,t)=>t?Hie(e.items):!1),open:_5(e=>e.open),mounted:_5(e=>e.mounted),forceMount:_5(e=>e.forceMount),transitionStatus:_5(e=>e.transitionStatus),openMethod:_5(e=>e.openMethod),activeIndex:_5(e=>e.activeIndex),selectedIndex:_5(e=>e.selectedIndex),isActive:_5((e,t)=>e.activeIndex===t),isSelected:_5((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>g7(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:g7(n,i,r)}),isSelectedByFocus:_5((e,t)=>e.selectedIndex===t),popupProps:_5(e=>e.popupProps),triggerProps:_5(e=>e.triggerProps),triggerElement:_5(e=>e.triggerElement),positionerElement:_5(e=>e.positionerElement),listElement:_5(e=>e.listElement),scrollUpArrowVisible:_5(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:_5(e=>e.scrollDownArrowVisible),hasScrollArrows:_5(e=>e.hasScrollArrows)};function Gie(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:d=!1,required:f=!1,modal:p=!0,actionsRef:m,inputRef:h,onOpenChangeComplete:g,items:_,multiple:v=!1,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S=zie,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=s7(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=o7(),I=l7({id:t}),L=N||u,R=M??c,[z,B]=k1({controlled:n,default:v?r??CE:r,name:`Select`,state:`value`}),[V,H]=k1({controlled:a,default:o,name:`Select`,state:`open`}),U=b.useRef([]),ee=b.useRef([]),W=b.useRef(null),te=b.useRef(null),ne=b.useRef(0),re=b.useRef(null),ie=b.useRef([]),ae=b.useRef(!1),oe=b.useRef(!1),se=b.useRef(null),ce=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),le=b.useRef(!1),{mounted:ue,setMounted:de,transitionStatus:fe}=R4(V),{openMethod:pe,triggerProps:me}=e7(V),he=IT(()=>new x5({id:I,labelId:void 0,modal:p,multiple:v,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,value:z,open:V,mounted:ue,transitionStatus:fe,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ge=b5(he,S7.activeIndex),_e=b5(he,S7.selectedIndex),ve=b5(he,S7.triggerElement),ye=b5(he,S7.positionerElement),be=b.useMemo(()=>v&&Array.isArray(z)&&z.length===0?``:b7(z,x),[v,z,x]),xe=b.useMemo(()=>v&&Array.isArray(z)?z.map(e=>b7(e,x)):b7(z,x),[v,z,x]),Se=p6(he.state.triggerElement);u7({id:I,commit:P.commit,value:z,controlRef:Se,name:R,getValue:()=>xe});let Ce=b.useRef(z);$(()=>{z!==Ce.current&&he.set(`forceMount`,!0)},[he,z]),$(()=>{j(v?Array.isArray(z)&&z.length>0:z!=null)},[v,z,j]),$(function(){if(V)return;let e=ie.current;if(v){let t=Array.isArray(z)?z:[];if(t.length===0){he.set(`selectedIndex`,null);return}let n=t[t.length-1],r=_7(e,n,S);he.set(`selectedIndex`,r===-1?null:r);return}let t=_7(e,z,S);he.set(`selectedIndex`,t===-1?null:t)},[v,V,z,ie,S,he]),$5(z,()=>{T(R),E(z!==A.initialValue),k()?P.commit(z):P.commit(z,!0)});let we=zT((e,t)=>{if(s?.(e,t),!t.isCanceled&&(H(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),F===`onBlur`&&P.commit(z)),!e&&he.state.activeIndex!==null)){let e=U.current[he.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Te=zT(()=>{de(!1),he.set(`activeIndex`,null),g?.(!1)});L4({enabled:!m,open:V,ref:W,onComplete(){V||Te()}}),b.useImperativeHandle(m,()=>({unmount:Te}),[Te]);let Ee=zT((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),De=zT(()=>{let e=he.state.listElement||W.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;he.state.scrollUpArrowVisible!==r&&he.set(`scrollUpArrowVisible`,r),he.state.scrollDownArrowVisible!==i&&he.set(`scrollDownArrowVisible`,i)}),Oe=A5({open:V,onOpenChange:we,elements:{reference:ve,floating:ye}}),{getReferenceProps:ke,getFloatingProps:Ae,getItemProps:je}=P5([i8(Oe,{enabled:!d&&!L,event:`mousedown`}),c8(Oe,{bubbles:!1}),Kre(Oe,{enabled:!d&&!L,listRef:U,activeIndex:ge,selectedIndex:_e,disabledIndices:CE,onNavigate(e){e===null&&!V||he.set(`activeIndex`,e)},focusItemOnHover:!1}),Jre(Oe,{enabled:!d&&!L&&(V||!v),listRef:ee,activeIndex:ge,selectedIndex:_e,onMatch(e){V?he.set(`activeIndex`,e):Ee(ie.current[e],p0(`none`))},onTypingChange(e){ae.current=e}})]),Me=b.useMemo(()=>GT(ke(),me,I?{id:I}:wE),[ke,me,I]);J5(()=>{he.update({popupProps:Ae(),triggerProps:Me})}),$(()=>{he.update({id:I,modal:p,multiple:v,value:z,open:V,mounted:ue,transitionStatus:fe,popupProps:Ae(),triggerProps:Me,items:_,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,openMethod:pe})},[he,I,p,v,z,V,ue,fe,Ae,Me,_,y,x,S,pe]);let Ne=b.useMemo(()=>({store:he,name:R,required:f,disabled:L,readOnly:d,multiple:v,itemToStringLabel:y,itemToStringValue:x,highlightItemOnHover:C,setValue:Ee,setOpen:we,listRef:U,popupRef:W,scrollHandlerRef:te,handleScrollArrowVisibility:De,scrollArrowsMountedCountRef:ne,getItemProps:je,events:Oe.context.events,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,selectedItemTextRef:se,validation:P,onOpenChangeComplete:g,keyboardActiveRef:oe,alignItemWithTriggerActiveRef:le,initialValueRef:Ce}),[he,R,f,L,d,v,y,x,C,Ee,we,je,Oe.context.events,P,g,De]),Pe=uE(h,P.inputRef),Fe=v&&Array.isArray(z)&&z.length>0,Ie=v?void 0:R,Le=b.useMemo(()=>!v||!Array.isArray(z)||!R?null:z.map(e=>{let t=b7(e,x);return(0,G.jsx)(`input`,{type:`hidden`,name:R,value:t},t)}),[v,z,R,x]);return(0,G.jsx)(f7.Provider,{value:Ne,children:(0,G.jsxs)(p7.Provider,{value:Oe,children:[w,(0,G.jsx)(`input`,{...P.getInputValidationProps({onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=p0(t0,e.nativeEvent);function r(){if(v)return;let e=ie.current.find(e=>b7(e,x).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Ee(e,n),k()&&P.commit(e))}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Ie==null?`${I}-hidden-input`:void 0,name:Ie,autoComplete:l,value:be,disabled:L,required:f&&!Fe,readOnly:d,ref:Pe,style:R?_6:g6,tabIndex:-1,"aria-hidden":!0}),Le]})})}function Kie(e,t){return e??t}function qie(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var C7=2,Jie=400,w7=200,Yie={...t6,...a7,value:()=>null},Xie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=o7(),{labelId:p}=c7(),{store:m,setOpen:h,selectionRef:g,validation:_,readOnly:v,required:y,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=m7(),w=f||S||a,T=b5(m,S7.open),E=b5(m,S7.value),D=b5(m,S7.triggerProps),O=b5(m,S7.positionerElement),k=b5(m,S7.listElement),A=b5(m,S7.id),j=b5(m,S7.labelId),M=b5(m,S7.hasSelectedValue),N=!M&&T,P=b5(m,S7.hasNullItemLabel,N),F=i??A,I=Kie(p,j);l7({id:F});let L=p6(O),R=b.useRef(null),{getButtonProps:z,buttonRef:B}=sE({disabled:w,native:o}),V=uE(t,R,B,zT(e=>{m.set(`triggerElement`,e)})),H=c6(),U=c6(),ee=c6(),W=c6();b.useEffect(()=>{if(T)return M||P?W.start(w7,()=>{g.current.allowUnselectedMouseUp=!0,ee.start(w7,()=>{g.current.allowSelectedMouseUp=!0})}):ee.start(Jie,()=>{g.current.allowUnselectedMouseUp=!0,g.current.allowSelectedMouseUp=!0}),()=>{ee.clear(),W.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},U.clear()},[T,M,P,g,U,ee,W]);let te=b.useMemo(()=>k?.id??B0(O)?.id,[k,O]),ne=GT(D,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?te:void 0,"aria-labelledby":I,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:w?-1:0,ref:V,onFocus(e){l(!0),T&&x.current&&h(!1,p0(t0,e.nativeEvent)),H.start(0,()=>{m.set(`forceMount`,!0)})},onBlur(e){N0(O,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&_.commit(E))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=U1(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;if(N0(R.current,t)||N0(L.current,t)||t===R.current)return;let n=qie(R.current);e.clientX>=n.left-C7&&e.clientX<=n.right+C7&&e.clientY>=n.top-C7&&e.clientY<=n.bottom+C7||h(!1,p0(u0,e))}U.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},_.getValidationProps,s,z);ne.role=`combobox`;let re={...d,open:T,disabled:w,value:E,readOnly:v,placeholder:!M};return AE(`button`,e,{ref:[t,R],state:re,stateAttributesMapping:Yie,props:ne})}),Zie={value:()=>null},Qie=b.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:c}=m7(),l=b5(s,S7.value),u=b5(s,S7.items),d=b5(s,S7.itemToStringLabel),f=b5(s,S7.hasSelectedValue),p=!f&&a!=null&&i==null,m=b5(s,S7.hasNullItemLabel,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(!f&&a!=null&&!m?a:Array.isArray(l)?Wie(l,u,d):x7(l,u,d)),AE(`span`,e,{state:h,ref:[t,c],props:[{children:g},o],stateAttributesMapping:Zie})}),$ie=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=m7();return AE(`span`,e,{state:{open:b5(a,S7.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:e6})}),eae=b.createContext(void 0),tae=b.forwardRef(function(e,t){let{store:n}=m7(),r=b5(n,S7.mounted),i=b5(n,S7.forceMount);return r||i?(0,G.jsx)(eae.Provider,{value:!0,children:(0,G.jsx)(R6,{ref:t,...e})}):null}),nae=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,offsetParent:d=`real`}=r2(e,t)||{};if(l==null)return{};let f=x2(u),p={x:n,y:r},m=l2(i),h=s2(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=n2(k,j,A),N=!c.arrow&&a2(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),rae=(e,t)=>({...nae(e),options:[e,t]}),iae={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await rre().fn(e)).data?.referenceHidden||a}}}},T7={sideX:`left`,sideY:`top`},aae={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=fT(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:T7};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=U1(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=i2(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:T7.sideX,g=f===`top`?`bottom`:T7.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function E7(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function D7(e,t,n){let{rects:r,placement:i}=e;return{side:E7(t,i2(i),n),align:a2(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function O7(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:x}=e,[S,C]=b.useState(null);!m&&S!==null&&C(null);let w=h.side||`flip`,T=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=zT(D),k=D?O:t,A=p6(t),j=L1()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=r===`bottom`?1:0,I=r===`top`?1:0,L=r===`right`?1:0,R=r===`left`?1:0;typeof P==`number`?P={top:P+F,right:P+R,bottom:P+I,left:P+L}:P&&={top:(P.top||0)+F,right:(P.right||0)+R,bottom:(P.bottom||0)+I,left:(P.left||0)+L};let z={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},B=b.useRef(null),V=p6(i),H=p6(o),U=[Qne(e=>{let t=D7(e,r,j),n=typeof V.current==`function`?V.current(t):V.current,i=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],ee=T===`none`&&w!==`shift`,W=!ee&&(l||g||w===`shift`),te=w===`none`?null:tre({...z,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!g&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),ne=ee?null:$ne(e=>{let t=U1(e.elements.floating).documentElement;return{...z,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:W,limiter:l||g?void 0:ere(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=c2(i2(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[z,l,g,P,T]);w===`shift`||T===`shift`||a===`center`?U.push(ne,te):U.push(te,ne),U.push(nre({...z,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),rae(()=>({element:B.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=i2(a),l=c2(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(D7(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,W&&l===`y`&&b?S:x),{}}},iae,v),$(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,p]);let re=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=Fre({rootContext:p,placement:N,middleware:U,strategy:n,whileElementsMounted:f?void 0:(...e)=>Q8(...e,re),nodeId:_,externalTree:x}),{sideX:me,sideY:he}=ce.adaptiveOrigin||T7,ge=fe?n:`fixed`,_e=b.useMemo(()=>{let e=v?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[v,ge,me,oe,he,se,pe,fe]),ve=b.useRef(null);$(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(k7(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[m,ie,k,A]),b.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&k7(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[m,ie,k,A]),b.useEffect(()=>{if(f&&m&&ae.domReference&&ae.floating)return Q8(ae.domReference,ae.floating,le,re)},[f,m,ae,le,re]);let ye=i2(ue),be=E7(r,ye,j),xe=a2(ue)||`center`,Se=!!ce.hide?.referenceHidden;$(()=>{y&&m&&fe&&C(ye)},[y,m,fe,ye]);let Ce=b.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:B,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,B,we,be,xe,ye,Se,ie,de,fe,le])}function k7(e){return e!=null&&`current`in e}var A7=b.createContext(void 0);function j7(){let e=b.useContext(A7);if(!e)throw Error(rE(59));return e}function M7(e){return e===`starting`?TE:wE}function N7(e,t){e&&Object.assign(e.style,t)}var P7={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},oae={position:`fixed`},sae=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=DE,..._}=e,{store:v,listRef:y,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=m7(),O=h7(),k=b5(v,S7.open),A=b5(v,S7.mounted),j=b5(v,S7.modal),M=b5(v,S7.value),N=b5(v,S7.openMethod),P=b5(v,S7.positionerElement),F=b5(v,S7.triggerElement),I=b5(v,S7.isItemEqualToValue),L=b5(v,S7.transitionStatus),R=b.useRef(null),z=b.useRef(null),[B,V]=b.useState(h),H=A&&B&&N!==`touch`;!A&&B!==h&&V(h),$(()=>{A||(S7.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),S7.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,A]),b.useImperativeHandle(S,()=>H),Q5((H||j)&&k&&N!==`touch`,F);let U=O7({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:g,keepMounted:!0}),ee=H?`none`:U.side,W=H?oae:U.positionerStyles,te=b.useMemo(()=>{let e={};return k||(e.pointerEvents=`none`),{role:`presentation`,hidden:!A,style:{...W,...e}}},[k,A,W]),ne={open:k,side:ee,align:U.align,anchorHidden:U.anchorHidden},re=AE(`div`,e,{ref:[t,zT(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:n6,props:[te,M7(L),_]}),ie=b.useRef(0),ae=zT(e=>{if(e.size===0&&ie.current===0||w.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=p0(t0);if(t!==0&&!v.state.multiple&&M!==null&&_7(w.current,M,I)===-1){let e=T.current,t=e!=null&&_7(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(v.set(`selectedIndex`,null),C.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(M)){let e=e=>_7(w.current,e,I)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!Bie(M,e,I)))&&(D(t,n),t.length===0&&(v.set(`selectedIndex`,null),C.current=null))}if(k&&H){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};N7(P,e),N7(E.current,e)}}),oe=b.useMemo(()=>({...U,side:ee,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[U,ee,H,V]);return(0,G.jsx)(M1,{elementsRef:y,labelsRef:x,onMapChange:ae,children:(0,G.jsxs)(A7.Provider,{value:oe,children:[A&&j&&(0,G.jsx)(q5,{inert:E4(!k),cutout:F}),re]})})});function F7(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var I7=`base-ui-disable-scrollbar`,L7={className:I7,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:I7,precedence:`base-ui:low`,children:`.${I7}{scrollbar-width:none}.${I7}::-webkit-scrollbar{display:none}`})}},cae=b.createContext(void 0);function R7(e){let t=b.useContext(cae);if(t===void 0&&!e)throw Error(rE(69));return t}function z7(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var B7=1,lae={...n6,...A4},uae=b.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=m7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:S,scrollUpArrowRef:C}=j7(),w=R7(!0)!=null,T=h7(),{nonce:E,disableStyleElements:D}=T4(),O=c6(),k=b5(o,S7.id),A=b5(o,S7.open),j=b5(o,S7.mounted),M=b5(o,S7.popupProps),N=b5(o,S7.transitionStatus),P=b5(o,S7.triggerElement),F=b5(o,S7.positionerElement),I=b5(o,S7.listElement),L=b.useRef(0),R=b.useRef(!1),z=b.useRef(0),B=b.useRef(!1),V=b.useRef({}),H=P4(),U=zT(e=>{if(!F||!s.current||!B.current)return;if(R.current||!y){m();return}let t=F.style.top===`0px`,n=F.style.bottom===`0px`,r=F.getBoundingClientRect().height,i=U1(F),a=getComputedStyle(F),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=V7(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=H7(e),p=0,h=null,g=!1,_=!1,v=e=>{F.style.height=`${e}px`},b=(t,n)=>{let i=z7(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=B7&&(R.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=B7){b(e,f);return}u-n>B7?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=B7){b(e,0);return}u-n>B7?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=H7(e),n=_?t:z7(h,0,t);Math.abs(e.scrollTop-n)>B7&&(e.scrollTop=n)}(g||p>=u-B7)&&(R.current=!0),m()});b.useImperativeHandle(h,()=>U,[U]),L4({open:A,ref:s,onComplete(){A&&c?.(!0)}});let ee={open:A,transitionStatus:N,side:_,align:v};$(()=>{!F||!s.current||Object.keys(V.current).length||(V.current={top:F.style.top||`0`,left:F.style.left||`0`,right:F.style.right,height:F.style.height,bottom:F.style.bottom,minHeight:F.style.minHeight,maxHeight:F.style.maxHeight,marginTop:F.style.marginTop,marginBottom:F.style.marginBottom})},[s,F]),$(()=>{A||y||(B.current=!1,R.current=!1,L.current=0,z.current=0,N7(F,V.current))},[A,y,F,s]),$(()=>{let e=s.current;if(!(!A||!P||!F||!e||o.state.transitionStatus===`ending`)){if(!y){B.current=!0,H.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=fae(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(F),n=getComputedStyle(e),r=U1(P),i=fT(F),a=dae(P),o=U7(P.getBoundingClientRect(),a),s=U7(F.getBoundingClientRect(),a),c=o.left,l=o.height,f=I||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=V7(n),b=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=b-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=U7(T.getBoundingClientRect(),a);E=U7(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(b,k),j=b-g-_,M=k-A,N=Math.max(5,c+D),z=S-5,H=Math.max(0,N+s.width-z);F.style.left=`${N-H}px`,F.style.height=`${A}px`,F.style.maxHeight=`auto`,F.style.marginTop=`${g}px`,F.style.marginBottom=`${_}px`,e.style.height=`100%`;let U=H7(f),ee=M>=U-B7;ee&&(A=Math.min(b,s.height)-(M-U));let W=o.top<20||o.bottom>b-20||Math.ceil(A)+B7<Math.min(p,v),te=(i.visualViewport?.scale??1)!==1&&v0;if(W||te){B.current=!0,N7(F,V.current),Lq.flushSync(()=>x(!1));return}if(ee){let e=Math.max(0,b-k);F.style.top=s.height>=j?`0`:`${e}px`,F.style.height=`${A}px`,f.scrollTop=H7(f),L.current=Math.max(v,A)}else F.style.bottom=`0`,L.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=z7(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(L.current===b||A>=y)&&(R.current=!0),m(),setTimeout(()=>{B.current=!0})}finally{t()}})}},[o,A,F,P,u,d,s,m,y,x,H,S,C,I]),b.useEffect(()=>{if(!y||!F||!A)return;let e=fT(F);function t(e){l(!1,p0(f0,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,F,A]);let W={...I?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${k}-list`},onKeyDown(e){f.current=!0,w&&e3.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||F7(e)||e.pointerType===`touch`)return;let t=e.currentTarget;O.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){I||U(e.currentTarget)},...y&&{style:I?{height:`100%`}:P7}},te=AE(`div`,e,{ref:[t,s],state:ee,stateAttributesMapping:lae,props:[M,W,M7(N),{className:!I&&y?L7.className:void 0},a]});return(0,G.jsxs)(b.Fragment,{children:[!D&&L7.getElement(E),(0,G.jsx)(r8,{context:T,modal:!1,disabled:!j,returnFocus:i,restoreFocus:!0,children:te})]})});function V7(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function H7(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function dae(e){return Y8.getScale(e)}function U7(e,t){return S2({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var W7=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function fae(e){let{style:t}=e,n={};for(let[e,r]of W7)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of W7){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var pae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=m7(),{alignItemWithTriggerActive:s}=j7(),c=b5(a,S7.hasScrollArrows),l=b5(a,S7.openMethod),u=b5(a,S7.multiple),d={id:`${b5(a,S7.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:P7},className:c&&l!==`touch`?L7.className:void 0};return AE(`div`,e,{ref:[t,zT(e=>{a.set(`listElement`,e)})],props:[d,i]})}),G7=b.createContext(void 0);function K7(){let e=b.useContext(G7);if(!e)throw Error(rE(57));return e}var mae=b.memo(b.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=b.useRef(null),u=Z1({label:a,textRef:l,indexGuessBehavior:X1.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:x}=m7(),S=c6(),C=b5(d,S7.isActive,u.index),w=b5(d,S7.isSelected,u.index,i),T=b5(d,S7.isSelectedByFocus,u.index),E=b5(d,S7.isItemEqualToValue),D=u.index,O=D!==-1,k=b.useRef(null),A=p6(D);$(()=>{if(!O)return;let e=_.current;return e[D]=i,()=>{delete e[D]}},[O,D,i,_]),$(()=>{if(!O)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&g7(i,t,E)&&d.set(`selectedIndex`,D)},[O,D,y,E,d,i]);let j={disabled:o,selected:w,highlighted:C},M=f({active:C,selected:w});M.onFocus=void 0,M.id=void 0;let N=b.useRef(null),P=b.useRef(`mouse`),F=b.useRef(!1),{getButtonProps:I,buttonRef:L}=sE({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function R(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(w?Vie(n,i,E):[...n,i],p0(a0,e))}else m(i,p0(a0,e)),p(!1,p0(a0,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onFocus(){d.set(`activeIndex`,D)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&x&&d.set(`activeIndex`,D)},onMouseMove(){x&&d.set(`activeIndex`,D)},onMouseLeave(e){!x||v.current||F7(e)||S.start(0,()=>{d.state.activeIndex===D&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,d.set(`activeIndex`,D),e.key===` `&&g.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(o||e.type===`keydown`&&N.current===` `&&g.current||P.current!==`touch`&&!C||(N.current=null,R(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(o)return;if(F.current){F.current=!1;return}let e=!h.current.allowSelectedMouseUp&&w,t=!h.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=AE(`div`,e,{ref:[L,t,u.ref,k],state:j,props:[M,z,c,I]}),V=b.useMemo(()=>({selected:w,indexRef:A,textRef:l,selectedByFocus:T,hasRegistered:O}),[w,A,l,T,O]);return(0,G.jsx)(G7.Provider,{value:V,children:B})})),hae=b.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=K7();return n||r?(0,G.jsx)(gae,{...e,ref:t}):null}),gae=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=K7(),s=b.useRef(null),{transitionStatus:c,setMounted:l}=R4(o),u=AE(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:A4});return L4({open:o,ref:s,onComplete(){o||l(!1)}}),u})),_ae=b.memo(b.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=K7(),{selectedItemTextRef:o}=m7(),{className:s,render:c,...l}=e;return AE(`div`,e,{ref:[b.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})})),q7=b.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:c,listRef:l,handleScrollArrowVisibility:u,scrollArrowsMountedCountRef:d}=m7(),{side:f,scrollDownArrowRef:p,scrollUpArrowRef:m}=j7(),h=b5(s,i===`up`?S7.scrollUpArrowVisible:S7.scrollDownArrowVisible),g=b5(s,S7.openMethod),_=h&&g!==`touch`,v=c6(),y=i===`up`?m:p,{transitionStatus:b,setMounted:x}=R4(_);$(()=>(d.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{d.current=Math.max(0,d.current-1),d.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,d]),L4({open:_,ref:y,onComplete(){_||x(!1)}});let S=AE(`div`,e,{ref:[t,y],state:{direction:i,visible:_,side:f,transitionStatus:b},props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??c.current;if(!e)return;s.set(`activeIndex`,null),u();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(l.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){v.clear();return}if((s.state.listElement||c.current)&&l.current&&l.current.length>0){let t=l.current,n=y.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},o]});return _||a?S:null}),vae=b.forwardRef(function(e,t){return(0,G.jsx)(q7,{...e,ref:t,direction:`down`})}),yae=b.forwardRef(function(e,t){return(0,G.jsx)(q7,{...e,ref:t,direction:`up`})}),bae=b.createContext(void 0),xae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,[a,o]=b.useState(),s=b.useMemo(()=>({labelId:a,setLabelId:o}),[a,o]),c=AE(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":a},i]});return(0,G.jsx)(bae.Provider,{value:s,children:c})}),J7=Gie;function Y7({className:e,...t}){return(0,G.jsx)(xae,{"data-slot":`select-group`,className:cO(`scroll-my-1`,e),...t})}function X7({className:e,...t}){return(0,G.jsx)(Qie,{"data-slot":`select-value`,className:cO(`flex flex-1 text-left`,e),...t})}function Z7({className:e,size:t=`default`,children:n,...r}){return(0,G.jsxs)(Xie,{"data-slot":`select-trigger`,"data-size":t,className:cO(`border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...r,children:[n,(0,G.jsx)($ie,{render:(0,G.jsx)(nn,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function Q7({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,G.jsx)(tae,{children:(0,G.jsx)(sae,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,G.jsxs)(uae,{"data-slot":`select-content`,className:cO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto`,e),...s,children:[(0,G.jsx)(Sae,{}),(0,G.jsx)(pae,{children:t}),(0,G.jsx)(Cae,{})]})})})}function $7({className:e,children:t,...n}){return(0,G.jsxs)(mae,{"data-slot":`select-item`,className:cO(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[(0,G.jsx)(_ae,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:t}),(0,G.jsx)(hae,{render:(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,G.jsx)(tn,{className:`pointer-events-none`})})]})}function Sae({className:e,...t}){return(0,G.jsx)(yae,{"data-slot":`select-scroll-up-button`,className:cO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,e),...t,children:(0,G.jsx)(rn,{})})}function Cae({className:e,...t}){return(0,G.jsx)(vae,{"data-slot":`select-scroll-down-button`,className:cO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,e),...t,children:(0,G.jsx)(nn,{})})}var e9=b.createContext(void 0);function wae(){let e=b.useContext(e9);if(e===void 0)throw Error(rE(63));return e}var t9=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),n9={...a7,checked(e){return e?{[t9.checked]:``}:{[t9.unchecked]:``}}};function Tae(e,t,n,r=!0,i){let[a,o]=b.useState(),s=J1(i?`${i}-label`:void 0),c=e??t??a;return $(()=>{let i=e||t||!r?void 0:Eae(n.current,s);a!==i&&o(i)}),c}function Eae(e,t){let n=Dae(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Dae(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Oae=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,id:o,inputRef:s,name:c,nativeButton:l=!1,onCheckedChange:u,readOnly:d=!1,required:f=!1,disabled:p=!1,render:m,uncheckedValue:h,value:g,..._}=e,{clearErrors:v}=s7(),{state:y,setTouched:x,setDirty:S,validityData:C,setFilled:w,setFocused:T,shouldValidateOnChange:E,validationMode:D,disabled:O,name:k,validation:A}=o7(),{labelId:j}=c7(),M=O||p,N=k??c,P=zT(u),F=b.useRef(null),I=uE(F,s,A.inputRef),L=b.useRef(null),R=J1(),z=l7({id:o,implicit:!1,controlRef:L}),B=l?void 0:z,[V,H]=k1({controlled:n,default:!!i,name:`Switch`,state:`checked`});u7({id:R,commit:A.commit,value:V,controlRef:L,name:N,getValue:()=>V}),$(()=>{F.current&&w(F.current.checked)},[F,w]),$5(V,()=>{v(N),S(V!==C.initialValue),w(V),E()?A.commit(V):A.commit(V,!0)});let{getButtonProps:U,buttonRef:ee}=sE({disabled:M,native:l}),W=Tae(a,j,F,!l,B),te={id:l?z:R,role:`switch`,"aria-checked":V,"aria-readonly":d||void 0,"aria-required":f||void 0,"aria-labelledby":W,onFocus(){M||T(!0)},onBlur(){let e=F.current;!e||M||(x(!0),T(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){d||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne=b.useMemo(()=>GT({checked:V,disabled:M,id:B,name:N,required:f,style:N?_6:g6,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:I,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=p0(t0,e.nativeEvent);P?.(t,n),!n.isCanceled&&H(t)},onFocus(){L.current?.focus()}},A.getInputValidationProps,g===void 0?wE:{value:g}),[V,M,I,B,N,P,f,H,A,g]),re=b.useMemo(()=>({...y,checked:V,disabled:M,readOnly:d,required:f}),[y,V,M,d,f]),ie=AE(`span`,e,{state:re,ref:[t,L,ee],props:[te,A.getValidationProps,_,U],stateAttributesMapping:n9});return(0,G.jsxs)(e9.Provider,{value:re,children:[ie,!V&&N&&h!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,name:N,value:h}),(0,G.jsx)(`input`,{...ne})]})}),kae=b.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:a}=o7(),o=wae();return AE(`span`,e,{state:{...a,...o},ref:t,stateAttributesMapping:n9,props:i})});function r9({className:e,size:t=`default`,...n}){return(0,G.jsx)(Oae,{"data-slot":`switch`,"data-size":t,className:cO(`cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,G.jsx)(kae,{"data-slot":`switch-thumb`,className:`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`})})}function Aae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:cO(`border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,e),...t})}var jae=BE(`text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none`,{variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last`,"block-start":`px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}});function Mae({className:e,align:t=`inline-start`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:cO(jae({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function Nae({className:e,...t}){return(0,G.jsx)(t1,{"data-slot":`command`,className:cO(`bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden`,e),...t})}function Pae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`border-b pb-0`,children:(0,G.jsxs)(Aae,{className:`bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,G.jsx)(t1.Input,{"data-slot":`command-input`,className:cO(`w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,G.jsx)(Mae,{children:(0,G.jsx)(pn,{className:`size-4 shrink-0 opacity-50`})})]})})}function Fae({className:e,...t}){return(0,G.jsx)(t1.List,{"data-slot":`command-list`,className:cO(`no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto`,e),...t})}function Iae({className:e,...t}){return(0,G.jsx)(t1.Empty,{"data-slot":`command-empty`,className:cO(`py-6 text-center text-xs`,e),...t})}function Lae({className:e,...t}){return(0,G.jsx)(t1.Group,{"data-slot":`command-group`,className:cO(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs`,e),...t})}function Rae({className:e,children:t,...n}){return(0,G.jsxs)(t1.Item,{"data-slot":`command-item`,className:cO(`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[t,(0,G.jsx)(tn,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}var i9=b.createContext(void 0);function a9(e){let t=b.useContext(i9);if(t===void 0&&!e)throw Error(rE(47));return t}function zae(){return{...D5(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var Bae={...k5,disabled:_5(e=>e.disabled),instantType:_5(e=>e.instantType),openMethod:_5(e=>e.openMethod),openChangeReason:_5(e=>e.openChangeReason),modal:_5(e=>e.modal),stickIfOpen:_5(e=>e.stickIfOpen),titleElementId:_5(e=>e.titleElementId),descriptionElementId:_5(e=>e.descriptionElementId),openOnHover:_5(e=>e.openOnHover),closeDelay:_5(e=>e.closeDelay),hasViewport:_5(e=>e.hasViewport)},Vae=class e extends S5{constructor(e){let t={...zae(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new s6,triggerElements:new E5},Bae)}setOpen=(e,t)=>{let n=t.reason===r0,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Lq.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=IT(()=>new e(n)).current,i=t??r;return S4(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function o9({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Vae.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});J5(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g}=e7(d);w5(u);let{forceUnmount:_}=T5(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});Q5(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let v=b.useCallback(e=>{let t=p0(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),y=b.useCallback(()=>{u.setOpen(!1,v(d0))},[u,v]);b.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:y}),[_,y]);let x=j5({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=P5([c8(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),B5(x)]),T=b.useMemo(()=>S(g),[S,g]),E=b.useMemo(()=>w(g),[w,g]),D=b.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:U6()!=null});let O=b.useMemo(()=>({store:u}),[u]);return(0,G.jsx)(i9.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function Hae(e){return a9(!0)?(0,G.jsx)(o9,{props:e}):(0,G.jsx)(q6,{children:(0,G.jsx)(o9,{props:e})})}var Uae=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=a9(!0),m=o?.store??p?.store;if(!m)throw Error(rE(74));let h=J1(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=b.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Nre(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),C=m.useState(`openChangeReason`),w=m.useState(`stickIfOpen`),T=m.useState(`openMethod`),E=Hre(_,{enabled:_!=null&&c&&(T!==`touch`||C!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Zre(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),D=P5([i8(_,{enabled:_!=null,stickIfOpen:w})]),O=m.useState(`triggerProps`,S),k={disabled:i,open:v},{getButtonProps:A,buttonRef:j}=sE({disabled:i,native:a}),M=b.useMemo(()=>({open(e){return e&&C===`trigger-press`?t6.open(e):e6.open(e)}}),[C]),N=AE(`button`,e,{state:k,ref:[j,t,x,y],props:[D.getReferenceProps(),E,O,{[EE]:``,id:h},f,A],stateAttributesMapping:M}),P=b.useRef(null),F=zT(e=>{Lq.flushSync(()=>{m.setOpen(!1,p0(s0,e.nativeEvent,e.currentTarget))}),g4(P.current)?.focus()}),I=zT(e=>{let t=m.select(`positionerElement`);if(t&&_4(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{Lq.flushSync(()=>{m.setOpen(!1,p0(s0,e.nativeEvent,e.currentTarget))});let n=h4(m.context.triggerFocusTargetRef.current||y.current);for(;n!==null&&N0(t,n);){let e=n;if(n=f4(n),n===e)break}n?.focus()}});return g?(0,G.jsxs)(b.Fragment,{children:[(0,G.jsx)(v6,{ref:P,onFocus:F}),(0,G.jsx)(b.Fragment,{children:N},h),(0,G.jsx)(v6,{ref:m.context.triggerFocusTargetRef,onFocus:I})]}):(0,G.jsx)(b.Fragment,{children:N},h)}),s9=b.createContext(void 0);function Wae(){let e=b.useContext(s9);if(e===void 0)throw Error(rE(45));return e}var Gae=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=a9();return i.useState(`mounted`)||n?(0,G.jsx)(s9.Provider,{value:n,children:(0,G.jsx)(R6,{ref:t,...r})}):null}),c9=b.createContext(void 0);function Kae(){let e=b.useContext(c9);if(!e)throw Error(rE(46));return e}var qae=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=OE,...g}=e,{store:_}=a9(),v=Wae(),y=G6(),x=_.useState(`floatingRootContext`),S=_.useState(`mounted`),C=_.useState(`open`),w=_.useState(`openChangeReason`),T=_.useState(`activeTriggerElement`),E=_.useState(`modal`),D=_.useState(`positionerElement`),O=_.useState(`instantType`),k=_.useState(`transitionStatus`),A=_.useState(`hasViewport`),j=b.useRef(null),M=I4(D,!1,!1),N=O7({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:A?aae:void 0}),P=b.useMemo(()=>{let e={};return C||(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...N.positionerStyles,...e}}},[C,S,N.positionerStyles]),F=b.useMemo(()=>({props:P,...N}),[P,N]),I=x.useState(`domReferenceElement`);$(()=>{let e=I,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return M(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,M,_]);let L={open:C,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O},R=b.useCallback(e=>{_.set(`positionerElement`,e)},[_]),z=AE(`div`,e,{state:L,props:[F.props,M7(k),g],ref:[t,R],stateAttributesMapping:n6});return(0,G.jsxs)(c9.Provider,{value:F,children:[S&&E===!0&&w!==`trigger-hover`&&(0,G.jsx)(q5,{ref:_.context.internalBackdropRef,inert:E4(!C),cutout:T}),(0,G.jsx)(K6,{id:y,children:z})]})}),Jae=b.createContext(void 0);function Yae(){let[e,t]=b.useState(0),n=zT(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Xae(e){let{value:t,children:n}=e;return(0,G.jsx)(Jae.Provider,{value:t,children:n})}var Zae={...n6,...A4},Qae=b.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=a9(),c=Kae(),l=R7(!0)!=null,{context:u,hasClosePart:d}=Yae(),f=s.useState(`open`),p=s.useState(`openMethod`),m=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),v=s.useState(`descriptionElementId`),y=s.useState(`modal`),x=s.useState(`mounted`),S=s.useState(`openChangeReason`),C=s.useState(`activeTriggerElement`),w=s.useState(`floatingRootContext`);L4({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}});let T=s.useState(`disabled`),E=s.useState(`openOnHover`),D=s.useState(`closeDelay`);Bre(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?s.context.popupRef.current:!0}let k=i===void 0?O:i,A={open:f,side:c.side,align:c.align,instant:m,transitionStatus:h},j=y!==!1&&d,M=b.useCallback(e=>{s.set(`popupElement`,e)},[s]),N=AE(`div`,e,{state:A,ref:[t,s.context.popupRef,M],props:[g,{"aria-labelledby":_,"aria-describedby":v,onKeyDown(e){l&&e3.has(e.key)&&e.stopPropagation()}},M7(h),o],stateAttributesMapping:Zae});return(0,G.jsx)(r8,{context:w,openInteractionType:p,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:gT(C)?C:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:(0,G.jsx)(Xae,{value:u,children:N})})});function $ae({...e}){return(0,G.jsx)(Hae,{"data-slot":`popover`,...e})}function eoe({...e}){return(0,G.jsx)(Uae,{"data-slot":`popover-trigger`,...e})}function toe({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,G.jsx)(Gae,{children:(0,G.jsx)(qae,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,G.jsx)(Qae,{"data-slot":`popover-content`,className:cO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden`,e),...a})})})}var l9=[{value:`en-US`,label:`English (US)`},{value:`es-ES`,label:`español (España)`},{value:`fr-FR`,label:`français (France)`},{value:`de-DE`,label:`Deutsch`},{value:`it-IT`,label:`italiano`},{value:`am-ET`,label:`አማርኛ`},{value:`ar`,label:`العربية`},{value:`bg-BG`,label:`български`},{value:`bn-BD`,label:`বাংলা`},{value:`bs-BA`,label:`bosanski`},{value:`ca-ES`,label:`català`},{value:`cs-CZ`,label:`čeština`},{value:`da-DK`,label:`dansk`},{value:`el-GR`,label:`Ελληνικά`},{value:`es-419`,label:`español (Latinoamérica)`},{value:`et-EE`,label:`eesti`},{value:`fi-FI`,label:`suomi`},{value:`fr-CA`,label:`français (Canada)`},{value:`gu-IN`,label:`ગુજરાતી`},{value:`hi-IN`,label:`हिन्दी`},{value:`hr-HR`,label:`hrvatski`},{value:`hu-HU`,label:`magyar`},{value:`hy-AM`,label:`հայերեն`},{value:`id-ID`,label:`Indonesia`},{value:`is-IS`,label:`íslenska`},{value:`ja-JP`,label:`日本語`},{value:`ka-GE`,label:`ქართული`},{value:`kk-KZ`,label:`қазақ тілі`},{value:`kn-IN`,label:`ಕನ್ನಡ`},{value:`ko-KR`,label:`한국어`},{value:`lt-LT`,label:`lietuvių`},{value:`lv-LV`,label:`latviešu`},{value:`mk-MK`,label:`македонски`},{value:`ml-IN`,label:`മലയാളം`},{value:`mn-MN`,label:`монгол`},{value:`mr-IN`,label:`मराठी`},{value:`ms-MY`,label:`Bahasa Melayu`},{value:`my-MM`,label:`မြန်မာ`},{value:`nb-NO`,label:`norsk bokmål`},{value:`nl-NL`,label:`Nederlands`},{value:`pa-IN`,label:`ਪੰਜਾਬੀ`},{value:`pl-PL`,label:`polski`},{value:`pt-BR`,label:`português (Brasil)`},{value:`pt-PT`,label:`português (Portugal)`},{value:`ro-RO`,label:`română`},{value:`ru-RU`,label:`русский`},{value:`sk-SK`,label:`slovenčina`},{value:`sl-SI`,label:`slovenščina`},{value:`so-SO`,label:`Soomaali`},{value:`sq-AL`,label:`shqip`},{value:`sr-RS`,label:`српски`},{value:`sv-SE`,label:`svenska`},{value:`sw-KE`,label:`Kiswahili`},{value:`ta-IN`,label:`தமிழ்`},{value:`te-IN`,label:`తెలుగు`},{value:`th-TH`,label:`ไทย`},{value:`tl-PH`,label:`Tagalog`},{value:`tr-TR`,label:`Türkçe`},{value:`uk-UA`,label:`українська`},{value:`ur-PK`,label:`اردو`},{value:`vi-VN`,label:`Tiếng Việt`},{value:`zh-Hans`,label:`简体中文`},{value:`zh-Hant-HK`,label:`繁體中文(香港)`},{value:`zh-Hant-TW`,label:`繁體中文(台灣)`}],noe=({value:e,onValueChange:t})=>{let[n,r]=(0,b.useState)(!1),i=l9.find(t=>t.value===e);return(0,G.jsxs)($ae,{open:n,onOpenChange:r,children:[(0,G.jsx)(eoe,{children:(0,G.jsxs)(lO,{variant:`outline`,role:`combobox`,"aria-expanded":n,className:`w-full justify-between`,children:[i?(0,G.jsxs)(`span`,{children:[i.value,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`- `,i.label]})]}):`Select locale...`,(0,G.jsx)(an,{className:`ml-2 h-4 w-4 shrink-0 opacity-50`})]})}),(0,G.jsx)(toe,{className:`w-full p-0`,children:(0,G.jsxs)(Nae,{children:[(0,G.jsx)(Pae,{placeholder:`Search locale...`}),(0,G.jsxs)(Fae,{children:[(0,G.jsx)(Iae,{children:`No locale found.`}),(0,G.jsx)(Lae,{children:l9.map(n=>(0,G.jsxs)(Rae,{value:n.value,onSelect:n=>{t(n===e?``:n),r(!1)},children:[(0,G.jsxs)(`span`,{children:[n.label,` `,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,n.value,`)`]})]}),(0,G.jsx)(tn,{className:cO(`ml-auto h-4 w-4`,e===n.value?`opacity-100`:`opacity-0`)})]},n.value))})]})]})})]})};function roe({resourceUri:e}){let{data:t}=lT(e);return t?(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(W3,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:4,collapseStringsAfterLength:80})}):null}var ioe=()=>{let e=cT(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=KS(e.name),{setToolData:i}=GS(),a=e._meta?.[`openai/outputTemplate`],o=(r,a)=>{let o=t?.current?.contentWindow?.openai;o&&n&&(o[r]=a,i(e.name,{openaiObject:{...n,[r]:a}}))};return n?(0,G.jsx)(`div`,{className:`overflow-auto max-h-full min-h-0`,children:(0,G.jsxs)(m3,{defaultValue:`widget-state`,className:`gap-0`,children:[(0,G.jsxs)(g3,{className:`border-b border-border w-full`,children:[(0,G.jsx)(_3,{value:`properties`,children:`Properties`}),(0,G.jsx)(_3,{value:`widget-state`,children:`Widget State`}),a&&(0,G.jsx)(_3,{value:`resource`,children:`Resource`})]}),(0,G.jsx)(v3,{value:`properties`,className:`p-4`,children:(0,G.jsxs)(kie,{children:[(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Display Mode`}),(0,G.jsxs)(J7,{value:n.displayMode,onValueChange:e=>o(`displayMode`,e),"aria-label":`Select framework`,items:[{label:`Inline`,value:`inline`},{label:`Fullscreen`,value:`fullscreen`},{label:`Pip`,value:`pip`},{label:`Modal`,value:`modal`}],name:`displayMode`,required:!0,children:[(0,G.jsx)(Z7,{children:(0,G.jsx)(X7,{})}),(0,G.jsx)(Q7,{children:(0,G.jsxs)(Y7,{children:[(0,G.jsx)($7,{value:`inline`,children:`Inline`}),(0,G.jsx)($7,{value:`fullscreen`,children:`Fullscreen`}),(0,G.jsx)($7,{value:`pip`,children:`Pip`}),(0,G.jsx)($7,{value:`modal`,children:`Modal`})]})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Theme`}),(0,G.jsxs)(Die,{children:[(0,G.jsx)(lO,{variant:n.theme===`light`?`default`:`outline`,onClick:()=>o(`theme`,`light`),children:(0,G.jsx)(mn,{})}),(0,G.jsx)(lO,{variant:n.theme===`dark`?`default`:`outline`,onClick:()=>o(`theme`,`dark`),children:(0,G.jsx)(un,{})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Locale`}),(0,G.jsx)(noe,{value:n.locale,onValueChange:e=>o(`locale`,e)})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Max Height`}),(0,G.jsx)(d7,{type:`number`,value:n.maxHeight===void 0?``:String(n.maxHeight),onChange:e=>{let t=e.target.value.trim();o(`maxHeight`,t===``?void 0:Number(t))}})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Safe Area Insets`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-4`,children:[`top`,`bottom`,`left`,`right`].map(e=>{let t=e.charAt(0).toUpperCase()+e.slice(1);return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{htmlFor:`safeArea-${e}`,className:`text-xs text-muted-foreground block mb-1`,children:t}),(0,G.jsx)(d7,{id:`safeArea-${e}`,type:`number`,value:n.safeArea?.insets?.[e]===void 0?`0`:String(n.safeArea.insets[e]),onChange:t=>{let r=t.target.value.trim();o(`safeArea`,{...n.safeArea,insets:{...n.safeArea?.insets,[e]:r===``?0:Number(r)}})}})]},e)})})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Device Type`}),(0,G.jsxs)(J7,{value:n.userAgent?.device?.type??`desktop`,onValueChange:e=>o(`userAgent`,{...n.userAgent,device:{...n.userAgent?.device,type:e}}),"aria-label":`Select device type`,items:[{label:`Mobile`,value:`mobile`},{label:`Desktop`,value:`desktop`}],name:`deviceType`,required:!0,children:[(0,G.jsx)(Z7,{children:(0,G.jsx)(X7,{})}),(0,G.jsx)(Q7,{children:(0,G.jsxs)(Y7,{children:[(0,G.jsx)($7,{value:`mobile`,children:`Mobile`}),(0,G.jsx)($7,{value:`desktop`,children:`Desktop`})]})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Capabilities`}),(0,G.jsxs)(`div`,{className:`flex gap-8`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`hover`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Hover`}),(0,G.jsx)(r9,{id:`hover`,checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:e}})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`touch`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Touch`}),(0,G.jsx)(r9,{id:`touch`,checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:e}})})]})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Open in App URL`}),(0,G.jsx)(d7,{type:`text`,value:r??``,readOnly:!0,placeholder:`Not set`,className:`font-mono text-xs`})]})]})}),(0,G.jsx)(v3,{value:`widget-state`,className:`p-4`,children:(0,G.jsx)(W3,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,collapsed:3,collapseStringsAfterLength:80})}),a&&(0,G.jsx)(v3,{value:`resource`,className:`p-4`,children:(0,G.jsx)(b.Suspense,{fallback:(0,G.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Loading resource...`}),children:(0,G.jsx)(roe,{resourceUri:a})})})]})}):null};function u9(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function aoe(e,t=60){let n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function ooe({log:e}){let[t,n]=(0,b.useState)(!1),r=Object.keys(e.args).length>0,i=r?aoe(e.args):null;return(0,G.jsxs)(G.Fragment,{children:[r?(0,G.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:u9(e.timestamp)}),(0,G.jsx)(`span`,{className:cO(`font-semibold shrink-0 min-w-[120px]`,e.type===`response`?`text-green-600 dark:text-green-400`:`text-blue-600 dark:text-blue-400`),children:e.command}),(0,G.jsx)(`span`,{className:`text-gray-500 dark:text-gray-600 mr-1`,children:t?`▼`:`▶`}),(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0`,children:i})]}):(0,G.jsxs)(`div`,{className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:u9(e.timestamp)}),(0,G.jsx)(`span`,{className:`text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]`,children:e.command})]}),t&&r&&(0,G.jsx)(`div`,{className:`px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50`,children:(0,G.jsx)(`pre`,{className:`text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto`,children:JSON.stringify(e.args,null,2)})})]})}function soe(){let e=cT(),{setToolData:t}=GS(),{openaiLogs:n}=KS(e.name),r=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight)},[]),(0,G.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden min-h-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-3 h-8 flex-none`,children:[(0,G.jsx)(`h3`,{className:`text-sm font-semibold text-gray-900 dark:text-gray-200`,children:`MCP client logs`}),(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:n.length>0&&(0,G.jsxs)(lO,{variant:`ghost`,size:`sm`,onClick:()=>{t(e.name,{openaiLogs:[]})},children:[(0,G.jsx)(hn,{className:`w-3 h-3`}),`Clear`]})})]}),(0,G.jsx)(`div`,{ref:r,className:`overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0`,children:n.map(e=>(0,G.jsx)(ooe,{log:e},e.id))})]})}var coe=BE(`relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground`,error:`border-destructive/32 bg-destructive/4 [&>svg]:text-destructive`,info:`border-info/32 bg-info/4 [&>svg]:text-info`,success:`border-success/32 bg-success/4 [&>svg]:text-success`,warning:`border-warning/32 bg-warning/4 [&>svg]:text-warning`}}});function loe({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{className:cO(coe({variant:t}),e),"data-slot":`alert`,role:`alert`,...n})}function uoe({className:e,...t}){return(0,G.jsx)(`div`,{className:cO(`font-medium [svg~&]:col-start-2`,e),"data-slot":`alert-title`,...t})}function doe({className:e,...t}){return(0,G.jsx)(`div`,{className:cO(`flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2`,e),"data-slot":`alert-description`,...t})}var foe=()=>{let e=KS(cT().name);return e?(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden bg-card`,children:(0,G.jsx)(`div`,{className:`p-4 overflow-auto`,children:e.response?e.response.isError?(0,G.jsxs)(loe,{variant:`error`,children:[(0,G.jsx)(on,{}),(0,G.jsx)(uoe,{children:`Error`}),(0,G.jsx)(doe,{children:(()=>{let t=[];return e.response.content.forEach(e=>{e.type===`text`&&t.push(e.text)}),t.join(`
152
+ )`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),rie=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=K3(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(K5.Provider,{value:n,children:(0,G.jsxs)(R6,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(q5,{ref:i.context.internalBackdropRef,inert:E4(!s)}),e.children]})}):null});function J5(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}var Y5={},X5={},Z5=``;function iie(e){if(typeof document>`u`)return!1;let t=U1(e);return fT(t).innerWidth-t.documentElement.clientWidth>0}function aie(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=U1(e),n=t.documentElement,r=t.body,i=vT(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function oie(e){let t=U1(e),n=t.documentElement,r=t.body,i=vT(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function sie(e){let t=U1(e),n=t.documentElement,r=t.body,i=fT(n),a=0,o=0,s=!1,c=N4.create();if(v0&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Y5={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Z5=n.style.scrollBehavior,X5={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=vT(n)?n:r;if(s=aie(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Y5),Object.assign(r.style,X5),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Z5)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var cie=new class{lockCount=0;restore=null;timeoutLock=s6.create();timeoutUnlock=s6.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=U1(e).documentElement,n=fT(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=SE;return}this.restore=y0||!iie(e)?oie(e):sie(e)}};function Q5(e=!0,t=null){$(()=>{if(e)return cie.acquire(t)},[e,t])}function lie(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function $5(e,t){let n=b.useRef(e),r=zT(t);$(()=>{n.current!==e&&r(n.current)},[e,r]),$(()=>{n.current=e},[e])}function e7(e){let[t,n]=b.useState(null),r=zT((t,r)=>{e||n(r||(y0?`touch`:``))});$5(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=lie(r);return b.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function uie(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l}=e7(i);w5(t);let{forceUnmount:u}=T5(i,t),d=zT(e=>{let n=p0(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),f=b.useCallback(()=>{t.setOpen(!1,d(d0))},[t,d]);b.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=j5({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=m===0,_=B5(p),v=c8(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=F0(e);if(g&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||N0(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:g});Q5(i&&o===!0,s);let{getReferenceProps:y,getFloatingProps:x,getTriggerProps:S}=P5([_,v]);t.useContextCallback(`onNestedDialogOpen`,e=>{h(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);let C=b.useMemo(()=>y(l),[y,l]),w=b.useMemo(()=>S(l),[S,l]),T=b.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:p,nestedOpenDialogCount:m})}var die={...k5,modal:_5(e=>e.modal),nested:_5(e=>e.nested),nestedOpenDialogCount:_5(e=>e.nestedOpenDialogCount),disablePointerDismissal:_5(e=>e.disablePointerDismissal),openMethod:_5(e=>e.openMethod),descriptionElementId:_5(e=>e.descriptionElementId),titleElementId:_5(e=>e.titleElementId),viewportElement:_5(e=>e.viewportElement),role:_5(e=>e.role)},fie=class extends S5{constructor(e){super(pie(e),{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new E5,onOpenChange:void 0,onOpenChangeComplete:void 0},die)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function pie(e={}){return{...D5(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function mie(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=K3(!0),p=!!f,m=IT(()=>l?.store??new fie({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:p})).current;J5(()=>{n===void 0&&m.state.open===!1&&r===!0&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp(`openProp`,n),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);uie({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=b.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(G3.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}var hie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=K3(),s=J1(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),AE(`h2`,e,{ref:t,props:[{id:s},a]})});function gie({...e}){return(0,G.jsx)(mie,{"data-slot":`dialog`,...e})}function _ie({...e}){return(0,G.jsx)(rie,{"data-slot":`dialog-portal`,...e})}function vie({className:e,...t}){return(0,G.jsx)(i6,{"data-slot":`dialog-overlay`,className:cO(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,e),...t})}function yie({className:e,children:t,showCloseButton:n=!0,...r}){return(0,G.jsxs)(_ie,{children:[(0,G.jsx)(vie,{}),(0,G.jsxs)(nie,{"data-slot":`dialog-content`,className:cO(`bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,e),...r,children:[t,n&&(0,G.jsxs)(a6,{"data-slot":`dialog-close`,render:(0,G.jsx)(lO,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,G.jsx)(gn,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function bie({className:e,...t}){return(0,G.jsx)(hie,{"data-slot":`dialog-title`,className:cO(`text-sm font-medium`,e),...t})}var xie=()=>{let e=cT(),[t,n]=(0,b.useState)(!1);return e._meta&&Object.keys(e._meta).length>0?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(lO,{variant:`ghost`,size:`default`,onClick:()=>n(!0),"aria-label":`View tool metadata`,title:`View tool metadata`,children:[(0,G.jsx)(sn,{className:`h-4 w-4`}),`Metadata`]}),(0,G.jsx)(gie,{open:t,onOpenChange:n,children:(0,G.jsxs)(yie,{className:`sm:max-w-2xl`,children:[(0,G.jsx)(bie,{children:`Tool Metadata`}),(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(W3,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},Sie={"ui:submitButtonOptions":{norender:!0}},Cie=({schema:e,formData:t,setFormData:n,ref:r})=>!e?.properties||Object.keys(e.properties).length===0?(0,G.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This tool requires no input`})}):(0,G.jsx)(y3,{children:(0,G.jsx)(b3,{children:(0,G.jsx)(O1,{ref:r,schema:e??{},validator:AK,uiSchema:Sie,formData:t,onChange:e=>n(e.formData),showErrorList:!1,templates:{FieldTemplate:e=>{let{id:t,classNames:n,style:r,label:i,required:a,errors:o,children:s}=e;return(0,G.jsxs)(`div`,{className:cO(`flex flex-col gap-2`,n),style:r,children:[(0,G.jsxs)(`label`,{htmlFor:t,className:`text-sm text-foreground`,children:[i,a&&(0,G.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,o]})]})},FieldErrorTemplate:e=>e.errors&&e.errors.length>0?(0,G.jsx)(`div`,{className:`text-sm text-destructive mt-1 flex items-center gap-1`,children:(0,G.jsx)(`span`,{children:e.errors.join(`, `)})}):null}})})}),wie=({formData:e,setFormData:t})=>{let[n,r]=(0,b.useState)(JSON.stringify(e,null,2));(0,b.useEffect)(()=>{r(JSON.stringify(e,null,2))},[e]);let i=e=>{r(e);try{t(JSON.parse(e))}catch{}};return(0,G.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,G.jsx)(`textarea`,{className:`w-full h-full p-2 rounded-md border border-border`,rows:12,value:n,onChange:e=>i(e.target.value)})})},Tie=()=>{let e=(0,b.useRef)(null),t=cT(),{setToolData:n}=GS(),r=KS(t.name)?.input??{},i=e=>{n(t.name,{input:e??{}})};return(0,G.jsxs)(`div`,{className:cO(`flex flex-col h-full overflow-hidden border-r border-border`),children:[(0,G.jsxs)(`div`,{className:`shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]`,children:[(0,G.jsx)(`h2`,{className:`font-semibold text-foreground`,children:t.name}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(xie,{}),(0,G.jsx)(H3,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:r})]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-auto px-6 py-6 bg-muted/50`,children:(0,G.jsxs)(m3,{defaultValue:`form`,children:[(0,G.jsxs)(g3,{children:[(0,G.jsx)(_3,{value:`form`,children:`Form`}),(0,G.jsx)(_3,{value:`json`,children:`JSON`})]}),(0,G.jsx)(v3,{value:`form`,children:(0,G.jsx)(Cie,{schema:t.inputSchema,formData:r,setFormData:i,ref:e},t.name)}),(0,G.jsx)(v3,{value:`json`,children:(0,G.jsx)(wie,{formData:r,setFormData:i},t.name)})]})})]})},Eie=BE(`rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none`,vertical:`flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none`}},defaultVariants:{orientation:`horizontal`}});function Die({className:e,orientation:t,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:cO(Eie({orientation:t}),e),...n})}function Oie({className:e,...t}){return(0,G.jsx)(`label`,{"data-slot":`label`,className:cO(`gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,e),...t})}function kie({className:e,...t}){return(0,G.jsx)(`fieldset`,{"data-slot":`field-set`,className:cO(`gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col`,e),...t})}var Aie=BE(`data-[invalid=true]:text-destructive gap-2 group/field flex w-full`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function t7({className:e,orientation:t=`vertical`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:cO(Aie({orientation:t}),e),...n})}function n7({className:e,...t}){return(0,G.jsx)(Oie,{"data-slot":`field-label`,className:cO(`has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}var r7=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),jie={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},i7={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mie={disabled:!1,...i7},a7={valid(e){return e===null?null:e?{[r7.valid]:``}:{[r7.invalid]:``}}},Nie=b.createContext({invalid:void 0,name:void 0,validityData:{state:jie,errors:[],error:``,value:``,initialValue:null},setValidityData:SE,disabled:void 0,touched:i7.touched,setTouched:SE,dirty:i7.dirty,setDirty:SE,filled:i7.filled,setFilled:SE,focused:i7.focused,setFocused:SE,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mie,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=wE)=>e,getInputValidationProps:(e=wE)=>e,inputRef:{current:null},commit:async()=>{}}});function o7(e=!0){let t=b.useContext(Nie);if(t.setValidityData===SE&&!e)throw Error(rE(28));return t}var Pie=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:SE,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function s7(){return b.useContext(Pie)}var Fie=b.createContext({controlId:void 0,registerControlId:SE,labelId:void 0,setLabelId:SE,messageIds:[],setMessageIds:SE,getDescriptionProps:e=>e});function c7(){return b.useContext(Fie)}function Iie(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function l7(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=c7(),o=J1(t),s=n?i:void 0,c=IT(()=>Symbol(`labelable-control`)),l=b.useRef(!1),u=b.useRef(t!=null),d=zT(()=>{!l.current||a===SE||(l.current=!1,a(c.current,void 0))});return $(()=>{if(a===SE)return;let e;if(n){let n=r?.current;e=hT(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),b.useEffect(()=>d,[d]),i??o}function u7(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=s7(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=o7(),f=zT(e.getValue);$(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),$(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:Iie(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?Lq.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),$(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var Lie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:_,setFocused:v,setFilled:y,validationMode:x,validation:S}=o7(),C=m||s,w=p??a,T={...f,disabled:C},{labelId:E}=c7(),D=l7({id:i});$(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?y(!0):e&&o===``&&y(!1)},[S.inputRef,y,o]);let O=b.useRef(null);$(()=>{u&&O.current===M0(U1(O.current))&&v(!0)},[u,v]);let[k]=k1({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0;return u7({id:D,name:w,commit:S.commit,value:j,getValue:()=>S.inputRef.current?.value,controlRef:S.inputRef}),AE(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,p0(t0,e.nativeEvent)),g(t!==_.initialValue),y(t!==``)},onFocus(){v(!0)},onBlur(e){h(!0),v(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(h(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),d],stateAttributesMapping:a7})}),Rie=b.forwardRef(function(e,t){return(0,G.jsx)(Lie,{ref:t,...e})});function d7({className:e,type:t,...n}){return(0,G.jsx)(Rie,{type:t,"data-slot":`input`,className:cO(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,e),...n})}var f7=b.createContext(null),p7=b.createContext(null);function m7(){let e=b.useContext(f7);if(e===null)throw Error(rE(60));return e}function h7(){let e=b.useContext(p7);if(e===null)throw Error(rE(61));return e}var zie=(e,t)=>Object.is(e,t);function g7(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Bie(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:g7(t,e,n))}function _7(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:g7(e,t,n))}function Vie(e,t,n){return e.filter(e=>!g7(t,e,n))}function v7(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function y7(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Hie(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(y7(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Uie(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return v7(e)}function b7(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?v7(e.value):v7(e)}function x7(e,t,n){function r(){return Uie(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=y7(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Wie(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,G.jsx)(b.Fragment,{children:x7(r,t,n)},i)),e),[])}var S7={id:_5(e=>e.id),labelId:_5(e=>e.labelId),modal:_5(e=>e.modal),multiple:_5(e=>e.multiple),items:_5(e=>e.items),itemToStringLabel:_5(e=>e.itemToStringLabel),itemToStringValue:_5(e=>e.itemToStringValue),isItemEqualToValue:_5(e=>e.isItemEqualToValue),value:_5(e=>e.value),hasSelectedValue:_5(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:b7(t,r)!==``}),hasNullItemLabel:_5((e,t)=>t?Hie(e.items):!1),open:_5(e=>e.open),mounted:_5(e=>e.mounted),forceMount:_5(e=>e.forceMount),transitionStatus:_5(e=>e.transitionStatus),openMethod:_5(e=>e.openMethod),activeIndex:_5(e=>e.activeIndex),selectedIndex:_5(e=>e.selectedIndex),isActive:_5((e,t)=>e.activeIndex===t),isSelected:_5((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>g7(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:g7(n,i,r)}),isSelectedByFocus:_5((e,t)=>e.selectedIndex===t),popupProps:_5(e=>e.popupProps),triggerProps:_5(e=>e.triggerProps),triggerElement:_5(e=>e.triggerElement),positionerElement:_5(e=>e.positionerElement),listElement:_5(e=>e.listElement),scrollUpArrowVisible:_5(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:_5(e=>e.scrollDownArrowVisible),hasScrollArrows:_5(e=>e.hasScrollArrows)};function Gie(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:d=!1,required:f=!1,modal:p=!0,actionsRef:m,inputRef:h,onOpenChangeComplete:g,items:_,multiple:v=!1,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S=zie,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=s7(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=o7(),I=l7({id:t}),L=N||u,R=M??c,[z,B]=k1({controlled:n,default:v?r??CE:r,name:`Select`,state:`value`}),[V,H]=k1({controlled:a,default:o,name:`Select`,state:`open`}),U=b.useRef([]),ee=b.useRef([]),W=b.useRef(null),te=b.useRef(null),ne=b.useRef(0),re=b.useRef(null),ie=b.useRef([]),ae=b.useRef(!1),oe=b.useRef(!1),se=b.useRef(null),ce=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),le=b.useRef(!1),{mounted:ue,setMounted:de,transitionStatus:fe}=R4(V),{openMethod:pe,triggerProps:me}=e7(V),he=IT(()=>new x5({id:I,labelId:void 0,modal:p,multiple:v,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,value:z,open:V,mounted:ue,transitionStatus:fe,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ge=b5(he,S7.activeIndex),_e=b5(he,S7.selectedIndex),ve=b5(he,S7.triggerElement),ye=b5(he,S7.positionerElement),be=b.useMemo(()=>v&&Array.isArray(z)&&z.length===0?``:b7(z,x),[v,z,x]),xe=b.useMemo(()=>v&&Array.isArray(z)?z.map(e=>b7(e,x)):b7(z,x),[v,z,x]),Se=p6(he.state.triggerElement);u7({id:I,commit:P.commit,value:z,controlRef:Se,name:R,getValue:()=>xe});let Ce=b.useRef(z);$(()=>{z!==Ce.current&&he.set(`forceMount`,!0)},[he,z]),$(()=>{j(v?Array.isArray(z)&&z.length>0:z!=null)},[v,z,j]),$(function(){if(V)return;let e=ie.current;if(v){let t=Array.isArray(z)?z:[];if(t.length===0){he.set(`selectedIndex`,null);return}let n=t[t.length-1],r=_7(e,n,S);he.set(`selectedIndex`,r===-1?null:r);return}let t=_7(e,z,S);he.set(`selectedIndex`,t===-1?null:t)},[v,V,z,ie,S,he]),$5(z,()=>{T(R),E(z!==A.initialValue),k()?P.commit(z):P.commit(z,!0)});let we=zT((e,t)=>{if(s?.(e,t),!t.isCanceled&&(H(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),F===`onBlur`&&P.commit(z)),!e&&he.state.activeIndex!==null)){let e=U.current[he.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Te=zT(()=>{de(!1),he.set(`activeIndex`,null),g?.(!1)});L4({enabled:!m,open:V,ref:W,onComplete(){V||Te()}}),b.useImperativeHandle(m,()=>({unmount:Te}),[Te]);let Ee=zT((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),De=zT(()=>{let e=he.state.listElement||W.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;he.state.scrollUpArrowVisible!==r&&he.set(`scrollUpArrowVisible`,r),he.state.scrollDownArrowVisible!==i&&he.set(`scrollDownArrowVisible`,i)}),Oe=A5({open:V,onOpenChange:we,elements:{reference:ve,floating:ye}}),{getReferenceProps:ke,getFloatingProps:Ae,getItemProps:je}=P5([i8(Oe,{enabled:!d&&!L,event:`mousedown`}),c8(Oe,{bubbles:!1}),Kre(Oe,{enabled:!d&&!L,listRef:U,activeIndex:ge,selectedIndex:_e,disabledIndices:CE,onNavigate(e){e===null&&!V||he.set(`activeIndex`,e)},focusItemOnHover:!1}),Jre(Oe,{enabled:!d&&!L&&(V||!v),listRef:ee,activeIndex:ge,selectedIndex:_e,onMatch(e){V?he.set(`activeIndex`,e):Ee(ie.current[e],p0(`none`))},onTypingChange(e){ae.current=e}})]),Me=b.useMemo(()=>GT(ke(),me,I?{id:I}:wE),[ke,me,I]);J5(()=>{he.update({popupProps:Ae(),triggerProps:Me})}),$(()=>{he.update({id:I,modal:p,multiple:v,value:z,open:V,mounted:ue,transitionStatus:fe,popupProps:Ae(),triggerProps:Me,items:_,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,openMethod:pe})},[he,I,p,v,z,V,ue,fe,Ae,Me,_,y,x,S,pe]);let Ne=b.useMemo(()=>({store:he,name:R,required:f,disabled:L,readOnly:d,multiple:v,itemToStringLabel:y,itemToStringValue:x,highlightItemOnHover:C,setValue:Ee,setOpen:we,listRef:U,popupRef:W,scrollHandlerRef:te,handleScrollArrowVisibility:De,scrollArrowsMountedCountRef:ne,getItemProps:je,events:Oe.context.events,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,selectedItemTextRef:se,validation:P,onOpenChangeComplete:g,keyboardActiveRef:oe,alignItemWithTriggerActiveRef:le,initialValueRef:Ce}),[he,R,f,L,d,v,y,x,C,Ee,we,je,Oe.context.events,P,g,De]),Pe=uE(h,P.inputRef),Fe=v&&Array.isArray(z)&&z.length>0,Ie=v?void 0:R,Le=b.useMemo(()=>!v||!Array.isArray(z)||!R?null:z.map(e=>{let t=b7(e,x);return(0,G.jsx)(`input`,{type:`hidden`,name:R,value:t},t)}),[v,z,R,x]);return(0,G.jsx)(f7.Provider,{value:Ne,children:(0,G.jsxs)(p7.Provider,{value:Oe,children:[w,(0,G.jsx)(`input`,{...P.getInputValidationProps({onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=p0(t0,e.nativeEvent);function r(){if(v)return;let e=ie.current.find(e=>b7(e,x).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Ee(e,n),k()&&P.commit(e))}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Ie==null?`${I}-hidden-input`:void 0,name:Ie,autoComplete:l,value:be,disabled:L,required:f&&!Fe,readOnly:d,ref:Pe,style:R?_6:g6,tabIndex:-1,"aria-hidden":!0}),Le]})})}function Kie(e,t){return e??t}function qie(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var C7=2,Jie=400,w7=200,Yie={...t6,...a7,value:()=>null},Xie=b.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=o7(),{labelId:p}=c7(),{store:m,setOpen:h,selectionRef:g,validation:_,readOnly:v,required:y,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=m7(),w=f||S||a,T=b5(m,S7.open),E=b5(m,S7.value),D=b5(m,S7.triggerProps),O=b5(m,S7.positionerElement),k=b5(m,S7.listElement),A=b5(m,S7.id),j=b5(m,S7.labelId),M=b5(m,S7.hasSelectedValue),N=!M&&T,P=b5(m,S7.hasNullItemLabel,N),F=i??A,I=Kie(p,j);l7({id:F});let L=p6(O),R=b.useRef(null),{getButtonProps:z,buttonRef:B}=sE({disabled:w,native:o}),V=uE(t,R,B,zT(e=>{m.set(`triggerElement`,e)})),H=c6(),U=c6(),ee=c6(),W=c6();b.useEffect(()=>{if(T)return M||P?W.start(w7,()=>{g.current.allowUnselectedMouseUp=!0,ee.start(w7,()=>{g.current.allowSelectedMouseUp=!0})}):ee.start(Jie,()=>{g.current.allowUnselectedMouseUp=!0,g.current.allowSelectedMouseUp=!0}),()=>{ee.clear(),W.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},U.clear()},[T,M,P,g,U,ee,W]);let te=b.useMemo(()=>k?.id??B0(O)?.id,[k,O]),ne=GT(D,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?te:void 0,"aria-labelledby":I,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:w?-1:0,ref:V,onFocus(e){l(!0),T&&x.current&&h(!1,p0(t0,e.nativeEvent)),H.start(0,()=>{m.set(`forceMount`,!0)})},onBlur(e){N0(O,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&_.commit(E))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=U1(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;if(N0(R.current,t)||N0(L.current,t)||t===R.current)return;let n=qie(R.current);e.clientX>=n.left-C7&&e.clientX<=n.right+C7&&e.clientY>=n.top-C7&&e.clientY<=n.bottom+C7||h(!1,p0(u0,e))}U.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},_.getValidationProps,s,z);ne.role=`combobox`;let re={...d,open:T,disabled:w,value:E,readOnly:v,placeholder:!M};return AE(`button`,e,{ref:[t,R],state:re,stateAttributesMapping:Yie,props:ne})}),Zie={value:()=>null},Qie=b.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:c}=m7(),l=b5(s,S7.value),u=b5(s,S7.items),d=b5(s,S7.itemToStringLabel),f=b5(s,S7.hasSelectedValue),p=!f&&a!=null&&i==null,m=b5(s,S7.hasNullItemLabel,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(!f&&a!=null&&!m?a:Array.isArray(l)?Wie(l,u,d):x7(l,u,d)),AE(`span`,e,{state:h,ref:[t,c],props:[{children:g},o],stateAttributesMapping:Zie})}),$ie=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=m7();return AE(`span`,e,{state:{open:b5(a,S7.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:e6})}),eae=b.createContext(void 0),tae=b.forwardRef(function(e,t){let{store:n}=m7(),r=b5(n,S7.mounted),i=b5(n,S7.forceMount);return r||i?(0,G.jsx)(eae.Provider,{value:!0,children:(0,G.jsx)(R6,{ref:t,...e})}):null}),nae=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,offsetParent:d=`real`}=r2(e,t)||{};if(l==null)return{};let f=x2(u),p={x:n,y:r},m=l2(i),h=s2(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=n2(k,j,A),N=!c.arrow&&a2(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),rae=(e,t)=>({...nae(e),options:[e,t]}),iae={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await rre().fn(e)).data?.referenceHidden||a}}}},T7={sideX:`left`,sideY:`top`},aae={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=fT(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:T7};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=U1(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=i2(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:T7.sideX,g=f===`top`?`bottom`:T7.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function E7(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function D7(e,t,n){let{rects:r,placement:i}=e;return{side:E7(t,i2(i),n),align:a2(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function O7(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:x}=e,[S,C]=b.useState(null);!m&&S!==null&&C(null);let w=h.side||`flip`,T=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=zT(D),k=D?O:t,A=p6(t),j=L1()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=r===`bottom`?1:0,I=r===`top`?1:0,L=r===`right`?1:0,R=r===`left`?1:0;typeof P==`number`?P={top:P+F,right:P+R,bottom:P+I,left:P+L}:P&&={top:(P.top||0)+F,right:(P.right||0)+R,bottom:(P.bottom||0)+I,left:(P.left||0)+L};let z={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},B=b.useRef(null),V=p6(i),H=p6(o),U=[Qne(e=>{let t=D7(e,r,j),n=typeof V.current==`function`?V.current(t):V.current,i=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],ee=T===`none`&&w!==`shift`,W=!ee&&(l||g||w===`shift`),te=w===`none`?null:tre({...z,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!g&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),ne=ee?null:$ne(e=>{let t=U1(e.elements.floating).documentElement;return{...z,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:W,limiter:l||g?void 0:ere(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=c2(i2(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[z,l,g,P,T]);w===`shift`||T===`shift`||a===`center`?U.push(ne,te):U.push(te,ne),U.push(nre({...z,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),rae(()=>({element:B.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=i2(a),l=c2(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(D7(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,W&&l===`y`&&b?S:x),{}}},iae,v),$(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,p]);let re=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=Fre({rootContext:p,placement:N,middleware:U,strategy:n,whileElementsMounted:f?void 0:(...e)=>Q8(...e,re),nodeId:_,externalTree:x}),{sideX:me,sideY:he}=ce.adaptiveOrigin||T7,ge=fe?n:`fixed`,_e=b.useMemo(()=>{let e=v?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[v,ge,me,oe,he,se,pe,fe]),ve=b.useRef(null);$(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(k7(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[m,ie,k,A]),b.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&k7(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[m,ie,k,A]),b.useEffect(()=>{if(f&&m&&ae.domReference&&ae.floating)return Q8(ae.domReference,ae.floating,le,re)},[f,m,ae,le,re]);let ye=i2(ue),be=E7(r,ye,j),xe=a2(ue)||`center`,Se=!!ce.hide?.referenceHidden;$(()=>{y&&m&&fe&&C(ye)},[y,m,fe,ye]);let Ce=b.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:B,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,B,we,be,xe,ye,Se,ie,de,fe,le])}function k7(e){return e!=null&&`current`in e}var A7=b.createContext(void 0);function j7(){let e=b.useContext(A7);if(!e)throw Error(rE(59));return e}function M7(e){return e===`starting`?TE:wE}function N7(e,t){e&&Object.assign(e.style,t)}var P7={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},oae={position:`fixed`},sae=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=DE,..._}=e,{store:v,listRef:y,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=m7(),O=h7(),k=b5(v,S7.open),A=b5(v,S7.mounted),j=b5(v,S7.modal),M=b5(v,S7.value),N=b5(v,S7.openMethod),P=b5(v,S7.positionerElement),F=b5(v,S7.triggerElement),I=b5(v,S7.isItemEqualToValue),L=b5(v,S7.transitionStatus),R=b.useRef(null),z=b.useRef(null),[B,V]=b.useState(h),H=A&&B&&N!==`touch`;!A&&B!==h&&V(h),$(()=>{A||(S7.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),S7.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,A]),b.useImperativeHandle(S,()=>H),Q5((H||j)&&k&&N!==`touch`,F);let U=O7({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:g,keepMounted:!0}),ee=H?`none`:U.side,W=H?oae:U.positionerStyles,te=b.useMemo(()=>{let e={};return k||(e.pointerEvents=`none`),{role:`presentation`,hidden:!A,style:{...W,...e}}},[k,A,W]),ne={open:k,side:ee,align:U.align,anchorHidden:U.anchorHidden},re=AE(`div`,e,{ref:[t,zT(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:n6,props:[te,M7(L),_]}),ie=b.useRef(0),ae=zT(e=>{if(e.size===0&&ie.current===0||w.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=p0(t0);if(t!==0&&!v.state.multiple&&M!==null&&_7(w.current,M,I)===-1){let e=T.current,t=e!=null&&_7(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(v.set(`selectedIndex`,null),C.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(M)){let e=e=>_7(w.current,e,I)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!Bie(M,e,I)))&&(D(t,n),t.length===0&&(v.set(`selectedIndex`,null),C.current=null))}if(k&&H){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};N7(P,e),N7(E.current,e)}}),oe=b.useMemo(()=>({...U,side:ee,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[U,ee,H,V]);return(0,G.jsx)(M1,{elementsRef:y,labelsRef:x,onMapChange:ae,children:(0,G.jsxs)(A7.Provider,{value:oe,children:[A&&j&&(0,G.jsx)(q5,{inert:E4(!k),cutout:F}),re]})})});function F7(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var I7=`base-ui-disable-scrollbar`,L7={className:I7,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:I7,precedence:`base-ui:low`,children:`.${I7}{scrollbar-width:none}.${I7}::-webkit-scrollbar{display:none}`})}},cae=b.createContext(void 0);function R7(e){let t=b.useContext(cae);if(t===void 0&&!e)throw Error(rE(69));return t}function z7(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var B7=1,lae={...n6,...A4},uae=b.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=m7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:S,scrollUpArrowRef:C}=j7(),w=R7(!0)!=null,T=h7(),{nonce:E,disableStyleElements:D}=T4(),O=c6(),k=b5(o,S7.id),A=b5(o,S7.open),j=b5(o,S7.mounted),M=b5(o,S7.popupProps),N=b5(o,S7.transitionStatus),P=b5(o,S7.triggerElement),F=b5(o,S7.positionerElement),I=b5(o,S7.listElement),L=b.useRef(0),R=b.useRef(!1),z=b.useRef(0),B=b.useRef(!1),V=b.useRef({}),H=P4(),U=zT(e=>{if(!F||!s.current||!B.current)return;if(R.current||!y){m();return}let t=F.style.top===`0px`,n=F.style.bottom===`0px`,r=F.getBoundingClientRect().height,i=U1(F),a=getComputedStyle(F),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=V7(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=H7(e),p=0,h=null,g=!1,_=!1,v=e=>{F.style.height=`${e}px`},b=(t,n)=>{let i=z7(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=B7&&(R.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=B7){b(e,f);return}u-n>B7?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=B7){b(e,0);return}u-n>B7?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=H7(e),n=_?t:z7(h,0,t);Math.abs(e.scrollTop-n)>B7&&(e.scrollTop=n)}(g||p>=u-B7)&&(R.current=!0),m()});b.useImperativeHandle(h,()=>U,[U]),L4({open:A,ref:s,onComplete(){A&&c?.(!0)}});let ee={open:A,transitionStatus:N,side:_,align:v};$(()=>{!F||!s.current||Object.keys(V.current).length||(V.current={top:F.style.top||`0`,left:F.style.left||`0`,right:F.style.right,height:F.style.height,bottom:F.style.bottom,minHeight:F.style.minHeight,maxHeight:F.style.maxHeight,marginTop:F.style.marginTop,marginBottom:F.style.marginBottom})},[s,F]),$(()=>{A||y||(B.current=!1,R.current=!1,L.current=0,z.current=0,N7(F,V.current))},[A,y,F,s]),$(()=>{let e=s.current;if(!(!A||!P||!F||!e||o.state.transitionStatus===`ending`)){if(!y){B.current=!0,H.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=fae(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(F),n=getComputedStyle(e),r=U1(P),i=fT(F),a=dae(P),o=U7(P.getBoundingClientRect(),a),s=U7(F.getBoundingClientRect(),a),c=o.left,l=o.height,f=I||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=V7(n),b=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=b-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=U7(T.getBoundingClientRect(),a);E=U7(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(b,k),j=b-g-_,M=k-A,N=Math.max(5,c+D),z=S-5,H=Math.max(0,N+s.width-z);F.style.left=`${N-H}px`,F.style.height=`${A}px`,F.style.maxHeight=`auto`,F.style.marginTop=`${g}px`,F.style.marginBottom=`${_}px`,e.style.height=`100%`;let U=H7(f),ee=M>=U-B7;ee&&(A=Math.min(b,s.height)-(M-U));let W=o.top<20||o.bottom>b-20||Math.ceil(A)+B7<Math.min(p,v),te=(i.visualViewport?.scale??1)!==1&&v0;if(W||te){B.current=!0,N7(F,V.current),Lq.flushSync(()=>x(!1));return}if(ee){let e=Math.max(0,b-k);F.style.top=s.height>=j?`0`:`${e}px`,F.style.height=`${A}px`,f.scrollTop=H7(f),L.current=Math.max(v,A)}else F.style.bottom=`0`,L.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=z7(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(L.current===b||A>=y)&&(R.current=!0),m(),setTimeout(()=>{B.current=!0})}finally{t()}})}},[o,A,F,P,u,d,s,m,y,x,H,S,C,I]),b.useEffect(()=>{if(!y||!F||!A)return;let e=fT(F);function t(e){l(!1,p0(f0,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,F,A]);let W={...I?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${k}-list`},onKeyDown(e){f.current=!0,w&&e3.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||F7(e)||e.pointerType===`touch`)return;let t=e.currentTarget;O.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){I||U(e.currentTarget)},...y&&{style:I?{height:`100%`}:P7}},te=AE(`div`,e,{ref:[t,s],state:ee,stateAttributesMapping:lae,props:[M,W,M7(N),{className:!I&&y?L7.className:void 0},a]});return(0,G.jsxs)(b.Fragment,{children:[!D&&L7.getElement(E),(0,G.jsx)(r8,{context:T,modal:!1,disabled:!j,returnFocus:i,restoreFocus:!0,children:te})]})});function V7(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function H7(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function dae(e){return Y8.getScale(e)}function U7(e,t){return S2({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var W7=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function fae(e){let{style:t}=e,n={};for(let[e,r]of W7)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of W7){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var pae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=m7(),{alignItemWithTriggerActive:s}=j7(),c=b5(a,S7.hasScrollArrows),l=b5(a,S7.openMethod),u=b5(a,S7.multiple),d={id:`${b5(a,S7.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:P7},className:c&&l!==`touch`?L7.className:void 0};return AE(`div`,e,{ref:[t,zT(e=>{a.set(`listElement`,e)})],props:[d,i]})}),G7=b.createContext(void 0);function K7(){let e=b.useContext(G7);if(!e)throw Error(rE(57));return e}var mae=b.memo(b.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=b.useRef(null),u=Z1({label:a,textRef:l,indexGuessBehavior:X1.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:x}=m7(),S=c6(),C=b5(d,S7.isActive,u.index),w=b5(d,S7.isSelected,u.index,i),T=b5(d,S7.isSelectedByFocus,u.index),E=b5(d,S7.isItemEqualToValue),D=u.index,O=D!==-1,k=b.useRef(null),A=p6(D);$(()=>{if(!O)return;let e=_.current;return e[D]=i,()=>{delete e[D]}},[O,D,i,_]),$(()=>{if(!O)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&g7(i,t,E)&&d.set(`selectedIndex`,D)},[O,D,y,E,d,i]);let j={disabled:o,selected:w,highlighted:C},M=f({active:C,selected:w});M.onFocus=void 0,M.id=void 0;let N=b.useRef(null),P=b.useRef(`mouse`),F=b.useRef(!1),{getButtonProps:I,buttonRef:L}=sE({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function R(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(w?Vie(n,i,E):[...n,i],p0(a0,e))}else m(i,p0(a0,e)),p(!1,p0(a0,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onFocus(){d.set(`activeIndex`,D)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&x&&d.set(`activeIndex`,D)},onMouseMove(){x&&d.set(`activeIndex`,D)},onMouseLeave(e){!x||v.current||F7(e)||S.start(0,()=>{d.state.activeIndex===D&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,d.set(`activeIndex`,D),e.key===` `&&g.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(o||e.type===`keydown`&&N.current===` `&&g.current||P.current!==`touch`&&!C||(N.current=null,R(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(o)return;if(F.current){F.current=!1;return}let e=!h.current.allowSelectedMouseUp&&w,t=!h.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=AE(`div`,e,{ref:[L,t,u.ref,k],state:j,props:[M,z,c,I]}),V=b.useMemo(()=>({selected:w,indexRef:A,textRef:l,selectedByFocus:T,hasRegistered:O}),[w,A,l,T,O]);return(0,G.jsx)(G7.Provider,{value:V,children:B})})),hae=b.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=K7();return n||r?(0,G.jsx)(gae,{...e,ref:t}):null}),gae=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=K7(),s=b.useRef(null),{transitionStatus:c,setMounted:l}=R4(o),u=AE(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:A4});return L4({open:o,ref:s,onComplete(){o||l(!1)}}),u})),_ae=b.memo(b.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=K7(),{selectedItemTextRef:o}=m7(),{className:s,render:c,...l}=e;return AE(`div`,e,{ref:[b.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})})),q7=b.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:c,listRef:l,handleScrollArrowVisibility:u,scrollArrowsMountedCountRef:d}=m7(),{side:f,scrollDownArrowRef:p,scrollUpArrowRef:m}=j7(),h=b5(s,i===`up`?S7.scrollUpArrowVisible:S7.scrollDownArrowVisible),g=b5(s,S7.openMethod),_=h&&g!==`touch`,v=c6(),y=i===`up`?m:p,{transitionStatus:b,setMounted:x}=R4(_);$(()=>(d.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{d.current=Math.max(0,d.current-1),d.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,d]),L4({open:_,ref:y,onComplete(){_||x(!1)}});let S=AE(`div`,e,{ref:[t,y],state:{direction:i,visible:_,side:f,transitionStatus:b},props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??c.current;if(!e)return;s.set(`activeIndex`,null),u();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(l.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){v.clear();return}if((s.state.listElement||c.current)&&l.current&&l.current.length>0){let t=l.current,n=y.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},o]});return _||a?S:null}),vae=b.forwardRef(function(e,t){return(0,G.jsx)(q7,{...e,ref:t,direction:`down`})}),yae=b.forwardRef(function(e,t){return(0,G.jsx)(q7,{...e,ref:t,direction:`up`})}),bae=b.createContext(void 0),xae=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,[a,o]=b.useState(),s=b.useMemo(()=>({labelId:a,setLabelId:o}),[a,o]),c=AE(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":a},i]});return(0,G.jsx)(bae.Provider,{value:s,children:c})}),J7=Gie;function Y7({className:e,...t}){return(0,G.jsx)(xae,{"data-slot":`select-group`,className:cO(`scroll-my-1`,e),...t})}function X7({className:e,...t}){return(0,G.jsx)(Qie,{"data-slot":`select-value`,className:cO(`flex flex-1 text-left`,e),...t})}function Z7({className:e,size:t=`default`,children:n,...r}){return(0,G.jsxs)(Xie,{"data-slot":`select-trigger`,"data-size":t,className:cO(`border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...r,children:[n,(0,G.jsx)($ie,{render:(0,G.jsx)(nn,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function Q7({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,G.jsx)(tae,{children:(0,G.jsx)(sae,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,G.jsxs)(uae,{"data-slot":`select-content`,className:cO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto`,e),...s,children:[(0,G.jsx)(Sae,{}),(0,G.jsx)(pae,{children:t}),(0,G.jsx)(Cae,{})]})})})}function $7({className:e,children:t,...n}){return(0,G.jsxs)(mae,{"data-slot":`select-item`,className:cO(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[(0,G.jsx)(_ae,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:t}),(0,G.jsx)(hae,{render:(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,G.jsx)(tn,{className:`pointer-events-none`})})]})}function Sae({className:e,...t}){return(0,G.jsx)(yae,{"data-slot":`select-scroll-up-button`,className:cO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,e),...t,children:(0,G.jsx)(rn,{})})}function Cae({className:e,...t}){return(0,G.jsx)(vae,{"data-slot":`select-scroll-down-button`,className:cO(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,e),...t,children:(0,G.jsx)(nn,{})})}var e9=b.createContext(void 0);function wae(){let e=b.useContext(e9);if(e===void 0)throw Error(rE(63));return e}var t9=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),n9={...a7,checked(e){return e?{[t9.checked]:``}:{[t9.unchecked]:``}}};function Tae(e,t,n,r=!0,i){let[a,o]=b.useState(),s=J1(i?`${i}-label`:void 0),c=e??t??a;return $(()=>{let i=e||t||!r?void 0:Eae(n.current,s);a!==i&&o(i)}),c}function Eae(e,t){let n=Dae(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Dae(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Oae=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,id:o,inputRef:s,name:c,nativeButton:l=!1,onCheckedChange:u,readOnly:d=!1,required:f=!1,disabled:p=!1,render:m,uncheckedValue:h,value:g,..._}=e,{clearErrors:v}=s7(),{state:y,setTouched:x,setDirty:S,validityData:C,setFilled:w,setFocused:T,shouldValidateOnChange:E,validationMode:D,disabled:O,name:k,validation:A}=o7(),{labelId:j}=c7(),M=O||p,N=k??c,P=zT(u),F=b.useRef(null),I=uE(F,s,A.inputRef),L=b.useRef(null),R=J1(),z=l7({id:o,implicit:!1,controlRef:L}),B=l?void 0:z,[V,H]=k1({controlled:n,default:!!i,name:`Switch`,state:`checked`});u7({id:R,commit:A.commit,value:V,controlRef:L,name:N,getValue:()=>V}),$(()=>{F.current&&w(F.current.checked)},[F,w]),$5(V,()=>{v(N),S(V!==C.initialValue),w(V),E()?A.commit(V):A.commit(V,!0)});let{getButtonProps:U,buttonRef:ee}=sE({disabled:M,native:l}),W=Tae(a,j,F,!l,B),te={id:l?z:R,role:`switch`,"aria-checked":V,"aria-readonly":d||void 0,"aria-required":f||void 0,"aria-labelledby":W,onFocus(){M||T(!0)},onBlur(){let e=F.current;!e||M||(x(!0),T(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){d||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne=b.useMemo(()=>GT({checked:V,disabled:M,id:B,name:N,required:f,style:N?_6:g6,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:I,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=p0(t0,e.nativeEvent);P?.(t,n),!n.isCanceled&&H(t)},onFocus(){L.current?.focus()}},A.getInputValidationProps,g===void 0?wE:{value:g}),[V,M,I,B,N,P,f,H,A,g]),re=b.useMemo(()=>({...y,checked:V,disabled:M,readOnly:d,required:f}),[y,V,M,d,f]),ie=AE(`span`,e,{state:re,ref:[t,L,ee],props:[te,A.getValidationProps,_,U],stateAttributesMapping:n9});return(0,G.jsxs)(e9.Provider,{value:re,children:[ie,!V&&N&&h!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,name:N,value:h}),(0,G.jsx)(`input`,{...ne})]})}),kae=b.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:a}=o7(),o=wae();return AE(`span`,e,{state:{...a,...o},ref:t,stateAttributesMapping:n9,props:i})});function r9({className:e,size:t=`default`,...n}){return(0,G.jsx)(Oae,{"data-slot":`switch`,"data-size":t,className:cO(`cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,G.jsx)(kae,{"data-slot":`switch-thumb`,className:`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`})})}function Aae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:cO(`border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,e),...t})}var jae=BE(`text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none`,{variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last`,"block-start":`px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}});function Mae({className:e,align:t=`inline-start`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:cO(jae({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function Nae({className:e,...t}){return(0,G.jsx)(t1,{"data-slot":`command`,className:cO(`bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden`,e),...t})}function Pae({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`border-b pb-0`,children:(0,G.jsxs)(Aae,{className:`bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,G.jsx)(t1.Input,{"data-slot":`command-input`,className:cO(`w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,G.jsx)(Mae,{children:(0,G.jsx)(pn,{className:`size-4 shrink-0 opacity-50`})})]})})}function Fae({className:e,...t}){return(0,G.jsx)(t1.List,{"data-slot":`command-list`,className:cO(`no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto`,e),...t})}function Iae({className:e,...t}){return(0,G.jsx)(t1.Empty,{"data-slot":`command-empty`,className:cO(`py-6 text-center text-xs`,e),...t})}function Lae({className:e,...t}){return(0,G.jsx)(t1.Group,{"data-slot":`command-group`,className:cO(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs`,e),...t})}function Rae({className:e,children:t,...n}){return(0,G.jsxs)(t1.Item,{"data-slot":`command-item`,className:cO(`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[t,(0,G.jsx)(tn,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}var i9=b.createContext(void 0);function a9(e){let t=b.useContext(i9);if(t===void 0&&!e)throw Error(rE(47));return t}function zae(){return{...D5(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var Bae={...k5,disabled:_5(e=>e.disabled),instantType:_5(e=>e.instantType),openMethod:_5(e=>e.openMethod),openChangeReason:_5(e=>e.openChangeReason),modal:_5(e=>e.modal),stickIfOpen:_5(e=>e.stickIfOpen),titleElementId:_5(e=>e.titleElementId),descriptionElementId:_5(e=>e.descriptionElementId),openOnHover:_5(e=>e.openOnHover),closeDelay:_5(e=>e.closeDelay),hasViewport:_5(e=>e.hasViewport)},Vae=class e extends S5{constructor(e){let t={...zae(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new s6,triggerElements:new E5},Bae)}setOpen=(e,t)=>{let n=t.reason===r0,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Lq.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=IT(()=>new e(n)).current,i=t??r;return S4(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function o9({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Vae.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});J5(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g}=e7(d);w5(u);let{forceUnmount:_}=T5(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});Q5(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let v=b.useCallback(e=>{let t=p0(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),y=b.useCallback(()=>{u.setOpen(!1,v(d0))},[u,v]);b.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:y}),[_,y]);let x=j5({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=P5([c8(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),B5(x)]),T=b.useMemo(()=>S(g),[S,g]),E=b.useMemo(()=>w(g),[w,g]),D=b.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:U6()!=null});let O=b.useMemo(()=>({store:u}),[u]);return(0,G.jsx)(i9.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function Hae(e){return a9(!0)?(0,G.jsx)(o9,{props:e}):(0,G.jsx)(q6,{children:(0,G.jsx)(o9,{props:e})})}var Uae=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=a9(!0),m=o?.store??p?.store;if(!m)throw Error(rE(74));let h=J1(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=b.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Nre(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),C=m.useState(`openChangeReason`),w=m.useState(`stickIfOpen`),T=m.useState(`openMethod`),E=Hre(_,{enabled:_!=null&&c&&(T!==`touch`||C!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Zre(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),D=P5([i8(_,{enabled:_!=null,stickIfOpen:w})]),O=m.useState(`triggerProps`,S),k={disabled:i,open:v},{getButtonProps:A,buttonRef:j}=sE({disabled:i,native:a}),M=b.useMemo(()=>({open(e){return e&&C===`trigger-press`?t6.open(e):e6.open(e)}}),[C]),N=AE(`button`,e,{state:k,ref:[j,t,x,y],props:[D.getReferenceProps(),E,O,{[EE]:``,id:h},f,A],stateAttributesMapping:M}),P=b.useRef(null),F=zT(e=>{Lq.flushSync(()=>{m.setOpen(!1,p0(s0,e.nativeEvent,e.currentTarget))}),g4(P.current)?.focus()}),I=zT(e=>{let t=m.select(`positionerElement`);if(t&&_4(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{Lq.flushSync(()=>{m.setOpen(!1,p0(s0,e.nativeEvent,e.currentTarget))});let n=h4(m.context.triggerFocusTargetRef.current||y.current);for(;n!==null&&N0(t,n);){let e=n;if(n=f4(n),n===e)break}n?.focus()}});return g?(0,G.jsxs)(b.Fragment,{children:[(0,G.jsx)(v6,{ref:P,onFocus:F}),(0,G.jsx)(b.Fragment,{children:N},h),(0,G.jsx)(v6,{ref:m.context.triggerFocusTargetRef,onFocus:I})]}):(0,G.jsx)(b.Fragment,{children:N},h)}),s9=b.createContext(void 0);function Wae(){let e=b.useContext(s9);if(e===void 0)throw Error(rE(45));return e}var Gae=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=a9();return i.useState(`mounted`)||n?(0,G.jsx)(s9.Provider,{value:n,children:(0,G.jsx)(R6,{ref:t,...r})}):null}),c9=b.createContext(void 0);function Kae(){let e=b.useContext(c9);if(!e)throw Error(rE(46));return e}var qae=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=OE,...g}=e,{store:_}=a9(),v=Wae(),y=G6(),x=_.useState(`floatingRootContext`),S=_.useState(`mounted`),C=_.useState(`open`),w=_.useState(`openChangeReason`),T=_.useState(`activeTriggerElement`),E=_.useState(`modal`),D=_.useState(`positionerElement`),O=_.useState(`instantType`),k=_.useState(`transitionStatus`),A=_.useState(`hasViewport`),j=b.useRef(null),M=I4(D,!1,!1),N=O7({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:A?aae:void 0}),P=b.useMemo(()=>{let e={};return C||(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...N.positionerStyles,...e}}},[C,S,N.positionerStyles]),F=b.useMemo(()=>({props:P,...N}),[P,N]),I=x.useState(`domReferenceElement`);$(()=>{let e=I,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return M(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,M,_]);let L={open:C,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O},R=b.useCallback(e=>{_.set(`positionerElement`,e)},[_]),z=AE(`div`,e,{state:L,props:[F.props,M7(k),g],ref:[t,R],stateAttributesMapping:n6});return(0,G.jsxs)(c9.Provider,{value:F,children:[S&&E===!0&&w!==`trigger-hover`&&(0,G.jsx)(q5,{ref:_.context.internalBackdropRef,inert:E4(!C),cutout:T}),(0,G.jsx)(K6,{id:y,children:z})]})}),Jae=b.createContext(void 0);function Yae(){let[e,t]=b.useState(0),n=zT(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Xae(e){let{value:t,children:n}=e;return(0,G.jsx)(Jae.Provider,{value:t,children:n})}var Zae={...n6,...A4},Qae=b.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=a9(),c=Kae(),l=R7(!0)!=null,{context:u,hasClosePart:d}=Yae(),f=s.useState(`open`),p=s.useState(`openMethod`),m=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),v=s.useState(`descriptionElementId`),y=s.useState(`modal`),x=s.useState(`mounted`),S=s.useState(`openChangeReason`),C=s.useState(`activeTriggerElement`),w=s.useState(`floatingRootContext`);L4({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}});let T=s.useState(`disabled`),E=s.useState(`openOnHover`),D=s.useState(`closeDelay`);Bre(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?s.context.popupRef.current:!0}let k=i===void 0?O:i,A={open:f,side:c.side,align:c.align,instant:m,transitionStatus:h},j=y!==!1&&d,M=b.useCallback(e=>{s.set(`popupElement`,e)},[s]),N=AE(`div`,e,{state:A,ref:[t,s.context.popupRef,M],props:[g,{"aria-labelledby":_,"aria-describedby":v,onKeyDown(e){l&&e3.has(e.key)&&e.stopPropagation()}},M7(h),o],stateAttributesMapping:Zae});return(0,G.jsx)(r8,{context:w,openInteractionType:p,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:gT(C)?C:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:(0,G.jsx)(Xae,{value:u,children:N})})});function $ae({...e}){return(0,G.jsx)(Hae,{"data-slot":`popover`,...e})}function eoe({...e}){return(0,G.jsx)(Uae,{"data-slot":`popover-trigger`,...e})}function toe({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,G.jsx)(Gae,{children:(0,G.jsx)(qae,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,G.jsx)(Qae,{"data-slot":`popover-content`,className:cO(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden`,e),...a})})})}var l9=[{value:`en-US`,label:`English (US)`},{value:`es-ES`,label:`español (España)`},{value:`fr-FR`,label:`français (France)`},{value:`de-DE`,label:`Deutsch`},{value:`it-IT`,label:`italiano`},{value:`am-ET`,label:`አማርኛ`},{value:`ar`,label:`العربية`},{value:`bg-BG`,label:`български`},{value:`bn-BD`,label:`বাংলা`},{value:`bs-BA`,label:`bosanski`},{value:`ca-ES`,label:`català`},{value:`cs-CZ`,label:`čeština`},{value:`da-DK`,label:`dansk`},{value:`el-GR`,label:`Ελληνικά`},{value:`es-419`,label:`español (Latinoamérica)`},{value:`et-EE`,label:`eesti`},{value:`fi-FI`,label:`suomi`},{value:`fr-CA`,label:`français (Canada)`},{value:`gu-IN`,label:`ગુજરાતી`},{value:`hi-IN`,label:`हिन्दी`},{value:`hr-HR`,label:`hrvatski`},{value:`hu-HU`,label:`magyar`},{value:`hy-AM`,label:`հայերեն`},{value:`id-ID`,label:`Indonesia`},{value:`is-IS`,label:`íslenska`},{value:`ja-JP`,label:`日本語`},{value:`ka-GE`,label:`ქართული`},{value:`kk-KZ`,label:`қазақ тілі`},{value:`kn-IN`,label:`ಕನ್ನಡ`},{value:`ko-KR`,label:`한국어`},{value:`lt-LT`,label:`lietuvių`},{value:`lv-LV`,label:`latviešu`},{value:`mk-MK`,label:`македонски`},{value:`ml-IN`,label:`മലയാളം`},{value:`mn-MN`,label:`монгол`},{value:`mr-IN`,label:`मराठी`},{value:`ms-MY`,label:`Bahasa Melayu`},{value:`my-MM`,label:`မြန်မာ`},{value:`nb-NO`,label:`norsk bokmål`},{value:`nl-NL`,label:`Nederlands`},{value:`pa-IN`,label:`ਪੰਜਾਬੀ`},{value:`pl-PL`,label:`polski`},{value:`pt-BR`,label:`português (Brasil)`},{value:`pt-PT`,label:`português (Portugal)`},{value:`ro-RO`,label:`română`},{value:`ru-RU`,label:`русский`},{value:`sk-SK`,label:`slovenčina`},{value:`sl-SI`,label:`slovenščina`},{value:`so-SO`,label:`Soomaali`},{value:`sq-AL`,label:`shqip`},{value:`sr-RS`,label:`српски`},{value:`sv-SE`,label:`svenska`},{value:`sw-KE`,label:`Kiswahili`},{value:`ta-IN`,label:`தமிழ்`},{value:`te-IN`,label:`తెలుగు`},{value:`th-TH`,label:`ไทย`},{value:`tl-PH`,label:`Tagalog`},{value:`tr-TR`,label:`Türkçe`},{value:`uk-UA`,label:`українська`},{value:`ur-PK`,label:`اردو`},{value:`vi-VN`,label:`Tiếng Việt`},{value:`zh-Hans`,label:`简体中文`},{value:`zh-Hant-HK`,label:`繁體中文(香港)`},{value:`zh-Hant-TW`,label:`繁體中文(台灣)`}],noe=({value:e,onValueChange:t})=>{let[n,r]=(0,b.useState)(!1),i=l9.find(t=>t.value===e);return(0,G.jsxs)($ae,{open:n,onOpenChange:r,children:[(0,G.jsx)(eoe,{children:(0,G.jsxs)(lO,{variant:`outline`,role:`combobox`,"aria-expanded":n,className:`w-full justify-between`,children:[i?(0,G.jsxs)(`span`,{children:[i.value,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`- `,i.label]})]}):`Select locale...`,(0,G.jsx)(an,{className:`ml-2 h-4 w-4 shrink-0 opacity-50`})]})}),(0,G.jsx)(toe,{className:`w-full p-0`,children:(0,G.jsxs)(Nae,{children:[(0,G.jsx)(Pae,{placeholder:`Search locale...`}),(0,G.jsxs)(Fae,{children:[(0,G.jsx)(Iae,{children:`No locale found.`}),(0,G.jsx)(Lae,{children:l9.map(n=>(0,G.jsxs)(Rae,{value:n.value,onSelect:n=>{t(n===e?``:n),r(!1)},children:[(0,G.jsxs)(`span`,{children:[n.label,` `,(0,G.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,n.value,`)`]})]}),(0,G.jsx)(tn,{className:cO(`ml-auto h-4 w-4`,e===n.value?`opacity-100`:`opacity-0`)})]},n.value))})]})]})})]})};function roe({resourceUri:e}){let{data:t}=lT(e);return t?(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(W3,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:4,collapseStringsAfterLength:80})}):null}var ioe=()=>{let e=cT(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=KS(e.name),{setToolData:i}=GS(),a=e._meta?.[`openai/outputTemplate`],o=(r,a)=>{let o=t?.current?.contentWindow?.openai;o&&n&&(o[r]=a,i(e.name,{openaiObject:{...n,[r]:a}}))};return n?(0,G.jsx)(`div`,{className:`overflow-auto max-h-full min-h-0`,children:(0,G.jsxs)(m3,{defaultValue:`widget-state`,className:`gap-0`,children:[(0,G.jsxs)(g3,{className:`border-b border-border w-full`,children:[(0,G.jsx)(_3,{value:`properties`,children:`Properties`}),(0,G.jsx)(_3,{value:`widget-state`,children:`Widget State`}),a&&(0,G.jsx)(_3,{value:`resource`,children:`Resource`})]}),(0,G.jsx)(v3,{value:`properties`,className:`p-4`,children:(0,G.jsxs)(kie,{children:[(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Display Mode`}),(0,G.jsxs)(J7,{value:n.displayMode,onValueChange:e=>o(`displayMode`,e),"aria-label":`Select framework`,items:[{label:`Inline`,value:`inline`},{label:`Fullscreen`,value:`fullscreen`},{label:`Pip`,value:`pip`},{label:`Modal`,value:`modal`}],name:`displayMode`,required:!0,children:[(0,G.jsx)(Z7,{children:(0,G.jsx)(X7,{})}),(0,G.jsx)(Q7,{children:(0,G.jsxs)(Y7,{children:[(0,G.jsx)($7,{value:`inline`,children:`Inline`}),(0,G.jsx)($7,{value:`fullscreen`,children:`Fullscreen`}),(0,G.jsx)($7,{value:`pip`,children:`Pip`}),(0,G.jsx)($7,{value:`modal`,children:`Modal`})]})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Theme`}),(0,G.jsxs)(Die,{children:[(0,G.jsx)(lO,{variant:n.theme===`light`?`default`:`outline`,onClick:()=>o(`theme`,`light`),children:(0,G.jsx)(mn,{})}),(0,G.jsx)(lO,{variant:n.theme===`dark`?`default`:`outline`,onClick:()=>o(`theme`,`dark`),children:(0,G.jsx)(un,{})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Locale`}),(0,G.jsx)(noe,{value:n.locale,onValueChange:e=>o(`locale`,e)})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Max Height`}),(0,G.jsx)(d7,{type:`number`,value:n.maxHeight===void 0?``:String(n.maxHeight),onChange:e=>{let t=e.target.value.trim();o(`maxHeight`,t===``?void 0:Number(t))}})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Safe Area Insets`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-4`,children:[`top`,`bottom`,`left`,`right`].map(e=>{let t=e.charAt(0).toUpperCase()+e.slice(1);return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{htmlFor:`safeArea-${e}`,className:`text-xs text-muted-foreground block mb-1`,children:t}),(0,G.jsx)(d7,{id:`safeArea-${e}`,type:`number`,value:n.safeArea?.insets?.[e]===void 0?`0`:String(n.safeArea.insets[e]),onChange:t=>{let r=t.target.value.trim();o(`safeArea`,{...n.safeArea,insets:{...n.safeArea?.insets,[e]:r===``?0:Number(r)}})}})]},e)})})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Device Type`}),(0,G.jsxs)(J7,{value:n.userAgent?.device?.type??`desktop`,onValueChange:e=>o(`userAgent`,{...n.userAgent,device:{...n.userAgent?.device,type:e}}),"aria-label":`Select device type`,items:[{label:`Mobile`,value:`mobile`},{label:`Desktop`,value:`desktop`}],name:`deviceType`,required:!0,children:[(0,G.jsx)(Z7,{children:(0,G.jsx)(X7,{})}),(0,G.jsx)(Q7,{children:(0,G.jsxs)(Y7,{children:[(0,G.jsx)($7,{value:`mobile`,children:`Mobile`}),(0,G.jsx)($7,{value:`desktop`,children:`Desktop`})]})})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Capabilities`}),(0,G.jsxs)(`div`,{className:`flex gap-8`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`hover`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Hover`}),(0,G.jsx)(r9,{id:`hover`,checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:e}})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`label`,{htmlFor:`touch`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Touch`}),(0,G.jsx)(r9,{id:`touch`,checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:e=>o(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:e}})})]})]})]}),(0,G.jsxs)(t7,{children:[(0,G.jsx)(n7,{children:`Open in App URL`}),(0,G.jsx)(d7,{type:`text`,value:r??``,readOnly:!0,placeholder:`Not set`,className:`font-mono text-xs`})]})]})}),(0,G.jsx)(v3,{value:`widget-state`,className:`p-4`,children:(0,G.jsx)(W3,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,collapsed:3,collapseStringsAfterLength:80})}),a&&(0,G.jsx)(v3,{value:`resource`,className:`p-4`,children:(0,G.jsx)(b.Suspense,{fallback:(0,G.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Loading resource...`}),children:(0,G.jsx)(roe,{resourceUri:a})})})]})}):null};function u9(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function aoe(e,t=60){let n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function ooe({log:e}){let[t,n]=(0,b.useState)(!1),r=Object.keys(e.args).length>0,i=r?aoe(e.args):null;return(0,G.jsxs)(G.Fragment,{children:[r?(0,G.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:u9(e.timestamp)}),(0,G.jsx)(`span`,{className:cO(`font-semibold shrink-0 min-w-[120px]`,e.type===`response`?`text-green-600 dark:text-green-400`:`text-blue-600 dark:text-blue-400`),children:e.command}),(0,G.jsx)(`span`,{className:`text-gray-500 dark:text-gray-600 mr-1`,children:t?`▼`:`▶`}),(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0`,children:i})]}):(0,G.jsxs)(`div`,{className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50`,children:[(0,G.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:u9(e.timestamp)}),(0,G.jsx)(`span`,{className:`text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]`,children:e.command})]}),t&&r&&(0,G.jsx)(`div`,{className:`px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50`,children:(0,G.jsx)(`pre`,{className:`text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto`,children:JSON.stringify(e.args,null,2)})})]})}function soe(){let e=cT(),{setToolData:t}=GS(),{openaiLogs:n}=KS(e.name),r=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight)},[]),(0,G.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden min-h-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between mb-3 h-8 flex-none`,children:[(0,G.jsx)(`h3`,{className:`text-sm font-semibold text-gray-900 dark:text-gray-200`,children:`MCP client logs`}),(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:n.length>0&&(0,G.jsxs)(lO,{variant:`ghost`,size:`sm`,onClick:()=>{t(e.name,{openaiLogs:[]})},children:[(0,G.jsx)(hn,{className:`w-3 h-3`}),`Clear`]})})]}),(0,G.jsx)(`div`,{ref:r,className:`overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0`,children:n.map(e=>(0,G.jsx)(ooe,{log:e},e.id))})]})}var coe=BE(`relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground`,error:`border-destructive/32 bg-destructive/4 [&>svg]:text-destructive`,info:`border-info/32 bg-info/4 [&>svg]:text-info`,success:`border-success/32 bg-success/4 [&>svg]:text-success`,warning:`border-warning/32 bg-warning/4 [&>svg]:text-warning`}}});function loe({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{className:cO(coe({variant:t}),e),"data-slot":`alert`,role:`alert`,...n})}function uoe({className:e,...t}){return(0,G.jsx)(`div`,{className:cO(`font-medium [svg~&]:col-start-2`,e),"data-slot":`alert-title`,...t})}function doe({className:e,...t}){return(0,G.jsx)(`div`,{className:cO(`flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2`,e),"data-slot":`alert-description`,...t})}var foe=()=>{let e=KS(cT().name);return e?(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden bg-card`,children:(0,G.jsx)(`div`,{className:`p-4 overflow-auto`,children:e.response?e.response.isError?(0,G.jsxs)(loe,{variant:`error`,children:[(0,G.jsx)(on,{}),(0,G.jsx)(uoe,{children:`Error`}),(0,G.jsx)(doe,{children:(()=>{let t=[];return e.response.content.forEach(e=>{e.type===`text`&&t.push(e.text)}),t.join(`
153
153
  `)})()})]}):(0,G.jsx)(`div`,{className:`text-xs`,children:(0,G.jsx)(W3,{src:e.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:3,collapseStringsAfterLength:80})}):null})}):null},d9=`openai:set_globals`,poe=class extends CustomEvent{type=d9},moe=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=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)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.3`})),f9=s(((e,t)=>{t.exports=moe()})),hoe=u(f9(),1),goe=qu([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),p9=qu([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),_oe=$u(qu([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
154
154
 
155
155
  Individual style keys are optional - hosts may provide any subset of these values.
@@ -227,4 +227,4 @@ Error generating stack: `+e.message+`
227
227
 
228
228
  await waitForOpenAI();
229
229
  ${n.textContent}
230
- `,t.head.innerHTML+t.body.innerHTML}var ase=()=>{let e=cT(),{openaiObject:t}=KS(e.name)??{},{data:n}=lT(e._meta?.[`openai/outputTemplate`]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=GS(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(!1),u=n.contents[0].text,d=(0,b.useCallback)(()=>{if(l.current)return;let c=s.current;if(!c||!c.contentWindow||!c.contentDocument)return;l.current=!0;let d=n.contents[0]._meta?.[`openai/widgetDomain`];d&&typeof d==`string`&&o(e.name,d),rse(c.contentWindow,t,(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),command:t,args:n,type:r})},(t,n)=>{a(e.name,t,n)},(e,t)=>Zw.callTool(e,t),t=>{o(e.name,t)}),c.contentDocument.open(),c.contentDocument.write(ise(u)),c.contentDocument.close(),r(e.name,{openaiRef:s})},[t,i,r,a,o,e.name,u,n]);return(0,b.useEffect)(()=>{d()},[d]),(0,G.jsx)(`div`,{ref:c,className:`relative overflow-auto`,style:{width:`100%`,height:`100%`},children:(0,G.jsx)(`iframe`,{ref:s,src:`about:blank`,onLoad:d,style:{width:`100%`,height:`100%`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},ose=()=>{let e=cT(),t=KS(e.name),{defaultLayout:n,onLayoutChange:r}=oi({id:`skybridge-devtools-input-column`,storage:localStorage}),{defaultLayout:i,onLayoutChange:a}=oi({id:`skybridge-devtools-widget-section`,storage:localStorage}),{defaultLayout:o,onLayoutChange:s}=oi({id:`skybridge-devtools-inspector-section`,storage:localStorage}),{defaultLayout:c,onLayoutChange:l}=oi({id:`skybridge-devtools-main-section`,storage:localStorage}),u=!!(e._meta?.[`openai/outputTemplate`]&&t?.response&&!t.response.isError);return(0,G.jsx)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative z-10`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:c,onLayoutChange:l,children:[(0,G.jsx)(ui,{id:`top-section`,minSize:`30`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:n,onLayoutChange:r,children:[(0,G.jsx)(ui,{id:`input-column`,minSize:`20`,maxSize:`60`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(Tie,{})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`output-column`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(foe,{})})})]})}),u&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`widget-section`,minSize:`20`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden bg-card`,defaultLayout:o,onLayoutChange:s,children:[(0,G.jsx)(ui,{id:`widget-logs-panel`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:i,onLayoutChange:a,children:[(0,G.jsx)(ui,{id:`widget-panel`,minSize:`20`,maxSize:`80`,children:(0,G.jsx)(`div`,{className:`h-full overflow-hidden`,children:(0,G.jsx)(b.Suspense,{children:(0,G.jsx)(ase,{})})})}),(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`logs-panel`,minSize:`20`,children:(0,G.jsx)(`div`,{className:`p-4 flex flex-col h-full min-h-0`,children:(0,G.jsx)(soe,{})})})]})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`inspector-panel`,minSize:`20`,maxSize:`50`,defaultSize:30,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full min-h-0`,children:(0,G.jsx)(`div`,{className:`overflow-auto`,children:(0,G.jsx)(ioe,{})})})})]})})]})]})})};function sse(){let e=iT(),[,t]=iC(),n=sT();return(0,G.jsx)(`div`,{className:`h-full border-r border-border bg-card flex flex-col`,children:(0,G.jsxs)(`aside`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`p-4 border-b border-border h-[72px] flex flex-col justify-center`,children:[(0,G.jsx)(`h2`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Tools`}),(0,G.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e?.length,` `,e?.length===1?`tool`:`tools`]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,G.jsx)(`div`,{className:`p-2`,children:e?.length===0?(0,G.jsx)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:`No tools registered yet.`}):(0,G.jsx)(`div`,{className:`space-y-1`,children:e?.map(e=>{let r=e.name===n?.name;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(e.name),className:cO(`w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative`,`hover:bg-accent hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1`,r&&`bg-accent text-accent-foreground`),children:[(0,G.jsxs)(`div`,{className:`pr-6 flex flex-col gap-1`,children:[(0,G.jsx)(`div`,{className:cO(`font-semibold text-sm leading-tight truncate`,r&&`text-accent-foreground`),children:e.name}),e.description&&(0,G.jsx)(`div`,{className:cO(`text-xs leading-snug text-muted-foreground`,`line-clamp-2`,r&&`text-accent-foreground/80`),children:e.description})]}),r&&(0,G.jsx)(`div`,{className:`absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary`})]},e.name)})})})})]})})}function cse(){let e=sT(),{status:t,requiresAuth:n}=bi(),{defaultLayout:r,onLayoutChange:i}=oi({id:`skybridge-devtools-tools-list`,storage:localStorage});return(0,G.jsxs)(`div`,{className:`flex h-screen w-full flex-col overflow-hidden bg-background`,children:[(0,G.jsx)(Fte,{}),t===`authenticated`?(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:r,onLayoutChange:i,children:[(0,G.jsx)(ui,{id:`tools-list`,minSize:`15`,maxSize:`40`,children:(0,G.jsx)(sse,{})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`main-content`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-1 flex-col overflow-hidden relative h-full`,children:e?(0,G.jsx)(ose,{}):(0,G.jsx)(Rne,{})})})]}):(0,G.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,G.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t===`connecting`?`Connecting to server...`:n?`Authentication required to access this server.`:`Not connected to a server.`}),t!==`connecting`&&(0,G.jsxs)(lO,{variant:`outline`,size:`sm`,onClick:eT,children:[(0,G.jsx)(fn,{className:`h-3.5 w-3.5`}),`Connect`]})]})})]})}function lse(){return(0,G.jsx)(Ue,{client:aC,children:(0,G.jsx)(Wt,{children:(0,G.jsx)(cse,{})})})}async function use(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=new URL(window.location.href);if(n.searchParams.delete(`oauth_callback`),n.searchParams.delete(`code`),n.searchParams.delete(`state`),window.history.replaceState({},``,n.toString()),t)try{await tT(t)}catch(e){console.error(`OAuth callback failed:`,e),bi.getState().setStatus(`error`),bi.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else bi.getState().setStatus(`error`),bi.getState().setError(`OAuth callback missing authorization code`)}else eT().catch(e=>{console.error(`Connection failed:`,e)})}use(),(0,x.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(b.StrictMode,{children:(0,G.jsx)(lse,{})}));
230
+ `,t.head.innerHTML+t.body.innerHTML}var ase=()=>{let e=cT(),{openaiObject:t}=KS(e.name)??{},{data:n}=lT(e._meta?.[`openai/outputTemplate`]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=GS(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(!1),u=n.contents[0].text,d=(0,b.useCallback)(()=>{if(l.current)return;let c=s.current;if(!c?.contentWindow||!c.contentDocument)return;l.current=!0;let d=n.contents[0]._meta?.[`openai/widgetDomain`];d&&typeof d==`string`&&o(e.name,d),rse(c.contentWindow,t,(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),command:t,args:n,type:r})},(t,n)=>{a(e.name,t,n)},(e,t)=>Zw.callTool(e,t),t=>{o(e.name,t)}),c.contentDocument.open(),c.contentDocument.write(ise(u)),c.contentDocument.close(),r(e.name,{openaiRef:s})},[t,i,r,a,o,e.name,u,n]);return(0,b.useEffect)(()=>{d()},[d]),(0,G.jsx)(`div`,{ref:c,className:`relative overflow-auto`,style:{width:`100%`,height:`100%`},children:(0,G.jsx)(`iframe`,{ref:s,src:`about:blank`,onLoad:d,style:{width:`100%`,height:`100%`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},ose=()=>{let e=cT(),t=KS(e.name),{defaultLayout:n,onLayoutChange:r}=oi({id:`skybridge-devtools-input-column`,storage:localStorage}),{defaultLayout:i,onLayoutChange:a}=oi({id:`skybridge-devtools-widget-section`,storage:localStorage}),{defaultLayout:o,onLayoutChange:s}=oi({id:`skybridge-devtools-inspector-section`,storage:localStorage}),{defaultLayout:c,onLayoutChange:l}=oi({id:`skybridge-devtools-main-section`,storage:localStorage}),u=!!(e._meta?.[`openai/outputTemplate`]&&t?.response&&!t.response.isError);return(0,G.jsx)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative z-10`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:c,onLayoutChange:l,children:[(0,G.jsx)(ui,{id:`top-section`,minSize:`30`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:n,onLayoutChange:r,children:[(0,G.jsx)(ui,{id:`input-column`,minSize:`20`,maxSize:`60`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(Tie,{})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`output-column`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,G.jsx)(foe,{})})})]})}),u&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`widget-section`,minSize:`20`,children:(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden bg-card`,defaultLayout:o,onLayoutChange:s,children:[(0,G.jsx)(ui,{id:`widget-logs-panel`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:(0,G.jsxs)(ri,{orientation:`vertical`,className:`flex-1 overflow-hidden`,defaultLayout:i,onLayoutChange:a,children:[(0,G.jsx)(ui,{id:`widget-panel`,minSize:`20`,maxSize:`80`,children:(0,G.jsx)(`div`,{className:`h-full overflow-hidden`,children:(0,G.jsx)(b.Suspense,{children:(0,G.jsx)(ase,{})})})}),(0,G.jsx)(pi,{className:`h-px bg-border`}),(0,G.jsx)(ui,{id:`logs-panel`,minSize:`20`,children:(0,G.jsx)(`div`,{className:`p-4 flex flex-col h-full min-h-0`,children:(0,G.jsx)(soe,{})})})]})})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`inspector-panel`,minSize:`20`,maxSize:`50`,defaultSize:30,children:(0,G.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full min-h-0`,children:(0,G.jsx)(`div`,{className:`overflow-auto`,children:(0,G.jsx)(ioe,{})})})})]})})]})]})})};function sse(){let e=iT(),[,t]=iC(),n=sT();return(0,G.jsx)(`div`,{className:`h-full border-r border-border bg-card flex flex-col`,children:(0,G.jsxs)(`aside`,{className:`h-full flex flex-col`,children:[(0,G.jsxs)(`div`,{className:`p-4 border-b border-border h-[72px] flex flex-col justify-center`,children:[(0,G.jsx)(`h2`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Tools`}),(0,G.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e?.length,` `,e?.length===1?`tool`:`tools`]})]}),(0,G.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,G.jsx)(`div`,{className:`p-2`,children:e?.length===0?(0,G.jsx)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:`No tools registered yet.`}):(0,G.jsx)(`div`,{className:`space-y-1`,children:e?.map(e=>{let r=e.name===n?.name;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(e.name),className:cO(`w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative`,`hover:bg-accent hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1`,r&&`bg-accent text-accent-foreground`),children:[(0,G.jsxs)(`div`,{className:`pr-6 flex flex-col gap-1`,children:[(0,G.jsx)(`div`,{className:cO(`font-semibold text-sm leading-tight truncate`,r&&`text-accent-foreground`),children:e.name}),e.description&&(0,G.jsx)(`div`,{className:cO(`text-xs leading-snug text-muted-foreground`,`line-clamp-2`,r&&`text-accent-foreground/80`),children:e.description})]}),r&&(0,G.jsx)(`div`,{className:`absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary`})]},e.name)})})})})]})})}function cse(){let e=sT(),{status:t,requiresAuth:n}=bi(),{defaultLayout:r,onLayoutChange:i}=oi({id:`skybridge-devtools-tools-list`,storage:localStorage});return(0,G.jsxs)(`div`,{className:`flex h-screen w-full flex-col overflow-hidden bg-background`,children:[(0,G.jsx)(Fte,{}),t===`authenticated`?(0,G.jsxs)(ri,{orientation:`horizontal`,className:`flex-1 overflow-hidden`,defaultLayout:r,onLayoutChange:i,children:[(0,G.jsx)(ui,{id:`tools-list`,minSize:`15`,maxSize:`40`,children:(0,G.jsx)(sse,{})}),(0,G.jsx)(pi,{className:`w-px bg-border`}),(0,G.jsx)(ui,{id:`main-content`,minSize:`30`,children:(0,G.jsx)(`div`,{className:`flex flex-1 flex-col overflow-hidden relative h-full`,children:e?(0,G.jsx)(ose,{}):(0,G.jsx)(Rne,{})})})]}):(0,G.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,G.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t===`connecting`?`Connecting to server...`:n?`Authentication required to access this server.`:`Not connected to a server.`}),t!==`connecting`&&(0,G.jsxs)(lO,{variant:`outline`,size:`sm`,onClick:eT,children:[(0,G.jsx)(fn,{className:`h-3.5 w-3.5`}),`Connect`]})]})})]})}function lse(){return(0,G.jsx)(Ue,{client:aC,children:(0,G.jsx)(Wt,{children:(0,G.jsx)(cse,{})})})}async function use(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=new URL(window.location.href);if(n.searchParams.delete(`oauth_callback`),n.searchParams.delete(`code`),n.searchParams.delete(`state`),window.history.replaceState({},``,n.toString()),t)try{await tT(t)}catch(e){console.error(`OAuth callback failed:`,e),bi.getState().setStatus(`error`),bi.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else bi.getState().setStatus(`error`),bi.getState().setError(`OAuth callback missing authorization code`)}else eT().catch(e=>{console.error(`Connection failed:`,e)})}use(),(0,x.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(b.StrictMode,{children:(0,G.jsx)(lse,{})}));