pipe-kan 0.29.2 → 0.30.1

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,56 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.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 ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function j(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 M(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,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),M(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(k,`$&/`)+`/`)+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+A(a,u),c+=M(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+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(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 te(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(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 N=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)},P={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(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=P,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:ne}},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,N)}catch(e){N(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.8`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(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&&A(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 ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(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,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);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.8`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){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 d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function te(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?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 ee: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?te(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var ne=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function F(e){return{current:e}}function I(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function L(e,t){ae++,ie[ae]=e.current,e.current=t}var oe=F(null),R=F(null),z=F(null),se=F(null);function ce(e,t){switch(L(z,t),L(R,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(oe),L(oe,e)}function le(){I(oe),I(R),I(z)}function ue(e){e.memoizedState!==null&&L(se,e);var t=oe.current,n=Gd(t,e.type);t!==n&&(L(R,e),L(oe,n))}function de(e){R.current===e&&(I(oe),I(R)),se.current===e&&(I(se),tp._currentValue=re)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=P.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function rt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[at])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),wt={},Tt={};function Et(e){return ye.call(Tt,e)?!0:ye.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Ot(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function kt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ft(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+At(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+At(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ne(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Kt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(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&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Yt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Xt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(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&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(xu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=h({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=h({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(h({},En,{dataTransfer:0})),kn=vn(h({},xn,{relatedTarget:0})),An=vn(h({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(h({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(h({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(h({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(h({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(h({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(h({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(h({},En,{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})),Un=vn(h({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!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 Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Od(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){xd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(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=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ft(e.document)}return t}function Dr(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 Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,B=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(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}),B&&Sr(B,r)||(B=r,r=Od(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};cn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),V=Lr(`transitionstart`),Hr=Lr(`transitioncancel`),Ur=Lr(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),xt(t,[e])}var qr=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)},Jr=[],H=0,Yr=0;function Xr(){for(var e=H,t=Yr=H=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){Jr[H++]=e,Jr[H++]=t,Jr[H++]=n,Jr[H++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=ii(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return li(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ii(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ii(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ii(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=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var U=new WeakMap;function pi(e,t){if(typeof e==`object`&&e){var n=U.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},U.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var W=[],mi=0,hi=null,gi=0,_i=[],vi=0,yi=null,bi=1,xi=``;function Si(e,t){W[mi++]=gi,W[mi++]=hi,hi=e,gi=t}function Ci(e,t,n){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,yi=e;var r=bi;e=xi;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,bi=1<<32-Ie(t)+i|n<<i|r,xi=a+e}else bi=1<<a|n<<i|r,xi=e}function wi(e){e.return!==null&&(Si(e,1),Ci(e,1,0))}function Ti(e){for(;e===hi;)hi=W[--mi],W[mi]=null,gi=W[--mi],W[mi]=null;for(;e===yi;)yi=_i[--vi],_i[vi]=null,xi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null}function Ei(e,t){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,bi=t.id,xi=t.overflow,yi=e}var Di=null,G=null,Oi=!1,ki=null,Ai=!1,ji=Error(i(519));function Mi(e){throw Ri(pi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ji}function Ni(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)X(yd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),Ut(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Mi(e,!0)}function Pi(e){for(Di=e.return;Di;)switch(Di.tag){case 5:case 31:case 13:Ai=!1;return;case 27:case 3:Ai=!0;return;default:Di=Di.return}}function Fi(e){if(e!==Di)return!1;if(!Oi)return Pi(e),Oi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&G&&Mi(e),Pi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));G=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));G=pf(e)}else t===27?(t=G,ef(e.type)?(e=ff,ff=null,G=e):G=t):G=Di?df(e.stateNode.nextSibling):null;return!0}function Ii(){G=Di=null,Oi=!1}function Li(){var e=ki;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),ki=null),e}function Ri(e){ki===null?ki=[e]:ki.push(e)}var zi=F(null),Bi=null,Vi=null;function Hi(e,t,n){L(zi,t._currentValue),t._currentValue=n}function Ui(e){e._currentValue=zi.current,I(zi)}function Wi(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 K(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),Wi(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),Wi(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 Gi(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;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&K(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){Bi=e,Vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function q(e){return Yi(Bi,e)}function Ji(e,t){return Bi===null&&qi(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vi===null){if(e===null)throw Error(i(308));Vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vi=Vi.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=pd(),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=N.S;N.S=function(e,t){tu=we(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=F(null);function da(){var e=ua.current;return e===null?Ll.pooledCache:e}function fa(e,t){t===null?L(ua,ua.current):L(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(Qt,Qt),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(Qt,Qt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(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=ui(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=ci(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ci(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(ne(t)||j(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ba(n),p(e,t,n,r)}if(ne(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===C)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ba(r),m(e,t,n,r,i)}if(ne(r)||j(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),Oi&&Si(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 Oi&&Si(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)}),Oi&&Si(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Oi&&Si(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 Oi&&Si(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)}),Oi&&Si(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(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}n(e,r);break}t(e,r),r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(o),b(e,r,o,c)}if(ne(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(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=ii(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,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(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,Qe(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Rl&f)===f:(r&f)===f){f!==0&&f===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ma=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=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=F(null),Ga=F(0);function Ka(e,t){e=Wl,L(Ga,e),L(Wa,t),Wl=e|t.baseLanes}function qa(){L(Ga,Wl),L(Wa,Wa.current)}function Ja(){Wl=Ga.current,I(Wa),I(Ga)}var Ya=F(null),Xa=null;function Za(e){var t=e.alternate;L(no,no.current&1),L(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){L(no,no.current),L(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(L(no,no.current),L(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){L(no,no.current),L(Ya,Ya.current)}function to(e){I(Ya),Xa===e&&(Xa=null),I(no)}var no=F(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||cf(n)||lf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,J=null,ao=null,oo=null,so=!1,co=!1,lo=!1,uo=0,fo=0,po=null,mo=0;function ho(){throw Error(i(321))}function go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function _o(e,t,n,r,i,a){return io=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ps:Fs,lo=!1,a=n(r,i),lo=!1,co&&(a=yo(t,n,r,i)),vo(e),a}function vo(e){N.H=Ns;var t=ao!==null&&ao.next!==null;if(io=0,oo=ao=J=null,so=!1,fo=0,po=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&Ki(e)&&(Qs=!0))}function yo(e,t,n,r){J=e;var a=0;do{if(co&&(po=null),fo=0,co=!1,25<=a)throw Error(i(301));if(a+=1,oo=ao=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Is,o=t(n,r)}while(co);return o}function bo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Do(t):t,e=e.useState()[0],(ao===null?null:ao.memoizedState)!==e&&(J.flags|=1024),t}function xo(){var e=uo!==0;return uo=0,e}function So(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Co(e){if(so){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}so=!1}io=0,oo=ao=J=null,co=!1,fo=uo=0,po=null}function wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oo===null?J.memoizedState=oo=e:oo=oo.next=e,oo}function To(){if(ao===null){var e=J.alternate;e=e===null?null:e.memoizedState}else e=ao.next;var t=oo===null?J.memoizedState:oo.next;if(t!==null)oo=t,ao=e;else{if(e===null)throw J.alternate===null?Error(i(467)):Error(i(310));ao=e,e={memoizedState:ao.memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},oo===null?J.memoizedState=oo=e:oo=oo.next=e}return oo}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Do(e){var t=fo;return fo+=1,po===null&&(po=[]),e=ya(po,e,t),t=J,(oo===null?t.memoizedState:oo.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ps:Fs),e}function Oo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Do(e);if(e.$$typeof===C)return q(e)}throw Error(i(438,String(e)))}function ko(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=J.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Eo(),J.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Ao(e,t){return typeof t==`function`?t(e):t}function jo(e){return Mo(To(),ao,e)}function Mo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(Rl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,J.lanes|=p,Kl|=p;f=u.action,lo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,J.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(Qs=!0,d&&(n=aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function No(e){var t=To(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);xr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Po(e,t,n){var r=J,a=To(),o=Oi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((ao||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(Lo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||oo!==null&&oo.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||io&127||Fo(r,t,n)}return n}function Fo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=Eo(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Io(e,t,n,r){t.value=n,t.getSnapshot=r,Ro(t)&&zo(e)}function Lo(e,t,n){return n(function(){Ro(t)&&zo(e)})}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function zo(e){var t=$r(e,2);t!==null&&gu(t,e,2)}function Bo(e){var t=wo();if(typeof e==`function`){var n=e;if(e=n(),lo){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t}function Vo(e,t,n,r){return e.baseState=n,Mo(e,ao,typeof r==`function`?r:Ao)}function Ho(e,t,n,r,a){if(As(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Uo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Uo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uo(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(Oi){var n=Ll.formState;if(n!==null){a:{var r=J;if(Oi){if(G){b:{for(var i=G,a=Ai;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){G=df(i.nextSibling),r=i.data===`F!`;break a}}Mi(r)}r=!1}r&&(t=n[0])}}return n=wo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,J,r),r.dispatch=n,r=Bo(!1),a=ks.bind(null,J,!1,r.queue),r=wo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ho.bind(null,J,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(To(),ao,e)}function Zo(e,t,n){if(t=Mo(e,t,Jo)[0],e=jo(Ao)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Do(t)}catch(e){throw e===ma?ga:e}else r=t;t=To();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(J.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=To(),n=ao;if(n!==null)return Zo(t,n,e);To(),t=t.memoizedState,n=To();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=J.updateQueue,t===null&&(t=Eo(),J.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ts(){return To().memoizedState}function ns(e,t,n,r){var i=wo();J.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=To();r=r===void 0?null:r;var a=i.memoizedState.inst;ao!==null&&r!==null&&go(r,ao.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(J.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=Eo(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=To().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&go(t,r[1]))return r[0];if(r=e(),lo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(Rl&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),J.lanes|=e,Kl|=e,n)}function gs(e,t,n,r){return xr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Rl&261930)?(Qs=!0,e.memoizedState=n):(e=hu(),J.lanes|=e,Kl|=e,t):(e=hs(e,n,r),xr(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,ks(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,ca(c,r),mu(e)):Os(e,t,r,mu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,re,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},mu())}function Ss(){return q(tp)}function Cs(){return To().memoizedState}function ws(){return To().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(gu(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=Qr(e,t,n,r),n!==null&&(gu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,mu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,xr(s,o))return Zr(e,t,i,0),Ll===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return gu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&gu(t,e,2)}function As(e){var t=e.alternate;return e===J||t!==null&&t===J}function js(e,t){co=so=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Ns={readContext:q,use:Oo,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useLayoutEffect:ho,useInsertionEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useSyncExternalStore:ho,useId:ho,useHostTransitionStatus:ho,useFormState:ho,useActionState:ho,useOptimistic:ho,useMemoCache:ho,useCacheRefresh:ho};Ns.useEffectEvent=ho;var Ps={readContext:q,use:Oo,useCallback:function(e,t){return wo().memoizedState=[e,t===void 0?null:t],e},useContext:q,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=wo();t=t===void 0?null:t;var r=e();if(lo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=wo();if(n!==void 0){var i=n(t);if(lo){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=wo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(wo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,J,e.queue,!0,!1),wo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=J,a=wo();if(Oi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));Rl&127||Fo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Lo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,o,n,t),null),n},useId:function(){var e=wo(),t=Ll.identifierPrefix;if(Oi){var n=xi,r=bi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=mo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=wo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:ko,useCacheRefresh:function(){return wo().memoizedState=Ts.bind(null,J)},useEffectEvent:function(e){var t=wo(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:q,use:Oo,useCallback:ps,useContext:q,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:jo,useRef:ts,useState:function(){return jo(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(To(),ao.memoizedState,e,t)},useTransition:function(){var e=jo(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Vo(To(),ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:q,use:Oo,useCallback:ps,useContext:q,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:No,useRef:ts,useState:function(){return No(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){var n=To();return ao===null?hs(n,e,t):gs(n,ao.memoizedState,e,t)},useTransition:function(){var e=No(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=To();return ao===null?(n.baseState=e,[e,n.queue.dispatch]):Vo(n,ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(gu(t,e,n),La(t,e,n))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Sr(n,r)||!Sr(i,a):!0}function Bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){qr(e)}function Us(e){console.error(e)}function Ws(e){qr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=Fa(e),e.tag=3,e}function Ys(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?Ou():n.alternate===null&&Gl===0&&(Gl=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),qu(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)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),Ou(),!1}if(Oi)return t=Ya.current,t===null?(r!==ji&&(t=Error(i(423),{cause:r}),Ri(pi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=pi(r,n),a=qs(e.stateNode,r,a),Ra(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ji&&(e=Error(i(422),{cause:r}),Ri(pi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=pi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=pi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Js(a),Ys(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=_o(e,t,n,o,a,i),s=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Oi&&s&&wi(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref){if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Aa(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Oi){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(Qa(t),(e=G)?(e=sf(e,Ai),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,Di=t,G=null)):e=null,e===null)throw Mi(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a){if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Qs||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Ll,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),gu(r,e,s),Zs;Ou(),t=sc(e,t,n)}else e=o.treeContext,G=df(s.nextSibling),Di=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ei(t,e),t=oc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return qi(t),n=_o(e,t,n,r,void 0,i),r=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Oi&&r&&wi(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=yo(t,r,n,i),vo(e),r=xo(),e!==null&&!Qs?(So(e,t,a),wc(e,t,a)):(Oi&&r&&wi(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=q(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?q(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Rs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=q(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Ma||zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=q(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Ma||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Ii(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:pa()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(no.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Oi){if(a?Za(t):eo(t),(e=G)?(e=sf(e,Ai),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,Di=t,G=null)):e=null,e===null)throw Mi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Za(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ri({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Ll,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),gu(s,e,r),Zs;cf(c)||Ou(),t=bc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,G=df(c.nextSibling),Di=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ei(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Aa(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wi(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,L(no,o),$s(e,t,r,n),r=Oi?gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Gi(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=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ki(e)))}function Ec(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Hi(t,$i,e.memoizedState.cache),Ii();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(no,no.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Hi(t,$i,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}}else Qs=!1,Oi&&t.flags&1048576&&Ci(t,gi,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`)ai(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ec(null,t,e,r,n);break a}if(a===D){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=te(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(ce(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,Hi(t,$i,r),r!==o.cache&&K(t,[$i],n,!0),Ba(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}if(r!==a){a=pi(Error(i(424)),t),Ri(a),t=pc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(G=df(e.firstChild),Di=t,Oi=!0,ki=null,Ai=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ii(),r===a){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Oi||(n=t.type,e=t.pendingProps,r=Ud(z.current).createElement(n),r[at]=t,r[ot]=e,Ld(r,n,e),vt(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&Oi&&(r=t.stateNode=hf(t.type,t.pendingProps,z.current),Di=t,Ai=!0,a=G,ef(t.type)?(ff=a,G=df(r.firstChild)):G=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oi&&((a=r=G)&&(r=af(r,t.type,t.pendingProps,Ai),r===null?a=!1:(t.stateNode=r,Di=t,G=df(r.firstChild),Ai=!1,a=!0)),a||Mi(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=_o(e,t,bo,null,null,n),tp._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&Oi&&((e=n=G)&&(n=of(n,t.pendingProps,Ai),n===null?e=!1:(t.stateNode=n,Di=t,G=null,e=!0)),e||Mi(t)),null;case 13:return _c(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Hi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=q(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return qi(t),r=q($i),e===null?(a=da(),a===null&&(a=Ll,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Hi(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,Hi(t,$i,r),r!==a.cache&&K(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Hi(t,$i,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw xa=_a,ha}}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t)){if(Tu())e.flags|=8192;else throw xa=_a,ha}}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,Xl|=t)}function Mc(e,t){if(!Oi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Ti(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ui($i),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fi(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Li())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(de(t),n=z.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=oe.current,Fi(t)?Ni(t,e):(e=hf(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=oe.current,Fi(t))Ni(t,o);else{var s=Ud(z.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[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=z.current,Fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Mi(t,!0)}else e=Ud(e).createTextNode(r),e[at]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Fi(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[at]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Fi(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[at]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return le(),e===null&&wd(t.stateNode.containerInfo),Nc(t),null;case 10:return Ui(t.type),Nc(t),null;case 19:if(I(no),r=t.memoizedState,r===null)return Nc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Mc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return L(no,no.current&1|2),Oi&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>nu&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Oi)return Nc(t),null}else 2*we()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=no.current,L(no,a?n&1|2:n&1),Oi&&Si(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ui($i),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui($i),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Ii()}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));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(no),null;case 4:return le(),null;case 10:return Ui(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&I(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui($i),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ti(t),t.tag){case 3:Ui($i),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:I(no);break;case 10:Ui(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&I(ua);break;case 24:Ui($i)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Ku(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Ku(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){Ku(e,t,n)}else n.current=null}}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[ot]=t}catch(t){Ku(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[at]=e,t[ot]=n}catch(t){Ku(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Vd=up,e=Er(e),Dr(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(Hd={focusedElem:e,selectionRange:n},up=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ku(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ku(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ku(n,n.return,e)}}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(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){Ku(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,!!(n.subtreeFlags&8772)):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;ef(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),gf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null){if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Ku(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Ku(n,t,e)}}break;case 18:il!==null&&(al?(e=il,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Ku(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Ku(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function fl(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(ef(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ld(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Wf(`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),Ld(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`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),Ld(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode)}else e.stateNode=zf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Ku(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ku(e,e.return,t)}}break;case 3:if(Uf=null,a=pl,pl=yf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Ku(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=yf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(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){Ku(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Ku(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Ku(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,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Ku(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:gf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),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:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ku(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){Ku(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(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 xl(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 Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(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){Sl(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){Ku(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(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:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Jf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=yf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(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 Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=q($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return q($i).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Y=null,Rl=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Il&2&&Rl!==0?Rl&-Rl:N.T===null?nt():pd()}function hu(){if(Yl===0){if(!(Rl&536870912)||Oi){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),Yl=e}else Yl=536870912}return e=Ya.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Ll&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Rl,Yl,!1)),Ye(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(ql|=n),Gl===4&&bu(e,Rl,Yl,!1)),ad(e))}function _u(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ge(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}if(n=e.current.alternate,o&&!yu(n)){a=ku(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=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(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:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-we(),10<a)){if(bu(r,t,Yl,!Vl),We(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Yd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}break}while(1);ad(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Ol(t,a,d);var m=(a&62914560)===a?eu-we():(a&4194048)===a?tu-we():0;if(m=Xf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(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(!xr(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 bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function xu(){return Il&6?!0:(od(0,!1),!1)}function Su(){if(Y!==null){if(zl===0)var e=Y.return;else e=Y,Vi=Bi=null,Co(e),wa=null,Ta=0,e=Y;for(;e!==null;)Ic(e.alternate,e),e=e.return;Y=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Ll=e,Y=n=oi(e.current,null),Rl=t,zl=0,Bl=null,Vl=!1,Hl=Ge(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,Xr(),n}function wu(e,t){J=null,N.H=Ns,t===ma||t===ga?(t=Sa(),zl=3):t===ha?(t=Sa(),zl=4):zl=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,Y===null&&(Gl=1,Gs(e,pi(t,e.current)))}function Tu(){var e=Ya.current;return e===null?!0:(Rl&4194048)===Rl?Xa===null:(Rl&62914560)===Rl||Rl&536870912?e===Xa:!1}function Eu(){var e=N.H;return N.H=Ns,e===null?Ns:e}function Du(){var e=N.A;return N.A=Pl,e}function Ou(){Gl=4,Vl||(Rl&4194048)!==Rl&&Ya.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Ll===null||bu(Ll,Rl,Yl,!1)}function ku(e,t,n){var r=Il;Il|=2;var i=Eu(),a=Du();(Ll!==e||Rl!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&Y!==null){var s=Y,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Vi=Bi=null,Il=r,N.H=i,N.A=a,Y===null&&(Ll=null,Rl=0,Xr()),o}function Au(){for(;Y!==null;)Nu(Y)}function ju(e,t){var n=Il;Il|=2;var r=Eu(),a=Du();Ll!==e||Rl!==t?(ru=null,nu=we()+500,Cu(e,t)):Hl=Ge(e,t);a:do try{if(zl!==0&&Y!==null){t=Y;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(va(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Ll!==e||(zl=7),ad(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:va(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?qf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Vi=Bi=null,N.H=r,N.A=a,Il=n,Y===null?(Ll=null,Rl=0,Xr(),Gl):0}function Mu(){for(;Y!==null&&!Se();)Nu(Y)}function Nu(e){var t=Dc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):Y=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,Rl);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Rl);break;case 5:Co(t);default:Ic(n,t),t=Y=si(t,Wl),t=Dc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):Y=t}function Fu(e,t,n,r){Vi=Bi=null,Co(t),wa=null,Ta=0;var i=t.return;try{if(Xs(e,i,t,n,Rl)){Gl=1,Gs(e,pi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Gl=1,Gs(e,pi(n,e.current)),Y=null;return}t.flags&32768?(Oi||r===1?e=!0:Hl||Rl&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Pc(t.alternate,t,Wl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Gl=6,Y=null}function Ru(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Xe(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,Rl=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(Oe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,P.p=a,N.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Hd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(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 _=wr(s,h),v=wr(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}}up=!!Vd,Hd=Vd=null}finally{Il=i,P.p=r,N.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,P.p=r,N.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,Ce();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.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{N.T=t,P.p=i}}cu&3&&Uu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,od(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=tt(cu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,od(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{P.p=a,N.T=r,Hu(e,t)}}function Gu(e,t,n){t=pi(n,t),t=qs(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ye(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=pi(n,e),n=Js(2),r=Ia(t,n,2),r!==null&&(Ys(n,r,t,e),Ye(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;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)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>we()-eu?!(Il&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=qe()),e=$r(e,t),e!==null&&(Ye(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(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),Yu(e,n)}function Qu(e,t){return be(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Rl,a=We(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,dd(r,a))}r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=we(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=Rl,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=ud.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Rl;return r=We(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),ld(e,we()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Uu())return null;_u(e,t,!0)}function fd(){Qd(function(){Il&6?be(Ee,sd):cd()})}function pd(){if(id===0){var e=ia;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function hd(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 gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<Gr.length;_d++){var vd=Gr[_d];Kr(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}Kr(Rr,`onAnimationEnd`),Kr(zr,`onAnimationIteration`),Kr(Br,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Vr,`onTransitionRun`),Kr(V,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`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(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(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){qr(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,yt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=mt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;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=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case Rr:case zr:case Br:l=An;break;case Ur:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=sn(m,p),g!=null&&d.push(Dd(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!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,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&&Ad(s,c,l,d,!1),u!==null&&f!==null&&Ad(s,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c)){if(ur)v=yr;else{v=_r;var y=gr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,B=null);break;case`focusout`:B=Ar=kr=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Gn)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 $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Od(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),gd(s,e,r,n,i)}xd(s,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=sn(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=sn(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=sn(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
9
- `).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`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=Zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:X(`beforetoggle`,e),X(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Dt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:qt(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`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ot]||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,``):Dt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`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:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:X(`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:Fd(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in X(`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:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in X(`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:Fd(e,t,s,c,n,null)}Ut(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:Fd(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)X(yd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`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:Fd(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(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)||Fd(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&&Fd(e,t,p,m,r,f)}}Rt(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)||Fd(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&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(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&&Fd(e,t,s,a,r,o)}Ht(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(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:Fd(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)&&Fd(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:Fd(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(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||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(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||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){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&&zd(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&&zd(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(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),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function nf(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 rf(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`:rf(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(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 df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(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 hf(e,t,n){switch(t=Ud(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 gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=P.d;P.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=xu();return e||t}function Sf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=h({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),vt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=_t(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);vt(c),Ld(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,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=_t(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=h({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),vt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=_t(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),vt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=z.current)?yf(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=Nf(n.href),n=_t(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=Nf(n.href);var o=_t(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(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.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},_f.set(e,n),o||If(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=Lf(n),n=_t(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 Nf(e){return`href="`+Lt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function If(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}),Ld(t,`link`,n),vt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Lt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,vt(a),a):(r=n,(a=_f.get(o))&&(r=h({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),Ld(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,Bf(r,n.precedence,e));return t.instance}function Bf(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 Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ft]||a[at]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(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=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(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=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.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=Zf.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 tp={$$typeof:C,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(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 ip(e){return e?(e=ni,e):ni}function ap(e,t,n,r,i,a){i=ip(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&&(gu(n,e,t),La(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&gu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=mu();t=et(t);var n=$r(e,t);n!==null&&gu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function fp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Il&6)&&(nu=we()+500,od(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&gu(s,a,2),xu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=en(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=mt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ht(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=mt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,rt(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){lp(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 Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=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(gp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ot]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){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 Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,mu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),xu(),t[st]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ne=Hp.inject(Vp),Pe=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[st]=t.current,wd(e),new Rp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),v=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),y=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),b=e=>{let t=y(e);return t.charAt(0).toUpperCase()+t.slice(1)},x={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`},S=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},C=c(u(),1),w=(0,C.createContext)({}),T=()=>(0,C.useContext)(w),E=(0,C.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=``}=T()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,C.createElement)(`svg`,{ref:c,...x,width:t??l??x.width,height:t??l??x.height,stroke:e??f,strokeWidth:m,className:_(`lucide`,p,i),...!a&&!S(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,C.forwardRef)(({className:n,...r},i)=>(0,C.createElement)(E,{ref:i,iconNode:t,className:_(`lucide-${v(b(e))}`,`lucide-${e}`,n),...r}));return n.displayName=b(e),n},O=D(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),ee=D(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),k=D(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),A=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),j=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),M=D(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),te=D(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ne=D(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),N=D(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),P=D(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),re=D(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ie=D(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ae=D(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),F=D(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),I=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),L=D(`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`}]]),oe=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),R=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),z=D(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),se=D(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ce=D(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),le=D(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),ue=D(`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`}]]),de=D(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),fe=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),pe=g(),me=c(m(),1);function he(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ge=e=>{switch(e){case`success`:return ye;case`info`:return xe;case`warning`:return be;case`error`:return Se;default:return null}},_e=Array(12).fill(0),ve=({visible:e,className:t})=>C.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},C.createElement(`div`,{className:`sonner-spinner`},_e.map((e,t)=>C.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),ye=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),be=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),xe=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Se=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ce=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},C.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),C.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),we=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},Te=1,Ee=100,De=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:Te++,Oe=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Ee;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=De(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],C.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Ae(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=De(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},ke=(e,t)=>Oe.message(e,t),Ae=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,je=Object.assign(ke,{success:Oe.success,info:Oe.info,warning:Oe.warning,error:Oe.error,custom:Oe.custom,message:Oe.message,promise:Oe.promise,dismiss:Oe.dismiss,loading:Oe.loading},{getHistory:()=>Oe.toasts,getToasts:()=>Oe.getActiveToasts()});he(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Me(e){return e.label!==void 0}var Ne=3,Pe=`24px`,Fe=`16px`,Ie=4e3,Le=356,Re=14,ze=45,Be=200;function Ve(...e){return e.filter(Boolean).join(` `)}function He(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Ue=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=C.useState(null),[ee,k]=C.useState(null),[A,j]=C.useState(!1),[M,te]=C.useState(!1),[ne,N]=C.useState(!1),[P,re]=C.useState(!1),[ie,ae]=C.useState(!1),[F,I]=C.useState(0),[L,oe]=C.useState(0),R=C.useRef(n.duration||y||Ie),z=C.useRef(null),se=C.useRef(null),ce=c===0,le=c+1<=o,ue=n.type,de=ue??`default`,fe=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,he=C.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=C.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ye=C.useMemo(()=>n.duration||y||Ie,[n.duration,y]),be=C.useRef(0),xe=C.useRef(0),Se=C.useRef(0),Te=C.useRef(null),[Ee,De]=b.split(`-`),Oe=C.useMemo(()=>s.reduce((e,t,n)=>n>=he?e:e+t.height,0),[s,he]),ke=we(),Ae=C.useMemo(()=>e.swipeDirections??He(b),[e.swipeDirections,b]),je=n.invert||t,Ne=ue===`loading`;xe.current=C.useMemo(()=>he*x+Oe,[he,Oe]),C.useEffect(()=>{R.current=ye},[ye]),C.useEffect(()=>{j(!0)},[]),C.useEffect(()=>{let e=se.current;if(e){let t=e.getBoundingClientRect().height;return oe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),C.useLayoutEffect(()=>{if(!A)return;let e=se.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,oe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Pe=C.useCallback(()=>{te(!0),I(xe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Be)},[n,d,a,xe]);C.useEffect(()=>{if(n.promise&&ue===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ke?(()=>{if(Se.current<be.current){let e=new Date().getTime()-be.current;R.current-=e}Se.current=new Date().getTime()})():R.current!==1/0&&(be.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Pe()},R.current)),()=>clearTimeout(e)},[u,i,n,ue,ke,Pe]),C.useEffect(()=>{n.delete&&(Pe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Pe,n.delete]);function Fe(){return T?.loading?C.createElement(`div`,{className:Ve(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ue===`loading`},T.loading):C.createElement(ve,{className:Ve(w?.loader,n?.classNames?.loader),visible:ue===`loading`})}let Le=n.icon||T?.[ue]||ge(ue);return C.createElement(`li`,{tabIndex:0,ref:se,className:Ve(_,pe,w?.toast,n?.classNames?.toast,w?.[de],n?.classNames?.[de]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ie,"data-removed":M,"data-visible":le,"data-y-position":Ee,"data-x-position":De,"data-index":c,"data-front":ce,"data-swiping":ne,"data-dismissible":fe,"data-type":ue,"data-invert":je,"data-swipe-out":P,"data-swipe-direction":ee,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?F:xe.current}px`,"--initial-height":S?`auto`:`${L}px`,...m,...n.style},onDragEnd:()=>{N(!1),O(null),Te.current=null},onPointerDown:e=>{e.button!==2&&!Ne&&fe&&(z.current=new Date,I(xe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(N(!0),Te.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(P||!fe)return;Te.current=null;let e=Number(se.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(se.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-z.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Ae.includes(e>0?`right`:`left`):Ae.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=ze||a>.11)){I(xe.current),n.onDismiss==null||n.onDismiss.call(n,n),k(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Pe(),re(!0);return}var o,s;(o=se.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=se.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ae(!1),N(!1),O(null)},onPointerMove:e=>{var t,n;if(!Te.current||!fe||window.getSelection()?.toString().length>0)return;let r=e.clientY-Te.current.y,i=e.clientX-Te.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Ae.includes(`top`)||Ae.includes(`bottom`)){if(Ae.includes(`top`)&&r<0||Ae.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Ae.includes(`left`)||Ae.includes(`right`))){if(Ae.includes(`left`)&&i<0||Ae.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ae(!0),(t=se.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=se.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},_e&&!n.jsx&&ue!==`loading`?C.createElement(`button`,{"aria-label":E,"data-disabled":Ne,"data-close-button":!0,onClick:Ne||!fe?()=>{}:()=>{Pe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Ve(w?.closeButton,n?.classNames?.closeButton)},T?.close??Ce):null,(ue||n.icon||n.promise)&&n.icon!==null&&(T?.[ue]!==null||n.icon)?C.createElement(`div`,{"data-icon":``,className:Ve(w?.icon,n?.classNames?.icon)},ue===`loading`?n.icon||Fe():n.promise?Fe():null,ue===`loading`?null:Le):null,C.createElement(`div`,{"data-content":``,className:Ve(w?.content,n?.classNames?.content)},C.createElement(`div`,{"data-title":``,className:Ve(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?C.createElement(`div`,{"data-description":``,className:Ve(v,me,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),C.isValidElement(n.cancel)?n.cancel:n.cancel&&Me(n.cancel)?C.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Me(n.cancel)&&fe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Pe())},className:Ve(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,C.isValidElement(n.action)?n.action:n.action&&Me(n.action)?C.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Me(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Pe())},className:Ve(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function We(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Ge(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Fe:Pe;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Ke=C.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Ne,toastOptions:g,dir:_=We(),gap:v=Re,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,w]=C.useState([]),T=C.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),E=C.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=C.useState([]),[ee,k]=C.useState(!1),[A,j]=C.useState(!1),[M,te]=C.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ne=C.useRef(null),N=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=C.useRef(null),re=C.useRef(!1),ie=C.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||Oe.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return C.useEffect(()=>Oe.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{me.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),C.useEffect(()=>{if(d!==`system`){te(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?te(`dark`):te(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{te(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{te(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),C.useEffect(()=>{S.length<=1&&k(!1)},[S]),C.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ne.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ne.current||ne.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),C.useEffect(()=>{if(ne.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,re.current=!1)}},[ne.current]),C.createElement(`section`,{ref:t,"aria-label":b??`${x} ${N}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?C.createElement(`ol`,{key:t,dir:_===`auto`?We():_,tabIndex:-1,ref:ne,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${Le}px`,"--gap":`${v}px`,...m,...Ge(l,u)},onBlur:e=>{re.current&&!e.currentTarget.contains(e.relatedTarget)&&(re.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re.current||(re.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>C.createElement(Ue,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ie,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:v,expanded:ee,swipeDirections:e.swipeDirections}))):null}))});function qe(e){if(typeof e==`string`&&e.trim()){let t=e.trim(),n=/^(\d{4})-(\d{2})-(\d{2})/.exec(t);if(n)return`${n[1]}-${n[2]}-${n[3]}`;let r=Date.parse(t);if(Number.isNaN(r))return;let i=new Date(r);return`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,`0`)}-${String(i.getDate()).padStart(2,`0`)}`}if(e&&typeof e==`object`){let t=e;return qe(t.value)??qe(t.date)}}function Je(e,t=Date.now()){if(typeof e!=`string`||!e)return;let n=/^(\d{4})-(\d{2})-(\d{2})/.exec(e),r=n?Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3])):Date.parse(e);if(Number.isNaN(r))return;let i=new Date(t),a=Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),o=n?r:Date.UTC(new Date(r).getUTCFullYear(),new Date(r).getUTCMonth(),new Date(r).getUTCDate());return`${Math.max(0,Math.round((a-o)/864e5))}d`}function Ye(e,t=Date.now()){let n=qe(e);if(!n)return;let r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(!r)return;let i=Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3])),a=new Date(t),o=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s=Math.round((i-o)/864e5),c=Math.abs(s);return c<7?`${c}d`:c<60?`${Math.max(1,Math.floor(c/7))}w`:`${Math.max(1,Math.round(c/30))}m`}function Xe(e){let t=[],n=new Map;for(let r of e){let e=r.status??`To Do`,i=n.get(e);i||(i={id:e,title:e,cards:[]},n.set(e,i),t.push(i)),i.cards.push({key:r.key,summary:r.summary,type:`Epic`,...r.priority?{priority:r.priority}:{},...r.assignee?{assignee:r.assignee}:{},...r.dueDate?{dueDate:r.dueDate}:{},...r.targetEnd?{targetEnd:r.targetEnd}:{},...r.labels?{labels:r.labels}:{},...r.created?{created:r.created}:{}})}return t}function Ze(e,t,n){return e===`selected`?t?{scope:`selected`,epicKeys:[t],flags:n}:null:{scope:`all`,flags:n}}var Qe=`No Epic is focused. All Epics will be refreshed.`;function $e(e){let t=[],n=/"([^"]*)"|'([^']*)'|(\S+)/g,r;for(;r=n.exec(e);)t.push(r[1]??r[2]??r[3]);return t}function et(e,t,n){let r=e[t].slice(n.length);return r?[r,t]:[e[t+1]??``,t+1]}function tt(e){let t=$e(e.trim()||``),n=``,r=``,i=``,a=``,o=``,s=[],c=[];for(let e=0;e<t.length;e++){let l=t[e];if(l!==`--raw`){if(l.startsWith(`-a`)){[n,e]=et(t,e,`-a`);continue}if(l.startsWith(`-P`)){[r,e]=et(t,e,`-P`);continue}if(l.startsWith(`-t`)){[i,e]=et(t,e,`-t`);continue}if(l.startsWith(`-s`)){let[n,r]=et(t,e,`-s`);e=r,n.startsWith(`~`)?c.push(n.slice(1)):s.push(n);continue}if(l===`--projects`){[o,e]=et(t,e,`--projects`);continue}if(l===`-q`||l===`--jql`){a=t[++e]??``;continue}l.startsWith(`-q`)&&(a=l.slice(2))}}let l=o.split(`,`).map(e=>e.trim().toUpperCase()).filter(Boolean);if(a)return{jql:a,projects:l};let u=l.length?`project in (${l.map(e=>`"${e}"`).join(`, `)})`:``,d=[];u&&d.push(u),n&&d.push(`assignee="${n}"`),i&&d.push(`type="${i}"`),r&&d.push(`parent="${r}"`);for(let e of s)d.push(`status="${e}"`);for(let e of c)d.push(`status!="${e}"`);return{jql:d.join(` AND `),projects:l}}function nt(e,t){return e.epic===t}function rt(e){return e.trim().toLowerCase()}function it(e){return[e.key,e.summary,e.assignee,e.priority,e.epic,...e.labels??[]].filter(e=>!!e).join(`
10
- `).toLowerCase()}function at(e,t){let n=rt(t);return!n||it(e).includes(n)}function ot(e,t){let n=rt(t);return!n||`${e.key}\n${e.summary}\n${(e.labels??[]).join(`
11
- `)}`.toLowerCase().includes(n)}function st(e){let t=(e??``).trim().toLowerCase();if(!t)return 1e3;let n=/^p(\d+)$/.exec(t);return n?Number(n[1]):{highest:1,critical:1,blocker:1,high:2,h:2,medium:3,med:3,m:3,normal:3,low:4,l:4,lowest:5,trivial:5}[t]??100}function ct(e=[]){return new Map(e.map(e=>[e.key,e]))}function lt(e,t){return(e.epic?t.get(e.epic)?.assignee:void 0)??`Unassigned`}function ut(e,t,n){return t===`assignee`?[e.assignee??`Unassigned`]:t===`epicAssignee`?[lt(e,n)]:t===`priority`?e.priority?[e.priority]:[]:t===`labels`?e.labels??[]:[]}function dt(e){return!!(e&&Object.values(e).some(e=>e.length>0))}function ft(e,t,n){if(!dt(t))return!0;let r=ct(n);return Object.entries(t).every(([t,n])=>!n.length||ut(e,t,r).some(e=>n.includes(e)))}function pt(e,t){return[...new Set(e)].sort(t)}function mt(e,t,n,r){if(n.length)return{key:e,label:t,group:`Assignee`,values:[...pt(n,(e,t)=>e.localeCompare(t)),...r?[`Unassigned`]:[]]}}function ht(e,t=[]){let n=[],r=[...e.map(e=>e.priority),...t.map(e=>e.priority)].filter(e=>!!e);r.length&&n.push({key:`priority`,label:`Priority`,group:`Priority`,values:pt(r,(e,t)=>st(e)-st(t)||e.localeCompare(t))});let i=ct(t),a=mt(`epicAssignee`,`Epic`,e.map(e=>e.epic?i.get(e.epic)?.assignee:void 0).filter(e=>!!e),e.some(e=>!i.get(e.epic??``)?.assignee));a&&n.push(a);let o=mt(`assignee`,`Stories`,[...e.map(e=>e.assignee),...t.map(e=>e.assignee)].filter(e=>!!e),e.some(e=>!e.assignee)||t.some(e=>!e.assignee));o&&n.push(o);let s=[...e.flatMap(e=>e.labels??[]),...t.flatMap(e=>e.labels??[])];return s.length&&n.push({key:`labels`,label:`Labels`,group:`Labels`,values:pt(s,(e,t)=>e.localeCompare(t))}),n}function gt(e,t,n,r,i){return t&&!nt(e,t)?!0:!at(e,n)||!ft(e,r,i)}function _t(e){return e?Date.parse(e):NaN}function vt(e,t){let n=Number.isNaN(e),r=Number.isNaN(t);return n&&r?0:n?1:r?-1:e-t}function yt(e,t){let n=st(e.priority)-st(t.priority);return n===0?e.key.localeCompare(t.key):n}function bt(e,t){return Array.isArray(e)&&e.length>0&&!(typeof e[0]==`object`&&`title`in e[0])?xt(e,t):e.map(({title:e,cards:n})=>({title:e,cards:xt(n,t)}))}function xt(e,t){return!t||t===`payload`?e:[...e].sort((e,n)=>{let r=0;return t===`priority`?r=yt(e,n):t===`age`?r=vt(_t(e.created),_t(n.created)):t===`due`?r=vt(_t(e.dueDate),_t(n.dueDate)):t===`key`&&(r=e.key.localeCompare(n.key)),r===0?e.key.localeCompare(n.key):r})}function St(e,t,n){if(!rt(n)||!t)return e;let r=new Set(Object.values(e).flatMap(e=>e.map(e=>e.key))),i=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]));for(let[e,a]of Object.entries(t))for(let t of a){if(r.has(t.key)||!at(t,n))continue;r.add(t.key);let a=i[e]??[];a.push(t),i[e]=a}return i}function Ct(e,t,n=``,r){let i=new Set(r?.hide??[]),a=r?.filter,o=t.filter(e=>at(e,n)&&Et(e,a)),s=o.map(e=>({key:e.key,summary:e.summary,priority:e.priority,assignee:e.assignee,dueDate:e.dueDate,targetEnd:e.targetEnd,labels:e.labels,type:`Epic`,created:e.created})),c=Object.values(e).flat().filter(e=>!o.some(t=>t.key===e.key)&&at(e,n)&&ft(e,a,t)),l=[...s,...c],u=new Map;for(let t of Object.keys(e))u.set(t,[]);for(let n of l){let r=n.type===`Epic`?t.find(e=>e.key===n.key)?.status??`To Do`:Object.entries(e).find(([,e])=>e.some(e=>e.key===n.key))?.[0]??`To Do`,i=u.get(r)??[];i.push(n),u.set(r,i)}let d=bt([...u.entries()].filter(([,e])=>e.length>0).map(([e,t])=>({title:e,cards:t})),r?.sort);return Object.fromEntries(d.filter(({title:e})=>!i.has(e)).map(({title:e,cards:t})=>[e,t]))}function wt(e,t,n=``,r){let i=new Set(r?.hide??[]),a=Object.fromEntries(Object.entries(e).filter(([e])=>!i.has(e)).map(([e,i])=>[e,bt(i.filter(e=>!gt(e,t,n,r?.filter,r?.epics)),r?.sort)]));return!rt(n)&&!dt(r?.filter)?a:Object.fromEntries(Object.entries(a).filter(([,e])=>e.length>0))}function Tt(e,t){return t===`assignee`||t===`epicAssignee`?[e.assignee??`Unassigned`]:t===`priority`?e.priority?[e.priority]:[]:t===`labels`?e.labels??[]:[]}function Et(e,t){return!dt(t)||Object.entries(t).every(([t,n])=>!n.length||Tt(e,t).some(e=>n.includes(e)))}function Dt(e,t,n,r,i){return t.filter(t=>t.epic===e.key&&at(t,n)&&ft(t,r,i))}function Ot(e,t,n,r,i){let a=t.filter(t=>t.epic===e.key);return!rt(n)||ot(e,n)||a.some(e=>at(e,n))?!dt(r)||a.length===0||Et(e,r)||Dt(e,t,n,r,i).length>0:!1}function kt(e,t,n=``,r,i){return Dt({key:t,summary:``},e,n,r,i).length}function At(e,t,n,r){return!rt(n)&&!dt(r)?e:e.filter(i=>Ot(i,t,n,r,e))}function jt(e){let t=new Map,n=[],r=[];for(let i of e){let e=i.status?.trim()??``;if(!e){r.push(i);continue}let a=t.get(e);if(!a){t.set(e,[i]),n.push(e);continue}a.push(i)}return[...n.map(e=>({status:e,epics:t.get(e)??[]})),...r.length?[{status:``,epics:r}]:[]]}function Mt(e){let t=new Map;for(let[n,r]of Object.entries(e))for(let e of r)t.set(e.key,n);return Object.fromEntries(Object.entries(e).map(([e,n])=>{let r=new Set;return[e,n.filter(n=>t.get(n.key)!==e||r.has(n.key)?!1:(r.add(n.key),!0))]}))}function Nt(e,t){if(!t||t.length===0)return e;let n=new Set(Object.keys(e)),r=[...t.filter(e=>n.has(e)),...Object.keys(e).filter(e=>!t.includes(e))];return Object.fromEntries(r.map(t=>[t,e[t]??[]]))}function Pt(e,t,n,r=``,i){let a=i?.hide??[],o=Mt(e);if(!n&&!rt(r)&&!dt(i?.filter)&&a.length===0)return o;let s=new Set(Object.values(o).flatMap(e=>e.map(e=>e.key))),c=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(a.includes(e)?t:t.filter(e=>gt(e,n,r,i?.filter,i?.epics))).filter(e=>!s.has(e.key))])),l=[...Object.keys(o),...Object.keys(c).filter(e=>!(e in o))];return Object.fromEntries(l.map(e=>[e,[...c[e]??[],...o[e]??[]]]))}function Ft(e,t,n,r=``,i){return Pt(e,t,n,r,i)}function It(e,t,n){let r=new Set(Object.values(t).flat().map(e=>e.key)),i=new Set([...Object.keys(e),...Object.keys(t)]);return Object.fromEntries([...i].map(i=>{let a=e[i]??[],o=t[i]??[],s=new Set(a.map(e=>e.key)),c=a.map(e=>r.has(e.key)?{...e,epic:e.epic??n}:e),l=o.filter(e=>!s.has(e.key)).map(e=>({...e,epic:e.epic??n}));return[i,[...c,...l]]}))}function Lt(e,t){return t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase())}function Rt(e,t,n=``,r=[],i){let a=new Set(t.folders.flatMap(e=>e.keys)),o=new Map(e.map(e=>[e.key,e]));return{unfiled:t.keys.map(e=>o.get(e)).filter(t=>!!t&&!a.has(t.key)&&Ot(t,r,n,i,e)).sort(yt),folders:[...t.folders].sort((e,t)=>e.name.localeCompare(t.name)).map(t=>({name:t.name,epics:t.keys.map(e=>o.get(e)).filter(t=>!!t&&Ot(t,r,n,i,e)).sort(yt)})).filter(e=>!rt(n)||ot({key:``,summary:e.name},n)||e.epics.length>0)}}function zt(e,t){return e.keys.includes(t)?{keys:e.keys.filter(e=>e!==t),folders:e.folders.map(e=>({...e,keys:e.keys.filter(e=>e!==t)}))}:{...e,keys:[...e.keys,t]}}function Bt(e,t){let n=t.trim();return!n||Lt(n,e.folders)?{ok:!1}:{ok:!0,state:{...e,folders:[...e.folders,{name:n,keys:[]}]}}}function Vt(e,t,n){let r=n.trim(),i=Lt(t,e.folders);if(!r||!i)return{ok:!1};let a=Lt(r,e.folders);return a&&a!==i||a===i?{ok:!1}:{ok:!0,state:{...e,folders:e.folders.map(e=>e===i?{...e,name:r}:e)}}}function Ht(e,t){return{...e,folders:e.folders.filter(e=>e.name.toLowerCase()!==t.trim().toLowerCase())}}function Ut(e,t,n){let r=e.keys.includes(t)?e.keys:[...e.keys,t],i=e.folders.map(e=>({...e,keys:e.keys.filter(e=>e!==t)}));if(n){let e=Lt(n,i);e&&e.keys.push(t)}return{keys:r,folders:i}}function Wt(e,t){return t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase())}function Gt(e){return{filter:{...e.filter},sort:e.sort,hide:[...e.hide],boardKind:e.boardKind,projects:e.projects?[...e.projects]:void 0}}function Kt(e,t,n){let r=t.trim();return!r||Wt(r,e)?{ok:!1}:{ok:!0,presets:[...e,{name:r,...Gt(n)}]}}function qt(e,t){let n=Wt(t,e);return n?{ok:!0,chrome:Gt(n)}:{ok:!1}}function Jt(e,t,n){let r=Wt(t,e);return r?{ok:!0,presets:e.map(e=>e===r?{name:r.name,...Gt(n)}:e)}:{ok:!1}}function Yt(e,t,n){let r=n.trim(),i=Wt(t,e);return!r||!i||Wt(r,e)?{ok:!1}:{ok:!0,presets:e.map(e=>e===i?{...e,name:r}:e)}}function Xt(e,t){return e.filter(e=>e.name.toLowerCase()!==t.trim().toLowerCase())}function Zt(e){let t=e.query.trim().toLowerCase(),n=[{label:`All stories`,jump:{kind:`all-stories`}},{label:`All epics`,jump:{kind:`all-epics`}},{label:`All combined`,jump:{kind:`all-combined`}},{label:`Refresh`,jump:{kind:`refresh`}},{label:`Agent`,jump:{kind:`agent`}},{label:`Create issue`,jump:{kind:`create`}},{label:`Create with AI`,jump:{kind:`create-ai`}},...e.presets.map(e=>({label:`Apply ${e}`,jump:{kind:`preset`,name:e}}))].filter(e=>!t||e.label.toLowerCase().includes(t)),r=[];if(n.length&&r.push({id:`actions`,title:`Actions`,rows:n}),!t)return r;let i=new Set(e.favouriteKeys??[]),a=(e.epics??[]).filter(t=>ot(t,e.query)).map(e=>({label:e.summary,key:e.key,...i.has(e.key)?{starred:!0}:{},jump:{kind:`epic`,key:e.key}}));a.length&&r.push({id:`epics`,title:`Epics`,rows:a});let o=(e.cards??[]).filter(t=>at(t,e.query)).map(e=>({label:e.summary,key:e.key,jump:{kind:`card`,key:e.key,...e.epic?{epic:e.epic}:{}}}));return o.length&&r.push({id:`cards`,title:`Cards`,rows:o}),r}function Qt(e){return e.jump}var $t=/[a-z0-9]{2,}/g;function en(e){return e.toLowerCase().match($t)??[]}function tn(e){let t=new Set,n=[];for(let r of e)for(let e of r?.labels??[]){let r=e.toLowerCase();e&&!t.has(r)&&(t.add(r),n.push(e))}return n}function nn(e){let t=e.text.toLowerCase();if(!e.text.trim())return[];let n=new Set((e.selected??[]).map(e=>e.toLowerCase())),r=en(e.text),i=new Set,a=[];for(let o of e.labels){let e=o.toLowerCase();if(!e||n.has(e)||i.has(e))continue;let s=en(o);if((t.includes(e)||s.some(e=>r.includes(e)||t.includes(e))||r.some(t=>e.includes(t)))&&(i.add(e),a.push(o),a.length>=5))break}return a}function rn(e,t){let n=nn({text:`${e.title}\n${e.description}`,labels:t,selected:e.labels}),r=new Set(e.dismissed.map(e=>e.toLowerCase()));return n.filter(e=>!r.has(e.toLowerCase()))}function an(e,t){return e.labels.some(e=>e.toLowerCase()===t.toLowerCase())?e:{...e,labels:[...e.labels,t]}}function on(e,t){return e.dismissed.some(e=>e.toLowerCase()===t.toLowerCase())?e:{...e,dismissed:[...e.dismissed,t]}}function sn(e,t){return{...e,labels:e.labels.filter(e=>e.toLowerCase()!==t.toLowerCase())}}function cn(e){return{...e.status?{status:e.status}:{},...e.selectedEpic&&e.boardKind!==`epics`?{epic:e.selectedEpic}:{},...e.boardKind===`epics`?{type:`Epic`}:{}}}function ln(e={}){return{mode:`create`,title:``,description:``,labels:[],dismissed:[],...e}}function un(e={}){return ln(cn(e))}function dn(e={}){let t=un(e);return{draft:t,seed:xn(t)}}function fn(e){let t={...e.status?{status:e.status}:{},...e.epic?{epic:e.epic}:{},...e.type?{type:e.type}:{}};return e.fields?.length?yn(e.key,e.fields,t):{mode:`edit`,key:e.key,title:e.summary??``,description:e.description??``,labels:e.labels??[],dismissed:[],...t}}function pn(e,t=!1){return!!e?.title.trim()&&!t}function mn(e){return!e||e.mode!==`create`||!pn(e)?null:{summary:e.title.trim(),description:e.description,labels:e.labels,...e.status?{status:e.status}:{},...e.epic?{parent:e.epic}:{},...e.type?{type:e.type}:{}}}function hn(e){return!e||e.mode!==`edit`||!e.key||!pn(e)?null:{key:e.key,summary:e.title.trim(),description:e.description,labels:e.labels}}function gn(e,t,n=!1){return e.key===`Escape`?`close`:e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&pn(t,n)?`submit`:null}function _n(e,t){let n=t.toLowerCase();return e?.find(e=>e.label.toLowerCase()===n)}function vn(e){return e?.pills?.length?e.pills:e?.value.trim()?e.value.split(/,\s*/).filter(Boolean):[]}function yn(e,t,n={}){return{mode:`edit`,key:e,title:_n(t,`Summary`)?.value??``,description:_n(t,`Description`)?.value??``,labels:vn(_n(t,`Labels`)),dismissed:[],...n}}function bn(e,t){if(e.mode!==`edit`||!e.key)return e;let n=yn(e.key,t,{status:e.status,epic:e.epic,type:e.type});return{...n,title:e.title.trim()?e.title:n.title,description:e.description.trim()?e.description:n.description,labels:e.labels.length?e.labels:n.labels,dismissed:e.dismissed}}function xn(e){let t=[`Draft a new Jira issue for this board.`,`Propose a concise summary, a short description, and labels from labels already on the board.`,`Then call the create_issue tool with those fields so the issue is created after I approve.`];return e?.title.trim()&&t.push(`Working title: ${e.title.trim()}`),e?.description.trim()&&t.push(`Working description: ${e.description.trim()}`),e?.status&&t.push(`Create it in status ${e.status}.`),e?.epic&&t.push(`Parent Epic: ${e.epic}.`),e?.labels.length&&t.push(`Preferred labels: ${e.labels.join(`, `)}.`),t.join(` `)}function Sn(e){let t=[],n=!1,r=e.toast??je;function i(e){let r=Array.isArray(e)?e:[e];for(let e of r)t.push(e);n||a()}async function a(){n=!0;try{for(;t.length>0;){let n=t.shift(),i=r.loading(`Moving ${n.key} → ${n.target}…`);try{let t=await e.run(n);if(t.ok)r.success(`Moved ${n.key} to ${n.target}`,{id:i});else{let a=t.error??`Move failed`;r.error(`Move ${n.key} failed`,{id:i,description:a}),e.onRollback(n)}}catch(t){let a=t instanceof Error?t.message:`Move failed`;r.error(`Move ${n.key} failed`,{id:i,description:a}),e.onRollback(n)}}}finally{n=!1}}return{move:i}}function Cn(e,t){let n=(0,C.useRef)(null);return n.current||=Sn({run:async e=>await(await fetch(`/api/move`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e.key,status:e.target,raw:!0})})).json(),onRollback:n=>{if(n.kind===`card`){e(e=>{let t=e[n.target]??[],r=t.findIndex(e=>e.key===n.key);if(r===-1)return e;let i=t[r],a={...e};return a[n.target]=t.filter(e=>e.key!==n.key),a[n.source]=[...e[n.source]??[],i],a});return}t(e=>{let t=e.findIndex(e=>e.key===n.key);if(t===-1)return e;let r=[...e];return r[t]={...r[t],status:n.source},r})}}),n.current}function wn(e,t){if(e.startsWith(`/`))return e;try{let n=new URL(e,t);return n.origin===new URL(t).origin?n.toString():null}catch{return null}}var Tn=`board-canvas-tab`;function En(){try{return localStorage.getItem(`board-canvas-tab`)===`calendar`?`calendar`:`board`}catch{return`board`}}function Dn(e){localStorage.setItem(Tn,e)}function On(){Dn(`calendar`)}function kn(e){return typeof e?.key==`string`&&e.key?e.key:void 0}function An(e){if(!e)return;let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);return t?`${t[1]}-${t[2]}-${t[3]}`:void 0}function jn(e){let t=e.summary.trim();return t?`${e.key} ${t}`:e.key}function Mn(e){let t=[];for(let n of e){let e=jn(n),r=An(n.created);r&&t.push({id:`${n.key}:created`,title:e,start:r,allDay:!0,classNames:[`fc-event-created`],extendedProps:{key:n.key,kind:`created`,hover:`${e} · created`}});let i=An(n.targetEnd);i&&t.push({id:`${n.key}:targetEnd`,title:e,start:i,allDay:!0,classNames:[`fc-event-target-end`],extendedProps:{key:n.key,kind:`targetEnd`,hover:`${e} · target end`}})}return t}function Nn(e){return[{type:`text`,text:Fn({...e,scope:e.scope??`view`})},{type:`resource`,resource:{uri:`pipe-kan://board`,mimeType:`application/json`,text:JSON.stringify(e)}}]}function Pn(e){return Nn({scope:`pipe`,kind:`stories`,selectedEpic:null,search:``,filter:{},sort:`payload`,hide:[],columns:e.columns,epics:e.epics})}function Fn(e){let t=e.kind===`epics`?`All epics`:e.kind===`combined`?`All combined`:`All stories`,n=e.selectedEpic?`${t}, children of ${e.selectedEpic}`:t,r=[e.scope===`pipe`?`The user is working with piped Jira issues (the full payload). Answer from these Jira issues. This is not GitHub and not the local source repo.`:`The user attached the current Jira Kanban board (visible cards only). Answer from these Jira issues. This is not GitHub and not the local source repo.`,`Board: ${n}`];if(e.search.trim()&&r.push(`Search: ${e.search.trim()}`),Object.values(e.filter).some(e=>e.length)&&r.push(`Filter: ${JSON.stringify(e.filter)}`),r.push(`Sort: ${e.sort}`),e.hide.length&&r.push(`Hidden columns: ${e.hide.join(`, `)}`),r.push(``,`Columns:`),!e.columns.length)r.push(`(empty)`);else for(let t of e.columns){if(r.push(`## ${t.title}`),!t.cards.length){r.push(`(no cards)`);continue}for(let e of t.cards)r.push(`- ${In(e)}`)}if(e.epics.length){r.push(``,`Epics:`);for(let t of e.epics){let e=t.status?` (${t.status})`:``;r.push(`- ${t.key} ${t.summary}${e}`)}}return r.join(`
12
- `)}function In(e){let t=[e.key,e.summary];e.epic&&t.push(`[epic ${e.epic}]`);let n=[e.priority,e.assignee,e.dueDate,e.targetEnd,e.labels?.join(`, `)].filter(e=>!!e);return n.length&&t.push(`(${n.join(`, `)})`),t.join(` `)}async function Ln(e,t=Rn(),n=zn){if(t)try{await t.writeText(e);return}catch{n(e);return}n(e)}function Rn(){return typeof navigator>`u`||!navigator.clipboard?.writeText?null:navigator.clipboard}function zn(e,t=document){let n=t.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.width=`1px`,n.style.height=`1px`,n.style.opacity=`0`,t.body.appendChild(n),n.focus(),n.select(),n.setSelectionRange(0,e.length);let r=t.execCommand(`copy`);if(t.body.removeChild(n),!r)throw Error(`Copy failed`)}function Bn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Bn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Vn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Bn(e))&&(r&&(r+=` `),r+=t);return r}var Hn=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Un=(e,t)=>({classGroupId:e,validator:t}),Wn=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Gn=`-`,Kn=[],qn=`arbitrary..`,Jn=e=>{let t=Zn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Xn(e);let n=e.split(Gn);return Yn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Hn(i,t):t:i||Kn}return n[e]||Kn}}},Yn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Yn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Gn):e.slice(t).join(Gn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Xn=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?qn+r:void 0})(),Zn=e=>{let{theme:t,classGroups:n}=e;return Qn(n,t)},Qn=(e,t)=>{let n=Wn();for(let r in e){let i=e[r];$n(i,n,r,t)}return n},$n=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];er(i,t,n,r)}},er=(e,t,n,r)=>{if(typeof e==`string`){tr(e,t,n);return}if(typeof e==`function`){nr(e,t,n,r);return}rr(e,t,n,r)},tr=(e,t,n)=>{let r=e===``?t:ir(t,e);r.classGroupId=n},nr=(e,t,n,r)=>{if(ar(e)){$n(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Un(n,e))},rr=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];$n(o,ir(t,a),n,r)}},ir=(e,t)=>{let n=e,r=t.split(Gn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Wn(),n.nextPart.set(t,i)),n=i}return n},ar=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,or=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},sr=`!`,cr=`:`,lr=[],ur=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),dr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===cr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(sr)?(c=s.slice(0,-1),l=!0):s.startsWith(sr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ur(t,l,c,u)};if(t){let e=t+cr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ur(lr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},fr=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},pr=e=>({cache:or(e.cacheSize),parseClassName:dr(e),sortModifiers:fr(e),postfixLookupClassGroupIds:mr(e),...Jn(e)}),mr=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},hr=/\s+/,gr=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(hr),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+sr:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},_r=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=vr(n))&&(i&&(i+=` `),i+=r);return i},vr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=vr(e[r]))&&(n&&(n+=` `),n+=t);return n},yr=(e,...t)=>{let n,r,i,a,o=o=>(n=pr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=gr(e,n);return i(e,a),a};return a=o,(...e)=>a(_r(...e))},br=[],xr=e=>{let t=t=>t[e]||br;return t.isThemeGetter=!0,t},Sr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Er=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Or=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>wr.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),jr=e=>!!e&&Number.isInteger(Number(e)),Mr=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),Nr=e=>Tr.test(e),Pr=()=>!0,Fr=e=>Er.test(e)&&!Dr.test(e),Ir=()=>!1,Lr=e=>Or.test(e),Rr=e=>kr.test(e),zr=e=>!V(e)&&!H(e),Br=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Vr=e=>ni(e,oi,Ir),V=e=>Sr.test(e),Hr=e=>ni(e,si,Fr),Ur=e=>ni(e,ci,B),Wr=e=>ni(e,ui,Pr),Gr=e=>ni(e,li,Ir),Kr=e=>ni(e,ii,Ir),qr=e=>ni(e,ai,Rr),Jr=e=>ni(e,di,Lr),H=e=>Cr.test(e),Yr=e=>ri(e,si),Xr=e=>ri(e,li),Zr=e=>ri(e,ii),Qr=e=>ri(e,oi),$r=e=>ri(e,ai),ei=e=>ri(e,di,!0),ti=e=>ri(e,ui,!0),ni=(e,t,n)=>{let r=Sr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ri=(e,t,n=!1)=>{let r=Cr.exec(e);return r?r[1]?t(r[1]):n:!1},ii=e=>e===`position`||e===`percentage`,ai=e=>e===`image`||e===`url`,oi=e=>e===`length`||e===`size`||e===`bg-size`,si=e=>e===`length`,ci=e=>e===`number`,li=e=>e===`family-name`,ui=e=>e===`number`||e===`weight`,di=e=>e===`shadow`,fi=yr(()=>{let e=xr(`color`),t=xr(`font`),n=xr(`text`),r=xr(`font-weight`),i=xr(`tracking`),a=xr(`leading`),o=xr(`breakpoint`),s=xr(`container`),c=xr(`spacing`),l=xr(`radius`),u=xr(`shadow`),d=xr(`inset-shadow`),f=xr(`text-shadow`),p=xr(`drop-shadow`),m=xr(`blur`),h=xr(`perspective`),g=xr(`aspect`),_=xr(`ease`),v=xr(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[Ar,`full`,`auto`,...w()],E=()=>[jr,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,jr,H,V]},jr,H,V],O=()=>[jr,`auto`,H,V],ee=()=>[`auto`,`min`,`max`,`fr`,H,V],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[Ar,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[Ar,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ne=()=>[Ar,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,H,V],P=()=>[...b(),Zr,Kr,{position:[H,V]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,Qr,Vr,{size:[H,V]}],ae=()=>[Mr,Yr,Hr],F=()=>[``,`none`,`full`,l,H,V],I=()=>[``,B,Yr,Hr],L=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[B,Mr,Zr,Kr],z=()=>[``,`none`,m,H,V],se=()=>[`none`,B,H,V],ce=()=>[`none`,B,H,V],le=()=>[B,H,V],ue=()=>[Ar,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Nr],breakpoint:[Nr],color:[Pr],container:[Nr],"drop-shadow":[Nr],ease:[`in`,`out`,`in-out`],font:[zr],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Nr],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Nr],shadow:[Nr],spacing:[`px`,B],text:[Nr],"text-shadow":[Nr],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ar,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[Br],columns:[{columns:[B,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[jr,`auto`,H,V]}],basis:[{basis:[Ar,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,Ar,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[jr,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...ne()]}],"min-block-size":[{"min-block":[`auto`,...ne()]}],"max-block-size":[{"max-block":[`none`,...ne()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Yr,Hr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ti,Wr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Mr,V]}],"font-family":[{font:[Xr,Gr,t]}],"font-features":[{"font-features":[V]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,Ur]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,H,Hr]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[jr,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},jr,H,V],radial:[``,H,V],conic:[jr,H,V]},$r,qr]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,Yr,Hr]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,ei,Jr]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,ei,Jr]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[B,Hr]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,ei,Jr]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:z()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ei,Jr]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[jr,H,V]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,H,V]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[B,Yr,Hr,Ur]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function U(...e){return fi(Vn(e))}var pi=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),W=o(((e,t)=>{t.exports=pi()}))();function mi({className:e,...t}){return(0,W.jsx)(`span`,{"data-slot":`avatar`,className:U(`bg-muted text-muted-foreground relative flex size-4 shrink-0 items-center justify-center overflow-hidden rounded-full text-[9px] font-medium`,e),...t})}function hi({className:e,...t}){return(0,W.jsx)(`span`,{"data-slot":`avatar-fallback`,className:U(`flex size-full items-center justify-center`,e),...t})}var gi=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,_i=Vn,vi=(e,t)=>n=>{if(t?.variants==null)return _i(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=gi(t)||gi(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return _i(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},yi=vi(`relative inline-flex h-5 min-w-5 w-fit shrink-0 items-center justify-center border px-1.5 text-xs font-medium whitespace-nowrap`,{variants:{variant:{outline:`border-border bg-transparent text-muted-foreground dark:bg-input/32`,"primary-light":`border-primary/10 bg-primary/10 text-primary dark:border-primary/25 dark:bg-primary/15 dark:text-primary`,"warning-light":`border-warning/15 bg-warning/10 text-warning-foreground dark:border-warning/25 dark:bg-warning/15 dark:text-warning`,"destructive-light":`border-destructive/15 bg-destructive/10 text-destructive-foreground dark:border-destructive/25 dark:bg-destructive/15 dark:text-destructive`}},defaultVariants:{variant:`outline`}});function bi({className:e,variant:t,...n}){return(0,W.jsx)(`span`,{"data-slot":`badge`,className:U(yi({variant:t}),`rounded-sm`,e),...n})}var xi=vi(`group/bubble relative flex w-fit max-w-full min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end`,{variants:{variant:{default:`*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground`,muted:`*:data-[slot=bubble-content]:bg-muted`}},defaultVariants:{variant:`muted`}});function Si({variant:e=`muted`,className:t,...n}){return(0,W.jsx)(`div`,{"data-slot":`bubble`,"data-variant":e,className:U(xi({variant:e}),t),...n})}function Ci({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`bubble-content`,className:U(`w-fit max-w-full min-w-0 overflow-hidden rounded-xl px-3 py-2 text-sm leading-relaxed whitespace-pre-wrap wrap-break-word`,e),...t})}var wi=Object.defineProperty,Ti=(e,t)=>wi(e,`name`,{value:t,configurable:!0});function Ei(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ti(Ei,`setRef`);function Di(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ei(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ei(e[t],null)}}}}Ti(Di,`composeRefs`);function G(...e){return C.useCallback(Di(...e),e)}Ti(G,`useComposedRefs`);var Oi=Object.defineProperty,ki=(e,t)=>Oi(e,`name`,{value:t,configurable:!0});function Ai(e){let t=C.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];zi(r)&&typeof Ui==`function`&&(r=Ui(r._payload)),C.Children.forEach(r,e=>{if(Li(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;zi(n)&&typeof Ui==`function`&&(n=Ui(n._payload)),a=Pi(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=C.cloneElement(a,void 0,s):!o&&C.Children.count(r)===1&&C.isValidElement(r)&&(a=r);let c=a?Ii(a):void 0,l=G(n,c);if(!a){if(r||r===0)throw Error(o?Hi(e):Vi(e));return r}let u=Fi(i,a.props??{});return a.type!==C.Fragment&&(u.ref=n?l:c),C.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}ki(Ai,`createSlot`);var ji=Ai(`Slot`),Mi=Symbol.for(`radix.slottable`);function Ni(e){let t=ki(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Mi,t}ki(Ni,`createSlottable`);var Pi=ki((e,t)=>{if(`child`in e.props){let t=e.props.child;return C.isValidElement(t)?C.cloneElement(t,void 0,e.props.children(t.props.children)):null}return C.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Fi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}ki(Fi,`mergeProps`);function Ii(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ki(Ii,`getElementRef`);function Li(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Mi}ki(Li,`isSlottable`);var Ri=Symbol.for(`react.lazy`);function zi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ri&&`_payload`in e&&Bi(e._payload)}ki(zi,`isLazyComponent`);function Bi(e){return typeof e==`object`&&!!e&&`then`in e}ki(Bi,`isPromiseLike`);var Vi=ki(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Hi=ki(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Ui=C.use,Wi=vi(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`text-destructive hover-text-foreground bg-secondary border border-border hover:text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*=size-])]:size-3.5`}},defaultVariants:{variant:`default`,size:`default`}});function K({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,W.jsx)(r?ji:`button`,{"data-slot":`button`,className:U(Wi({variant:t,size:n,className:e})),...i})}var Gi=Object.defineProperty,Ki=(e,t)=>Gi(e,`name`,{value:t,configurable:!0}),qi=!!(typeof window<`u`&&window.document&&window.document.createElement);function q(e,t,{checkForDefaultPrevented:n=!0}={}){return Ki(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ki(q,`composeEventHandlers`);function Ji(e){if(!qi)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ki(Ji,`getOwnerWindow`);function Yi(e){if(!qi)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ki(Yi,`getOwnerDocument`);function Xi(e,t=!1){let{activeElement:n}=Yi(e);if(!n?.nodeName)return null;if(Zi(n)&&n.contentDocument)return Xi(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Yi(n).getElementById(e);if(t)return t}}return n}Ki(Xi,`getActiveElement`);function Zi(e){return e.tagName===`IFRAME`}Ki(Zi,`isFrame`);var Qi=Object.defineProperty,$i=(e,t)=>Qi(e,`name`,{value:t,configurable:!0});function ea(e,t){let n=C.createContext(t);n.displayName=e+`Context`;let r=$i(e=>{let{children:t,...r}=e,i=C.useMemo(()=>r,Object.values(r));return(0,W.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=C.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return $i(i,`useContext`),[r,i]}$i(ea,`createContext`);function ta(e,t=[]){let n=[];function r(t,r){let i=C.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=$i(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=C.useMemo(()=>o,Object.values(o));return(0,W.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=C.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return $i(s,`useContext`),[o,s]}$i(r,`createContext`);let i=$i(()=>{let t=n.map(e=>C.createContext(e));return $i(function(n){let r=n?.[e]||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,na(i,...t)]}$i(ta,`createContextScope`);function na(...e){let t=e[0];if(e.length===1)return t;let n=$i(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return $i(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}$i(na,`composeContextScopes`);var ra=globalThis?.document?C.useLayoutEffect:()=>{},ia=Object.defineProperty,aa=(e,t)=>ia(e,`name`,{value:t,configurable:!0}),oa=C.useEffectEvent,sa=C.useInsertionEffect;function ca(e){if(typeof oa==`function`)return oa(e);let t=C.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof sa==`function`?sa(()=>{t.current=e}):ra(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}aa(ca,`useEffectEvent`);var la=Object.defineProperty,ua=(e,t)=>la(e,`name`,{value:t,configurable:!0}),da=C.useInsertionEffect||ra;function fa({prop:e,defaultProp:t,onChange:n=ua(()=>{},`onChange`),caller:r}){let[i,a,o]=pa({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,C.useCallback(t=>{if(s){let n=ma(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ua(fa,`useControllableState`);function pa({defaultProp:e,onChange:t}){let[n,r]=C.useState(e),i=C.useRef(n),a=C.useRef(t);return da(()=>{a.current=t},[t]),C.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ua(pa,`useUncontrolledState`);function ma(e){return typeof e==`function`}ua(ma,`isFunction`);var ha=Symbol(`RADIX:SYNC_STATE`);function ga(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=ca(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=C.useReducer((t,n)=>{if(n.type===ha)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=C.useRef(p);C.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=C.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return C.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ha,state:i})},[i,d.state,c]),[h,f]}ua(ga,`useControllableStateReducer`);var _a=Object.defineProperty,va=(e,t)=>_a(e,`name`,{value:t,configurable:!0}),ya=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ai(`Primitive.${t}`),r=C.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,W.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ba(e,t){e&&me.flushSync(()=>e.dispatchEvent(t))}va(ba,`dispatchDiscreteCustomEvent`);var xa=Object.defineProperty,Sa=(e,t)=>xa(e,`name`,{value:t,configurable:!0});function Ca(e){let t=e+`CollectionProvider`,[n,r]=ta(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Sa(e=>{let{scope:t,children:n}=e,r=C.useRef(null),a=C.useRef(new Map).current;return(0,W.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Ai(s),l=C.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=G(t,a(s,n).collectionRef);return(0,W.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ai(u),p=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),s=G(t,o),c=a(u,n);return C.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,W.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return C.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Sa(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Sa(Ca,`createCollection`);var wa=new WeakMap,Ta=class e extends Map{static{Sa(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],wa.set(this,!0)}set(e,t){return wa.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Oa(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Ea(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Ea(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ea(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Ea(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Da(e,t);return n===-1?void 0:e[n]}Sa(Ea,`at`);function Da(e,t){let n=e.length,r=Oa(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Sa(Da,`toSafeIndex`);function Oa(e){return e!==e||e===0?0:Math.trunc(e)}Sa(Oa,`toSafeInteger`);function ka(e){let t=e+`CollectionProvider`,[n,r]=ta(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Ta,setItemMap:Sa(()=>void 0,`setItemMap`)}),o=Sa(({state:e,...t})=>e?(0,W.jsx)(c,{...t,state:e}):(0,W.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Sa(e=>{let t=h();return(0,W.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Sa(e=>{let{scope:t,children:n,state:r}=e,a=C.useRef(null),[o,s]=C.useState(null),c=G(a,s),[l,u]=r;return C.useEffect(()=>{if(!o)return;let e=Na(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,W.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Ai(l),d=C.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=G(t,a(l,n).collectionRef);return(0,W.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Ai(f),m=C.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=C.useRef(null),[s,c]=C.useState(null),l=G(t,o,c),{setItemMap:u}=a(f,n),d=C.useRef(i);Aa(d.current,i)||(d.current=i);let m=d.current;return C.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Ma):(t.set(s,{...e,element:s}),t.toSorted(Ma)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Ta(e)))}},[s,m,u]),(0,W.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return C.useState(new Ta)}Sa(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Sa(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}Sa(ka,`createCollection`);function Aa(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Sa(Aa,`shallowEqual`);function ja(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Sa(ja,`isElementPreceding`);function Ma(e,t){return!e[1].element||!t[1].element?0:ja(e[1].element,t[1].element)?-1:1}Sa(Ma,`sortByDocumentPosition`);function Na(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Sa(Na,`getChildListObserver`);var Pa=Object.defineProperty,Fa=(e,t)=>Pa(e,`name`,{value:t,configurable:!0}),Ia=C.createContext(void 0);function La(e){let t=C.useContext(Ia);return e||t||`ltr`}Fa(La,`useDirection`);var Ra=Object.defineProperty,za=(e,t)=>Ra(e,`name`,{value:t,configurable:!0});function Ba(e){let t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>((...e)=>t.current?.(...e)),[])}za(Ba,`useCallbackRef`);var Va=Object.defineProperty,Ha=(e,t)=>Va(e,`name`,{value:t,configurable:!0}),Ua=`dismissableLayer.update`,Wa=`dismissableLayer.pointerDownOutside`,Ga=`dismissableLayer.focusOutside`,Ka,qa=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ja=C.forwardRef(Ha(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=C.useContext(qa),[d,f]=C.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=C.useState({}),h=G(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=C.useRef(!1),w=Za(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:C.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=Qa(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=Ba(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return C.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),C.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ka=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$a(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ka))}},[d,p,n,u]),C.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$a())},[d,u]),C.useEffect(()=>{let e=Ha(()=>m({}),`handleUpdate`);return document.addEventListener(Ua,e),()=>document.removeEventListener(Ua,e)},[]),(0,W.jsx)(ya.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:q(e.onFocusCapture,T.onFocusCapture),onBlurCapture:q(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Ya(){let e=C.useContext(qa),[t,n]=C.useState(null);return C.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ha(Ya,`useDismissableLayerSurface`);var Xa=Ha(()=>!0,`IS_TRUE`);function Za(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Xa}=t,s=Ba(e),c=C.useRef(!1),l=C.useRef(!1),u=C.useRef(new Map),d=C.useRef(()=>{});return C.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Ha(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Ha(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Ha(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Ha(p,`handleInteractionBubble`);let m=Ha(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||eo(Wa,s,p,{discrete:!0})};if(Ha(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Ha(()=>c.current=!0,`onPointerDownCapture`)}}Ha(Za,`usePointerDownOutside`);function Qa(e,t=globalThis?.document){let n=Ba(e),r=C.useRef(!1);return C.useEffect(()=>{let e=Ha(e=>{e.target&&!r.current&&eo(Ga,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Ha(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Ha(()=>r.current=!1,`onBlurCapture`)}}Ha(Qa,`useFocusOutside`);function $a(){let e=new CustomEvent(Ua);document.dispatchEvent(e)}Ha($a,`dispatchUpdate`);function eo(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ba(i,a):i.dispatchEvent(a)}Ha(eo,`handleAndDispatchCustomEvent`);var to=Object.defineProperty,no=(e,t)=>to(e,`name`,{value:t,configurable:!0}),ro=0,io=null;function J(e){return ao(),e.children}no(J,`FocusGuards`);function ao(){C.useEffect(()=>{io||={start:oo(),end:oo()};let{start:e,end:t}=io;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ro++,()=>{ro===1&&(io?.start.remove(),io?.end.remove(),io=null),ro=Math.max(0,ro-1)}},[])}no(ao,`useFocusGuards`);function oo(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}no(oo,`createFocusGuard`);var so=Object.defineProperty,co=(e,t)=>so(e,`name`,{value:t,configurable:!0}),lo=`focusScope.autoFocusOnMount`,uo=`focusScope.autoFocusOnUnmount`,fo={bubbles:!1,cancelable:!0},po=C.forwardRef(co(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=C.useState(null),l=Ba(i),u=Ba(a),d=C.useRef(null),f=G(t,c),p=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:bo(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||bo(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bo(s)};co(e,`handleFocusIn`),co(t,`handleFocusOut`),co(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),C.useEffect(()=>{if(s){xo.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(lo,fo);s.addEventListener(lo,l),s.dispatchEvent(t),t.defaultPrevented||(mo(wo(go(s)),{select:!0}),document.activeElement===e&&bo(s))}return()=>{s.removeEventListener(lo,l),setTimeout(()=>{let t=new CustomEvent(uo,fo);s.addEventListener(uo,u),s.dispatchEvent(t),t.defaultPrevented||bo(e??document.body,{select:!0}),s.removeEventListener(uo,u),xo.remove(p)},0)}}},[s,l,u,p]);let m=C.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ho(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bo(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bo(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,W.jsx)(ya.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function mo(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bo(r,{select:t}),document.activeElement!==n)return}co(mo,`focusFirst`);function ho(e){let t=go(e);return[_o(t,e),_o(t.reverse(),e)]}co(ho,`getTabbableEdges`);function go(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:co(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}co(go,`getTabbableCandidates`);function _o(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vo(r,{upTo:t})))return r}co(_o,`findVisible`);function vo(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}co(vo,`isHidden`);function yo(e){return e instanceof HTMLInputElement&&`select`in e}co(yo,`isSelectableInput`);function bo(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yo(e)&&t&&e.select()}}co(bo,`focus`);var xo=So();function So(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Co(e,t),e.unshift(t)},remove(t){e=Co(e,t),e[0]?.resume()}}}co(So,`createFocusScopesStack`);function Co(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}co(Co,`arrayRemove`);function wo(e){return e.filter(e=>e.tagName!==`A`)}co(wo,`removeLinks`);var To=Object.defineProperty,Eo=(e,t)=>To(e,`name`,{value:t,configurable:!0}),Do=C.useId||(()=>void 0),Oo=0;function ko(e){let[t,n]=C.useState(Do());return ra(()=>{e||n(e=>e??String(Oo++))},[e]),e||(t?`radix-${t}`:``)}Eo(ko,`useId`);var Ao=[`top`,`right`,`bottom`,`left`],jo=Math.min,Mo=Math.max,No=Math.round,Po=Math.floor,Fo=e=>({x:e,y:e}),Io={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Lo(e,t,n){return Mo(e,jo(t,n))}function Ro(e,t){return typeof e==`function`?e(t):e}function zo(e){return e.split(`-`)[0]}function Bo(e){return e.split(`-`)[1]}function Vo(e){return e===`x`?`y`:`x`}function Ho(e){return e===`y`?`height`:`width`}function Uo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wo(e){return Vo(Uo(e))}function Go(e,t,n){n===void 0&&(n=!1);let r=Bo(e),i=Wo(e),a=Ho(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=es(o)),[o,es(o)]}function Ko(e){let t=es(e);return[qo(e),t,qo(t)]}function qo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Jo=[`left`,`right`],Yo=[`right`,`left`],Xo=[`top`,`bottom`],Zo=[`bottom`,`top`];function Qo(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yo:Jo:t?Jo:Yo;case`left`:case`right`:return t?Xo:Zo;default:return[]}}function $o(e,t,n,r){let i=Bo(e),a=Qo(zo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qo)))),a}function es(e){let t=zo(e);return Io[t]+e.slice(t.length)}function ts(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ns(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ts(e)}function rs(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 is(e,t,n){let{reference:r,floating:i}=e,a=Uo(t),o=Wo(t),s=Ho(o),c=zo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Bo(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function as(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}=Ro(t,e),p=ns(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rs(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=rs(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 os=50,ss=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:as},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=is(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<os&&(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}=is(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},cs=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}=Ro(e,t)||{};if(l==null)return{};let d=ns(u),f={x:n,y:r},p=Wo(i),m=Ho(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jo(d[_],T),D=jo(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,k=Lo(E,ee,O),A=!c.arrow&&Bo(i)!=null&&ee!==k&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,j=A?ee<E?ee-E:ee-O:0;return{[p]:f[p]+j,data:{[p]:k,centerOffset:ee-k-j,...A&&{alignmentOffset:j}},reset:A}}}),ls=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}=Ro(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zo(r),_=Uo(o),v=zo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[es(o)]:Ko(o)),x=p!==`none`;!d&&x&&b.push(...$o(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=Go(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`||_===Uo(t)||T.every(e=>Uo(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Uo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function us(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ds(e){return Ao.some(t=>e[t]>=0)}var fs=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ro(e,t);switch(i){case`referenceHidden`:{let e=us(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ds(e)}}}case`escaped`:{let e=us(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ds(e)}}}default:return{}}}}},ps=new Set([`left`,`top`]);async function ms(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zo(n),s=Bo(n),c=Uo(n)===`y`,l=ps.has(o)?-1:1,u=a&&c?-1:1,d=Ro(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 hs=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 ms(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}}}}},gs=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}=Ro(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Uo(i),p=Vo(f),m=u[p],h=u[f],g=(e,t)=>Lo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},_s=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}=Ro(e,t),u={x:n,y:r},d=Uo(i),f=Vo(d),p=u[f],m=u[d],h=Ro(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ps.has(zo(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}}}},vs=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Ro(e,t),c=await i.detectOverflow(t,s),l=zo(n),u=Bo(n),d=Uo(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=jo(p-c[m],g),y=jo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Mo(c.left,c.right):S=p-2*Mo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ys(){return typeof window<`u`}function bs(e){return Cs(e)?(e.nodeName||``).toLowerCase():`#document`}function xs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ss(e){return((Cs(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Cs(e){return ys()?e instanceof Node||e instanceof xs(e).Node:!1}function ws(e){return ys()?e instanceof Element||e instanceof xs(e).Element:!1}function Ts(e){return ys()?e instanceof HTMLElement||e instanceof xs(e).HTMLElement:!1}function Es(e){return!ys()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xs(e).ShadowRoot}function Ds(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Rs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Os(e){return/^(table|td|th)$/.test(bs(e))}function ks(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var As=/transform|translate|scale|rotate|perspective|filter/,js=/paint|layout|strict|content/,Ms=e=>!!e&&e!==`none`,Ns;function Ps(e){let t=ws(e)?Rs(e):e;return Ms(t.transform)||Ms(t.translate)||Ms(t.scale)||Ms(t.rotate)||Ms(t.perspective)||!Is()&&(Ms(t.backdropFilter)||Ms(t.filter))||As.test(t.willChange||``)||js.test(t.contain||``)}function Fs(e){let t=Bs(e);for(;Ts(t)&&!Ls(t);){if(Ps(t))return t;if(ks(t))return null;t=Bs(t)}return null}function Is(){return Ns??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ns}function Ls(e){return/^(html|body|#document)$/.test(bs(e))}function Rs(e){return xs(e).getComputedStyle(e)}function zs(e){return ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bs(e){if(bs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Es(e)&&e.host||Ss(e);return Es(t)?t.host:t}function Vs(e){let t=Bs(e);return Ls(t)?(e.ownerDocument||e).body:Ts(t)&&Ds(t)?t:Vs(t)}function Hs(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Vs(e),i=r===e.ownerDocument?.body,a=xs(r);if(i){let e=Us(a);return t.concat(a,a.visualViewport||[],Ds(r)?r:[],e&&n?Hs(e):[])}return t.concat(r,Hs(r,[],n))}function Us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ws(e){let t=Rs(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ts(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=No(n)!==a||No(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Gs(e){return ws(e)?e:e.contextElement}function Ks(e){let t=Gs(e);if(!Ts(t))return Fo(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ws(t),o=(a?No(n.width):n.width)/r,s=(a?No(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var qs=Fo(0);function Js(e){let t=xs(e);return!Is()||!t.visualViewport?qs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ys(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xs(e)}function Xs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Gs(e),o=Fo(1);t&&(r?ws(r)&&(o=Ks(r)):o=Ks(e));let s=Ys(a,n,r)?Js(a):Fo(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=xs(a),t=ws(r)?xs(r):r,n=e,i=Us(n);for(;i&&t!==n;){let e=Ks(i),t=i.getBoundingClientRect(),r=Rs(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=xs(i),i=Us(n)}}return rs({width:u,height:d,x:c,y:l})}function Zs(e,t){let n=zs(e).scrollLeft;return t?t.left+n:Xs(Ss(e)).left+n}function Qs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zs(e,n),y:n.top+t.scrollTop}}function $s(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ss(r),s=t?ks(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fo(1),u=Fo(0),d=Ts(r);if((d||!a)&&((bs(r)!==`body`||Ds(o))&&(c=zs(r)),d)){let e=Xs(r);l=Ks(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Qs(o,c):Fo(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 ec(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function tc(e){let t=zs(e),n=e.ownerDocument.body,r=Mo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Mo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Zs(e),o=-t.scrollTop;return Rs(n).direction===`rtl`&&(a+=Mo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var nc=25;function rc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=xs(e),a=Ss(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Is()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Zs(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=nc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ic(e,t){let n=Xs(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ks(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ac(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=rc(e,n,t);else if(t===`document`)r=tc(Ss(e));else if(ws(t))r=ic(t,n);else{let n=Js(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rs(r)}function oc(e,t){let n=t.get(e);if(n)return n;let r=Hs(e,[],!1).filter(e=>ws(e)&&bs(e)!==`body`),i=null,a=Rs(e).position===`fixed`,o=a?Bs(e):e;for(;ws(o)&&!Ls(o);){let e=Rs(o),t=Ps(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Bs(o)}return t.set(e,r),r}function sc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ks(t)?[]:oc(t,this._c):[].concat(n),r],o=ac(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=ac(t,a[e],i);s=Mo(n.top,s),c=jo(n.right,c),l=jo(n.bottom,l),u=Mo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function cc(e){let{width:t,height:n}=Ws(e);return{width:t,height:n}}function lc(e,t,n){let r=Ts(t),i=Ss(t),a=n===`fixed`,o=Xs(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fo(0);if((r||!a)&&((bs(t)!==`body`||Ds(i))&&(s=zs(t)),r)){let e=Xs(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Zs(i));let l=i&&!r&&!a?Qs(i,s):Fo(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function uc(e){return Rs(e).position===`static`}function dc(e,t){if(!Ts(e)||Rs(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ss(e)===n&&(n=n.ownerDocument.body),n}function fc(e,t){let n=xs(e);if(ks(e))return n;if(!Ts(e)){let t=Bs(e);for(;t&&!Ls(t);){if(ws(t)&&!uc(t))return t;t=Bs(t)}return n}let r=dc(e,t);for(;r&&Os(r)&&uc(r);)r=dc(r,t);return r&&Ls(r)&&uc(r)&&!Ps(r)?n:r||Fs(e)||n}var pc=async function(e){let t=this.getOffsetParent||fc,n=this.getDimensions,r=await n(e.floating);return{reference:lc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mc(e){return Rs(e).direction===`rtl`}var hc={convertOffsetParentRelativeRectToViewportRelativeRect:$s,getDocumentElement:Ss,getClippingRect:sc,getOffsetParent:fc,getElementRects:pc,getClientRects:ec,getDimensions:cc,getScale:Ks,isElement:ws,isRTL:mc};function gc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _c(e,t,n){let r=null,i,a=Ss(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Po(d),h=Po(a.clientWidth-(u+f)),g=Po(a.clientHeight-(d+p)),_=Po(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mo(0,jo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!gc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=xs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function vc(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=Gs(e),u=i||a?[...l?Hs(l):[],...t?Hs(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?_c(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Xs(e):null;c&&g();function g(){let t=Xs(e);h&&!gc(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 yc=hs,bc=gs,xc=ls,Sc=vs,Cc=fs,wc=cs,Tc=_s,Ec=(e,t,n)=>{let r=new Map,i=n??{},a={...hc,...i.platform,_c:r};return ss(e,t,{...i,platform:a})},Dc=typeof document<`u`?C.useLayoutEffect:function(){};function Oc(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(!Oc(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)&&!Oc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function kc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ac(e,t){let n=kc(e);return Math.round(t*n)/n}function jc(e){let t=C.useRef(e);return Dc(()=>{t.current=e}),t}function Mc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Oc(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=jc(c),O=jc(i),ee=jc(l),k=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Ec(S.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};A.current&&!Oc(T.current,t)&&(T.current=t,me.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);Dc(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=C.useRef(!1);Dc(()=>(A.current=!0,()=>{A.current=!1}),[]),Dc(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,k);k()}},[b,x,k,D,E]);let j=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),M=C.useMemo(()=>({reference:b,floating:x}),[b,x]),te=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ac(M.floating,u.x),r=Ac(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...kc(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:te}),[u,k,j,M,te])}var Nc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:wc({element:r.current,padding:i}).fn(n):r?wc({element:r,padding:i}).fn(n):{}}}},Pc=(e,t)=>{let n=yc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fc=(e,t)=>{let n=bc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ic=(e,t)=>({fn:Tc(e).fn,options:[e,t]}),Lc=(e,t)=>{let n=xc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rc=(e,t)=>{let n=Sc(e);return{name:n.name,fn:n.fn,options:[e,t]}},zc=(e,t)=>{let n=Cc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bc=(e,t)=>{let n=Nc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vc=Object.defineProperty,Hc=(e,t)=>Vc(e,`name`,{value:t,configurable:!0});function Uc(e){let[t,n]=C.useState(void 0);return ra(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Hc(Uc,`useSize`);var Wc=Object.defineProperty,Gc=(e,t)=>Wc(e,`name`,{value:t,configurable:!0}),Kc=`Popper`,[qc,Jc]=ta(Kc),[Yc,Xc]=qc(Kc),Zc=Gc(e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null),[a,o]=C.useState(void 0);return(0,W.jsx)(Yc,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Qc=`PopperAnchor`,$c=C.forwardRef(Gc(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Xc(Qc,n),o=C.useRef(null),s=a.onAnchorChange,c=G(t,C.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=C.useRef(null);C.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&ol(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,W.jsx)(ya.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),el=`PopperContent`,[tl,nl]=qc(el),rl=C.forwardRef(Gc(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Xc(el,n),[_,v]=C.useState(null),y=G(t,v),[b,x]=C.useState(null),S=Uc(b),w=S?.width??0,T=S?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(il),altBoundary:ee},{refs:A,floatingStyles:j,placement:M,isPositioned:te,middlewareData:ne}=Mc({strategy:`fixed`,placement:E,whileElementsMounted:Gc((...e)=>vc(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Pc({mainAxis:i+T,alignmentAxis:o}),c&&Fc({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Ic():void 0,...k}),c&&Lc({...k}),Rc({...k,apply:Gc(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&Bc({element:b,padding:s}),al({arrowWidth:w,arrowHeight:T}),f&&zc({strategy:`referenceHidden`,...k,boundary:ee?k.boundary:void 0})]}),N=g.setPlacementState;ra(()=>(N(M),()=>{N(void 0)}),[M,N]);let[P,re]=ol(M),ie=Ba(m);ra(()=>{te&&ie?.()},[te,ie]);let ae=ne.arrow?.x,F=ne.arrow?.y,I=ne.arrow?.centerOffset!==0,[L,oe]=C.useState();return ra(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),(0,W.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:te?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:L,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,W.jsx)(tl,{scope:n,placedSide:P,placedAlign:re,onArrowChange:x,arrowX:ae,arrowY:F,shouldHideArrow:I,children:(0,W.jsx)(ya.div,{"data-side":P,"data-align":re,...h,ref:y,style:{...h.style,animation:te?h.style?.animation:`none`}})})})},`PopperContent`));function il(e){return e!==null}Gc(il,`isNotNull`);var al=Gc(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ol(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function ol(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Gc(ol,`getSideAndAlignFromPlacement`);var sl=Zc,cl=$c,ll=rl,ul=Object.defineProperty,dl=C.forwardRef(((e,t)=>ul(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=C.useState(!1);ra(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?me.createPortal((0,W.jsx)(ya.div,{...r,ref:t}),o):null},`Portal`)),fl=Object.defineProperty,pl=(e,t)=>fl(e,`name`,{value:t,configurable:!0});function ml(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}pl(ml,`useStateMachine`);var hl=pl(e=>{let{present:t,children:n}=e,r=gl(t),i=typeof n==`function`?n({present:r.isPresent}):C.Children.only(n),a=vl(r.ref,bl(i));return typeof n==`function`||r.isPresent?C.cloneElement(i,{ref:a}):null},`Presence`);function gl(e){let[t,n]=C.useState(),r=C.useRef(null),i=C.useRef(e),a=C.useRef(`none`),o=C.useRef(void 0),[s,c]=ml(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return C.useEffect(()=>{s===`mounted`?(a.current=o.current??yl(r.current),o.current=void 0):a.current=`none`},[s]),ra(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=yl(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),ra(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=pl(a=>{let o=yl(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=pl(e=>{e.target===t&&(a.current=yl(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:C.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=yl(t)}else r.current=null;n(e)},[])}}pl(gl,`usePresence`);function _l(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}pl(_l,`setRef`);function vl(...e){let t=C.useRef(e);return t.current=e,C.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=_l(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():_l(n[e],null)}}},[])}pl(vl,`useStableComposedRefs`);function yl(e){return e?.animationName||`none`}pl(yl,`getAnimationName`);function bl(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pl(bl,`getElementRef`);var xl=Object.defineProperty,Sl=(e,t)=>xl(e,`name`,{value:t,configurable:!0}),Cl=!1;function wl(){let[e,t]=C.useState(Cl);return C.useEffect(()=>{Cl||(Cl=!0,t(!0))},[]),e}Sl(wl,`useIsHydrated`);var Tl=C.useSyncExternalStore;function El(){return()=>{}}Sl(El,`subscribe`);function Dl(){return Tl(El,()=>!0,()=>!1)}Sl(Dl,`useIsHydratedModern`);var Ol=typeof Tl==`function`?Dl:wl,kl=Object.defineProperty,Al=(e,t)=>kl(e,`name`,{value:t,configurable:!0}),jl=`rovingFocusGroup.onEntryFocus`,Ml={bubbles:!1,cancelable:!0},Nl=`RovingFocusGroup`,[Pl,Fl,Il]=Ca(Nl),[Ll,Y]=ta(Nl,[Il]),[Rl,zl]=Ll(Nl),Bl=C.forwardRef(Al(function(e,t){return(0,W.jsx)(Pl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(Pl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(Vl,{...e,ref:t})})})},`RovingFocusGroup`)),Vl=C.forwardRef(Al(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=C.useRef(null),p=G(t,f),m=La(a),[h,g]=fa({prop:o,defaultProp:s??null,onChange:c,caller:Nl}),[_,v]=C.useState(!1),y=Ba(l),b=Fl(n),x=C.useRef(!1),[S,w]=C.useState(0);return C.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(jl,y),()=>e.removeEventListener(jl,y)},[y]),(0,W.jsx)(Rl,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:C.useCallback(e=>g(e),[g]),onItemShiftTab:C.useCallback(()=>v(!0),[]),onFocusableItemAdd:C.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:C.useCallback(()=>w(e=>e-1),[]),children:(0,W.jsx)(ya.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:q(e.onMouseDown,()=>{x.current=!0}),onFocus:q(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(jl,Ml);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);ql([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:q(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Hl=`RovingFocusGroupItem`,Ul=C.forwardRef(Al(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=ko(),l=a||c,u=zl(Hl,n),d=u.currentTabStopId===l,f=Fl(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Ol();return ra(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),C.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,W.jsx)(Pl.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,W.jsx)(ya.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:q(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:q(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Kl(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Jl(n,r+1):n.slice(r+1)}setTimeout(()=>ql(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Wl={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Gl(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Al(Gl,`getDirectionAwareKey`);function Kl(e,t,n){let r=Gl(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Wl[r]}Al(Kl,`getFocusIntent`);function ql(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Al(ql,`focusFirst`);function Jl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Al(Jl,`wrapArray`);var Yl=Bl,Xl=Ul,Zl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ql=new WeakMap,$l=new WeakMap,eu={},tu=0,nu=function(e){return e&&(e.host||nu(e.parentNode))},ru=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=nu(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},iu=function(e,t,n,r){var i=ru(t,Array.isArray(e)?e:[e]);eu[n]||(eu[n]=new WeakMap);var a=eu[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ql.get(e)||0)+1,l=(a.get(e)||0)+1;Ql.set(e,c),a.set(e,l),o.push(e),c===1&&i&&$l.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),tu++,function(){o.forEach(function(e){var t=Ql.get(e)-1,i=a.get(e)-1;Ql.set(e,t),a.set(e,i),t||($l.has(e)||e.removeAttribute(r),$l.delete(e)),i||e.removeAttribute(n)}),tu--,tu||(Ql=new WeakMap,Ql=new WeakMap,$l=new WeakMap,eu={})}},au=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Zl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),iu(r,i,n,`aria-hidden`)):function(){return null}},ou=function(){return ou=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ou.apply(this,arguments)};function su(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var lu=`right-scroll-bar-position`,uu=`width-before-scroll-bar`,du=`with-scroll-bars-hidden`,fu=`--removed-body-scroll-bar-size`;function pu(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mu(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var hu=typeof window<`u`?C.useLayoutEffect:C.useEffect,gu=new WeakMap;function _u(e,t){var n=mu(t||null,function(t){return e.forEach(function(e){return pu(e,t)})});return hu(function(){var t=gu.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pu(e,null)}),i.forEach(function(e){r.has(e)||pu(e,a)})}gu.set(n,e)},[e]),n}function vu(e){return e}function yu(e,t){t===void 0&&(t=vu);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function bu(e){e===void 0&&(e={});var t=yu(null);return t.options=ou({async:!0,ssr:!1},e),t}var xu=function(e){var t=e.sideCar,n=su(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,ou({},n))};xu.isSideCarExport=!0;function Su(e,t){return e.useMedium(t),xu}var Cu=bu(),wu=function(){},Tu=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:wu,onWheelCapture:wu,onTouchMoveCapture:wu}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=su(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=_u([n,t]),w=ou(ou({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Cu,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),ou(ou({},w),{ref:S})):C.createElement(v,ou({},w,{className:c,ref:S}),s))});Tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tu.classNames={fullWidth:uu,zeroRight:lu};var Eu=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Du(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Eu();return t&&e.setAttribute(`nonce`,t),e}function Ou(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ku(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Au=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Du())&&(Ou(t,n),ku(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ju=function(){var e=Au();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mu=function(){var e=ju();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Nu={left:0,top:0,right:0,gap:0},Pu=function(e){return parseInt(e||``,10)||0},Fu=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Pu(n),Pu(r),Pu(i)]},Iu=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Nu;var t=Fu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Lu=Mu(),Ru=`data-scroll-locked`,zu=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
13
- .${du} {
14
- overflow: hidden ${r};
15
- padding-right: ${s}px ${r};
16
- }
17
- body[${Ru}] {
18
- overflow: hidden ${r};
19
- overscroll-behavior: contain;
20
- ${[t&&`position: relative ${r};`,n===`margin`&&`
21
- padding-left: ${i}px;
22
- padding-top: ${a}px;
23
- padding-right: ${o}px;
24
- margin-left:0;
25
- margin-top:0;
26
- margin-right: ${s}px ${r};
27
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
28
- }
29
-
30
- .${lu} {
31
- right: ${s}px ${r};
32
- }
33
-
34
- .${uu} {
35
- margin-right: ${s}px ${r};
36
- }
37
-
38
- .${lu} .${lu} {
39
- right: 0 ${r};
40
- }
41
-
42
- .${uu} .${uu} {
43
- margin-right: 0 ${r};
44
- }
45
-
46
- body[${Ru}] {
47
- ${fu}: ${s}px;
48
- }
49
- `},Bu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Vu=function(){C.useEffect(function(){return document.body.setAttribute(Ru,(Bu()+1).toString()),function(){var e=Bu()-1;e<=0?document.body.removeAttribute(Ru):document.body.setAttribute(Ru,e.toString())}},[])},Hu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Vu();var a=C.useMemo(function(){return Iu(i)},[i]);return C.createElement(Lu,{styles:zu(a,!t,i,n?``:`!important`)})},Uu=!1;if(typeof window<`u`)try{var Wu=Object.defineProperty({},"passive",{get:function(){return Uu=!0,!0}});window.addEventListener(`test`,Wu,Wu),window.removeEventListener(`test`,Wu,Wu)}catch{Uu=!1}var Gu=Uu?{passive:!1}:!1,Ku=function(e){return e.tagName===`TEXTAREA`},qu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ku(e)&&n[t]===`visible`)},Ju=function(e){return qu(e,`overflowY`)},Yu=function(e){return qu(e,`overflowX`)},Xu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),$u(e,r)){var i=ed(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Qu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},$u=function(e,t){return e===`v`?Ju(t):Yu(t)},ed=function(e,t){return e===`v`?Zu(t):Qu(t)},td=function(e,t){return e===`h`&&t===`rtl`?-1:1},nd=function(e,t,n,r,i){var a=td(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ed(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&$u(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},rd=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},id=function(e){return[e.deltaX,e.deltaY]},ad=function(e){return e&&`current`in e?e.current:e},od=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sd=function(e){return`
50
- .block-interactivity-${e} {pointer-events: none;}
51
- .allow-interactivity-${e} {pointer-events: all;}
52
- `},cd=0,ld=[];function ud(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(cd++)[0],a=C.useState(Mu)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=cu([e.lockRef.current],(e.shards||[]).map(ad),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=rd(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Xu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Xu(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return nd(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(ld.length&&ld[ld.length-1]===a){var r=`deltaY`in n?id(n):rd(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&od(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ad).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:dd(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=rd(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,id(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,rd(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return ld.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Gu),document.addEventListener(`touchmove`,c,Gu),document.addEventListener(`touchstart`,u,Gu),function(){ld=ld.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Gu),document.removeEventListener(`touchmove`,c,Gu),document.removeEventListener(`touchstart`,u,Gu)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:sd(i)}):null,p?C.createElement(Hu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var fd=Su(Cu,ud),pd=C.forwardRef(function(e,t){return C.createElement(Tu,ou({},e,{ref:t,sideCar:fd}))});pd.classNames=Tu.classNames;var md=Object.defineProperty,hd=(e,t)=>md(e,`name`,{value:t,configurable:!0}),gd=[`Enter`,` `],_d=[`ArrowDown`,`PageUp`,`Home`],vd=[`ArrowUp`,`PageDown`,`End`],yd=[..._d,...vd],bd={ltr:[...gd,`ArrowRight`],rtl:[...gd,`ArrowLeft`]},xd={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},X=`Menu`,[Sd,Cd,wd]=Ca(X),[Td,Ed]=ta(X,[wd,Jc,Y]),Dd=Jc(),Od=Y(),[kd,Ad]=Td(X),[jd,Md]=Td(X),Nd=hd(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Dd(t),[c,l]=C.useState(null),u=C.useRef(!1),d=Ba(a),f=La(i);return C.useEffect(()=>{let e=hd(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=hd(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),C.useEffect(()=>{if(!n)return;let e=hd(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,W.jsx)(sl,{...s,children:(0,W.jsx)(kd,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,W.jsx)(jd,{scope:t,onClose:C.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Pd=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,...r}=e,i=Dd(n);return(0,W.jsx)(cl,{...i,...r,ref:t})},`MenuAnchor`)),Fd=`MenuPortal`,[Id,Ld]=Td(Fd,{forceMount:void 0}),Rd=hd(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ad(Fd,t);return(0,W.jsx)(Id,{scope:t,forceMount:n,children:(0,W.jsx)(hl,{present:n||a.open,children:(0,W.jsx)(dl,{asChild:!0,container:i,children:r})})})},`MenuPortal`),zd=`MenuContent`,[Bd,Vd]=Td(zd),Hd=C.forwardRef(hd(function(e,t){let n=Ld(zd,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ad(zd,e.__scopeMenu),o=Md(zd,e.__scopeMenu);return(0,W.jsx)(Sd.Provider,{scope:e.__scopeMenu,children:(0,W.jsx)(hl,{present:r||a.open,children:(0,W.jsx)(Sd.Slot,{scope:e.__scopeMenu,children:o.modal?(0,W.jsx)(Ud,{...i,ref:t}):(0,W.jsx)(Wd,{...i,ref:t})})})})},`MenuContent`)),Ud=C.forwardRef(hd(function(e,t){let n=Ad(zd,e.__scopeMenu),r=C.useRef(null),i=G(t,r);return C.useEffect(()=>{let e=r.current;if(e)return au(e)},[]),(0,W.jsx)(Kd,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Wd=C.forwardRef(hd(function(e,t){let n=Ad(zd,e.__scopeMenu);return(0,W.jsx)(Kd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Gd=Ai(`MenuContent.ScrollLock`),Kd=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Ad(zd,n),_=Md(zd,n),v=Dd(n),y=Od(n),b=Cd(n),[x,S]=C.useState(null),w=C.useRef(null),T=G(t,w,g.onContentChange),E=C.useRef(0),D=C.useRef(``),O=C.useRef(0),ee=C.useRef(null),k=C.useRef(`right`),A=C.useRef(0),j=m?pd:C.Fragment,M=m?{as:Gd,allowPinchZoom:!0}:void 0,te=hd(e=>{let t=D.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=wf(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;hd((function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);C.useEffect(()=>()=>window.clearTimeout(E.current),[]),ao();let ne=C.useCallback(e=>k.current===ee.current?.side&&Ef(e,ee.current?.area),[]);return(0,W.jsx)(Bd,{scope:n,searchRef:D,onItemEnter:C.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),onItemLeave:C.useCallback(e=>{ne(e)||(w.current?.focus(),S(null))},[ne]),onTriggerLeave:C.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),pointerGraceTimerRef:O,onPointerGraceIntentChange:C.useCallback(e=>{ee.current=e},[]),children:(0,W.jsx)(j,{...M,children:(0,W.jsx)(po,{asChild:!0,trapped:i,onMountAutoFocus:q(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,W.jsx)(Ja,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,W.jsx)(Yl,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:q(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,W.jsx)(ll,{role:`menu`,"aria-orientation":`vertical`,"data-state":yf(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:q(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&te(e.key));let i=w.current;if(e.target!==i||!yd.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);vd.includes(e.key)&&a.reverse(),Sf(a)}),onBlur:q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:q(e.onPointerMove,Df(e=>{let t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>A.current?`right`:`left`;k.current=t,A.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),qd=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,...r}=e;return(0,W.jsx)(ya.div,{role:`group`,...r,ref:t})},`MenuGroup`)),Jd=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,...r}=e;return(0,W.jsx)(ya.div,{...r,ref:t})},`MenuLabel`)),Yd=`MenuItem`,Xd=`menu.itemSelect`,Zd=C.forwardRef(hd(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=C.useRef(null),o=Md(Yd,e.__scopeMenu),s=Vd(Yd,e.__scopeMenu),c=G(t,a),l=C.useRef(!1),u=hd(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Xd,{bubbles:!0,cancelable:!0});e.addEventListener(Xd,e=>r?.(e),{once:!0}),ba(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,W.jsx)(Qd,{...i,ref:c,disabled:n,onClick:q(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:q(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:q(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&gd.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Qd=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Vd(Yd,n),s=Od(n),c=C.useRef(null),l=G(t,c),[u,d]=C.useState(!1),[f,p]=C.useState(``);return C.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,W.jsx)(Sd.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,W.jsx)(Xl,{asChild:!0,...s,focusable:!r,children:(0,W.jsx)(ya.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:q(e.onPointerMove,Df(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,Df(e=>o.onItemLeave(e))),onFocus:q(e.onFocus,()=>d(!0)),onBlur:q(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),$d=C.forwardRef(hd(function(e,t){let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,W.jsx)(sf,{scope:e.__scopeMenu,checked:n,children:(0,W.jsx)(Zd,{role:`menuitemcheckbox`,"aria-checked":bf(n)?`mixed`:n,...i,ref:t,"data-state":xf(n),onSelect:q(i.onSelect,()=>r?.(bf(n)?!0:!n),{checkForDefaultPrevented:!1})})})},`MenuCheckboxItem`)),[ef,tf]=Td(`MenuRadioGroup`,{value:void 0,onValueChange:hd(()=>{},`onValueChange`)}),nf=C.forwardRef(hd(function(e,t){let{value:n,onValueChange:r,...i}=e,a=Ba(r);return(0,W.jsx)(ef,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,W.jsx)(qd,{...i,ref:t})})},`MenuRadioGroup`)),rf=`MenuRadioItem`,af=C.forwardRef(hd(function(e,t){let{value:n,...r}=e,i=tf(rf,e.__scopeMenu),a=n===i.value;return(0,W.jsx)(sf,{scope:e.__scopeMenu,checked:a,children:(0,W.jsx)(Zd,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":xf(a),onSelect:q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),of=`MenuItemIndicator`,[sf,cf]=Td(of,{checked:!1}),lf=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=cf(of,n);return(0,W.jsx)(hl,{present:r||bf(a.checked)||a.checked===!0,children:(0,W.jsx)(ya.span,{...i,ref:t,"data-state":xf(a.checked)})})},`MenuItemIndicator`)),uf=C.forwardRef(hd(function(e,t){let{__scopeMenu:n,...r}=e;return(0,W.jsx)(ya.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),df=`MenuSub`,[ff,pf]=Td(df),mf=hd(e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Ad(df,t),o=Dd(t),[s,c]=C.useState(null),[l,u]=C.useState(null),d=Ba(i);return C.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,W.jsx)(sl,{...o,children:(0,W.jsx)(kd,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,W.jsx)(ff,{scope:t,contentId:ko(),triggerId:ko(),trigger:s,onTriggerChange:c,children:n})})})},`MenuSub`),hf=`MenuSubTrigger`,gf=C.forwardRef(hd(function(e,t){let n=Ad(hf,e.__scopeMenu),r=Md(hf,e.__scopeMenu),i=pf(hf,e.__scopeMenu),a=Vd(hf,e.__scopeMenu),o=C.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=C.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);C.useEffect(()=>u,[u]),C.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=G(t,i.onTriggerChange);return(0,W.jsx)(Pd,{asChild:!0,...l,children:(0,W.jsx)(Qd,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":yf(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,Df(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:q(e.onPointerLeave,Df(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||(a.searchRef.current===``||t.key!==` `)&&bd[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})},`MenuSubTrigger`)),_f=`MenuSubContent`,vf=C.forwardRef(hd(function(e,t){let n=Ld(zd,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=Ad(zd,e.__scopeMenu),s=Md(zd,e.__scopeMenu),c=pf(_f,e.__scopeMenu),l=C.useRef(null),u=G(t,l);return(0,W.jsx)(Sd.Provider,{scope:e.__scopeMenu,children:(0,W.jsx)(hl,{present:r||o.open,children:(0,W.jsx)(Sd.Slot,{scope:e.__scopeMenu,children:(0,W.jsx)(Kd,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:q(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=xd[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})},`MenuSubContent`));function yf(e){return e?`open`:`closed`}hd(yf,`getOpenState`);function bf(e){return e===`indeterminate`}hd(bf,`isIndeterminate`);function xf(e){return bf(e)?`indeterminate`:e?`checked`:`unchecked`}hd(xf,`getCheckedState`);function Sf(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}hd(Sf,`focusFirst`);function Cf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}hd(Cf,`wrapArray`);function wf(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Cf(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}hd(wf,`getNextMatch`);function Tf(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}hd(Tf,`isPointInPolygon`);function Ef(e,t){return t?Tf({x:e.clientX,y:e.clientY},t):!1}hd(Ef,`isPointerInGraceArea`);function Df(e){return t=>t.pointerType===`mouse`?e(t):void 0}hd(Df,`whenMouse`);var Of=Nd,kf=Pd,Af=Rd,jf=Hd,Mf=Jd,Nf=Zd,Pf=$d,Ff=nf,If=af,Lf=lf,Rf=uf,zf=mf,Bf=gf,Vf=vf,Hf=Object.defineProperty,Uf=(e,t)=>Hf(e,`name`,{value:t,configurable:!0}),Wf=`DropdownMenu`,[Gf,Kf]=ta(Wf,[Ed]),qf=Ed(),[Jf,Yf]=Gf(Wf),Xf=Uf(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=qf(t),l=C.useRef(null),[u,d]=fa({prop:i,defaultProp:a??!1,onChange:o,caller:Wf});return(0,W.jsx)(Jf,{scope:t,triggerId:ko(),triggerRef:l,contentId:ko(),open:u,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,W.jsx)(Of,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Zf=`DropdownMenuTrigger`,Qf=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Yf(Zf,n),o=qf(n),s=G(t,a.triggerRef);return(0,W.jsx)(kf,{asChild:!0,...o,children:(0,W.jsx)(ya.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),$f=Uf(e=>{let{__scopeDropdownMenu:t,...n}=e,r=qf(t);return(0,W.jsx)(Af,{...r,...n})},`DropdownMenuPortal`),ep=`DropdownMenuContent`,tp=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Yf(ep,n),a=qf(n),o=C.useRef(!1);return(0,W.jsx)(jf,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),np=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Mf,{...i,...r,ref:t})},`DropdownMenuLabel`)),rp=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Nf,{...i,...r,ref:t})},`DropdownMenuItem`)),ip=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Pf,{...i,...r,ref:t})},`DropdownMenuCheckboxItem`)),ap=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Ff,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),op=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(If,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),sp=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Lf,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),cp=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Rf,{...i,...r,ref:t})},`DropdownMenuSeparator`)),lp=Uf(e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=qf(t),[s,c]=fa({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,W.jsx)(zf,{...o,open:s,onOpenChange:c,children:n})},`DropdownMenuSub`),up=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Bf,{...i,...r,ref:t})},`DropdownMenuSubTrigger`)),dp=C.forwardRef(Uf(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qf(n);return(0,W.jsx)(Vf,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuSubContent`)),fp=Xf,pp=Qf,mp=$f,hp=tp,gp=np,_p=rp,vp=ip,yp=ap,bp=op,xp=sp,Sp=cp,Cp=lp,wp=up,Tp=dp;function Ep(e){return(0,W.jsx)(fp,{"data-slot":`dropdown-menu`,...e})}function Dp(e){return(0,W.jsx)(pp,{"data-slot":`dropdown-menu-trigger`,...e})}function Op({className:e,sideOffset:t=4,...n}){return(0,W.jsx)(mp,{children:(0,W.jsx)(hp,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:U(`bg-popover text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height,70vh)] min-w-40 overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function kp({className:e,...t}){return(0,W.jsx)(gp,{"data-slot":`dropdown-menu-label`,className:U(`text-muted-foreground px-2 py-1.5 text-[11px] font-medium`,e),...t})}function Ap({className:e,...t}){return(0,W.jsx)(_p,{"data-slot":`dropdown-menu-item`,className:U(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-[13px] outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50`,e),...t})}function jp({className:e,children:t,...n}){return(0,W.jsxs)(vp,{"data-slot":`dropdown-menu-checkbox-item`,className:U(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-[13px] outline-none select-none`,e),...n,children:[(0,W.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,W.jsx)(xp,{children:(0,W.jsx)(A,{className:`size-3.5`})})}),t]})}function Mp(e){return(0,W.jsx)(yp,{"data-slot":`dropdown-menu-radio-group`,...e})}function Np({className:e,children:t,...n}){return(0,W.jsxs)(bp,{"data-slot":`dropdown-menu-radio-item`,className:U(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-[13px] outline-none select-none`,e),...n,children:[(0,W.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,W.jsx)(xp,{children:(0,W.jsx)(A,{className:`size-3.5`})})}),t]})}function Pp({className:e,...t}){return(0,W.jsx)(Sp,{"data-slot":`dropdown-menu-separator`,className:U(`bg-border -mx-1 my-1 h-px`,e),...t})}function Fp(e){return(0,W.jsx)(Cp,{"data-slot":`dropdown-menu-sub`,...e})}function Ip({className:e,children:t,...n}){return(0,W.jsxs)(wp,{"data-slot":`dropdown-menu-sub-trigger`,className:U(`focus:bg-accent focus:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-[13px] outline-none select-none`,e),...n,children:[t,(0,W.jsx)(te,{className:`ml-auto size-3.5`})]})}function Lp({className:e,...t}){return(0,W.jsx)(Tp,{"data-slot":`dropdown-menu-sub-content`,className:U(`bg-popover text-popover-foreground z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-md`,e),...t})}var Rp=vi(`group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:``,separator:`before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border`,border:`border-b border-border pb-2`}},defaultVariants:{variant:`default`}});function zp({className:e,variant:t=`default`,...n}){return(0,W.jsx)(`div`,{"data-slot":`marker`,"data-variant":t,className:U(Rp({variant:t}),e),...n})}function Bp({className:e,...t}){return(0,W.jsx)(`span`,{"data-slot":`marker-icon`,"aria-hidden":`true`,className:U(`size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function Vp({className:e,...t}){return(0,W.jsx)(`span`,{"data-slot":`marker-content`,className:U(`min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none`,e),...t})}function Hp({className:e,align:t=`start`,...n}){return(0,W.jsx)(`div`,{"data-slot":`message`,"data-align":t,className:U(`group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse`,e),...n})}function Up({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`message-content`,className:U(`flex min-w-0 max-w-[85%] flex-col gap-1 wrap-break-word group-data-[align=end]/message:items-end`,e),...t})}function Wp({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`message-footer`,className:U(`text-muted-foreground flex max-w-full min-w-0 items-center text-xs font-medium group-data-[align=end]/message:justify-end`,e),...t})}function Gp(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function Kp(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function qp(e){return e/100*window.innerHeight}function Jp(e){return e/100*window.innerWidth}function Yp(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 Xp({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=Yp(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=Kp(t,i);break;case`em`:r=Gp(t,i);break;case`vh`:r=qp(i);break;case`vw`:r=Jp(i)}return r}function Zp(e){return parseFloat(e.toFixed(3))}function Qp({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 $p(e){let{panels:t}=e,n=Qp({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=Zp(Xp({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=Zp(Xp({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=Zp(Xp({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=Zp(Xp({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 em(e,t=`Assertion error`){if(!e)throw Error(t)}function tm(e,t){return Array.from(t).sort(e===`horizontal`?nm:rm)}function nm(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function rm(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function im(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function am(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 om({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}=am(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return em(i,`No rect found`),i}var sm;function cm(){return sm===void 0&&(sm=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),sm}function lm(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=tm(n,Array.from(t.children).filter(im).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,om({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p}}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=cm()?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:Qp({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 um=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)}}},dm={cursorFlags:0,state:`inactive`},fm=new um;function pm(){return dm}function mm(e){return fm.addListener(`change`,e)}function hm(e){let t=dm,n={...dm};n.cursorFlags=e,dm=n,fm.emit(`change`,{prev:t,next:n})}function gm(e){let t=dm;dm=e,fm.emit(`change`,{prev:t,next:e})}var _m=e=>e,vm=()=>{},ym=1,bm=2,xm=4,Sm=8,Cm=3,wm=12,Tm;function Em(){return Tm===void 0&&(Tm=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Tm=!0)),Tm}function Dm({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++}})}if(r!==0||i!==0){if(n===`active`&&e&&Em()){let t=(e&ym)!==0,n=(e&bm)!==0,r=(e&xm)!==0,i=(e&Sm)!==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`}return Em()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Om=new WeakMap;function km(e){if(!e.defaultView||!e.adoptedStyleSheets)return;let{prevStyle:t,styleSheet:n}=Om.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=pm();switch(r.state){case`active`:case`hover`:{let e=Dm({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)}Om.set(e,{prevStyle:t,styleSheet:n})}var Am=new Map,jm=new um;function Mm(e){Am=new Map(Am),Am.delete(e)}function Nm(e,t){for(let[t]of Am)if(t.id===e)return t}function Pm(e,t){for(let[t,n]of Am)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Fm(){return Am}function Im(e,t){return jm.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Lm(e,t,n){let r=Am.get(e);Am=new Map(Am),Am.set(e,t),jm.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function Rm(e){let t=pm(),n=Fm(),r=!1;return t.state===`active`&&(gm({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(km(e),r=!0,t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=Pm(e.group.id,!0);Lm(e.group,t,{isUserInteraction:!0})}))),r}function zm(e){e.defaultPrevented||Rm(e.currentTarget)}function Bm(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=am(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)}}return r?{distance:i,hitRegion:r}:void 0}function Vm(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Hm(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:Jm(e),b:Jm(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();em(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:qm(Km(n.a)),b:qm(Km(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 Um=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Wm(e){let t=getComputedStyle(Ym(e)??e).display;return t===`flex`||t===`inline-flex`}function Gm(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Wm(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`||Um.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Km(e){let t=e.length;for(;t--;){let n=e[t];if(em(n,`Missing node`),Gm(n))return n}return null}function qm(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Jm(e){let t=[];for(;e;)t.push(e),e=Ym(e);return t}function Ym(e){let{parentNode:t}=e;return Vm(t)?t.host:t}function Xm(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 Zm({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!im(n)||n.contains(e)||e.contains(n))return!0;if(Hm(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Xm(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Qm(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=lm(r),a=Bm(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Zm({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function $m(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 eh(e,t,n=0){return Math.abs(Zp(e)-Zp(t))<=n}function th(e,t){return eh(e,t)?0:e>t?1:-1}function nh({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(th(r,c)<0){if(a){let e=(i+c)/2;r=th(r,e)<0?i:c}else r=c}return r=Math.min(s,r),r=Zp(r),r}function rh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(eh(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;em(u!=null,`Invalid first pivot index`),em(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];em(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(em(n!=null,`Previous layout not found for panel index ${t}`),eh(n,i)){let t=o-n;th(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];em(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(em(n!=null,`Previous layout not found for panel index ${t}`),eh(n,o)){let t=n-i;th(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];em(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&th(i,c)<0){if(e>0){let t=c-o,n=t/2;th(i+e,c)<0&&(e=th(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;th(i-e,c)<0&&(e=th(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];em(e!=null,`Previous layout not found for panel index ${r}`);let a=nh({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];em(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=nh({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!eh(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($m(c,l))return i;{let t=e<0?d:u,r=s[t];em(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=nh({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!eh(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];em(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=nh({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(eh(i,s)||(t-=s-i,l[r]=s),eh(t,0))break;e>0?r--:r++}}}if(!eh(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 ih(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||th(e[n],t[n])!==0)return!1;return!0}function ah({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(!eh(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];em(t!=null,`No layout data found for index ${e}`);let n=100/i*t;r[e]=n}let a=0;for(let e=0;e<t.length;e++){let i=n[e];em(i!=null,`No layout data found for index ${e}`);let o=r[e];em(o!=null,`No layout data found for index ${e}`);let s=nh({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!eh(a,0))for(let e=0;e<t.length;e++){let n=r[e];em(n!=null,`No layout data found for index ${e}`);let i=n+a,o=nh({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,eh(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function oh({groupId:e,panelId:t}){let n=()=>{let t=Fm();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=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&eh(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:Zp(100-e)}}return rh({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=ah({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});ih(c,u)||Lm(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(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&&eh(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=Qp({group:t}),o=Zp(Xp({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function sh(e){e.defaultPrevented||Qm(e,Fm()).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=oh({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function ch(e){let t=Fm();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 lh({groupId:e}){let t=()=>{let t=Fm();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=ah({layout:e,panelConstraints:r});return n?o:(ih(o,c)||Lm(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function uh(e,t){let n=ch(e),r=Pm(n.id,!0),i=n.separators.find(t=>t.element===e);em(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);em(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=lh({groupId:n.id}).getLayout(),c=ah({layout:rh({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});ih(s,c)||Lm(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function dh(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=ch(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&uh(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&uh(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&uh(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&uh(t,-5);break;case`End`:e.preventDefault(),uh(t,100);break;case`Enter`:{e.preventDefault();let n=ch(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Pm(n.id,!0),o=n.separators.find(e=>e.element===t);em(o,`Matching separator not found`);let s=a.get(o);em(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(em(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];uh(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=ch(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);em(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(),uh(t,-100)}}function fh(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Fm(),n=Qm(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),gm({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function ph({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=rh({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(ih(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?ym:bm;break;case`vertical`:s|=d<0?xm:Sm}}else Lm(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Cm:c|=s&Cm,t.movementY===0?c|=o&wm:c|=s&wm,hm(c),km(e)}function mh(e){let t=Fm(),n=pm();n.state===`active`&&ph({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function hh(e){if(e.defaultPrevented)return;let t=pm(),n=Fm();switch(t.state){case`active`:if(e.buttons===0){gm({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=Pm(e.group.id,!0);Lm(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}ph({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=Qm(e,n);r.length===0?t.state!==`inactive`&&gm({cursorFlags:0,state:`inactive`}):gm({cursorFlags:0,hitRegions:r,state:`hover`}),km(e.currentTarget);break}}}function gh(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(pm().state){case`hover`:gm({cursorFlags:0,state:`inactive`})}}function _h(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||Rm(e.currentTarget)&&e.preventDefault()}function vh(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Zp(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Zp((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function yh(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=Qp({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Zp(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function bh(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 xh(e,t){return e.length===t.length&&e.every((e,n)=>bh(e,t[n]))}function Sh({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=Zp(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e}}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]=Zp((r[e]??0)/a*l);else{let e=Zp(l/c.length);for(let t of c)u[t]=e}return u}function Ch(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 wh=new Map;function Th(e){let t=!0;em(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=Qp({group:e});if(t===0)return;let n=Pm(e.id);if(!n)return;let r=$p(e),i=n.defaultLayoutDeferred?vh(r):n.layout,a=ah({layout:Sh({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&ih(n.layout,a)&&xh(n.derivedPanelConstraints,r)&&n.groupSize===t)continue;Lm(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else yh(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{em(!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=Qp({group:e}),s=$p(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Ch(e.panels,l)||(l=void 0));let u=ah({layout:e.mutableState.layouts[c]??l??vh(s),panelConstraints:s}),d=e.element.ownerDocument;wh.set(d,(wh.get(d)??0)+1);let f=new Map;return lm(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Lm(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{em(!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`,dh)}),wh.get(d)===1&&(d.addEventListener(`contextmenu`,zm,!0),d.addEventListener(`dblclick`,sh,!0),d.addEventListener(`pointerdown`,fh,!0),d.addEventListener(`pointerleave`,mh),d.addEventListener(`pointermove`,hh),d.addEventListener(`pointerout`,gh),d.addEventListener(`pointerup`,_h,!0)),function(){t=!1,wh.set(d,Math.max(0,(wh.get(d)??0)-1)),Mm(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,dh)}),wh.get(d)||(d.removeEventListener(`contextmenu`,zm,!0),d.removeEventListener(`dblclick`,sh,!0),d.removeEventListener(`pointerdown`,fh,!0),d.removeEventListener(`pointerleave`,mh),d.removeEventListener(`pointermove`,hh),d.removeEventListener(`pointerout`,gh),d.removeEventListener(`pointerup`,_h,!0)),a.disconnect()}}function Eh(){let[e,t]=(0,C.useState)({});return[e,(0,C.useCallback)(()=>t({}),[])]}function Dh(e){let t=(0,C.useId)();return`${e??t}`}var Oh=typeof window<`u`?C.useLayoutEffect:C.useEffect;function kh(e){let t=(0,C.useRef)(e);return Oh(()=>{t.current=e},[e]),(0,C.useCallback)((...e)=>t.current?.(...e),[t])}function Ah(...e){return kh(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t}})})}function jh(e){let t=(0,C.useRef)({...e});return Oh(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Mh=(0,C.createContext)(null);function Nh(e,t){let n=(0,C.useRef)({getLayout:()=>({}),setLayout:_m});(0,C.useImperativeHandle)(t,()=>n.current,[]),Oh(()=>{Object.assign(n.current,lh({groupId:e}))})}function Ph({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,C.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=kh(e=>{ih(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=kh((e,t)=>{ih(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Dh(s),v=(0,C.useRef)(null),[y,b]=Eh(),x=(0,C.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=Ah(v,a);Nh(_,o);let w=kh((e,t)=>{let r=pm(),i=Nm(e),a=Pm(e);if(a){let e=!1;return r.state===`active`&&(e=r.hitRegions.some(e=>e.group===i)),{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=jh({defaultLayout:n,disableCursor:r}),E=(0,C.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=tm(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=tm(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},updatePanelProps:(e,{disabled:t})=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Nm(_),i=Pm(_);r&&i&&Lm(r,{...i,derivedPanelConstraints:$p(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=x.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[w,_,b,u,T]),D=(0,C.useRef)(null);return Oh(()=>{let e=v.current;if(e===null)return;let t=x.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:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Th(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Pm(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Im(_,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=eh(t.collapsedSize,i[t.panelId]),a=eh(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=pm().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,C.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,W.jsx)(Mh.Provider,{value:E,children:(0,W.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,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})})}Ph.displayName=`Group`;function Fh(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function Ih({id:e,panelIds:t,storage:n}){let r=Fh(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 Lh({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...i}){let a=n!==void 0,o=`id`in i?i.id:i.groupId,s=Fh(o,n??[]),c=(0,C.useSyncExternalStore)(Rh,()=>r.getItem(s),()=>r.getItem(s)),l=(0,C.useMemo)(()=>{if(c){let e=JSON.parse(c),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[c]),u=(0,C.useMemo)(()=>{if(!l)return Ih({id:o,panelIds:n,storage:r})},[l,o,n,r]),d=l??u,f=(0,C.useRef)(null),p=(0,C.useCallback)(()=>{let e=f.current;e&&(f.current=null,clearTimeout(e))},[]);(0,C.useLayoutEffect)(()=>()=>{p()},[p]);let m=(0,C.useCallback)((e,n)=>{if(t&&!n.isUserInteraction)return;p();let i;i=a?Fh(o,Object.keys(e)):Fh(o,[]);try{r.setItem(i,JSON.stringify(e))}catch(e){console.error(e)}},[p,a,o,t,r]);return{defaultLayout:d,onLayoutChange:(0,C.useCallback)(t=>{p(),e===0?m(t,{isUserInteraction:!1}):f.current=setTimeout(()=>{m(t,{isUserInteraction:!1})},e)},[p,e,m]),onLayoutChanged:m}}function Rh(){return function(){}}function zh(){let e=(0,C.useContext)(Mh);return em(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Bh(e,t){let{id:n}=zh(),r=(0,C.useRef)({collapse:vm,expand:vm,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:vm});(0,C.useImperativeHandle)(t,()=>r.current,[]),Oh(()=>{Object.assign(r.current,oh({groupId:n,panelId:e}))})}function Vh({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=Dh(c),_=jh({disabled:a}),v=(0,C.useRef)(null),y=Ah(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:w,updatePanelProps:T}=zh(),E=d!==null,D=kh((e,t,n)=>{d?.(e,c,n)});Oh(()=>{let e=v.current;if(e!==null){let t={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}};return w(t)}},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,C.useEffect)(()=>{T(g,{disabled:a})},[a,g,T]),Bh(g,f);let O=()=>{let e=b(x,g);if(e)return JSON.stringify(e)},ee=(0,C.useSyncExternalStore)(e=>Im(x,e),O,O),k;return k=ee?JSON.parse(ee):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,W.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...Hh,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...k},children:(0,W.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}Vh.displayName=`Panel`;var Hh={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Uh(){return(0,C.useRef)(null)}function Wh({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=ah({layout:rh({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ah({layout:rh({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function Gh({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Dh(a),l=jh({disabled:n,disableDoubleClick:r}),[u,d]=(0,C.useState)({}),[f,p]=(0,C.useState)(`inactive`),[m,h]=(0,C.useState)(!1),g=(0,C.useRef)(null),_=Ah(g,i),{disableCursor:v,id:y,orientation:b,registerSeparator:x,updateSeparatorProps:S}=zh(),w=b===`horizontal`?`vertical`:`horizontal`;Oh(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=x(t),r=mm(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Im(y,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(Wh({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,x,l]),(0,C.useEffect)(()=>{S(c,{disabled:n,disableDoubleClick:r})},[n,r,c,S]);let T;n&&!v&&(T=`not-allowed`);let E;if(n)E=`disabled`;else switch(f){case`active`:E=`active`;break;default:E=m?`focus`:f}return(0,W.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":w,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":E,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:T,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}Gh.displayName=`Separator`;function Kh({className:e,...t}){return(0,W.jsx)(Ph,{"data-slot":`resizable-panel-group`,className:U(`flex h-full w-full aria-[orientation=vertical]:flex-col`,e),...t})}function qh({...e}){return(0,W.jsx)(Vh,{"data-slot":`resizable-panel`,...e})}function Jh({withHandle:e,className:t,...n}){return(0,W.jsx)(Gh,{"data-slot":`resizable-handle`,className:U(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,t),...n,children:e?(0,W.jsx)(`div`,{className:`bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border`,children:(0,W.jsx)(ae,{className:`size-2.5`})}):null})}function Yh({kind:e,description:t,onAllowOnce:n,onAllowAlways:r,onReject:i}){return(0,W.jsxs)(`div`,{className:`border-warning/50 w-full rounded-lg border px-2 py-2`,children:[(0,W.jsxs)(zp,{className:`min-h-0 items-start py-0`,children:[(0,W.jsx)(Bp,{className:`text-warning-foreground mt-0.5`,children:(0,W.jsx)(z,{})}),(0,W.jsxs)(Vp,{className:`text-foreground font-medium`,children:[`Permission: `,e]})]}),t?(0,W.jsx)(`p`,{className:`text-muted-foreground mt-1 pl-6 text-xs`,children:t}):null,(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5 pl-6`,children:[(0,W.jsx)(K,{size:`sm`,variant:`default`,onClick:n,children:`Allow once`}),(0,W.jsx)(K,{size:`sm`,variant:`secondary`,onClick:r,children:`Always allow`}),(0,W.jsx)(K,{size:`sm`,variant:`outline`,onClick:i,children:`Reject`})]})]})}var Xh=Object.defineProperty,Zh=(e,t)=>Xh(e,`name`,{value:t,configurable:!0}),Qh=`Collapsible`,[$h,eg]=ta(Qh),[tg,ng]=$h(Qh),rg=C.forwardRef(Zh(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=fa({prop:r,defaultProp:i??!1,onChange:o,caller:Qh});return(0,W.jsx)(tg,{scope:n,disabled:a,contentId:ko(),open:c,onOpenToggle:C.useCallback(()=>l(e=>!e),[l]),children:(0,W.jsx)(ya.div,{"data-state":lg(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),ig=`CollapsibleTrigger`,ag=C.forwardRef(Zh(function(e,t){let{__scopeCollapsible:n,...r}=e,i=ng(ig,n);return(0,W.jsx)(ya.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":lg(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:q(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),og=`CollapsibleContent`,sg=C.forwardRef(Zh(function(e,t){let{forceMount:n,...r}=e,i=ng(og,e.__scopeCollapsible);return(0,W.jsx)(hl,{present:n||i.open,children:({present:e})=>(0,W.jsx)(cg,{...r,ref:t,present:e})})},`CollapsibleContent`)),cg=C.forwardRef(Zh(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ng(og,n),[s,c]=C.useState(r),l=C.useRef(null),u=G(t,l),d=C.useRef(0),f=d.current,p=C.useRef(0),m=p.current,h=o.open||s,g=C.useRef(h),_=C.useRef(void 0);return C.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),ra(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,W.jsx)(ya.div,{"data-state":lg(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function lg(e){return e?`open`:`closed`}Zh(lg,`getState`);var ug=rg;function dg({...e}){return(0,W.jsx)(ug,{"data-slot":`collapsible`,...e})}function fg({...e}){return(0,W.jsx)(ag,{"data-slot":`collapsible-trigger`,...e})}function pg({...e}){return(0,W.jsx)(sg,{"data-slot":`collapsible-content`,...e})}function mg({name:e,args:t,status:n=`pending`,onApprove:r,onAllowAlways:i,onReject:a}){let o=Object.keys(t),s=n===`pending`&&(r||i||a);return(0,W.jsx)(dg,{defaultOpen:n===`pending`,className:`w-full`,children:(0,W.jsxs)(`div`,{className:U(`rounded-lg border px-2 py-1.5`,n===`pending`&&`border-warning/50`,n===`failed`&&`border-destructive/40`),children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsx)(`button`,{type:`button`,className:`hover:bg-muted/50 flex w-full items-center gap-2 rounded-md text-left`,children:(0,W.jsxs)(zp,{className:`min-h-0 py-0.5`,children:[(0,W.jsx)(Bp,{children:(0,W.jsx)(de,{})}),(0,W.jsxs)(Vp,{className:`flex min-w-0 flex-1 items-center gap-2 text-foreground`,children:[(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e}),(0,W.jsx)(`span`,{className:`text-muted-foreground ml-auto shrink-0 text-[11px] uppercase`,children:n.replace(`_`,` `)}),(0,W.jsx)(j,{className:`text-muted-foreground size-3.5 shrink-0`})]})]})})}),(0,W.jsxs)(pg,{children:[o.length>0?(0,W.jsx)(`pre`,{className:`text-muted-foreground mt-1 max-h-24 overflow-auto px-1 text-[11px] leading-snug`,children:JSON.stringify(t,null,2)}):null,s?(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[r&&(0,W.jsx)(K,{size:`sm`,variant:`default`,onClick:r,children:`Allow once`}),i&&(0,W.jsx)(K,{size:`sm`,variant:`secondary`,onClick:i,children:`Allow always`}),a&&(0,W.jsx)(K,{size:`sm`,variant:`outline`,onClick:a,children:`Reject`})]}):null]})]})})}async function hg(e){let t=await e.text(),n={};if(t)try{n=JSON.parse(t)}catch{throw Error(t.slice(0,180)||`HTTP ${e.status}`)}if(!e.ok)throw Error(n.error||`HTTP ${e.status}`);return n}function gg(e){return e.status??(e.approved===!0?`in_progress`:e.approved===!1?`failed`:`pending`)}function _g({open:e,onClose:t,selectedIssueKey:n,boardView:r,pipeView:i,onApplyPreset:a,onSetFilter:o,onConfirmRefresh:s,onBoardMutated:c,seedPrompt:l,onSeedConsumed:u}){let[d,f]=(0,C.useState)(null),[p,m]=(0,C.useState)([]),[h,g]=(0,C.useState)(null),[_,v]=(0,C.useState)([]),[y,b]=(0,C.useState)(``),[x,S]=(0,C.useState)(!1),[w,T]=(0,C.useState)(!1),[E,D]=(0,C.useState)(null),[O,M]=(0,C.useState)(null),[te,ne]=(0,C.useState)([]),[P,re]=(0,C.useState)(null),[ie,ae]=(0,C.useState)([]),[F,L]=(0,C.useState)(null),oe=(0,C.useRef)(null),R=(0,C.useRef)(null),z=(0,C.useRef)(0),le=(0,C.useRef)(null),ue=(0,C.useRef)(null);ue.current=h;let de=(0,C.useRef)(null),pe=(0,C.useCallback)(async(e,t)=>{le.current?.abort();let n=new AbortController;le.current=n;let r=++z.current;T(!0);try{let i=await hg(await fetch(`/api/agent/session`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agentId:e,model:t}),signal:n.signal}));return r===z.current?(g(i.sessionId),i.models?.length&&ne(i.models),i.selectedModel&&M(i.selectedModel),i.sessionId):null}catch(e){return r!==z.current||n.signal.aborted?null:(g(null),v(t=>[...t,{role:`agent`,text:`Failed to start session: ${String(e)}`}]),null)}finally{r===z.current&&T(!1)}},[]);(0,C.useEffect)(()=>{fetch(`/api/agent/config`).then(e=>hg(e)).then(e=>{f(e);let t=e.agents.filter(e=>e.available!==!1),n=t.find(t=>t.id===e.defaultAgent)??t[0]??e.agents[0];D(n?.id??e.defaultAgent),M(n?.model??null),ne(n?.models??[]),e.defaultSkill&&re(e.defaultSkill)}).catch(()=>f({defaultAgent:`devin`,agents:[]})),fetch(`/api/agent/skills`).then(e=>hg(e)).then(m).catch(()=>m([]))},[]);let me=(0,C.useRef)(d);me.current=d;let he=(0,C.useRef)(O);he.current=O,(0,C.useEffect)(()=>{if(!e||!E)return;g(null);let t=me.current?.agents.find(e=>e.id===E)?.model??null;return pe(E,he.current??t),()=>{z.current+=1,le.current?.abort(),T(!1)}},[e,E,pe]),(0,C.useEffect)(()=>{if(!h)return;let e=new EventSource(`/api/agent/events?sessionId=${encodeURIComponent(h)}`),t={agent_message_chunk:e=>{let t=e.text??``;v(e=>{let n=e[e.length-1];return n?.role===`agent`?[...e.slice(0,-1),{...n,text:n.text+t}]:[...e,{role:`agent`,text:t}]})},tool_call:e=>{let t=e.name??`unknown`;v(n=>[...n,{role:`tool`,requestId:e.requestId??``,name:t,args:e.args??{},status:`pending`}])},tool_result:e=>{v(t=>t.map(t=>t.role===`tool`&&t.requestId===(e.requestId??``)?{...t,status:`completed`}:t));let t=e.result;t?.__ui_action===`apply_preset`&&t.preset?a?.(t.preset):t?.__ui_action===`set_filter`&&t.filter?o?.(t.filter):t?.__ui_action===`confirm_refresh`?s?.(typeof t.flags==`string`?t.flags:void 0):t?.__ui_action===`refresh_board`&&c?.()},request_permission:e=>{let t=e.kind??`unknown`;v(n=>[...n,{role:`permission`,requestId:e.requestId??``,kind:t,description:e.description??``}])},config:e=>{e.models?.length&&ne(e.models),e.selectedModel&&M(e.selectedModel)},stop_reason:()=>S(!1),error:e=>{S(!1),v(t=>[...t,{role:`agent`,text:`Error: ${e.message??`unknown`}`}])},disconnected:()=>{S(!1),e.close()}};return e.addEventListener(`message`,e=>{let n=JSON.parse(e.data);t[n.type]?.(n)}),()=>e.close()},[h,a,o,s,c]);let ge=(e,t)=>{h&&fetch(`/api/agent/approve`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({sessionId:h,requestId:e,decision:t})}).catch(()=>void 0)},_e=async e=>{let t=(e??y).trim();if(!t||x||w)return;e===void 0&&b(``),v(e=>[...e,{role:`user`,text:t}]),S(!0);let n=ie.find(e=>e.kind===`board`),r=[...ie.flatMap(e=>e.kind===`issue`?[{type:`text`,text:`Selected issue: ${e.key}`}]:[]),...n?Nn(n.view):i?Pn({columns:i.columns,epics:i.epics}):[]];try{let e=ue.current;if(!e){if(!E)throw Error(`No agent selected`);if(e=await pe(E,O),!e){S(!1);return}}await hg(await fetch(`/api/agent/prompt`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({sessionId:e,prompt:t,skillId:P,context:r.length?r:void 0})}))}catch(e){S(!1),v(t=>[...t,{role:`agent`,text:`Failed to send: ${String(e)}`}])}};(0,C.useEffect)(()=>{if(!e){de.current=null;return}if(!l){de.current=null;return}if(!h||w||x||de.current===l)return;de.current=l;let t=l;u?.(),_e(t)},[e,l,h,w,x,u]);let ve=()=>{h&&(fetch(`/api/agent/cancel`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({sessionId:h})}).catch(()=>void 0),S(!1))},ye=async e=>{if(M(e),h)try{let t=await hg(await fetch(`/api/agent/model`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({sessionId:h,model:e})}));t.models?.length&&ne(t.models),t.selectedModel&&M(t.selectedModel)}catch(e){v(t=>[...t,{role:`agent`,text:`Failed to set model: ${String(e)}`}])}},be=async()=>{if(E)try{let e=await hg(await fetch(`/api/agent/config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({defaultAgent:E,agents:{[E]:{model:O}}})}));f(e)}catch(e){v(t=>[...t,{role:`agent`,text:`Failed to save default: ${String(e)}`}])}},xe=(e,t)=>{ge(e,t),v(n=>n.map(n=>n.role===`tool`&&n.requestId===e?{...n,approved:t!==`reject`,status:t===`reject`?`failed`:`in_progress`}:n))},Se=(e,t)=>{ge(e,t)},Ce=()=>{n&&ae(e=>[...e.filter(e=>e.kind!==`issue`),{kind:`issue`,key:n}])},we=()=>{r&&ae(e=>[...e.filter(e=>e.kind!==`board`),{kind:`board`,view:r}])},Te=e=>{ae(t=>t.filter(t=>t.kind!==e))};(0,C.useEffect)(()=>{oe.current?.scrollIntoView({behavior:`smooth`})},[_]),(0,C.useEffect)(()=>{let e=R.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,128)}px`)},[y]);let Ee=(0,C.useMemo)(()=>d?.agents.find(e=>e.id===E),[d,E]),De=te.length?te:Ee?.models??[],Oe=(0,C.useMemo)(()=>De.find(e=>e.id===O)?.name??O??`Model`,[De,O]),ke=(0,C.useMemo)(()=>p.find(e=>e.id===P)?.name??P,[p,P]),Ae=d?.defaultAgent===E&&(Ee?.model??null)===O,je=(0,C.useMemo)(()=>n?[`Tell me about ${n}`,`What's blocked?`,`What should I work on next?`]:[`Summarize this board`,`What's blocked?`,`What should I work on next?`],[n]),Me=_[_.length-1],Ne=Me?.role===`permission`||Me?.role===`tool`&&gg(Me)===`pending`,Pe=Me?.role===`agent`&&Me.text.length>0,Fe=w||x&&!Ne&&!Pe;return e?(0,W.jsx)(qh,{id:`agent`,defaultSize:`320px`,minSize:`16rem`,maxSize:`50%`,className:`min-h-0`,children:(0,W.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 flex-col`,children:[(0,W.jsxs)(`header`,{className:`shrink-0 border-b px-3 py-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(mi,{className:`bg-primary/10 text-primary size-6`,children:(0,W.jsx)(hi,{children:(0,W.jsx)(k,{className:`size-3.5`})})}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,W.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:`Agent`})}),w?(0,W.jsx)(bi,{variant:`outline`,children:`Starting`}):x?(0,W.jsx)(bi,{variant:`primary-light`,children:`Live`}):h?(0,W.jsx)(bi,{variant:`outline`,children:`Ready`}):null,(0,W.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Close`,title:`Close`,onClick:t,children:(0,W.jsx)(fe,{})})]}),(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-1`,children:[(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`outline`,size:`sm`,className:`h-6 rounded-full px-2 text-xs capitalize`,children:[E??`Agent`,(0,W.jsx)(j,{className:`size-3`})]})}),(0,W.jsxs)(Op,{align:`start`,children:[d?.agents.map(e=>(0,W.jsxs)(Ap,{disabled:e.available===!1,onClick:()=>{D(e.id),M(e.model??null),ne(e.models??[])},children:[(0,W.jsx)(`span`,{className:`capitalize`,children:e.id}),e.available===!1?` (not found)`:``]},e.id)),(0,W.jsx)(Pp,{}),(0,W.jsx)(Ap,{disabled:!E||Ae,onClick:()=>void be(),children:Ae?`Default`:`Set as default`})]})]}),E&&(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`outline`,size:`sm`,className:`text-muted-foreground h-6 rounded-full px-2 text-xs`,children:[Oe,(0,W.jsx)(j,{className:`size-3`})]})}),(0,W.jsx)(Op,{align:`start`,children:De.map(e=>(0,W.jsxs)(Ap,{onClick:()=>void ye(e.id),children:[e.name,e.description?` — ${e.description}`:``]},e.id))})]}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`outline`,size:`sm`,className:`h-6 rounded-full px-2 text-xs`,children:[ke??`Skill`,(0,W.jsx)(j,{className:`size-3`})]})}),(0,W.jsxs)(Op,{align:`end`,children:[(0,W.jsx)(Ap,{onClick:()=>re(null),children:`None`}),p.map(e=>(0,W.jsx)(Ap,{onClick:()=>re(e.id),children:e.name},e.id))]})]})]})]}),(0,W.jsxs)(`div`,{className:U(`min-h-0 flex-1 overflow-y-auto px-3 py-3`,_.length>0&&`scroll-fade`),children:[_.length===0?(0,W.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-2 text-center`,children:[(0,W.jsx)(`span`,{className:`bg-muted flex size-10 items-center justify-center rounded-full`,children:(0,W.jsx)(se,{className:`size-5`})}),(0,W.jsxs)(`div`,{className:`space-y-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Ask the agent`}),w?(0,W.jsx)(`p`,{className:`shimmer text-muted-foreground text-xs`,children:`Starting session…`}):(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`About this board, or attach a skill or issue.`})]}),(0,W.jsx)(`div`,{className:`flex flex-wrap justify-center gap-1.5`,children:je.map(e=>(0,W.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 rounded-full text-xs`,disabled:x||w,onClick:()=>void _e(e),children:e},e))})]}):(0,W.jsx)(`div`,{className:`flex flex-col gap-3`,children:_.map((e,t)=>(0,W.jsx)(C.Fragment,{children:{user:e=>e.role===`user`?(0,W.jsx)(Hp,{align:`end`,children:(0,W.jsx)(Up,{children:(0,W.jsx)(Si,{variant:`default`,children:(0,W.jsx)(Ci,{children:e.text})})})}):null,agent:(e,t)=>e.role===`agent`?(0,W.jsx)(Hp,{align:`start`,children:(0,W.jsxs)(Up,{children:[(0,W.jsx)(Si,{variant:`muted`,children:(0,W.jsx)(Ci,{children:e.text})}),(0,W.jsx)(Wp,{children:(0,W.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-xs`,className:`text-muted-foreground`,"aria-label":`Copy`,title:`Copy`,onClick:n=>{n.preventDefault(),n.stopPropagation();let r=()=>{L(t),window.setTimeout(()=>{L(e=>e===t?null:e)},1500)};try{zn(e.text),r()}catch{Ln(e.text).then(r).catch(()=>void 0)}},children:F===t?(0,W.jsx)(A,{}):(0,W.jsx)(N,{})})})]})}):null,tool:e=>{if(e.role!==`tool`)return null;let t=gg(e);return(0,W.jsx)(mg,{name:e.name,args:e.args,status:t,onApprove:t===`pending`?()=>xe(e.requestId,`once`):void 0,onAllowAlways:t===`pending`?()=>xe(e.requestId,`always`):void 0,onReject:t===`pending`?()=>xe(e.requestId,`reject`):void 0})},permission:e=>e.role===`permission`?(0,W.jsx)(Yh,{kind:e.kind,description:e.description,onAllowOnce:()=>Se(e.requestId,`once`),onAllowAlways:()=>Se(e.requestId,`always`),onReject:()=>Se(e.requestId,`reject`)}):null}[e.role](e,t)},t))}),_.length>0&&Fe?(0,W.jsxs)(zp,{role:`status`,className:`mt-2`,children:[(0,W.jsx)(Bp,{children:(0,W.jsx)(I,{className:`animate-spin`})}),(0,W.jsx)(Vp,{className:`shimmer`,children:w?`Starting session…`:`Thinking…`})]}):null,(0,W.jsx)(`div`,{ref:oe})]}),(0,W.jsx)(`div`,{className:`shrink-0 p-2`,children:(0,W.jsxs)(`form`,{className:`bg-background rounded-2xl border p-2 shadow-xs`,onSubmit:e=>{e.preventDefault(),_e()},children:[(P||ie.length>0)&&(0,W.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap gap-1`,children:[P&&(0,W.jsxs)(`span`,{className:`bg-muted inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs`,children:[ke,(0,W.jsx)(`button`,{type:`button`,className:`text-muted-foreground`,onClick:()=>re(null),children:`×`})]}),ie.map((e,t)=>(0,W.jsxs)(`span`,{className:`bg-muted inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs`,children:[e.kind===`issue`?`Issue ${e.key}`:e.kind===`board`?`Board view`:e.label,(0,W.jsx)(`button`,{type:`button`,className:`text-muted-foreground`,onClick:()=>Te(e.kind),children:`×`})]},`${e.kind}-${t}`))]}),(0,W.jsx)(`textarea`,{ref:R,rows:1,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),_e())},placeholder:`Ask the agent…`,disabled:x||w,className:`placeholder:text-muted-foreground max-h-32 min-h-8 w-full resize-none bg-transparent px-1 py-1 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50`}),(0,W.jsxs)(`div`,{className:`mt-1 flex items-end justify-between gap-1`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-1`,children:[n&&!ie.some(e=>e.kind===`issue`)&&(0,W.jsx)(K,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 text-xs`,onClick:Ce,children:`Attach issue`}),r&&!ie.some(e=>e.kind===`board`)&&(0,W.jsx)(K,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 text-xs`,onClick:we,children:`Attach board view`})]}),x?(0,W.jsx)(K,{type:`button`,variant:`secondary`,size:`icon`,className:`size-8 shrink-0 rounded-full`,"aria-label":`Stop`,title:`Stop`,onClick:ve,children:(0,W.jsx)(ce,{})}):(0,W.jsx)(K,{type:`submit`,size:`icon`,className:`size-8 shrink-0 rounded-full`,"aria-label":`Send`,title:`Send`,disabled:x||w||!y.trim(),children:(0,W.jsx)(ee,{})})]})]})})]})}):null}var vg,Z,yg,bg,xg,Sg,Cg,wg,Tg,Eg={},Dg=[],Og=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function kg(e,t){for(var n in t)e[n]=t[n];return e}function Ag(e){var t=e.parentNode;t&&t.removeChild(e)}function Q(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?vg.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return jg(e,o,r,i,null)}function jg(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++yg};return i==null&&Z.vnode!=null&&Z.vnode(a),a}function Mg(){return{current:null}}function Ng(e){return e.children}function Pg(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||Ig(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||Ig(e,a,t[a],n[a],r)}function Fg(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Og.test(t)?n:n+`px`}function Ig(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Fg(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||Fg(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?Rg:Lg,a):e.removeEventListener(t,a?Rg:Lg,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Lg(e){xg=!0;try{return this.l[e.type+!1](Z.event?Z.event(e):e)}finally{xg=!1}}function Rg(e){xg=!0;try{return this.l[e.type+!0](Z.event?Z.event(e):e)}finally{xg=!1}}function zg(e,t){this.props=e,this.context=t}function Bg(e,t){if(t==null)return e.__?Bg(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Bg(e):null}function Vg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Vg(e)}}function Hg(e){xg?setTimeout(e):wg(e)}function Ug(e){(!e.__d&&(e.__d=!0)&&Sg.push(e)&&!Wg.__r++||Cg!==Z.debounceRendering)&&((Cg=Z.debounceRendering)||Hg)(Wg)}function Wg(){var e,t,n,r,i,a,o,s;for(Sg.sort(function(e,t){return e.__v.__b-t.__v.__b});e=Sg.shift();)e.__d&&(t=Sg.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=kg({},a)).__v=a.__v+1,Xg(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??Bg(a),a.__h),Zg(r,a),a.__e!=o&&Vg(a)),Sg.length>t&&Sg.sort(function(e,t){return e.__v.__b-t.__v.__b}));Wg.__r=0}function Gg(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||Dg,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?jg(null,p,null,null,p):Array.isArray(p)?jg(Ng,{children:p},null,null,null):p.__b>0?jg(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}Xg(e,p,f||=Eg,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=Bg(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=Kg(p,c,e):c=Jg(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=Yg(r).nextSibling),e_(_[u],_[u]));if(g)for(u=0;u<g.length;u++)$g(g[u],g[++u],g[++u])}function Kg(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?Kg(r,t,n):Jg(n,r,r,i,r.__e,t));return t}function qg(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){qg(e,t)}):t.push(e)),t}function Jg(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function Yg(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Yg(n)))return r}return null}function Xg(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=Z.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new zg(g,v),u.constructor=w,u.render=t_),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=kg({},u.__s)),kg(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=Z.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=kg(kg({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===Ng&&l.key==null?l.props.children:l,Gg(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Qg(n.__e,t,n,r,i,a,o,c);(l=Z.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),Z.__e(e,t,n)}}function Zg(e,t){Z.__c&&Z.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Z.__e(e,t.__v)}})}function Qg(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=vg.call(e.childNodes),l=(d=n.props||Eg).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(Pg(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,Gg(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&Bg(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&Ag(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&Ig(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&Ig(e,`checked`,m,d.checked,!1))}return e}function $g(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){Z.__e(e,n)}}function e_(e,t,n){var r,i;if(Z.unmount&&Z.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$g(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Z.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&e_(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||Ag(e.__e),e.__=e.__e=e.__d=void 0}function t_(e,t,n){return this.constructor(e,n)}function n_(e,t,n){var r,i,a;Z.__&&Z.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],Xg(t,e=(!r&&n||t).__k=Q(Ng,null,[e]),i||Eg,Eg,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?vg.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),Zg(a,e)}function r_(e,t){var n={__c:t=`__cC`+Tg++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,Ug(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}vg=Dg.slice,Z={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},yg=0,bg=function(e){return e!=null&&e.constructor===void 0},xg=!1,zg.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=kg({},this.state);typeof e==`function`&&(e=e(kg({},n),this.props)),e&&kg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ug(this))},zg.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ug(this))},zg.prototype.render=Ng,Sg=[],wg=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wg.__r=0,Tg=0;var i_,a_,o_,s_=[],c_=[],l_=Z.__b,u_=Z.__r,d_=Z.diffed,f_=Z.__c,p_=Z.unmount;function m_(){for(var e;e=s_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(__),e.__H.__h.forEach(v_),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){i_=null,l_&&l_(e)},Z.__r=function(e){u_&&u_(e);var t=(i_=e.__c).__H;t&&(a_===i_?(t.__h=[],i_.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=c_,e.__N=e.i=void 0})):(t.__h.forEach(__),t.__h.forEach(v_),t.__h=[])),a_=i_},Z.diffed=function(e){d_&&d_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(s_.push(t)!==1&&o_===Z.requestAnimationFrame||((o_=Z.requestAnimationFrame)||g_)(m_)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==c_&&(e.__=e.__V),e.i=void 0,e.__V=c_})),a_=i_=null},Z.__c=function(e,t){t.some(function(e){try{e.__h.forEach(__),e.__h=e.__h.filter(function(e){return!e.__||v_(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Z.__e(n,e.__v)}}),f_&&f_(e,t)},Z.unmount=function(e){p_&&p_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{__(e)}catch(e){t=e}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var h_=typeof requestAnimationFrame==`function`;function g_(e){var t,n=function(){clearTimeout(r),h_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);h_&&(t=requestAnimationFrame(n))}function __(e){var t=i_,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),i_=t}function v_(e){var t=i_;e.__c=e.__(),i_=t}function y_(e,t){for(var n in t)e[n]=t[n];return e}function b_(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function x_(e){this.props=e}(x_.prototype=new zg).isPureReactComponent=!0,x_.prototype.shouldComponentUpdate=function(e,t){return b_(this.props,e)||b_(this.state,t)};var S_=Z.__b;Z.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),S_&&S_(e)},typeof Symbol<`u`&&Symbol.for;var C_=Z.__e;Z.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}C_(e,t,n,r)};var w_=Z.unmount;function T_(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=y_({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return T_(e,t,n)})),e}function E_(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return E_(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function D_(){this.__u=0,this.t=null,this.__b=null}function O_(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function k_(){this.u=null,this.o=null}Z.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),w_&&w_(e)},(D_.prototype=new zg).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=O_(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=E_(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},D_.prototype.componentWillUnmount=function(){this.t=[]},D_.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=T_(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Q(Ng,null,e.fallback);return i&&(i.__h=null),[Q(Ng,null,t.__a?null:e.children),i]};var A_=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function j_(e){return this.getChildContext=function(){return e.context},e.children}function M_(e){var t=this,n=e.i;t.componentWillUnmount=function(){n_(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),n_(Q(j_,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function N_(e,t){var n=Q(M_,{__v:e,i:t});return n.containerInfo=t,n}(k_.prototype=new zg).__a=function(e){var t=this,n=O_(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),A_(t,e,r)):i()};n?n(a):a()}},k_.prototype.render=function(e){this.u=null,this.o=new Map;var t=qg(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},k_.prototype.componentDidUpdate=k_.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){A_(e,n,t)})};var P_=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,F_=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,I_=typeof document<`u`,L_=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};zg.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(zg.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var R_=Z.event;function z_(){}function B_(){return this.cancelBubble}function V_(){return this.defaultPrevented}Z.event=function(e){return R_&&(e=R_(e)),e.persist=z_,e.isPropagationStopped=B_,e.isDefaultPrevented=V_,e.nativeEvent=e};var H_={configurable:!0,get:function(){return this.class}},U_=Z.vnode;Z.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];I_&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!L_(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&F_.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=qg(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=qg(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(H_.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",H_))}e.$$typeof=P_,U_&&U_(e)};var W_=Z.__r;Z.__r=function(e){W_&&W_(e),e.__c};var G_=[],K_=new Map;function q_(e){G_.push(e),K_.forEach(t=>{Z_(t,e)})}function J_(e){e.isConnected&&e.getRootNode&&Y_(e.getRootNode())}function Y_(e){let t=K_.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=$_();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}K_.set(e,t),X_(t)}}function X_(e){for(let t of G_)Z_(e,t)}function Z_(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var Q_;function $_(){return Q_===void 0&&(Q_=ev()),Q_}function ev(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&Y_(document),q_(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var tv=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function nv(e){e.parentNode&&e.parentNode.removeChild(e)}function rv(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(iv(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function iv(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function av(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var ov=/(top|left|right|bottom|width|height)$/i;function sv(e,t){for(let n in t)cv(e,n,t[n])}function cv(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&ov.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function lv(e){return e.composedPath?.call(e)[0]??e.target}var uv=0;function dv(){return uv+=1,`fc-dom-`+uv}function fv(e,t){return n=>{let r=rv(n.target,e);r&&t.call(r,n,r)}}function pv(e,t,n,r){let i=fv(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function mv(e,t,n,r){let i;return pv(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function hv(e){return Object.assign({onClick:e},gv(e))}function gv(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var _v=0;function vv(){return _v+=1,String(_v)}function yv(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function bv(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=xv(e,t,n[r]),i)return i;return 0}function xv(e,t,n){return n.func?n.func(e,t):Sv(e[n.field],t[n.field])*(n.order||1)}function Sv(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function Cv(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function wv(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function Tv(e){return e%1==0}function Ev(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var Dv=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Ov(e,t){return typeof e==`string`?kv(e):typeof e==`object`&&e?Av(e):typeof e==`number`?Av({[t||`milliseconds`]:e}):null}function kv(e){let t=Dv.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function Av(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function jv(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function Mv(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function Nv(e){return Fv(e)/365}function Pv(e){return Fv(e)/30}function Fv(e){return Iv(e)/864e5}function Iv(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function Lv(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function Rv(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var zv=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function Bv(e,t){let n=oy(e);return n[2]+=t*7,sy(n)}function Vv(e,t){let n=oy(e);return n[2]+=t,sy(n)}function Hv(e,t){let n=oy(e);return n[6]+=t,sy(n)}function Uv(e,t){return Wv(e,t)/7}function Wv(e,t){return(t.valueOf()-e.valueOf())/864e5}function Gv(e,t){return(t.valueOf()-e.valueOf())/36e5}function Kv(e,t){return(t.valueOf()-e.valueOf())/6e4}function qv(e,t){return(t.valueOf()-e.valueOf())/1e3}function Jv(e,t){let n=Zv(e),r=Zv(t);return{years:0,months:0,days:Math.round(Wv(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function Yv(e,t){let n=Xv(e,t);return n!==null&&n%7==0?n/7:null}function Xv(e,t){return ly(e)===ly(t)?Math.round(Wv(e,t)):null}function Zv(e){return sy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Qv(e){return sy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function $v(e){return sy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function ey(e){return sy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function ty(e,t,n){let r=e.getUTCFullYear(),i=ny(e,r,t,n);if(i<1)return ny(e,r-1,t,n);let a=ny(e,r+1,t,n);return a>=1?Math.min(i,a):i}function ny(e,t,n,r){let i=sy([t,0,1+ry(t,n,r)]),a=Zv(e),o=Math.round(Wv(i,a));return Math.floor(o/7)+1}function ry(e,t,n){let r=7+t-n;return-((7+sy([e,0,r]).getUTCDay()-t)%7)+r-1}function iy(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function ay(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function oy(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function sy(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function cy(e){return!isNaN(e.valueOf())}function ly(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function uy(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,py(t,!0)))),r}function dy(e){return e.toISOString().replace(/T.*$/,``)}function fy(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function py(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+Cv(i,2)}:${Cv(a,2)}`:`GMT${n}${i}${a?`:${Cv(a,2)}`:``}`}function my(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!Rv(r,a)){n&&n(i);let r=e.apply(this,a);(!t||!t(r,i))&&(i=r)}return r=a,i}}function hy(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!eb(r,a)){n&&n(i);let r=e.call(this,a);(!t||!t(r,i))&&(i=r)}return r=a,i}}var gy={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},_y={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},vy=/\s*([ap])\.?m\.?/i,yy=/,/g,by=/\s+/g,xy=/\u200e/g,Sy=/UTC|GMT/,Cy=class{constructor(e){let t={},n={},r=9;for(let i in e)i in gy?(n[i]=e[i],gy[i]<9&&(r=Math.min(gy[i],r))):(t[i]=e[i],i in _y&&(r=Math.min(_y[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=my(wy)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=Ay(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=wy(jy(i,s),a,n),d=u(e),f=u(t),p=My(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function wy(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>py(e.timeZoneOffset):r===0&&t.week?e=>ky(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):Ty(e,t,n)}function Ty(e,t,n){e=Object.assign({},e),t=Object.assign({},t),Ey(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,Dy(s.format(o),a,e,t,n)}}function Ey(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function Dy(e,t,n,r,i){return e=e.replace(xy,``),n.timeZoneName===`short`&&(e=Oy(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:py(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(yy,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(vy,``).trim():r.meridiem===`narrow`?e=e.replace(vy,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(vy,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(vy,e=>e.toLocaleLowerCase())),e=e.replace(by,` `),e=e.trim(),e}function Oy(e,t){let n=!1;return e=e.replace(Sy,()=>(n=!0,t)),n||(e+=` ${t}`),e}function ky(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function Ay(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?ly(e)===ly(t)?0:1:2:4:5}function jy(e,t){let n={};for(let r in e)(!(r in _y)||_y[r]<=t)&&(n[r]=e[r]);return n}function My(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function Ny(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Py(e,t,n,r){let i=Ny(e,n.calendarSystem);return{date:i,start:i,end:t?Ny(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var Fy=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Py(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Py(e,t,n,r))}},Iy=class{constructor(e){this.func=e}format(e,t,n){return this.func(Py(e,null,t,n))}formatRange(e,t,n,r){return this.func(Py(e,t,n,r))}};function Ly(e){return typeof e==`object`&&e?new Cy(e):typeof e==`string`?new Fy(e):typeof e==`function`?new Iy(e):null}var Ry={navLinkDayClick:$,navLinkWeekClick:$,duration:Ov,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:Ov,defaultTimedEventDuration:Ov,nextDayThreshold:Ov,scrollTime:Ov,scrollTimeReset:Boolean,slotMinTime:Ov,slotMaxTime:Ov,dayPopoverFormat:Ly,slotDuration:Ov,snapDuration:Ov,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Ly,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:yv,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:Ly,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:Ov,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Ly,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Ov,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:Ly,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},zy={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},By={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},Vy={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},Hy={headerToolbar:Uy,footerToolbar:Uy,buttonText:Uy,buttonHints:Uy,buttonIcons:Uy,dateIncrement:Uy,plugins:Wy,events:Wy,eventSources:Wy,resources:Wy};function Uy(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?eb(e,t):e===t}function Wy(e,t){return Array.isArray(e)&&Array.isArray(t)?Rv(e,t):e===t}var Gy={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function Ky(e){return Yy(e,Hy)}function qy(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:Jy}=Object.prototype;function Yy(e,t){let n={};if(t){for(let r in t)if(t[r]===Uy){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=Yy(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function Xy(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Zy(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Qy(e){let t={};for(let n of e)t[n]=!0;return t}function $y(e){let t=[];for(let n in e)t.push(e[n]);return t}function eb(e,t){if(e===t)return!0;for(let n in e)if(Jy.call(e,n)&&!(n in t))return!1;for(let n in t)if(Jy.call(t,n)&&e[n]!==t[n])return!1;return!0}var tb=/^on[A-Z]/;function nb(e,t){let n=rb(e,t);for(let e of n)if(!tb.test(e))return!1;return!0}function rb(e,t){let n=[];for(let r in e)Jy.call(e,r)&&(r in t||n.push(r));for(let r in t)Jy.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function ib(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&ab(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function ab(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function ob(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var sb={};function cb(e,t){sb[e]=t}function lb(e){return new sb[e]}cb(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return sy(e)}markerToArray(e){return oy(e)}});var ub=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function db(e){let t=ub.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(cy(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var fb=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=lb(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):sy(iy(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=sy(e)),t===null||!cy(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=db(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return ly(e)===ly(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return ly(e)===ly(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=Yv(e,t),n===null?(n=Xv(e,t),n===null?(n=Gv(e,t),Tv(n)?{unit:`hour`,value:n}:(n=Kv(e,t),Tv(n)?{unit:`minute`,value:n}:(n=qv(e,t),Tv(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/Nv(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/Pv(n):n.days&&(r=Xv(e,t),r!==null)?r/Fv(n):(t.valueOf()-e.valueOf())/Iv(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?Zv(e):t===`hour`?Qv(e):t===`minute`?$v(e):t===`second`?ey(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):ty(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=Hv(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),uy(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?sy(iy(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):sy(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-ay(oy(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(oy(e)):null}toDate(e,t){return this.timeZone===`local`?ay(oy(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(oy(e))*1e3*60):new Date(e.valueOf()-(t||0))}},pb=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};pb.prototype.classes={},pb.prototype.iconClasses={},pb.prototype.baseIconClass=``,pb.prototype.iconOverridePrefix=``;function mb(e){e();let t=Z.debounceRendering,n=[];function r(e){n.push(e)}for(Z.debounceRendering=r,n_(Q(hb,{}),document.createElement(`div`));n.length;)n.shift()();Z.debounceRendering=t}var hb=class extends zg{render(){return Q(`div`,{})}componentDidMount(){this.setState({})}};function gb(e){let t=r_(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var _b=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},vb=gb({});function yb(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new _b(e,u,Ov(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var bb=class extends zg{shouldComponentUpdate(e,t){return!ib(this.props,e,this.propEquality)||!ib(this.state,t,this.stateEquality)}safeSetState(e){ib(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};bb.addPropsEquality=Sb,bb.addStateEquality=Cb,bb.contextType=vb,bb.prototype.propEquality={},bb.prototype.stateEquality={};var xb=class extends bb{};xb.contextType=vb;function Sb(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function Cb(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function wb(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var Tb=class extends xb{constructor(){super(...arguments),this.id=vv(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;(!t.customRenderingReplaces||!Eb(n,t))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&wb(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=Db(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Q):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?bg(e):typeof e!=`function`)?c=e:u=e}}else s=!Eb(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Q(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(Ob)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!Rv(e,t)){t.forEach(nv);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};Tb.addPropsEquality({elClasses:Rv,elStyle:eb,elAttrs:nb,renderProps:eb});function Eb(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function Db(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function Ob(e){return!!e}var kb=gb(0),Ab=class extends zg{constructor(){super(...arguments),this.InnerContent=jb.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(wb(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=Mb(e.classNameGenerator,e.renderProps);if(e.children){let n=Db(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Q(e.elTag,n,r):r}return Q(Tb,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};Ab.contextType=kb;function jb(e,t){let n=e.props;return Q(Tb,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function Mb(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var Nb=class extends xb{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Q(Ab,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...Pb(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function Pb(e){return[`fc-${e.type}-view`,`fc-view`]}function Fb(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function Ib(e,t){let n=[],{start:r}=t,i,a;for(e.sort(Lb),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function Lb(e,t){return e.start.valueOf()-t.start.valueOf()}function Rb(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function zb(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function Bb(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function Vb(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function Hb(e){let t=Math.floor(Wv(e.start,e.end))||1,n=Zv(e.start);return{start:n,end:Vv(n,t)}}function Ub(e,t=Ov(0)){let n=null,r=null;if(e.end){r=Zv(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=Iv(t)&&(r=Vv(r,1))}return e.start&&(n=Zv(e.start),r&&r<=n&&(r=Vv(n,1))),{start:n,end:r}}function Wb(e,t,n,r){return r===`year`?Ov(n.diffWholeYears(e,t),`year`):r===`month`?Ov(n.diffWholeMonths(e,t),`month`):Jv(e,t)}var Gb=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=Vb(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=Rb(c,a.range)),c=this.adjustActiveRange(c),c=Rb(c,i),l=zb(a.range,i),Bb(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=Lv(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return Ov({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(Fv(r)<0&&(a=Zv(a),a=t.add(a,r)),Fv(i)>1&&(o=Zv(o),o=Vv(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&Iv(e)<Iv(n)?Lv(e).unit:r}Fv(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=Zv(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=Zv(o),o=this.skipHiddenDays(o,t),s=o;do s=Vv(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?Ov(1,n):e||Ov({days:1}))}refineRange(e){if(e){let t=Fb(e,this.props.dateEnv);return t&&=Ub(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=Vv(e,t);return e}};function Kb(e,t,n,r){return{instanceId:vv(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function qb(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function Jb(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=Xy(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=Yb(n,o,t,r,i.recurringTypes);for(let t of c){let n=Kb(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function Yb(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(Zv)),a}var Xb={id:String,groupId:String,title:String,url:String,interactive:Boolean},Zb={start:$,end:$,date:$,allDay:Boolean},Qb=Object.assign(Object.assign(Object.assign({},Xb),Zb),{extendedProps:$});function $b(e,t,n,r,i=tx(n),a,o){let{refined:s,extra:c}=ex(e,n,i),l=ix(t,n),u=qb(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=nx(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=rx(s,l,n,r);if(d){let e=nx(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=Kb(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function ex(e,t,n=tx(t)){return qy(e,n)}function tx(e){return Object.assign(Object.assign(Object.assign({},hx),Qb),e.pluginHooks.eventRefiners)}function nx(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||vv(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:_x(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function rx(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=Zv(o)),c&&(l=c.marker,i&&(l=Zv(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function ix(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function ax(e,t,n,r,i,a){let o=lx(),s=tx(n);for(let c of e){let e=$b(c,t,n,r,s,i,a);e&&ox(e,o)}return o}function ox(e,t=lx()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function sx(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=dx(e,e=>cx(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return lx()}function cx(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function lx(){return{defs:{},instances:{}}}function ux(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function dx(e,t){let n=Xy(e.defs,t);return{defs:n,instances:Xy(e.instances,e=>n[e.defId])}}function fx(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function px(e,t){return Array.isArray(e)?ax(e,null,t,!0):typeof e==`object`&&e?ax([e],null,t,!0):e==null?null:String(e)}function mx(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var hx={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:mx,classNames:mx,color:String,backgroundColor:String,borderColor:String,textColor:String},gx={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function _x(e,t){let n=px(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function vx(e){return e.reduce(yx,gx)}function yx(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var bx={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function xx(e,t,n=Sx(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=qy(r,n),o=Cx(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:vv(),sourceDefId:o.sourceDefId,meta:o.meta,ui:_x(i,t),extendedProps:a}}return null}function Sx(e){return Object.assign(Object.assign(Object.assign({},hx),bx),e.pluginHooks.eventSourceRefiners)}function Cx(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function wx(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return Tx(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return Ex(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return kx(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return ux(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?Jb(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return fx(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return jx(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return dx(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return lx();default:return e}}function Tx(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=ax(Dx(i,t,a),t,a);return r&&(n=Jb(n,r,a)),ux(jx(e,t.sourceId),n)}return e}function Ex(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=Mx(e);return Jb(ax(Dx(n,t,i),t,i,!1,a,o),r,i)}function Dx(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Ox(e,i)),r&&(e=Ox(e,r)),e}function Ox(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function kx(e,t,n,r){return n&&(t=Jb(t,n,r)),ux(e,t)}function Ax(e,t,n){let{defs:r}=e;return{defs:r,instances:Zy(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function jx(e,t){return dx(e,e=>e.sourceId!==t)}function Mx(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var Nx=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){Px(this.handlers,e,t)}off(e,t){Fx(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function Px(e,t,n){(e[t]||(e[t]=[])).push(n)}function Fx(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var Ix={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function Lx(e,t){return ax(Rx(e),null,t)}function Rx(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},Ix),e)),t}function zx(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},Vx(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Bx(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function Vx(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,mS(e,t.dateEnv)),n}function Hx(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=Zv(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function Ux(e,t,n,r){let i=$x(e.defs,t),a=lx();for(let t in e.defs){let o=e.defs[t];a.defs[t]=Wx(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=Gx(o,s,i[o.defId],n,r)}return a}function Wx(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function Gx(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=Hb(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:Hx(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:Zv(c.range.start),end:Zv(c.range.end)}),c.range.end<c.range.start&&(c.range.end=Hx(t.allDay,c.range.start,i)),c}var Kx=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},qx=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in Zb)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=Xb[e](t),this.mutate({standardProps:{publicId:t}});else if(e in Xb)t=Xb[e](t),this.mutate({standardProps:{[e]:t}});else if(e in hx){let n=hx[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=Wb(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=Wb(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=Hb(e));let t=Wb(e.start,a,r,n.granularity);if(o){let a=Wb(e.end,o,r,n.granularity);jv(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=Ov(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=Ov(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=Ov(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Ly(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=sx(a,n.instanceId);o=Ux(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:Yx(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=Jx(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Kx(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function Jx(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Yx(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new qx(t,s,n))}return a}function Xx(e,t,n,r){let i={},a={},o={},s=[],c=[],l=$x(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?Ub(f,r):f,m=Rb(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=Ib(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=Ib(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function Zx(e,t){e.fcSeg=t}function Qx(e){return e.fcSeg||e.parentNode.fcSeg||null}function $x(e,t){return Zy(e,e=>eS(e,t))}function eS(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),vx(n)}function tS(e,t){let n=e.map(nS);return n.sort((e,n)=>bv(e,n,t)),n.map(e=>e._seg)}function nS(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function rS(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function iS(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function aS(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function oS(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=Zv(p).valueOf()===Zv(h).valueOf(),v=Zv(Hv(m,-1)).valueOf()===Zv(Hv(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function sS(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Bb(t,r.start)}}function cS(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function lS(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function uS(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?gv(e=>{a.trigger(`eventClick`,{el:e.target,event:new qx(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var dS={start:$,end:$,allDay:Boolean};function fS(e,t,n){let r=pS(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function pS(e,t){let{refined:n,extra:r}=qy(e,dS),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function mS(e,t){return Object.assign(Object.assign({},gS(e.range,t,e.allDay)),{allDay:e.allDay})}function hS(e,t,n){return Object.assign(Object.assign({},gS(e,t,n)),{timeZone:t.timeZone})}function gS(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function _S(e,t,n){let r=ex({editable:!1},n),i=nx(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:eS(i,t),instance:Kb(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function vS(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var yS=class extends Error{constructor(e,t){super(e),this.response=t}};function bS(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new yS(`Failure parsing JSON`,e)});throw new yS(`Request failed`,e)})}var xS;function SS(){return xS??=CS(),xS}function CS(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var wS=class extends xb{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{mb(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{mb(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return SS()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},TS=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function ES(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var DS={},OS=class extends zg{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,Ov(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:kS(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};OS.contextType=vb;function kS(e){let t=Zv(e);return{start:t,end:Vv(t,1)}}var AS=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=Ov(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Ly(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Ly(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=fS(n,r.dateEnv,Ov({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),zx(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),Bx(e,t))}addEvent(e,t){if(e instanceof qx){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:ox({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof Kx)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=$y(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=$b(e,r,n,!1);if(i){let e=new qx(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:ox(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:Jx(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new qx(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new qx(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return Yx(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Kx(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Kx(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Kx)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=xx(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new Kx(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=Ov(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function jS(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function MS(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&Bb(r.activeRange,e)),isOther:!(!r||Bb(r.currentRange,e)),isToday:!!(t&&Bb(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function NS(e,t){let n=[`fc-day`,`fc-day-${zv[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var PS=Ly({year:`numeric`,month:`long`,day:`numeric`}),FS=Ly({week:`long`});function IS(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?FS:PS);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:wv(a.navLinkHint,[s,e],s),"data-navlink":``},r?hv(c):{onClick:c})}return{"aria-label":s}}var LS;function RS(){return LS||=zS(),LS}function zS(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=BS(e);return document.body.removeChild(e),t}function BS(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function VS(e){let t=HS(e),n=e.getBoundingClientRect();for(let e of t){let t=jS(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function HS(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var US=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return WS(this.tops||[],e.tops||[])&&WS(this.bottoms||[],e.bottoms||[])&&WS(this.lefts||[],e.lefts||[])&&WS(this.rights||[],e.rights||[])}};function WS(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var GS=class extends xb{constructor(){super(...arguments),this.uid=vv()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!rv(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!rv(e,`.fc-event:not(.fc-bg-event)`)&&!rv(e,`.fc-more-link`)&&!rv(e,`a[data-navlink]`)&&!rv(e,`.fc-popover`)}},KS=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:YS(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(XS(r,t.level,t.levelCoord),XS(n,t.level,[e])):XS(n[t.level],t.lateral,e),this.stackCnts[JS(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=ZS(f,e.span.start,qS),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[JS(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=ZS(n[d],e.span.end,qS)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function qS(e){return e.span.end}function JS(e){return e.index+`:`+e.span.start}function YS(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function XS(e,t,n){e.splice(t,0,n)}function ZS(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function QS(e,t){return Ly(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var $S=`fc-col-header-cell`;function eC(e){return e.text}var tC=class extends xb{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=MS(a,i.todayRange,null,o),c=[$S].concat(NS(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?IS(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=Hv(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Q(Ab,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:dy(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:eC,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Q(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},nC=Ly({weekday:`long`}),rC=class extends xb{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=Vv(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Q(Ab,{elTag:`th`,elClasses:[$S,...NS(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:eC,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},Q(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,nC)}})))}},iC=class extends xb{constructor(){super(...arguments),this.createDayHeaderFormatter=my(aC)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Q(OS,{unit:`day`},(e,o)=>Q(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Q(tC,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Q(rC,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function aC(e,t,n){return e||QS(t,n)}var oC=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=Vv(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(Vv(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Wv(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},sC=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},cC=class{constructor(){this.sliceBusinessHours=my(this._sliceBusinessHours),this.sliceDateSelection=my(this._sliceDateSpan),this.sliceEventStore=my(this._sliceEventStore),this.sliceEventDrag=my(this._sliceInteraction),this.sliceEventResize=my(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:Hv(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(Jb(e,lC(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=Xx(e,t,lC(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=Xx(e.mutatedEvents,t,lC(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=lC(t,!!n),s=Rb(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=_S(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:Vv(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function lC(e,t){let n=e.activeRange;return t?n:{start:Hv(n.start,e.slotMinTime.milliseconds),end:Hv(n.end,e.slotMaxTime.milliseconds-864e5)}}var uC=/^(visible|hidden)$/,dC=class extends xb{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,wb(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Q(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(uC.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(uC.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return uC.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return uC.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},fC=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return ob(this.currentMap,e,t,n)}getAll(){return $y(this.currentMap)}};function pC(e){let t=av(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,Ev(e));return Math.ceil(n)}function mC(e,t){return e.liquid&&t.liquid}function hC(e,t){return t.maxHeight!=null||mC(e,t)}function gC(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Q(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Q(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function _C(e,t){return Rv(e,t,eb)}function vC(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Q(`col`,{style:{width:r.width===`shrink`?yC(t):r.width||``,minWidth:r.minWidth||``}}))}return Q(`colgroup`,{},...n)}function yC(e){return e??4}function bC(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function xC(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function SC(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function CC(e){return Q(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function wC(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function TC(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var EC=class extends xb{constructor(){super(...arguments),this.processCols=my(e=>e,_C),this.renderMicroColGroup=my(vC),this.scrollerRefs=new fC,this.scrollerElRefs=new fC(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=xC(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!SS(),m={role:`rowgroup`};return Q(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&Q(`thead`,m,...u),!(p||!d.length)&&Q(`tbody`,m,...d),!(p||!f.length)&&Q(`tfoot`,m,...f),p&&Q(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Q(Ng,{key:e.key},e.outerContent):Q(`tr`,{key:e.key,role:`presentation`,className:SC(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=hC(i,e),l=mC(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=gC(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Q(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Q(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Q(dC,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=DC(this.props.sections,t);n&&wb(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return bC(this.props.cols)?pC(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=RS(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};EC.addStateEquality({scrollerClientWidths:eb,scrollerClientHeights:eb});function DC(e,t){for(let n of e)if(n.key===t)return n;return null}var OC=class extends xb{constructor(){super(...arguments),this.buildPublicEvent=my((e,t,n)=>new qx(e,t,n)),this.handleEl=e=>{this.el=e,wb(this.props.elRef,e),e&&Zx(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&rS(r,t),isStartResizable:!e.disableResizing&&iS(r,t),isEndResizable:!e.disableResizing&&aS(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Q(Ab,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...cS(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Zx(this.el,this.props.seg)}},kC=class extends xb{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=oS(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Q(OC,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:uS(r,t),defaultGenerator:AC,timeText:a}),(e,t)=>Q(Ng,null,Q(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};kC.addPropsEquality({seg:eb});function AC(e){return Q(`div`,{className:`fc-event-main-frame`},e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title-container`},Q(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Q(Ng,null,`\xA0`))))}var jC=Ly({day:`numeric`}),MC=class extends xb{constructor(){super(...arguments),this.refineRenderProps=hy(PC)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Q(Ab,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":dy(e.date)}),elClasses:[...NS(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function NC(e){return!!(e.dayCellContent||Eb(`dayCellContent`,e))}function PC(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=MS(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:jC):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var FC=class extends xb{render(){let{props:e}=this,{seg:t}=e;return Q(OC,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:IC,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function IC(e){let{title:t}=e.event;return t&&Q(`div`,{className:`fc-event-title`},e.event.title)}function LC(e){return Q(`div`,{className:`fc-${e}`})}var RC=e=>Q(vb.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Q(Ab,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:zC,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function zC(e){return e.text}var BC=10,VC=class extends xb{constructor(){super(...arguments),this.state={titleId:dv()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&wb(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=lv(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return N_(Q(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Q(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Q(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Q(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Q(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=VS(t);if(i){let a=r.getBoundingClientRect(),o=n?rv(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,BC),s=Math.min(s,document.documentElement.clientWidth-BC-a.width),s=Math.max(s,BC);let c=r.offsetParent.getBoundingClientRect();sv(r,{top:o-c.top,left:s-c.left})}}},HC=class extends GS{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Q(MC,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Q(VC,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},NC(e)&&Q(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},UC=class extends xb{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:dv()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&wb(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=GC(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new qx(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Q(vb.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=GC(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=wv(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Q(Ng,null,!!e.moreCnt&&Q(Ab,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),hv(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||WC,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Q(HC,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=rv(this.linkEl,`.fc-view-harness`))}};function WC(e){return e.text}function GC(e){if(e.allDayDate)return{start:e.allDayDate,end:Vv(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:KC(t),end:JC(t)}}function KC(e){return e.reduce(qC).eventRange.range.start}function qC(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function JC(e){return e.reduce(YC).eventRange.range.end}function YC(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var XC=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},ZC=class extends XC{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},QC=[],$C={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},ew=Object.assign(Object.assign({},$C),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function tw(e){let t=e.length>0?e[0].code:`en`,n=QC.concat(e),r={en:ew};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function nw(e,t){return typeof e==`object`&&!Array.isArray(e)?aw(e.code,[e.code],e):rw(e,t)}function rw(e,t){let n=[].concat(e||[]);return aw(e,n,iw(n,t)||ew)}function iw(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function aw(e,t,n){let r=Yy([$C,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function ow(e){return{id:vv(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function sw(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=lw(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function cw(){let e=[],t=[],n;return(r,i)=>((!n||!Rv(r,e)||!Rv(i,t))&&(n=sw(r,i)),e=r,t=i,n)}function lw(e,t){return{premiumReleaseDate:uw(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function uw(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var dw=class extends pb{};dw.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},dw.prototype.baseIconClass=`fc-icon`,dw.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},dw.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},dw.prototype.iconOverrideOption=`buttonIcons`,dw.prototype.iconOverrideCustomButtonOption=`icon`,dw.prototype.iconOverridePrefix=`fc-icon-`;function fw(e,t){let n={},r;for(r in e)pw(r,n,e,t);for(r in t)pw(r,n,e,t);return n}function pw(e,t,n,r){if(t[e])return t[e];let i=mw(e,t,n,r);return i&&(t[e]=i),i}function mw(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=pw(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function hw(e){return Zy(e,gw)}function gw(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=_w(t):n&&!(n.prototype instanceof xb)&&(n=_w(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function _w(e){return t=>Q(vb.Consumer,null,n=>Q(Ab,{elTag:`div`,elClasses:Pb(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function vw(e,t,n,r){let i=hw(e),a=hw(t.views);return Zy(fw(i,a),e=>yw(e,a,t,n,r))}function yw(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=xw(a),o)){let e=Lv(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(zy)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(zy)}}var bw={};function xw(e){let t=JSON.stringify(e),n=bw[t];return n===void 0&&(n=Ov(e),bw[t]=n),n}function Sw(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function Cw(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function ww(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function Tw(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function Ew(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function Dw(e,t,n){let r=t?t.activeRange:null;return jw({},zw(e,n),r,n)}function Ow(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return jw(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return Mw(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?Nw(e,i,r):e;case`FETCH_EVENT_SOURCES`:return Fw(e,t.sourceIds?Qy(t.sourceIds):Rw(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return Lw(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function kw(e,t,n){let r=t?t.activeRange:null;return Fw(e,Rw(e,n),r,!0,n)}function Aw(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function jw(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Nw(i,n,r)),Object.assign(Object.assign({},e),i)}function Mw(e,t){return Xy(e,e=>e.sourceId!==t)}function Nw(e,t,n){return Fw(e,Xy(e,e=>Pw(e,t,n)),t,!1,n)}function Pw(e,t,n){return Bw(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function Fw(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?Iw(s,n,r,i):s}return a}function Iw(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=vv();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function Lw(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function Rw(e,t){return Xy(e,e=>Bw(e,t))}function zw(e,t){let n=Sx(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=xx(e,t,n);r&&i.push(r)}return i}function Bw(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Vw(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function Hw(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function Uw(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ww(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Gw(e,t,n,r,i){return{header:e.headerToolbar?Kw(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Kw(e.footerToolbar,e,t,n,r,i):null}}function Kw(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=qw(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function qw(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=wv(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=wv(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>wv(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var Jw=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},Yw=ow({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Xw=ow({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;vS(i.bind(null,hS(e.range,r)),e=>t({rawEvents:e}),n)}}]}),Zw=ow({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=Qw(r,e.range,e.context);bS(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function Qw(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var $w=ow({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=Mv(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=Rb(t,{start:e.startRecur,end:e.endRecur});return r?eT(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:Ov,endTime:Ov,duration:Ov,startRecur:$,endRecur:$}});function eT(e,t,n,r,i){let a=e?Qy(e):null,o=Zv(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=Vv(s,1):t.milliseconds>=864e5&&(o=Vv(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=Vv(o,1)}return c}var tT=ow({name:`change-handler`,optionChangeHandlers:{events(e,t){nT([e],t)},eventSources:nT}});function nT(e,t){let n=$y(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function rT(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},hS(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function iT(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,Yx(e,t))}var aT=[Yw,Xw,Zw,$w,tT,ow({name:`misc`,isLoadingFuncs:[e=>Aw(e.eventSources)],propSetHandlers:{dateProfile:rT,eventStore:iT}})],oT=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new tv(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function sT(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Ly(t.titleFormat||cT(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function cT(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=Xv(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var lT=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},uT=class{constructor(e){this.computeCurrentViewData=my(this._computeCurrentViewData),this.organizeRawLocales=my(tw),this.buildLocale=my(nw),this.buildPluginHooks=cw(),this.buildDateEnv=my(dT),this.buildTheme=my(fT),this.parseToolbars=my(Gw),this.buildViewSpecs=my(vw),this.buildDateProfileGenerator=hy(pT),this.buildViewApi=my(mT),this.buildViewUiProps=hy(_T),this.buildEventUiBySource=my(hT,eb),this.buildEventUiBases=my(gT),this.parseContextBusinessHours=hy(yT),this.buildTitle=my(sT),this.nowManager=new lT,this.emitter=new Nx,this.actionRunner=new oT(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new lT;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=ww(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);Bb(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=Dw(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:lx(),renderableEventStore:lx(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));vT(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=Tw(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=Sw(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=Cw(l,e),u=Ew(u,e,l,s.dateProfileGenerator),(e.type===`PREV`||e.type===`NEXT`||!Bb(u.currentRange,l))&&(l=u.currentRange.start);let d=Ow(n.eventSources,e,u,c),f=wx(n.eventStore,e,d,u,c),p=Aw(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:Vw(n.dateSelection,e),eventSelection:Hw(n.eventSelection,e),eventDrag:Uw(n.eventDrag,e),eventResize:Ww(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=vT(n,c),x=vT(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=kw(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Ax(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Ax(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);bT(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=Ky([zy,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],aT),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ry),By),Vy),s.listenerRefiners),s.optionRefiners),l={},u=Ky([zy,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||Hy[e]&&e in f&&Hy[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return bT(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=Ky([zy,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ry),By),Vy),Gy),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||Hy[e]&&Hy[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||Hy[e]&&Hy[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function dT(e,t,n,r,i,a,o,s){let c=nw(t||o.defaultCode,o.map);return new fb({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function fT(e,t){return new(t.themeClasses[e.themeSystem]||dw)(e)}function pT(e){return new(e.dateProfileGeneratorClass||Gb)(e)}function mT(e,t,n){return new Jw(e,t,n)}function hT(e){return Zy(e,e=>e.ui)}function gT(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function _T(e){let{options:t}=e;return{eventUiSingleBase:_x({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:_x({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function vT(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function yT(e){return Lx(e.options.businessHours,e)}function bT(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var xT=class extends xb{render(){return Q(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Q(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Q(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Q(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Q(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},ST=class extends xb{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Q(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Q(xT,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},CT=class extends xb{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,wb(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Q(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},wT=class extends TS{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=Qx(t);if(i&&n.isValidSegDownEl(e.target)){let a=rv(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new qx(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=pv(e.el,`click`,`.fc-event`,this.handleSegClick)}},TT=class extends TS{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{Qx(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=mv(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=Qx(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new qx(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},ET=class extends bb{constructor(){super(...arguments),this.buildViewContext=my(yb),this.buildViewPropTransformers=my(OT),this.buildToolbarProps=my(DT),this.headerRef=Mg(),this.footerRef=Mg(),this.interactionsStore={},this.state={viewLabelId:dv()},this.registerInteractiveComponent=(e,t)=>{let n=ES(e,t),r=[wT,TT].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,DS[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete DS[e.uid]},this.resizeRunner=new tv(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Q(vb.Provider,{value:o},Q(OS,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Q(Ng,null,t.header&&Q(ST,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Q(CT,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Q(ST,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Q(Ng,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Q(a,Object.assign({},r))}};function DT(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Bb(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function OT(e){return e.map(e=>new e)}var kT=class extends AS{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;mb(()=>{n_(Q(wS,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Q(kb.Provider,{value:this.customContentRenderId},Q(ET,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,n_(null,this.el),this.setClassNames([]),this.setHeight(``))},J_(e),this.el=e,this.renderRunner=new tv(this.handleRenderRequest),new uT({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){mb(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!Rv(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){cv(this.el,`height`,e)}},AT=parseInt(`19.2.8`.split(`.`)[0])<18,jT=class extends C.Component{constructor(){super(...arguments),this.elRef=(0,C.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(C.createElement(MT,{key:t.id,customRendering:t}));return C.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new ZC;this.handleCustomRendering=e.handle.bind(e),this.calendar=new kT(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,me.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(AT||r||this.isUpdating||this.isUnmounting||n-t<100?NT:me.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};jT.act=NT;var MT=class extends C.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,me.createPortal)(n,e.containerEl)}};function NT(e){e()}var PT=class extends GS{constructor(){super(...arguments),this.headerElRef=Mg()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=wC(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Q(Nb,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Q(EC,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&wC(o.options),c=!a.forPrint&&TC(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:CC}]}),Q(Nb,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Q(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function FT(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function IT(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function LT(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var RT=Ly({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function zT(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var BT=class extends xb{render(){let{props:e}=this;return Q(kC,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:RT,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},VT=class extends xb{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=oS(r,n.eventTimeFormat||RT,t,!0,e.defaultDisplayEventEnd);return Q(OC,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:uS(e.seg,t),defaultGenerator:HT,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function HT(e){return Q(Ng,null,Q(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title`},e.event.title||Q(Ng,null,`\xA0`)))}var UT=class extends xb{constructor(){super(...arguments),this.compileSegs=my(WT)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Q(UC,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Q(Ng,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Q(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},zT(t)?Q(VT,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},sS(t,e.todayRange))):Q(BT,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},sS(t,e.todayRange))))}))}})}};function WT(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var GT=Ly({week:`narrow`}),KT=class extends GS{constructor(){super(...arguments),this.rootElRef=Mg(),this.state={dayNumberId:dv()},this.handleRootEl=e=>{wb(this.rootElRef,e),wb(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&JT(o,s.currentRange,a);return Q(MC,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:qT,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>Q(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Q(RC,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:IS(e,o,`week`),date:o,defaultFormat:GT}),!s.isDisabled&&(t.showDayNumber||NC(i)||t.forceDayTop)?Q(`div`,{className:`fc-daygrid-day-top`},Q(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},IS(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Q(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Q(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Q(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Q(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Q(UT,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),Q(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function qT(e){return e.dayNumberText||Q(Ng,null,`\xA0`)}function JT(e,t,n){let{start:r,end:i}=t,a=Hv(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function YT(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function XT(e){return YT(e)+`:`+e.lastCol}function ZT(e,t,n,r,i,a,o){let s=new tE(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[XT(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=QT(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:eE(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:eE(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:eE(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function QT(e,t,n){let r=$T(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:eE(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:eE(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:eE(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function $T(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function eE(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=Rb(a,{start:r[t].date,end:Vv(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var tE=class extends KS{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[JS(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=JS(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:YS(a.span,t.span)}),c=JS(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},nE=class extends GS{constructor(){super(...arguments),this.cellElRefs=new fC,this.frameElRefs=new fC,this.fgElRefs=new fC,this.segHarnessRefs=new fC,this.rootElRef=Mg(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=IT(e.businessHourSegs,i),o=IT(e.bgEventSegs,i),s=IT(this.getHighlightSegs(),i),c=IT(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=ZT(tS(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Q(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,rE(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Q(KT,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Q(Ng,null,Q(Ng,null,r),Q(Ng,null,i)),bgContent:Q(Ng,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!eb(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Q(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:YT(t),ref:d?null:this.segHarnessRefs.createRef(XT(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},zT(t)?Q(VT,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},sS(t,n))):Q(BT,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},sS(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Q(`div`,{key:lS(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Q(FC,Object.assign({seg:o},sS(o,r))):LC(t)))}return Q(Ng,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new US(t,e,!0,!1);(!n.framePositions||!n.framePositions.similarTo(r))&&this.setState({framePositions:new US(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};nE.addStateEquality({segHeights:eb});function rE(e,t){if(!e.length)return[];let n=iE(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function iE(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var aE=class extends GS{constructor(){super(...arguments),this.splitBusinessHourSegs=my(FT),this.splitBgEventSegs=my(oE),this.splitFgEventSegs=my(FT),this.splitDateSelectionSegs=my(FT),this.splitEventDrag=my(LT),this.splitEventResize=my(LT),this.rowRefs=new fC}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Q(OS,{unit:`day`},(t,u)=>Q(Ng,null,e.cells.map((t,d)=>Q(nE,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new US(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new US(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:Vv(n,1)}}};function oE(e,t){return FT(e.filter(sE),t)}function sE(e){return e.eventRange.def.allDay}var cE=class extends GS{constructor(){super(...arguments),this.elRef=Mg(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Q(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Q(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Q(`tbody`,{role:`presentation`},Q(aE,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=lE(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function lE(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${fy(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${dy(t.currentDate)}"]`),n}var uE=class extends cC{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},dE=class extends GS{constructor(){super(...arguments),this.slicer=new uE,this.tableRef=Mg()}render(){let{props:e,context:t}=this;return Q(cE,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},fE=class extends PT{constructor(){super(...arguments),this.buildDayTableModel=my(pE),this.headerRef=Mg(),this.tableRef=Mg()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Q(iC,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Q(dE,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function pE(e,t){return new sC(new oC(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var mE=class extends Gb{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return hE({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function hE(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=Bv(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(Vv(n.end,-1))),r=Math.ceil(Uv(e,i));i=Bv(i,6-r)}return{start:r,end:i}}q_(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var gE=ow({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:fE,dateProfileGeneratorClass:mE},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function _E({cards:e,onOpen:t}){let n=(0,C.useMemo)(()=>Mn(e),[e]);function r(e){let n=kn(e);n&&t(n)}return(0,W.jsx)(`div`,{className:`pk-calendar h-full min-h-0 p-2`,children:(0,W.jsx)(jT,{plugins:[gE],initialView:`dayGridMonth`,headerToolbar:{left:`prev`,center:`title`,right:`next`},events:n,editable:!1,selectable:!1,height:`100%`,expandRows:!0,fixedWeekCount:!1,dayMaxEvents:!0,eventContent:e=>{let n=kn(e.event.extendedProps);if(!n)return!0;let r=e.event.extendedProps.hover;return(0,W.jsx)(`button`,{type:`button`,className:`fc-event-key`,title:typeof r==`string`?r:void 0,onClick:e=>{e.preventDefault(),e.stopPropagation(),t(n)},children:e.event.title})},eventClick:e=>{e.jsEvent.preventDefault(),r(e.event.extendedProps)}})})}function vE(e){return e.key?`${e.jump.kind}:${e.key}`:e.label}function yE({presets:e,epics:t,cards:n,favouriteKeys:r,onPick:i,onClose:a}){let[o,s]=(0,C.useState)(``),[c,l]=(0,C.useState)(0),u=Zt({presets:e,query:o,epics:t,cards:n,favouriteKeys:r}),d=u.flatMap(e=>e.rows),f=d.length?Math.min(c,d.length-1):0;function p(e){d.length&&l(t=>(Math.min(t,d.length-1)+e+d.length)%d.length)}function m(e){if(e.key===`ArrowDown`){e.preventDefault(),p(1);return}if(e.key===`ArrowUp`){e.preventDefault(),p(-1);return}if(e.key===`Enter`){e.preventDefault();let t=d[f];t&&i(Qt(t))}}let h=0;return(0,W.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center bg-black/40 pt-[18vh]`,onMouseDown:a,children:(0,W.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command`,className:`bg-popover text-popover-foreground h-fit w-full max-w-lg overflow-hidden rounded-xl border shadow-md`,onMouseDown:e=>e.stopPropagation(),children:[(0,W.jsxs)(`div`,{className:`flex h-11 items-center gap-2 border-b px-3`,children:[(0,W.jsx)(R,{className:`text-muted-foreground size-3.5 shrink-0`}),(0,W.jsx)(`input`,{autoFocus:!0,value:o,onChange:e=>{s(e.target.value),l(0)},onKeyDown:m,"aria-label":`Command`,placeholder:`Jump to Epic, Card, or Action`,className:`placeholder:text-muted-foreground h-11 min-w-0 flex-1 bg-transparent text-[13px] outline-none`}),o?null:(0,W.jsx)(`kbd`,{className:`text-muted-foreground rounded border px-1.5 py-0.5 text-[11px]`,children:`⌘K`})]}),u.length?(0,W.jsx)(`div`,{className:`max-h-[min(20rem,calc(82vh-3rem))] overflow-auto p-1`,children:u.map(e=>{let t=h;return h+=e.rows.length,(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`text-muted-foreground px-2 py-1.5 text-[11px] font-medium`,children:e.title}),e.rows.map((e,n)=>{let r=t+n;return(0,W.jsxs)(`button`,{type:`button`,"aria-label":e.key?`${e.key} ${e.label}`:e.label,className:U(`flex h-8 w-full items-center gap-2 rounded-lg px-2 text-left text-[13px]`,r===f?`bg-primary/20 text-foreground shadow-[inset_0_0_0_1px_var(--ring)]`:`hover:bg-foreground/5`),"aria-current":r===f?`true`:void 0,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>l(r),onClick:()=>i(Qt(e)),children:[e.key?(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-[12px] font-medium tabular-nums`,children:e.key}):null,(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.starred?(0,W.jsx)(le,{className:`size-3.5 shrink-0 fill-current`}):null]},vE(e))})]},e.id)})}):null]})})}function bE({className:e,type:t,...n}){return(0,W.jsx)(`input`,{type:t,"data-slot":`input`,className:U(`border-input focus-visible:border-ring focus-visible:ring-ring/50 h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`placeholder:text-muted-foreground`,e),...n})}function xE({draft:e,catalog:t,busy:n,error:r,onChange:i,onSubmit:a,onClose:o,onDraftWithAi:s}){let c=rn(e,t),l=pn(e,n);function u(t){let r=gn(t,e,n);if(r===`close`){t.preventDefault(),o();return}r===`submit`&&(t.preventDefault(),a())}return(0,W.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center bg-black/40 pt-[18vh]`,onMouseDown:o,children:(0,W.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":e.mode===`edit`?`Edit issue`:`Create issue`,className:`bg-popover text-popover-foreground w-full max-w-lg overflow-hidden rounded-xl border shadow-md`,onMouseDown:e=>e.stopPropagation(),onKeyDown:u,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-3 py-2`,children:[(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:e.mode===`edit`?`Edit ${e.key}`:`Create issue`}),e.mode===`create`&&s?(0,W.jsxs)(K,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 text-[12px]`,onClick:s,children:[(0,W.jsx)(se,{className:`size-3.5`}),`Draft with AI`]}):null]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,W.jsx)(bE,{autoFocus:!0,value:e.title,onChange:t=>i({...e,title:t.target.value}),placeholder:`Issue title`,"aria-label":`Title`,className:`h-9 text-[13px]`}),(0,W.jsx)(`textarea`,{value:e.description,onChange:t=>i({...e,description:t.target.value}),placeholder:`Description`,"aria-label":`Description`,className:`border-input placeholder:text-muted-foreground min-h-24 w-full resize-y rounded-md border bg-transparent px-3 py-2 text-[13px] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`}),e.labels.length?(0,W.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.labels.map(t=>(0,W.jsxs)(`span`,{className:`text-muted-foreground inline-flex h-6 items-center gap-1 rounded-full border px-2 text-[12px]`,children:[t,(0,W.jsx)(`button`,{type:`button`,"aria-label":`Remove ${t}`,className:`hover:text-foreground`,onClick:()=>i(sn(e,t)),children:(0,W.jsx)(fe,{className:`size-3`})})]},t))}):null,c.length?(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground text-[11px] font-medium`,children:`Suggested`}),(0,W.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:c.map(t=>(0,W.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1 rounded-full border px-2 text-[12px]`,children:[t,(0,W.jsx)(`button`,{type:`button`,className:`text-primary text-[11px] font-medium`,onClick:()=>i(an(e,t)),children:`Accept`}),(0,W.jsx)(`button`,{type:`button`,className:`text-muted-foreground text-[11px]`,onClick:()=>i(on(e,t)),children:`Dismiss`})]},t))})]}):null,e.status?(0,W.jsxs)(`p`,{className:`text-muted-foreground text-[12px]`,children:[`Creates in `,e.status]}):null,e.epic?(0,W.jsxs)(`p`,{className:`text-muted-foreground text-[12px]`,children:[`Epic `,e.epic]}):null,r?(0,W.jsx)(`p`,{className:`text-destructive text-[13px] whitespace-pre-wrap`,children:r}):null]}),(0,W.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t px-3 py-2`,children:[(0,W.jsx)(K,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,children:`Cancel`}),(0,W.jsx)(K,{type:`button`,size:`sm`,disabled:!l,className:U(!l&&`opacity-50`),onClick:a,children:e.mode===`edit`?`Save`:`Create issue`})]})]})})}function SE({theme:e,...t}){return(0,W.jsx)(Ke,{theme:e,className:`toaster group`,position:`bottom-right`,style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`},...t})}function CE({className:e,...t}){return(0,W.jsx)(I,{role:`status`,"aria-label":`Loading`,className:U(`size-4 animate-spin`,e),...t})}var wE=Object.defineProperty,TE=(e,t)=>wE(e,`name`,{value:t,configurable:!0}),EE=`Dialog`,[DE,OE]=ta(EE),[kE,AE]=DE(EE),jE=TE(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=C.useRef(null),c=C.useRef(null),[l,u]=fa({prop:r,defaultProp:i??!1,onChange:a,caller:EE}),[d,f]=C.useState(0),[p,m]=C.useState(0);return(0,W.jsx)(kE,{scope:t,triggerRef:s,contentRef:c,contentId:ko(),titleId:ko(),descriptionId:ko(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),ME=`DialogTrigger`,NE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,...r}=e,i=AE(ME,n),a=G(t,i.triggerRef);return(0,W.jsx)(ya.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":$E(i.open),...r,ref:a,onClick:q(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),PE=`DialogPortal`,[FE,IE]=DE(PE,{forceMount:void 0}),LE=TE(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=AE(PE,t);return(0,W.jsx)(FE,{scope:t,forceMount:n,children:C.Children.map(r,e=>(0,W.jsx)(hl,{present:n||a.open,children:(0,W.jsx)(dl,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),RE=`DialogOverlay`,zE=C.forwardRef(TE(function(e,t){let n=IE(RE,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=AE(RE,e.__scopeDialog);return a.modal?(0,W.jsx)(hl,{present:r||a.open,children:(0,W.jsx)(VE,{...i,ref:t})}):null},`DialogOverlay`)),BE=Ai(`DialogOverlay.RemoveScroll`),VE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,...r}=e,i=AE(RE,n),a=G(t,Ya());return(0,W.jsx)(pd,{as:BE,allowPinchZoom:!0,shards:[i.contentRef],children:(0,W.jsx)(ya.div,{"data-state":$E(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),HE=`DialogContent`,UE=C.forwardRef(TE(function(e,t){let n=IE(HE,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=AE(HE,e.__scopeDialog);return(0,W.jsx)(hl,{present:r||a.open,children:a.modal?(0,W.jsx)(WE,{...i,ref:t}):(0,W.jsx)(GE,{...i,ref:t})})},`DialogContent`)),WE=C.forwardRef(TE(function(e,t){let n=AE(HE,e.__scopeDialog),r=C.useRef(null),i=G(t,n.contentRef,r);return C.useEffect(()=>{let e=r.current;if(e)return au(e)},[]),(0,W.jsx)(KE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),GE=C.forwardRef(TE(function(e,t){let n=AE(HE,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return(0,W.jsx)(KE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),KE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=AE(HE,n);return ao(),(0,W.jsx)(W.Fragment,{children:(0,W.jsx)(po,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,W.jsx)(Ja,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":$E(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),qE=`DialogTitle`,JE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,...r}=e,i=AE(qE,n),{setTitleCount:a}=i;return ra(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,W.jsx)(ya.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),YE=`DialogDescription`,XE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,...r}=e,i=AE(YE,n),{setDescriptionCount:a}=i;return ra(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,W.jsx)(ya.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),ZE=`DialogClose`,QE=C.forwardRef(TE(function(e,t){let{__scopeDialog:n,...r}=e,i=AE(ZE,n);return(0,W.jsx)(ya.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function $E(e){return e?`open`:`closed`}TE($E,`getState`);var eD=Object.defineProperty,tD=(e,t)=>eD(e,`name`,{value:t,configurable:!0}),[nD,rD]=ta(`AlertDialog`,[OE]),iD=OE(),aD=tD(e=>{let{__scopeAlertDialog:t,...n}=e,r=iD(t);return(0,W.jsx)(jE,{...r,...n,modal:!0})},`AlertDialog`);C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=iD(n);return(0,W.jsx)(NE,{...i,...r,ref:t})},`AlertDialogTrigger`));var oD=tD(e=>{let{__scopeAlertDialog:t,...n}=e,r=iD(t);return(0,W.jsx)(LE,{...r,...n})},`AlertDialogPortal`),sD=C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=iD(n);return(0,W.jsx)(zE,{...i,...r,ref:t})},`AlertDialogOverlay`)),[cD,lD]=nD(`AlertDialogContent`),uD=C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=iD(n),o=G(t,C.useRef(null)),s=C.useRef(null);return(0,W.jsx)(cD,{scope:n,cancelRef:s,children:(0,W.jsx)(UE,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:q(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),dD=C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=iD(n);return(0,W.jsx)(JE,{...i,...r,ref:t})},`AlertDialogTitle`)),fD=C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=iD(n);return(0,W.jsx)(XE,{...i,...r,ref:t})},`AlertDialogDescription`));C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=iD(n);return(0,W.jsx)(QE,{...i,...r,ref:t})},`AlertDialogAction`));var pD=`AlertDialogCancel`,mD=C.forwardRef(tD(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=lD(pD,n),a=iD(n),o=G(t,i);return(0,W.jsx)(QE,{...a,...r,ref:o})},`AlertDialogCancel`)),hD=aD,gD=oD,_D=sD,vD=uD,yD=mD,bD=dD,xD=fD;function SD(e){return(0,W.jsx)(hD,{"data-slot":`alert-dialog`,...e})}function CD(e){return(0,W.jsx)(gD,{"data-slot":`alert-dialog-portal`,...e})}function wD({className:e,...t}){return(0,W.jsx)(_D,{"data-slot":`alert-dialog-overlay`,className:U(`fixed inset-0 z-50 bg-black/50`,e),...t})}function TD({className:e,...t}){return(0,W.jsxs)(CD,{children:[(0,W.jsx)(wD,{}),(0,W.jsx)(vD,{"data-slot":`alert-dialog-content`,className:U(`bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg sm:max-w-lg`,e),...t})]})}function ED({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:U(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function DD({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:U(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function OD({className:e,...t}){return(0,W.jsx)(bD,{"data-slot":`alert-dialog-title`,className:U(`text-lg font-semibold`,e),...t})}function kD({className:e,...t}){return(0,W.jsx)(xD,{"data-slot":`alert-dialog-description`,className:U(`text-muted-foreground text-sm`,e),...t})}function AD({className:e,...t}){return(0,W.jsx)(yD,{"data-slot":`alert-dialog-cancel`,className:U(Wi({variant:`outline`}),e),...t})}function jD(){var e=[...arguments];return(0,C.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var MD=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ND(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function PD(e){return`nodeType`in e}function FD(e){return e?ND(e)?e:PD(e)?e.ownerDocument?.defaultView??window:window:window}function ID(e){let{Document:t}=FD(e);return e instanceof t}function LD(e){return!ND(e)&&e instanceof FD(e).HTMLElement}function RD(e){return e instanceof FD(e).SVGElement}function zD(e){return e?ND(e)?e.document:PD(e)?ID(e)?e:LD(e)||RD(e)?e.ownerDocument:document:document:document}var BD=MD?C.useLayoutEffect:C.useEffect;function VD(e){let t=(0,C.useRef)(e);return BD(()=>{t.current=e}),(0,C.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function HD(){let e=(0,C.useRef)(null);return[(0,C.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,C.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function UD(e,t){t===void 0&&(t=[e]);let n=(0,C.useRef)(e);return BD(()=>{n.current!==e&&(n.current=e)},t),n}function WD(e,t){let n=(0,C.useRef)();return(0,C.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function GD(e){let t=VD(e),n=(0,C.useRef)(null);return[n,(0,C.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function KD(e){let t=(0,C.useRef)();return(0,C.useEffect)(()=>{t.current=e},[e]),t.current}var qD={};function JD(e,t){return(0,C.useMemo)(()=>{if(t)return t;let n=qD[e]==null?0:qD[e]+1;return qD[e]=n,e+`-`+n},[e,t])}function YD(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var XD=YD(1),ZD=YD(-1);function QD(e){return`clientX`in e&&`clientY`in e}function $D(e){if(!e)return!1;let{KeyboardEvent:t}=FD(e.target);return t&&e instanceof t}function eO(e){if(!e)return!1;let{TouchEvent:t}=FD(e.target);return t&&e instanceof t}function tO(e){if(eO(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return QD(e)?{x:e.clientX,y:e.clientY}:null}var nO=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[nO.Translate.toString(e),nO.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),rO=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function iO(e){return e.matches(rO)?e:e.querySelector(rO)}var aO={display:`none`};function oO(e){let{id:t,value:n}=e;return C.createElement(`div`,{id:t,style:aO},n)}function sO(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return C.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function cO(){let[e,t]=(0,C.useState)(``);return{announce:(0,C.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var lO=(0,C.createContext)(null);function uO(e){let t=(0,C.useContext)(lO);(0,C.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function dO(){let[e]=(0,C.useState)(()=>new Set),t=(0,C.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,C.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var fO={draggable:`
53
- To pick up a draggable item, press the space bar.
54
- While dragging, use the arrow keys to move the item.
55
- Press space again to drop the item in its new position, or press escape to cancel.
56
- `},pO={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function mO(e){let{announcements:t=pO,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=fO}=e,{announce:a,announcement:o}=cO(),s=JD(`DndLiveRegion`),[c,l]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{l(!0)},[]),uO((0,C.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=C.createElement(C.Fragment,null,C.createElement(oO,{id:r,value:i.draggable}),C.createElement(sO,{id:s,announcement:o}));return n?(0,me.createPortal)(u,n):u}var hO;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(hO||={});function gO(){}function _O(e,t){return(0,C.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function vO(){var e=[...arguments];return(0,C.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var yO=Object.freeze({x:0,y:0});function bO(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function xO(e,t){let n=tO(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function SO(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function CO(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function wO(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function TO(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}var EO=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=wO(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=wO(r),o=i.reduce((e,t,r)=>e+bO(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(SO)};function DO(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var OO=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=DO(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(CO)};function kO(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function AO(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:yO}function jO(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var MO=jO(1);function NO(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function PO(e,t,n){let r=NO(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var FO={ignoreTransform:!1};function IO(e,t){t===void 0&&(t=FO);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=FD(e).getComputedStyle(e);t&&(n=PO(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function LO(e){return IO(e,{ignoreTransform:!0})}function RO(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function zO(e,t){return t===void 0&&(t=FD(e).getComputedStyle(e)),t.position===`fixed`}function BO(e,t){t===void 0&&(t=FD(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function VO(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ID(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!LD(i)||RD(i)||n.includes(i))return n;let a=FD(e).getComputedStyle(i);return i!==e&&BO(i,a)&&n.push(i),zO(i,a)?n:r(i.parentNode)}return e?r(e):n}function HO(e){let[t]=VO(e,1);return t??null}function UO(e){return!MD||!e?null:ND(e)?e:PD(e)?ID(e)||e===zD(e).scrollingElement?window:LD(e)?e:null:null}function WO(e){return ND(e)?e.scrollX:e.scrollLeft}function GO(e){return ND(e)?e.scrollY:e.scrollTop}function KO(e){return{x:WO(e),y:GO(e)}}var qO;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(qO||={});function JO(e){return!MD||!e?!1:e===document.scrollingElement}function YO(e){let t={x:0,y:0},n=JO(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var XO={x:.2,y:.2};function ZO(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=XO);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=YO(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=qO.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=qO.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=qO.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=qO.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function QO(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function $O(e){return e.reduce((e,t)=>XD(e,KO(t)),yO)}function ek(e){return e.reduce((e,t)=>e+WO(t),0)}function tk(e){return e.reduce((e,t)=>e+GO(t),0)}function nk(e,t){if(t===void 0&&(t=IO),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);HO(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var rk=[[`x`,[`left`,`right`],ek],[`y`,[`top`,`bottom`],tk]],ik=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=VO(t),r=$O(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of rk)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},ak=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ok(e){let{EventTarget:t}=FD(e);return e instanceof t?e:zD(e)}function sk(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var ck;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(ck||={});function lk(e){e.preventDefault()}function uk(e){e.stopPropagation()}var dk;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(dk||={});var fk={start:[dk.Space,dk.Enter],cancel:[dk.Esc],end:[dk.Space,dk.Enter,dk.Tab]},pk=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dk.Right:return{...n,x:n.x+25};case dk.Left:return{...n,x:n.x-25};case dk.Down:return{...n,y:n.y+25};case dk.Up:return{...n,y:n.y-25}}},mk=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new ak(zD(t)),this.windowListeners=new ak(FD(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ck.Resize,this.handleCancel),this.windowListeners.add(ck.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ck.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&nk(n),t(yO)}handleKeyDown(e){if($D(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=fk,coordinateGetter:a=pk,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:yO;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=ZD(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=YO(n),p=QO(n),m={x:Math.min(i===dk.Right?p.right-p.width/2:p.right,Math.max(i===dk.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===dk.Down?p.bottom-p.height/2:p.bottom,Math.max(i===dk.Down?p.top:p.top+p.height/2,u.y))},h=i===dk.Right&&!s||i===dk.Left&&!c,g=i===dk.Down&&!l||i===dk.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===dk.Right&&e<=d.x||i===dk.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===dk.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===dk.Down&&e<=d.y||i===dk.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===dk.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,XD(ZD(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};mk.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=fk,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function hk(e){return!!(e&&`distance`in e)}function gk(e){return!!(e&&`delay`in e)}var _k=class{constructor(e,t,n){n===void 0&&(n=ok(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=zD(i),this.documentListeners=new ak(this.document),this.listeners=new ak(n),this.windowListeners=new ak(FD(i)),this.initialCoordinates=tO(r)??yO,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ck.Resize,this.handleCancel),this.windowListeners.add(ck.DragStart,lk),this.windowListeners.add(ck.VisibilityChange,this.handleCancel),this.windowListeners.add(ck.ContextMenu,lk),this.documentListeners.add(ck.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gk(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(hk(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ck.Click,uk,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ck.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=tO(e)??yO,s=ZD(n,o);if(!t&&a){if(hk(a)){if(a.tolerance!=null&&sk(s,a.tolerance))return this.handleCancel();if(sk(s,a.distance))return this.handleStart()}if(gk(a)&&sk(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===dk.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},vk={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},yk=class extends _k{constructor(e){let{event:t}=e,n=zD(t.target);super(e,vk,n)}};yk.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var bk={move:{name:`mousemove`},end:{name:`mouseup`}},xk;(function(e){e[e.RightClick=2]=`RightClick`})(xk||={});var Sk=class extends _k{constructor(e){super(e,bk,zD(e.event.target))}};Sk.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==xk.RightClick&&(r?.({event:n}),!0)}}];var Ck={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},wk=class extends _k{constructor(e){super(e,Ck)}static setup(){return window.addEventListener(Ck.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ck.move.name,e)};function e(){}}};wk.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Tk;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Tk||={});var Ek;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Ek||={});function Dk(e){let{acceleration:t,activator:n=Tk.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Ek.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=kk({delta:d,disabled:!a}),[m,h]=HD(),g=(0,C.useRef)({x:0,y:0}),_=(0,C.useRef)({x:0,y:0}),v=(0,C.useMemo)(()=>{switch(n){case Tk.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Tk.DraggableRect:return i}},[n,i,c]),y=(0,C.useRef)(null),b=(0,C.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,C.useMemo)(()=>s===Ek.TreeOrder?[...l].reverse():l,[s,l]);(0,C.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=ZO(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Ok={x:{[qO.Backward]:!1,[qO.Forward]:!1},y:{[qO.Backward]:!1,[qO.Forward]:!1}};function kk(e){let{delta:t,disabled:n}=e,r=KD(t);return WD(e=>{if(n||!r||!e)return Ok;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[qO.Backward]:e.x[qO.Backward]||i.x===-1,[qO.Forward]:e.x[qO.Forward]||i.x===1},y:{[qO.Backward]:e.y[qO.Backward]||i.y===-1,[qO.Forward]:e.y[qO.Forward]||i.y===1}}},[n,t,r])}function Ak(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return WD(e=>t==null?null:r??e??null,[r,t])}function jk(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Mk;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Mk||={});var Nk;(function(e){e.Optimized=`optimized`})(Nk||={});var Pk=new Map;function Fk(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,C.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,C.useRef)(e),d=g(),f=UD(d),p=(0,C.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,C.useRef)(null),h=WD(t=>{if(d&&!n)return Pk;if(!t||t===Pk||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new ik(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,C.useEffect)(()=>{u.current=e},[e]),(0,C.useEffect)(()=>{d||p()},[n,d]),(0,C.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,C.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Mk.Always:return!1;case Mk.BeforeDragging:return n;default:return!n}}}function Ik(e,t){return WD(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Lk(e,t){return Ik(e,t)}function Rk(e){let{callback:t,disabled:n}=e,r=VD(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function zk(e){let{callback:t,disabled:n}=e,r=VD(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Bk(e){return new ik(IO(e),e)}function Vk(e,t,n){t===void 0&&(t=Bk);let[r,i]=(0,C.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Rk({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=zk({callback:a});return BD(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Hk(e){return AO(e,Ik(e))}var Uk=[];function Wk(e){let t=(0,C.useRef)(e),n=WD(n=>e?n&&n!==Uk&&e&&t.current&&e.parentNode===t.current.parentNode?n:VO(e):Uk,[e]);return(0,C.useEffect)(()=>{t.current=e},[e]),n}function Gk(e){let[t,n]=(0,C.useState)(null),r=(0,C.useRef)(e),i=(0,C.useCallback)(e=>{let t=UO(e.target);t&&n(e=>e?(e.set(t,KO(t)),new Map(e)):null)},[]);return(0,C.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=UO(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,KO(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{UO(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,C.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>XD(e,t),yO):$O(e):yO,[e,t])}function Kk(e,t){t===void 0&&(t=[]);let n=(0,C.useRef)(null);return(0,C.useEffect)(()=>{n.current=null},t),(0,C.useEffect)(()=>{let t=e!==yO;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?ZD(e,n.current):yO}function qk(e){(0,C.useEffect)(()=>{if(!MD)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Jk(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Yk(e){return(0,C.useMemo)(()=>e?RO(e):null,[e])}var Xk=[];function Zk(e,t){t===void 0&&(t=IO);let[n]=e,r=Yk(n?FD(n):null),[i,a]=(0,C.useState)(Xk);function o(){a(()=>e.length?e.map(e=>JO(e)?r:new ik(t(e),e)):Xk)}let s=zk({callback:o});return BD(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function Qk(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return LD(t)?t:e}function $k(e){let{measure:t}=e,[n,r]=(0,C.useState)(null),i=zk({callback:(0,C.useCallback)(e=>{for(let{target:n}of e)if(LD(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=GD((0,C.useCallback)(e=>{let n=Qk(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,C.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var eA=[{sensor:yk,options:{}},{sensor:mk,options:{}}],tA={current:{}},nA={draggable:{measure:LO},droppable:{measure:LO,strategy:Mk.WhileDragging,frequency:Nk.Optimized},dragOverlay:{measure:IO}},rA=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},iA={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new rA,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gO},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:nA,measureDroppableContainers:gO,windowRect:null,measuringScheduled:!1},aA={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:gO,draggableNodes:new Map,over:null,measureDroppableContainers:gO},oA=(0,C.createContext)(aA),sA=(0,C.createContext)(iA);function cA(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new rA}}}function lA(e,t){switch(t.type){case hO.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case hO.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case hO.DragEnd:case hO.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case hO.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new rA(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case hO.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new rA(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case hO.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new rA(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function uA(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,C.useContext)(oA),a=KD(r),o=KD(n?.id);return(0,C.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!$D(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=iO(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function dA(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function fA(e){return(0,C.useMemo)(()=>({draggable:{...nA.draggable,...e?.draggable},droppable:{...nA.droppable,...e?.droppable},dragOverlay:{...nA.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function pA(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,C.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;BD(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=AO(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=HO(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var mA=(0,C.createContext)({...yO,scaleX:1,scaleY:1}),hA;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(hA||={});var gA=(0,C.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=eA,collisionDetection:o=OO,measuring:s,modifiers:c,...l}=e,[u,d]=(0,C.useReducer)(lA,void 0,cA),[f,p]=dO(),[m,h]=(0,C.useState)(hA.Uninitialized),g=m===hA.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,C.useRef)({initial:null,translated:null}),w=(0,C.useMemo)(()=>_==null?null:{id:_,data:x?.data??tA,rect:S},[_,x]),T=(0,C.useRef)(null),[E,D]=(0,C.useState)(null),[O,ee]=(0,C.useState)(null),k=UD(l,Object.values(l)),A=JD(`DndDescribedBy`,t),j=(0,C.useMemo)(()=>b.getEnabled(),[b]),M=fA(s),{droppableRects:te,measureDroppableContainers:ne,measuringScheduled:N}=Fk(j,{dragging:g,dependencies:[y.x,y.y],config:M.droppable}),P=Ak(v,_),re=(0,C.useMemo)(()=>O?tO(O):null,[O]),ie=je(),ae=Lk(P,M.draggable.measure);pA({activeNode:_==null?null:v.get(_),config:ie.layoutShiftCompensation,initialRect:ae,measure:M.draggable.measure});let F=Vk(P,M.draggable.measure,ae),I=Vk(P?P.parentElement:null),L=(0,C.useRef)({activatorEvent:null,active:null,activeNode:P,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=b.getNodeFor(L.current.over?.id),R=$k({measure:M.dragOverlay.measure}),z=R.nodeRef.current??P,se=g?R.rect??F:null,ce=!!(R.nodeRef.current&&R.rect),le=Hk(ce?null:F),ue=Yk(z?FD(z):null),de=Wk(g?oe??P:null),fe=Zk(de),pe=dA(c,{transform:{x:y.x-le.x,y:y.y-le.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:F,containerNodeRect:I,draggingNodeRect:se,over:L.current.over,overlayNodeRect:R.rect,scrollableAncestors:de,scrollableAncestorRects:fe,windowRect:ue}),he=re?XD(re,y):null,ge=Gk(de),_e=Kk(ge),ve=Kk(ge,[F]),ye=XD(pe,_e),be=se?MO(se,pe):null,xe=w&&be?o({active:w,collisionRect:be,droppableRects:te,droppableContainers:j,pointerCoordinates:he}):null,Se=TO(xe,`id`),[Ce,we]=(0,C.useState)(null),Te=kO(ce?pe:XD(pe,ve),Ce?.rect??null,F),Ee=(0,C.useRef)(null),De=(0,C.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=v.get(T.current);if(!i)return;let a=e.nativeEvent,o=new n({active:T.current,activeNode:i,event:a,options:r,context:L,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,me.unstable_batchedUpdates)(()=>{r?.(i),h(hA.Initializing),d({type:hO.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Ee.current),ee(a)})},onMove(e){d({type:hO.DragMove,coordinates:e})},onEnd:s(hO.DragEnd),onCancel:s(hO.DragCancel)});Ee.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=L.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===hO.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=hO.DragCancel)}T.current=null,(0,me.unstable_batchedUpdates)(()=>{d({type:e}),h(hA.Uninitialized),we(null),D(null),ee(null),Ee.current=null;let t=e===hO.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Oe=jk(a,(0,C.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,De(n,t))},[v,De]));qk(a),BD(()=>{F&&m===hA.Initializing&&h(hA.Initialized)},[F,m]),(0,C.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=L.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};(0,me.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ye.x,ye.y]),(0,C.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=L.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(Se),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,me.unstable_batchedUpdates)(()=>{we(s),a?.(c),f({type:`onDragOver`,event:c})})},[Se]),BD(()=>{L.current={activatorEvent:O,active:w,activeNode:P,collisionRect:be,collisions:xe,droppableRects:te,draggableNodes:v,draggingNode:z,draggingNodeRect:se,droppableContainers:b,over:Ce,scrollableAncestors:de,scrollAdjustedTranslate:ye},S.current={initial:se,translated:be}},[w,P,xe,be,v,z,se,te,b,Ce,de,ye]),Dk({...ie,delta:y,draggingRect:be,pointerCoordinates:he,scrollableAncestors:de,scrollableAncestorRects:fe});let ke=(0,C.useMemo)(()=>({active:w,activeNode:P,activeNodeRect:F,activatorEvent:O,collisions:xe,containerNodeRect:I,dragOverlay:R,draggableNodes:v,droppableContainers:b,droppableRects:te,over:Ce,measureDroppableContainers:ne,scrollableAncestors:de,scrollableAncestorRects:fe,measuringConfiguration:M,measuringScheduled:N,windowRect:ue}),[w,P,F,O,xe,I,R,v,b,te,Ce,ne,de,fe,M,N,ue]),Ae=(0,C.useMemo)(()=>({activatorEvent:O,activators:Oe,active:w,activeNodeRect:F,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:Ce,measureDroppableContainers:ne}),[O,Oe,w,F,d,A,v,Ce,ne]);return C.createElement(lO.Provider,{value:p},C.createElement(oA.Provider,{value:Ae},C.createElement(sA.Provider,{value:ke},C.createElement(mA.Provider,{value:Te},i)),C.createElement(uA,{disabled:n?.restoreFocus===!1})),C.createElement(mO,{...n,hiddenTextDescribedById:A}));function je(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),_A=(0,C.createContext)(null),vA=`button`,yA=`Draggable`;function bA(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=JD(yA),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,C.useContext)(oA),{role:p=vA,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,C.useContext)(g?mA:_A),[v,y]=GD(),[b,x]=GD(),S=Jk(o,t),w=UD(n);return BD(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,C.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===vA?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function xA(){return(0,C.useContext)(sA)}var SA=`Droppable`,CA={timeout:25};function wA(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=JD(SA),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,C.useContext)(oA),u=(0,C.useRef)({disabled:n}),d=(0,C.useRef)(!1),f=(0,C.useRef)(null),p=(0,C.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...CA,...i},_=UD(h??r),v=zk({callback:(0,C.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=GD((0,C.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=UD(t);return(0,C.useEffect)(()=>{v&&y.current&&(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,C.useEffect)(()=>(s({type:hO.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:hO.UnregisterDroppable,key:a,id:r})),[r]),(0,C.useEffect)(()=>{n!==u.current.disabled&&(s({type:hO.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function TA(e){let{animation:t,children:n}=e,[r,i]=(0,C.useState)(null),[a,o]=(0,C.useState)(null),s=KD(n);return!n&&!r&&s&&i(s),BD(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),C.createElement(C.Fragment,null,n,r?(0,C.cloneElement)(r,{ref:o}):null)}var EA={x:0,y:0,scaleX:1,scaleY:1};function DA(e){let{children:t}=e;return C.createElement(oA.Provider,{value:aA},C.createElement(mA.Provider,{value:EA},t))}var OA={position:`fixed`,touchAction:`none`},kA=e=>$D(e)?`transform 250ms ease`:void 0,AA=(0,C.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=kA}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...OA,width:s.width,height:s.height,top:s.top,left:s.left,transform:nO.Transform.toString(d),transformOrigin:i&&r?xO(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return C.createElement(n,{className:o,style:f,ref:t},a)}),jA=e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}},MA={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:nO.Transform.toString(t)},{transform:nO.Transform.toString(n)}]},sideEffects:jA({styles:{active:{opacity:`0`}}})};function NA(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return VD((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=Qk(a);if(!c)return;let{transform:l}=FD(a).getComputedStyle(a),u=NO(l);if(!u)return;let d=typeof t==`function`?t:PA(t);return nk(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function PA(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...MA,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var FA=0;function IA(e){return(0,C.useMemo)(()=>{if(e!=null)return FA++,FA},[e])}var LA=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=xA(),S=(0,C.useContext)(mA),w=IA(d?.id),T=dA(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),E=Ik(f),D=NA({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),O=E?g.setRef:void 0;return C.createElement(DA,null,C.createElement(TA,{animation:D},d&&w?C.createElement(AA,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))});function RA(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function zA(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function BA(e){return e!==null&&e>=0}function VA(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function HA(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var UA=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=RA(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},WA={scaleX:1,scaleY:1},GA=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...WA}:null}let s=KA(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...WA}:r<t&&r>=a?{x:0,y:o.height+s,...WA}:{x:0,y:0,...WA}};function KA(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var qA=`Sortable`,JA=C.createContext({activeIndex:-1,containerId:qA,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:UA,disabled:{draggable:!1,droppable:!1}});function YA(e){let{children:t,id:n,items:r,strategy:i=UA,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=xA(),d=JD(qA,n),f=s.rect!==null,p=(0,C.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,C.useRef)(p),v=!VA(p,_.current),y=g!==-1&&h===-1||v,b=HA(a);BD(()=>{v&&m&&u(p)},[v,p,m,u]),(0,C.useEffect)(()=>{_.current=p},[p]);let x=(0,C.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:zA(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return C.createElement(JA.Provider,{value:x},t)}var XA=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return RA(n,r,i).indexOf(t)},ZA=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},QA={duration:200,easing:`ease`},$A=`transform`,ej=nO.Transition.toString({property:$A,duration:0,easing:`linear`}),tj={roleDescription:`sortable`};function nj(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,C.useState)(null),s=(0,C.useRef)(n);return BD(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=IO(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,C.useEffect)(()=>{a&&o(null)},[a]),a}function rj(e){let{animateLayoutChanges:t=ZA,attributes:n,disabled:r,data:i,getNewIndex:a=XA,id:o,strategy:s,resizeObserverConfig:c,transition:l=QA}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,C.useContext)(JA),y=ij(r,p),b=u.indexOf(o),x=(0,C.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,C.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=wA({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:O,activatorEvent:ee,activeNodeRect:k,attributes:A,setNodeRef:j,listeners:M,isDragging:te,over:ne,setActivatorNodeRef:N,transform:P}=bA({id:o,data:x,attributes:{...tj,...n},disabled:y.draggable}),re=jD(D,j),ie=!!O,ae=ie&&!m&&BA(f)&&BA(g),F=!_&&te,I=ae?(F&&ae?P:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,L=BA(f)&&BA(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,oe=O?.id,R=(0,C.useRef)({activeId:oe,items:u,newIndex:L,containerId:d}),z=u!==R.current.items,se=t({active:O,containerId:d,isDragging:te,isSorting:ie,id:o,index:b,items:u,newIndex:R.current.newIndex,previousItems:R.current.items,previousContainerId:R.current.containerId,transition:l,wasDragging:R.current.activeId!=null}),ce=nj({disabled:!se,index:b,node:T,rect:w});return(0,C.useEffect)(()=>{ie&&R.current.newIndex!==L&&(R.current.newIndex=L),d!==R.current.containerId&&(R.current.containerId=d),u!==R.current.items&&(R.current.items=u)},[ie,L,d,u]),(0,C.useEffect)(()=>{if(oe===R.current.activeId)return;if(oe!=null&&R.current.activeId==null){R.current.activeId=oe;return}let e=setTimeout(()=>{R.current.activeId=oe},50);return()=>clearTimeout(e)},[oe]),{active:O,activeIndex:f,attributes:A,data:x,rect:w,index:b,newIndex:L,items:u,isOver:E,isSorting:ie,isDragging:te,listeners:M,node:T,overIndex:g,over:ne,setNodeRef:re,setActivatorNodeRef:N,setDroppableNodeRef:D,setDraggableNodeRef:j,transform:ce??I,transition:le()};function le(){if(ce||z&&R.current.newIndex===b)return ej;if(!(F&&!$D(ee)||!l)&&(ie||se))return nO.Transition.toString({...l,property:$A})}}function ij(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function aj(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var oj=[dk.Down,dk.Right,dk.Up,dk.Left],sj=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(oj.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case dk.Down:r.top<a.top&&t.push(n);break;case dk.Up:r.top>a.top&&t.push(n);break;case dk.Left:r.left>a.left&&t.push(n);break;case dk.Right:r.left<a.left&&t.push(n)}});let c=EO({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=TO(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=VO(c).some((e,t)=>s[t]!==e),i=cj(e,t),a=lj(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:ZD(u,l)}}}};function cj(e,t){return!aj(e)||!aj(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function lj(e,t){return!aj(e)||!aj(t)||!cj(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var uj=(0,C.createContext)({columns:{},setColumns:()=>{},getItemId:()=>``,columnIds:[],activeId:null,setActiveId:()=>{},findContainer:()=>void 0,isColumn:()=>!1,modifiers:void 0}),dj=(0,C.createContext)({attributes:{},listeners:void 0,isDragging:!1,disabled:!1}),fj=(0,C.createContext)({listeners:void 0,isDragging:!1,disabled:!1}),pj=(0,C.createContext)(!1),mj=e=>ZA({...e,wasDragging:!0}),hj={sideEffects:jA({styles:{active:{opacity:`0.4`}}})},gj=()=>()=>{},_j=()=>!0,vj=()=>!1,yj={activationConstraint:{distance:10}},bj={activationConstraint:{delay:250,tolerance:5}},xj={coordinateGetter:sj},Sj={droppable:{strategy:Mk.Always}};function Cj({value:e,onValueChange:t,getItemValue:n,children:r,className:i,asChild:a=!1,onMove:o,onValueCommit:s,restoreOnCancel:c=!1,onDragStart:l,onDragEnd:u,onDragCancel:d,accessibility:f,modifiers:p,...m}){let h=e,g=t,[_,v]=(0,C.useState)(null),y=(0,C.useRef)(e),b=(0,C.useRef)(n);(0,C.useLayoutEffect)(()=>{y.current=e,b.current=n});let x=(0,C.useRef)(null),S=vO(_O(Sk,yj),_O(wk,bj),_O(mk,xj)),w=(0,C.useMemo)(()=>Object.keys(h),[h,n]),T=(0,C.useCallback)(e=>w.includes(e),[w]),E=(0,C.useCallback)(e=>T(e)?e:w.find(t=>h[t].some(t=>n(t)===e)),[h,w,n,T]),D=(0,C.useCallback)((e,t,n)=>{if(!s)return;let r=x.current;if(!r)return;let i=t.active.id;if(n===`column`){let n=Object.keys(e).indexOf(i);if(n===-1||n===r.index)return;s(e,{kind:`column`,event:t,activeContainer:i,activeIndex:r.index,overContainer:String(t.over?.id??i),overIndex:n,previousValue:r.value});return}let a=b.current,o,c=-1;for(let t of Object.keys(e)){let n=e[t].findIndex(e=>a(e)===i);if(n!==-1){o=t,c=n;break}}o!==void 0&&(o!==r.container||c!==r.index)&&s(e,{kind:`item`,event:t,activeContainer:r.container??o,activeIndex:r.index,overContainer:o,overIndex:c,previousValue:r.value})},[s]),O=(0,C.useCallback)(e=>{if(v(e.active.id),l?.(e),s||c){let t=y.current,n=e.active.id,r=Object.keys(t);if(r.includes(n))x.current={value:t,container:n,index:r.indexOf(n)};else{let e=b.current,i,a=-1;for(let o of r){let r=t[o].findIndex(t=>e(t)===n);if(r!==-1){i=o,a=r;break}}x.current={value:t,container:i,index:a}}}},[l,s,c]),ee=(0,C.useCallback)(e=>{if(o)return;let{active:t,over:r}=e;if(!r||T(t.id))return;let i=E(t.id),a=E(r.id);if(i&&a){if(i!==a){let e=h[i],o=h[a],s=e.findIndex(e=>n(e)===t.id),c=o.findIndex(e=>n(e)===r.id);T(r.id)&&(c=o.length);let l=[...e],u=[...o],[d]=l.splice(s,1);u.splice(c,0,d),g({...h,[i]:l,[a]:u})}else{let e=i,a=h[e].findIndex(e=>n(e)===t.id),o=h[e].findIndex(e=>n(e)===r.id);a!==o&&g({...h,[e]:RA(h[e],a,o)})}}},[E,n,T,g,h,o]),k=(0,C.useCallback)(e=>{let t=x.current;c&&t&&!o?g(t.value):s&&t&&!o&&D(y.current,e,`item`),x.current=null,v(null),d?.(e)},[c,o,s,g,d,D]),A=(0,C.useCallback)(e=>{let{active:t,over:r}=e;if(v(null),u?.(e),!r){D(y.current,e,`item`),x.current=null;return}if(o&&!T(t.id)){let i=E(t.id),a=E(r.id);i&&a&&o({event:e,activeContainer:i,activeIndex:h[i].findIndex(e=>n(e)===t.id),overContainer:a,overIndex:T(r.id)?h[a].length:h[a].findIndex(e=>n(e)===r.id)}),x.current=null;return}if(T(t.id)&&T(r.id)){let n=w.indexOf(t.id),i=w.indexOf(r.id);if(n!==i){let t=RA(Object.keys(h),n,i),r={};t.forEach(e=>{r[e]=h[e]}),g(r),D(r,e,`column`)}x.current=null;return}if(T(t.id)){x.current=null;return}let i=E(t.id),a=E(r.id);if(i&&a&&i===a){let a=i,o=h[a].findIndex(e=>n(e)===t.id),s=h[a].findIndex(e=>n(e)===r.id);if(o!==s){let t={...h,[a]:RA(h[a],o,s)};g(t),D(t,e,`item`)}else D(h,e,`item`)}else D(h,e,`item`);x.current=null},[w,h,E,n,T,g,o,u,D]),j=(0,C.useMemo)(()=>({columns:h,setColumns:g,getItemId:n,columnIds:w,activeId:_,setActiveId:v,findContainer:E,isColumn:T,modifiers:p}),[h,g,n,w,_,E,T,p]),M=a?ji:`div`;return(0,W.jsx)(uj.Provider,{value:j,children:(0,W.jsx)(gA,{sensors:S,modifiers:p,accessibility:f,measuring:Sj,onDragStart:O,onDragOver:ee,onDragEnd:A,onDragCancel:k,children:(0,W.jsx)(M,{"data-slot":`kanban`,"data-dragging":_!==null,className:U(_!==null&&`cursor-grabbing!`,i),...m,children:r})})})}function wj({className:e,asChild:t=!1,children:n,...r}){let{columnIds:i}=(0,C.useContext)(uj);return(0,W.jsx)(YA,{items:i,strategy:UA,children:(0,W.jsx)(t?ji:`div`,{"data-slot":`kanban-board`,className:U(`grid auto-rows-fr gap-4`,e),...r,children:n})})}function Tj({value:e,className:t,asChild:n=!1,disabled:r,children:i,...a}){let o=(0,C.useContext)(pj),{setNodeRef:s,transform:c,transition:l,attributes:u,listeners:d,isDragging:f}=rj({id:e,disabled:r||o,animateLayoutChanges:mj}),{activeId:p,isColumn:m}=(0,C.useContext)(uj),h=p?m(p):!1,g={transition:l,transform:nO.Transform.toString(c)},_=n?ji:`div`;return o?(0,W.jsx)(dj.Provider,{value:{attributes:{},listeners:void 0,isDragging:!0,disabled:!1},children:(0,W.jsx)(_,{"data-slot":`kanban-column`,"data-value":e,"data-dragging":!0,className:U(`group/kanban-column flex flex-col`,t),...a,children:i})}):(0,W.jsx)(dj.Provider,{value:{attributes:u,listeners:d,isDragging:h,disabled:r},children:(0,W.jsx)(_,{"data-slot":`kanban-column`,"data-value":e,"data-dragging":f,"data-disabled":r,ref:s,style:g,className:U(`group/kanban-column flex flex-col`,f&&`z-50 opacity-50`,r&&`opacity-50`,t),...a,children:i})})}function Ej({className:e,asChild:t=!1,cursor:n=!0,children:r,...i}){let{attributes:a,listeners:o,isDragging:s,disabled:c}=(0,C.useContext)(dj);return(0,W.jsx)(t?ji:`div`,{"data-slot":`kanban-column-handle`,"data-dragging":s,"data-disabled":c,...a,...o,className:U(`opacity-0 transition-opacity group-hover/kanban-column:opacity-100`,n&&(s?`cursor-grabbing!`:`cursor-grab!`),e),...i,children:r})}function Dj({value:e,className:t,asChild:n=!1,disabled:r,children:i,...a}){let o=(0,C.useContext)(pj),{setNodeRef:s,transform:c,transition:l,attributes:u,listeners:d,isDragging:f}=rj({id:e,disabled:r||o,animateLayoutChanges:mj}),{activeId:p,isColumn:m}=(0,C.useContext)(uj),h=p?!m(p):!1,g={transition:l,transform:nO.Transform.toString(c)},_=n?ji:`div`;return o?(0,W.jsx)(fj.Provider,{value:{listeners:void 0,isDragging:!0,disabled:!1},children:(0,W.jsx)(_,{"data-slot":`kanban-item`,"data-value":e,"data-dragging":!0,className:U(t),...a,children:i})}):(0,W.jsx)(fj.Provider,{value:{listeners:d,isDragging:h,disabled:r},children:(0,W.jsx)(_,{"data-slot":`kanban-item`,"data-value":e,"data-dragging":f,"data-disabled":r,ref:s,style:g,...u,className:U(`outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,f&&`z-50 opacity-50`,r&&`opacity-50`,t),...a,children:i})})}function Oj({className:e,asChild:t=!1,cursor:n=!0,children:r,...i}){let{listeners:a,isDragging:o,disabled:s}=(0,C.useContext)(fj);return(0,W.jsx)(t?ji:`div`,{"data-slot":`kanban-item-handle`,"data-dragging":o,"data-disabled":s,...a,className:U(n&&(o?`cursor-grabbing!`:`cursor-grab!`),e),...i,children:r})}function kj({value:e,className:t,asChild:n=!1,children:r,...i}){let{columns:a,getItemId:o}=(0,C.useContext)(uj),s=(0,C.useMemo)(()=>{let t=a[e];if(!t)throw Error(`KanbanColumnContent: column "${e}" was not found in the Kanban value. Available columns: ${Object.keys(a).join(`, `)||`(none)`}.`);return t.map(o)},[a,o,e]);return(0,W.jsx)(YA,{items:s,strategy:GA,children:(0,W.jsx)(n?ji:`div`,{"data-slot":`kanban-column-content`,className:U(`flex flex-col gap-2`,t),...i,children:r})})}function Aj({children:e,className:t,...n}){let{activeId:r,isColumn:i,modifiers:a}=(0,C.useContext)(uj),o=(0,C.useSyncExternalStore)(gj,_j,vj),s=r&&i(r)?`column`:`item`,c=r&&e?typeof e==`function`?e({value:r,variant:s}):e:null;return o?(0,me.createPortal)((0,W.jsx)(LA,{dropAnimation:hj,modifiers:a,className:U(`z-50`,r&&`cursor-grabbing`,t),...n,children:(0,W.jsx)(pj.Provider,{value:!0,children:c})}),document.body):null}function jj({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:U(`group/input-group border-input dark:bg-input/30 relative flex h-9 w-full min-w-0 items-center rounded-md border shadow-xs outline-none`,`has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]`,e),...t})}var Mj=vi(`text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm select-none [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3`,"inline-end":`order-last pr-3`}},defaultVariants:{align:`inline-start`}});function Nj({className:e,align:t=`inline-start`,...n}){return(0,W.jsx)(`div`,{"data-slot":`input-group-addon`,className:U(Mj({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function Pj({className:e,...t}){return(0,W.jsx)(bE,{"data-slot":`input-group-control`,className:U(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}var Fj=`collapsed-columns`,Ij=`collapsed-epic-statuses`,Lj=`collapsed-favourite-folders`,Rj=`board-chrome`,zj=`board-opener`,Bj=`favourite-epics`,Vj=`board-presets`,Hj=`board-sidebar-open`,Uj=`board-column-order`,Wj=[`In Progress`,`Completed`,`Cancelled`,`Canceled`],Gj=[`created`,`targetEnd`,`priority`,`labels`,`assignee`,`dueDate`],Kj={filter:{},sort:`payload`,hide:[],shown:[...Gj]},qj={keys:[],folders:[],projects:void 0};function Jj(e=Fj,t=[]){try{let n=localStorage.getItem(e);if(n===null)return new Set(t);let r=JSON.parse(n);return new Set(Array.isArray(r)?r.filter(e=>typeof e==`string`):t)}catch{return new Set(t)}}function Yj(e,t=Fj){localStorage.setItem(t,JSON.stringify([...e]))}function Xj(e,t){let n=t.toLowerCase();return[...e].some(e=>e.toLowerCase()===n)}function Zj(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e))n!==`priorities`&&n!==`assignees`&&Array.isArray(r)&&(t[n]=r.filter(e=>typeof e==`string`));return Array.isArray(e.priorities)&&!t.priority&&(t.priority=e.priorities.filter(e=>typeof e==`string`)),Array.isArray(e.assignees)&&!t.assignee&&(t.assignee=e.assignees.filter(e=>typeof e==`string`)),t}function Qj(){try{let e=localStorage.getItem(Rj);if(e===null)return Kj;let t=JSON.parse(e),n=Array.isArray(t.shown)?t.shown.filter(e=>Gj.includes(e)):[...Gj];return{filter:Zj(t.filter),sort:t.sort===`priority`||t.sort===`age`||t.sort===`due`||t.sort===`key`?t.sort:`payload`,hide:Array.isArray(t.hide)?t.hide.filter(e=>typeof e==`string`):[],shown:n.length?n:[...Gj]}}catch{return Kj}}function $j(e){localStorage.setItem(Rj,JSON.stringify(e))}function eM(){try{let e=localStorage.getItem(Bj);if(e===null)return qj;let t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>typeof e==`string`))return{keys:t,folders:[]};if(t&&typeof t==`object`){let e=t;return{keys:Array.isArray(e.keys)?e.keys.filter(e=>typeof e==`string`):[],folders:Array.isArray(e.folders)?e.folders.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.name!=`string`||!t.name.trim()?[]:[{name:t.name,keys:Array.isArray(t.keys)?t.keys.filter(e=>typeof e==`string`):[]}]}):[],projects:Array.isArray(e.projects)?e.projects.filter(e=>typeof e==`string`):void 0}}return qj}catch{return qj}}function tM(e){localStorage.setItem(Bj,JSON.stringify(e))}function nM(){try{let e=localStorage.getItem(Vj);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.name!=`string`||!t.name.trim()?[]:[{name:t.name,filter:Zj(t.filter),sort:t.sort===`priority`||t.sort===`age`||t.sort===`due`||t.sort===`key`?t.sort:`payload`,hide:Array.isArray(t.hide)?t.hide.filter(e=>typeof e==`string`):[]}]}):[]}catch{return[]}}function rM(e){localStorage.setItem(Vj,JSON.stringify(e))}function iM(e,t){let n=(e??[]).slice().sort(),r=(t??[]).slice().sort();return n.length===r.length&&n.every((e,t)=>e===r[t])}function aM(e,t){return!t.length||iM(e.projects,t)?e:{keys:[],folders:[],projects:t}}function oM(e,t){return t.length?e.filter(e=>iM(e.projects,t)):e}function sM(){try{let e=localStorage.getItem(zj);return e===`epics`||e===`combined`?e:`stories`}catch{return`stories`}}function cM(e){localStorage.setItem(zj,e)}function lM(){try{let e=localStorage.getItem(Hj);return e===null||e===`true`}catch{return!0}}function uM(e){localStorage.setItem(Hj,e?`true`:`false`)}function dM(){try{let e=localStorage.getItem(Uj);if(e===null)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.filter(e=>typeof e==`string`):[]]))}catch{return{}}}function fM(e){localStorage.setItem(Uj,JSON.stringify(e))}function pM(e,t){let n=[{label:`Key`,value:e.key},{label:`Summary`,value:e.summary}];return t&&n.push({label:`Jira URL`,value:t}),e.priority&&n.push({label:`Priority`,value:e.priority}),e.assignee&&n.push({label:`Assignee`,value:e.assignee}),e.dueDate&&n.push({label:`Due date`,value:e.dueDate}),e.targetEnd&&n.push({label:`Target end`,value:e.targetEnd}),e.labels?.length&&n.push({label:`Labels`,value:e.labels.join(`, `),pills:e.labels}),n}async function mM(e,t){return(await fetch(e,{headers:{"content-type":`application/json`},...t})).json()}function hM(e){return Object.fromEntries(e.map(e=>[e.title,e.cards]))}function gM(){return typeof document>`u`?`light`:document.documentElement.classList.contains(`dark`)?`dark`:`light`}function _M(e){document.documentElement.classList.toggle(`dark`,e===`dark`),localStorage.setItem(`theme`,e)}var vM={done:`green`,complete:`green`,completed:`green`,closed:`green`,resolved:`green`,progress:`yellow`,review:`yellow`,doing:`yellow`,cancelled:`gray`,canceled:`gray`};function yM(e){if(!e)return`var(--primary)`;let t=e.toLowerCase(),n=Object.keys(vM).find(e=>t.includes(e));return`var(--kanban-board-circle-${n?vM[n]:`gray`})`}function bM(e){let t=(e??``).toLowerCase();return t===`high`||t===`highest`||t===`critical`?`text-red-500`:t===`medium`?`text-orange-400`:`text-yellow-500`}function xM(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function SM(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function CM(e){let t=[];for(let n of e){let e=t.at(-1);n.group&&e?.group===n.group?e.facets.push(n):t.push({group:n.group,facets:[n]})}return t}function wM({facet:e,selected:t,onToggle:n}){return(0,W.jsxs)(W.Fragment,{children:[e.label===e.group?null:(0,W.jsx)(kp,{children:e.label}),e.values.map(e=>(0,W.jsx)(jp,{checked:t.includes(e),onCheckedChange:()=>n(e),children:e},e))]})}function TM({facets:e,filter:t,onToggle:n,onClear:r}){let[i,a]=(0,C.useState)({});return(0,W.jsxs)(Op,{align:`end`,className:`w-56 max-h-[min(70vh,28rem)]`,children:[CM(e).map((e,r)=>{let o=e.facets.map(e=>(0,W.jsx)(wM,{facet:e,selected:t[e.key]??[],onToggle:t=>n(e.key,t)},e.key));return(0,W.jsxs)(C.Fragment,{children:[r>0?(0,W.jsx)(Pp,{}):null,e.group?(0,W.jsxs)(dg,{open:i[e.group]!==!1,onOpenChange:t=>a(n=>({...n,[e.group]:t})),className:`flex flex-col`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[11px] font-medium`,onPointerDown:e=>e.preventDefault(),children:[(0,W.jsx)(j,{className:U(`size-3.5 shrink-0 transition-transform`,i[e.group]===!1&&`-rotate-90`)}),e.group]})}),(0,W.jsx)(pg,{className:`flex flex-col`,children:o})]}):o]},e.group??e.facets[0]?.key)}),e.length?(0,W.jsx)(Pp,{}):null,(0,W.jsx)(Ap,{onClick:r,children:`Clear Filter, Sort, and Hide`})]})}function EM({card:e,asHandle:t,isOverlay:n,disabled:r,selected:i,onClick:a,onDoubleClick:o,variant:s=`story`,shown:c}){let l=s===`epic`||(e.type??``).toLowerCase()===`epic`,u=e=>c?.has(e)??!0,d=u(`created`)?Je(e.created):void 0,f=u(`targetEnd`)?Ye(e.targetEnd):void 0,p=f?(()=>{let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e.targetEnd??``),n=t?Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3])):Date.parse(e.targetEnd??``);return!Number.isNaN(n)&&n<Date.now()})():!1,m=f?(()=>{let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e.targetEnd??``),n=t?Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3])):Date.parse(e.targetEnd??``);if(Number.isNaN(n)||n<Date.now())return!1;let r=new Date,i=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate());return Math.round((n-i)/864e5)<=3})():!1,h=u(`priority`)&&e.priority||u(`labels`)&&e.labels?.length||u(`assignee`)&&e.assignee||u(`dueDate`)&&e.dueDate||f,g=(0,W.jsxs)(`div`,{className:U(`bg-card hover:bg-foreground/5 rounded-[9px] border px-3 pt-2 pb-3`,i&&`ring-primary ring-2`,l&&`bg-muted/40 border-l-4 border-l-primary`),children:[(0,W.jsxs)(`div`,{className:`flex h-[22px] items-center justify-between gap-2`,children:[(0,W.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground text-[12px] font-medium tabular-nums`,children:e.key}),(e.type??``).toLowerCase()===`epic`?(0,W.jsx)(`span`,{className:`text-muted-foreground/60 text-[11px] font-normal`,children:`Epic`}):null]}),d?(0,W.jsx)(`span`,{className:`text-muted-foreground text-[11px] tabular-nums`,children:d}):null]}),(0,W.jsx)(`p`,{className:`mt-0.5 truncate text-[13px] leading-[18px]`,children:e.summary}),h?(0,W.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center gap-2 pt-2`,children:[u(`priority`)&&e.priority?(0,W.jsx)(`span`,{className:U(`inline-flex h-6 shrink-0 items-center rounded-full border px-2 text-[12px] font-medium capitalize`,bM(e.priority)),children:e.priority}):null,u(`labels`)?e.labels?.map(e=>(0,W.jsx)(`span`,{className:`text-muted-foreground inline-flex h-6 shrink-0 items-center rounded-full border px-2 text-[12px]`,children:e},e)):null,(0,W.jsx)(`span`,{className:`flex-1`}),f?(0,W.jsx)(`span`,{className:U(`shrink-0 text-[11px] tabular-nums`,p&&`text-destructive font-medium`,m&&!p&&`text-amber-500 dark:text-amber-400`,!p&&!m&&`text-muted-foreground`),title:e.targetEnd,children:f}):null,u(`dueDate`)&&e.dueDate?(0,W.jsx)(`time`,{className:`text-muted-foreground shrink-0 text-[11px] tabular-nums`,children:e.dueDate}):null,u(`assignee`)&&e.assignee?(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-[12px]`,children:e.assignee}):null]}):null]});return(0,W.jsx)(Dj,{value:e.key,disabled:r,children:t&&!n?(0,W.jsx)(Oj,{onClick:a,onDoubleClick:o,children:g}):g})}function DM({title:e,cards:t,isOverlay:n,disabled:r,selected:i,onClick:a,onDoubleClick:o,onCreate:s,onHide:c,shown:l}){let[u,d]=(0,C.useState)(()=>n||!Jj().has(e));function f(t){if(d(t),n)return;let r=Jj();t?r.delete(e):r.add(e),Yj(r)}return(0,W.jsx)(Tj,{value:e,className:`group h-full min-h-0`,children:(0,W.jsx)(dg,{open:u,onOpenChange:f,className:U(`flex h-full min-h-0 flex-col`,!u&&`h-auto`),children:(0,W.jsxs)(`div`,{className:U(`flex flex-col`,u?`h-full min-h-0`:`h-auto`),children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pt-[13px] pb-5`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 text-left`,children:[(0,W.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-full`,style:{backgroundColor:yM(e)}}),(0,W.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-[12px] tabular-nums`,children:t.length}),(0,W.jsx)(j,{className:U(`text-muted-foreground size-3.5 shrink-0 transition-transform`,!u&&`-rotate-90`)})]})}),s?(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":`Create issue in ${e}`,title:`Create issue`,onPointerDown:e=>e.stopPropagation(),onClick:()=>s(e),children:(0,W.jsx)(oe,{})}):null,c?(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":`Hide ${e}`,onClick:c,children:(0,W.jsx)(re,{})}):null,(0,W.jsx)(Ej,{className:`opacity-0 transition-opacity group-hover:opacity-60`,children:(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,tabIndex:-1,type:`button`,children:(0,W.jsx)(ae,{})})})]}),(0,W.jsx)(pg,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,W.jsxs)(kj,{value:e,className:`flex h-full flex-col gap-2 overflow-auto px-2 pb-2`,children:[t.map(e=>(0,W.jsx)(EM,{card:e,asHandle:!n,isOverlay:n,disabled:r,selected:i?.has(e.key),variant:(e.type??``).toLowerCase()===`epic`?`epic`:`story`,shown:l,onClick:t=>a?.(e.key,t),onDoubleClick:t=>o?.(e.key,t)},e.key)),s?(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-foreground/5 hover:text-foreground flex min-h-8 w-full shrink-0 items-center gap-1.5 rounded-md px-2 text-[12px]`,"aria-label":`Create issue in ${e}`,onPointerDown:e=>e.stopPropagation(),onClick:()=>s(e),children:[(0,W.jsx)(oe,{className:`size-3.5`}),`Create`]}):null]})})]})})})}function OM(e,t){return[...new Set(e.map(e=>e.status?.trim()).filter(e=>!!e))].filter(e=>e!==t)}function kM({epic:e,selected:t,count:n,favourited:r,folders:i,moveTo:a,onSelect:o,onToggleFavourite:s,onFile:c,onMove:l,onOpen:u}){let d=a??[],f=!!(c&&r),p=!!u||f||d.length>0;return(0,W.jsxs)(`div`,{className:U(`flex h-14 w-full items-center gap-1 rounded-lg pr-1`,t?`bg-sidebar-accent text-sidebar-accent-foreground`:`hover:bg-foreground/5`),children:[(0,W.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-3 px-3 text-left`,onClick:()=>void o(e.key),children:[(0,W.jsx)(`span`,{className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:yM(e.status)}}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] leading-[18px]`,children:e.summary}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-[11px] font-medium tabular-nums`,children:e.key}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-[11px] tabular-nums`,children:n})]}),p?(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":f?`File ${e.key}`:d.length?`Move ${e.key}`:`Open ${e.key}`,children:(0,W.jsx)(P,{})})}),(0,W.jsxs)(Op,{align:`end`,children:[u?(0,W.jsx)(Ap,{onClick:()=>u(e.key),children:`Open`}):null,f?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ap,{onClick:()=>c?.(e.key,null),children:`Unfiled`}),i?.map(t=>(0,W.jsx)(Ap,{onClick:()=>c?.(e.key,t),children:t},t))]}):null,f&&d.length?(0,W.jsxs)(Fp,{children:[(0,W.jsx)(Ip,{children:`Move`}),(0,W.jsx)(Lp,{children:d.map(t=>(0,W.jsx)(Ap,{onClick:()=>l?.(e.key,t),children:t},t))})]}):null,f?null:d.map(t=>(0,W.jsx)(Ap,{onClick:()=>l?.(e.key,t),children:t},t))]})]}):null,(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":r?`Unfavourite ${e.key}`:`Favourite ${e.key}`,onClick:t=>{t.stopPropagation(),s(e.key)},children:(0,W.jsx)(le,{className:U(r&&`fill-current`)})})]})}function AM({status:e,epics:t,selectedEpic:n,childCount:r,favourites:i,listedEpics:a,onSelect:o,onToggleFavourite:s,onMove:c,onOpen:l}){let[u,d]=(0,C.useState)(()=>!Xj(Jj(Ij,Wj),e));function f(t){d(t);let n=Jj(Ij,Wj);if(t)for(let t of[...n])t.toLowerCase()===e.toLowerCase()&&n.delete(t);else n.add(e);Yj(n,Ij)}return(0,W.jsxs)(dg,{open:u,onOpenChange:f,className:`flex flex-col`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex h-7 items-center gap-1.5 px-3 text-left`,children:[(0,W.jsx)(j,{className:U(`size-3.5 shrink-0 transition-transform`,!u&&`-rotate-90`)}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] font-medium`,children:e}),(0,W.jsx)(`span`,{className:`text-[11px] tabular-nums`,children:t.length})]})}),(0,W.jsx)(pg,{className:`flex flex-col gap-0.5`,children:t.map(e=>(0,W.jsx)(kM,{epic:e,selected:n===e.key,count:r(e.key),favourited:i.keys.includes(e.key),onSelect:o,onToggleFavourite:s,moveTo:OM(a,e.status),onMove:c,onOpen:l},e.key))})]})}function jM({fields:e}){return(0,W.jsx)(`dl`,{className:`flex flex-col gap-3 p-4 text-[13px]`,children:e.map(e=>(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground text-[11px] font-medium`,children:e.label}),(0,W.jsx)(`dd`,{className:`whitespace-pre-wrap`,children:e.label===`Jira URL`?(0,W.jsx)(`a`,{className:`text-foreground font-medium underline-offset-4 hover:underline`,href:e.value,target:`_blank`,rel:`noreferrer`,children:e.value}):e.pills?.length?(0,W.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.pills.map(e=>(0,W.jsx)(`span`,{className:`text-muted-foreground inline-flex h-6 items-center rounded-full border px-2 text-[12px]`,children:e},e))}):e.value})]},e.label))})}function MM(){let[e,t]=(0,C.useState)({}),[n,r]=(0,C.useState)([]),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(null),[u,d]=(0,C.useState)(null),[f,p]=(0,C.useState)(!1),[m,h]=(0,C.useState)(``),[g,_]=(0,C.useState)(null),[v,y]=(0,C.useState)(null),[b,x]=(0,C.useState)(null),[S,w]=(0,C.useState)([]),[T,E]=(0,C.useState)(``),[D,ee]=(0,C.useState)(``),[A,j]=(0,C.useState)(``),[N,P]=(0,C.useState)(``),[re,ae]=(0,C.useState)(!1),[I,oe]=(0,C.useState)(gM),[z,se]=(0,C.useState)(Qj),ce=(0,C.useMemo)(()=>tt(D).projects,[D]),[le,de]=(0,C.useState)(()=>aM(eM(),ce)),[pe,me]=(0,C.useState)(()=>oM(nM(),ce)),[he,ge]=(0,C.useState)(``),[_e,ve]=(0,C.useState)(``),[ye,be]=(0,C.useState)(``),[xe,Se]=(0,C.useState)(``),[Ce,we]=(0,C.useState)(sM),[Te,Ee]=(0,C.useState)(En),[De,Oe]=(0,C.useState)(()=>lM()),ke=Uh(),Ae=(0,C.useRef)(null),[Me,Ne]=(0,C.useState)(null),[Pe,Fe]=(0,C.useState)(!1),[Ie,Le]=(0,C.useState)(!1),[Re,ze]=(0,C.useState)(void 0),Be=(0,C.useRef)(!1),Ve=(0,C.useRef)(null),He=Cn(t,r),[Ue,We]=(0,C.useState)(new Set),Ge={...z,epics:n},Ke=(0,C.useMemo)(()=>new Set(z.shown),[z.shown]),qe=Ce===`epics`,Je=(0,C.useMemo)(()=>Ce===`combined`?Ct(e,n,A,Ge):wt(qe?e:St(e,Me?.children,A),qe?null:g,A,Ge),[e,g,A,z,n,qe,Me,Ce]),Ye=(0,C.useMemo)(()=>Object.values(e).flat(),[e]),$e=i??Ye,et=(0,C.useMemo)(()=>{let e=new Map;for(let t of Me?.columns.flatMap(e=>e.cards)??[])e.set(t.key,t);for(let t of $e)e.has(t.key)||e.set(t.key,t);return[...e.values()]},[Me,$e]),nt=(0,C.useMemo)(()=>At(n,$e,A,z.filter),[n,$e,A,z.filter]),rt=(0,C.useMemo)(()=>jt(nt),[nt]),it=(0,C.useMemo)(()=>Rt(n,le,A,$e,z.filter),[n,le,A,$e,z.filter]),ot=Object.keys(Je),st=`${Ce}:${[...ce].sort().join(`,`)}`,ct=v?[`cards`,`open`]:[`cards`],lt=Lh({id:`shell`,panelIds:[`epics`,`board`],onlySaveAfterUserInteractions:!0}),ut=Lh({id:`board-open`,panelIds:ct,onlySaveAfterUserInteractions:!0}),dt=Lh({id:`columns`,panelIds:ot,onlySaveAfterUserInteractions:!0}),ft=b?wn(b,window.location.origin):null,pt=ht(Ye,n),mt=Object.keys(e),gt=(0,C.useMemo)(()=>tn([...Ye,...n,...et]),[Ye,n,et]),_t=it.unfiled.length>0||it.folders.length>0;function vt(e){se(e),$j(e)}function yt(e){let t=ce.length?{...e,projects:ce}:e;de(t),tM(t)}function bt(e){me(e),rM(e)}function xt(){We(new Set)}function Tt(e,n){Ae.current=e,Ne(e);let i=e.epics??[];r(i);let o=dM()[`${n}:${[...ce].sort().join(`,`)}`];t(Nt(hM(n===`epics`?Xe(i):e.columns),o)),a(e.children?Object.values(e.children).flat():null),e.error&&P(e.error)}function Et(e){xt(),Ae.current=e,Ne(e);let n=e.epics??[];r(n);let i=dM()[st];t(Nt(hM(Ce===`epics`?Xe(n):e.columns),i)),a(e.children?Object.values(e.children).flat():null),_(t=>t&&(e.epics??[]).some(e=>e.key===t)?t:null),e.error&&P(e.error)}async function Dt(){let e=await mM(`/api/board`);Et(e),e.flags&&ee(e.flags)}(0,C.useEffect)(()=>{Dt()},[]),(0,C.useEffect)(()=>{De||ke.current?.collapse()},[]),(0,C.useEffect)(()=>{let e=dM()[st];e?.length&&t(t=>Nt(t,e))},[st]),(0,C.useEffect)(()=>{function e(e){if((e.metaKey||e.ctrlKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()===`k`){if(e.preventDefault(),Be.current){Be.current=!1,Fe(!1),Ve.current?.focus();return}Ve.current=document.activeElement instanceof HTMLElement?document.activeElement:null,Be.current=!0,Fe(!0);return}e.key===`Escape`&&Be.current&&(e.preventDefault(),Be.current=!1,Fe(!1),Ve.current?.focus())}return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]);function Ot(e){ze(e),Le(!0)}async function Mt(e){let t=Ze(e,g,Re??D);t&&(Le(!1),ze(void 0),await Lt(t))}async function Lt(e){ae(!0),P(``),console.info(`[pipe-kan] Refresh`,e);let t=je.loading(`Refreshing…`,{description:e.scope===`selected`?`Listing the focused Epic's works`:`Listing Issues and Epics`});try{let n=await mM(`/api/refresh`,{method:`POST`,body:JSON.stringify(e)});Et(n),e.scope===`all`&&ee(e.flags),n.error?(console.info(`[pipe-kan] Refresh error`,n.error),je.error(`Refresh failed`,{id:t,description:n.error})):(console.info(`[pipe-kan] Refreshed`,n.epics.length,`epics`),je.success(`Refreshed`,{id:t,description:e.scope===`selected`?e.epicKeys?.join(`, `):`${n.epics.length} epics`}))}catch(e){let n=e instanceof Error?e.message:`Refresh failed`;console.info(`[pipe-kan] Refresh failed`,n),P(n),je.error(`Refresh failed`,{id:t,description:n})}finally{ae(!1)}}function Wt(t){for(let[n,r]of Object.entries(e))if(r.some(e=>e.key===t))return n;return``}function Gt(e,i,a){P(``);let o=n.find(t=>t.key===e);if(o){let n=a??o.status??`To Do`;r(n=>{let r=n.findIndex(t=>t.key===e);if(r===-1)return n;let a=[...n];return a[r]={...a[r],status:i},Ce===`epics`&&t(Nt(hM(Xe(a)),dM()[st])),a}),He.move({key:e,target:i,source:n,kind:`epic`});return}let s=a??Wt(e);He.move({key:e,target:i,source:s,kind:`card`})}function Zt(e,t){if(t.ctrlKey||t.metaKey){t.preventDefault(),t.stopPropagation(),We(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return}xt(),sn(e)}function Qt(e,t){t.preventDefault(),t.stopPropagation(),xt(),an(e)}function $t(e){return{...e?{status:e}:{},selectedEpic:g,boardKind:Ce}}function en(e){h(``),p(!1),d(un($t(e)))}function nn(e){l(xn(e)),s(!0)}function rn(e){let{draft:t,seed:n}=dn($t(e));h(``),p(!1),d(t),l(n),s(!0)}async function an(e){let t=Ye.find(t=>t.key===e)??et.find(t=>t.key===e),r=n.find(t=>t.key===e),i=Wt(e)||r?.status;h(``),p(!1),d(fn({key:e,summary:t?.summary??r?.summary??``,labels:t?.labels??r?.labels??[],...i?{status:i}:{},...t?.epic?{epic:t.epic}:{},...t?.type||r?{type:t?.type??`Epic`}:{},...v===e&&S.length?{fields:S}:{}}));try{let t=await mM(`/api/open`,{method:`POST`,body:JSON.stringify({key:e})});if(t.error||!t.fields?.length)return;d(n=>n?.mode===`edit`&&n.key===e?bn(n,t.fields):n)}catch{}}async function on(){if(u&&pn(u,f)){p(!0),h(``);try{if(u.mode===`create`){let e=mn(u);if(!e)return;let t=await mM(`/api/issue/create`,{method:`POST`,body:JSON.stringify(e)});if(!t.ok){let e=t.error??`Create failed`;h(e),je.error(`Create failed`,{description:e});return}t.board&&Et(t.board),je.success(`Created`,{description:t.key??u.title.trim()}),d(null);return}let e=hn(u);if(!e)return;let t=await mM(`/api/issue/edit`,{method:`POST`,body:JSON.stringify(e)});if(!t.ok){let e=t.error??`Edit failed`;h(e),je.error(`Edit failed`,{description:e});return}t.board&&Et(t.board),je.success(`Saved`,{description:u.key});let n=u.key;d(null),v===n&&sn(n)}catch(e){let t=e instanceof Error?e.message:`Save failed`;h(t),je.error(`Save failed`,{description:t})}finally{p(!1)}}}async function sn(e){let t=Ae.current?.columns.flatMap(e=>e.cards)??[],r=Ye.find(t=>t.key===e)??t.find(t=>t.key===e),i=n.find(t=>t.key===e),a=r??(i?{key:i.key,summary:i.summary,priority:i.priority,assignee:i.assignee,dueDate:i.dueDate,labels:i.labels}:void 0),o=`/browse/${e}`;y(e),x(o),E(``),w(a?pM(a,o):[{label:`Jira URL`,value:o}]);let s=await mM(`/api/open`,{method:`POST`,body:JSON.stringify({key:e})});if(x(s.url),s.error){E(s.error),w(a?pM(a,s.url):[{label:`Jira URL`,value:s.url}]);return}w(s.fields)}function cn(e,t){let n=[];for(let[r,i]of Object.entries(t))for(let t of i)Ue.has(t.key)&&n.push({key:t.key,target:e,source:r,kind:`card`});return n}function ln(e,n){if(z.hide.includes(n.overContainer)){t(e=>Ft(n.previousValue,e,g,A,Ge));return}if(n.kind===`column`){let n=Object.keys(e),r=dM();r[st]=n,fM(r),t(e=>Nt(e,n));return}if(n.activeContainer===n.overContainer)return;let r=String(n.event.active.id);if(Ue.has(r)&&Ue.size>1){let e=cn(n.overContainer,n.previousValue);if(e.length===0)return;t(e=>{let t={},r=[];for(let[n,i]of Object.entries(e)){let e=[];for(let t of i)Ue.has(t.key)?r.push(t):e.push(t);t[n]=e}return t[n.overContainer]=[...t[n.overContainer]??[],...r],t}),xt(),He.move(e);return}let i=Object.entries(n.previousValue).find(([,e])=>e.some(e=>e.key===r))?.[0];i&&(xt(),Gt(r,n.overContainer,i))}function gn(){let e=I===`dark`?`light`:`dark`;_M(e),oe(e)}function _n(e){return kt($e,e,A,z.filter,n)}function vn(){cM(`stories`),we(`stories`),_(null),Ae.current&&Tt(Ae.current,`stories`)}function yn(){cM(`epics`),we(`epics`),_(null),Ae.current&&Tt(Ae.current,`epics`)}function Sn(){cM(`combined`),we(`combined`),_(null),Ae.current&&Tt(Ae.current,`combined`)}function Tn(e){Dn(e),Ee(e)}function kn(){On(),Ee(`calendar`)}async function An(e){let r=Ce===`epics`||Ce===`combined`;if(r&&vn(),_(e),!e||!n.some(t=>t.key===e)||(r&&Ae.current?Ae.current.columns.flatMap(e=>e.cards):Ye).filter(t=>t.epic===e&&at(t,A)).length>0)return;ae(!0),P(``);let i=je.loading(`Listing children…`);try{let n=await mM(`/api/epic`,{method:`POST`,body:JSON.stringify({key:e})});t(t=>It(t,hM(n.columns),e)),je.success(`Listed children`,{id:i})}catch(e){let t=e instanceof Error?e.message:`Epic list failed`;P(t),je.error(`Epic list failed`,{id:i,description:t})}finally{ae(!1)}}function jn(){let e=Bt(le,he);if(!e.ok){ve(`Folder names must be unique`);return}ge(``),ve(``),yt(e.state)}function Mn(){let e=Kt(pe,ye,{...z,boardKind:Ce,projects:ce});if(!e.ok){Se(`Preset names must be unique`);return}be(``),Se(``),bt(e.presets)}function Nn(e){let t=qt(pe,e);if(!t.ok||ce.length&&!iM(t.chrome.projects,ce))return;vt({...z,...t.chrome});let n=t.chrome.boardKind??`stories`;n===`combined`?Sn():n===`epics`?yn():Ce!==`stories`&&vn()}function Pn(e){Be.current=!1,Fe(!1),j(``),e.kind===`all-stories`?vn():e.kind===`all-epics`?yn():e.kind===`all-combined`?Sn():e.kind===`refresh`?Ot():e.kind===`agent`?s(!0):e.kind===`create`?en():e.kind===`create-ai`?rn():e.kind===`preset`?Nn(e.name):e.kind===`epic`?(y(null),x(null),w([]),E(``),An(e.key)):e.kind===`card`&&(e.epic?An(e.epic):vn(),sn(e.key))}function Fn(e){let t=Jt(pe,e,{...z,boardKind:Ce,projects:ce});t.ok&&bt(t.presets)}function In(e,t){let n=Yt(pe,e,t);if(!n.ok){Se(`Preset names must be unique`);return}Se(``),bt(n.presets)}return(0,W.jsxs)(`div`,{className:`bg-sidebar flex h-screen`,children:[(0,W.jsxs)(Kh,{id:`shell`,orientation:`horizontal`,className:`min-h-0 flex-1`,defaultLayout:lt.defaultLayout,onLayoutChanged:(e,t)=>{if(lt.onLayoutChanged(e,t),!t.isUserInteraction)return;let n=(e.epics??0)<=0;Oe(!n),uM(!n)},children:[(0,W.jsx)(qh,{id:`epics`,panelRef:ke,defaultSize:`244px`,minSize:`12rem`,maxSize:`40%`,collapsible:!0,collapsedSize:0,className:`min-h-0 overflow-hidden`,children:(0,W.jsxs)(`aside`,{className:`text-sidebar-foreground flex h-full min-h-0 flex-col`,children:[(0,W.jsxs)(`div`,{className:`flex h-10 items-center justify-between px-4`,children:[(0,W.jsx)(`span`,{className:`text-[13px] font-medium`,children:`pipe-kan`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground text-[12px] tabular-nums`,children:nt.length}),(0,W.jsx)(K,{variant:`ghost`,size:`icon-xs`,"aria-label":`Collapse sidebar`,title:`Collapse sidebar`,onClick:()=>{Oe(!1),uM(!1),ke.current?.collapse()},children:(0,W.jsx)(M,{className:`size-4`})})]})]}),(0,W.jsxs)(`nav`,{className:`flex flex-1 flex-col gap-0.5 overflow-auto px-2 pb-2`,children:[(0,W.jsx)(`button`,{type:`button`,className:U(`h-8 rounded-lg px-3 text-left text-[13px]`,Ce===`stories`&&g===null?`bg-sidebar-accent text-sidebar-accent-foreground`:`hover:bg-foreground/5`),onClick:vn,children:`All stories`}),(0,W.jsx)(`button`,{type:`button`,className:U(`h-8 rounded-lg px-3 text-left text-[13px]`,Ce===`epics`?`bg-sidebar-accent text-sidebar-accent-foreground`:`hover:bg-foreground/5`),onClick:yn,children:`All epics`}),(0,W.jsx)(`button`,{type:`button`,className:U(`h-8 rounded-lg px-3 text-left text-[13px]`,Ce===`combined`?`bg-sidebar-accent text-sidebar-accent-foreground`:`hover:bg-foreground/5`),onClick:Sn,children:`Combined`}),(0,W.jsx)(`button`,{type:`button`,className:U(`h-8 rounded-lg px-3 text-left text-[13px]`,Te===`calendar`?`bg-sidebar-accent text-sidebar-accent-foreground`:`hover:bg-foreground/5`),onClick:kn,children:`Calendar`}),_t?(0,W.jsx)(NM,{pane:it,selectedEpic:g,childCount:_n,favourites:le,folderName:he,folderError:_e,onFolderName:ge,onCreateFolder:jn,onRenameFolder:(e,t)=>{let n=Vt(le,e,t);if(!n.ok){ve(`Folder names must be unique`);return}ve(``),yt(n.state)},onDeleteFolder:e=>yt(Ht(le,e)),listedEpics:n,onSelect:An,onToggleFavourite:e=>yt(zt(le,e)),onFile:(e,t)=>yt(Ut(le,e,t)),onMove:Gt,onOpen:sn}):null,(0,W.jsx)(FM,{presets:pe,presetName:ye,presetError:xe,onPresetName:be,onCreatePreset:Mn,onApplyPreset:Nn,onOverwritePreset:Fn,onRenamePreset:In,onDeletePreset:e=>bt(Xt(pe,e))}),(0,W.jsx)(`div`,{className:`text-muted-foreground px-3 pt-3 pb-1 text-[11px] font-medium`,children:`Epics`}),rt.map(e=>e.status?(0,W.jsx)(AM,{status:e.status,epics:e.epics,selectedEpic:g,childCount:_n,favourites:le,listedEpics:n,onSelect:An,onToggleFavourite:e=>yt(zt(le,e)),onMove:Gt,onOpen:sn},e.status):e.epics.map(e=>(0,W.jsx)(kM,{epic:e,selected:g===e.key,count:_n(e.key),favourited:le.keys.includes(e.key),moveTo:OM(n,e.status),onSelect:An,onToggleFavourite:e=>yt(zt(le,e)),onMove:Gt,onOpen:sn},e.key)))]})]})}),(0,W.jsx)(Jh,{className:U(!De&&`hidden`)}),(0,W.jsx)(qh,{id:`board`,defaultSize:`80%`,minSize:`24rem`,className:`min-h-0`,children:(0,W.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-2 pl-0`,children:(0,W.jsxs)(`div`,{className:`bg-background flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border`,children:[(0,W.jsxs)(`header`,{className:`flex min-h-11 shrink-0 flex-wrap items-center gap-2 px-3`,children:[De?null:(0,W.jsx)(K,{variant:`ghost`,size:`icon-xs`,"aria-label":`Expand sidebar`,title:`Expand sidebar`,onClick:()=>{Oe(!0),uM(!0),ke.current?.expand()},children:(0,W.jsx)(te,{className:`size-4`})}),(0,W.jsxs)(`div`,{role:`tablist`,"aria-label":`Board or Calendar`,className:`flex items-center gap-0.5`,children:[(0,W.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":Te===`board`,className:U(`h-7 rounded-md px-2 text-[13px] font-medium`,Te===`board`?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),onClick:()=>Tn(`board`),children:`Board`}),(0,W.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":Te===`calendar`,className:U(`h-7 rounded-md px-2 text-[13px] font-medium`,Te===`calendar`?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),onClick:()=>Tn(`calendar`),children:`Calendar`})]}),(0,W.jsx)(`span`,{className:`bg-primary/10 text-primary inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium`,children:(()=>{let{projects:e}=tt(D);return e.length>0?e.join(`, `):`DEMO`})()}),(0,W.jsxs)(jj,{className:`h-7 max-w-72 min-w-40 flex-1 border-transparent bg-muted shadow-none`,children:[(0,W.jsx)(Nj,{children:(0,W.jsx)(R,{className:`size-3.5`})}),(0,W.jsx)(Pj,{value:A,onChange:e=>j(e.target.value),placeholder:`Search Epics and Cards`,"aria-label":`Search`,className:`h-7 text-[13px]`}),A?(0,W.jsx)(Nj,{align:`inline-end`,children:(0,W.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,onClick:()=>j(``),children:(0,W.jsx)(fe,{className:`size-3.5`})})}):null]}),(0,W.jsx)(`input`,{className:`placeholder:text-muted-foreground h-7 min-w-40 flex-1 rounded-md bg-muted px-2.5 text-[13px] outline-none`,value:D,onChange:e=>ee(e.target.value),placeholder:`Scope flags`,spellCheck:!1,"aria-label":`Scope flags`}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,children:[(0,W.jsx)(F,{}),`Filter`]})}),(0,W.jsx)(TM,{facets:pt,filter:z.filter,onToggle:(e,t)=>vt({...z,filter:{...z.filter,[e]:xM(z.filter[e]??[],t)}}),onClear:()=>vt(Kj)})]}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,children:[(0,W.jsx)(O,{}),`Sort`]})}),(0,W.jsx)(Op,{align:`end`,children:(0,W.jsxs)(Mp,{value:z.sort,onValueChange:e=>vt({...z,sort:e}),children:[(0,W.jsx)(Np,{value:`payload`,children:`Payload order`}),(0,W.jsx)(Np,{value:`priority`,children:`Priority`}),(0,W.jsx)(Np,{value:`age`,children:`Age`}),(0,W.jsx)(Np,{value:`due`,children:`Due date`}),(0,W.jsx)(Np,{value:`key`,children:`Key`})]})})]}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,children:[(0,W.jsx)(ne,{}),`Columns`]})}),(0,W.jsx)(Op,{align:`end`,children:mt.map(e=>(0,W.jsx)(jp,{checked:!z.hide.includes(e),onCheckedChange:t=>vt({...z,hide:t?z.hide.filter(t=>t!==e):[...z.hide,e]}),children:e},e))})]}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,children:[(0,W.jsx)(ie,{}),`Display`]})}),(0,W.jsxs)(Op,{align:`end`,className:`w-44`,children:[(0,W.jsx)(kp,{children:`Card properties`}),Gj.map(e=>(0,W.jsxs)(jp,{checked:z.shown.includes(e),onCheckedChange:()=>vt({...z,shown:SM(z.shown,e)}),children:[e===`created`&&`Age`,e===`targetEnd`&&`Target end`,e===`priority`&&`Priority`,e===`labels`&&`Labels`,e===`assignee`&&`Assignee`,e===`dueDate`&&`Due date`]},e))]})]}),(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,onClick:()=>Ot(),disabled:re,"aria-busy":re,children:[re?(0,W.jsx)(CE,{className:`size-3.5`}):null,`Refresh`]}),(0,W.jsxs)(K,{variant:`ghost`,size:`sm`,onClick:()=>s(e=>!e),"aria-pressed":o,children:[(0,W.jsx)(k,{className:`mr-1 size-4`}),`Agent`]}),(0,W.jsx)(K,{variant:`ghost`,size:`icon-xs`,onClick:gn,"aria-label":I===`dark`?`Switch to light mode`:`Switch to dark mode`,children:I===`dark`?(0,W.jsx)(ue,{}):(0,W.jsx)(L,{})}),N?(0,W.jsx)(`p`,{className:`text-destructive w-full text-[13px] whitespace-pre-wrap`,children:N}):null]}),(0,W.jsxs)(Kh,{id:`board-open`,orientation:`horizontal`,className:`min-h-0 flex-1`,defaultLayout:ut.defaultLayout,onLayoutChanged:ut.onLayoutChanged,children:[(0,W.jsx)(qh,{id:`cards`,defaultSize:v?`70%`:`100%`,minSize:`16rem`,className:`min-h-0`,children:(0,W.jsx)(`main`,{className:U(`h-full min-h-0 min-w-0 px-2 pb-2`,Te===`calendar`?`overflow-hidden`:`overflow-auto`),children:Te===`calendar`?(0,W.jsx)(_E,{cards:Object.values(Je).flat(),onOpen:e=>void sn(e)}):(0,W.jsxs)(Cj,{className:`h-full min-h-0`,value:Je,onValueChange:e=>t(t=>Pt(e,t,g,A,Ge)),getItemValue:e=>e.key,restoreOnCancel:!0,onValueCommit:ln,children:[(0,W.jsx)(wj,{className:`grid h-full min-h-0 grid-cols-1 auto-rows-fr gap-3`,children:ot.length?(0,W.jsx)(Kh,{id:`columns`,orientation:`horizontal`,className:`min-h-0`,defaultLayout:dt.defaultLayout,onLayoutChanged:dt.onLayoutChanged,children:Object.entries(Je).map(([e,t],n,r)=>(0,W.jsxs)(C.Fragment,{children:[n>0?(0,W.jsx)(Jh,{}):null,(0,W.jsx)(qh,{id:e,defaultSize:`${100/Math.max(r.length,1)}%`,minSize:`16rem`,className:`min-h-0 min-w-0`,children:(0,W.jsx)(DM,{title:e,cards:t,disabled:re,selected:Ue,shown:Ke,onClick:Zt,onDoubleClick:Qt,onCreate:en,onHide:()=>vt({...z,hide:[...z.hide,e]})})})]},e))}):null}),(0,W.jsx)(Aj,{children:({value:e,variant:t})=>{if(t===`column`)return(0,W.jsx)(DM,{title:String(e),cards:Je[String(e)]??[],isOverlay:!0,shown:Ke});let n=Object.values(Je).flat().find(t=>t.key===e);if(!n)return null;let r=Ue.has(n.key)?Ue.size:1;return(0,W.jsxs)(`div`,{className:`relative`,children:[(0,W.jsx)(EM,{card:n,isOverlay:!0,variant:(n.type??``).toLowerCase()===`epic`?`epic`:`story`,shown:Ke}),r>1?(0,W.jsx)(`span`,{className:`absolute -top-2 -right-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[11px] font-medium text-primary-foreground`,children:r}):null]})}})]})})}),v?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jh,{}),(0,W.jsx)(qh,{id:`open`,defaultSize:`30%`,minSize:`16rem`,className:`min-h-0`,children:(0,W.jsxs)(`aside`,{className:`flex h-full min-h-0 flex-col border-l`,children:[(0,W.jsxs)(`div`,{className:`flex h-10 items-center gap-2 px-3`,children:[(0,W.jsx)(`a`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium underline-offset-4 hover:underline`,href:b??void 0,target:`_blank`,rel:`noreferrer`,children:v}),(0,W.jsx)(K,{variant:`ghost`,size:`sm`,className:`h-7 text-[12px]`,type:`button`,onClick:()=>{v&&an(v)},children:`Edit`}),(0,W.jsx)(K,{variant:`ghost`,size:`icon-xs`,"aria-label":`Close issue`,onClick:()=>{y(null),x(null),w([]),E(``)},children:(0,W.jsx)(fe,{})})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[T?(0,W.jsx)(`p`,{className:`text-destructive px-4 pt-3 text-[13px] whitespace-pre-wrap`,children:T}):null,(0,W.jsx)(jM,{fields:S}),ft?(0,W.jsx)(`iframe`,{title:v??`Issue`,src:ft,className:`min-h-64 w-full border-0 bg-background`}):b?(0,W.jsx)(`div`,{className:`text-muted-foreground px-4 pb-6 text-[13px]`,children:`Jira refuses to embed this page.`}):null]})]})})]}):null]})]})})}),o?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jh,{}),(0,W.jsx)(_g,{open:o,onClose:()=>s(!1),selectedIssueKey:v??g??void 0,boardView:{scope:`view`,kind:Ce,selectedEpic:qe?null:g,search:A,filter:z.filter,sort:z.sort,hide:z.hide,columns:Object.entries(Je).map(([e,t])=>({title:e,cards:t.map(e=>({key:e.key,summary:e.summary,epic:e.epic,assignee:e.assignee,priority:e.priority,labels:e.labels,dueDate:e.dueDate,targetEnd:e.targetEnd}))})),epics:nt.map(e=>({key:e.key,summary:e.summary,status:e.status}))},pipeView:Me?{scope:`pipe`,kind:`stories`,selectedEpic:null,search:``,filter:{},sort:`payload`,hide:[],columns:Me.columns.map(e=>({title:e.title,cards:e.cards.map(e=>({key:e.key,summary:e.summary,epic:e.epic,assignee:e.assignee,priority:e.priority,labels:e.labels,dueDate:e.dueDate,targetEnd:e.targetEnd}))})),epics:Me.epics.map(e=>({key:e.key,summary:e.summary,status:e.status}))}:void 0,onApplyPreset:Nn,onSetFilter:e=>vt({...z,filter:e}),onConfirmRefresh:Ot,onBoardMutated:()=>{Dt()},seedPrompt:c,onSeedConsumed:()=>l(null)})]}):null]}),(0,W.jsx)(SD,{open:Ie,onOpenChange:e=>{Le(e),e||ze(void 0)},children:(0,W.jsxs)(TD,{children:[(0,W.jsxs)(ED,{children:[(0,W.jsx)(OD,{children:`Refresh`}),(0,W.jsx)(kD,{children:g?`Refresh all Epics, or only the focused Epic ${g}.`:Qe})]}),(0,W.jsxs)(DD,{children:[(0,W.jsx)(AD,{disabled:re,children:`Cancel`}),(0,W.jsx)(K,{type:`button`,variant:`outline`,disabled:re||!g,onClick:()=>void Mt(`selected`),children:g?`Refresh selected (${g})`:`Refresh selected`}),(0,W.jsx)(K,{type:`button`,disabled:re,onClick:()=>void Mt(`all`),children:`Refresh all Epics`})]})]})}),(0,W.jsx)(SE,{theme:I}),u?(0,W.jsx)(xE,{draft:u,catalog:gt,busy:f,error:m,onChange:d,onSubmit:()=>void on(),onClose:()=>{f||(d(null),h(``))},onDraftWithAi:u.mode===`create`?()=>nn(u):void 0}):null,Pe?(0,W.jsx)(yE,{presets:pe.map(e=>e.name),epics:Me?.epics??n,cards:et,favouriteKeys:le.keys,onPick:Pn,onClose:()=>{Be.current=!1,Fe(!1),Ve.current?.focus()}}):null]})}function NM({pane:e,selectedEpic:t,childCount:n,favourites:r,folderName:i,folderError:a,onFolderName:o,onCreateFolder:s,onRenameFolder:c,onDeleteFolder:l,listedEpics:u,onSelect:d,onToggleFavourite:f,onFile:p,onMove:m,onOpen:h}){let[g,_]=(0,C.useState)(()=>!Xj(Jj(Ij,Wj),`Favourites`));function v(e){_(e);let t=Jj(Ij,Wj);if(e)for(let e of[...t])e.toLowerCase()===`favourites`&&t.delete(e);else t.add(`Favourites`);Yj(t,Ij)}let y=r.folders.map(e=>e.name);return(0,W.jsxs)(dg,{open:g,onOpenChange:v,className:`flex flex-col`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1 px-1`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex h-7 min-w-0 flex-1 items-center gap-1.5 px-2 text-left`,children:[(0,W.jsx)(j,{className:U(`size-3.5 shrink-0 transition-transform`,!g&&`-rotate-90`)}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] font-medium`,children:`Favourites`})]})}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":`Favourite Folders`,children:(0,W.jsx)(P,{})})}),(0,W.jsxs)(Op,{align:`start`,className:`w-56`,children:[(0,W.jsx)(kp,{children:`Create Folder`}),(0,W.jsxs)(`div`,{className:`px-2 pb-2`,children:[(0,W.jsx)(`input`,{className:`border-input h-7 w-full rounded-md border bg-transparent px-2 text-[13px] outline-none`,value:i,onChange:e=>o(e.target.value),placeholder:`Name`,"aria-label":`Folder name`,onKeyDown:e=>{e.key===`Enter`&&s()}}),a?(0,W.jsx)(`p`,{className:`text-destructive pt-1 text-[11px]`,children:a}):null]}),(0,W.jsx)(Ap,{onClick:s,children:`Create`}),y.length?(0,W.jsx)(Pp,{}):null,y.map(e=>(0,W.jsxs)(Ap,{onClick:()=>{let t=window.prompt(`Rename Folder`,e);t!=null&&c(e,t)},children:[`Rename `,e]},`rename-${e}`)),y.map(e=>(0,W.jsxs)(Ap,{onClick:()=>l(e),children:[`Delete `,e]},`delete-${e}`))]})]})]}),(0,W.jsxs)(pg,{className:`flex flex-col gap-0.5`,children:[e.unfiled.map(e=>(0,W.jsx)(kM,{epic:e,selected:t===e.key,count:n(e.key),favourited:!0,folders:y,onSelect:d,onToggleFavourite:f,onFile:p,moveTo:OM(u,e.status),onMove:m,onOpen:h},e.key)),e.folders.map(e=>(0,W.jsx)(PM,{folder:e,selectedEpic:t,childCount:n,folderNames:y,listedEpics:u,onSelect:d,onToggleFavourite:f,onFile:p,onMove:m,onOpen:h},e.name))]})]})}function PM({folder:e,selectedEpic:t,childCount:n,folderNames:r,listedEpics:i,onSelect:a,onToggleFavourite:o,onFile:s,onMove:c,onOpen:l}){let[u,d]=(0,C.useState)(()=>!Xj(Jj(Lj),e.name));function f(t){d(t);let n=Jj(Lj);if(t)for(let t of[...n])t.toLowerCase()===e.name.toLowerCase()&&n.delete(t);else n.add(e.name);Yj(n,Lj)}return(0,W.jsxs)(dg,{open:u,onOpenChange:f,className:`flex flex-col`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex h-7 items-center gap-1.5 px-3 text-left`,children:[(0,W.jsx)(j,{className:U(`size-3.5 shrink-0 transition-transform`,!u&&`-rotate-90`)}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] font-medium`,children:e.name}),(0,W.jsx)(`span`,{className:`text-[11px] tabular-nums`,children:e.epics.length})]})}),(0,W.jsx)(pg,{className:`flex flex-col gap-0.5`,children:e.epics.map(e=>(0,W.jsx)(kM,{epic:e,selected:t===e.key,count:n(e.key),favourited:!0,folders:r,onSelect:a,onToggleFavourite:o,onFile:s,moveTo:OM(i,e.status),onMove:c,onOpen:l},e.key))})]})}function FM({presets:e,presetName:t,presetError:n,onPresetName:r,onCreatePreset:i,onApplyPreset:a,onOverwritePreset:o,onRenamePreset:s,onDeletePreset:c}){let[l,u]=(0,C.useState)(()=>!Xj(Jj(Ij,Wj),`Presets`));function d(e){u(e);let t=Jj(Ij,Wj);if(e)for(let e of[...t])e.toLowerCase()===`presets`&&t.delete(e);else t.add(`Presets`);Yj(t,Ij)}return(0,W.jsxs)(dg,{open:l,onOpenChange:d,className:`flex flex-col`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1 px-1`,children:[(0,W.jsx)(fg,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex h-7 min-w-0 flex-1 items-center gap-1.5 px-2 text-left`,children:[(0,W.jsx)(j,{className:U(`size-3.5 shrink-0 transition-transform`,!l&&`-rotate-90`)}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12px] font-medium`,children:`Presets`})]})}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":`Presets`,children:(0,W.jsx)(P,{})})}),(0,W.jsxs)(Op,{align:`start`,className:`w-56`,children:[(0,W.jsx)(kp,{children:`Save Preset`}),(0,W.jsxs)(`div`,{className:`px-2 pb-2`,children:[(0,W.jsx)(`input`,{className:`border-input h-7 w-full rounded-md border bg-transparent px-2 text-[13px] outline-none`,value:t,onChange:e=>r(e.target.value),placeholder:`Name`,"aria-label":`Preset name`,onKeyDown:e=>{e.key===`Enter`&&i()}}),n?(0,W.jsx)(`p`,{className:`text-destructive pt-1 text-[11px]`,children:n}):null]}),(0,W.jsx)(Ap,{onClick:i,children:`Save`})]})]})]}),(0,W.jsx)(pg,{className:`flex flex-col gap-0.5`,children:e.map(e=>(0,W.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,W.jsx)(`button`,{type:`button`,className:`hover:bg-foreground/5 flex h-7 min-w-0 flex-1 items-center rounded-lg px-[7px] text-left text-[13px] font-medium`,onClick:()=>a(e.name),children:(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name})}),(0,W.jsxs)(Ep,{children:[(0,W.jsx)(Dp,{asChild:!0,children:(0,W.jsx)(K,{size:`icon-xs`,variant:`ghost`,type:`button`,"aria-label":`Preset ${e.name}`,children:(0,W.jsx)(P,{})})}),(0,W.jsxs)(Op,{align:`end`,children:[(0,W.jsx)(Ap,{onClick:()=>o(e.name),children:`Save over`}),(0,W.jsx)(Ap,{onClick:()=>{let t=window.prompt(`Rename Preset`,e.name);t!=null&&s(e.name,t)},children:`Rename`}),(0,W.jsx)(Ap,{onClick:()=>c(e.name),children:`Delete`})]})]})]},e.name))})]})}(0,pe.createRoot)(document.getElementById(`root`)).render((0,W.jsx)(C.StrictMode,{children:(0,W.jsx)(MM,{})}));