@hasna/todos 0.15.41 → 0.15.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/index-BNQ4gJua.js +342 -0
- package/dashboard/dist/assets/index-DjzvHUWt.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/components/Dashboard.d.ts +1 -1
- package/dist/cli/components/Dashboard.d.ts.map +1 -1
- package/dist/cli/components/Header.d.ts +1 -1
- package/dist/cli/components/Header.d.ts.map +1 -1
- package/dist/cli/components/ProjectList.d.ts +1 -1
- package/dist/cli/components/ProjectList.d.ts.map +1 -1
- package/dist/cli/components/SearchView.d.ts +1 -1
- package/dist/cli/components/SearchView.d.ts.map +1 -1
- package/dist/cli/components/TaskDetail.d.ts +1 -1
- package/dist/cli/components/TaskDetail.d.ts.map +1 -1
- package/dist/cli/components/TaskForm.d.ts +1 -1
- package/dist/cli/components/TaskForm.d.ts.map +1 -1
- package/dist/cli/components/TaskList.d.ts +1 -1
- package/dist/cli/components/TaskList.d.ts.map +1 -1
- package/dist/cli/index.js +521 -120
- package/dist/contracts.js +346 -83
- package/dist/db/task-graph.d.ts.map +1 -1
- package/dist/db/task-lifecycle.d.ts.map +1 -1
- package/dist/db/webhooks.d.ts.map +1 -1
- package/dist/index.js +499 -113
- package/dist/lib/instant-compare.d.ts +35 -0
- package/dist/lib/instant-compare.d.ts.map +1 -0
- package/dist/mcp/index.js +520 -119
- package/dist/mcp.js +5 -4
- package/dist/pr-groups/postgres.d.ts.map +1 -1
- package/dist/project-registration/postgres.d.ts.map +1 -1
- package/dist/project-registration.js +466 -100
- package/dist/registry.js +346 -83
- package/dist/release-provenance.json +5 -5
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.js +1179 -309
- package/dist/storage/local-sqlite.d.ts.map +1 -1
- package/dist/storage/postgres-adapter.d.ts.map +1 -1
- package/dist/storage.js +447 -89
- package/dist/task-manifest/postgres.d.ts.map +1 -1
- package/dist/task-manifest.js +15 -6
- package/dist/task-subtree-transfer/postgres.d.ts.map +1 -1
- package/dist/task-subtree-transfer.js +15 -6
- package/package.json +5 -4
- package/dashboard/dist/assets/index-DJm6m6Yy.css +0 -1
- package/dashboard/dist/assets/index-DVotjwab.js +0 -346
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
var Ux=e=>{throw TypeError(e)};var Ix=(e,a,l)=>a.has(e)||Ux("Cannot "+l);var Bt=(e,a,l)=>(Ix(e,a,"read from private field"),l?l.call(e):a.get(e)),$x=(e,a,l)=>a.has(e)?Ux("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,l),Vf=(e,a,l,r)=>(Ix(e,a,"write to private field"),r?r.call(e,l):a.set(e,l),l);function LC(e,a){for(var l=0;l<a.length;l++){const r=a[l];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const u=Object.getOwnPropertyDescriptor(r,i);u&&Object.defineProperty(e,i,u.get?u:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const u of i)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function l(i){const u={};return i.integrity&&(u.integrity=i.integrity),i.referrerPolicy&&(u.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?u.credentials="include":i.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(i){if(i.ep)return;i.ep=!0;const u=l(i);fetch(i.href,u)}})();function VC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bf={exports:{}},Ns={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Gx;function BC(){if(Gx)return Ns;Gx=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(r,i,u){var f=null;if(u!==void 0&&(f=""+u),i.key!==void 0&&(f=""+i.key),"key"in i){u={};for(var m in i)m!=="key"&&(u[m]=i[m])}else u=i;return i=u.ref,{$$typeof:e,type:r,key:f,ref:i!==void 0?i:null,props:u}}return Ns.Fragment=a,Ns.jsx=l,Ns.jsxs=l,Ns}var Yx;function UC(){return Yx||(Yx=1,Bf.exports=BC()),Bf.exports}var c=UC(),Uf={exports:{}},Re={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var qx;function IC(){if(qx)return Re;qx=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=w&&R[w]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,N={};function E(R,V,X){this.props=R,this.context=V,this.refs=N,this.updater=X||C}E.prototype.isReactComponent={},E.prototype.setState=function(R,V){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,V,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function O(){}O.prototype=E.prototype;function D(R,V,X){this.props=R,this.context=V,this.refs=N,this.updater=X||C}var k=D.prototype=new O;k.constructor=D,j(k,E.prototype),k.isPureReactComponent=!0;var z=Array.isArray;function _(){}var H={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function W(R,V,X){var le=X.ref;return{$$typeof:e,type:R,key:V,ref:le!==void 0?le:null,props:X}}function Y(R,V){return W(R.type,V,R.props)}function K(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ee(R){var V={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(X){return V[X]})}var te=/\/+/g;function se(R,V){return typeof R=="object"&&R!==null&&R.key!=null?ee(""+R.key):V.toString(36)}function ce(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(_,_):(R.status="pending",R.then(function(V){R.status==="pending"&&(R.status="fulfilled",R.value=V)},function(V){R.status==="pending"&&(R.status="rejected",R.reason=V)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function A(R,V,X,le,re){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var ve=!1;if(R===null)ve=!0;else switch(fe){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(R.$$typeof){case e:case a:ve=!0;break;case x:return ve=R._init,A(ve(R._payload),V,X,le,re)}}if(ve)return re=re(R),ve=le===""?"."+se(R,0):le,z(re)?(X="",ve!=null&&(X=ve.replace(te,"$&/")+"/"),A(re,V,X,"",function(Se){return Se})):re!=null&&(K(re)&&(re=Y(re,X+(re.key==null||R&&R.key===re.key?"":(""+re.key).replace(te,"$&/")+"/")+ve)),V.push(re)),1;ve=0;var ue=le===""?".":le+":";if(z(R))for(var ie=0;ie<R.length;ie++)le=R[ie],fe=ue+se(le,ie),ve+=A(le,V,X,fe,re);else if(ie=b(R),typeof ie=="function")for(R=ie.call(R),ie=0;!(le=R.next()).done;)le=le.value,fe=ue+se(le,ie++),ve+=A(le,V,X,fe,re);else if(fe==="object"){if(typeof R.then=="function")return A(ce(R),V,X,le,re);throw V=String(R),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ve}function U(R,V,X){if(R==null)return R;var le=[],re=0;return A(R,le,"","",function(fe){return V.call(X,fe,re++)}),le}function ae(R){if(R._status===-1){var V=R._result;V=V(),V.then(function(X){(R._status===0||R._status===-1)&&(R._status=1,R._result=X)},function(X){(R._status===0||R._status===-1)&&(R._status=2,R._result=X)}),R._status===-1&&(R._status=0,R._result=V)}if(R._status===1)return R._result.default;throw R._result}var Z=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},T={map:U,forEach:function(R,V,X){U(R,function(){V.apply(this,arguments)},X)},count:function(R){var V=0;return U(R,function(){V++}),V},toArray:function(R){return U(R,function(V){return V})||[]},only:function(R){if(!K(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Re.Activity=y,Re.Children=T,Re.Component=E,Re.Fragment=l,Re.Profiler=i,Re.PureComponent=D,Re.StrictMode=r,Re.Suspense=g,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Re.__COMPILER_RUNTIME={__proto__:null,c:function(R){return H.H.useMemoCache(R)}},Re.cache=function(R){return function(){return R.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(R,V,X){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var le=j({},R.props),re=R.key;if(V!=null)for(fe in V.key!==void 0&&(re=""+V.key),V)!L.call(V,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&V.ref===void 0||(le[fe]=V[fe]);var fe=arguments.length-2;if(fe===1)le.children=X;else if(1<fe){for(var ve=Array(fe),ue=0;ue<fe;ue++)ve[ue]=arguments[ue+2];le.children=ve}return W(R.type,re,le)},Re.createContext=function(R){return R={$$typeof:f,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},Re.createElement=function(R,V,X){var le,re={},fe=null;if(V!=null)for(le in V.key!==void 0&&(fe=""+V.key),V)L.call(V,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(re[le]=V[le]);var ve=arguments.length-2;if(ve===1)re.children=X;else if(1<ve){for(var ue=Array(ve),ie=0;ie<ve;ie++)ue[ie]=arguments[ie+2];re.children=ue}if(R&&R.defaultProps)for(le in ve=R.defaultProps,ve)re[le]===void 0&&(re[le]=ve[le]);return W(R,fe,re)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(R){return{$$typeof:m,render:R}},Re.isValidElement=K,Re.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:ae}},Re.memo=function(R,V){return{$$typeof:p,type:R,compare:V===void 0?null:V}},Re.startTransition=function(R){var V=H.T,X={};H.T=X;try{var le=R(),re=H.S;re!==null&&re(X,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(_,Z)}catch(fe){Z(fe)}finally{V!==null&&X.types!==null&&(V.types=X.types),H.T=V}},Re.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Re.use=function(R){return H.H.use(R)},Re.useActionState=function(R,V,X){return H.H.useActionState(R,V,X)},Re.useCallback=function(R,V){return H.H.useCallback(R,V)},Re.useContext=function(R){return H.H.useContext(R)},Re.useDebugValue=function(){},Re.useDeferredValue=function(R,V){return H.H.useDeferredValue(R,V)},Re.useEffect=function(R,V){return H.H.useEffect(R,V)},Re.useEffectEvent=function(R){return H.H.useEffectEvent(R)},Re.useId=function(){return H.H.useId()},Re.useImperativeHandle=function(R,V,X){return H.H.useImperativeHandle(R,V,X)},Re.useInsertionEffect=function(R,V){return H.H.useInsertionEffect(R,V)},Re.useLayoutEffect=function(R,V){return H.H.useLayoutEffect(R,V)},Re.useMemo=function(R,V){return H.H.useMemo(R,V)},Re.useOptimistic=function(R,V){return H.H.useOptimistic(R,V)},Re.useReducer=function(R,V,X){return H.H.useReducer(R,V,X)},Re.useRef=function(R){return H.H.useRef(R)},Re.useState=function(R){return H.H.useState(R)},Re.useSyncExternalStore=function(R,V,X){return H.H.useSyncExternalStore(R,V,X)},Re.useTransition=function(){return H.H.useTransition()},Re.version="19.2.8",Re}var Wx;function Km(){return Wx||(Wx=1,Uf.exports=IC()),Uf.exports}var v=Km();const de=VC(v),bo=LC({__proto__:null,default:de},[v]);var If={exports:{}},Ms={},$f={exports:{}},Gf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Kx;function $C(){return Kx||(Kx=1,(function(e){function a(A,U){var ae=A.length;A.push(U);e:for(;0<ae;){var Z=ae-1>>>1,T=A[Z];if(0<i(T,U))A[Z]=U,A[ae]=T,ae=Z;else break e}}function l(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var U=A[0],ae=A.pop();if(ae!==U){A[0]=ae;e:for(var Z=0,T=A.length,R=T>>>1;Z<R;){var V=2*(Z+1)-1,X=A[V],le=V+1,re=A[le];if(0>i(X,ae))le<T&&0>i(re,X)?(A[Z]=re,A[le]=ae,Z=le):(A[Z]=X,A[V]=ae,Z=V);else if(le<T&&0>i(re,ae))A[Z]=re,A[le]=ae,Z=le;else break e}}return U}function i(A,U){var ae=A.sortIndex-U.sortIndex;return ae!==0?ae:A.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,m=f.now();e.unstable_now=function(){return f.now()-m}}var g=[],p=[],x=1,y=null,w=3,b=!1,C=!1,j=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function k(A){for(var U=l(p);U!==null;){if(U.callback===null)r(p);else if(U.startTime<=A)r(p),U.sortIndex=U.expirationTime,a(g,U);else break;U=l(p)}}function z(A){if(j=!1,k(A),!C)if(l(g)!==null)C=!0,_||(_=!0,ee());else{var U=l(p);U!==null&&ce(z,U.startTime-A)}}var _=!1,H=-1,L=5,W=-1;function Y(){return N?!0:!(e.unstable_now()-W<L)}function K(){if(N=!1,_){var A=e.unstable_now();W=A;var U=!0;try{e:{C=!1,j&&(j=!1,O(H),H=-1),b=!0;var ae=w;try{t:{for(k(A),y=l(g);y!==null&&!(y.expirationTime>A&&Y());){var Z=y.callback;if(typeof Z=="function"){y.callback=null,w=y.priorityLevel;var T=Z(y.expirationTime<=A);if(A=e.unstable_now(),typeof T=="function"){y.callback=T,k(A),U=!0;break t}y===l(g)&&r(g),k(A)}else r(g);y=l(g)}if(y!==null)U=!0;else{var R=l(p);R!==null&&ce(z,R.startTime-A),U=!1}}break e}finally{y=null,w=ae,b=!1}U=void 0}}finally{U?ee():_=!1}}}var ee;if(typeof D=="function")ee=function(){D(K)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,se=te.port2;te.port1.onmessage=K,ee=function(){se.postMessage(null)}}else ee=function(){E(K,0)};function ce(A,U){H=E(function(){A(e.unstable_now())},U)}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(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(A){switch(w){case 1:case 2:case 3:var U=3;break;default:U=w}var ae=w;w=U;try{return A()}finally{w=ae}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(A,U){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var ae=w;w=A;try{return U()}finally{w=ae}},e.unstable_scheduleCallback=function(A,U,ae){var Z=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Z+ae:Z):ae=Z,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=ae+T,A={id:x++,callback:U,priorityLevel:A,startTime:ae,expirationTime:T,sortIndex:-1},ae>Z?(A.sortIndex=ae,a(p,A),l(g)===null&&A===l(p)&&(j?(O(H),H=-1):j=!0,ce(z,ae-Z))):(A.sortIndex=T,a(g,A),C||b||(C=!0,_||(_=!0,ee()))),A},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(A){var U=w;return function(){var ae=w;w=U;try{return A.apply(this,arguments)}finally{w=ae}}}})(Gf)),Gf}var Xx;function GC(){return Xx||(Xx=1,$f.exports=$C()),$f.exports}var Yf={exports:{}},Ut={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Qx;function YC(){if(Qx)return Ut;Qx=1;var e=Km();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},i=Symbol.for("react.portal");function u(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ut.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return u(g,p,null,x)},Ut.flushSync=function(g){var p=f.T,x=r.p;try{if(f.T=null,r.p=2,g)return g()}finally{f.T=p,r.p=x,r.d.f()}},Ut.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},Ut.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},Ut.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:b}):x==="script"&&r.d.X(g,{crossOrigin:y,integrity:w,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},Ut.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin);r.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=m(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},Ut.requestFormReset=function(g){r.d.r(g)},Ut.unstable_batchedUpdates=function(g,p){return g(p)},Ut.useFormState=function(g,p,x){return f.H.useFormState(g,p,x)},Ut.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ut.version="19.2.8",Ut}var Zx;function m0(){if(Zx)return Yf.exports;Zx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Yf.exports=YC(),Yf.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Jx;function qC(){if(Jx)return Ms;Jx=1;var e=GC(),a=Km(),l=m0();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,o=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(o=n.return),t=n.return;while(t)}return n.tag===3?o:null}function f(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function g(t){if(u(t)!==t)throw Error(r(188))}function p(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(r(188));return n!==t?null:t}for(var o=t,s=n;;){var d=o.return;if(d===null)break;var h=d.alternate;if(h===null){if(s=d.return,s!==null){o=s;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===o)return g(d),t;if(h===s)return g(d),n;h=h.sibling}throw Error(r(188))}if(o.return!==s.return)o=d,s=h;else{for(var S=!1,M=d.child;M;){if(M===o){S=!0,o=d,s=h;break}if(M===s){S=!0,s=d,o=h;break}M=M.sibling}if(!S){for(M=h.child;M;){if(M===o){S=!0,o=h,s=d;break}if(M===s){S=!0,s=h,o=d;break}M=M.sibling}if(!S)throw Error(r(189))}}if(o.alternate!==s)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?t:n}function x(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=x(t),n!==null)return n;t=t.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),D=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function ee(t){return t===null||typeof t!="object"?null:(t=K&&t[K]||t["@@iterator"],typeof t=="function"?t:null)}var te=Symbol.for("react.client.reference");function se(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===te?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case j:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case z:return"Suspense";case _:return"SuspenseList";case W:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case C:return"Portal";case D:return t.displayName||"Context";case O:return(t._context.displayName||"Context")+".Consumer";case k:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return n=t.displayName||null,n!==null?n:se(t.type)||"Memo";case L:n=t._payload,t=t._init;try{return se(t(n))}catch{}}return null}var ce=Array.isArray,A=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Z=[],T=-1;function R(t){return{current:t}}function V(t){0>T||(t.current=Z[T],Z[T]=null,T--)}function X(t,n){T++,Z[T]=t.current,t.current=n}var le=R(null),re=R(null),fe=R(null),ve=R(null);function ue(t,n){switch(X(fe,n),X(re,t),X(le,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?dx(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=dx(n),t=fx(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(le),X(le,t)}function ie(){V(le),V(re),V(fe)}function Se(t){t.memoizedState!==null&&X(ve,t);var n=le.current,o=fx(n,t.type);n!==o&&(X(re,t),X(le,o))}function Me(t){re.current===t&&(V(le),V(re)),ve.current===t&&(V(ve),Ss._currentValue=ae)}var _e,Pe;function ot(t){if(_e===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);_e=n&&n[1]||"",Pe=-1<o.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+_e+t+Pe}var kt=!1;function un(t,n){if(!t||kt)return"";kt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(q){var G=q}Reflect.construct(t,[],ne)}else{try{ne.call()}catch(q){G=q}t.call(ne.prototype)}}else{try{throw Error()}catch(q){G=q}(ne=t())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(q){if(q&&G&&typeof q.stack=="string")return[q.stack,G.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),S=h[0],M=h[1];if(S&&M){var P=S.split(`
|
|
44
|
+
`),$=M.split(`
|
|
45
|
+
`);for(d=s=0;s<P.length&&!P[s].includes("DetermineComponentFrameRoot");)s++;for(;d<$.length&&!$[d].includes("DetermineComponentFrameRoot");)d++;if(s===P.length||d===$.length)for(s=P.length-1,d=$.length-1;1<=s&&0<=d&&P[s]!==$[d];)d--;for(;1<=s&&0<=d;s--,d--)if(P[s]!==$[d]){if(s!==1||d!==1)do if(s--,d--,0>d||P[s]!==$[d]){var Q=`
|
|
46
|
+
`+P[s].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=s&&0<=d);break}}}finally{kt=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?ot(o):""}function Xn(t,n){switch(t.tag){case 26:case 27:case 5:return ot(t.type);case 16:return ot("Lazy");case 13:return t.child!==n&&n!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return un(t.type,!1);case 11:return un(t.type.render,!1);case 1:return un(t.type,!0);case 31:return ot("Activity");default:return""}}function Qn(t){try{var n="",o=null;do n+=Xn(t,o),o=t,t=t.return;while(t);return n}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Il=Object.prototype.hasOwnProperty,$l=e.unstable_scheduleCallback,Gl=e.unstable_cancelCallback,tl=e.unstable_shouldYield,ri=e.unstable_requestPaint,At=e.unstable_now,ko=e.unstable_getCurrentPriorityLevel,oi=e.unstable_ImmediatePriority,si=e.unstable_UserBlockingPriority,Sr=e.unstable_NormalPriority,Cu=e.unstable_LowPriority,ii=e.unstable_IdlePriority,ju=e.log,Nu=e.unstable_setDisableYieldValue,Yl=null,Yt=null;function Zn(t){if(typeof ju=="function"&&Nu(t),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(Yl,t)}catch{}}var qt=Math.clz32?Math.clz32:ui,ci=Math.log,Mu=Math.LN2;function ui(t){return t>>>=0,t===0?32:31-(ci(t)/Mu|0)|0}var De=256,Ie=262144,be=4194304;function He(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Dt(t,n,o){var s=t.pendingLanes;if(s===0)return 0;var d=0,h=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var M=s&134217727;return M!==0?(s=M&~h,s!==0?d=He(s):(S&=M,S!==0?d=He(S):o||(o=M&~t,o!==0&&(d=He(o))))):(M=s&~h,M!==0?d=He(M):S!==0?d=He(S):o||(o=s&~t,o!==0&&(d=He(o)))),d===0?0:n!==0&&n!==d&&(n&h)===0&&(h=d&-d,o=n&-n,h>=o||h===32&&(o&4194048)!==0)?n:d}function ze(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function _u(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 di(){var t=be;return be<<=1,(be&62914560)===0&&(be=4194304),t}function Ao(t){for(var n=[],o=0;31>o;o++)n.push(t);return n}function xa(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function zo(t,n,o,s,d,h){var S=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var M=t.entanglements,P=t.expirationTimes,$=t.hiddenUpdates;for(o=S&~o;0<o;){var Q=31-qt(o),ne=1<<Q;M[Q]=0,P[Q]=-1;var G=$[Q];if(G!==null)for($[Q]=null,Q=0;Q<G.length;Q++){var q=G[Q];q!==null&&(q.lane&=-536870913)}o&=~ne}s!==0&&qh(t,s,0),h!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=h&~(S&~n))}function qh(t,n,o){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-qt(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|o&261930}function Wh(t,n){var o=t.entangledLanes|=n;for(t=t.entanglements;o;){var s=31-qt(o),d=1<<s;d&n|t[s]&n&&(t[s]|=n),o&=~d}}function Kh(t,n){var o=n&-n;return o=(o&42)!==0?1:Du(o),(o&(t.suspendedLanes|n))!==0?0:o}function Du(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ru(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Xh(){var t=U.p;return t!==0?t:(t=window.event,t===void 0?32:zx(t.type))}function Qh(t,n){var o=U.p;try{return U.p=t,n()}finally{U.p=o}}var nl=Math.random().toString(36).slice(2),zt="__reactFiber$"+nl,Jt="__reactProps$"+nl,wr="__reactContainer$"+nl,Eu="__reactEvents$"+nl,Dw="__reactListeners$"+nl,Rw="__reactHandles$"+nl,Zh="__reactResources$"+nl,Po="__reactMarker$"+nl;function Ou(t){delete t[zt],delete t[Jt],delete t[Eu],delete t[Dw],delete t[Rw]}function Cr(t){var n=t[zt];if(n)return n;for(var o=t.parentNode;o;){if(n=o[wr]||o[zt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(t=yx(t);t!==null;){if(o=t[zt])return o;t=yx(t)}return n}t=o,o=t.parentNode}return null}function jr(t){if(t=t[zt]||t[wr]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ho(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function Nr(t){var n=t[Zh];return n||(n=t[Zh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Rt(t){t[Po]=!0}var Jh=new Set,eg={};function ql(t,n){Mr(t,n),Mr(t+"Capture",n)}function Mr(t,n){for(eg[t]=n,t=0;t<n.length;t++)Jh.add(n[t])}var Ew=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]*$"),tg={},ng={};function Ow(t){return Il.call(ng,t)?!0:Il.call(tg,t)?!1:Ew.test(t)?ng[t]=!0:(tg[t]=!0,!1)}function fi(t,n,o){if(Ow(n))if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+o)}}function mi(t,n,o){if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+o)}}function ya(t,n,o,s){if(s===null)t.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(n,o,""+s)}}function Mn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ag(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Tw(t,n,o){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,h=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){o=""+S,h.call(this,S)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(S){o=""+S},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Tu(t){if(!t._valueTracker){var n=ag(t)?"checked":"value";t._valueTracker=Tw(t,n,""+t[n])}}function lg(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return t&&(s=ag(t)?t.checked?"true":"false":t.value),t=s,t!==o?(n.setValue(t),!0):!1}function hi(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var kw=/[\n"\\]/g;function _n(t){return t.replace(kw,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ku(t,n,o,s,d,h,S,M){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),n!=null?S==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Mn(n)):t.value!==""+Mn(n)&&(t.value=""+Mn(n)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),n!=null?Au(t,S,Mn(n)):o!=null?Au(t,S,Mn(o)):s!=null&&t.removeAttribute("value"),d==null&&h!=null&&(t.defaultChecked=!!h),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+Mn(M):t.removeAttribute("name")}function rg(t,n,o,s,d,h,S,M){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),n!=null||o!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Tu(t);return}o=o!=null?""+Mn(o):"",n=n!=null?""+Mn(n):o,M||n===t.value||(t.value=n),t.defaultValue=n}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=M?t.checked:!!s,t.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),Tu(t)}function Au(t,n,o){n==="number"&&hi(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function _r(t,n,o,s){if(t=t.options,n){n={};for(var d=0;d<o.length;d++)n["$"+o[d]]=!0;for(o=0;o<t.length;o++)d=n.hasOwnProperty("$"+t[o].value),t[o].selected!==d&&(t[o].selected=d),d&&s&&(t[o].defaultSelected=!0)}else{for(o=""+Mn(o),n=null,d=0;d<t.length;d++){if(t[d].value===o){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function og(t,n,o){if(n!=null&&(n=""+Mn(n),n!==t.value&&(t.value=n),o==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=o!=null?""+Mn(o):""}function sg(t,n,o,s){if(n==null){if(s!=null){if(o!=null)throw Error(r(92));if(ce(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),n=o}o=Mn(n),t.defaultValue=o,s=t.textContent,s===o&&s!==""&&s!==null&&(t.value=s),Tu(t)}function Dr(t,n){if(n){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=n;return}}t.textContent=n}var Aw=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 ig(t,n,o){var s=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,o):typeof o!="number"||o===0||Aw.has(n)?n==="float"?t.cssFloat=o:t[n]=(""+o).trim():t[n]=o+"px"}function cg(t,n,o){if(n!=null&&typeof n!="object")throw Error(r(62));if(t=t.style,o!=null){for(var s in o)!o.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in n)s=n[d],n.hasOwnProperty(d)&&o[d]!==s&&ig(t,d,s)}else for(var h in n)n.hasOwnProperty(h)&&ig(t,h,n[h])}function zu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 zw=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"]]),Pw=/^[\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 gi(t){return Pw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ba(){}var Pu=null;function Hu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Rr=null,Er=null;function ug(t){var n=jr(t);if(n&&(t=n.stateNode)){var o=t[Jt]||null;e:switch(t=n.stateNode,n.type){case"input":if(ku(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+_n(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var s=o[n];if(s!==t&&s.form===t.form){var d=s[Jt]||null;if(!d)throw Error(r(90));ku(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<o.length;n++)s=o[n],s.form===t.form&&lg(s)}break e;case"textarea":og(t,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&_r(t,!!o.multiple,n,!1)}}}var Fu=!1;function dg(t,n,o){if(Fu)return t(n,o);Fu=!0;try{var s=t(n);return s}finally{if(Fu=!1,(Rr!==null||Er!==null)&&(nc(),Rr&&(n=Rr,t=Er,Er=Rr=null,ug(n),t)))for(n=0;n<t.length;n++)ug(t[n])}}function Fo(t,n){var o=t.stateNode;if(o===null)return null;var s=o[Jt]||null;if(s===null)return null;o=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(r(231,n,typeof o));return o}var Sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lu=!1;if(Sa)try{var Lo={};Object.defineProperty(Lo,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",Lo,Lo),window.removeEventListener("test",Lo,Lo)}catch{Lu=!1}var al=null,Vu=null,pi=null;function fg(){if(pi)return pi;var t,n=Vu,o=n.length,s,d="value"in al?al.value:al.textContent,h=d.length;for(t=0;t<o&&n[t]===d[t];t++);var S=o-t;for(s=1;s<=S&&n[o-s]===d[h-s];s++);return pi=d.slice(t,1<s?1-s:void 0)}function vi(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function xi(){return!0}function mg(){return!1}function en(t){function n(o,s,d,h,S){this._reactName=o,this._targetInst=d,this.type=s,this.nativeEvent=h,this.target=S,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(o=t[M],this[M]=o?o(h):h[M]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?xi:mg,this.isPropagationStopped=mg,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=xi)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=xi)},persist:function(){},isPersistent:xi}),n}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yi=en(Wl),Vo=y({},Wl,{view:0,detail:0}),Hw=en(Vo),Bu,Uu,Bo,bi=y({},Vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$u,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Bo&&(Bo&&t.type==="mousemove"?(Bu=t.screenX-Bo.screenX,Uu=t.screenY-Bo.screenY):Uu=Bu=0,Bo=t),Bu)},movementY:function(t){return"movementY"in t?t.movementY:Uu}}),hg=en(bi),Fw=y({},bi,{dataTransfer:0}),Lw=en(Fw),Vw=y({},Vo,{relatedTarget:0}),Iu=en(Vw),Bw=y({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),Uw=en(Bw),Iw=y({},Wl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$w=en(Iw),Gw=y({},Wl,{data:0}),gg=en(Gw),Yw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qw={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"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kw(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Ww[t])?!!n[t]:!1}function $u(){return Kw}var Xw=y({},Vo,{key:function(t){if(t.key){var n=Yw[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=vi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$u,charCode:function(t){return t.type==="keypress"?vi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?vi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Qw=en(Xw),Zw=y({},bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pg=en(Zw),Jw=y({},Vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$u}),e1=en(Jw),t1=y({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),n1=en(t1),a1=y({},bi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),l1=en(a1),r1=y({},Wl,{newState:0,oldState:0}),o1=en(r1),s1=[9,13,27,32],Gu=Sa&&"CompositionEvent"in window,Uo=null;Sa&&"documentMode"in document&&(Uo=document.documentMode);var i1=Sa&&"TextEvent"in window&&!Uo,vg=Sa&&(!Gu||Uo&&8<Uo&&11>=Uo),xg=" ",yg=!1;function bg(t,n){switch(t){case"keyup":return s1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Or=!1;function c1(t,n){switch(t){case"compositionend":return Sg(n);case"keypress":return n.which!==32?null:(yg=!0,xg);case"textInput":return t=n.data,t===xg&&yg?null:t;default:return null}}function u1(t,n){if(Or)return t==="compositionend"||!Gu&&bg(t,n)?(t=fg(),pi=Vu=al=null,Or=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return vg&&n.locale!=="ko"?null:n.data;default:return null}}var d1={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 wg(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!d1[t.type]:n==="textarea"}function Cg(t,n,o,s){Rr?Er?Er.push(s):Er=[s]:Rr=s,n=cc(n,"onChange"),0<n.length&&(o=new yi("onChange","change",null,o,s),t.push({event:o,listeners:n}))}var Io=null,$o=null;function f1(t){rx(t,0)}function Si(t){var n=Ho(t);if(lg(n))return t}function jg(t,n){if(t==="change")return n}var Ng=!1;if(Sa){var Yu;if(Sa){var qu="oninput"in document;if(!qu){var Mg=document.createElement("div");Mg.setAttribute("oninput","return;"),qu=typeof Mg.oninput=="function"}Yu=qu}else Yu=!1;Ng=Yu&&(!document.documentMode||9<document.documentMode)}function _g(){Io&&(Io.detachEvent("onpropertychange",Dg),$o=Io=null)}function Dg(t){if(t.propertyName==="value"&&Si($o)){var n=[];Cg(n,$o,t,Hu(t)),dg(f1,n)}}function m1(t,n,o){t==="focusin"?(_g(),Io=n,$o=o,Io.attachEvent("onpropertychange",Dg)):t==="focusout"&&_g()}function h1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Si($o)}function g1(t,n){if(t==="click")return Si(n)}function p1(t,n){if(t==="input"||t==="change")return Si(n)}function v1(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var dn=typeof Object.is=="function"?Object.is:v1;function Go(t,n){if(dn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var o=Object.keys(t),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var d=o[s];if(!Il.call(n,d)||!dn(t[d],n[d]))return!1}return!0}function Rg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Eg(t,n){var o=Rg(t);t=0;for(var s;o;){if(o.nodeType===3){if(s=t+o.textContent.length,t<=n&&s>=n)return{node:o,offset:n-t};t=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Rg(o)}}function Og(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Og(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Tg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=hi(t.document);n instanceof t.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)t=n.contentWindow;else break;n=hi(t.document)}return n}function Wu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var x1=Sa&&"documentMode"in document&&11>=document.documentMode,Tr=null,Ku=null,Yo=null,Xu=!1;function kg(t,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Xu||Tr==null||Tr!==hi(s)||(s=Tr,"selectionStart"in s&&Wu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Yo&&Go(Yo,s)||(Yo=s,s=cc(Ku,"onSelect"),0<s.length&&(n=new yi("onSelect","select",null,n,o),t.push({event:n,listeners:s}),n.target=Tr)))}function Kl(t,n){var o={};return o[t.toLowerCase()]=n.toLowerCase(),o["Webkit"+t]="webkit"+n,o["Moz"+t]="moz"+n,o}var kr={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionrun:Kl("Transition","TransitionRun"),transitionstart:Kl("Transition","TransitionStart"),transitioncancel:Kl("Transition","TransitionCancel"),transitionend:Kl("Transition","TransitionEnd")},Qu={},Ag={};Sa&&(Ag=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Xl(t){if(Qu[t])return Qu[t];if(!kr[t])return t;var n=kr[t],o;for(o in n)if(n.hasOwnProperty(o)&&o in Ag)return Qu[t]=n[o];return t}var zg=Xl("animationend"),Pg=Xl("animationiteration"),Hg=Xl("animationstart"),y1=Xl("transitionrun"),b1=Xl("transitionstart"),S1=Xl("transitioncancel"),Fg=Xl("transitionend"),Lg=new Map,Zu="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(" ");Zu.push("scrollEnd");function Vn(t,n){Lg.set(t,n),ql(n,[t])}var wi=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Dn=[],Ar=0,Ju=0;function Ci(){for(var t=Ar,n=Ju=Ar=0;n<t;){var o=Dn[n];Dn[n++]=null;var s=Dn[n];Dn[n++]=null;var d=Dn[n];Dn[n++]=null;var h=Dn[n];if(Dn[n++]=null,s!==null&&d!==null){var S=s.pending;S===null?d.next=d:(d.next=S.next,S.next=d),s.pending=d}h!==0&&Vg(o,d,h)}}function ji(t,n,o,s){Dn[Ar++]=t,Dn[Ar++]=n,Dn[Ar++]=o,Dn[Ar++]=s,Ju|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function ed(t,n,o,s){return ji(t,n,o,s),Ni(t)}function Ql(t,n){return ji(t,null,null,n),Ni(t)}function Vg(t,n,o){t.lanes|=o;var s=t.alternate;s!==null&&(s.lanes|=o);for(var d=!1,h=t.return;h!==null;)h.childLanes|=o,s=h.alternate,s!==null&&(s.childLanes|=o),h.tag===22&&(t=h.stateNode,t===null||t._visibility&1||(d=!0)),t=h,h=h.return;return t.tag===3?(h=t.stateNode,d&&n!==null&&(d=31-qt(o),t=h.hiddenUpdates,s=t[d],s===null?t[d]=[n]:s.push(n),n.lane=o|536870912),h):null}function Ni(t){if(50<hs)throw hs=0,uf=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var zr={};function w1(t,n,o,s){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(t,n,o,s){return new w1(t,n,o,s)}function td(t){return t=t.prototype,!(!t||!t.isReactComponent)}function wa(t,n){var o=t.alternate;return o===null?(o=fn(t.tag,n,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=n,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,n=t.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function Bg(t,n){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,n=o.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Mi(t,n,o,s,d,h){var S=0;if(s=t,typeof t=="function")td(t)&&(S=1);else if(typeof t=="string")S=_C(t,o,le.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case W:return t=fn(31,o,n,d),t.elementType=W,t.lanes=h,t;case j:return Zl(o.children,d,h,n);case N:S=8,d|=24;break;case E:return t=fn(12,o,n,d|2),t.elementType=E,t.lanes=h,t;case z:return t=fn(13,o,n,d),t.elementType=z,t.lanes=h,t;case _:return t=fn(19,o,n,d),t.elementType=_,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case D:S=10;break e;case O:S=9;break e;case k:S=11;break e;case H:S=14;break e;case L:S=16,s=null;break e}S=29,o=Error(r(130,t===null?"null":typeof t,"")),s=null}return n=fn(S,o,n,d),n.elementType=t,n.type=s,n.lanes=h,n}function Zl(t,n,o,s){return t=fn(7,t,s,n),t.lanes=o,t}function nd(t,n,o){return t=fn(6,t,null,n),t.lanes=o,t}function Ug(t){var n=fn(18,null,null,0);return n.stateNode=t,n}function ad(t,n,o){return n=fn(4,t.children!==null?t.children:[],t.key,n),n.lanes=o,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Ig=new WeakMap;function Rn(t,n){if(typeof t=="object"&&t!==null){var o=Ig.get(t);return o!==void 0?o:(n={value:t,source:n,stack:Qn(n)},Ig.set(t,n),n)}return{value:t,source:n,stack:Qn(n)}}var Pr=[],Hr=0,_i=null,qo=0,En=[],On=0,ll=null,Jn=1,ea="";function Ca(t,n){Pr[Hr++]=qo,Pr[Hr++]=_i,_i=t,qo=n}function $g(t,n,o){En[On++]=Jn,En[On++]=ea,En[On++]=ll,ll=t;var s=Jn;t=ea;var d=32-qt(s)-1;s&=~(1<<d),o+=1;var h=32-qt(n)+d;if(30<h){var S=d-d%5;h=(s&(1<<S)-1).toString(32),s>>=S,d-=S,Jn=1<<32-qt(n)+d|o<<d|s,ea=h+t}else Jn=1<<h|o<<d|s,ea=t}function ld(t){t.return!==null&&(Ca(t,1),$g(t,1,0))}function rd(t){for(;t===_i;)_i=Pr[--Hr],Pr[Hr]=null,qo=Pr[--Hr],Pr[Hr]=null;for(;t===ll;)ll=En[--On],En[On]=null,ea=En[--On],En[On]=null,Jn=En[--On],En[On]=null}function Gg(t,n){En[On++]=Jn,En[On++]=ea,En[On++]=ll,Jn=n.id,ea=n.overflow,ll=t}var Pt=null,st=null,$e=!1,rl=null,Tn=!1,od=Error(r(519));function ol(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wo(Rn(n,t)),od}function Yg(t){var n=t.stateNode,o=t.type,s=t.memoizedProps;switch(n[zt]=t,n[Jt]=s,o){case"dialog":Ve("cancel",n),Ve("close",n);break;case"iframe":case"object":case"embed":Ve("load",n);break;case"video":case"audio":for(o=0;o<ps.length;o++)Ve(ps[o],n);break;case"source":Ve("error",n);break;case"img":case"image":case"link":Ve("error",n),Ve("load",n);break;case"details":Ve("toggle",n);break;case"input":Ve("invalid",n),rg(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ve("invalid",n);break;case"textarea":Ve("invalid",n),sg(n,s.value,s.defaultValue,s.children)}o=s.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||s.suppressHydrationWarning===!0||cx(n.textContent,o)?(s.popover!=null&&(Ve("beforetoggle",n),Ve("toggle",n)),s.onScroll!=null&&Ve("scroll",n),s.onScrollEnd!=null&&Ve("scrollend",n),s.onClick!=null&&(n.onclick=ba),n=!0):n=!1,n||ol(t,!0)}function qg(t){for(Pt=t.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:Pt=Pt.return}}function Fr(t){if(t!==Pt)return!1;if(!$e)return qg(t),$e=!0,!1;var n=t.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||Nf(t.type,t.memoizedProps)),o=!o),o&&st&&ol(t),qg(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));st=xx(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));st=xx(t)}else n===27?(n=st,bl(t.type)?(t=Ef,Ef=null,st=t):st=n):st=Pt?An(t.stateNode.nextSibling):null;return!0}function Jl(){st=Pt=null,$e=!1}function sd(){var t=rl;return t!==null&&(ln===null?ln=t:ln.push.apply(ln,t),rl=null),t}function Wo(t){rl===null?rl=[t]:rl.push(t)}var id=R(null),er=null,ja=null;function sl(t,n,o){X(id,n._currentValue),n._currentValue=o}function Na(t){t._currentValue=id.current,V(id)}function cd(t,n,o){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===o)break;t=t.return}}function ud(t,n,o,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var h=d.dependencies;if(h!==null){var S=d.child;h=h.firstContext;e:for(;h!==null;){var M=h;h=d;for(var P=0;P<n.length;P++)if(M.context===n[P]){h.lanes|=o,M=h.alternate,M!==null&&(M.lanes|=o),cd(h.return,o,t),s||(S=null);break e}h=M.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(r(341));S.lanes|=o,h=S.alternate,h!==null&&(h.lanes|=o),cd(S,o,t),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===t){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Lr(t,n,o,s){t=null;for(var d=n,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var M=d.type;dn(d.pendingProps.value,S.value)||(t!==null?t.push(M):t=[M])}}else if(d===ve.current){if(S=d.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Ss):t=[Ss])}d=d.return}t!==null&&ud(n,t,o,s),n.flags|=262144}function Di(t){for(t=t.firstContext;t!==null;){if(!dn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function tr(t){er=t,ja=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ht(t){return Wg(er,t)}function Ri(t,n){return er===null&&tr(t),Wg(t,n)}function Wg(t,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},ja===null){if(t===null)throw Error(r(308));ja=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ja=ja.next=n;return o}var C1=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(o,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(o){return o()})}},j1=e.unstable_scheduleCallback,N1=e.unstable_NormalPriority,vt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dd(){return{controller:new C1,data:new Map,refCount:0}}function Ko(t){t.refCount--,t.refCount===0&&j1(N1,function(){t.controller.abort()})}var Xo=null,fd=0,Vr=0,Br=null;function M1(t,n){if(Xo===null){var o=Xo=[];fd=0,Vr=pf(),Br={status:"pending",value:void 0,then:function(s){o.push(s)}}}return fd++,n.then(Kg,Kg),n}function Kg(){if(--fd===0&&Xo!==null){Br!==null&&(Br.status="fulfilled");var t=Xo;Xo=null,Vr=0,Br=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function _1(t,n){var o=[],s={status:"pending",value:null,reason:null,then:function(d){o.push(d)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<o.length;d++)(0,o[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<o.length;d++)(0,o[d])(void 0)}),s}var Xg=A.S;A.S=function(t,n){kv=At(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&M1(t,n),Xg!==null&&Xg(t,n)};var nr=R(null);function md(){var t=nr.current;return t!==null?t:rt.pooledCache}function Ei(t,n){n===null?X(nr,nr.current):X(nr,n.pool)}function Qg(){var t=md();return t===null?null:{parent:vt._currentValue,pool:t}}var Ur=Error(r(460)),hd=Error(r(474)),Oi=Error(r(542)),Ti={then:function(){}};function Zg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Jg(t,n,o){switch(o=t[o],o===void 0?t.push(n):o!==n&&(n.then(ba,ba),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,tp(t),t;default:if(typeof n.status=="string")n.then(ba,ba);else{if(t=rt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,tp(t),t}throw lr=n,Ur}}function ar(t){try{var n=t._init;return n(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(lr=o,Ur):o}}var lr=null;function ep(){if(lr===null)throw Error(r(459));var t=lr;return lr=null,t}function tp(t){if(t===Ur||t===Oi)throw Error(r(483))}var Ir=null,Qo=0;function ki(t){var n=Qo;return Qo+=1,Ir===null&&(Ir=[]),Jg(Ir,t,n)}function Zo(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Ai(t,n){throw n.$$typeof===w?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function np(t){function n(B,F){if(t){var I=B.deletions;I===null?(B.deletions=[F],B.flags|=16):I.push(F)}}function o(B,F){if(!t)return null;for(;F!==null;)n(B,F),F=F.sibling;return null}function s(B){for(var F=new Map;B!==null;)B.key!==null?F.set(B.key,B):F.set(B.index,B),B=B.sibling;return F}function d(B,F){return B=wa(B,F),B.index=0,B.sibling=null,B}function h(B,F,I){return B.index=I,t?(I=B.alternate,I!==null?(I=I.index,I<F?(B.flags|=67108866,F):I):(B.flags|=67108866,F)):(B.flags|=1048576,F)}function S(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function M(B,F,I,J){return F===null||F.tag!==6?(F=nd(I,B.mode,J),F.return=B,F):(F=d(F,I),F.return=B,F)}function P(B,F,I,J){var ye=I.type;return ye===j?Q(B,F,I.props.children,J,I.key):F!==null&&(F.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===L&&ar(ye)===F.type)?(F=d(F,I.props),Zo(F,I),F.return=B,F):(F=Mi(I.type,I.key,I.props,null,B.mode,J),Zo(F,I),F.return=B,F)}function $(B,F,I,J){return F===null||F.tag!==4||F.stateNode.containerInfo!==I.containerInfo||F.stateNode.implementation!==I.implementation?(F=ad(I,B.mode,J),F.return=B,F):(F=d(F,I.children||[]),F.return=B,F)}function Q(B,F,I,J,ye){return F===null||F.tag!==7?(F=Zl(I,B.mode,J,ye),F.return=B,F):(F=d(F,I),F.return=B,F)}function ne(B,F,I){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=nd(""+F,B.mode,I),F.return=B,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return I=Mi(F.type,F.key,F.props,null,B.mode,I),Zo(I,F),I.return=B,I;case C:return F=ad(F,B.mode,I),F.return=B,F;case L:return F=ar(F),ne(B,F,I)}if(ce(F)||ee(F))return F=Zl(F,B.mode,I,null),F.return=B,F;if(typeof F.then=="function")return ne(B,ki(F),I);if(F.$$typeof===D)return ne(B,Ri(B,F),I);Ai(B,F)}return null}function G(B,F,I,J){var ye=F!==null?F.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return ye!==null?null:M(B,F,""+I,J);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case b:return I.key===ye?P(B,F,I,J):null;case C:return I.key===ye?$(B,F,I,J):null;case L:return I=ar(I),G(B,F,I,J)}if(ce(I)||ee(I))return ye!==null?null:Q(B,F,I,J,null);if(typeof I.then=="function")return G(B,F,ki(I),J);if(I.$$typeof===D)return G(B,F,Ri(B,I),J);Ai(B,I)}return null}function q(B,F,I,J,ye){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return B=B.get(I)||null,M(F,B,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return B=B.get(J.key===null?I:J.key)||null,P(F,B,J,ye);case C:return B=B.get(J.key===null?I:J.key)||null,$(F,B,J,ye);case L:return J=ar(J),q(B,F,I,J,ye)}if(ce(J)||ee(J))return B=B.get(I)||null,Q(F,B,J,ye,null);if(typeof J.then=="function")return q(B,F,I,ki(J),ye);if(J.$$typeof===D)return q(B,F,I,Ri(F,J),ye);Ai(F,J)}return null}function ge(B,F,I,J){for(var ye=null,Ye=null,pe=F,ke=F=0,Ue=null;pe!==null&&ke<I.length;ke++){pe.index>ke?(Ue=pe,pe=null):Ue=pe.sibling;var qe=G(B,pe,I[ke],J);if(qe===null){pe===null&&(pe=Ue);break}t&&pe&&qe.alternate===null&&n(B,pe),F=h(qe,F,ke),Ye===null?ye=qe:Ye.sibling=qe,Ye=qe,pe=Ue}if(ke===I.length)return o(B,pe),$e&&Ca(B,ke),ye;if(pe===null){for(;ke<I.length;ke++)pe=ne(B,I[ke],J),pe!==null&&(F=h(pe,F,ke),Ye===null?ye=pe:Ye.sibling=pe,Ye=pe);return $e&&Ca(B,ke),ye}for(pe=s(pe);ke<I.length;ke++)Ue=q(pe,B,ke,I[ke],J),Ue!==null&&(t&&Ue.alternate!==null&&pe.delete(Ue.key===null?ke:Ue.key),F=h(Ue,F,ke),Ye===null?ye=Ue:Ye.sibling=Ue,Ye=Ue);return t&&pe.forEach(function(Nl){return n(B,Nl)}),$e&&Ca(B,ke),ye}function Ce(B,F,I,J){if(I==null)throw Error(r(151));for(var ye=null,Ye=null,pe=F,ke=F=0,Ue=null,qe=I.next();pe!==null&&!qe.done;ke++,qe=I.next()){pe.index>ke?(Ue=pe,pe=null):Ue=pe.sibling;var Nl=G(B,pe,qe.value,J);if(Nl===null){pe===null&&(pe=Ue);break}t&&pe&&Nl.alternate===null&&n(B,pe),F=h(Nl,F,ke),Ye===null?ye=Nl:Ye.sibling=Nl,Ye=Nl,pe=Ue}if(qe.done)return o(B,pe),$e&&Ca(B,ke),ye;if(pe===null){for(;!qe.done;ke++,qe=I.next())qe=ne(B,qe.value,J),qe!==null&&(F=h(qe,F,ke),Ye===null?ye=qe:Ye.sibling=qe,Ye=qe);return $e&&Ca(B,ke),ye}for(pe=s(pe);!qe.done;ke++,qe=I.next())qe=q(pe,B,ke,qe.value,J),qe!==null&&(t&&qe.alternate!==null&&pe.delete(qe.key===null?ke:qe.key),F=h(qe,F,ke),Ye===null?ye=qe:Ye.sibling=qe,Ye=qe);return t&&pe.forEach(function(FC){return n(B,FC)}),$e&&Ca(B,ke),ye}function lt(B,F,I,J){if(typeof I=="object"&&I!==null&&I.type===j&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case b:e:{for(var ye=I.key;F!==null;){if(F.key===ye){if(ye=I.type,ye===j){if(F.tag===7){o(B,F.sibling),J=d(F,I.props.children),J.return=B,B=J;break e}}else if(F.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===L&&ar(ye)===F.type){o(B,F.sibling),J=d(F,I.props),Zo(J,I),J.return=B,B=J;break e}o(B,F);break}else n(B,F);F=F.sibling}I.type===j?(J=Zl(I.props.children,B.mode,J,I.key),J.return=B,B=J):(J=Mi(I.type,I.key,I.props,null,B.mode,J),Zo(J,I),J.return=B,B=J)}return S(B);case C:e:{for(ye=I.key;F!==null;){if(F.key===ye)if(F.tag===4&&F.stateNode.containerInfo===I.containerInfo&&F.stateNode.implementation===I.implementation){o(B,F.sibling),J=d(F,I.children||[]),J.return=B,B=J;break e}else{o(B,F);break}else n(B,F);F=F.sibling}J=ad(I,B.mode,J),J.return=B,B=J}return S(B);case L:return I=ar(I),lt(B,F,I,J)}if(ce(I))return ge(B,F,I,J);if(ee(I)){if(ye=ee(I),typeof ye!="function")throw Error(r(150));return I=ye.call(I),Ce(B,F,I,J)}if(typeof I.then=="function")return lt(B,F,ki(I),J);if(I.$$typeof===D)return lt(B,F,Ri(B,I),J);Ai(B,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,F!==null&&F.tag===6?(o(B,F.sibling),J=d(F,I),J.return=B,B=J):(o(B,F),J=nd(I,B.mode,J),J.return=B,B=J),S(B)):o(B,F)}return function(B,F,I,J){try{Qo=0;var ye=lt(B,F,I,J);return Ir=null,ye}catch(pe){if(pe===Ur||pe===Oi)throw pe;var Ye=fn(29,pe,null,B.mode);return Ye.lanes=J,Ye.return=B,Ye}finally{}}}var rr=np(!0),ap=np(!1),il=!1;function gd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pd(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function cl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ul(t,n,o){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(We&2)!==0){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=Ni(t),Vg(t,null,o),n}return ji(t,s,n,o),Ni(t)}function Jo(t,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,o|=s,n.lanes=o,Wh(t,o)}}function vd(t,n){var o=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var d=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?d=h=S:h=h.next=S,o=o.next}while(o!==null);h===null?d=h=n:h=h.next=n}else d=h=n;o={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=n:t.next=n,o.lastBaseUpdate=n}var xd=!1;function es(){if(xd){var t=Br;if(t!==null)throw t}}function ts(t,n,o,s){xd=!1;var d=t.updateQueue;il=!1;var h=d.firstBaseUpdate,S=d.lastBaseUpdate,M=d.shared.pending;if(M!==null){d.shared.pending=null;var P=M,$=P.next;P.next=null,S===null?h=$:S.next=$,S=P;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,M=Q.lastBaseUpdate,M!==S&&(M===null?Q.firstBaseUpdate=$:M.next=$,Q.lastBaseUpdate=P))}if(h!==null){var ne=d.baseState;S=0,Q=$=P=null,M=h;do{var G=M.lane&-536870913,q=G!==M.lane;if(q?(Be&G)===G:(s&G)===G){G!==0&&G===Vr&&(xd=!0),Q!==null&&(Q=Q.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ge=t,Ce=M;G=n;var lt=o;switch(Ce.tag){case 1:if(ge=Ce.payload,typeof ge=="function"){ne=ge.call(lt,ne,G);break e}ne=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ce.payload,G=typeof ge=="function"?ge.call(lt,ne,G):ge,G==null)break e;ne=y({},ne,G);break e;case 2:il=!0}}G=M.callback,G!==null&&(t.flags|=64,q&&(t.flags|=8192),q=d.callbacks,q===null?d.callbacks=[G]:q.push(G))}else q={lane:G,tag:M.tag,payload:M.payload,callback:M.callback,next:null},Q===null?($=Q=q,P=ne):Q=Q.next=q,S|=G;if(M=M.next,M===null){if(M=d.shared.pending,M===null)break;q=M,M=q.next,q.next=null,d.lastBaseUpdate=q,d.shared.pending=null}}while(!0);Q===null&&(P=ne),d.baseState=P,d.firstBaseUpdate=$,d.lastBaseUpdate=Q,h===null&&(d.shared.lanes=0),gl|=S,t.lanes=S,t.memoizedState=ne}}function lp(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function rp(t,n){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)lp(o[t],n)}var $r=R(null),zi=R(0);function op(t,n){t=Aa,X(zi,t),X($r,n),Aa=t|n.baseLanes}function yd(){X(zi,Aa),X($r,$r.current)}function bd(){Aa=zi.current,V($r),V(zi)}var mn=R(null),kn=null;function dl(t){var n=t.alternate;X(ht,ht.current&1),X(mn,t),kn===null&&(n===null||$r.current!==null||n.memoizedState!==null)&&(kn=t)}function Sd(t){X(ht,ht.current),X(mn,t),kn===null&&(kn=t)}function sp(t){t.tag===22?(X(ht,ht.current),X(mn,t),kn===null&&(kn=t)):fl()}function fl(){X(ht,ht.current),X(mn,mn.current)}function hn(t){V(mn),kn===t&&(kn=null),V(ht)}var ht=R(0);function Pi(t){for(var n=t;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Df(o)||Rf(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ma=0,Oe=null,nt=null,xt=null,Hi=!1,Gr=!1,or=!1,Fi=0,ns=0,Yr=null,D1=0;function dt(){throw Error(r(321))}function wd(t,n){if(n===null)return!1;for(var o=0;o<n.length&&o<t.length;o++)if(!dn(t[o],n[o]))return!1;return!0}function Cd(t,n,o,s,d,h){return Ma=h,Oe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=t===null||t.memoizedState===null?$p:Fd,or=!1,h=o(s,d),or=!1,Gr&&(h=cp(n,o,s,d)),ip(t),h}function ip(t){A.H=rs;var n=nt!==null&&nt.next!==null;if(Ma=0,xt=nt=Oe=null,Hi=!1,ns=0,Yr=null,n)throw Error(r(300));t===null||yt||(t=t.dependencies,t!==null&&Di(t)&&(yt=!0))}function cp(t,n,o,s){Oe=t;var d=0;do{if(Gr&&(Yr=null),ns=0,Gr=!1,25<=d)throw Error(r(301));if(d+=1,xt=nt=null,t.updateQueue!=null){var h=t.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}A.H=Gp,h=n(o,s)}while(Gr);return h}function R1(){var t=A.H,n=t.useState()[0];return n=typeof n.then=="function"?as(n):n,t=t.useState()[0],(nt!==null?nt.memoizedState:null)!==t&&(Oe.flags|=1024),n}function jd(){var t=Fi!==0;return Fi=0,t}function Nd(t,n,o){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~o}function Md(t){if(Hi){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Hi=!1}Ma=0,xt=nt=Oe=null,Gr=!1,ns=Fi=0,Yr=null}function Wt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Oe.memoizedState=xt=t:xt=xt.next=t,xt}function gt(){if(nt===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=nt.next;var n=xt===null?Oe.memoizedState:xt.next;if(n!==null)xt=n,nt=t;else{if(t===null)throw Oe.alternate===null?Error(r(467)):Error(r(310));nt=t,t={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},xt===null?Oe.memoizedState=xt=t:xt=xt.next=t}return xt}function Li(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(t){var n=ns;return ns+=1,Yr===null&&(Yr=[]),t=Jg(Yr,t,n),n=Oe,(xt===null?n.memoizedState:xt.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?$p:Fd),t}function Vi(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return as(t);if(t.$$typeof===D)return Ht(t)}throw Error(r(438,String(t)))}function _d(t){var n=null,o=Oe.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var s=Oe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Li(),Oe.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(t),s=0;s<t;s++)o[s]=Y;return n.index++,o}function _a(t,n){return typeof n=="function"?n(t):n}function Bi(t){var n=gt();return Dd(n,nt,t)}function Dd(t,n,o){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=o;var d=t.baseQueue,h=s.pending;if(h!==null){if(d!==null){var S=d.next;d.next=h.next,h.next=S}n.baseQueue=d=h,s.pending=null}if(h=t.baseState,d===null)t.memoizedState=h;else{n=d.next;var M=S=null,P=null,$=n,Q=!1;do{var ne=$.lane&-536870913;if(ne!==$.lane?(Be&ne)===ne:(Ma&ne)===ne){var G=$.revertLane;if(G===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),ne===Vr&&(Q=!0);else if((Ma&G)===G){$=$.next,G===Vr&&(Q=!0);continue}else ne={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},P===null?(M=P=ne,S=h):P=P.next=ne,Oe.lanes|=G,gl|=G;ne=$.action,or&&o(h,ne),h=$.hasEagerState?$.eagerState:o(h,ne)}else G={lane:ne,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},P===null?(M=P=G,S=h):P=P.next=G,Oe.lanes|=ne,gl|=ne;$=$.next}while($!==null&&$!==n);if(P===null?S=h:P.next=M,!dn(h,t.memoizedState)&&(yt=!0,Q&&(o=Br,o!==null)))throw o;t.memoizedState=h,t.baseState=S,t.baseQueue=P,s.lastRenderedState=h}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Rd(t){var n=gt(),o=n.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=t;var s=o.dispatch,d=o.pending,h=n.memoizedState;if(d!==null){o.pending=null;var S=d=d.next;do h=t(h,S.action),S=S.next;while(S!==d);dn(h,n.memoizedState)||(yt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),o.lastRenderedState=h}return[h,s]}function up(t,n,o){var s=Oe,d=gt(),h=$e;if(h){if(o===void 0)throw Error(r(407));o=o()}else o=n();var S=!dn((nt||d).memoizedState,o);if(S&&(d.memoizedState=o,yt=!0),d=d.queue,Td(mp.bind(null,s,d,t),[t]),d.getSnapshot!==n||S||xt!==null&&xt.memoizedState.tag&1){if(s.flags|=2048,qr(9,{destroy:void 0},fp.bind(null,s,d,o,n),null),rt===null)throw Error(r(349));h||(Ma&127)!==0||dp(s,n,o)}return o}function dp(t,n,o){t.flags|=16384,t={getSnapshot:n,value:o},n=Oe.updateQueue,n===null?(n=Li(),Oe.updateQueue=n,n.stores=[t]):(o=n.stores,o===null?n.stores=[t]:o.push(t))}function fp(t,n,o,s){n.value=o,n.getSnapshot=s,hp(n)&&gp(t)}function mp(t,n,o){return o(function(){hp(n)&&gp(t)})}function hp(t){var n=t.getSnapshot;t=t.value;try{var o=n();return!dn(t,o)}catch{return!0}}function gp(t){var n=Ql(t,2);n!==null&&rn(n,t,2)}function Ed(t){var n=Wt();if(typeof t=="function"){var o=t;if(t=o(),or){Zn(!0);try{o()}finally{Zn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:t},n}function pp(t,n,o,s){return t.baseState=o,Dd(t,nt,typeof s=="function"?s:_a)}function E1(t,n,o,s,d){if($i(t))throw Error(r(485));if(t=n.action,t!==null){var h={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){h.listeners.push(S)}};A.T!==null?o(!0):h.isTransition=!1,s(h),o=n.pending,o===null?(h.next=n.pending=h,vp(n,h)):(h.next=o.next,n.pending=o.next=h)}}function vp(t,n){var o=n.action,s=n.payload,d=t.state;if(n.isTransition){var h=A.T,S={};A.T=S;try{var M=o(d,s),P=A.S;P!==null&&P(S,M),xp(t,n,M)}catch($){Od(t,n,$)}finally{h!==null&&S.types!==null&&(h.types=S.types),A.T=h}}else try{h=o(d,s),xp(t,n,h)}catch($){Od(t,n,$)}}function xp(t,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(s){yp(t,n,s)},function(s){return Od(t,n,s)}):yp(t,n,o)}function yp(t,n,o){n.status="fulfilled",n.value=o,bp(n),t.state=o,n=t.pending,n!==null&&(o=n.next,o===n?t.pending=null:(o=o.next,n.next=o,vp(t,o)))}function Od(t,n,o){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=o,bp(n),n=n.next;while(n!==s)}t.action=null}function bp(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Sp(t,n){return n}function wp(t,n){if($e){var o=rt.formState;if(o!==null){e:{var s=Oe;if($e){if(st){t:{for(var d=st,h=Tn;d.nodeType!==8;){if(!h){d=null;break t}if(d=An(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){st=An(d.nextSibling),s=d.data==="F!";break e}}ol(s)}s=!1}s&&(n=o[0])}}return o=Wt(),o.memoizedState=o.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sp,lastRenderedState:n},o.queue=s,o=Bp.bind(null,Oe,s),s.dispatch=o,s=Ed(!1),h=Hd.bind(null,Oe,!1,s.queue),s=Wt(),d={state:n,dispatch:null,action:t,pending:null},s.queue=d,o=E1.bind(null,Oe,d,h,o),d.dispatch=o,s.memoizedState=t,[n,o,!1]}function Cp(t){var n=gt();return jp(n,nt,t)}function jp(t,n,o){if(n=Dd(t,n,Sp)[0],t=Bi(_a)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=as(n)}catch(S){throw S===Ur?Oi:S}else s=n;n=gt();var d=n.queue,h=d.dispatch;return o!==n.memoizedState&&(Oe.flags|=2048,qr(9,{destroy:void 0},O1.bind(null,d,o),null)),[s,h,t]}function O1(t,n){t.action=n}function Np(t){var n=gt(),o=nt;if(o!==null)return jp(n,o,t);gt(),n=n.memoizedState,o=gt();var s=o.queue.dispatch;return o.memoizedState=t,[n,s,!1]}function qr(t,n,o,s){return t={tag:t,create:o,deps:s,inst:n,next:null},n=Oe.updateQueue,n===null&&(n=Li(),Oe.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=t.next=t:(s=o.next,o.next=t,t.next=s,n.lastEffect=t),t}function Mp(){return gt().memoizedState}function Ui(t,n,o,s){var d=Wt();Oe.flags|=t,d.memoizedState=qr(1|n,{destroy:void 0},o,s===void 0?null:s)}function Ii(t,n,o,s){var d=gt();s=s===void 0?null:s;var h=d.memoizedState.inst;nt!==null&&s!==null&&wd(s,nt.memoizedState.deps)?d.memoizedState=qr(n,h,o,s):(Oe.flags|=t,d.memoizedState=qr(1|n,h,o,s))}function _p(t,n){Ui(8390656,8,t,n)}function Td(t,n){Ii(2048,8,t,n)}function T1(t){Oe.flags|=4;var n=Oe.updateQueue;if(n===null)n=Li(),Oe.updateQueue=n,n.events=[t];else{var o=n.events;o===null?n.events=[t]:o.push(t)}}function Dp(t){var n=gt().memoizedState;return T1({ref:n,nextImpl:t}),function(){if((We&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Rp(t,n){return Ii(4,2,t,n)}function Ep(t,n){return Ii(4,4,t,n)}function Op(t,n){if(typeof n=="function"){t=t();var o=n(t);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Tp(t,n,o){o=o!=null?o.concat([t]):null,Ii(4,4,Op.bind(null,n,t),o)}function kd(){}function kp(t,n){var o=gt();n=n===void 0?null:n;var s=o.memoizedState;return n!==null&&wd(n,s[1])?s[0]:(o.memoizedState=[t,n],t)}function Ap(t,n){var o=gt();n=n===void 0?null:n;var s=o.memoizedState;if(n!==null&&wd(n,s[1]))return s[0];if(s=t(),or){Zn(!0);try{t()}finally{Zn(!1)}}return o.memoizedState=[s,n],s}function Ad(t,n,o){return o===void 0||(Ma&1073741824)!==0&&(Be&261930)===0?t.memoizedState=n:(t.memoizedState=o,t=zv(),Oe.lanes|=t,gl|=t,o)}function zp(t,n,o,s){return dn(o,n)?o:$r.current!==null?(t=Ad(t,o,s),dn(t,n)||(yt=!0),t):(Ma&42)===0||(Ma&1073741824)!==0&&(Be&261930)===0?(yt=!0,t.memoizedState=o):(t=zv(),Oe.lanes|=t,gl|=t,n)}function Pp(t,n,o,s,d){var h=U.p;U.p=h!==0&&8>h?h:8;var S=A.T,M={};A.T=M,Hd(t,!1,n,o);try{var P=d(),$=A.S;if($!==null&&$(M,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var Q=_1(P,s);ls(t,n,Q,vn(t))}else ls(t,n,s,vn(t))}catch(ne){ls(t,n,{then:function(){},status:"rejected",reason:ne},vn())}finally{U.p=h,S!==null&&M.types!==null&&(S.types=M.types),A.T=S}}function k1(){}function zd(t,n,o,s){if(t.tag!==5)throw Error(r(476));var d=Hp(t).queue;Pp(t,d,n,ae,o===null?k1:function(){return Fp(t),o(s)})}function Hp(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:ae},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:o},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Fp(t){var n=Hp(t);n.next===null&&(n=t.alternate.memoizedState),ls(t,n.next.queue,{},vn())}function Pd(){return Ht(Ss)}function Lp(){return gt().memoizedState}function Vp(){return gt().memoizedState}function A1(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var o=vn();t=cl(o);var s=ul(n,t,o);s!==null&&(rn(s,n,o),Jo(s,n,o)),n={cache:dd()},t.payload=n;return}n=n.return}}function z1(t,n,o){var s=vn();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$i(t)?Up(n,o):(o=ed(t,n,o,s),o!==null&&(rn(o,t,s),Ip(o,n,s)))}function Bp(t,n,o){var s=vn();ls(t,n,o,s)}function ls(t,n,o,s){var d={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if($i(t))Up(n,d);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var S=n.lastRenderedState,M=h(S,o);if(d.hasEagerState=!0,d.eagerState=M,dn(M,S))return ji(t,n,d,0),rt===null&&Ci(),!1}catch{}finally{}if(o=ed(t,n,d,s),o!==null)return rn(o,t,s),Ip(o,n,s),!0}return!1}function Hd(t,n,o,s){if(s={lane:2,revertLane:pf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$i(t)){if(n)throw Error(r(479))}else n=ed(t,o,s,2),n!==null&&rn(n,t,2)}function $i(t){var n=t.alternate;return t===Oe||n!==null&&n===Oe}function Up(t,n){Gr=Hi=!0;var o=t.pending;o===null?n.next=n:(n.next=o.next,o.next=n),t.pending=n}function Ip(t,n,o){if((o&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,o|=s,n.lanes=o,Wh(t,o)}}var rs={readContext:Ht,use:Vi,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};rs.useEffectEvent=dt;var $p={readContext:Ht,use:Vi,useCallback:function(t,n){return Wt().memoizedState=[t,n===void 0?null:n],t},useContext:Ht,useEffect:_p,useImperativeHandle:function(t,n,o){o=o!=null?o.concat([t]):null,Ui(4194308,4,Op.bind(null,n,t),o)},useLayoutEffect:function(t,n){return Ui(4194308,4,t,n)},useInsertionEffect:function(t,n){Ui(4,2,t,n)},useMemo:function(t,n){var o=Wt();n=n===void 0?null:n;var s=t();if(or){Zn(!0);try{t()}finally{Zn(!1)}}return o.memoizedState=[s,n],s},useReducer:function(t,n,o){var s=Wt();if(o!==void 0){var d=o(n);if(or){Zn(!0);try{o(n)}finally{Zn(!1)}}}else d=n;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=z1.bind(null,Oe,t),[s.memoizedState,t]},useRef:function(t){var n=Wt();return t={current:t},n.memoizedState=t},useState:function(t){t=Ed(t);var n=t.queue,o=Bp.bind(null,Oe,n);return n.dispatch=o,[t.memoizedState,o]},useDebugValue:kd,useDeferredValue:function(t,n){var o=Wt();return Ad(o,t,n)},useTransition:function(){var t=Ed(!1);return t=Pp.bind(null,Oe,t.queue,!0,!1),Wt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,o){var s=Oe,d=Wt();if($e){if(o===void 0)throw Error(r(407));o=o()}else{if(o=n(),rt===null)throw Error(r(349));(Be&127)!==0||dp(s,n,o)}d.memoizedState=o;var h={value:o,getSnapshot:n};return d.queue=h,_p(mp.bind(null,s,h,t),[t]),s.flags|=2048,qr(9,{destroy:void 0},fp.bind(null,s,h,o,n),null),o},useId:function(){var t=Wt(),n=rt.identifierPrefix;if($e){var o=ea,s=Jn;o=(s&~(1<<32-qt(s)-1)).toString(32)+o,n="_"+n+"R_"+o,o=Fi++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=D1++,n="_"+n+"r_"+o.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Pd,useFormState:wp,useActionState:wp,useOptimistic:function(t){var n=Wt();n.memoizedState=n.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Hd.bind(null,Oe,!0,o),o.dispatch=n,[t,n]},useMemoCache:_d,useCacheRefresh:function(){return Wt().memoizedState=A1.bind(null,Oe)},useEffectEvent:function(t){var n=Wt(),o={impl:t};return n.memoizedState=o,function(){if((We&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},Fd={readContext:Ht,use:Vi,useCallback:kp,useContext:Ht,useEffect:Td,useImperativeHandle:Tp,useInsertionEffect:Rp,useLayoutEffect:Ep,useMemo:Ap,useReducer:Bi,useRef:Mp,useState:function(){return Bi(_a)},useDebugValue:kd,useDeferredValue:function(t,n){var o=gt();return zp(o,nt.memoizedState,t,n)},useTransition:function(){var t=Bi(_a)[0],n=gt().memoizedState;return[typeof t=="boolean"?t:as(t),n]},useSyncExternalStore:up,useId:Lp,useHostTransitionStatus:Pd,useFormState:Cp,useActionState:Cp,useOptimistic:function(t,n){var o=gt();return pp(o,nt,t,n)},useMemoCache:_d,useCacheRefresh:Vp};Fd.useEffectEvent=Dp;var Gp={readContext:Ht,use:Vi,useCallback:kp,useContext:Ht,useEffect:Td,useImperativeHandle:Tp,useInsertionEffect:Rp,useLayoutEffect:Ep,useMemo:Ap,useReducer:Rd,useRef:Mp,useState:function(){return Rd(_a)},useDebugValue:kd,useDeferredValue:function(t,n){var o=gt();return nt===null?Ad(o,t,n):zp(o,nt.memoizedState,t,n)},useTransition:function(){var t=Rd(_a)[0],n=gt().memoizedState;return[typeof t=="boolean"?t:as(t),n]},useSyncExternalStore:up,useId:Lp,useHostTransitionStatus:Pd,useFormState:Np,useActionState:Np,useOptimistic:function(t,n){var o=gt();return nt!==null?pp(o,nt,t,n):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:_d,useCacheRefresh:Vp};Gp.useEffectEvent=Dp;function Ld(t,n,o,s){n=t.memoizedState,o=o(s,n),o=o==null?n:y({},n,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Vd={enqueueSetState:function(t,n,o){t=t._reactInternals;var s=vn(),d=cl(s);d.payload=n,o!=null&&(d.callback=o),n=ul(t,d,s),n!==null&&(rn(n,t,s),Jo(n,t,s))},enqueueReplaceState:function(t,n,o){t=t._reactInternals;var s=vn(),d=cl(s);d.tag=1,d.payload=n,o!=null&&(d.callback=o),n=ul(t,d,s),n!==null&&(rn(n,t,s),Jo(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var o=vn(),s=cl(o);s.tag=2,n!=null&&(s.callback=n),n=ul(t,s,o),n!==null&&(rn(n,t,o),Jo(n,t,o))}};function Yp(t,n,o,s,d,h,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,h,S):n.prototype&&n.prototype.isPureReactComponent?!Go(o,s)||!Go(d,h):!0}function qp(t,n,o,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==t&&Vd.enqueueReplaceState(n,n.state,null)}function sr(t,n){var o=n;if("ref"in n){o={};for(var s in n)s!=="ref"&&(o[s]=n[s])}if(t=t.defaultProps){o===n&&(o=y({},o));for(var d in t)o[d]===void 0&&(o[d]=t[d])}return o}function Wp(t){wi(t)}function Kp(t){console.error(t)}function Xp(t){wi(t)}function Gi(t,n){try{var o=t.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Qp(t,n,o){try{var s=t.onCaughtError;s(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Bd(t,n,o){return o=cl(o),o.tag=3,o.payload={element:null},o.callback=function(){Gi(t,n)},o}function Zp(t){return t=cl(t),t.tag=3,t}function Jp(t,n,o,s){var d=o.type.getDerivedStateFromError;if(typeof d=="function"){var h=s.value;t.payload=function(){return d(h)},t.callback=function(){Qp(n,o,s)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Qp(n,o,s),typeof d!="function"&&(pl===null?pl=new Set([this]):pl.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function P1(t,n,o,s,d){if(o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=o.alternate,n!==null&&Lr(n,o,d,!0),o=mn.current,o!==null){switch(o.tag){case 31:case 13:return kn===null?ac():o.alternate===null&&ft===0&&(ft=3),o.flags&=-257,o.flags|=65536,o.lanes=d,s===Ti?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([s]):n.add(s),mf(t,s,d)),!1;case 22:return o.flags|=65536,s===Ti?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([s]):o.add(s)),mf(t,s,d)),!1}throw Error(r(435,o.tag))}return mf(t,s,d),ac(),!1}if($e)return n=mn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==od&&(t=Error(r(422),{cause:s}),Wo(Rn(t,o)))):(s!==od&&(n=Error(r(423),{cause:s}),Wo(Rn(n,o))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=Rn(s,o),d=Bd(t.stateNode,s,d),vd(t,d),ft!==4&&(ft=2)),!1;var h=Error(r(520),{cause:s});if(h=Rn(h,o),ms===null?ms=[h]:ms.push(h),ft!==4&&(ft=2),n===null)return!0;s=Rn(s,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,t=d&-d,o.lanes|=t,t=Bd(o.stateNode,s,t),vd(o,t),!1;case 1:if(n=o.type,h=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(pl===null||!pl.has(h))))return o.flags|=65536,d&=-d,o.lanes|=d,d=Zp(d),Jp(d,t,o,s),vd(o,d),!1}o=o.return}while(o!==null);return!1}var Ud=Error(r(461)),yt=!1;function Ft(t,n,o,s){n.child=t===null?ap(n,null,o,s):rr(n,t.child,o,s)}function ev(t,n,o,s,d){o=o.render;var h=n.ref;if("ref"in s){var S={};for(var M in s)M!=="ref"&&(S[M]=s[M])}else S=s;return tr(n),s=Cd(t,n,o,S,h,d),M=jd(),t!==null&&!yt?(Nd(t,n,d),Da(t,n,d)):($e&&M&&ld(n),n.flags|=1,Ft(t,n,s,d),n.child)}function tv(t,n,o,s,d){if(t===null){var h=o.type;return typeof h=="function"&&!td(h)&&h.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=h,nv(t,n,h,s,d)):(t=Mi(o.type,null,s,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(h=t.child,!Xd(t,d)){var S=h.memoizedProps;if(o=o.compare,o=o!==null?o:Go,o(S,s)&&t.ref===n.ref)return Da(t,n,d)}return n.flags|=1,t=wa(h,s),t.ref=n.ref,t.return=n,n.child=t}function nv(t,n,o,s,d){if(t!==null){var h=t.memoizedProps;if(Go(h,s)&&t.ref===n.ref)if(yt=!1,n.pendingProps=s=h,Xd(t,d))(t.flags&131072)!==0&&(yt=!0);else return n.lanes=t.lanes,Da(t,n,d)}return Id(t,n,o,s,d)}function av(t,n,o,s){var d=s.children,h=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,t!==null){for(s=n.child=t.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~h}else s=0,n.child=null;return lv(t,n,h,o,s)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ei(n,h!==null?h.cachePool:null),h!==null?op(n,h):yd(),sp(n);else return s=n.lanes=536870912,lv(t,n,h!==null?h.baseLanes|o:o,o,s)}else h!==null?(Ei(n,h.cachePool),op(n,h),fl(),n.memoizedState=null):(t!==null&&Ei(n,null),yd(),fl());return Ft(t,n,d,o),n.child}function os(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function lv(t,n,o,s,d){var h=md();return h=h===null?null:{parent:vt._currentValue,pool:h},n.memoizedState={baseLanes:o,cachePool:h},t!==null&&Ei(n,null),yd(),sp(n),t!==null&&Lr(t,n,s,!0),n.childLanes=d,null}function Yi(t,n){return n=Wi({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function rv(t,n,o){return rr(n,t.child,null,o),t=Yi(n,n.pendingProps),t.flags|=2,hn(n),n.memoizedState=null,t}function H1(t,n,o){var s=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if($e){if(s.mode==="hidden")return t=Yi(n,s),n.lanes=536870912,os(null,t);if(Sd(n),(t=st)?(t=vx(t,Tn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ll!==null?{id:Jn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},o=Ug(t),o.return=n,n.child=o,Pt=n,st=null)):t=null,t===null)throw ol(n);return n.lanes=536870912,null}return Yi(n,s)}var h=t.memoizedState;if(h!==null){var S=h.dehydrated;if(Sd(n),d)if(n.flags&256)n.flags&=-257,n=rv(t,n,o);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(yt||Lr(t,n,o,!1),d=(o&t.childLanes)!==0,yt||d){if(s=rt,s!==null&&(S=Kh(s,o),S!==0&&S!==h.retryLane))throw h.retryLane=S,Ql(t,S),rn(s,t,S),Ud;ac(),n=rv(t,n,o)}else t=h.treeContext,st=An(S.nextSibling),Pt=n,$e=!0,rl=null,Tn=!1,t!==null&&Gg(n,t),n=Yi(n,s),n.flags|=4096;return n}return t=wa(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function qi(t,n){var o=n.ref;if(o===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(t===null||t.ref!==o)&&(n.flags|=4194816)}}function Id(t,n,o,s,d){return tr(n),o=Cd(t,n,o,s,void 0,d),s=jd(),t!==null&&!yt?(Nd(t,n,d),Da(t,n,d)):($e&&s&&ld(n),n.flags|=1,Ft(t,n,o,d),n.child)}function ov(t,n,o,s,d,h){return tr(n),n.updateQueue=null,o=cp(n,s,o,d),ip(t),s=jd(),t!==null&&!yt?(Nd(t,n,h),Da(t,n,h)):($e&&s&&ld(n),n.flags|=1,Ft(t,n,o,h),n.child)}function sv(t,n,o,s,d){if(tr(n),n.stateNode===null){var h=zr,S=o.contextType;typeof S=="object"&&S!==null&&(h=Ht(S)),h=new o(s,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Vd,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=s,h.state=n.memoizedState,h.refs={},gd(n),S=o.contextType,h.context=typeof S=="object"&&S!==null?Ht(S):zr,h.state=n.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(Ld(n,o,S,s),h.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(S=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),S!==h.state&&Vd.enqueueReplaceState(h,h.state,null),ts(n,s,h,d),es(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){h=n.stateNode;var M=n.memoizedProps,P=sr(o,M);h.props=P;var $=h.context,Q=o.contextType;S=zr,typeof Q=="object"&&Q!==null&&(S=Ht(Q));var ne=o.getDerivedStateFromProps;Q=typeof ne=="function"||typeof h.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,Q||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(M||$!==S)&&qp(n,h,s,S),il=!1;var G=n.memoizedState;h.state=G,ts(n,s,h,d),es(),$=n.memoizedState,M||G!==$||il?(typeof ne=="function"&&(Ld(n,o,ne,s),$=n.memoizedState),(P=il||Yp(n,o,P,s,G,$,S))?(Q||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=$),h.props=s,h.state=$,h.context=S,s=P):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{h=n.stateNode,pd(t,n),S=n.memoizedProps,Q=sr(o,S),h.props=Q,ne=n.pendingProps,G=h.context,$=o.contextType,P=zr,typeof $=="object"&&$!==null&&(P=Ht($)),M=o.getDerivedStateFromProps,($=typeof M=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S!==ne||G!==P)&&qp(n,h,s,P),il=!1,G=n.memoizedState,h.state=G,ts(n,s,h,d),es();var q=n.memoizedState;S!==ne||G!==q||il||t!==null&&t.dependencies!==null&&Di(t.dependencies)?(typeof M=="function"&&(Ld(n,o,M,s),q=n.memoizedState),(Q=il||Yp(n,o,Q,s,G,q,P)||t!==null&&t.dependencies!==null&&Di(t.dependencies))?($||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,q,P),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,q,P)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=q),h.props=s,h.state=q,h.context=P,s=Q):(typeof h.componentDidUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(n.flags|=1024),s=!1)}return h=s,qi(t,n),s=(n.flags&128)!==0,h||s?(h=n.stateNode,o=s&&typeof o.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,t!==null&&s?(n.child=rr(n,t.child,null,d),n.child=rr(n,null,o,d)):Ft(t,n,o,d),n.memoizedState=h.state,t=n.child):t=Da(t,n,d),t}function iv(t,n,o,s){return Jl(),n.flags|=256,Ft(t,n,o,s),n.child}var $d={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gd(t){return{baseLanes:t,cachePool:Qg()}}function Yd(t,n,o){return t=t!==null?t.childLanes&~o:0,n&&(t|=pn),t}function cv(t,n,o){var s=n.pendingProps,d=!1,h=(n.flags&128)!==0,S;if((S=h)||(S=t!==null&&t.memoizedState===null?!1:(ht.current&2)!==0),S&&(d=!0,n.flags&=-129),S=(n.flags&32)!==0,n.flags&=-33,t===null){if($e){if(d?dl(n):fl(),(t=st)?(t=vx(t,Tn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ll!==null?{id:Jn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},o=Ug(t),o.return=n,n.child=o,Pt=n,st=null)):t=null,t===null)throw ol(n);return Rf(t)?n.lanes=32:n.lanes=536870912,null}var M=s.children;return s=s.fallback,d?(fl(),d=n.mode,M=Wi({mode:"hidden",children:M},d),s=Zl(s,d,o,null),M.return=n,s.return=n,M.sibling=s,n.child=M,s=n.child,s.memoizedState=Gd(o),s.childLanes=Yd(t,S,o),n.memoizedState=$d,os(null,s)):(dl(n),qd(n,M))}var P=t.memoizedState;if(P!==null&&(M=P.dehydrated,M!==null)){if(h)n.flags&256?(dl(n),n.flags&=-257,n=Wd(t,n,o)):n.memoizedState!==null?(fl(),n.child=t.child,n.flags|=128,n=null):(fl(),M=s.fallback,d=n.mode,s=Wi({mode:"visible",children:s.children},d),M=Zl(M,d,o,null),M.flags|=2,s.return=n,M.return=n,s.sibling=M,n.child=s,rr(n,t.child,null,o),s=n.child,s.memoizedState=Gd(o),s.childLanes=Yd(t,S,o),n.memoizedState=$d,n=os(null,s));else if(dl(n),Rf(M)){if(S=M.nextSibling&&M.nextSibling.dataset,S)var $=S.dgst;S=$,s=Error(r(419)),s.stack="",s.digest=S,Wo({value:s,source:null,stack:null}),n=Wd(t,n,o)}else if(yt||Lr(t,n,o,!1),S=(o&t.childLanes)!==0,yt||S){if(S=rt,S!==null&&(s=Kh(S,o),s!==0&&s!==P.retryLane))throw P.retryLane=s,Ql(t,s),rn(S,t,s),Ud;Df(M)||ac(),n=Wd(t,n,o)}else Df(M)?(n.flags|=192,n.child=t.child,n=null):(t=P.treeContext,st=An(M.nextSibling),Pt=n,$e=!0,rl=null,Tn=!1,t!==null&&Gg(n,t),n=qd(n,s.children),n.flags|=4096);return n}return d?(fl(),M=s.fallback,d=n.mode,P=t.child,$=P.sibling,s=wa(P,{mode:"hidden",children:s.children}),s.subtreeFlags=P.subtreeFlags&65011712,$!==null?M=wa($,M):(M=Zl(M,d,o,null),M.flags|=2),M.return=n,s.return=n,s.sibling=M,n.child=s,os(null,s),s=n.child,M=t.child.memoizedState,M===null?M=Gd(o):(d=M.cachePool,d!==null?(P=vt._currentValue,d=d.parent!==P?{parent:P,pool:P}:d):d=Qg(),M={baseLanes:M.baseLanes|o,cachePool:d}),s.memoizedState=M,s.childLanes=Yd(t,S,o),n.memoizedState=$d,os(t.child,s)):(dl(n),o=t.child,t=o.sibling,o=wa(o,{mode:"visible",children:s.children}),o.return=n,o.sibling=null,t!==null&&(S=n.deletions,S===null?(n.deletions=[t],n.flags|=16):S.push(t)),n.child=o,n.memoizedState=null,o)}function qd(t,n){return n=Wi({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Wi(t,n){return t=fn(22,t,null,n),t.lanes=0,t}function Wd(t,n,o){return rr(n,t.child,null,o),t=qd(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function uv(t,n,o){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),cd(t.return,n,o)}function Kd(t,n,o,s,d,h){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:d,treeForkCount:h}:(S.isBackwards=n,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=o,S.tailMode=d,S.treeForkCount=h)}function dv(t,n,o){var s=n.pendingProps,d=s.revealOrder,h=s.tail;s=s.children;var S=ht.current,M=(S&2)!==0;if(M?(S=S&1|2,n.flags|=128):S&=1,X(ht,S),Ft(t,n,s,o),s=$e?qo:0,!M&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&uv(t,o,n);else if(t.tag===19)uv(t,o,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(o=n.child,d=null;o!==null;)t=o.alternate,t!==null&&Pi(t)===null&&(d=o),o=o.sibling;o=d,o===null?(d=n.child,n.child=null):(d=o.sibling,o.sibling=null),Kd(n,!1,d,o,h,s);break;case"backwards":case"unstable_legacy-backwards":for(o=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Pi(t)===null){n.child=d;break}t=d.sibling,d.sibling=o,o=d,d=t}Kd(n,!0,o,null,h,s);break;case"together":Kd(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Da(t,n,o){if(t!==null&&(n.dependencies=t.dependencies),gl|=n.lanes,(o&n.childLanes)===0)if(t!==null){if(Lr(t,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,o=wa(t,t.pendingProps),n.child=o,o.return=n;t.sibling!==null;)t=t.sibling,o=o.sibling=wa(t,t.pendingProps),o.return=n;o.sibling=null}return n.child}function Xd(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Di(t)))}function F1(t,n,o){switch(n.tag){case 3:ue(n,n.stateNode.containerInfo),sl(n,vt,t.memoizedState.cache),Jl();break;case 27:case 5:Se(n);break;case 4:ue(n,n.stateNode.containerInfo);break;case 10:sl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Sd(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(dl(n),n.flags|=128,null):(o&n.child.childLanes)!==0?cv(t,n,o):(dl(n),t=Da(t,n,o),t!==null?t.sibling:null);dl(n);break;case 19:var d=(t.flags&128)!==0;if(s=(o&n.childLanes)!==0,s||(Lr(t,n,o,!1),s=(o&n.childLanes)!==0),d){if(s)return dv(t,n,o);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),X(ht,ht.current),s)break;return null;case 22:return n.lanes=0,av(t,n,o,n.pendingProps);case 24:sl(n,vt,t.memoizedState.cache)}return Da(t,n,o)}function fv(t,n,o){if(t!==null)if(t.memoizedProps!==n.pendingProps)yt=!0;else{if(!Xd(t,o)&&(n.flags&128)===0)return yt=!1,F1(t,n,o);yt=(t.flags&131072)!==0}else yt=!1,$e&&(n.flags&1048576)!==0&&$g(n,qo,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=ar(n.elementType),n.type=t,typeof t=="function")td(t)?(s=sr(t,s),n.tag=1,n=sv(null,n,t,s,o)):(n.tag=0,n=Id(null,n,t,s,o));else{if(t!=null){var d=t.$$typeof;if(d===k){n.tag=11,n=ev(null,n,t,s,o);break e}else if(d===H){n.tag=14,n=tv(null,n,t,s,o);break e}}throw n=se(t)||t,Error(r(306,n,""))}}return n;case 0:return Id(t,n,n.type,n.pendingProps,o);case 1:return s=n.type,d=sr(s,n.pendingProps),sv(t,n,s,d,o);case 3:e:{if(ue(n,n.stateNode.containerInfo),t===null)throw Error(r(387));s=n.pendingProps;var h=n.memoizedState;d=h.element,pd(t,n),ts(n,s,null,o);var S=n.memoizedState;if(s=S.cache,sl(n,vt,s),s!==h.cache&&ud(n,[vt],o,!0),es(),s=S.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:S.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=iv(t,n,s,o);break e}else if(s!==d){d=Rn(Error(r(424)),n),Wo(d),n=iv(t,n,s,o);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(st=An(t.firstChild),Pt=n,$e=!0,rl=null,Tn=!0,o=ap(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Jl(),s===d){n=Da(t,n,o);break e}Ft(t,n,s,o)}n=n.child}return n;case 26:return qi(t,n),t===null?(o=Cx(n.type,null,n.pendingProps,null))?n.memoizedState=o:$e||(o=n.type,t=n.pendingProps,s=uc(fe.current).createElement(o),s[zt]=n,s[Jt]=t,Lt(s,o,t),Rt(s),n.stateNode=s):n.memoizedState=Cx(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Se(n),t===null&&$e&&(s=n.stateNode=bx(n.type,n.pendingProps,fe.current),Pt=n,Tn=!0,d=st,bl(n.type)?(Ef=d,st=An(s.firstChild)):st=d),Ft(t,n,n.pendingProps.children,o),qi(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&$e&&((d=s=st)&&(s=hC(s,n.type,n.pendingProps,Tn),s!==null?(n.stateNode=s,Pt=n,st=An(s.firstChild),Tn=!1,d=!0):d=!1),d||ol(n)),Se(n),d=n.type,h=n.pendingProps,S=t!==null?t.memoizedProps:null,s=h.children,Nf(d,h)?s=null:S!==null&&Nf(d,S)&&(n.flags|=32),n.memoizedState!==null&&(d=Cd(t,n,R1,null,null,o),Ss._currentValue=d),qi(t,n),Ft(t,n,s,o),n.child;case 6:return t===null&&$e&&((t=o=st)&&(o=gC(o,n.pendingProps,Tn),o!==null?(n.stateNode=o,Pt=n,st=null,t=!0):t=!1),t||ol(n)),null;case 13:return cv(t,n,o);case 4:return ue(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=rr(n,null,s,o):Ft(t,n,s,o),n.child;case 11:return ev(t,n,n.type,n.pendingProps,o);case 7:return Ft(t,n,n.pendingProps,o),n.child;case 8:return Ft(t,n,n.pendingProps.children,o),n.child;case 12:return Ft(t,n,n.pendingProps.children,o),n.child;case 10:return s=n.pendingProps,sl(n,n.type,s.value),Ft(t,n,s.children,o),n.child;case 9:return d=n.type._context,s=n.pendingProps.children,tr(n),d=Ht(d),s=s(d),n.flags|=1,Ft(t,n,s,o),n.child;case 14:return tv(t,n,n.type,n.pendingProps,o);case 15:return nv(t,n,n.type,n.pendingProps,o);case 19:return dv(t,n,o);case 31:return H1(t,n,o);case 22:return av(t,n,o,n.pendingProps);case 24:return tr(n),s=Ht(vt),t===null?(d=md(),d===null&&(d=rt,h=dd(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=o),d=h),n.memoizedState={parent:s,cache:d},gd(n),sl(n,vt,d)):((t.lanes&o)!==0&&(pd(t,n),ts(n,null,null,o),es()),d=t.memoizedState,h=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),sl(n,vt,s)):(s=h.cache,sl(n,vt,s),s!==d.cache&&ud(n,[vt],o,!0))),Ft(t,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Ra(t){t.flags|=4}function Qd(t,n,o,s,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Lv())t.flags|=8192;else throw lr=Ti,hd}else t.flags&=-16777217}function mv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Dx(n))if(Lv())t.flags|=8192;else throw lr=Ti,hd}function Ki(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?di():536870912,t.lanes|=n,Qr|=n)}function ss(t,n){if(!$e)switch(t.tailMode){case"hidden":n=t.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function it(t){var n=t.alternate!==null&&t.alternate.child===t.child,o=0,s=0;if(n)for(var d=t.child;d!==null;)o|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)o|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=o,n}function L1(t,n,o){var s=n.pendingProps;switch(rd(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(n),null;case 1:return it(n),null;case 3:return o=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),Na(vt),ie(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Fr(n)?Ra(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,sd())),it(n),null;case 26:var d=n.type,h=n.memoizedState;return t===null?(Ra(n),h!==null?(it(n),mv(n,h)):(it(n),Qd(n,d,null,s,o))):h?h!==t.memoizedState?(Ra(n),it(n),mv(n,h)):(it(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&Ra(n),it(n),Qd(n,d,t,s,o)),null;case 27:if(Me(n),o=fe.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&Ra(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return it(n),null}t=le.current,Fr(n)?Yg(n):(t=bx(d,s,o),n.stateNode=t,Ra(n))}return it(n),null;case 5:if(Me(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&Ra(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return it(n),null}if(h=le.current,Fr(n))Yg(n);else{var S=uc(fe.current);switch(h){case 1:h=S.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=S.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=S.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?S.createElement(d,{is:s.is}):S.createElement(d)}}h[zt]=n,h[Jt]=s;e:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)h.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break e;for(;S.sibling===null;){if(S.return===null||S.return===n)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=h;e:switch(Lt(h,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ra(n)}}return it(n),Qd(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,o),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&Ra(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(t=fe.current,Fr(n)){if(t=n.stateNode,o=n.memoizedProps,s=null,d=Pt,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[zt]=n,t=!!(t.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||cx(t.nodeValue,o)),t||ol(n,!0)}else t=uc(t).createTextNode(s),t[zt]=n,n.stateNode=t}return it(n),null;case 31:if(o=n.memoizedState,t===null||t.memoizedState!==null){if(s=Fr(n),o!==null){if(t===null){if(!s)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[zt]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),t=!1}else o=sd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return n.flags&256?(hn(n),n):(hn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return it(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Fr(n),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(r(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));d[zt]=n}else Jl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),d=!1}else d=sd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(hn(n),n):(hn(n),null)}return hn(n),(n.flags&128)!==0?(n.lanes=o,n):(o=s!==null,t=t!==null&&t.memoizedState!==null,o&&(s=n.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==d&&(s.flags|=2048)),o!==t&&o&&(n.child.flags|=8192),Ki(n,n.updateQueue),it(n),null);case 4:return ie(),t===null&&bf(n.stateNode.containerInfo),it(n),null;case 10:return Na(n.type),it(n),null;case 19:if(V(ht),s=n.memoizedState,s===null)return it(n),null;if(d=(n.flags&128)!==0,h=s.rendering,h===null)if(d)ss(s,!1);else{if(ft!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(h=Pi(t),h!==null){for(n.flags|=128,ss(s,!1),t=h.updateQueue,n.updateQueue=t,Ki(n,t),n.subtreeFlags=0,t=o,o=n.child;o!==null;)Bg(o,t),o=o.sibling;return X(ht,ht.current&1|2),$e&&Ca(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&At()>ec&&(n.flags|=128,d=!0,ss(s,!1),n.lanes=4194304)}else{if(!d)if(t=Pi(h),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Ki(n,t),ss(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!$e)return it(n),null}else 2*At()-s.renderingStartTime>ec&&o!==536870912&&(n.flags|=128,d=!0,ss(s,!1),n.lanes=4194304);s.isBackwards?(h.sibling=n.child,n.child=h):(t=s.last,t!==null?t.sibling=h:n.child=h,s.last=h)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=At(),t.sibling=null,o=ht.current,X(ht,d?o&1|2:o&1),$e&&Ca(n,s.treeForkCount),t):(it(n),null);case 22:case 23:return hn(n),bd(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(o&536870912)!==0&&(n.flags&128)===0&&(it(n),n.subtreeFlags&6&&(n.flags|=8192)):it(n),o=n.updateQueue,o!==null&&Ki(n,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==o&&(n.flags|=2048),t!==null&&V(nr),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Na(vt),it(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function V1(t,n){switch(rd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Na(vt),ie(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Me(n),null;case 31:if(n.memoizedState!==null){if(hn(n),n.alternate===null)throw Error(r(340));Jl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(hn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Jl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return V(ht),null;case 4:return ie(),null;case 10:return Na(n.type),null;case 22:case 23:return hn(n),bd(),t!==null&&V(nr),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Na(vt),null;case 25:return null;default:return null}}function hv(t,n){switch(rd(n),n.tag){case 3:Na(vt),ie();break;case 26:case 27:case 5:Me(n);break;case 4:ie();break;case 31:n.memoizedState!==null&&hn(n);break;case 13:hn(n);break;case 19:V(ht);break;case 10:Na(n.type);break;case 22:case 23:hn(n),bd(),t!==null&&V(nr);break;case 24:Na(vt)}}function is(t,n){try{var o=n.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var d=s.next;o=d;do{if((o.tag&t)===t){s=void 0;var h=o.create,S=o.inst;s=h(),S.destroy=s}o=o.next}while(o!==d)}}catch(M){Ze(n,n.return,M)}}function ml(t,n,o){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var h=d.next;s=h;do{if((s.tag&t)===t){var S=s.inst,M=S.destroy;if(M!==void 0){S.destroy=void 0,d=n;var P=o,$=M;try{$()}catch(Q){Ze(d,P,Q)}}}s=s.next}while(s!==h)}}catch(Q){Ze(n,n.return,Q)}}function gv(t){var n=t.updateQueue;if(n!==null){var o=t.stateNode;try{rp(n,o)}catch(s){Ze(t,t.return,s)}}}function pv(t,n,o){o.props=sr(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(s){Ze(t,n,s)}}function cs(t,n){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof o=="function"?t.refCleanup=o(s):o.current=s}}catch(d){Ze(t,n,d)}}function ta(t,n){var o=t.ref,s=t.refCleanup;if(o!==null)if(typeof s=="function")try{s()}catch(d){Ze(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(d){Ze(t,n,d)}else o.current=null}function vv(t){var n=t.type,o=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(d){Ze(t,t.return,d)}}function Zd(t,n,o){try{var s=t.stateNode;iC(s,t.type,o,n),s[Jt]=n}catch(d){Ze(t,t.return,d)}}function xv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&bl(t.type)||t.tag===4}function Jd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&bl(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ef(t,n,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(t),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=ba));else if(s!==4&&(s===27&&bl(t.type)&&(o=t.stateNode,n=null),t=t.child,t!==null))for(ef(t,n,o),t=t.sibling;t!==null;)ef(t,n,o),t=t.sibling}function Xi(t,n,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?o.insertBefore(t,n):o.appendChild(t);else if(s!==4&&(s===27&&bl(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Xi(t,n,o),t=t.sibling;t!==null;)Xi(t,n,o),t=t.sibling}function yv(t){var n=t.stateNode,o=t.memoizedProps;try{for(var s=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Lt(n,s,o),n[zt]=t,n[Jt]=o}catch(h){Ze(t,t.return,h)}}var Ea=!1,bt=!1,tf=!1,bv=typeof WeakSet=="function"?WeakSet:Set,Et=null;function B1(t,n){if(t=t.containerInfo,Cf=vc,t=Tg(t),Wu(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var d=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var S=0,M=-1,P=-1,$=0,Q=0,ne=t,G=null;t:for(;;){for(var q;ne!==o||d!==0&&ne.nodeType!==3||(M=S+d),ne!==h||s!==0&&ne.nodeType!==3||(P=S+s),ne.nodeType===3&&(S+=ne.nodeValue.length),(q=ne.firstChild)!==null;)G=ne,ne=q;for(;;){if(ne===t)break t;if(G===o&&++$===d&&(M=S),G===h&&++Q===s&&(P=S),(q=ne.nextSibling)!==null)break;ne=G,G=ne.parentNode}ne=q}o=M===-1||P===-1?null:{start:M,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(jf={focusedElem:t,selectionRange:o},vc=!1,Et=n;Et!==null;)if(n=Et,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Et=t;else for(;Et!==null;){switch(n=Et,h=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(o=0;o<t.length;o++)d=t[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&h!==null){t=void 0,o=n,d=h.memoizedProps,h=h.memoizedState,s=o.stateNode;try{var ge=sr(o.type,d);t=s.getSnapshotBeforeUpdate(ge,h),s.__reactInternalSnapshotBeforeUpdate=t}catch(Ce){Ze(o,o.return,Ce)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,o=t.nodeType,o===9)_f(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":_f(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=n.sibling,t!==null){t.return=n.return,Et=t;break}Et=n.return}}function Sv(t,n,o){var s=o.flags;switch(o.tag){case 0:case 11:case 15:Ta(t,o),s&4&&is(5,o);break;case 1:if(Ta(t,o),s&4)if(t=o.stateNode,n===null)try{t.componentDidMount()}catch(S){Ze(o,o.return,S)}else{var d=sr(o.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Ze(o,o.return,S)}}s&64&&gv(o),s&512&&cs(o,o.return);break;case 3:if(Ta(t,o),s&64&&(t=o.updateQueue,t!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{rp(t,n)}catch(S){Ze(o,o.return,S)}}break;case 27:n===null&&s&4&&yv(o);case 26:case 5:Ta(t,o),n===null&&s&4&&vv(o),s&512&&cs(o,o.return);break;case 12:Ta(t,o);break;case 31:Ta(t,o),s&4&&jv(t,o);break;case 13:Ta(t,o),s&4&&Nv(t,o),s&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=X1.bind(null,o),pC(t,o))));break;case 22:if(s=o.memoizedState!==null||Ea,!s){n=n!==null&&n.memoizedState!==null||bt,d=Ea;var h=bt;Ea=s,(bt=n)&&!h?ka(t,o,(o.subtreeFlags&8772)!==0):Ta(t,o),Ea=d,bt=h}break;case 30:break;default:Ta(t,o)}}function wv(t){var n=t.alternate;n!==null&&(t.alternate=null,wv(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ou(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ct=null,tn=!1;function Oa(t,n,o){for(o=o.child;o!==null;)Cv(t,n,o),o=o.sibling}function Cv(t,n,o){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(Yl,o)}catch{}switch(o.tag){case 26:bt||ta(o,n),Oa(t,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:bt||ta(o,n);var s=ct,d=tn;bl(o.type)&&(ct=o.stateNode,tn=!1),Oa(t,n,o),xs(o.stateNode),ct=s,tn=d;break;case 5:bt||ta(o,n);case 6:if(s=ct,d=tn,ct=null,Oa(t,n,o),ct=s,tn=d,ct!==null)if(tn)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(o.stateNode)}catch(h){Ze(o,n,h)}else try{ct.removeChild(o.stateNode)}catch(h){Ze(o,n,h)}break;case 18:ct!==null&&(tn?(t=ct,gx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),ro(t)):gx(ct,o.stateNode));break;case 4:s=ct,d=tn,ct=o.stateNode.containerInfo,tn=!0,Oa(t,n,o),ct=s,tn=d;break;case 0:case 11:case 14:case 15:ml(2,o,n),bt||ml(4,o,n),Oa(t,n,o);break;case 1:bt||(ta(o,n),s=o.stateNode,typeof s.componentWillUnmount=="function"&&pv(o,n,s)),Oa(t,n,o);break;case 21:Oa(t,n,o);break;case 22:bt=(s=bt)||o.memoizedState!==null,Oa(t,n,o),bt=s;break;default:Oa(t,n,o)}}function jv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ro(t)}catch(o){Ze(n,n.return,o)}}}function Nv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ro(t)}catch(o){Ze(n,n.return,o)}}function U1(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new bv),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new bv),n;default:throw Error(r(435,t.tag))}}function Qi(t,n){var o=U1(t);n.forEach(function(s){if(!o.has(s)){o.add(s);var d=Q1.bind(null,t,s);s.then(d,d)}})}function nn(t,n){var o=n.deletions;if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],h=t,S=n,M=S;e:for(;M!==null;){switch(M.tag){case 27:if(bl(M.type)){ct=M.stateNode,tn=!1;break e}break;case 5:ct=M.stateNode,tn=!1;break e;case 3:case 4:ct=M.stateNode.containerInfo,tn=!0;break e}M=M.return}if(ct===null)throw Error(r(160));Cv(h,S,d),ct=null,tn=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Mv(n,t),n=n.sibling}var Bn=null;function Mv(t,n){var o=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:nn(n,t),an(t),s&4&&(ml(3,t,t.return),is(3,t),ml(5,t,t.return));break;case 1:nn(n,t),an(t),s&512&&(bt||o===null||ta(o,o.return)),s&64&&Ea&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?s:o.concat(s))));break;case 26:var d=Bn;if(nn(n,t),an(t),s&512&&(bt||o===null||ta(o,o.return)),s&4){var h=o!==null?o.memoizedState:null;if(s=t.memoizedState,o===null)if(s===null)if(t.stateNode===null){e:{s=t.type,o=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":h=d.getElementsByTagName("title")[0],(!h||h[Po]||h[zt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(s),d.head.insertBefore(h,d.querySelector("head > title"))),Lt(h,s,o),h[zt]=t,Rt(h),s=h;break e;case"link":var S=Mx("link","href",d).get(s+(o.href||""));if(S){for(var M=0;M<S.length;M++)if(h=S[M],h.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&h.getAttribute("rel")===(o.rel==null?null:o.rel)&&h.getAttribute("title")===(o.title==null?null:o.title)&&h.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(M,1);break t}}h=d.createElement(s),Lt(h,s,o),d.head.appendChild(h);break;case"meta":if(S=Mx("meta","content",d).get(s+(o.content||""))){for(M=0;M<S.length;M++)if(h=S[M],h.getAttribute("content")===(o.content==null?null:""+o.content)&&h.getAttribute("name")===(o.name==null?null:o.name)&&h.getAttribute("property")===(o.property==null?null:o.property)&&h.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&h.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(M,1);break t}}h=d.createElement(s),Lt(h,s,o),d.head.appendChild(h);break;default:throw Error(r(468,s))}h[zt]=t,Rt(h),s=h}t.stateNode=s}else _x(d,t.type,t.stateNode);else t.stateNode=Nx(d,s,t.memoizedProps);else h!==s?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,s===null?_x(d,t.type,t.stateNode):Nx(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Zd(t,t.memoizedProps,o.memoizedProps)}break;case 27:nn(n,t),an(t),s&512&&(bt||o===null||ta(o,o.return)),o!==null&&s&4&&Zd(t,t.memoizedProps,o.memoizedProps);break;case 5:if(nn(n,t),an(t),s&512&&(bt||o===null||ta(o,o.return)),t.flags&32){d=t.stateNode;try{Dr(d,"")}catch(ge){Ze(t,t.return,ge)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,Zd(t,d,o!==null?o.memoizedProps:d)),s&1024&&(tf=!0);break;case 6:if(nn(n,t),an(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,o=t.stateNode;try{o.nodeValue=s}catch(ge){Ze(t,t.return,ge)}}break;case 3:if(mc=null,d=Bn,Bn=dc(n.containerInfo),nn(n,t),Bn=d,an(t),s&4&&o!==null&&o.memoizedState.isDehydrated)try{ro(n.containerInfo)}catch(ge){Ze(t,t.return,ge)}tf&&(tf=!1,_v(t));break;case 4:s=Bn,Bn=dc(t.stateNode.containerInfo),nn(n,t),an(t),Bn=s;break;case 12:nn(n,t),an(t);break;case 31:nn(n,t),an(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qi(t,s)));break;case 13:nn(n,t),an(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ji=At()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qi(t,s)));break;case 22:d=t.memoizedState!==null;var P=o!==null&&o.memoizedState!==null,$=Ea,Q=bt;if(Ea=$||d,bt=Q||P,nn(n,t),bt=Q,Ea=$,an(t),s&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(o===null||P||Ea||bt||ir(t)),o=null,n=t;;){if(n.tag===5||n.tag===26){if(o===null){P=o=n;try{if(h=P.stateNode,d)S=h.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{M=P.stateNode;var ne=P.memoizedProps.style,G=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;M.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ge){Ze(P,P.return,ge)}}}else if(n.tag===6){if(o===null){P=n;try{P.stateNode.nodeValue=d?"":P.memoizedProps}catch(ge){Ze(P,P.return,ge)}}}else if(n.tag===18){if(o===null){P=n;try{var q=P.stateNode;d?px(q,!0):px(P.stateNode,!1)}catch(ge){Ze(P,P.return,ge)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=t.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,Qi(t,o))));break;case 19:nn(n,t),an(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qi(t,s)));break;case 30:break;case 21:break;default:nn(n,t),an(t)}}function an(t){var n=t.flags;if(n&2){try{for(var o,s=t.return;s!==null;){if(xv(s)){o=s;break}s=s.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var d=o.stateNode,h=Jd(t);Xi(t,h,d);break;case 5:var S=o.stateNode;o.flags&32&&(Dr(S,""),o.flags&=-33);var M=Jd(t);Xi(t,M,S);break;case 3:case 4:var P=o.stateNode.containerInfo,$=Jd(t);ef(t,$,P);break;default:throw Error(r(161))}}catch(Q){Ze(t,t.return,Q)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function _v(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;_v(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Ta(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Sv(t,n.alternate,n),n=n.sibling}function ir(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:ml(4,n,n.return),ir(n);break;case 1:ta(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&pv(n,n.return,o),ir(n);break;case 27:xs(n.stateNode);case 26:case 5:ta(n,n.return),ir(n);break;case 22:n.memoizedState===null&&ir(n);break;case 30:ir(n);break;default:ir(n)}t=t.sibling}}function ka(t,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,d=t,h=n,S=h.flags;switch(h.tag){case 0:case 11:case 15:ka(d,h,o),is(4,h);break;case 1:if(ka(d,h,o),s=h,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch($){Ze(s,s.return,$)}if(s=h,d=s.updateQueue,d!==null){var M=s.stateNode;try{var P=d.shared.hiddenCallbacks;if(P!==null)for(d.shared.hiddenCallbacks=null,d=0;d<P.length;d++)lp(P[d],M)}catch($){Ze(s,s.return,$)}}o&&S&64&&gv(h),cs(h,h.return);break;case 27:yv(h);case 26:case 5:ka(d,h,o),o&&s===null&&S&4&&vv(h),cs(h,h.return);break;case 12:ka(d,h,o);break;case 31:ka(d,h,o),o&&S&4&&jv(d,h);break;case 13:ka(d,h,o),o&&S&4&&Nv(d,h);break;case 22:h.memoizedState===null&&ka(d,h,o),cs(h,h.return);break;case 30:break;default:ka(d,h,o)}n=n.sibling}}function nf(t,n){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Ko(o))}function af(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ko(t))}function Un(t,n,o,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Dv(t,n,o,s),n=n.sibling}function Dv(t,n,o,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Un(t,n,o,s),d&2048&&is(9,n);break;case 1:Un(t,n,o,s);break;case 3:Un(t,n,o,s),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ko(t)));break;case 12:if(d&2048){Un(t,n,o,s),t=n.stateNode;try{var h=n.memoizedProps,S=h.id,M=h.onPostCommit;typeof M=="function"&&M(S,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){Ze(n,n.return,P)}}else Un(t,n,o,s);break;case 31:Un(t,n,o,s);break;case 13:Un(t,n,o,s);break;case 23:break;case 22:h=n.stateNode,S=n.alternate,n.memoizedState!==null?h._visibility&2?Un(t,n,o,s):us(t,n):h._visibility&2?Un(t,n,o,s):(h._visibility|=2,Wr(t,n,o,s,(n.subtreeFlags&10256)!==0||!1)),d&2048&&nf(S,n);break;case 24:Un(t,n,o,s),d&2048&&af(n.alternate,n);break;default:Un(t,n,o,s)}}function Wr(t,n,o,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=t,S=n,M=o,P=s,$=S.flags;switch(S.tag){case 0:case 11:case 15:Wr(h,S,M,P,d),is(8,S);break;case 23:break;case 22:var Q=S.stateNode;S.memoizedState!==null?Q._visibility&2?Wr(h,S,M,P,d):us(h,S):(Q._visibility|=2,Wr(h,S,M,P,d)),d&&$&2048&&nf(S.alternate,S);break;case 24:Wr(h,S,M,P,d),d&&$&2048&&af(S.alternate,S);break;default:Wr(h,S,M,P,d)}n=n.sibling}}function us(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=t,s=n,d=s.flags;switch(s.tag){case 22:us(o,s),d&2048&&nf(s.alternate,s);break;case 24:us(o,s),d&2048&&af(s.alternate,s);break;default:us(o,s)}n=n.sibling}}var ds=8192;function Kr(t,n,o){if(t.subtreeFlags&ds)for(t=t.child;t!==null;)Rv(t,n,o),t=t.sibling}function Rv(t,n,o){switch(t.tag){case 26:Kr(t,n,o),t.flags&ds&&t.memoizedState!==null&&DC(o,Bn,t.memoizedState,t.memoizedProps);break;case 5:Kr(t,n,o);break;case 3:case 4:var s=Bn;Bn=dc(t.stateNode.containerInfo),Kr(t,n,o),Bn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=ds,ds=16777216,Kr(t,n,o),ds=s):Kr(t,n,o));break;default:Kr(t,n,o)}}function Ev(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function fs(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var s=n[o];Et=s,Tv(s,t)}Ev(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ov(t),t=t.sibling}function Ov(t){switch(t.tag){case 0:case 11:case 15:fs(t),t.flags&2048&&ml(9,t,t.return);break;case 3:fs(t);break;case 12:fs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Zi(t)):fs(t);break;default:fs(t)}}function Zi(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var s=n[o];Et=s,Tv(s,t)}Ev(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:ml(8,n,n.return),Zi(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Zi(n));break;default:Zi(n)}t=t.sibling}}function Tv(t,n){for(;Et!==null;){var o=Et;switch(o.tag){case 0:case 11:case 15:ml(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var s=o.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ko(o.memoizedState.cache)}if(s=o.child,s!==null)s.return=o,Et=s;else e:for(o=t;Et!==null;){s=Et;var d=s.sibling,h=s.return;if(wv(s),s===o){Et=null;break e}if(d!==null){d.return=h,Et=d;break e}Et=h}}}var I1={getCacheForType:function(t){var n=Ht(vt),o=n.data.get(t);return o===void 0&&(o=t(),n.data.set(t,o)),o},cacheSignal:function(){return Ht(vt).controller.signal}},$1=typeof WeakMap=="function"?WeakMap:Map,We=0,rt=null,Le=null,Be=0,Qe=0,gn=null,hl=!1,Xr=!1,lf=!1,Aa=0,ft=0,gl=0,cr=0,rf=0,pn=0,Qr=0,ms=null,ln=null,of=!1,Ji=0,kv=0,ec=1/0,tc=null,pl=null,wt=0,vl=null,Zr=null,za=0,sf=0,cf=null,Av=null,hs=0,uf=null;function vn(){return(We&2)!==0&&Be!==0?Be&-Be:A.T!==null?pf():Xh()}function zv(){if(pn===0)if((Be&536870912)===0||$e){var t=Ie;Ie<<=1,(Ie&3932160)===0&&(Ie=262144),pn=t}else pn=536870912;return t=mn.current,t!==null&&(t.flags|=32),pn}function rn(t,n,o){(t===rt&&(Qe===2||Qe===9)||t.cancelPendingCommit!==null)&&(Jr(t,0),xl(t,Be,pn,!1)),xa(t,o),((We&2)===0||t!==rt)&&(t===rt&&((We&2)===0&&(cr|=o),ft===4&&xl(t,Be,pn,!1)),na(t))}function Pv(t,n,o){if((We&6)!==0)throw Error(r(327));var s=!o&&(n&127)===0&&(n&t.expiredLanes)===0||ze(t,n),d=s?q1(t,n):ff(t,n,!0),h=s;do{if(d===0){Xr&&!s&&xl(t,n,0,!1);break}else{if(o=t.current.alternate,h&&!G1(o)){d=ff(t,n,!1),h=!1;continue}if(d===2){if(h=n,t.errorRecoveryDisabledLanes&h)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){n=S;e:{var M=t;d=ms;var P=M.current.memoizedState.isDehydrated;if(P&&(Jr(M,S).flags|=256),S=ff(M,S,!1),S!==2){if(lf&&!P){M.errorRecoveryDisabledLanes|=h,cr|=h,d=4;break e}h=ln,ln=d,h!==null&&(ln===null?ln=h:ln.push.apply(ln,h))}d=S}if(h=!1,d!==2)continue}}if(d===1){Jr(t,0),xl(t,n,0,!0);break}e:{switch(s=t,h=d,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:xl(s,n,pn,!hl);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(d=Ji+300-At(),10<d)){if(xl(s,n,pn,!hl),Dt(s,0,!0)!==0)break e;za=n,s.timeoutHandle=mx(Hv.bind(null,s,o,ln,tc,of,n,pn,cr,Qr,hl,h,"Throttled",-0,0),d);break e}Hv(s,o,ln,tc,of,n,pn,cr,Qr,hl,h,null,-0,0)}}break}while(!0);na(t)}function Hv(t,n,o,s,d,h,S,M,P,$,Q,ne,G,q){if(t.timeoutHandle=-1,ne=n.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ba},Rv(n,h,ne);var ge=(h&62914560)===h?Ji-At():(h&4194048)===h?kv-At():0;if(ge=RC(ne,ge),ge!==null){za=h,t.cancelPendingCommit=ge(Gv.bind(null,t,n,h,o,s,d,S,M,P,Q,ne,null,G,q)),xl(t,h,S,!$);return}}Gv(t,n,h,o,s,d,S,M,P)}function G1(t){for(var n=t;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var s=0;s<o.length;s++){var d=o[s],h=d.getSnapshot;d=d.value;try{if(!dn(h(),d))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function xl(t,n,o,s){n&=~rf,n&=~cr,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var d=n;0<d;){var h=31-qt(d),S=1<<h;s[h]=-1,d&=~S}o!==0&&qh(t,o,n)}function nc(){return(We&6)===0?(gs(0),!1):!0}function df(){if(Le!==null){if(Qe===0)var t=Le.return;else t=Le,ja=er=null,Md(t),Ir=null,Qo=0,t=Le;for(;t!==null;)hv(t.alternate,t),t=t.return;Le=null}}function Jr(t,n){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,dC(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),za=0,df(),rt=t,Le=o=wa(t.current,null),Be=n,Qe=0,gn=null,hl=!1,Xr=ze(t,n),lf=!1,Qr=pn=rf=cr=gl=ft=0,ln=ms=null,of=!1,(n&8)!==0&&(n|=n&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=n;0<s;){var d=31-qt(s),h=1<<d;n|=t[d],s&=~h}return Aa=n,Ci(),o}function Fv(t,n){Oe=null,A.H=rs,n===Ur||n===Oi?(n=ep(),Qe=3):n===hd?(n=ep(),Qe=4):Qe=n===Ud?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,gn=n,Le===null&&(ft=1,Gi(t,Rn(n,t.current)))}function Lv(){var t=mn.current;return t===null?!0:(Be&4194048)===Be?kn===null:(Be&62914560)===Be||(Be&536870912)!==0?t===kn:!1}function Vv(){var t=A.H;return A.H=rs,t===null?rs:t}function Bv(){var t=A.A;return A.A=I1,t}function ac(){ft=4,hl||(Be&4194048)!==Be&&mn.current!==null||(Xr=!0),(gl&134217727)===0&&(cr&134217727)===0||rt===null||xl(rt,Be,pn,!1)}function ff(t,n,o){var s=We;We|=2;var d=Vv(),h=Bv();(rt!==t||Be!==n)&&(tc=null,Jr(t,n)),n=!1;var S=ft;e:do try{if(Qe!==0&&Le!==null){var M=Le,P=gn;switch(Qe){case 8:df(),S=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(n=!0);var $=Qe;if(Qe=0,gn=null,eo(t,M,P,$),o&&Xr){S=0;break e}break;default:$=Qe,Qe=0,gn=null,eo(t,M,P,$)}}Y1(),S=ft;break}catch(Q){Fv(t,Q)}while(!0);return n&&t.shellSuspendCounter++,ja=er=null,We=s,A.H=d,A.A=h,Le===null&&(rt=null,Be=0,Ci()),S}function Y1(){for(;Le!==null;)Uv(Le)}function q1(t,n){var o=We;We|=2;var s=Vv(),d=Bv();rt!==t||Be!==n?(tc=null,ec=At()+500,Jr(t,n)):Xr=ze(t,n);e:do try{if(Qe!==0&&Le!==null){n=Le;var h=gn;t:switch(Qe){case 1:Qe=0,gn=null,eo(t,n,h,1);break;case 2:case 9:if(Zg(h)){Qe=0,gn=null,Iv(n);break}n=function(){Qe!==2&&Qe!==9||rt!==t||(Qe=7),na(t)},h.then(n,n);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Zg(h)?(Qe=0,gn=null,Iv(n)):(Qe=0,gn=null,eo(t,n,h,7));break;case 5:var S=null;switch(Le.tag){case 26:S=Le.memoizedState;case 5:case 27:var M=Le;if(S?Dx(S):M.stateNode.complete){Qe=0,gn=null;var P=M.sibling;if(P!==null)Le=P;else{var $=M.return;$!==null?(Le=$,lc($)):Le=null}break t}}Qe=0,gn=null,eo(t,n,h,5);break;case 6:Qe=0,gn=null,eo(t,n,h,6);break;case 8:df(),ft=6;break e;default:throw Error(r(462))}}W1();break}catch(Q){Fv(t,Q)}while(!0);return ja=er=null,A.H=s,A.A=d,We=o,Le!==null?0:(rt=null,Be=0,Ci(),ft)}function W1(){for(;Le!==null&&!tl();)Uv(Le)}function Uv(t){var n=fv(t.alternate,t,Aa);t.memoizedProps=t.pendingProps,n===null?lc(t):Le=n}function Iv(t){var n=t,o=n.alternate;switch(n.tag){case 15:case 0:n=ov(o,n,n.pendingProps,n.type,void 0,Be);break;case 11:n=ov(o,n,n.pendingProps,n.type.render,n.ref,Be);break;case 5:Md(n);default:hv(o,n),n=Le=Bg(n,Aa),n=fv(o,n,Aa)}t.memoizedProps=t.pendingProps,n===null?lc(t):Le=n}function eo(t,n,o,s){ja=er=null,Md(n),Ir=null,Qo=0;var d=n.return;try{if(P1(t,d,n,o,Be)){ft=1,Gi(t,Rn(o,t.current)),Le=null;return}}catch(h){if(d!==null)throw Le=d,h;ft=1,Gi(t,Rn(o,t.current)),Le=null;return}n.flags&32768?($e||s===1?t=!0:Xr||(Be&536870912)!==0?t=!1:(hl=t=!0,(s===2||s===9||s===3||s===6)&&(s=mn.current,s!==null&&s.tag===13&&(s.flags|=16384))),$v(n,t)):lc(n)}function lc(t){var n=t;do{if((n.flags&32768)!==0){$v(n,hl);return}t=n.return;var o=L1(n.alternate,n,Aa);if(o!==null){Le=o;return}if(n=n.sibling,n!==null){Le=n;return}Le=n=t}while(n!==null);ft===0&&(ft=5)}function $v(t,n){do{var o=V1(t.alternate,t);if(o!==null){o.flags&=32767,Le=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(t=t.sibling,t!==null)){Le=t;return}Le=t=o}while(t!==null);ft=6,Le=null}function Gv(t,n,o,s,d,h,S,M,P){t.cancelPendingCommit=null;do rc();while(wt!==0);if((We&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=Ju,zo(t,o,h,S,M,P),t===rt&&(Le=rt=null,Be=0),Zr=n,vl=t,za=o,sf=h,cf=d,Av=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Z1(Sr,function(){return Xv(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=A.T,A.T=null,d=U.p,U.p=2,S=We,We|=4;try{B1(t,n,o)}finally{We=S,U.p=d,A.T=s}}wt=1,Yv(),qv(),Wv()}}function Yv(){if(wt===1){wt=0;var t=vl,n=Zr,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null;var s=U.p;U.p=2;var d=We;We|=4;try{Mv(n,t);var h=jf,S=Tg(t.containerInfo),M=h.focusedElem,P=h.selectionRange;if(S!==M&&M&&M.ownerDocument&&Og(M.ownerDocument.documentElement,M)){if(P!==null&&Wu(M)){var $=P.start,Q=P.end;if(Q===void 0&&(Q=$),"selectionStart"in M)M.selectionStart=$,M.selectionEnd=Math.min(Q,M.value.length);else{var ne=M.ownerDocument||document,G=ne&&ne.defaultView||window;if(G.getSelection){var q=G.getSelection(),ge=M.textContent.length,Ce=Math.min(P.start,ge),lt=P.end===void 0?Ce:Math.min(P.end,ge);!q.extend&&Ce>lt&&(S=lt,lt=Ce,Ce=S);var B=Eg(M,Ce),F=Eg(M,lt);if(B&&F&&(q.rangeCount!==1||q.anchorNode!==B.node||q.anchorOffset!==B.offset||q.focusNode!==F.node||q.focusOffset!==F.offset)){var I=ne.createRange();I.setStart(B.node,B.offset),q.removeAllRanges(),Ce>lt?(q.addRange(I),q.extend(F.node,F.offset)):(I.setEnd(F.node,F.offset),q.addRange(I))}}}}for(ne=[],q=M;q=q.parentNode;)q.nodeType===1&&ne.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ne.length;M++){var J=ne[M];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}vc=!!Cf,jf=Cf=null}finally{We=d,U.p=s,A.T=o}}t.current=n,wt=2}}function qv(){if(wt===2){wt=0;var t=vl,n=Zr,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=A.T,A.T=null;var s=U.p;U.p=2;var d=We;We|=4;try{Sv(t,n.alternate,n)}finally{We=d,U.p=s,A.T=o}}wt=3}}function Wv(){if(wt===4||wt===3){wt=0,ri();var t=vl,n=Zr,o=za,s=Av;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?wt=5:(wt=0,Zr=vl=null,Kv(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(pl=null),Ru(o),n=n.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(Yl,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=A.T,d=U.p,U.p=2,A.T=null;try{for(var h=t.onRecoverableError,S=0;S<s.length;S++){var M=s[S];h(M.value,{componentStack:M.stack})}}finally{A.T=n,U.p=d}}(za&3)!==0&&rc(),na(t),d=t.pendingLanes,(o&261930)!==0&&(d&42)!==0?t===uf?hs++:(hs=0,uf=t):hs=0,gs(0)}}function Kv(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ko(n)))}function rc(){return Yv(),qv(),Wv(),Xv()}function Xv(){if(wt!==5)return!1;var t=vl,n=sf;sf=0;var o=Ru(za),s=A.T,d=U.p;try{U.p=32>o?32:o,A.T=null,o=cf,cf=null;var h=vl,S=za;if(wt=0,Zr=vl=null,za=0,(We&6)!==0)throw Error(r(331));var M=We;if(We|=4,Ov(h.current),Dv(h,h.current,S,o),We=M,gs(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Yl,h)}catch{}return!0}finally{U.p=d,A.T=s,Kv(t,n)}}function Qv(t,n,o){n=Rn(o,n),n=Bd(t.stateNode,n,2),t=ul(t,n,2),t!==null&&(xa(t,2),na(t))}function Ze(t,n,o){if(t.tag===3)Qv(t,t,o);else for(;n!==null;){if(n.tag===3){Qv(n,t,o);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(pl===null||!pl.has(s))){t=Rn(o,t),o=Zp(2),s=ul(n,o,2),s!==null&&(Jp(o,s,n,t),xa(s,2),na(s));break}}n=n.return}}function mf(t,n,o){var s=t.pingCache;if(s===null){s=t.pingCache=new $1;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(o)||(lf=!0,d.add(o),t=K1.bind(null,t,n,o),n.then(t,t))}function K1(t,n,o){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,rt===t&&(Be&o)===o&&(ft===4||ft===3&&(Be&62914560)===Be&&300>At()-Ji?(We&2)===0&&Jr(t,0):rf|=o,Qr===Be&&(Qr=0)),na(t)}function Zv(t,n){n===0&&(n=di()),t=Ql(t,n),t!==null&&(xa(t,n),na(t))}function X1(t){var n=t.memoizedState,o=0;n!==null&&(o=n.retryLane),Zv(t,o)}function Q1(t,n){var o=0;switch(t.tag){case 31:case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(o=d.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),Zv(t,o)}function Z1(t,n){return $l(t,n)}var oc=null,to=null,hf=!1,sc=!1,gf=!1,yl=0;function na(t){t!==to&&t.next===null&&(to===null?oc=to=t:to=to.next=t),sc=!0,hf||(hf=!0,eC())}function gs(t,n){if(!gf&&sc){gf=!0;do for(var o=!1,s=oc;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var h=0;else{var S=s.suspendedLanes,M=s.pingedLanes;h=(1<<31-qt(42|t)+1)-1,h&=d&~(S&~M),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,nx(s,h))}else h=Be,h=Dt(s,s===rt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||ze(s,h)||(o=!0,nx(s,h));s=s.next}while(o);gf=!1}}function J1(){Jv()}function Jv(){sc=hf=!1;var t=0;yl!==0&&uC()&&(t=yl);for(var n=At(),o=null,s=oc;s!==null;){var d=s.next,h=ex(s,n);h===0?(s.next=null,o===null?oc=d:o.next=d,d===null&&(to=o)):(o=s,(t!==0||(h&3)!==0)&&(sc=!0)),s=d}wt!==0&&wt!==5||gs(t),yl!==0&&(yl=0)}function ex(t,n){for(var o=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,h=t.pendingLanes&-62914561;0<h;){var S=31-qt(h),M=1<<S,P=d[S];P===-1?((M&o)===0||(M&s)!==0)&&(d[S]=_u(M,n)):P<=n&&(t.expiredLanes|=M),h&=~M}if(n=rt,o=Be,o=Dt(t,t===n?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,o===0||t===n&&(Qe===2||Qe===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Gl(s),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||ze(t,o)){if(n=o&-o,n===t.callbackPriority)return n;switch(s!==null&&Gl(s),Ru(o)){case 2:case 8:o=si;break;case 32:o=Sr;break;case 268435456:o=ii;break;default:o=Sr}return s=tx.bind(null,t),o=$l(o,s),t.callbackPriority=n,t.callbackNode=o,n}return s!==null&&s!==null&&Gl(s),t.callbackPriority=2,t.callbackNode=null,2}function tx(t,n){if(wt!==0&&wt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(rc()&&t.callbackNode!==o)return null;var s=Be;return s=Dt(t,t===rt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Pv(t,s,n),ex(t,At()),t.callbackNode!=null&&t.callbackNode===o?tx.bind(null,t):null)}function nx(t,n){if(rc())return null;Pv(t,n,!0)}function eC(){fC(function(){(We&6)!==0?$l(oi,J1):Jv()})}function pf(){if(yl===0){var t=Vr;t===0&&(t=De,De<<=1,(De&261888)===0&&(De=256)),yl=t}return yl}function ax(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:gi(""+t)}function lx(t,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,t.id&&o.setAttribute("form",t.id),n.parentNode.insertBefore(o,n),t=new FormData(t),o.parentNode.removeChild(o),t}function tC(t,n,o,s,d){if(n==="submit"&&o&&o.stateNode===d){var h=ax((d[Jt]||null).action),S=s.submitter;S&&(n=(n=S[Jt]||null)?ax(n.formAction):S.getAttribute("formAction"),n!==null&&(h=n,S=null));var M=new yi("action","action",null,s,d);t.push({event:M,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(yl!==0){var P=S?lx(d,S):new FormData(d);zd(o,{pending:!0,data:P,method:d.method,action:h},null,P)}}else typeof h=="function"&&(M.preventDefault(),P=S?lx(d,S):new FormData(d),zd(o,{pending:!0,data:P,method:d.method,action:h},h,P))},currentTarget:d}]})}}for(var vf=0;vf<Zu.length;vf++){var xf=Zu[vf],nC=xf.toLowerCase(),aC=xf[0].toUpperCase()+xf.slice(1);Vn(nC,"on"+aC)}Vn(zg,"onAnimationEnd"),Vn(Pg,"onAnimationIteration"),Vn(Hg,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(y1,"onTransitionRun"),Vn(b1,"onTransitionStart"),Vn(S1,"onTransitionCancel"),Vn(Fg,"onTransitionEnd"),Mr("onMouseEnter",["mouseout","mouseover"]),Mr("onMouseLeave",["mouseout","mouseover"]),Mr("onPointerEnter",["pointerout","pointerover"]),Mr("onPointerLeave",["pointerout","pointerover"]),ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ql("onBeforeInput",["compositionend","keypress","textInput","paste"]),ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ps="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(" "),lC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ps));function rx(t,n){n=(n&4)!==0;for(var o=0;o<t.length;o++){var s=t[o],d=s.event;s=s.listeners;e:{var h=void 0;if(n)for(var S=s.length-1;0<=S;S--){var M=s[S],P=M.instance,$=M.currentTarget;if(M=M.listener,P!==h&&d.isPropagationStopped())break e;h=M,d.currentTarget=$;try{h(d)}catch(Q){wi(Q)}d.currentTarget=null,h=P}else for(S=0;S<s.length;S++){if(M=s[S],P=M.instance,$=M.currentTarget,M=M.listener,P!==h&&d.isPropagationStopped())break e;h=M,d.currentTarget=$;try{h(d)}catch(Q){wi(Q)}d.currentTarget=null,h=P}}}}function Ve(t,n){var o=n[Eu];o===void 0&&(o=n[Eu]=new Set);var s=t+"__bubble";o.has(s)||(ox(n,t,2,!1),o.add(s))}function yf(t,n,o){var s=0;n&&(s|=4),ox(o,t,s,n)}var ic="_reactListening"+Math.random().toString(36).slice(2);function bf(t){if(!t[ic]){t[ic]=!0,Jh.forEach(function(o){o!=="selectionchange"&&(lC.has(o)||yf(o,!1,t),yf(o,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[ic]||(n[ic]=!0,yf("selectionchange",!1,n))}}function ox(t,n,o,s){switch(zx(n)){case 2:var d=TC;break;case 8:d=kC;break;default:d=zf}o=d.bind(null,n,o,t),d=void 0,!Lu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(n,o,{capture:!0,passive:d}):t.addEventListener(n,o,!0):d!==void 0?t.addEventListener(n,o,{passive:d}):t.addEventListener(n,o,!1)}function Sf(t,n,o,s,d){var h=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var M=s.stateNode.containerInfo;if(M===d)break;if(S===4)for(S=s.return;S!==null;){var P=S.tag;if((P===3||P===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;M!==null;){if(S=Cr(M),S===null)return;if(P=S.tag,P===5||P===6||P===26||P===27){s=h=S;continue e}M=M.parentNode}}s=s.return}dg(function(){var $=h,Q=Hu(o),ne=[];e:{var G=Lg.get(t);if(G!==void 0){var q=yi,ge=t;switch(t){case"keypress":if(vi(o)===0)break e;case"keydown":case"keyup":q=Qw;break;case"focusin":ge="focus",q=Iu;break;case"focusout":ge="blur",q=Iu;break;case"beforeblur":case"afterblur":q=Iu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=hg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Lw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=e1;break;case zg:case Pg:case Hg:q=Uw;break;case Fg:q=n1;break;case"scroll":case"scrollend":q=Hw;break;case"wheel":q=l1;break;case"copy":case"cut":case"paste":q=$w;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=pg;break;case"toggle":case"beforetoggle":q=o1}var Ce=(n&4)!==0,lt=!Ce&&(t==="scroll"||t==="scrollend"),B=Ce?G!==null?G+"Capture":null:G;Ce=[];for(var F=$,I;F!==null;){var J=F;if(I=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||I===null||B===null||(J=Fo(F,B),J!=null&&Ce.push(vs(F,J,I))),lt)break;F=F.return}0<Ce.length&&(G=new q(G,ge,null,o,Q),ne.push({event:G,listeners:Ce}))}}if((n&7)===0){e:{if(G=t==="mouseover"||t==="pointerover",q=t==="mouseout"||t==="pointerout",G&&o!==Pu&&(ge=o.relatedTarget||o.fromElement)&&(Cr(ge)||ge[wr]))break e;if((q||G)&&(G=Q.window===Q?Q:(G=Q.ownerDocument)?G.defaultView||G.parentWindow:window,q?(ge=o.relatedTarget||o.toElement,q=$,ge=ge?Cr(ge):null,ge!==null&&(lt=u(ge),Ce=ge.tag,ge!==lt||Ce!==5&&Ce!==27&&Ce!==6)&&(ge=null)):(q=null,ge=$),q!==ge)){if(Ce=hg,J="onMouseLeave",B="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=pg,J="onPointerLeave",B="onPointerEnter",F="pointer"),lt=q==null?G:Ho(q),I=ge==null?G:Ho(ge),G=new Ce(J,F+"leave",q,o,Q),G.target=lt,G.relatedTarget=I,J=null,Cr(Q)===$&&(Ce=new Ce(B,F+"enter",ge,o,Q),Ce.target=I,Ce.relatedTarget=lt,J=Ce),lt=J,q&&ge)t:{for(Ce=rC,B=q,F=ge,I=0,J=B;J;J=Ce(J))I++;J=0;for(var ye=F;ye;ye=Ce(ye))J++;for(;0<I-J;)B=Ce(B),I--;for(;0<J-I;)F=Ce(F),J--;for(;I--;){if(B===F||F!==null&&B===F.alternate){Ce=B;break t}B=Ce(B),F=Ce(F)}Ce=null}else Ce=null;q!==null&&sx(ne,G,q,Ce,!1),ge!==null&<!==null&&sx(ne,lt,ge,Ce,!0)}}e:{if(G=$?Ho($):window,q=G.nodeName&&G.nodeName.toLowerCase(),q==="select"||q==="input"&&G.type==="file")var Ye=jg;else if(wg(G))if(Ng)Ye=p1;else{Ye=h1;var pe=m1}else q=G.nodeName,!q||q.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?$&&zu($.elementType)&&(Ye=jg):Ye=g1;if(Ye&&(Ye=Ye(t,$))){Cg(ne,Ye,o,Q);break e}pe&&pe(t,G,$),t==="focusout"&&$&&G.type==="number"&&$.memoizedProps.value!=null&&Au(G,"number",G.value)}switch(pe=$?Ho($):window,t){case"focusin":(wg(pe)||pe.contentEditable==="true")&&(Tr=pe,Ku=$,Yo=null);break;case"focusout":Yo=Ku=Tr=null;break;case"mousedown":Xu=!0;break;case"contextmenu":case"mouseup":case"dragend":Xu=!1,kg(ne,o,Q);break;case"selectionchange":if(x1)break;case"keydown":case"keyup":kg(ne,o,Q)}var ke;if(Gu)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Or?bg(t,o)&&(Ue="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(vg&&o.locale!=="ko"&&(Or||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Or&&(ke=fg()):(al=Q,Vu="value"in al?al.value:al.textContent,Or=!0)),pe=cc($,Ue),0<pe.length&&(Ue=new gg(Ue,t,null,o,Q),ne.push({event:Ue,listeners:pe}),ke?Ue.data=ke:(ke=Sg(o),ke!==null&&(Ue.data=ke)))),(ke=i1?c1(t,o):u1(t,o))&&(Ue=cc($,"onBeforeInput"),0<Ue.length&&(pe=new gg("onBeforeInput","beforeinput",null,o,Q),ne.push({event:pe,listeners:Ue}),pe.data=ke)),tC(ne,t,$,o,Q)}rx(ne,n)})}function vs(t,n,o){return{instance:t,listener:n,currentTarget:o}}function cc(t,n){for(var o=n+"Capture",s=[];t!==null;){var d=t,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=Fo(t,o),d!=null&&s.unshift(vs(t,d,h)),d=Fo(t,n),d!=null&&s.push(vs(t,d,h))),t.tag===3)return s;t=t.return}return[]}function rC(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function sx(t,n,o,s,d){for(var h=n._reactName,S=[];o!==null&&o!==s;){var M=o,P=M.alternate,$=M.stateNode;if(M=M.tag,P!==null&&P===s)break;M!==5&&M!==26&&M!==27||$===null||(P=$,d?($=Fo(o,h),$!=null&&S.unshift(vs(o,$,P))):d||($=Fo(o,h),$!=null&&S.push(vs(o,$,P)))),o=o.return}S.length!==0&&t.push({event:n,listeners:S})}var oC=/\r\n?/g,sC=/\u0000|\uFFFD/g;function ix(t){return(typeof t=="string"?t:""+t).replace(oC,`
|
|
49
|
+
`).replace(sC,"")}function cx(t,n){return n=ix(n),ix(t)===n}function at(t,n,o,s,d,h){switch(o){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Dr(t,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Dr(t,""+s);break;case"className":mi(t,"class",s);break;case"tabIndex":mi(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":mi(t,o,s);break;case"style":cg(t,s,h);break;case"data":if(n!=="object"){mi(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||o!=="href")){t.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(o);break}s=gi(""+s),t.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(o==="formAction"?(n!=="input"&&at(t,n,"name",d.name,d,null),at(t,n,"formEncType",d.formEncType,d,null),at(t,n,"formMethod",d.formMethod,d,null),at(t,n,"formTarget",d.formTarget,d,null)):(at(t,n,"encType",d.encType,d,null),at(t,n,"method",d.method,d,null),at(t,n,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(o);break}s=gi(""+s),t.setAttribute(o,s);break;case"onClick":s!=null&&(t.onclick=ba);break;case"onScroll":s!=null&&Ve("scroll",t);break;case"onScrollEnd":s!=null&&Ve("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(d.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}o=gi(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(o,""+s):t.removeAttribute(o);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":s===!0?t.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(o,s):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(o,s):t.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(o):t.setAttribute(o,s);break;case"popover":Ve("beforetoggle",t),Ve("toggle",t),fi(t,"popover",s);break;case"xlinkActuate":ya(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ya(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ya(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ya(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ya(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ya(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ya(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ya(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ya(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fi(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=zw.get(o)||o,fi(t,o,s))}}function wf(t,n,o,s,d,h){switch(o){case"style":cg(t,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(d.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof s=="string"?Dr(t,s):(typeof s=="number"||typeof s=="bigint")&&Dr(t,""+s);break;case"onScroll":s!=null&&Ve("scroll",t);break;case"onScrollEnd":s!=null&&Ve("scrollend",t);break;case"onClick":s!=null&&(t.onclick=ba);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eg.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(d=o.endsWith("Capture"),n=o.slice(2,d?o.length-7:void 0),h=t[Jt]||null,h=h!=null?h[o]:null,typeof h=="function"&&t.removeEventListener(n,h,d),typeof s=="function")){typeof h!="function"&&h!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(n,s,d);break e}o in t?t[o]=s:s===!0?t.setAttribute(o,""):fi(t,o,s)}}}function Lt(t,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",t),Ve("load",t);var s=!1,d=!1,h;for(h in o)if(o.hasOwnProperty(h)){var S=o[h];if(S!=null)switch(h){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:at(t,n,h,S,o,null)}}d&&at(t,n,"srcSet",o.srcSet,o,null),s&&at(t,n,"src",o.src,o,null);return;case"input":Ve("invalid",t);var M=h=S=d=null,P=null,$=null;for(s in o)if(o.hasOwnProperty(s)){var Q=o[s];if(Q!=null)switch(s){case"name":d=Q;break;case"type":S=Q;break;case"checked":P=Q;break;case"defaultChecked":$=Q;break;case"value":h=Q;break;case"defaultValue":M=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,n));break;default:at(t,n,s,Q,o,null)}}rg(t,h,M,P,$,S,d,!1);return;case"select":Ve("invalid",t),s=S=h=null;for(d in o)if(o.hasOwnProperty(d)&&(M=o[d],M!=null))switch(d){case"value":h=M;break;case"defaultValue":S=M;break;case"multiple":s=M;default:at(t,n,d,M,o,null)}n=h,o=S,t.multiple=!!s,n!=null?_r(t,!!s,n,!1):o!=null&&_r(t,!!s,o,!0);return;case"textarea":Ve("invalid",t),h=d=s=null;for(S in o)if(o.hasOwnProperty(S)&&(M=o[S],M!=null))switch(S){case"value":s=M;break;case"defaultValue":d=M;break;case"children":h=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:at(t,n,S,M,o,null)}sg(t,s,d,h);return;case"option":for(P in o)if(o.hasOwnProperty(P)&&(s=o[P],s!=null))switch(P){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:at(t,n,P,s,o,null)}return;case"dialog":Ve("beforetoggle",t),Ve("toggle",t),Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":Ve("load",t);break;case"video":case"audio":for(s=0;s<ps.length;s++)Ve(ps[s],t);break;case"image":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"embed":case"source":case"link":Ve("error",t),Ve("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in o)if(o.hasOwnProperty($)&&(s=o[$],s!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:at(t,n,$,s,o,null)}return;default:if(zu(n)){for(Q in o)o.hasOwnProperty(Q)&&(s=o[Q],s!==void 0&&wf(t,n,Q,s,o,void 0));return}}for(M in o)o.hasOwnProperty(M)&&(s=o[M],s!=null&&at(t,n,M,s,o,null))}function iC(t,n,o,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,S=null,M=null,P=null,$=null,Q=null;for(q in o){var ne=o[q];if(o.hasOwnProperty(q)&&ne!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":P=ne;default:s.hasOwnProperty(q)||at(t,n,q,null,s,ne)}}for(var G in s){var q=s[G];if(ne=o[G],s.hasOwnProperty(G)&&(q!=null||ne!=null))switch(G){case"type":h=q;break;case"name":d=q;break;case"checked":$=q;break;case"defaultChecked":Q=q;break;case"value":S=q;break;case"defaultValue":M=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,n));break;default:q!==ne&&at(t,n,G,q,s,ne)}}ku(t,S,M,P,$,Q,h,d);return;case"select":q=S=M=G=null;for(h in o)if(P=o[h],o.hasOwnProperty(h)&&P!=null)switch(h){case"value":break;case"multiple":q=P;default:s.hasOwnProperty(h)||at(t,n,h,null,s,P)}for(d in s)if(h=s[d],P=o[d],s.hasOwnProperty(d)&&(h!=null||P!=null))switch(d){case"value":G=h;break;case"defaultValue":M=h;break;case"multiple":S=h;default:h!==P&&at(t,n,d,h,s,P)}n=M,o=S,s=q,G!=null?_r(t,!!o,G,!1):!!s!=!!o&&(n!=null?_r(t,!!o,n,!0):_r(t,!!o,o?[]:"",!1));return;case"textarea":q=G=null;for(M in o)if(d=o[M],o.hasOwnProperty(M)&&d!=null&&!s.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:at(t,n,M,null,s,d)}for(S in s)if(d=s[S],h=o[S],s.hasOwnProperty(S)&&(d!=null||h!=null))switch(S){case"value":G=d;break;case"defaultValue":q=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:d!==h&&at(t,n,S,d,s,h)}og(t,G,q);return;case"option":for(var ge in o)if(G=o[ge],o.hasOwnProperty(ge)&&G!=null&&!s.hasOwnProperty(ge))switch(ge){case"selected":t.selected=!1;break;default:at(t,n,ge,null,s,G)}for(P in s)if(G=s[P],q=o[P],s.hasOwnProperty(P)&&G!==q&&(G!=null||q!=null))switch(P){case"selected":t.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:at(t,n,P,G,s,q)}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 Ce in o)G=o[Ce],o.hasOwnProperty(Ce)&&G!=null&&!s.hasOwnProperty(Ce)&&at(t,n,Ce,null,s,G);for($ in s)if(G=s[$],q=o[$],s.hasOwnProperty($)&&G!==q&&(G!=null||q!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,n));break;default:at(t,n,$,G,s,q)}return;default:if(zu(n)){for(var lt in o)G=o[lt],o.hasOwnProperty(lt)&&G!==void 0&&!s.hasOwnProperty(lt)&&wf(t,n,lt,void 0,s,G);for(Q in s)G=s[Q],q=o[Q],!s.hasOwnProperty(Q)||G===q||G===void 0&&q===void 0||wf(t,n,Q,G,s,q);return}}for(var B in o)G=o[B],o.hasOwnProperty(B)&&G!=null&&!s.hasOwnProperty(B)&&at(t,n,B,null,s,G);for(ne in s)G=s[ne],q=o[ne],!s.hasOwnProperty(ne)||G===q||G==null&&q==null||at(t,n,ne,G,s,q)}function ux(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cC(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var d=o[s],h=d.transferSize,S=d.initiatorType,M=d.duration;if(h&&M&&ux(S)){for(S=0,M=d.responseEnd,s+=1;s<o.length;s++){var P=o[s],$=P.startTime;if($>M)break;var Q=P.transferSize,ne=P.initiatorType;Q&&ux(ne)&&(P=P.responseEnd,S+=Q*(P<M?1:(M-$)/(P-$)))}if(--s,n+=8*(h+S)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Cf=null,jf=null;function uc(t){return t.nodeType===9?t:t.ownerDocument}function dx(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fx(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function Nf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Mf=null;function uC(){var t=window.event;return t&&t.type==="popstate"?t===Mf?!1:(Mf=t,!0):(Mf=null,!1)}var mx=typeof setTimeout=="function"?setTimeout:void 0,dC=typeof clearTimeout=="function"?clearTimeout:void 0,hx=typeof Promise=="function"?Promise:void 0,fC=typeof queueMicrotask=="function"?queueMicrotask:typeof hx<"u"?function(t){return hx.resolve(null).then(t).catch(mC)}:mx;function mC(t){setTimeout(function(){throw t})}function bl(t){return t==="head"}function gx(t,n){var o=n,s=0;do{var d=o.nextSibling;if(t.removeChild(o),d&&d.nodeType===8)if(o=d.data,o==="/$"||o==="/&"){if(s===0){t.removeChild(d),ro(n);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")xs(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,xs(o);for(var h=o.firstChild;h;){var S=h.nextSibling,M=h.nodeName;h[Po]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=S}}else o==="body"&&xs(t.ownerDocument.body);o=d}while(o);ro(n)}function px(t,n){var o=t;t=0;do{var s=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(t===0)break;t--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||t++;o=s}while(o)}function _f(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":_f(o),Ou(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function hC(t,n,o,s){for(;t.nodeType===1;){var d=o;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Po])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(h=t.getAttribute("rel"),h==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(h!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(h=t.getAttribute("src"),(h!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===h)return t}else return t;if(t=An(t.nextSibling),t===null)break}return null}function gC(t,n,o){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=An(t.nextSibling),t===null))return null;return t}function vx(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=An(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$?"||t.data==="$~"}function Rf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function pC(t,n){var o=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||o.readyState!=="loading")n();else{var s=function(){n(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function An(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var Ef=null;function xx(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"||o==="/&"){if(n===0)return An(t.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}t=t.nextSibling}return null}function yx(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return t;n--}else o!=="/$"&&o!=="/&"||n++}t=t.previousSibling}return null}function bx(t,n,o){switch(n=uc(o),t){case"html":if(t=n.documentElement,!t)throw Error(r(452));return t;case"head":if(t=n.head,!t)throw Error(r(453));return t;case"body":if(t=n.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function xs(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ou(t)}var zn=new Map,Sx=new Set;function dc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Pa=U.d;U.d={f:vC,r:xC,D:yC,C:bC,L:SC,m:wC,X:jC,S:CC,M:NC};function vC(){var t=Pa.f(),n=nc();return t||n}function xC(t){var n=jr(t);n!==null&&n.tag===5&&n.type==="form"?Fp(n):Pa.r(t)}var no=typeof document>"u"?null:document;function wx(t,n,o){var s=no;if(s&&typeof n=="string"&&n){var d=_n(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof o=="string"&&(d+='[crossorigin="'+o+'"]'),Sx.has(d)||(Sx.add(d),t={rel:t,crossOrigin:o,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),Lt(n,"link",t),Rt(n),s.head.appendChild(n)))}}function yC(t){Pa.D(t),wx("dns-prefetch",t,null)}function bC(t,n){Pa.C(t,n),wx("preconnect",t,n)}function SC(t,n,o){Pa.L(t,n,o);var s=no;if(s&&t&&n){var d='link[rel="preload"][as="'+_n(n)+'"]';n==="image"&&o&&o.imageSrcSet?(d+='[imagesrcset="'+_n(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(d+='[imagesizes="'+_n(o.imageSizes)+'"]')):d+='[href="'+_n(t)+'"]';var h=d;switch(n){case"style":h=ao(t);break;case"script":h=lo(t)}zn.has(h)||(t=y({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:t,as:n},o),zn.set(h,t),s.querySelector(d)!==null||n==="style"&&s.querySelector(ys(h))||n==="script"&&s.querySelector(bs(h))||(n=s.createElement("link"),Lt(n,"link",t),Rt(n),s.head.appendChild(n)))}}function wC(t,n){Pa.m(t,n);var o=no;if(o&&t){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+_n(s)+'"][href="'+_n(t)+'"]',h=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=lo(t)}if(!zn.has(h)&&(t=y({rel:"modulepreload",href:t},n),zn.set(h,t),o.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(bs(h)))return}s=o.createElement("link"),Lt(s,"link",t),Rt(s),o.head.appendChild(s)}}}function CC(t,n,o){Pa.S(t,n,o);var s=no;if(s&&t){var d=Nr(s).hoistableStyles,h=ao(t);n=n||"default";var S=d.get(h);if(!S){var M={loading:0,preload:null};if(S=s.querySelector(ys(h)))M.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":n},o),(o=zn.get(h))&&Of(t,o);var P=S=s.createElement("link");Rt(P),Lt(P,"link",t),P._p=new Promise(function($,Q){P.onload=$,P.onerror=Q}),P.addEventListener("load",function(){M.loading|=1}),P.addEventListener("error",function(){M.loading|=2}),M.loading|=4,fc(S,n,s)}S={type:"stylesheet",instance:S,count:1,state:M},d.set(h,S)}}}function jC(t,n){Pa.X(t,n);var o=no;if(o&&t){var s=Nr(o).hoistableScripts,d=lo(t),h=s.get(d);h||(h=o.querySelector(bs(d)),h||(t=y({src:t,async:!0},n),(n=zn.get(d))&&Tf(t,n),h=o.createElement("script"),Rt(h),Lt(h,"link",t),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(d,h))}}function NC(t,n){Pa.M(t,n);var o=no;if(o&&t){var s=Nr(o).hoistableScripts,d=lo(t),h=s.get(d);h||(h=o.querySelector(bs(d)),h||(t=y({src:t,async:!0,type:"module"},n),(n=zn.get(d))&&Tf(t,n),h=o.createElement("script"),Rt(h),Lt(h,"link",t),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(d,h))}}function Cx(t,n,o,s){var d=(d=fe.current)?dc(d):null;if(!d)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=ao(o.href),o=Nr(d).hoistableStyles,s=o.get(n),s||(s={type:"style",instance:null,count:0,state:null},o.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=ao(o.href);var h=Nr(d).hoistableStyles,S=h.get(t);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,S),(h=d.querySelector(ys(t)))&&!h._p&&(S.instance=h,S.state.loading=5),zn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},zn.set(t,o),h||MC(d,t,o,S.state))),n&&s===null)throw Error(r(528,""));return S}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=lo(o),o=Nr(d).hoistableScripts,s=o.get(n),s||(s={type:"script",instance:null,count:0,state:null},o.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ao(t){return'href="'+_n(t)+'"'}function ys(t){return'link[rel="stylesheet"]['+t+"]"}function jx(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function MC(t,n,o,s){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=t.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Lt(n,"link",o),Rt(n),t.head.appendChild(n))}function lo(t){return'[src="'+_n(t)+'"]'}function bs(t){return"script[async]"+t}function Nx(t,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+_n(o.href)+'"]');if(s)return n.instance=s,Rt(s),s;var d=y({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Rt(s),Lt(s,"style",d),fc(s,o.precedence,t),n.instance=s;case"stylesheet":d=ao(o.href);var h=t.querySelector(ys(d));if(h)return n.state.loading|=4,n.instance=h,Rt(h),h;s=jx(o),(d=zn.get(d))&&Of(s,d),h=(t.ownerDocument||t).createElement("link"),Rt(h);var S=h;return S._p=new Promise(function(M,P){S.onload=M,S.onerror=P}),Lt(h,"link",s),n.state.loading|=4,fc(h,o.precedence,t),n.instance=h;case"script":return h=lo(o.src),(d=t.querySelector(bs(h)))?(n.instance=d,Rt(d),d):(s=o,(d=zn.get(h))&&(s=y({},o),Tf(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),Rt(d),Lt(d,"link",s),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,fc(s,o.precedence,t));return n.instance}function fc(t,n,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,h=d,S=0;S<s.length;S++){var M=s[S];if(M.dataset.precedence===n)h=M;else if(h!==d)break}h?h.parentNode.insertBefore(t,h.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(t,n.firstChild))}function Of(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Tf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var mc=null;function Mx(t,n,o){if(mc===null){var s=new Map,d=mc=new Map;d.set(o,s)}else d=mc,s=d.get(o),s||(s=new Map,d.set(o,s));if(s.has(t))return s;for(s.set(t,null),o=o.getElementsByTagName(t),d=0;d<o.length;d++){var h=o[d];if(!(h[Po]||h[zt]||t==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var S=h.getAttribute(n)||"";S=t+S;var M=s.get(S);M?M.push(h):s.set(S,[h])}}return s}function _x(t,n,o){t=t.ownerDocument||t,t.head.insertBefore(o,n==="title"?t.querySelector("head > title"):null)}function _C(t,n,o){if(o===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Dx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function DC(t,n,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var d=ao(s.href),h=n.querySelector(ys(d));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=hc.bind(t),n.then(t,t)),o.state.loading|=4,o.instance=h,Rt(h);return}h=n.ownerDocument||n,s=jx(s),(d=zn.get(d))&&Of(s,d),h=h.createElement("link"),Rt(h);var S=h;S._p=new Promise(function(M,P){S.onload=M,S.onerror=P}),Lt(h,"link",s),o.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=hc.bind(t),n.addEventListener("load",o),n.addEventListener("error",o))}}var kf=0;function RC(t,n){return t.stylesheets&&t.count===0&&pc(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var s=setTimeout(function(){if(t.stylesheets&&pc(t,t.stylesheets),t.unsuspend){var h=t.unsuspend;t.unsuspend=null,h()}},6e4+n);0<t.imgBytes&&kf===0&&(kf=62500*cC());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&pc(t,t.stylesheets),t.unsuspend)){var h=t.unsuspend;t.unsuspend=null,h()}},(t.imgBytes>kf?50:800)+n);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var gc=null;function pc(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,gc=new Map,n.forEach(EC,t),gc=null,hc.call(t))}function EC(t,n){if(!(n.state.loading&4)){var o=gc.get(t);if(o)var s=o.get(null);else{o=new Map,gc.set(t,o);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var S=d[h];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),s=S)}s&&o.set(null,s)}d=n.instance,S=d.getAttribute("data-precedence"),h=o.get(S)||s,h===s&&o.set(null,d),o.set(S,d),this.count++,s=hc.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),h?h.parentNode.insertBefore(d,h.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var Ss={$$typeof:D,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function OC(t,n,o,s,d,h,S,M,P){this.tag=1,this.containerInfo=t,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=Ao(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ao(0),this.hiddenUpdates=Ao(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function Rx(t,n,o,s,d,h,S,M,P,$,Q,ne){return t=new OC(t,n,o,S,P,$,Q,ne,M),n=1,h===!0&&(n|=24),h=fn(3,null,null,n),t.current=h,h.stateNode=t,n=dd(),n.refCount++,t.pooledCache=n,n.refCount++,h.memoizedState={element:s,isDehydrated:o,cache:n},gd(h),t}function Ex(t){return t?(t=zr,t):zr}function Ox(t,n,o,s,d,h){d=Ex(d),s.context===null?s.context=d:s.pendingContext=d,s=cl(n),s.payload={element:o},h=h===void 0?null:h,h!==null&&(s.callback=h),o=ul(t,s,n),o!==null&&(rn(o,t,n),Jo(o,t,n))}function Tx(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<n?o:n}}function Af(t,n){Tx(t,n),(t=t.alternate)&&Tx(t,n)}function kx(t){if(t.tag===13||t.tag===31){var n=Ql(t,67108864);n!==null&&rn(n,t,67108864),Af(t,67108864)}}function Ax(t){if(t.tag===13||t.tag===31){var n=vn();n=Du(n);var o=Ql(t,n);o!==null&&rn(o,t,n),Af(t,n)}}var vc=!0;function TC(t,n,o,s){var d=A.T;A.T=null;var h=U.p;try{U.p=2,zf(t,n,o,s)}finally{U.p=h,A.T=d}}function kC(t,n,o,s){var d=A.T;A.T=null;var h=U.p;try{U.p=8,zf(t,n,o,s)}finally{U.p=h,A.T=d}}function zf(t,n,o,s){if(vc){var d=Pf(s);if(d===null)Sf(t,n,s,xc,o),Px(t,s);else if(zC(d,t,n,o,s))s.stopPropagation();else if(Px(t,s),n&4&&-1<AC.indexOf(t)){for(;d!==null;){var h=jr(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var S=He(h.pendingLanes);if(S!==0){var M=h;for(M.pendingLanes|=2,M.entangledLanes|=2;S;){var P=1<<31-qt(S);M.entanglements[1]|=P,S&=~P}na(h),(We&6)===0&&(ec=At()+500,gs(0))}}break;case 31:case 13:M=Ql(h,2),M!==null&&rn(M,h,2),nc(),Af(h,2)}if(h=Pf(s),h===null&&Sf(t,n,s,xc,o),h===d)break;d=h}d!==null&&s.stopPropagation()}else Sf(t,n,s,null,o)}}function Pf(t){return t=Hu(t),Hf(t)}var xc=null;function Hf(t){if(xc=null,t=Cr(t),t!==null){var n=u(t);if(n===null)t=null;else{var o=n.tag;if(o===13){if(t=f(n),t!==null)return t;t=null}else if(o===31){if(t=m(n),t!==null)return t;t=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return xc=t,null}function zx(t){switch(t){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(ko()){case oi:return 2;case si:return 8;case Sr:case Cu:return 32;case ii:return 268435456;default:return 32}default:return 32}}var Ff=!1,Sl=null,wl=null,Cl=null,ws=new Map,Cs=new Map,jl=[],AC="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 Px(t,n){switch(t){case"focusin":case"focusout":Sl=null;break;case"dragenter":case"dragleave":wl=null;break;case"mouseover":case"mouseout":Cl=null;break;case"pointerover":case"pointerout":ws.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(n.pointerId)}}function js(t,n,o,s,d,h){return t===null||t.nativeEvent!==h?(t={blockedOn:n,domEventName:o,eventSystemFlags:s,nativeEvent:h,targetContainers:[d]},n!==null&&(n=jr(n),n!==null&&kx(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function zC(t,n,o,s,d){switch(n){case"focusin":return Sl=js(Sl,t,n,o,s,d),!0;case"dragenter":return wl=js(wl,t,n,o,s,d),!0;case"mouseover":return Cl=js(Cl,t,n,o,s,d),!0;case"pointerover":var h=d.pointerId;return ws.set(h,js(ws.get(h)||null,t,n,o,s,d)),!0;case"gotpointercapture":return h=d.pointerId,Cs.set(h,js(Cs.get(h)||null,t,n,o,s,d)),!0}return!1}function Hx(t){var n=Cr(t.target);if(n!==null){var o=u(n);if(o!==null){if(n=o.tag,n===13){if(n=f(o),n!==null){t.blockedOn=n,Qh(t.priority,function(){Ax(o)});return}}else if(n===31){if(n=m(o),n!==null){t.blockedOn=n,Qh(t.priority,function(){Ax(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yc(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var o=Pf(t.nativeEvent);if(o===null){o=t.nativeEvent;var s=new o.constructor(o.type,o);Pu=s,o.target.dispatchEvent(s),Pu=null}else return n=jr(o),n!==null&&kx(n),t.blockedOn=o,!1;n.shift()}return!0}function Fx(t,n,o){yc(t)&&o.delete(n)}function PC(){Ff=!1,Sl!==null&&yc(Sl)&&(Sl=null),wl!==null&&yc(wl)&&(wl=null),Cl!==null&&yc(Cl)&&(Cl=null),ws.forEach(Fx),Cs.forEach(Fx)}function bc(t,n){t.blockedOn===n&&(t.blockedOn=null,Ff||(Ff=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,PC)))}var Sc=null;function Lx(t){Sc!==t&&(Sc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sc===t&&(Sc=null);for(var n=0;n<t.length;n+=3){var o=t[n],s=t[n+1],d=t[n+2];if(typeof s!="function"){if(Hf(s||o)===null)continue;break}var h=jr(o);h!==null&&(t.splice(n,3),n-=3,zd(h,{pending:!0,data:d,method:o.method,action:s},s,d))}}))}function ro(t){function n(P){return bc(P,t)}Sl!==null&&bc(Sl,t),wl!==null&&bc(wl,t),Cl!==null&&bc(Cl,t),ws.forEach(n),Cs.forEach(n);for(var o=0;o<jl.length;o++){var s=jl[o];s.blockedOn===t&&(s.blockedOn=null)}for(;0<jl.length&&(o=jl[0],o.blockedOn===null);)Hx(o),o.blockedOn===null&&jl.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var d=o[s],h=o[s+1],S=d[Jt]||null;if(typeof h=="function")S||Lx(o);else if(S){var M=null;if(h&&h.hasAttribute("formAction")){if(d=h,S=h[Jt]||null)M=S.formAction;else if(Hf(d)!==null)continue}else M=S.action;typeof M=="function"?o[s+1]=M:(o.splice(s,3),s-=3),Lx(o)}}}function Vx(){function t(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(S){return d=S})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),s||setTimeout(o,20)}function o(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Lf(t){this._internalRoot=t}wc.prototype.render=Lf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var o=n.current,s=vn();Ox(o,s,t,n,null,null)},wc.prototype.unmount=Lf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Ox(t.current,2,null,t,null,null),nc(),n[wr]=null}};function wc(t){this._internalRoot=t}wc.prototype.unstable_scheduleHydration=function(t){if(t){var n=Xh();t={blockedOn:null,target:t,priority:n};for(var o=0;o<jl.length&&n!==0&&n<jl[o].priority;o++);jl.splice(o,0,t),o===0&&Hx(t)}};var Bx=a.version;if(Bx!=="19.2.8")throw Error(r(527,Bx,"19.2.8"));U.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=p(n),t=t!==null?x(t):null,t=t===null?null:t.stateNode,t};var HC={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cc.isDisabled&&Cc.supportsFiber)try{Yl=Cc.inject(HC),Yt=Cc}catch{}}return Ms.createRoot=function(t,n){if(!i(t))throw Error(r(299));var o=!1,s="",d=Wp,h=Kp,S=Xp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError)),n=Rx(t,1,!1,null,null,o,s,null,d,h,S,Vx),t[wr]=n.current,bf(t),new Lf(n)},Ms.hydrateRoot=function(t,n,o){if(!i(t))throw Error(r(299));var s=!1,d="",h=Wp,S=Kp,M=Xp,P=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError),o.formState!==void 0&&(P=o.formState)),n=Rx(t,1,!0,n,o??null,s,d,P,h,S,M,Vx),n.context=Ex(null),o=n.current,s=vn(),s=Du(s),d=cl(s),d.callback=null,ul(o,d,s),o=s,n.current.lanes=o,xa(n,o),na(n),t[wr]=n.current,bf(t),new wc(n)},Ms.version="19.2.8",Ms}var ey;function WC(){if(ey)return If.exports;ey=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),If.exports=qC(),If.exports}var KC=WC();const h0=v.createContext({theme:"system",setTheme:()=>null});function XC({children:e,defaultTheme:a="system",storageKey:l="todos-dashboard-theme",...r}){const[i,u]=v.useState(()=>localStorage.getItem(l)||a);v.useEffect(()=>{const m=window.document.documentElement;if(m.classList.remove("light","dark"),i==="system"){const g=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";m.classList.add(g);return}m.classList.add(i)},[i]);const f={theme:i,setTheme:m=>{localStorage.setItem(l,m),u(m)}};return c.jsx(h0.Provider,{...r,value:f,children:e})}const QC=()=>{const e=v.useContext(h0);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};/**
|
|
50
|
+
* @license lucide-react v0.468.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const ZC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g0=(...e)=>e.filter((a,l,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===l).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.468.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var JC={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"};/**
|
|
60
|
+
* @license lucide-react v0.468.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const ej=v.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:i="",children:u,iconNode:f,...m},g)=>v.createElement("svg",{ref:g,...JC,width:a,height:a,stroke:e,strokeWidth:r?Number(l)*24/Number(a):l,className:g0("lucide",i),...m},[...f.map(([p,x])=>v.createElement(p,x)),...Array.isArray(u)?u:[u]]));/**
|
|
65
|
+
* @license lucide-react v0.468.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Ae=(e,a)=>{const l=v.forwardRef(({className:r,...i},u)=>v.createElement(ej,{ref:u,iconNode:a,className:g0(`lucide-${ZC(e)}`,r),...i}));return l.displayName=`${e}`,l};/**
|
|
70
|
+
* @license lucide-react v0.468.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const tj=Ae("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
75
|
+
* @license lucide-react v0.468.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const nj=Ae("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
80
|
+
* @license lucide-react v0.468.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const qf=Ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
85
|
+
* @license lucide-react v0.468.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const bn=Ae("ArrowUpDown",[["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"}]]);/**
|
|
90
|
+
* @license lucide-react v0.468.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const aj=Ae("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
95
|
+
* @license lucide-react v0.468.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const lj=Ae("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
100
|
+
* @license lucide-react v0.468.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Us=Ae("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"}]]);/**
|
|
105
|
+
* @license lucide-react v0.468.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const p0=Ae("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
110
|
+
* @license lucide-react v0.468.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const v0=Ae("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
115
|
+
* @license lucide-react v0.468.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const x0=Ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
120
|
+
* @license lucide-react v0.468.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const y0=Ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
125
|
+
* @license lucide-react v0.468.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Is=Ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
130
|
+
* @license lucide-react v0.468.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const So=Ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
135
|
+
* @license lucide-react v0.468.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const po=Ae("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
140
|
+
* @license lucide-react v0.468.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const rj=Ae("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
145
|
+
* @license lucide-react v0.468.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const oj=Ae("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
150
|
+
* @license lucide-react v0.468.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const b0=Ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
155
|
+
* @license lucide-react v0.468.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const sj=Ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
160
|
+
* @license lucide-react v0.468.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const $s=Ae("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"}]]);/**
|
|
165
|
+
* @license lucide-react v0.468.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Xm=Ae("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
170
|
+
* @license lucide-react v0.468.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Zc=Ae("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
175
|
+
* @license lucide-react v0.468.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const S0=Ae("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
180
|
+
* @license lucide-react v0.468.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const ij=Ae("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
185
|
+
* @license lucide-react v0.468.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const cj=Ae("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
|
|
190
|
+
* @license lucide-react v0.468.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const uj=Ae("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
195
|
+
* @license lucide-react v0.468.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const dj=Ae("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/**
|
|
200
|
+
* @license lucide-react v0.468.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const fj=Ae("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
205
|
+
* @license lucide-react v0.468.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const mj=Ae("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
210
|
+
* @license lucide-react v0.468.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const ty=Ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
215
|
+
* @license lucide-react v0.468.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const wo=Ae("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
220
|
+
* @license lucide-react v0.468.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const vo=Ae("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
225
|
+
* @license lucide-react v0.468.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Ol=Ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
230
|
+
* @license lucide-react v0.468.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const hj=Ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
235
|
+
* @license lucide-react v0.468.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const w0=Ae("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
240
|
+
* @license lucide-react v0.468.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Jc=Ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
245
|
+
* @license lucide-react v0.468.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const gj=Ae("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
250
|
+
* @license lucide-react v0.468.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const ny=Ae("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"}]]);/**
|
|
255
|
+
* @license lucide-react v0.468.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const pj=Ae("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
260
|
+
* @license lucide-react v0.468.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const ua=Ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
265
|
+
* @license lucide-react v0.468.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const vj=Ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
270
|
+
* @license lucide-react v0.468.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Qm=Ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function C0(e){var a,l,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(a=0;a<i;a++)e[a]&&(l=C0(e[a]))&&(r&&(r+=" "),r+=l)}else for(l in e)e[l]&&(r&&(r+=" "),r+=l);return r}function j0(){for(var e,a,l=0,r="",i=arguments.length;l<i;l++)(e=arguments[l])&&(a=C0(e))&&(r&&(r+=" "),r+=a);return r}const ay=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ly=j0,N0=(e,a)=>l=>{var r;if((a==null?void 0:a.variants)==null)return ly(e,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:i,defaultVariants:u}=a,f=Object.keys(i).map(p=>{const x=l==null?void 0:l[p],y=u==null?void 0:u[p];if(x===null)return null;const w=ay(x)||ay(y);return i[p][w]}),m=l&&Object.entries(l).reduce((p,x)=>{let[y,w]=x;return w===void 0||(p[y]=w),p},{}),g=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((p,x)=>{let{class:y,className:w,...b}=x;return Object.entries(b).every(C=>{let[j,N]=C;return Array.isArray(N)?N.includes({...u,...m}[j]):{...u,...m}[j]===N})?[...p,y,w]:p},[]);return ly(e,f,g,l==null?void 0:l.class,l==null?void 0:l.className)},xj=(e,a)=>{const l=new Array(e.length+a.length);for(let r=0;r<e.length;r++)l[r]=e[r];for(let r=0;r<a.length;r++)l[e.length+r]=a[r];return l},yj=(e,a)=>({classGroupId:e,validator:a}),M0=(e=new Map,a=null,l)=>({nextPart:e,validators:a,classGroupId:l}),Gc="-",ry=[],bj="arbitrary..",Sj=e=>{const a=Cj(e),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return wj(f);const m=f.split(Gc),g=m[0]===""&&m.length>1?1:0;return _0(m,g,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=r[f],p=l[f];return g?p?xj(p,g):g:p||ry}return l[f]||ry}}},_0=(e,a,l)=>{if(e.length-a===0)return l.classGroupId;const i=e[a],u=l.nextPart.get(i);if(u){const p=_0(e,a+1,u);if(p)return p}const f=l.validators;if(f===null)return;const m=a===0?e.join(Gc):e.slice(a).join(Gc),g=f.length;for(let p=0;p<g;p++){const x=f[p];if(x.validator(m))return x.classGroupId}},wj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=e.slice(1,-1),l=a.indexOf(":"),r=a.slice(0,l);return r?bj+r:void 0})(),Cj=e=>{const{theme:a,classGroups:l}=e;return jj(l,a)},jj=(e,a)=>{const l=M0();for(const r in e){const i=e[r];Zm(i,l,r,a)}return l},Zm=(e,a,l,r)=>{const i=e.length;for(let u=0;u<i;u++){const f=e[u];Nj(f,a,l,r)}},Nj=(e,a,l,r)=>{if(typeof e=="string"){Mj(e,a,l);return}if(typeof e=="function"){_j(e,a,l,r);return}Dj(e,a,l,r)},Mj=(e,a,l)=>{const r=e===""?a:D0(a,e);r.classGroupId=l},_j=(e,a,l,r)=>{if(Rj(e)){Zm(e(r),a,l,r);return}a.validators===null&&(a.validators=[]),a.validators.push(yj(l,e))},Dj=(e,a,l,r)=>{const i=Object.entries(e),u=i.length;for(let f=0;f<u;f++){const[m,g]=i[f];Zm(g,D0(a,m),l,r)}},D0=(e,a)=>{let l=e;const r=a.split(Gc),i=r.length;for(let u=0;u<i;u++){const f=r[u];let m=l.nextPart.get(f);m||(m=M0(),l.nextPart.set(f,m)),l=m}return l},Rj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ej=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),r=Object.create(null);const i=(u,f)=>{l[u]=f,a++,a>e&&(a=0,r=l,l=Object.create(null))};return{get(u){let f=l[u];if(f!==void 0)return f;if((f=r[u])!==void 0)return i(u,f),f},set(u,f){u in l?l[u]=f:i(u,f)}}},wm="!",oy=":",Oj=[],sy=(e,a,l,r,i)=>({modifiers:e,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:r,isExternal:i}),Tj=e=>{const{prefix:a,experimentalParseClassName:l}=e;let r=i=>{const u=[];let f=0,m=0,g=0,p;const x=i.length;for(let j=0;j<x;j++){const N=i[j];if(f===0&&m===0){if(N===oy){u.push(i.slice(g,j)),g=j+1;continue}if(N==="/"){p=j;continue}}N==="["?f++:N==="]"?f--:N==="("?m++:N===")"&&m--}const y=u.length===0?i:i.slice(g);let w=y,b=!1;y.endsWith(wm)?(w=y.slice(0,-1),b=!0):y.startsWith(wm)&&(w=y.slice(1),b=!0);const C=p&&p>g?p-g:void 0;return sy(u,b,w,C)};if(a){const i=a+oy,u=r;r=f=>f.startsWith(i)?u(f.slice(i.length)):sy(Oj,!1,f,void 0,!0)}if(l){const i=r;r=u=>l({className:u,parseClassName:i})}return r},kj=e=>{const a=new Map;return e.orderSensitiveModifiers.forEach((l,r)=>{a.set(l,1e6+r)}),l=>{const r=[];let i=[];for(let u=0;u<l.length;u++){const f=l[u],m=f[0]==="[",g=a.has(f);m||g?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(f)):i.push(f)}return i.length>0&&(i.sort(),r.push(...i)),r}},Aj=e=>({cache:Ej(e.cacheSize),parseClassName:Tj(e),sortModifiers:kj(e),postfixLookupClassGroupIds:zj(e),...Sj(e)}),zj=e=>{const a=Object.create(null),l=e.postfixLookupClassGroups;if(l)for(let r=0;r<l.length;r++)a[l[r]]=!0;return a},Pj=/\s+/,Hj=(e,a)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:u,postfixLookupClassGroupIds:f}=a,m=[],g=e.trim().split(Pj);let p="";for(let x=g.length-1;x>=0;x-=1){const y=g[x],{isExternal:w,modifiers:b,hasImportantModifier:C,baseClassName:j,maybePostfixModifierPosition:N}=l(y);if(w){p=y+(p.length>0?" "+p:p);continue}let E=!!N,O;if(E){const H=j.substring(0,N);O=r(H);const L=O&&f[O]?r(j):void 0;L&&L!==O&&(O=L,E=!1)}else O=r(j);if(!O){if(!E){p=y+(p.length>0?" "+p:p);continue}if(O=r(j),!O){p=y+(p.length>0?" "+p:p);continue}E=!1}const D=b.length===0?"":b.length===1?b[0]:u(b).join(":"),k=C?D+wm:D,z=k+O;if(m.indexOf(z)>-1)continue;m.push(z);const _=i(O,E);for(let H=0;H<_.length;++H){const L=_[H];m.push(k+L)}p=y+(p.length>0?" "+p:p)}return p},Fj=(...e)=>{let a=0,l,r,i="";for(;a<e.length;)(l=e[a++])&&(r=R0(l))&&(i&&(i+=" "),i+=r);return i},R0=e=>{if(typeof e=="string")return e;let a,l="";for(let r=0;r<e.length;r++)e[r]&&(a=R0(e[r]))&&(l&&(l+=" "),l+=a);return l},Lj=(e,...a)=>{let l,r,i,u;const f=g=>{const p=a.reduce((x,y)=>y(x),e());return l=Aj(p),r=l.cache.get,i=l.cache.set,u=m,m(g)},m=g=>{const p=r(g);if(p)return p;const x=Hj(g,l);return i(g,x),x};return u=f,(...g)=>u(Fj(...g))},Vj=[],Ct=e=>{const a=l=>l[e]||Vj;return a.isThemeGetter=!0,a},E0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,O0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Uj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ij=/\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$/,$j=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ml=e=>Bj.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),aa=e=>!!e&&Number.isInteger(Number(e)),Wf=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Ha=e=>Uj.test(e),T0=()=>!0,qj=e=>Ij.test(e)&&!$j.test(e),Jm=()=>!1,Wj=e=>Gj.test(e),Kj=e=>Yj.test(e),Xj=e=>!me(e)&&!he(e),Qj=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)),Zj=e=>Hl(e,z0,Jm),me=e=>E0.test(e),ur=e=>Hl(e,P0,qj),iy=e=>Hl(e,oN,Fe),Jj=e=>Hl(e,F0,T0),eN=e=>Hl(e,H0,Jm),cy=e=>Hl(e,k0,Jm),tN=e=>Hl(e,A0,Kj),jc=e=>Hl(e,L0,Wj),he=e=>O0.test(e),_s=e=>vr(e,P0),nN=e=>vr(e,H0),uy=e=>vr(e,k0),aN=e=>vr(e,z0),lN=e=>vr(e,A0),Nc=e=>vr(e,L0,!0),rN=e=>vr(e,F0,!0),Hl=(e,a,l)=>{const r=E0.exec(e);return r?r[1]?a(r[1]):l(r[2]):!1},vr=(e,a,l=!1)=>{const r=O0.exec(e);return r?r[1]?a(r[1]):l:!1},k0=e=>e==="position"||e==="percentage",A0=e=>e==="image"||e==="url",z0=e=>e==="length"||e==="size"||e==="bg-size",P0=e=>e==="length",oN=e=>e==="number",H0=e=>e==="family-name",F0=e=>e==="number"||e==="weight",L0=e=>e==="shadow",sN=()=>{const e=Ct("color"),a=Ct("font"),l=Ct("text"),r=Ct("font-weight"),i=Ct("tracking"),u=Ct("leading"),f=Ct("breakpoint"),m=Ct("container"),g=Ct("spacing"),p=Ct("radius"),x=Ct("shadow"),y=Ct("inset-shadow"),w=Ct("text-shadow"),b=Ct("drop-shadow"),C=Ct("blur"),j=Ct("perspective"),N=Ct("aspect"),E=Ct("ease"),O=Ct("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...k(),he,me],_=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],L=()=>[he,me,g],W=()=>[Ml,"full","auto",...L()],Y=()=>[aa,"none","subgrid",he,me],K=()=>["auto",{span:["full",aa,he,me]},aa,he,me],ee=()=>[aa,"auto",he,me],te=()=>["auto","min","max","fr",he,me],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...L()],U=()=>[Ml,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],ae=()=>[Ml,"screen","full","dvw","lvw","svw","min","max","fit",...L()],Z=()=>[Ml,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],T=()=>[e,he,me],R=()=>[...k(),uy,cy,{position:[he,me]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",aN,Zj,{size:[he,me]}],le=()=>[Wf,_s,ur],re=()=>["","none","full",p,he,me],fe=()=>["",Fe,_s,ur],ve=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Fe,Wf,uy,cy],Se=()=>["","none",C,he,me],Me=()=>["none",Fe,he,me],_e=()=>["none",Fe,he,me],Pe=()=>[Fe,he,me],ot=()=>[Ml,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ha],breakpoint:[Ha],color:[T0],container:[Ha],"drop-shadow":[Ha],ease:["in","out","in-out"],font:[Xj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ha],shadow:[Ha],spacing:["px",Fe],text:[Ha],"text-shadow":[Ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ml,me,he,N]}],container:["container"],"container-type":[{"@container":["","normal","size",he,me]}],"container-named":[Qj],columns:[{columns:[Fe,me,he,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:z()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[aa,"auto",he,me]}],basis:[{basis:[Ml,"full","auto",m,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Ml,"auto","initial","none",me]}],grow:[{grow:["",Fe,he,me]}],shrink:[{shrink:["",Fe,he,me]}],order:[{order:[aa,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[m,"screen",...U()]}],"min-w":[{"min-w":[m,"screen","none",...U()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",l,_s,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,rN,Jj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wf,me]}],"font-family":[{font:[nN,eN,a]}],"font-features":[{"font-features":[me]}],"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,he,me]}],"line-clamp":[{"line-clamp":[Fe,"none",he,iy]}],leading:[{leading:[u,...L()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",he,ur]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Fe,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[aa,he,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],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",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},aa,he,me],radial:["",he,me],conic:[aa,he,me]},lN,tN]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,he,me]}],"outline-w":[{outline:["",Fe,_s,ur]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",x,Nc,jc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",y,Nc,jc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Fe,ur]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",w,Nc,jc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Fe,he,me]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:Se()}],brightness:[{brightness:[Fe,he,me]}],contrast:[{contrast:[Fe,he,me]}],"drop-shadow":[{"drop-shadow":["","none",b,Nc,jc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Fe,he,me]}],"hue-rotate":[{"hue-rotate":[Fe,he,me]}],invert:[{invert:["",Fe,he,me]}],saturate:[{saturate:[Fe,he,me]}],sepia:[{sepia:["",Fe,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Fe,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",he,me]}],ease:[{ease:["linear","initial",E,he,me]}],delay:[{delay:[Fe,he,me]}],animate:[{animate:["none",O,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,he,me]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ot()}],"translate-x":[{"translate-x":ot()}],"translate-y":[{"translate-y":ot()}],"translate-z":[{"translate-z":ot()}],"translate-none":["translate-none"],zoom:[{zoom:[aa,he,me]}],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",he,me]}],"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":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",he,me]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Fe,_s,ur,iy]}],stroke:[{stroke:["none",...T()]}],"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"]}},iN=Lj(sN);function Te(...e){return iN(j0(e))}const Lc=N0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-white shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),oe=v.forwardRef(({className:e,variant:a,size:l,...r},i)=>c.jsx("button",{className:Te(Lc({variant:a,size:l,className:e})),ref:i,...r}));oe.displayName="Button";var Gs=m0(),cN=Object.defineProperty,eh=(e,a)=>cN(e,"name",{value:a,configurable:!0});function Cm(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}eh(Cm,"setRef");function V0(...e){return a=>{let l=!1;const r=e.map(i=>{const u=Cm(i,a);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let i=0;i<r.length;i++){const u=r[i];typeof u=="function"?u():Cm(e[i],null)}}}}eh(V0,"composeRefs");function Ke(...e){return v.useCallback(V0(...e),e)}eh(Ke,"useComposedRefs");var uN=Object.defineProperty,Wn=(e,a)=>uN(e,"name",{value:a,configurable:!0});function da(e){const a=v.forwardRef((l,r)=>{let{children:i,...u}=l,f=null,m=!1;const g=[];jm(i)&&typeof Mc=="function"&&(i=Mc(i._payload)),v.Children.forEach(i,w=>{var b;if($0(w)){m=!0;const C=w;let j="child"in C.props?C.props.child:C.props.children;jm(j)&&typeof Mc=="function"&&(j=Mc(j._payload)),f=fN(C,j),g.push((b=f==null?void 0:f.props)==null?void 0:b.children)}else g.push(w)}),f?f=v.cloneElement(f,void 0,g):!m&&v.Children.count(i)===1&&v.isValidElement(i)&&(f=i);const p=f?I0(f):void 0,x=Ke(r,p);if(!f){if(i||i===0)throw new Error(m?gN(e):hN(e));return i}const y=U0(u,f.props??{});return f.type!==v.Fragment&&(y.ref=r?x:p),v.cloneElement(f,y)});return a.displayName=`${e}.Slot`,a}Wn(da,"createSlot");var B0=Symbol.for("radix.slottable");function dN(e){const a=Wn(l=>"child"in l?l.children(l.child):l.children,"Slottable");return a.displayName=`${e}.Slottable`,a.__radixId=B0,a}Wn(dN,"createSlottable");var fN=Wn((e,a)=>{if("child"in e.props){const l=e.props.child;return v.isValidElement(l)?v.cloneElement(l,void 0,e.props.children(l.props.children)):null}return v.isValidElement(a)?a:null},"getSlottableElementFromSlottable");function U0(e,a){const l={...a};for(const r in a){const i=e[r],u=a[r];/^on[A-Z]/.test(r)?i&&u?l[r]=(...m)=>{const g=u(...m);return i(...m),g}:i&&(l[r]=i):r==="style"?l[r]={...i,...u}:r==="className"&&(l[r]=[i,u].filter(Boolean).join(" "))}return{...e,...l}}Wn(U0,"mergeProps");function I0(e){var r,i;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?e.ref:(a=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}Wn(I0,"getElementRef");function $0(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B0}Wn($0,"isSlottable");var mN=Symbol.for("react.lazy");function jm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mN&&"_payload"in e&&G0(e._payload)}Wn(jm,"isLazyComponent");function G0(e){return typeof e=="object"&&e!==null&&"then"in e}Wn(G0,"isPromiseLike");var hN=Wn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),gN=Wn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Mc=bo[" use ".trim().toString()],pN=Object.defineProperty,vN=(e,a)=>pN(e,"name",{value:a,configurable:!0}),xN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=xN.reduce((e,a)=>{const l=da(`Primitive.${a}`),r=v.forwardRef((i,u)=>{const{asChild:f,...m}=i,g=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(g,{...m,ref:u})});return r.displayName=`Primitive.${a}`,{...e,[a]:r}},{});function As(e,a){e&&Gs.flushSync(()=>e.dispatchEvent(a))}vN(As,"dispatchDiscreteCustomEvent");var yN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),bN=Object.defineProperty,Hn=(e,a)=>bN(e,"name",{value:a,configurable:!0});function SN(e,a){const l=v.createContext(a);l.displayName=e+"Context";const r=Hn(u=>{const{children:f,...m}=u,g=v.useMemo(()=>m,Object.values(m));return c.jsx(l.Provider,{value:g,children:f})},"Provider");r.displayName=e+"Provider";function i(u,f={}){const{optional:m=!1}=f,g=v.useContext(l);if(g)return g;if(a!==void 0)return a;if(!m)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Hn(i,"useContext"),[r,i]}Hn(SN,"createContext");function Kn(e,a=[]){let l=[];function r(u,f){const m=v.createContext(f);m.displayName=u+"Context";const g=l.length;l=[...l,f];const p=Hn(y=>{var E;const{scope:w,children:b,...C}=y,j=((E=w==null?void 0:w[e])==null?void 0:E[g])||m,N=v.useMemo(()=>C,Object.values(C));return c.jsx(j.Provider,{value:N,children:b})},"Provider");p.displayName=u+"Provider";function x(y,w,b={}){var E;const{optional:C=!1}=b,j=((E=w==null?void 0:w[e])==null?void 0:E[g])||m,N=v.useContext(j);if(N)return N;if(f!==void 0)return f;if(!C)throw new Error(`\`${y}\` must be used within \`${u}\``)}return Hn(x,"useContext"),[p,x]}Hn(r,"createContext");const i=Hn(()=>{const u=l.map(f=>v.createContext(f));return Hn(function(m){const g=(m==null?void 0:m[e])||u;return v.useMemo(()=>({[`__scope${e}`]:{...m,[e]:g}}),[m,g])},"useScope")},"createScope");return i.scopeName=e,[r,Y0(i,...a)]}Hn(Kn,"createContextScope");function Y0(...e){const a=e[0];if(e.length===1)return a;const l=Hn(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return Hn(function(u){const f=r.reduce((m,{useScope:g,scopeName:p})=>{const y=g(u)[`__scope${p}`];return{...m,...y}},{});return v.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])},"useComposedScopes")},"createScope");return l.scopeName=a.scopeName,l}Hn(Y0,"composeContextScopes");var wN=Object.defineProperty,Tt=(e,a)=>wN(e,"name",{value:a,configurable:!0});function Co(e){const a=e+"CollectionProvider",[l,r]=Kn(a),[i,u]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=Tt(j=>{const{scope:N,children:E}=j,O=v.useRef(null),D=v.useRef(new Map).current;return c.jsx(i,{scope:N,itemMap:D,collectionRef:O,children:E})},"CollectionProvider");f.displayName=a;const m=e+"CollectionSlot",g=da(m),p=v.forwardRef((j,N)=>{const{scope:E,children:O}=j,D=u(m,E),k=Ke(N,D.collectionRef);return c.jsx(g,{ref:k,children:O})});p.displayName=m;const x=e+"CollectionItemSlot",y="data-radix-collection-item",w=da(x),b=v.forwardRef((j,N)=>{const{scope:E,children:O,...D}=j,k=v.useRef(null),z=Ke(N,k),_=u(x,E);return v.useEffect(()=>(_.itemMap.set(k,{ref:k,...D}),()=>void _.itemMap.delete(k))),c.jsx(w,{[y]:"",ref:z,children:O})});b.displayName=x;function C(j){const N=u(e+"CollectionConsumer",j);return v.useCallback(()=>{const O=N.collectionRef.current;if(!O)return[];const D=Array.from(O.querySelectorAll(`[${y}]`));return Array.from(N.itemMap.values()).sort((_,H)=>D.indexOf(_.ref.current)-D.indexOf(H.ref.current))},[N.collectionRef,N.itemMap])}return Tt(C,"useCollection"),[{Provider:f,Slot:p,ItemSlot:b},C,r]}Tt(Co,"createCollection");var dy=new WeakMap,St,yn,Kf=(yn=class extends Map{constructor(l){super(l);$x(this,St);Vf(this,St,[...super.keys()]),dy.set(this,!0)}set(l,r){return dy.get(this)&&(this.has(l)?Bt(this,St)[Bt(this,St).indexOf(l)]=l:Bt(this,St).push(l)),super.set(l,r),this}insert(l,r,i){const u=this.has(r),f=Bt(this,St).length,m=th(l);let g=m>=0?m:f+m;const p=g<0||g>=f?-1:g;if(p===this.size||u&&p===this.size-1||p===-1)return this.set(r,i),this;const x=this.size+(u?0:1);m<0&&g++;const y=[...Bt(this,St)];let w,b=!1;for(let C=g;C<x;C++)if(g===C){let j=y[C];y[C]===r&&(j=y[C+1]),u&&this.delete(r),w=this.get(j),this.set(r,i)}else{!b&&y[C-1]===r&&(b=!0);const j=y[b?C:C-1],N=w;w=this.get(j),this.delete(j),this.set(j,N)}return this}with(l,r,i){const u=new yn(this);return u.insert(l,r,i),u}before(l){const r=Bt(this,St).indexOf(l)-1;if(!(r<0))return this.entryAt(r)}setBefore(l,r,i){const u=Bt(this,St).indexOf(l);return u===-1?this:this.insert(u,r,i)}after(l){let r=Bt(this,St).indexOf(l);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(l,r,i){const u=Bt(this,St).indexOf(l);return u===-1?this:this.insert(u+1,r,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Vf(this,St,[]),super.clear()}delete(l){const r=super.delete(l);return r&&Bt(this,St).splice(Bt(this,St).indexOf(l),1),r}deleteAt(l){const r=this.keyAt(l);return r!==void 0?this.delete(r):!1}at(l){const r=Vc(Bt(this,St),l);if(r!==void 0)return this.get(r)}entryAt(l){const r=Vc(Bt(this,St),l);if(r!==void 0)return[r,this.get(r)]}indexOf(l){return Bt(this,St).indexOf(l)}keyAt(l){return Vc(Bt(this,St),l)}from(l,r){const i=this.indexOf(l);if(i===-1)return;let u=i+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(l,r){const i=this.indexOf(l);if(i===-1)return;let u=i+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(l,r){let i=0;for(const u of this){if(Reflect.apply(l,r,[u,i,this]))return u;i++}}findIndex(l,r){let i=0;for(const u of this){if(Reflect.apply(l,r,[u,i,this]))return i;i++}return-1}filter(l,r){const i=[];let u=0;for(const f of this)Reflect.apply(l,r,[f,u,this])&&i.push(f),u++;return new yn(i)}map(l,r){const i=[];let u=0;for(const f of this)i.push([f[0],Reflect.apply(l,r,[f,u,this])]),u++;return new yn(i)}reduce(...l){const[r,i]=l;let u=0,f=i??this.at(0);for(const m of this)u===0&&l.length===1?f=m:f=Reflect.apply(r,this,[f,m,u,this]),u++;return f}reduceRight(...l){const[r,i]=l;let u=i??this.at(-1);for(let f=this.size-1;f>=0;f--){const m=this.at(f);f===this.size-1&&l.length===1?u=m:u=Reflect.apply(r,this,[u,m,f,this])}return u}toSorted(l){const r=[...this.entries()].sort(l);return new yn(r)}toReversed(){const l=new yn;for(let r=this.size-1;r>=0;r--){const i=this.keyAt(r),u=this.get(i);l.set(i,u)}return l}toSpliced(...l){const r=[...this.entries()];return r.splice(...l),new yn(r)}slice(l,r){const i=new yn;let u=this.size-1;if(l===void 0)return i;l<0&&(l=l+this.size),r!==void 0&&r>0&&(u=r-1);for(let f=l;f<=u;f++){const m=this.keyAt(f),g=this.get(m);i.set(m,g)}return i}every(l,r){let i=0;for(const u of this){if(!Reflect.apply(l,r,[u,i,this]))return!1;i++}return!0}some(l,r){let i=0;for(const u of this){if(Reflect.apply(l,r,[u,i,this]))return!0;i++}return!1}},St=new WeakMap,Tt(yn,"OrderedDict"),yn);function Vc(e,a){if("at"in Array.prototype)return Array.prototype.at.call(e,a);const l=q0(e,a);return l===-1?void 0:e[l]}Tt(Vc,"at");function q0(e,a){const l=e.length,r=th(a),i=r>=0?r:l+r;return i<0||i>=l?-1:i}Tt(q0,"toSafeIndex");function th(e){return e!==e||e===0?0:Math.trunc(e)}Tt(th,"toSafeInteger");function CN(e){const a=e+"CollectionProvider",[l,r]=Kn(a),[i,u]=l(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Kf,setItemMap:Tt(()=>{},"setItemMap")}),f=Tt(({state:D,...k})=>D?c.jsx(g,{...k,state:D}):c.jsx(m,{...k}),"CollectionProvider");f.displayName=a;const m=Tt(D=>{const k=N();return c.jsx(g,{...D,state:k})},"CollectionInit");m.displayName=a+"Init";const g=Tt(D=>{const{scope:k,children:z,state:_}=D,H=v.useRef(null),[L,W]=v.useState(null),Y=Ke(H,W),[K,ee]=_;return v.useEffect(()=>{if(!L)return;const te=X0(()=>{});return te.observe(L,{childList:!0,subtree:!0}),()=>{te.disconnect()}},[L]),c.jsx(i,{scope:k,itemMap:K,setItemMap:ee,collectionRef:Y,collectionRefObject:H,collectionElement:L,children:z})},"CollectionProviderImpl");g.displayName=a+"Impl";const p=e+"CollectionSlot",x=da(p),y=v.forwardRef((D,k)=>{const{scope:z,children:_}=D,H=u(p,z),L=Ke(k,H.collectionRef);return c.jsx(x,{ref:L,children:_})});y.displayName=p;const w=e+"CollectionItemSlot",b="data-radix-collection-item",C=da(w),j=v.forwardRef((D,k)=>{const{scope:z,children:_,...H}=D,L=v.useRef(null),[W,Y]=v.useState(null),K=Ke(k,L,Y),ee=u(w,z),{setItemMap:te}=ee,se=v.useRef(H);W0(se.current,H)||(se.current=H);const ce=se.current;return v.useEffect(()=>{const A=ce;return te(U=>W?U.has(W)?U.set(W,{...A,element:W}).toSorted(Nm):(U.set(W,{...A,element:W}),U.toSorted(Nm)):U),()=>{te(U=>!W||!U.has(W)?U:(U.delete(W),new Kf(U)))}},[W,ce,te]),c.jsx(C,{[b]:"",ref:K,children:_})});j.displayName=w;function N(){return v.useState(new Kf)}Tt(N,"useInitCollection");function E(D){const{itemMap:k}=u(e+"CollectionConsumer",D);return k}return Tt(E,"useCollection"),[{Provider:f,Slot:y,ItemSlot:j},{createCollectionScope:r,useCollection:E,useInitCollection:N}]}Tt(CN,"createCollection");function W0(e,a){if(e===a)return!0;if(typeof e!="object"||typeof a!="object"||e==null||a==null)return!1;const l=Object.keys(e),r=Object.keys(a);if(l.length!==r.length)return!1;for(const i of l)if(!Object.prototype.hasOwnProperty.call(a,i)||e[i]!==a[i])return!1;return!0}Tt(W0,"shallowEqual");function K0(e,a){return!!(a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Tt(K0,"isElementPreceding");function Nm(e,a){return!e[1].element||!a[1].element?0:K0(e[1].element,a[1].element)?-1:1}Tt(Nm,"sortByDocumentPosition");function X0(e){return new MutationObserver(l=>{for(const r of l)if(r.type==="childList"){e();return}})}Tt(X0,"getChildListObserver");var jN=Object.defineProperty,jo=(e,a)=>jN(e,"name",{value:a,configurable:!0}),Q0=!!(typeof window<"u"&&window.document&&window.document.createElement);function we(e,a,{checkForDefaultPrevented:l=!0}={}){return jo(function(i){if(e==null||e(i),l===!1||!i||!i.defaultPrevented)return a==null?void 0:a(i)},"handleEvent")}jo(we,"composeEventHandlers");function NN(e){var a;if(!Q0)throw new Error("Cannot access window outside of the DOM");return((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??window}jo(NN,"getOwnerWindow");function Mm(e){if(!Q0)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}jo(Mm,"getOwnerDocument");function Z0(e,a=!1){const{activeElement:l}=Mm(e);if(!(l!=null&&l.nodeName))return null;if(J0(l)&&l.contentDocument)return Z0(l.contentDocument.body,a);if(a){const r=l.getAttribute("aria-activedescendant");if(r){const i=Mm(l).getElementById(r);if(i)return i}}return l}jo(Z0,"getActiveElement");function J0(e){return e.tagName==="IFRAME"}jo(J0,"isFrame");var _t=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},MN=Object.defineProperty,_N=(e,a)=>MN(e,"name",{value:a,configurable:!0}),fy=bo[" useEffectEvent ".trim().toString()],my=bo[" useInsertionEffect ".trim().toString()];function eb(e){if(typeof fy=="function")return fy(e);const a=v.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof my=="function"?my(()=>{a.current=e}):_t(()=>{a.current=e}),v.useMemo(()=>((...l)=>{var r;return(r=a.current)==null?void 0:r.call(a,...l)}),[])}_N(eb,"useEffectEvent");var DN=Object.defineProperty,Ys=(e,a)=>DN(e,"name",{value:a,configurable:!0}),RN=bo[" useInsertionEffect ".trim().toString()]||_t;function Tl({prop:e,defaultProp:a,onChange:l=Ys(()=>{},"onChange"),caller:r}){const[i,u,f]=tb({defaultProp:a,onChange:l}),m=e!==void 0,g=m?e:i,p=v.useCallback(x=>{var y;if(m){const w=nb(x)?x(e):x;w!==e&&((y=f.current)==null||y.call(f,w))}else u(x)},[m,e,u,f]);return[g,p]}Ys(Tl,"useControllableState");function tb({defaultProp:e,onChange:a}){const[l,r]=v.useState(e),i=v.useRef(l),u=v.useRef(a);return RN(()=>{u.current=a},[a]),v.useEffect(()=>{var f;i.current!==l&&((f=u.current)==null||f.call(u,l),i.current=l)},[l,i]),[l,r,u]}Ys(tb,"useUncontrolledState");function nb(e){return typeof e=="function"}Ys(nb,"isFunction");var hy=Symbol("RADIX:SYNC_STATE");function EN(e,a,l,r){const{prop:i,defaultProp:u,onChange:f,caller:m}=a,g=i!==void 0,p=eb(f),x=[{...l,state:u}];r&&x.push(r);const[y,w]=v.useReducer((N,E)=>{if(E.type===hy)return{...N,state:E.state};const O=e(N,E);return g&&!Object.is(O.state,N.state)&&p(O.state),O},...x),b=y.state,C=v.useRef(b);v.useEffect(()=>{C.current!==b&&(C.current=b,g||p(b))},[b,C,g]);const j=v.useMemo(()=>i!==void 0?{...y,state:i}:y,[y,i]);return v.useEffect(()=>{g&&!Object.is(i,y.state)&&w({type:hy,state:i})},[i,y.state,g]),[j,w]}Ys(EN,"useControllableStateReducer");var ON=Object.defineProperty,Ya=(e,a)=>ON(e,"name",{value:a,configurable:!0});function ab(e,a){return v.useReducer((l,r)=>a[l][r]??l,e)}Ya(ab,"useStateMachine");var Ka=Ya(e=>{const{present:a,children:l}=e,r=lb(a),i=typeof l=="function"?l({present:r.isPresent}):v.Children.only(l),u=rb(r.ref,ob(i));return typeof l=="function"||r.isPresent?v.cloneElement(i,{ref:u}):null},"Presence");function lb(e){const[a,l]=v.useState(),r=v.useRef(null),i=v.useRef(e),u=v.useRef("none"),f=v.useRef(void 0),m=e?"mounted":"unmounted",[g,p]=ab(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{g==="mounted"?(u.current=f.current??fo(r.current),f.current=void 0):u.current="none"},[g]),_t(()=>{const x=r.current,y=i.current;if(y!==e){const b=u.current,C=fo(x);e?(f.current=C,p("MOUNT")):C==="none"||(x==null?void 0:x.display)==="none"?p("UNMOUNT"):p(y&&b!==C?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),_t(()=>{if(a){let x;const y=a.ownerDocument.defaultView??window,w=Ya(C=>{const N=fo(r.current).includes(CSS.escape(C.animationName));if(C.target===a&&N&&(p("ANIMATION_END"),!i.current)){const E=a.style.animationFillMode;a.style.animationFillMode="forwards",x=y.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=E)})}},"handleAnimationEnd"),b=Ya(C=>{C.target===a&&(u.current=fo(r.current))},"handleAnimationStart");return a.addEventListener("animationstart",b),a.addEventListener("animationcancel",w),a.addEventListener("animationend",w),()=>{y.clearTimeout(x),a.removeEventListener("animationstart",b),a.removeEventListener("animationcancel",w),a.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:v.useCallback(x=>{if(x){const y=getComputedStyle(x);r.current=y,f.current=fo(y)}else r.current=null;l(x)},[])}}Ya(lb,"usePresence");function _m(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}Ya(_m,"setRef");function rb(...e){const a=v.useRef(e);return a.current=e,v.useCallback(l=>{const r=a.current;let i=!1;const u=r.map(f=>{const m=_m(f,l);return!i&&typeof m=="function"&&(i=!0),m});if(i)return()=>{for(let f=0;f<u.length;f++){const m=u[f];typeof m=="function"?m():_m(r[f],null)}}},[])}Ya(rb,"useStableComposedRefs");function fo(e){return(e==null?void 0:e.animationName)||"none"}Ya(fo,"getAnimationName");function ob(e){var r,i;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?e.ref:(a=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}Ya(ob,"getElementRef");var TN=Object.defineProperty,kN=(e,a)=>TN(e,"name",{value:a,configurable:!0}),AN=bo[" useId ".trim().toString()]||(()=>{}),zN=0;function Fn(e){const[a,l]=v.useState(AN());return _t(()=>{e||l(r=>r??String(zN++))},[e]),e||(a?`radix-${a}`:"")}kN(Fn,"useId");var PN=Object.defineProperty,HN=(e,a)=>PN(e,"name",{value:a,configurable:!0}),FN=v.createContext(void 0);function qs(e){const a=v.useContext(FN);return e||a||"ltr"}HN(qs,"useDirection");var LN=Object.defineProperty,VN=(e,a)=>LN(e,"name",{value:a,configurable:!0});function jt(e){const a=v.useRef(e);return v.useEffect(()=>{a.current=e}),v.useMemo(()=>((...l)=>{var r;return(r=a.current)==null?void 0:r.call(a,...l)}),[])}VN(jt,"useCallbackRef");var BN=Object.defineProperty,Ot=(e,a)=>BN(e,"name",{value:a,configurable:!0}),Dm="dismissableLayer.update",UN="dismissableLayer.pointerDownOutside",IN="dismissableLayer.focusOutside",gy,sb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),eu=v.forwardRef(Ot(function(a,l){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:g,onDismiss:p,...x}=a,y=v.useContext(sb),[w,b]=v.useState(null),C=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=v.useState({}),N=Ke(l,b),E=Array.from(y.layers),[O]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),D=O?E.indexOf(O):-1,k=w?E.indexOf(w):-1,z=y.layersWithOutsidePointerEventsDisabled.size>0,_=k>=D,H=v.useRef(!1),L=cb(ee=>{f==null||f(ee),g==null||g(ee),ee.defaultPrevented||p==null||p()},{ownerDocument:C,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:H,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(ee=>{if(!(ee instanceof Node))return!1;const te=[...y.branches].some(se=>se.contains(ee));return _&&!te},[y.branches,_])}),W=ub(ee=>{if(i&&H.current)return;const te=ee.target;[...y.branches].some(ce=>ce.contains(te))||(m==null||m(ee),g==null||g(ee),ee.defaultPrevented||p==null||p())},C),Y=w?k===E.length-1:!1,K=jt(ee=>{ee.key==="Escape"&&(u==null||u(ee),!ee.defaultPrevented&&p&&(ee.preventDefault(),p()))});return v.useEffect(()=>{if(Y)return C.addEventListener("keydown",K,{capture:!0}),()=>C.removeEventListener("keydown",K,{capture:!0})},[C,Y,K]),v.useEffect(()=>{if(w)return r&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(gy=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(w)),y.layers.add(w),Rm(),()=>{r&&(y.layersWithOutsidePointerEventsDisabled.delete(w),y.layersWithOutsidePointerEventsDisabled.size===0&&(C.body.style.pointerEvents=gy))}},[w,C,r,y]),v.useEffect(()=>()=>{w&&(y.layers.delete(w),y.layersWithOutsidePointerEventsDisabled.delete(w),Rm())},[w,y]),v.useEffect(()=>{const ee=Ot(()=>j({}),"handleUpdate");return document.addEventListener(Dm,ee),()=>document.removeEventListener(Dm,ee)},[]),c.jsx(Ge.div,{...x,ref:N,style:{pointerEvents:z?_?"auto":"none":void 0,...a.style},onFocusCapture:we(a.onFocusCapture,W.onFocusCapture),onBlurCapture:we(a.onBlurCapture,W.onBlurCapture),onPointerDownCapture:we(a.onPointerDownCapture,L.onPointerDownCapture)})},"DismissableLayer"));function ib(){const e=v.useContext(sb),[a,l]=v.useState(null);return v.useEffect(()=>{if(a)return e.dismissableSurfaces.add(a),()=>{e.dismissableSurfaces.delete(a)}},[a,e.dismissableSurfaces]),l}Ot(ib,"useDismissableLayerSurface");var $N=Ot(()=>!0,"IS_TRUE");function cb(e,a){const{ownerDocument:l=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:u,shouldHandlePointerDownOutside:f=$N}=a,m=jt(e),g=v.useRef(!1),p=v.useRef(!1),x=v.useRef(new Map),y=v.useRef(()=>{});return v.useEffect(()=>{function w(){p.current=!1,i.current=!1,x.current.clear()}Ot(w,"resetOutsideInteraction");function b(){return Array.from(x.current.values()).some(Boolean)}Ot(b,"isOutsideInteractionIntercepted");function C(D){if(!p.current)return;const k=D.target;k instanceof Node&&[...u].some(_=>_.contains(k))||x.current.set(D.type,!0),D.type==="click"&&window.setTimeout(()=>{p.current&&y.current()},0)}Ot(C,"handleInteractionCapture");function j(D){p.current&&x.current.set(D.type,!1)}Ot(j,"handleInteractionBubble");const N=Ot(D=>{if(D.target&&!g.current){let k=function(){l.removeEventListener("click",y.current);const _=b();w(),_||nh(UN,m,z,{discrete:!0})};if(Ot(k,"handleAndDispatchPointerDownOutsideEvent"),!f(D.target)){l.removeEventListener("click",y.current),w(),g.current=!1;return}const z={originalEvent:D};p.current=!0,i.current=r&&D.button===0,x.current.clear(),!r||D.button!==0?k():(l.removeEventListener("click",y.current),y.current=k,l.addEventListener("click",y.current,{once:!0}))}else l.removeEventListener("click",y.current),w();g.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const D of E)l.addEventListener(D,C,!0),l.addEventListener(D,j);const O=window.setTimeout(()=>{l.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(O),l.removeEventListener("pointerdown",N),l.removeEventListener("click",y.current);for(const D of E)l.removeEventListener(D,C,!0),l.removeEventListener(D,j)}},[l,m,r,i,u,f]),{onPointerDownCapture:Ot(()=>g.current=!0,"onPointerDownCapture")}}Ot(cb,"usePointerDownOutside");function ub(e,a=globalThis==null?void 0:globalThis.document){const l=jt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=Ot(u=>{u.target&&!r.current&&nh(IN,l,{originalEvent:u},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",i),()=>a.removeEventListener("focusin",i)},[a,l]),{onFocusCapture:Ot(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ot(()=>r.current=!1,"onBlurCapture")}}Ot(ub,"useFocusOutside");function Rm(){const e=new CustomEvent(Dm);document.dispatchEvent(e)}Ot(Rm,"dispatchUpdate");function nh(e,a,l,{discrete:r}){const i=l.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:l});a&&i.addEventListener(e,a,{once:!0}),r?As(i,u):i.dispatchEvent(u)}Ot(nh,"handleAndDispatchCustomEvent");var GN=Object.defineProperty,Qt=(e,a)=>GN(e,"name",{value:a,configurable:!0}),Xf="focusScope.autoFocusOnMount",Qf="focusScope.autoFocusOnUnmount",py={bubbles:!1,cancelable:!0},tu=v.forwardRef(Qt(function(a,l){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...m}=a,[g,p]=v.useState(null),x=jt(u),y=jt(f),w=v.useRef(null),b=Ke(l,p),C=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let N=function(k){if(C.paused||!g)return;const z=k.target;g.contains(z)?w.current=z:La(w.current,{select:!0})},E=function(k){if(C.paused||!g)return;const z=k.relatedTarget;z!==null&&(g.contains(z)||La(w.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const _ of k)_.removedNodes.length>0&&La(g)};Qt(N,"handleFocusIn"),Qt(E,"handleFocusOut"),Qt(O,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",E);const D=new MutationObserver(O);return g&&D.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",E),D.disconnect()}}},[i,g,C.paused]),v.useEffect(()=>{if(g){vy.add(C);const N=document.activeElement;if(!g.contains(N)){const O=new CustomEvent(Xf,py);g.addEventListener(Xf,x),g.dispatchEvent(O),O.defaultPrevented||(db(pb(ah(g)),{select:!0}),document.activeElement===N&&La(g))}return()=>{g.removeEventListener(Xf,x),setTimeout(()=>{const O=new CustomEvent(Qf,py);g.addEventListener(Qf,y),g.dispatchEvent(O),O.defaultPrevented||La(N??document.body,{select:!0}),g.removeEventListener(Qf,y),vy.remove(C)},0)}}},[g,x,y,C]);const j=v.useCallback(N=>{if(!r&&!i||C.paused)return;const E=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,O=document.activeElement;if(E&&O){const D=N.currentTarget,[k,z]=fb(D);k&&z?!N.shiftKey&&O===z?(N.preventDefault(),r&&La(k,{select:!0})):N.shiftKey&&O===k&&(N.preventDefault(),r&&La(z,{select:!0})):O===D&&N.preventDefault()}},[r,i,C.paused]);return c.jsx(Ge.div,{tabIndex:-1,...m,ref:b,onKeyDown:j})},"FocusScope"));function db(e,{select:a=!1}={}){const l=document.activeElement;for(const r of e)if(La(r,{select:a}),document.activeElement!==l)return}Qt(db,"focusFirst");function fb(e){const a=ah(e),l=Em(a,e),r=Em(a.reverse(),e);return[l,r]}Qt(fb,"getTabbableEdges");function ah(e){const a=[],l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Qt(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;l.nextNode();)a.push(l.currentNode);return a}Qt(ah,"getTabbableCandidates");function Em(e,a){const l=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(l?!r.checkVisibility({checkVisibilityCSS:!0}):mb(r,{upTo:a})))return r}Qt(Em,"findVisible");function mb(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Qt(mb,"isHidden");function hb(e){return e instanceof HTMLInputElement&&"select"in e}Qt(hb,"isSelectableInput");function La(e,{select:a=!1}={}){if(e&&e.focus){const l=document.activeElement;e.focus({preventScroll:!0}),e!==l&&hb(e)&&a&&e.select()}}Qt(La,"focus");var vy=gb();function gb(){let e=[];return{add(a){const l=e[0];a!==l&&(l==null||l.pause()),e=Om(e,a),e.unshift(a)},remove(a){var l;e=Om(e,a),(l=e[0])==null||l.resume()}}}Qt(gb,"createFocusScopesStack");function Om(e,a){const l=[...e],r=l.indexOf(a);return r!==-1&&l.splice(r,1),l}Qt(Om,"arrayRemove");function pb(e){return e.filter(a=>a.tagName!=="A")}Qt(pb,"removeLinks");var YN=Object.defineProperty,qN=(e,a)=>YN(e,"name",{value:a,configurable:!0}),nu=v.forwardRef(qN(function(a,l){var g;const{container:r,...i}=a,[u,f]=v.useState(!1);_t(()=>f(!0),[]);const m=r||u&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return m?Gs.createPortal(c.jsx(Ge.div,{...i,ref:l}),m):null},"Portal")),WN=Object.defineProperty,lh=(e,a)=>WN(e,"name",{value:a,configurable:!0}),_c=0,la=null;function KN(e){return No(),e.children}lh(KN,"FocusGuards");function No(){v.useEffect(()=>{la||(la={start:Tm(),end:Tm()});const{start:e,end:a}=la;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),_c++,()=>{_c===1&&(la==null||la.start.remove(),la==null||la.end.remove(),la=null),_c=Math.max(0,_c-1)}},[])}lh(No,"useFocusGuards");function Tm(){const 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}lh(Tm,"createFocusGuard");var sa=function(){return sa=Object.assign||function(a){for(var l,r=1,i=arguments.length;r<i;r++){l=arguments[r];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(a[u]=l[u])}return a},sa.apply(this,arguments)};function vb(e,a){var l={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(l[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)a.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(l[r[i]]=e[r[i]]);return l}function XN(e,a,l){if(l||arguments.length===2)for(var r=0,i=a.length,u;r<i;r++)(u||!(r in a))&&(u||(u=Array.prototype.slice.call(a,0,r)),u[r]=a[r]);return e.concat(u||Array.prototype.slice.call(a))}var Bc="right-scroll-bar-position",Uc="width-before-scroll-bar",QN="with-scroll-bars-hidden",ZN="--removed-body-scroll-bar-size";function Zf(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}function JN(e,a){var l=v.useState(function(){return{value:e,callback:a,facade:{get current(){return l.value},set current(r){var i=l.value;i!==r&&(l.value=r,l.callback(r,i))}}}})[0];return l.callback=a,l.facade}var eM=typeof window<"u"?v.useLayoutEffect:v.useEffect,xy=new WeakMap;function tM(e,a){var l=JN(null,function(r){return e.forEach(function(i){return Zf(i,r)})});return eM(function(){var r=xy.get(l);if(r){var i=new Set(r),u=new Set(e),f=l.current;i.forEach(function(m){u.has(m)||Zf(m,null)}),u.forEach(function(m){i.has(m)||Zf(m,f)})}xy.set(l,e)},[e]),l}function nM(e){return e}function aM(e,a){a===void 0&&(a=nM);var l=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:e},useMedium:function(u){var f=a(u,r);return l.push(f),function(){l=l.filter(function(m){return m!==f})}},assignSyncMedium:function(u){for(r=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(m){return u(m)},filter:function(){return l}}},assignMedium:function(u){r=!0;var f=[];if(l.length){var m=l;l=[],m.forEach(u),f=l}var g=function(){var x=f;f=[],x.forEach(u)},p=function(){return Promise.resolve().then(g)};p(),l={push:function(x){f.push(x),p()},filter:function(x){return f=f.filter(x),l}}}};return i}function lM(e){e===void 0&&(e={});var a=aM(null);return a.options=sa({async:!0,ssr:!1},e),a}var xb=function(e){var a=e.sideCar,l=vb(e,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=a.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,sa({},l))};xb.isSideCarExport=!0;function rM(e,a){return e.useMedium(a),xb}var yb=lM(),Jf=function(){},au=v.forwardRef(function(e,a){var l=v.useRef(null),r=v.useState({onScrollCapture:Jf,onWheelCapture:Jf,onTouchMoveCapture:Jf}),i=r[0],u=r[1],f=e.forwardProps,m=e.children,g=e.className,p=e.removeScrollBar,x=e.enabled,y=e.shards,w=e.sideCar,b=e.noRelative,C=e.noIsolation,j=e.inert,N=e.allowPinchZoom,E=e.as,O=E===void 0?"div":E,D=e.gapMode,k=vb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=w,_=tM([l,a]),H=sa(sa({},k),i);return v.createElement(v.Fragment,null,x&&v.createElement(z,{sideCar:yb,removeScrollBar:p,shards:y,noRelative:b,noIsolation:C,inert:j,setCallbacks:u,allowPinchZoom:!!N,lockRef:l,gapMode:D}),f?v.cloneElement(v.Children.only(m),sa(sa({},H),{ref:_})):v.createElement(O,sa({},H,{className:g,ref:_}),m))});au.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};au.classNames={fullWidth:Uc,zeroRight:Bc};var oM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=oM();return a&&e.setAttribute("nonce",a),e}function iM(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function cM(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var uM=function(){var e=0,a=null;return{add:function(l){e==0&&(a=sM())&&(iM(a,l),cM(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},dM=function(){var e=uM();return function(a,l){v.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&l])}},bb=function(){var e=dM(),a=function(l){var r=l.styles,i=l.dynamic;return e(r,i),null};return a},fM={left:0,top:0,right:0,gap:0},em=function(e){return parseInt(e||"",10)||0},mM=function(e){var a=window.getComputedStyle(document.body),l=a[e==="padding"?"paddingLeft":"marginLeft"],r=a[e==="padding"?"paddingTop":"marginTop"],i=a[e==="padding"?"paddingRight":"marginRight"];return[em(l),em(r),em(i)]},hM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fM;var a=mM(e),l=document.documentElement.clientWidth,r=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,r-l+a[2]-a[0])}},gM=bb(),ho="data-scroll-locked",pM=function(e,a,l,r){var i=e.left,u=e.top,f=e.right,m=e.gap;return l===void 0&&(l="margin"),`
|
|
275
|
+
.`.concat(QN,` {
|
|
276
|
+
overflow: hidden `).concat(r,`;
|
|
277
|
+
padding-right: `).concat(m,"px ").concat(r,`;
|
|
278
|
+
}
|
|
279
|
+
body[`).concat(ho,`] {
|
|
280
|
+
overflow: hidden `).concat(r,`;
|
|
281
|
+
overscroll-behavior: contain;
|
|
282
|
+
`).concat([a&&"position: relative ".concat(r,";"),l==="margin"&&`
|
|
283
|
+
padding-left: `.concat(i,`px;
|
|
284
|
+
padding-top: `).concat(u,`px;
|
|
285
|
+
padding-right: `).concat(f,`px;
|
|
286
|
+
margin-left:0;
|
|
287
|
+
margin-top:0;
|
|
288
|
+
margin-right: `).concat(m,"px ").concat(r,`;
|
|
289
|
+
`),l==="padding"&&"padding-right: ".concat(m,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.`).concat(Bc,` {
|
|
293
|
+
right: `).concat(m,"px ").concat(r,`;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.`).concat(Uc,` {
|
|
297
|
+
margin-right: `).concat(m,"px ").concat(r,`;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.`).concat(Bc," .").concat(Bc,` {
|
|
301
|
+
right: 0 `).concat(r,`;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.`).concat(Uc," .").concat(Uc,` {
|
|
305
|
+
margin-right: 0 `).concat(r,`;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
body[`).concat(ho,`] {
|
|
309
|
+
`).concat(ZN,": ").concat(m,`px;
|
|
310
|
+
}
|
|
311
|
+
`)},yy=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},vM=function(){v.useEffect(function(){return document.body.setAttribute(ho,(yy()+1).toString()),function(){var e=yy()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},xM=function(e){var a=e.noRelative,l=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;vM();var u=v.useMemo(function(){return hM(i)},[i]);return v.createElement(gM,{styles:pM(u,!a,i,l?"":"!important")})},km=!1;if(typeof window<"u")try{var Dc=Object.defineProperty({},"passive",{get:function(){return km=!0,!0}});window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,Dc)}catch{km=!1}var oo=km?{passive:!1}:!1,yM=function(e){return e.tagName==="TEXTAREA"},Sb=function(e,a){if(!(e instanceof Element))return!1;var l=window.getComputedStyle(e);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!yM(e)&&l[a]==="visible")},bM=function(e){return Sb(e,"overflowY")},SM=function(e){return Sb(e,"overflowX")},by=function(e,a){var l=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wb(e,r);if(i){var u=Cb(e,r),f=u[1],m=u[2];if(f>m)return!0}r=r.parentNode}while(r&&r!==l.body);return!1},wM=function(e){var a=e.scrollTop,l=e.scrollHeight,r=e.clientHeight;return[a,l,r]},CM=function(e){var a=e.scrollLeft,l=e.scrollWidth,r=e.clientWidth;return[a,l,r]},wb=function(e,a){return e==="v"?bM(a):SM(a)},Cb=function(e,a){return e==="v"?wM(a):CM(a)},jM=function(e,a){return e==="h"&&a==="rtl"?-1:1},NM=function(e,a,l,r,i){var u=jM(e,window.getComputedStyle(a).direction),f=u*r,m=l.target,g=a.contains(m),p=!1,x=f>0,y=0,w=0;do{if(!m)break;var b=Cb(e,m),C=b[0],j=b[1],N=b[2],E=j-N-u*C;(C||E)&&wb(e,m)&&(y+=E,w+=C);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!g&&m!==document.body||g&&(a.contains(m)||a===m));return(x&&Math.abs(y)<1||!x&&Math.abs(w)<1)&&(p=!0),p},Rc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sy=function(e){return[e.deltaX,e.deltaY]},wy=function(e){return e&&"current"in e?e.current:e},MM=function(e,a){return e[0]===a[0]&&e[1]===a[1]},_M=function(e){return`
|
|
312
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
313
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
314
|
+
`)},DM=0,so=[];function RM(e){var a=v.useRef([]),l=v.useRef([0,0]),r=v.useRef(),i=v.useState(DM++)[0],u=v.useState(bb)[0],f=v.useRef(e);v.useEffect(function(){f.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var j=XN([e.lockRef.current],(e.shards||[]).map(wy),!0).filter(Boolean);return j.forEach(function(N){return N.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),j.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var m=v.useCallback(function(j,N){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!f.current.allowPinchZoom;var E=Rc(j),O=l.current,D="deltaX"in j?j.deltaX:O[0]-E[0],k="deltaY"in j?j.deltaY:O[1]-E[1],z,_=j.target,H=Math.abs(D)>Math.abs(k)?"h":"v";if("touches"in j&&H==="h"&&_.type==="range")return!1;var L=window.getSelection(),W=L&&L.anchorNode,Y=W?W===_||W.contains(_):!1;if(Y)return!1;var K=by(H,_);if(!K)return!0;if(K?z=H:(z=H==="v"?"h":"v",K=by(H,_)),!K)return!1;if(!r.current&&"changedTouches"in j&&(D||k)&&(r.current=z),!z)return!0;var ee=r.current||z;return NM(ee,N,j,ee==="h"?D:k)},[]),g=v.useCallback(function(j){var N=j;if(!(!so.length||so[so.length-1]!==u)){var E="deltaY"in N?Sy(N):Rc(N),O=a.current.filter(function(z){return z.name===N.type&&(z.target===N.target||N.target===z.shadowParent)&&MM(z.delta,E)})[0];if(O&&O.should){N.cancelable&&N.preventDefault();return}if(!O){var D=(f.current.shards||[]).map(wy).filter(Boolean).filter(function(z){return z.contains(N.target)}),k=D.length>0?m(N,D[0]):!f.current.noIsolation;k&&N.cancelable&&N.preventDefault()}}},[]),p=v.useCallback(function(j,N,E,O){var D={name:j,delta:N,target:E,should:O,shadowParent:EM(E)};a.current.push(D),setTimeout(function(){a.current=a.current.filter(function(k){return k!==D})},1)},[]),x=v.useCallback(function(j){l.current=Rc(j),r.current=void 0},[]),y=v.useCallback(function(j){p(j.type,Sy(j),j.target,m(j,e.lockRef.current))},[]),w=v.useCallback(function(j){p(j.type,Rc(j),j.target,m(j,e.lockRef.current))},[]);v.useEffect(function(){return so.push(u),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",g,oo),document.addEventListener("touchmove",g,oo),document.addEventListener("touchstart",x,oo),function(){so=so.filter(function(j){return j!==u}),document.removeEventListener("wheel",g,oo),document.removeEventListener("touchmove",g,oo),document.removeEventListener("touchstart",x,oo)}},[]);var b=e.removeScrollBar,C=e.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:_M(i)}):null,b?v.createElement(xM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EM(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const OM=rM(yb,RM);var Ws=v.forwardRef(function(e,a){return v.createElement(au,sa({},e,{ref:a,sideCar:OM}))});Ws.classNames=au.classNames;var TM=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},io=new WeakMap,Ec=new WeakMap,Oc={},tm=0,jb=function(e){return e&&(e.host||jb(e.parentNode))},kM=function(e,a){return a.map(function(l){if(e.contains(l))return l;var r=jb(l);return r&&e.contains(r)?r:(console.error("aria-hidden",l,"in not contained inside",e,". Doing nothing"),null)}).filter(function(l){return!!l})},AM=function(e,a,l,r){var i=kM(a,Array.isArray(e)?e:[e]);Oc[l]||(Oc[l]=new WeakMap);var u=Oc[l],f=[],m=new Set,g=new Set(i),p=function(y){!y||m.has(y)||(m.add(y),p(y.parentNode))};i.forEach(p);var x=function(y){!y||g.has(y)||Array.prototype.forEach.call(y.children,function(w){if(m.has(w))x(w);else try{var b=w.getAttribute(r),C=b!==null&&b!=="false",j=(io.get(w)||0)+1,N=(u.get(w)||0)+1;io.set(w,j),u.set(w,N),f.push(w),j===1&&C&&Ec.set(w,!0),N===1&&w.setAttribute(l,"true"),C||w.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",w,E)}})};return x(a),m.clear(),tm++,function(){f.forEach(function(y){var w=io.get(y)-1,b=u.get(y)-1;io.set(y,w),u.set(y,b),w||(Ec.has(y)||y.removeAttribute(r),Ec.delete(y)),b||y.removeAttribute(l)}),tm--,tm||(io=new WeakMap,io=new WeakMap,Ec=new WeakMap,Oc={})}},lu=function(e,a,l){l===void 0&&(l="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=TM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),AM(r,i,l,"aria-hidden")):function(){return null}},zM=Object.defineProperty,Ln=(e,a)=>zM(e,"name",{value:a,configurable:!0}),rh="Dialog",[Nb,rz]=Kn(rh),[PM,ga]=Nb(rh),HM=Ln(e=>{const{__scopeDialog:a,children:l,open:r,defaultOpen:i,onOpenChange:u,modal:f=!0}=e,m=v.useRef(null),g=v.useRef(null),[p,x]=Tl({prop:r,defaultProp:i??!1,onChange:u,caller:rh}),[y,w]=v.useState(0),[b,C]=v.useState(0);return c.jsx(PM,{scope:a,triggerRef:m,contentRef:g,contentId:Fn(),titleId:Fn(),descriptionId:Fn(),titlePresent:y>0,descriptionPresent:b>0,setTitleCount:w,setDescriptionCount:C,open:p,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(j=>!j),[x]),modal:f,children:l})},"Dialog"),Mb="DialogPortal",[FM,_b]=Nb(Mb,{forceMount:void 0}),LM=Ln(e=>{const{__scopeDialog:a,forceMount:l,children:r,container:i}=e,u=ga(Mb,a);return c.jsx(FM,{scope:a,forceMount:l,children:v.Children.map(r,f=>c.jsx(Ka,{present:l||u.open,children:c.jsx(nu,{asChild:!0,container:i,children:f})}))})},"DialogPortal"),Am="DialogOverlay",VM=v.forwardRef(Ln(function(a,l){const r=_b(Am,a.__scopeDialog),{forceMount:i=r.forceMount,...u}=a,f=ga(Am,a.__scopeDialog);return f.modal?c.jsx(Ka,{present:i||f.open,children:c.jsx(UM,{...u,ref:l})}):null},"DialogOverlay")),BM=da("DialogOverlay.RemoveScroll"),UM=v.forwardRef(Ln(function(a,l){const{__scopeDialog:r,...i}=a,u=ga(Am,r),f=ib(),m=Ke(l,f);return c.jsx(Ws,{as:BM,allowPinchZoom:!0,shards:[u.contentRef],children:c.jsx(Ge.div,{"data-state":oh(u.open),...i,ref:m,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),zs="DialogContent",IM=v.forwardRef(Ln(function(a,l){const r=_b(zs,a.__scopeDialog),{forceMount:i=r.forceMount,...u}=a,f=ga(zs,a.__scopeDialog);return c.jsx(Ka,{present:i||f.open,children:f.modal?c.jsx($M,{...u,ref:l}):c.jsx(GM,{...u,ref:l})})},"DialogContent")),$M=v.forwardRef(Ln(function(a,l){const r=ga(zs,a.__scopeDialog),i=v.useRef(null),u=Ke(l,r.contentRef,i);return v.useEffect(()=>{const f=i.current;if(f)return lu(f)},[]),c.jsx(Db,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:we(a.onCloseAutoFocus,f=>{var m;f.preventDefault(),(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:we(a.onPointerDownOutside,f=>{const m=f.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0;(m.button===2||g)&&f.preventDefault()}),onFocusOutside:we(a.onFocusOutside,f=>f.preventDefault())})},"DialogContentModal")),GM=v.forwardRef(Ln(function(a,l){const r=ga(zs,a.__scopeDialog),i=v.useRef(!1),u=v.useRef(!1);return c.jsx(Db,{...a,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var m,g;(m=a.onCloseAutoFocus)==null||m.call(a,f),f.defaultPrevented||(i.current||(g=r.triggerRef.current)==null||g.focus(),f.preventDefault()),i.current=!1,u.current=!1},onInteractOutside:f=>{var p,x;(p=a.onInteractOutside)==null||p.call(a,f),f.defaultPrevented||(i.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const m=f.target;((x=r.triggerRef.current)==null?void 0:x.contains(m))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})},"DialogContentNonModal")),Db=v.forwardRef(Ln(function(a,l){const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:u,onCloseAutoFocus:f,...m}=a,g=ga(zs,r);return No(),c.jsx(c.Fragment,{children:c.jsx(tu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:u,onUnmountAutoFocus:f,children:c.jsx(eu,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionPresent?g.descriptionId:void 0,"aria-labelledby":g.titlePresent?g.titleId:void 0,"data-state":oh(g.open),...m,ref:l,deferPointerDownOutside:!0,onDismiss:()=>g.onOpenChange(!1)})})})},"DialogContentImpl")),YM="DialogTitle",qM=v.forwardRef(Ln(function(a,l){const{__scopeDialog:r,...i}=a,u=ga(YM,r),{setTitleCount:f}=u;return _t(()=>(f(m=>m+1),()=>f(m=>m-1)),[f]),c.jsx(Ge.h2,{id:u.titleId,...i,ref:l})},"DialogTitle")),WM="DialogDescription",KM=v.forwardRef(Ln(function(a,l){const{__scopeDialog:r,...i}=a,u=ga(WM,r),{setDescriptionCount:f}=u;return _t(()=>(f(m=>m+1),()=>f(m=>m-1)),[f]),c.jsx(Ge.p,{id:u.descriptionId,...i,ref:l})},"DialogDescription")),XM="DialogClose",QM=v.forwardRef(Ln(function(a,l){const{__scopeDialog:r,...i}=a,u=ga(XM,r);return c.jsx(Ge.button,{type:"button",...i,ref:l,onClick:we(a.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function oh(e){return e?"open":"closed"}Ln(oh,"getState");var ZM=Object.defineProperty,JM=(e,a)=>ZM(e,"name",{value:a,configurable:!0});function Rb(e){const[a,l]=v.useState(void 0);return _t(()=>{if(e){l({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const u=i[0];let f,m;if("borderBoxSize"in u){const g=u.borderBoxSize,p=Array.isArray(g)?g[0]:g;f=p.inlineSize,m=p.blockSize}else f=e.offsetWidth,m=e.offsetHeight;l({width:f,height:m})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else l(void 0)},[e]),a}JM(Rb,"useSize");const e_=["top","right","bottom","left"],kl=Math.min,$a=Math.max,Yc=Math.round,Tc=Math.floor,Ga=e=>({x:e,y:e}),t_={left:"right",right:"left",bottom:"top",top:"bottom"};function Eb(e,a,l){return $a(e,kl(a,l))}function qa(e,a){return typeof e=="function"?e(a):e}function Al(e){return e.split("-")[0]}function Mo(e){return e.split("-")[1]}function sh(e){return e==="x"?"y":"x"}function ih(e){return e==="y"?"height":"width"}function ia(e){const a=e[0];return a==="t"||a==="b"?"y":"x"}function ch(e){return sh(ia(e))}function n_(e,a,l){l===void 0&&(l=!1);const r=Mo(e),i=ch(e),u=ih(i);let f=i==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=qc(f)),[f,qc(f)]}function a_(e){const a=qc(e);return[zm(e),a,zm(a)]}function zm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Cy=["left","right"],jy=["right","left"],l_=["top","bottom"],r_=["bottom","top"];function o_(e,a,l){switch(e){case"top":case"bottom":return l?a?jy:Cy:a?Cy:jy;case"left":case"right":return a?l_:r_;default:return[]}}function s_(e,a,l,r){const i=Mo(e);let u=o_(Al(e),l==="start",r);return i&&(u=u.map(f=>f+"-"+i),a&&(u=u.concat(u.map(zm)))),u}function qc(e){const a=Al(e);return t_[a]+e.slice(a.length)}function i_(e){var a,l,r,i;return{top:(a=e.top)!=null?a:0,right:(l=e.right)!=null?l:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function Ob(e){return typeof e!="number"?i_(e):{top:e,right:e,bottom:e,left:e}}function Wc(e){const{x:a,y:l,width:r,height:i}=e;return{width:r,height:i,top:l,left:a,right:a+r,bottom:l+i,x:a,y:l}}function Ny(e,a,l){let{reference:r,floating:i}=e;const u=ia(a),f=ch(a),m=ih(f),g=Al(a),p=u==="y",x=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,w=r[m]/2-i[m]/2;let b;switch(g){case"top":b={x,y:r.y-i.height};break;case"bottom":b={x,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y};break;case"left":b={x:r.x-i.width,y};break;default:b={x:r.x,y:r.y}}const C=Mo(a);return C&&(b[f]+=w*(C==="end"?1:-1)*(l&&p?-1:1)),b}async function c_(e,a){var l;a===void 0&&(a={});const{x:r,y:i,platform:u,rects:f,elements:m,strategy:g}=e,{boundary:p="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:w=!1,padding:b=0}=qa(a,e),C=Ob(b),N=m[w?y==="floating"?"reference":"floating":y],E=Wc(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(N)))==null||l?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:p,rootBoundary:x,strategy:g})),O=y==="floating"?{x:r,y:i,width:f.floating.width,height:f.floating.height}:f.reference,D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),k=await(u.isElement==null?void 0:u.isElement(D))&&await(u.getScale==null?void 0:u.getScale(D))||{x:1,y:1},z=Wc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:D,strategy:g}):O);return{top:(E.top-z.top+C.top)/k.y,bottom:(z.bottom-E.bottom+C.bottom)/k.y,left:(E.left-z.left+C.left)/k.x,right:(z.right-E.right+C.right)/k.x}}const u_=50,d_=async(e,a,l)=>{const{placement:r="bottom",strategy:i="absolute",middleware:u=[],platform:f}=l,m=f.detectOverflow?f:{...f,detectOverflow:c_},g=await(f.isRTL==null?void 0:f.isRTL(a));let p=await f.getElementRects({reference:e,floating:a,strategy:i}),{x,y}=Ny(p,r,g),w=r,b=0;const C={};for(let j=0;j<u.length;j++){const N=u[j];if(!N)continue;const{name:E,fn:O}=N,{x:D,y:k,data:z,reset:_}=await O({x,y,initialPlacement:r,placement:w,strategy:i,middlewareData:C,rects:p,platform:m,elements:{reference:e,floating:a}});x=D??x,y=k??y,C[E]={...C[E],...z},_&&b<u_&&(b++,typeof _=="object"&&(_.placement&&(w=_.placement),_.rects&&(p=_.rects===!0?await f.getElementRects({reference:e,floating:a,strategy:i}):_.rects),{x,y}=Ny(p,w,g)),j=-1)}return{x,y,placement:w,strategy:i,middlewareData:C}},f_=e=>({name:"arrow",options:e,async fn(a){const{x:l,y:r,placement:i,rects:u,platform:f,elements:m,middlewareData:g}=a,{element:p,padding:x=0}=qa(e,a)||{};if(p==null)return{};const y=Ob(x),w={x:l,y:r},b=ch(i),C=ih(b),j=await f.getDimensions(p),N=b==="y",E=N?"top":"left",O=N?"bottom":"right",D=N?"clientHeight":"clientWidth",k=u.reference[C]+u.reference[b]-w[b]-u.floating[C],z=w[b]-u.reference[b],_=await(f.getOffsetParent==null?void 0:f.getOffsetParent(p));let H=_?_[D]:0;(!H||!await(f.isElement==null?void 0:f.isElement(_)))&&(H=m.floating[D]||u.floating[C]);const L=k/2-z/2,W=H/2-j[C]/2-1,Y=kl(y[E],W),K=kl(y[O],W),ee=H-j[C]-K,te=H/2-j[C]/2+L,se=Eb(Y,te,ee),ce=!g.arrow&&Mo(i)!=null&&te!==se&&u.reference[C]/2-(te<Y?Y:K)-j[C]/2<0,A=ce?te<Y?te-Y:te-ee:0;return{[b]:w[b]+A,data:{[b]:se,centerOffset:te-se-A,...ce&&{alignmentOffset:A}},reset:ce}}}),m_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var l,r;const{placement:i,middlewareData:u,rects:f,initialPlacement:m,platform:g,elements:p}=a,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:j=!0,...N}=qa(e,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const E=Al(i),O=ia(m),D=Al(m)===m,k=await(g.isRTL==null?void 0:g.isRTL(p.floating)),z=w||(D||!j?[qc(m)]:a_(m)),_=C!=="none";!w&&_&&z.push(...s_(m,j,C,k));const H=[m,...z],L=await g.detectOverflow(a,N),W=[];let Y=((r=u.flip)==null?void 0:r.overflows)||[];if(x&&W.push(L[E]),y){const se=n_(i,f,k);W.push(L[se[0]],L[se[1]])}if(Y=[...Y,{placement:i,overflows:W}],!W.every(se=>se<=0)){var K,ee;const se=(((K=u.flip)==null?void 0:K.index)||0)+1,ce=H[se];if(ce&&(!(y==="alignment"?O!==ia(ce):!1)||Y.every(ae=>ia(ae.placement)===O?ae.overflows[0]>0:!0)))return{data:{index:se,overflows:Y},reset:{placement:ce}};let A=(ee=Y.filter(U=>U.overflows[0]<=0).sort((U,ae)=>U.overflows[1]-ae.overflows[1])[0])==null?void 0:ee.placement;if(!A)switch(b){case"bestFit":{var te;const U=(te=Y.filter(ae=>{if(_){const Z=ia(ae.placement);return Z===O||Z==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(Z=>Z>0).reduce((Z,T)=>Z+T,0)]).sort((ae,Z)=>ae[1]-Z[1])[0])==null?void 0:te[0];U&&(A=U);break}case"initialPlacement":A=m;break}if(i!==A)return{reset:{placement:A}}}return{}}}};function My(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function _y(e){return e_.some(a=>e[a]>=0)}const h_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){const{rects:l,platform:r}=a,{strategy:i="referenceHidden",...u}=qa(e,a);switch(i){case"referenceHidden":{const f=await r.detectOverflow(a,{...u,elementContext:"reference"}),m=My(f,l.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:_y(m)}}}case"escaped":{const f=await r.detectOverflow(a,{...u,altBoundary:!0}),m=My(f,l.floating);return{data:{escapedOffsets:m,escaped:_y(m)}}}default:return{}}}}},Tb=new Set(["left","top"]);async function g_(e,a){const{placement:l,platform:r,elements:i}=e,u=await(r.isRTL==null?void 0:r.isRTL(i.floating)),f=Al(l),m=Mo(l),g=ia(l)==="y",p=Tb.has(f)?-1:1,x=u&&g?-1:1,y=qa(a,e);let{mainAxis:w,crossAxis:b,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof C=="number"&&(b=m==="end"?C*-1:C),g?{x:b*x,y:w*p}:{x:w*p,y:b*x}}const p_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var l,r;const{x:i,y:u,placement:f,middlewareData:m}=a,g=await g_(a,e);return f===((l=m.offset)==null?void 0:l.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:i+g.x,y:u+g.y,data:{...g,placement:f}}}}},v_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){const{x:l,y:r,placement:i,platform:u}=a,{mainAxis:f=!0,crossAxis:m=!1,limiter:g={fn:O=>{let{x:D,y:k}=O;return{x:D,y:k}}},...p}=qa(e,a),x={x:l,y:r},y=await u.detectOverflow(a,p),w=ia(i),b=sh(w);let C=x[b],j=x[w];const N=(O,D)=>Eb(D+y[O==="y"?"top":"left"],D,D-y[O==="y"?"bottom":"right"]);f&&(C=N(b,C)),m&&(j=N(w,j));const E=g.fn({...a,[b]:C,[w]:j});return{...E,data:{x:E.x-l,y:E.y-r,enabled:{[b]:f,[w]:m}}}}}},x_=function(e){return e===void 0&&(e={}),{options:e,fn(a){var l,r;const{x:i,y:u,placement:f,rects:m,middlewareData:g}=a,{offset:p=0,mainAxis:x=!0,crossAxis:y=!0}=qa(e,a),w={x:i,y:u},b=ia(f),C=sh(b);let j=w[C],N=w[b];const E=qa(p,a),O=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(l=E.mainAxis)!=null?l:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(x){const z=C==="y"?"height":"width",_=m.reference[C]-m.floating[z]+O.mainAxis,H=m.reference[C]+m.reference[z]-O.mainAxis;j<_?j=_:j>H&&(j=H)}if(y){var D,k;const z=C==="y"?"width":"height",_=Tb.has(Al(f)),H=m.reference[b]-m.floating[z]+(_&&((D=g.offset)==null?void 0:D[b])||0)+(_?0:O.crossAxis),L=m.reference[b]+m.reference[z]+(_?0:((k=g.offset)==null?void 0:k[b])||0)-(_?O.crossAxis:0);N<H?N=H:N>L&&(N=L)}return{[C]:j,[b]:N}}}},y_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(a){const{placement:l,rects:r,platform:i,elements:u}=a,{apply:f=()=>{},...m}=qa(e,a),g=await i.detectOverflow(a,m),p=Al(l),x=Mo(l),y=ia(l)==="y",{width:w,height:b}=r.floating;let C,j;p==="top"||p==="bottom"?(C=p,j=x===(await(i.isRTL==null?void 0:i.isRTL(u.floating))?"start":"end")?"left":"right"):(j=p,C=x==="end"?"top":"bottom");const N=b-g.top-g.bottom,E=w-g.left-g.right,O=kl(b-g[C],N),D=kl(w-g[j],E),k=a.middlewareData.shift,z=!k;let _=O,H=D;k!=null&&k.enabled.x&&(H=E),k!=null&&k.enabled.y&&(_=N),z&&!x&&(y?H=w-2*$a(g.left,g.right):_=b-2*$a(g.top,g.bottom)),await f({...a,availableWidth:H,availableHeight:_});const L=await i.getDimensions(u.floating);return w!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function ru(){return typeof window<"u"}function _o(e){return kb(e)?(e.nodeName||"").toLowerCase():"#document"}function on(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function Xa(e){var a;return(a=(kb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function kb(e){return ru()?e instanceof Node||e instanceof on(e).Node:!1}function fa(e){return ru()?e instanceof Element||e instanceof on(e).Element:!1}function Fl(e){return ru()?e instanceof HTMLElement||e instanceof on(e).HTMLElement:!1}function Dy(e){return!ru()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof on(e).ShadowRoot}function ou(e){const{overflow:a,overflowX:l,overflowY:r,display:i}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+l)&&i!=="inline"&&i!=="contents"}function b_(e){return/^(table|td|th)$/.test(_o(e))}function su(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const S_=/transform|translate|scale|rotate|perspective|filter/,w_=/paint|layout|strict|content/,dr=e=>!!e&&e!=="none";let nm;function uh(e){const a=fa(e)?ma(e):e;return dr(a.transform)||dr(a.translate)||dr(a.scale)||dr(a.rotate)||dr(a.perspective)||!dh()&&(dr(a.backdropFilter)||dr(a.filter))||S_.test(a.willChange||"")||w_.test(a.contain||"")}function C_(e){let a=hr(e);for(;Fl(a)&&!Ps(a);){if(uh(a))return a;if(su(a))return null;a=hr(a)}return null}function dh(){return nm==null&&(nm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nm}function Ps(e){return/^(html|body|#document)$/.test(_o(e))}function ma(e){return on(e).getComputedStyle(e)}function iu(e){return fa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(_o(e)==="html")return e;const a=e.assignedSlot||e.parentNode||Dy(e)&&e.host||Xa(e);return Dy(a)?a.host:a}function Ab(e){const a=hr(e);return Ps(a)?(e.ownerDocument||e).body:Fl(a)&&ou(a)?a:Ab(a)}function Hs(e,a,l){var r;a===void 0&&(a=[]),l===void 0&&(l=!0);const i=Ab(e),u=i===((r=e.ownerDocument)==null?void 0:r.body),f=on(i);if(u){const m=Pm(f);return a.concat(f,f.visualViewport||[],ou(i)?i:[],m&&l?Hs(m):[])}else return a.concat(i,Hs(i,[],l))}function Pm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zb(e){const a=ma(e);let l=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const i=Fl(e),u=i?e.offsetWidth:l,f=i?e.offsetHeight:r,m=Yc(l)!==u||Yc(r)!==f;return m&&(l=u,r=f),{width:l,height:r,$:m}}function fh(e){return fa(e)?e:e.contextElement}function go(e){const a=fh(e);if(!Fl(a))return Ga(1);const l=a.getBoundingClientRect(),{width:r,height:i,$:u}=zb(a);let f=(u?Yc(l.width):l.width)/r,m=(u?Yc(l.height):l.height)/i;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const j_=Ga(0);function Pb(e){const a=on(e);return!dh()||!a.visualViewport?j_:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function N_(e,a,l){return a===void 0&&(a=!1),!!l&&a&&l===on(e)}function gr(e,a,l,r){a===void 0&&(a=!1),l===void 0&&(l=!1);const i=e.getBoundingClientRect(),u=fh(e);let f=Ga(1);a&&(r?fa(r)&&(f=go(r)):f=go(e));const m=N_(u,l,r)?Pb(u):Ga(0);let g=(i.left+m.x)/f.x,p=(i.top+m.y)/f.y,x=i.width/f.x,y=i.height/f.y;if(u&&r){const w=on(u),b=fa(r)?on(r):r;let C=w,j=Pm(C);for(;j&&b!==C;){const N=go(j),E=j.getBoundingClientRect(),O=ma(j),D=E.left+(j.clientLeft+parseFloat(O.paddingLeft))*N.x,k=E.top+(j.clientTop+parseFloat(O.paddingTop))*N.y;g*=N.x,p*=N.y,x*=N.x,y*=N.y,g+=D,p+=k,C=on(j),j=Pm(C)}}return Wc({width:x,height:y,x:g,y:p})}function cu(e,a){const l=iu(e).scrollLeft;return a?a.left+l:gr(Xa(e)).left+l}function Hb(e,a){const l=e.getBoundingClientRect(),r=l.left+a.scrollLeft-cu(e,l),i=l.top+a.scrollTop;return{x:r,y:i}}function M_(e){let{elements:a,rect:l,offsetParent:r,strategy:i}=e;const u=i==="fixed",f=Xa(r),m=a?su(a.floating):!1;if(r===f||m&&u)return l;let g={scrollLeft:0,scrollTop:0},p=Ga(1);const x=Ga(0),y=Fl(r);if((y||!u)&&((_o(r)!=="body"||ou(f))&&(g=iu(r)),y)){const b=gr(r);p=go(r),x.x=b.x+r.clientLeft,x.y=b.y+r.clientTop}const w=f&&!y&&!u?Hb(f,g):Ga(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-g.scrollLeft*p.x+x.x+w.x,y:l.y*p.y-g.scrollTop*p.y+x.y+w.y}}function __(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function D_(e){const a=iu(e),l=e.ownerDocument.body,r=$a(e.scrollWidth,e.clientWidth,l.scrollWidth,l.clientWidth),i=$a(e.scrollHeight,e.clientHeight,l.scrollHeight,l.clientHeight);let u=-a.scrollLeft+cu(e);const f=-a.scrollTop;return ma(l).direction==="rtl"&&(u+=$a(e.clientWidth,l.clientWidth)-r),{width:r,height:i,x:u,y:f}}const R_=25;function E_(e,a,l){l===void 0&&(l="viewport");const r=l==="layoutViewport",i=on(e),u=Xa(e),f=i.visualViewport;let m=u.clientWidth,g=u.clientHeight,p=0,x=0;if(f){const w=!dh()||a==="fixed";r?w||(p=-f.offsetLeft,x=-f.offsetTop):(m=f.width,g=f.height,w&&(p=f.offsetLeft,x=f.offsetTop))}if(cu(u)<=0){const w=u.ownerDocument,b=w.body,C=getComputedStyle(b),j=w.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,N=Math.abs(u.clientWidth-b.clientWidth-j),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?N/2:N;E<=R_&&(m-=E)}return{width:m,height:g,x:p,y:x}}function O_(e,a){const l=gr(e,!0,a==="fixed"),r=l.top+e.clientTop,i=l.left+e.clientLeft,u=go(e),f=e.clientWidth*u.x,m=e.clientHeight*u.y,g=i*u.x,p=r*u.y;return{width:f,height:m,x:g,y:p}}function Ry(e,a,l){let r;if(a==="viewport"||a==="layoutViewport")r=E_(e,l,a);else if(a==="document")r=D_(Xa(e));else if(fa(a))r=O_(a,l);else{const i=Pb(e);r={x:a.x-i.x,y:a.y-i.y,width:a.width,height:a.height}}return Wc(r)}function T_(e,a){const l=a.get(e);if(l)return l;let r=Hs(e,[],!1).filter(m=>fa(m)&&_o(m)!=="body"),i=null;const u=ma(e).position==="fixed";let f=u?hr(e):e;for(;fa(f)&&!Ps(f);){const m=ma(f),g=uh(f),p=i?i.position:u?"fixed":"";!g&&(p==="fixed"||p==="absolute"&&m.position==="static")?r=r.filter(y=>y!==f):i=m,f=hr(f)}return a.set(e,r),r}function k_(e){let{element:a,boundary:l,rootBoundary:r,strategy:i}=e;const f=[...l==="clippingAncestors"?su(a)?[]:T_(a,this._c):[].concat(l),r],m=Ry(a,f[0],i);let g=m.top,p=m.right,x=m.bottom,y=m.left;for(let w=1;w<f.length;w++){const b=Ry(a,f[w],i);g=$a(b.top,g),p=kl(b.right,p),x=kl(b.bottom,x),y=$a(b.left,y)}return{width:p-y,height:x-g,x:y,y:g}}function A_(e){const{width:a,height:l}=zb(e);return{width:a,height:l}}function z_(e,a,l){const r=Fl(a),i=Xa(a),u=l==="fixed",f=gr(e,!0,u,a);let m={scrollLeft:0,scrollTop:0};const g=Ga(0);if((r||!u)&&((_o(a)!=="body"||ou(i))&&(m=iu(a)),r)){const w=gr(a,!0,u,a);g.x=w.x+a.clientLeft,g.y=w.y+a.clientTop}!r&&i&&(g.x=cu(i));const p=i&&!r&&!u?Hb(i,m):Ga(0),x=f.left+m.scrollLeft-g.x-p.x,y=f.top+m.scrollTop-g.y-p.y;return{x,y,width:f.width,height:f.height}}function am(e){return ma(e).position==="static"}function Ey(e,a){if(!Fl(e)||ma(e).position==="fixed")return null;if(a)return a(e);let l=e.offsetParent;return Xa(e)===l&&(l=l.ownerDocument.body),l}function Fb(e,a){const l=on(e);if(su(e))return l;if(!Fl(e)){let i=hr(e);for(;i&&!Ps(i);){if(fa(i)&&!am(i))return i;i=hr(i)}return l}let r=Ey(e,a);for(;r&&b_(r)&&am(r);)r=Ey(r,a);return r&&Ps(r)&&am(r)&&!uh(r)?l:r||C_(e)||l}const P_=async function(e){const a=this.getOffsetParent||Fb,l=this.getDimensions,r=await l(e.floating);return{reference:z_(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function H_(e){return ma(e).direction==="rtl"}const F_={convertOffsetParentRelativeRectToViewportRelativeRect:M_,getDocumentElement:Xa,getClippingRect:k_,getOffsetParent:Fb,getElementRects:P_,getClientRects:__,getDimensions:A_,getScale:go,isElement:fa,isRTL:H_};function Lb(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function L_(e,a,l){let r=null,i;const u=Xa(e);function f(){var x;clearTimeout(i),(x=r)==null||x.disconnect(),r=null}function m(x,y){x===void 0&&(x=!1),y===void 0&&(y=1),f();const w=e.getBoundingClientRect(),{left:b,top:C,width:j,height:N}=w;if(x||a(),!j||!N)return;const E=Tc(C),O=Tc(u.clientWidth-(b+j)),D=Tc(u.clientHeight-(C+N)),k=Tc(b),_={rootMargin:-E+"px "+-O+"px "+-D+"px "+-k+"px",threshold:$a(0,kl(1,y))||1};let H=!0;function L(W){const Y=W[0].intersectionRatio;if(!Lb(w,e.getBoundingClientRect()))return m();if(Y!==y){if(!H)return m();Y?m(!1,Y):i=setTimeout(()=>{m(!1,1e-7)},1e3)}H=!1}try{r=new IntersectionObserver(L,{..._,root:u.ownerDocument})}catch{r=new IntersectionObserver(L,_)}r.observe(e)}const g=on(e),p=()=>m(l);return g.addEventListener("resize",p),m(!0),()=>{g.removeEventListener("resize",p),f()}}function V_(e,a,l,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=r,p=fh(e),x=i||u?[...p?Hs(p):[],...a?Hs(a):[]]:[];x.forEach(E=>{i&&E.addEventListener("scroll",l),u&&E.addEventListener("resize",l)});const y=p&&m?L_(p,l,u):null;let w=-1,b=null;f&&(b=new ResizeObserver(E=>{let[O]=E;O&&O.target===p&&b&&a&&(b.unobserve(a),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var D;(D=b)==null||D.observe(a)})),l()}),p&&!g&&b.observe(p),a&&b.observe(a));let C,j=g?gr(e):null;g&&N();function N(){const E=gr(e);j&&!Lb(j,E)&&l(),j=E,C=requestAnimationFrame(N)}return l(),()=>{var E;x.forEach(O=>{i&&O.removeEventListener("scroll",l),u&&O.removeEventListener("resize",l)}),y==null||y(),(E=b)==null||E.disconnect(),b=null,g&&cancelAnimationFrame(C)}}const B_=p_,U_=v_,I_=m_,$_=y_,G_=h_,Oy=f_,Y_=x_,q_=(e,a,l)=>{const r=new Map,i=l??{},u={...F_,...i.platform,_c:r};return d_(e,a,{...i,platform:u})};var W_=typeof document<"u",K_=function(){},Ic=W_?v.useLayoutEffect:K_;function Kc(e,a){if(e===a)return!0;if(typeof e!=typeof a)return!1;if(typeof e=="function"&&e.toString()===a.toString())return!0;let l,r,i;if(e&&a&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==a.length)return!1;for(r=l;r--!==0;)if(!Kc(e[r],a[r]))return!1;return!0}if(i=Object.keys(e),l=i.length,l!==Object.keys(a).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(a,i[r]))return!1;for(r=l;r--!==0;){const u=i[r];if(!(u==="_owner"&&e.$$typeof)&&!Kc(e[u],a[u]))return!1}return!0}return e!==e&&a!==a}function Vb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ty(e,a){const l=Vb(e);return Math.round(a*l)/l}function lm(e){const a=v.useRef(e);return Ic(()=>{a.current=e}),a}function X_(e){e===void 0&&(e={});const{placement:a="bottom",strategy:l="absolute",middleware:r=[],platform:i,elements:{reference:u,floating:f}={},transform:m=!0,whileElementsMounted:g,open:p}=e,[x,y]=v.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[w,b]=v.useState(r);Kc(w,r)||b(r);const[C,j]=v.useState(null),[N,E]=v.useState(null),O=v.useCallback(ae=>{ae!==_.current&&(_.current=ae,j(ae))},[]),D=v.useCallback(ae=>{ae!==H.current&&(H.current=ae,E(ae))},[]),k=u||C,z=f||N,_=v.useRef(null),H=v.useRef(null),L=v.useRef(x),W=g!=null,Y=lm(g),K=lm(i),ee=lm(p),te=v.useCallback(()=>{if(!_.current||!H.current)return;const ae={placement:a,strategy:l,middleware:w};K.current&&(ae.platform=K.current),q_(_.current,H.current,ae).then(Z=>{const T={...Z,isPositioned:ee.current!==!1};se.current&&!Kc(L.current,T)&&(L.current=T,Gs.flushSync(()=>{y(T)}))})},[w,a,l,K,ee]);Ic(()=>{p===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,y(ae=>({...ae,isPositioned:!1})))},[p]);const se=v.useRef(!1);Ic(()=>(se.current=!0,()=>{se.current=!1}),[]),Ic(()=>{if(k&&(_.current=k),z&&(H.current=z),k&&z){if(Y.current)return Y.current(k,z,te);te()}},[k,z,te,Y,W]);const ce=v.useMemo(()=>({reference:_,floating:H,setReference:O,setFloating:D}),[O,D]),A=v.useMemo(()=>({reference:k,floating:z}),[k,z]),U=v.useMemo(()=>{const ae={position:l,left:0,top:0};if(!A.floating)return ae;const Z=Ty(A.floating,x.x),T=Ty(A.floating,x.y);return m?{...ae,transform:"translate("+Z+"px, "+T+"px)",...Vb(A.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:Z,top:T}},[l,m,A.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:te,refs:ce,elements:A,floatingStyles:U}),[x,te,ce,A,U])}const Q_=e=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:e,fn(l){const{element:r,padding:i}=typeof e=="function"?e(l):e;return r&&a(r)?r.current!=null?Oy({element:r.current,padding:i}).fn(l):{}:r?Oy({element:r,padding:i}).fn(l):{}}}},Z_=(e,a)=>{const l=B_(e);return{name:l.name,fn:l.fn,options:[e,a]}},J_=(e,a)=>{const l=U_(e);return{name:l.name,fn:l.fn,options:[e,a]}},eD=(e,a)=>({fn:Y_(e).fn,options:[e,a]}),tD=(e,a)=>{const l=I_(e);return{name:l.name,fn:l.fn,options:[e,a]}},nD=(e,a)=>{const l=$_(e);return{name:l.name,fn:l.fn,options:[e,a]}},aD=(e,a)=>{const l=G_(e);return{name:l.name,fn:l.fn,options:[e,a]}},lD=(e,a)=>{const l=Q_(e);return{name:l.name,fn:l.fn,options:[e,a]}};var rD=Object.defineProperty,Rl=(e,a)=>rD(e,"name",{value:a,configurable:!0}),Bb="Popper",[Ub,Do]=Kn(Bb),[oD,Ib]=Ub(Bb),sD=Rl(e=>{const{__scopePopper:a,children:l}=e,[r,i]=v.useState(null),[u,f]=v.useState(void 0);return c.jsx(oD,{scope:a,anchor:r,onAnchorChange:i,placementState:u,setPlacementState:f,children:l})},"Popper"),iD="PopperAnchor",cD=v.forwardRef(Rl(function(a,l){const{__scopePopper:r,virtualRef:i,...u}=a,f=Ib(iD,r),m=v.useRef(null),g=f.onAnchorChange,p=v.useCallback(j=>{m.current=j,j&&g(j)},[g]),x=Ke(l,p),y=v.useRef(null);v.useEffect(()=>{if(!i)return;const j=y.current;y.current=i.current,j!==y.current&&g(y.current)});const w=f.placementState&&uu(f.placementState),b=w==null?void 0:w[0],C=w==null?void 0:w[1];return i?null:c.jsx(Ge.div,{"data-radix-popper-side":b,"data-radix-popper-align":C,...u,ref:x})},"PopperAnchor")),$b="PopperContent",[uD,oz]=Ub($b),dD=v.forwardRef(Rl(function(a,l){var ie,Se,Me,_e,Pe,ot,kt;const{__scopePopper:r,side:i="bottom",sideOffset:u=0,align:f="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:p=!0,collisionBoundary:x=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:C="optimized",onPlaced:j,...N}=a,E=Ib($b,r),[O,D]=v.useState(null),k=Ke(l,D),[z,_]=v.useState(null),H=Rb(z),L=(H==null?void 0:H.width)??0,W=(H==null?void 0:H.height)??0,Y=i+(f!=="center"?"-"+f:""),K=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ee=Array.isArray(x)?x:[x],te=ee.length>0,se={padding:K,boundary:ee.filter(Gb),altBoundary:te},{refs:ce,floatingStyles:A,placement:U,isPositioned:ae,middlewareData:Z}=X_({strategy:"fixed",placement:Y,whileElementsMounted:Rl((...un)=>V_(...un,{animationFrame:C==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[Z_({mainAxis:u+W,alignmentAxis:m}),p&&J_({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?eD():void 0,...se}),p&&tD({...se}),nD({...se,apply:Rl(({elements:un,rects:Xn,availableWidth:Qn,availableHeight:Il})=>{const{width:$l,height:Gl}=Xn.reference,tl=un.floating.style;tl.setProperty("--radix-popper-available-width",`${Qn}px`),tl.setProperty("--radix-popper-available-height",`${Il}px`),tl.setProperty("--radix-popper-anchor-width",`${$l}px`),tl.setProperty("--radix-popper-anchor-height",`${Gl}px`)},"apply")}),z&&lD({element:z,padding:g}),fD({arrowWidth:L,arrowHeight:W}),b&&aD({strategy:"referenceHidden",...se,boundary:te?se.boundary:void 0})]}),T=E.setPlacementState;_t(()=>(T(U),()=>{T(void 0)}),[U,T]);const[R,V]=uu(U),X=jt(j);_t(()=>{ae&&(X==null||X())},[ae,X]);const le=(ie=Z.arrow)==null?void 0:ie.x,re=(Se=Z.arrow)==null?void 0:Se.y,fe=((Me=Z.arrow)==null?void 0:Me.centerOffset)!==0,[ve,ue]=v.useState();return _t(()=>{O&&ue(window.getComputedStyle(O).zIndex)},[O]),c.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:ae?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(_e=Z.transformOrigin)==null?void 0:_e.x,(Pe=Z.transformOrigin)==null?void 0:Pe.y].join(" "),...((ot=Z.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:c.jsx(uD,{scope:r,placedSide:R,placedAlign:V,onArrowChange:_,arrowX:le,arrowY:re,shouldHideArrow:fe,children:c.jsx(Ge.div,{"data-side":R,"data-align":V,...N,ref:k,style:{...N.style,animation:ae?(kt=N.style)==null?void 0:kt.animation:"none"}})})})},"PopperContent"));function Gb(e){return e!==null}Rl(Gb,"isNotNull");var fD=Rl(e=>({name:"transformOrigin",options:e,fn(a){var N,E,O;const{placement:l,rects:r,middlewareData:i}=a,f=((N=i.arrow)==null?void 0:N.centerOffset)!==0,m=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[p,x]=uu(l),y={start:"0%",center:"50%",end:"100%"}[x],w=(((E=i.arrow)==null?void 0:E.x)??0)+m/2,b=(((O=i.arrow)==null?void 0:O.y)??0)+g/2;let C="",j="";return p==="bottom"?(C=f?y:`${w}px`,j=`${-g}px`):p==="top"?(C=f?y:`${w}px`,j=`${r.floating.height+g}px`):p==="right"?(C=`${-g}px`,j=f?y:`${b}px`):p==="left"&&(C=`${r.floating.width+g}px`,j=f?y:`${b}px`),{data:{x:C,y:j}}}}),"transformOrigin");function uu(e){const[a,l="center"]=e.split("-");return[a,l]}Rl(uu,"getSideAndAlignFromPlacement");var mh=sD,hh=cD,gh=dD,mD=Object.defineProperty,ph=(e,a)=>mD(e,"name",{value:a,configurable:!0}),rm=!1;function Yb(){const[e,a]=v.useState(rm);return v.useEffect(()=>{rm||(rm=!0,a(!0))},[]),e}ph(Yb,"useIsHydrated");var qb=bo[" useSyncExternalStore ".trim().toString()];function Wb(){return()=>{}}ph(Wb,"subscribe");function Kb(){return qb(Wb,()=>!0,()=>!1)}ph(Kb,"useIsHydratedModern");var hD=typeof qb=="function"?Kb:Yb,gD=Object.defineProperty,xr=(e,a)=>gD(e,"name",{value:a,configurable:!0}),om="rovingFocusGroup.onEntryFocus",pD={bubbles:!1,cancelable:!0},du="RovingFocusGroup",[Hm,Xb,vD]=Co(du),[xD,Qb]=Kn(du,[vD]),[yD,bD]=xD(du),SD=v.forwardRef(xr(function(a,l){return c.jsx(Hm.Provider,{scope:a.__scopeRovingFocusGroup,children:c.jsx(Hm.Slot,{scope:a.__scopeRovingFocusGroup,children:c.jsx(wD,{...a,ref:l})})})},"RovingFocusGroup")),wD=v.forwardRef(xr(function(a,l){const{__scopeRovingFocusGroup:r,orientation:i,loop:u=!1,dir:f,currentTabStopId:m,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:p,onEntryFocus:x,preventScrollOnEntryFocus:y=!1,...w}=a,b=v.useRef(null),C=Ke(l,b),j=qs(f),[N,E]=Tl({prop:m,defaultProp:g??null,onChange:p,caller:du}),[O,D]=v.useState(!1),k=jt(x),z=Xb(r),_=v.useRef(!1),[H,L]=v.useState(0);return v.useEffect(()=>{const W=b.current;if(W)return W.addEventListener(om,k),()=>W.removeEventListener(om,k)},[k]),c.jsx(yD,{scope:r,orientation:i,dir:j,loop:u,currentTabStopId:N,onItemFocus:v.useCallback(W=>E(W),[E]),onItemShiftTab:v.useCallback(()=>D(!0),[]),onFocusableItemAdd:v.useCallback(()=>L(W=>W+1),[]),onFocusableItemRemove:v.useCallback(()=>L(W=>W-1),[]),children:c.jsx(Ge.div,{tabIndex:O||H===0?-1:0,"data-orientation":i,...w,ref:C,style:{outline:"none",...a.style},onMouseDown:we(a.onMouseDown,()=>{_.current=!0}),onFocus:we(a.onFocus,W=>{const Y=!_.current;if(W.target===W.currentTarget&&Y&&!O){const K=new CustomEvent(om,pD);if(W.currentTarget.dispatchEvent(K),!K.defaultPrevented){const ee=z().filter(U=>U.focusable),te=ee.find(U=>U.active),se=ee.find(U=>U.id===N),A=[te,se,...ee].filter(Boolean).map(U=>U.ref.current);vh(A,y)}}_.current=!1}),onBlur:we(a.onBlur,()=>D(!1))})})},"RovingFocusGroupImpl")),CD="RovingFocusGroupItem",jD=v.forwardRef(xr(function(a,l){const{__scopeRovingFocusGroup:r,focusable:i=!0,active:u=!1,tabStopId:f,children:m,...g}=a,p=Fn(),x=f||p,y=bD(CD,r),w=y.currentTabStopId===x,b=Xb(r),{onFocusableItemAdd:C,onFocusableItemRemove:j,currentTabStopId:N}=y,E=hD();return _t(()=>{if(!(!E||!i))return C(),()=>j()},[E,i,C,j]),v.useEffect(()=>{if(!(E||!i))return C(),()=>j()},[E,i,C,j]),c.jsx(Hm.ItemSlot,{scope:r,id:x,focusable:i,active:u,children:c.jsx(Ge.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...g,ref:l,onMouseDown:we(a.onMouseDown,O=>{i?y.onItemFocus(x):O.preventDefault()}),onFocus:we(a.onFocus,()=>y.onItemFocus(x)),onKeyDown:we(a.onKeyDown,O=>{if(O.key==="Tab"&&O.shiftKey){y.onItemShiftTab();return}if(O.target!==O.currentTarget)return;const D=Jb(O,y.orientation,y.dir);if(D!==void 0){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey)return;O.preventDefault();let z=b().filter(_=>_.focusable).map(_=>_.ref.current);if(D==="last")z.reverse();else if(D==="prev"||D==="next"){D==="prev"&&z.reverse();const _=z.indexOf(O.currentTarget);z=y.loop?eS(z,_+1):z.slice(_+1)}setTimeout(()=>vh(z))}}),children:typeof m=="function"?m({isCurrentTabStop:w,hasTabStop:N!=null}):m})})},"RovingFocusGroupItem")),ND={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zb(e,a){return a!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}xr(Zb,"getDirectionAwareKey");function Jb(e,a,l){const r=Zb(e.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ND[r]}xr(Jb,"getFocusIntent");function vh(e,a=!1){const l=document.activeElement;for(const r of e)if(r===l||(r.focus({preventScroll:a}),document.activeElement!==l))return}xr(vh,"focusFirst");function eS(e,a){return e.map((l,r)=>e[(a+r)%e.length])}xr(eS,"wrapArray");var MD=SD,_D=jD,DD=Object.defineProperty,et=(e,a)=>DD(e,"name",{value:a,configurable:!0}),RD=["Enter"," "],ED=["ArrowDown","PageUp","Home"],tS=["ArrowUp","PageDown","End"],OD=[...ED,...tS],fu="Menu",[Fm,TD,kD]=Co(fu),[yr,nS]=Kn(fu,[kD,Do,Qb]),xh=Do(),aS=Qb(),[AD,Ks]=yr(fu),[zD,yh]=yr(fu),PD=et(e=>{const{__scopeMenu:a,open:l=!1,children:r,dir:i,onOpenChange:u,modal:f=!0}=e,m=xh(a),[g,p]=v.useState(null),x=v.useRef(!1),y=jt(u),w=qs(i);return v.useEffect(()=>{const b=et(()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},"handleKeyDown"),C=et(()=>x.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),v.useEffect(()=>{if(!l)return;const b=et(()=>y(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[l,y]),c.jsx(mh,{...m,children:c.jsx(AD,{scope:a,open:l,onOpenChange:y,content:g,onContentChange:p,children:c.jsx(zD,{scope:a,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:w,modal:f,children:r})})})},"Menu"),HD=v.forwardRef(et(function(a,l){const{__scopeMenu:r,...i}=a,u=xh(r);return c.jsx(hh,{...u,...i,ref:l})},"MenuAnchor")),lS="MenuPortal",[FD,LD]=yr(lS,{forceMount:void 0}),VD=et(e=>{const{__scopeMenu:a,forceMount:l,children:r,container:i}=e,u=Ks(lS,a);return c.jsx(FD,{scope:a,forceMount:l,children:c.jsx(Ka,{present:l||u.open,children:c.jsx(nu,{asChild:!0,container:i,children:r})})})},"MenuPortal"),El="MenuContent",[BD,rS]=yr(El),UD=v.forwardRef(et(function(a,l){const r=LD(El,a.__scopeMenu),{forceMount:i=r.forceMount,...u}=a,f=Ks(El,a.__scopeMenu),m=yh(El,a.__scopeMenu);return c.jsx(Fm.Provider,{scope:a.__scopeMenu,children:c.jsx(Ka,{present:i||f.open,children:c.jsx(Fm.Slot,{scope:a.__scopeMenu,children:m.modal?c.jsx(ID,{...u,ref:l}):c.jsx($D,{...u,ref:l})})})})},"MenuContent")),ID=v.forwardRef(et(function(a,l){const r=Ks(El,a.__scopeMenu),i=v.useRef(null),u=Ke(l,i);return v.useEffect(()=>{const f=i.current;if(f)return lu(f)},[]),c.jsx(oS,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:we(a.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),$D=v.forwardRef(et(function(a,l){const r=Ks(El,a.__scopeMenu);return c.jsx(oS,{...a,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),GD=da("MenuContent.ScrollLock"),oS=v.forwardRef(et(function(a,l){const{__scopeMenu:r,loop:i=!1,trapFocus:u,onOpenAutoFocus:f,onCloseAutoFocus:m,disableOutsidePointerEvents:g,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,disableOutsideScroll:j,...N}=a,E=Ks(El,r),O=yh(El,r),D=xh(r),k=aS(r),z=TD(r),[_,H]=v.useState(null),L=v.useRef(null),W=Ke(l,L,E.onContentChange),Y=v.useRef(0),K=v.useRef(""),ee=v.useRef(0),te=v.useRef(null),se=v.useRef("right"),ce=v.useRef(0),A=j?Ws:v.Fragment,U=j?{as:GD,allowPinchZoom:!0}:void 0,ae=et(T=>{var ue,ie;const R=K.current+T,V=z().filter(Se=>!Se.disabled),X=document.activeElement,le=(ue=V.find(Se=>Se.ref.current===X))==null?void 0:ue.textValue,re=V.map(Se=>Se.textValue),fe=fS(re,R,le),ve=(ie=V.find(Se=>Se.textValue===fe))==null?void 0:ie.ref.current;et((function Se(Me){K.current=Me,window.clearTimeout(Y.current),Me!==""&&(Y.current=window.setTimeout(()=>Se(""),1e3))}),"updateSearch")(R),ve&&setTimeout(()=>ve.focus())},"handleTypeaheadSearch");v.useEffect(()=>()=>window.clearTimeout(Y.current),[]),No();const Z=v.useCallback(T=>{var V,X;return se.current===((V=te.current)==null?void 0:V.side)&&hS(T,(X=te.current)==null?void 0:X.area)},[]);return c.jsx(BD,{scope:r,searchRef:K,onItemEnter:v.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),onItemLeave:v.useCallback(T=>{var R;Z(T)||((R=L.current)==null||R.focus(),H(null))},[Z]),onTriggerLeave:v.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:v.useCallback(T=>{te.current=T},[]),children:c.jsx(A,{...U,children:c.jsx(tu,{asChild:!0,trapped:u,onMountAutoFocus:we(f,T=>{var R;T.preventDefault(),(R=L.current)==null||R.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:c.jsx(eu,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:x,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:C,children:c.jsx(MD,{asChild:!0,...k,dir:O.dir,orientation:"vertical",loop:i,currentTabStopId:_,onCurrentTabStopIdChange:H,onEntryFocus:we(p,T=>{O.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(gh,{role:"menu","aria-orientation":"vertical","data-state":cS(E.open),"data-radix-menu-content":"",dir:O.dir,...D,...N,ref:W,style:{outline:"none",...N.style},onKeyDown:we(N.onKeyDown,T=>{const V=T.target.closest("[data-radix-menu-content]")===T.currentTarget,X=T.ctrlKey||T.altKey||T.metaKey,le=T.key.length===1;V&&(T.key==="Tab"&&T.preventDefault(),!X&&le&&ae(T.key));const re=L.current;if(T.target!==re||!OD.includes(T.key))return;T.preventDefault();const ve=z().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);tS.includes(T.key)&&ve.reverse(),uS(ve)}),onBlur:we(a.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(Y.current),K.current="")}),onPointerMove:we(a.onPointerMove,Xc(T=>{const R=T.target,V=ce.current!==T.clientX;if(T.currentTarget.contains(R)&&V){const X=T.clientX>ce.current?"right":"left";se.current=X,ce.current=T.clientX}}))})})})})})})},"MenuContentImpl")),YD=v.forwardRef(et(function(a,l){const{__scopeMenu:r,...i}=a;return c.jsx(Ge.div,{...i,ref:l})},"MenuLabel")),Lm="MenuItem",ky="menu.itemSelect",sS=v.forwardRef(et(function(a,l){const{disabled:r=!1,onSelect:i,...u}=a,f=v.useRef(null),m=yh(Lm,a.__scopeMenu),g=rS(Lm,a.__scopeMenu),p=Ke(l,f),x=v.useRef(!1),y=et(()=>{const w=f.current;if(!r&&w){const b=new CustomEvent(ky,{bubbles:!0,cancelable:!0});w.addEventListener(ky,C=>i==null?void 0:i(C),{once:!0}),As(w,b),b.defaultPrevented?x.current=!1:m.onClose()}},"handleSelect");return c.jsx(qD,{...u,ref:p,disabled:r,onClick:we(a.onClick,y),onPointerDown:w=>{var b;(b=a.onPointerDown)==null||b.call(a,w),x.current=!0},onPointerUp:we(a.onPointerUp,w=>{var b;x.current||(b=w.currentTarget)==null||b.click()}),onKeyDown:we(a.onKeyDown,w=>{r||w.target!==w.currentTarget||g.searchRef.current!==""&&w.key===" "||RD.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})},"MenuItem")),qD=v.forwardRef(et(function(a,l){const{__scopeMenu:r,disabled:i=!1,textValue:u,...f}=a,m=rS(Lm,r),g=aS(r),p=v.useRef(null),x=Ke(l,p),[y,w]=v.useState(!1),[b,C]=v.useState("");return v.useEffect(()=>{const j=p.current;j&&C((j.textContent??"").trim())},[f.children]),c.jsx(Fm.ItemSlot,{scope:r,disabled:i,textValue:u??b,children:c.jsx(_D,{asChild:!0,...g,focusable:!i,children:c.jsx(Ge.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...f,ref:x,onPointerMove:we(a.onPointerMove,Xc(j=>{i?m.onItemLeave(j):(m.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(a.onPointerLeave,Xc(j=>m.onItemLeave(j))),onFocus:we(a.onFocus,()=>w(!0)),onBlur:we(a.onBlur,()=>w(!1))})})})},"MenuItemImpl")),WD=v.forwardRef(et(function(a,l){const{checked:r=!1,onCheckedChange:i,...u}=a;return c.jsx(XD,{scope:a.__scopeMenu,checked:r,children:c.jsx(sS,{role:"menuitemcheckbox","aria-checked":Fs(r)?"mixed":r,...u,ref:l,"data-state":bh(r),onSelect:we(u.onSelect,()=>i==null?void 0:i(Fs(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),KD="MenuRadioGroup",[sz,iz]=yr(KD,{value:void 0,onValueChange:et(()=>{},"onValueChange")}),iS="MenuItemIndicator",[XD,QD]=yr(iS,{checked:!1}),ZD=v.forwardRef(et(function(a,l){const{__scopeMenu:r,forceMount:i,...u}=a,f=QD(iS,r);return c.jsx(Ka,{present:i||Fs(f.checked)||f.checked===!0,children:c.jsx(Ge.span,{...u,ref:l,"data-state":bh(f.checked)})})},"MenuItemIndicator")),JD=v.forwardRef(et(function(a,l){const{__scopeMenu:r,...i}=a;return c.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})},"MenuSeparator")),e2="MenuSub",[cz,uz]=yr(e2);function cS(e){return e?"open":"closed"}et(cS,"getOpenState");function Fs(e){return e==="indeterminate"}et(Fs,"isIndeterminate");function bh(e){return Fs(e)?"indeterminate":e?"checked":"unchecked"}et(bh,"getCheckedState");function uS(e){const a=document.activeElement;for(const l of e)if(l===a||(l.focus(),document.activeElement!==a))return}et(uS,"focusFirst");function dS(e,a){return e.map((l,r)=>e[(a+r)%e.length])}et(dS,"wrapArray");function fS(e,a,l){const i=a.length>1&&Array.from(a).every(p=>p===a[0])?a[0]:a,u=l?e.indexOf(l):-1;let f=dS(e,Math.max(u,0));i.length===1&&(f=f.filter(p=>p!==l));const g=f.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return g!==l?g:void 0}et(fS,"getNextMatch");function mS(e,a){const{x:l,y:r}=e;let i=!1;for(let u=0,f=a.length-1;u<a.length;f=u++){const m=a[u],g=a[f],p=m.x,x=m.y,y=g.x,w=g.y;x>r!=w>r&&l<(y-p)*(r-x)/(w-x)+p&&(i=!i)}return i}et(mS,"isPointInPolygon");function hS(e,a){if(!a)return!1;const l={x:e.clientX,y:e.clientY};return mS(l,a)}et(hS,"isPointerInGraceArea");function Xc(e){return a=>a.pointerType==="mouse"?e(a):void 0}et(Xc,"whenMouse");var t2=PD,n2=HD,a2=VD,l2=UD,r2=YD,o2=sS,s2=WD,i2=ZD,c2=JD,u2=Object.defineProperty,Qa=(e,a)=>u2(e,"name",{value:a,configurable:!0}),Sh="DropdownMenu",[d2,dz]=Kn(Sh,[nS]),Za=nS(),[f2,gS]=d2(Sh),m2=Qa(e=>{const{__scopeDropdownMenu:a,children:l,dir:r,open:i,defaultOpen:u,onOpenChange:f,modal:m=!0}=e,g=Za(a),p=v.useRef(null),[x,y]=Tl({prop:i,defaultProp:u??!1,onChange:f,caller:Sh});return c.jsx(f2,{scope:a,triggerId:Fn(),triggerRef:p,contentId:Fn(),open:x,onOpenChange:y,onOpenToggle:v.useCallback(()=>y(w=>!w),[y]),modal:m,children:c.jsx(t2,{...g,open:x,onOpenChange:y,dir:r,modal:m,children:l})})},"DropdownMenu"),h2="DropdownMenuTrigger",g2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,disabled:i=!1,...u}=a,f=gS(h2,r),m=Za(r),g=Ke(l,f.triggerRef);return c.jsx(n2,{asChild:!0,...m,children:c.jsx(Ge.button,{type:"button",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:g,onPointerDown:we(a.onPointerDown,p=>{!i&&p.button===0&&p.ctrlKey===!1&&(f.onOpenToggle(),f.open||p.preventDefault())}),onKeyDown:we(a.onKeyDown,p=>{i||(["Enter"," "].includes(p.key)&&f.onOpenToggle(),p.key==="ArrowDown"&&f.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})},"DropdownMenuTrigger")),p2=Qa(e=>{const{__scopeDropdownMenu:a,...l}=e,r=Za(a);return c.jsx(a2,{...r,...l})},"DropdownMenuPortal"),v2="DropdownMenuContent",x2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=gS(v2,r),f=Za(r),m=v.useRef(!1);return c.jsx(l2,{id:u.contentId,"aria-labelledby":u.triggerId,...f,...i,ref:l,onCloseAutoFocus:we(a.onCloseAutoFocus,g=>{var p;m.current||(p=u.triggerRef.current)==null||p.focus(),m.current=!1,g.preventDefault()}),onInteractOutside:we(a.onInteractOutside,g=>{const p=g.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,y=p.button===2||x;(!u.modal||y)&&(m.current=!0)}),style:{...a.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")),y2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=Za(r);return c.jsx(r2,{...u,...i,ref:l})},"DropdownMenuLabel")),b2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=Za(r);return c.jsx(o2,{...u,...i,ref:l})},"DropdownMenuItem")),S2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=Za(r);return c.jsx(s2,{...u,...i,ref:l})},"DropdownMenuCheckboxItem")),w2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=Za(r);return c.jsx(i2,{...u,...i,ref:l})},"DropdownMenuItemIndicator")),C2=v.forwardRef(Qa(function(a,l){const{__scopeDropdownMenu:r,...i}=a,u=Za(r);return c.jsx(c2,{...u,...i,ref:l})},"DropdownMenuSeparator")),j2=m2,N2=g2,M2=p2,_2=x2,D2=y2,R2=b2,E2=S2,O2=w2,T2=C2,k2=Object.defineProperty,A2=(e,a)=>k2(e,"name",{value:a,configurable:!0});function wh(e){const a=v.useRef({value:e,previous:e});return v.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}A2(wh,"usePrevious");var z2=Object.defineProperty,Vt=(e,a)=>z2(e,"name",{value:a,configurable:!0}),Ro="NavigationMenu",[pS,fz,P2]=Co(Ro),[Vm,H2,F2]=Co(Ro),[Ch,mz]=Kn(Ro,[P2,F2]),[L2,jh]=Ch(Ro),[V2,hz]=Ch(Ro),B2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,value:i,onValueChange:u,defaultValue:f,delayDuration:m=200,skipDelayDuration:g=300,orientation:p="horizontal",dir:x,...y}=a,[w,b]=v.useState(null),C=Ke(l,b),j=qs(x),N=v.useRef(0),E=v.useRef(0),O=v.useRef(0),[D,k]=v.useState(!0),[z,_]=Tl({prop:i,onChange:Vt(Y=>{const K=Y!=="",ee=g>0;K?(window.clearTimeout(O.current),ee&&k(!1)):(window.clearTimeout(O.current),O.current=window.setTimeout(()=>k(!0),g)),u==null||u(Y)},"onChange"),defaultProp:f??"",caller:Ro}),H=v.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>_(""),150)},[_]),L=v.useCallback(Y=>{window.clearTimeout(E.current),_(Y)},[_]),W=v.useCallback(Y=>{z===Y?window.clearTimeout(E.current):N.current=window.setTimeout(()=>{window.clearTimeout(E.current),_(Y)},m)},[z,_,m]);return v.useEffect(()=>()=>{window.clearTimeout(N.current),window.clearTimeout(E.current),window.clearTimeout(O.current)},[]),c.jsx(U2,{scope:r,isRootMenu:!0,value:z,dir:j,orientation:p,rootNavigationMenu:w,onTriggerEnter:Y=>{window.clearTimeout(N.current),D?W(Y):L(Y)},onTriggerLeave:()=>{window.clearTimeout(N.current),H()},onContentEnter:()=>window.clearTimeout(E.current),onContentLeave:H,onItemSelect:Y=>{_(K=>K===Y?"":Y)},onItemDismiss:()=>_(""),children:c.jsx(Ge.nav,{"aria-label":"Main","data-orientation":p,dir:j,...y,ref:C})})},"NavigationMenu")),U2=Vt(e=>{const{scope:a,isRootMenu:l,rootNavigationMenu:r,dir:i,orientation:u,children:f,value:m,onItemSelect:g,onItemDismiss:p,onTriggerEnter:x,onTriggerLeave:y,onContentEnter:w,onContentLeave:b}=e,[C,j]=v.useState(null),[N,E]=v.useState(new Map),[O,D]=v.useState(null);return c.jsx(L2,{scope:a,isRootMenu:l,rootNavigationMenu:r,value:m,previousValue:wh(m),baseId:Fn(),dir:i,orientation:u,viewport:C,onViewportChange:j,indicatorTrack:O,onIndicatorTrackChange:D,onTriggerEnter:jt(x),onTriggerLeave:jt(y),onContentEnter:jt(w),onContentLeave:jt(b),onItemSelect:jt(g),onItemDismiss:jt(p),onViewportContentChange:v.useCallback((k,z)=>{E(_=>(_.set(k,z),new Map(_)))},[]),onViewportContentRemove:v.useCallback(k=>{E(z=>z.has(k)?(z.delete(k),new Map(z)):z)},[]),children:c.jsx(pS.Provider,{scope:a,children:c.jsx(V2,{scope:a,items:N,children:f})})})},"NavigationMenuProvider"),I2="NavigationMenuList",$2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,...i}=a,u=jh(I2,r),f=c.jsx(Ge.ul,{"data-orientation":u.orientation,...i,ref:l});return c.jsx(Ge.div,{style:{position:"relative"},ref:u.onIndicatorTrackChange,children:c.jsx(pS.Slot,{scope:r,children:u.isRootMenu?c.jsx(Q2,{asChild:!0,children:f}):f})})},"NavigationMenuList")),G2="NavigationMenuItem",[Y2,gz]=Ch(G2),q2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,value:i,...u}=a,f=Fn(),m=i||f||"LEGACY_REACT_AUTO_VALUE",g=v.useRef(null),p=v.useRef(null),x=v.useRef(null),y=v.useRef(()=>{}),w=v.useRef(!1),b=v.useCallback((j="start")=>{if(g.current){y.current();const N=Bm(g.current);N.length&&Nh(j==="start"?N:N.reverse())}},[]),C=v.useCallback(()=>{if(g.current){const j=Bm(g.current);j.length&&(y.current=vS(j))}},[]);return c.jsx(Y2,{scope:r,value:m,triggerRef:p,contentRef:g,focusProxyRef:x,wasEscapeCloseRef:w,onEntryKeyDown:b,onFocusProxyEnter:b,onRootContentClose:C,onContentFocusOutside:C,children:c.jsx(Ge.li,{...u,ref:l})})},"NavigationMenuItem")),Ay="navigationMenu.linkSelect",W2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,active:i,onSelect:u,...f}=a;return c.jsx(J2,{asChild:!0,children:c.jsx(Ge.a,{"data-active":i?"":void 0,"aria-current":i?"page":void 0,...f,ref:l,onClick:we(a.onClick,m=>{const g=m.target,p=new CustomEvent(Ay,{bubbles:!0,cancelable:!0});if(g.addEventListener(Ay,x=>u==null?void 0:u(x),{once:!0}),As(g,p),!p.defaultPrevented&&!m.metaKey){const x=new CustomEvent(K2,{bubbles:!0,cancelable:!0});As(g,x)}},{checkForDefaultPrevented:!1})})})},"NavigationMenuLink")),K2="navigationMenu.rootContentDismiss",X2="FocusGroup",Q2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,...i}=a,u=jh(X2,r);return c.jsx(Vm.Provider,{scope:r,children:c.jsx(Vm.Slot,{scope:r,children:c.jsx(Ge.div,{dir:u.dir,...i,ref:l})})})},"FocusGroup")),zy=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Z2="FocusGroupItem",J2=v.forwardRef(Vt(function(a,l){const{__scopeNavigationMenu:r,...i}=a,u=H2(r),f=jh(Z2,r);return c.jsx(Vm.ItemSlot,{scope:r,children:c.jsx(Ge.button,{...i,ref:l,onKeyDown:we(a.onKeyDown,m=>{if(["Home","End",...zy].includes(m.key)){let p=u().map(w=>w.ref.current);if([f.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(m.key)&&p.reverse(),zy.includes(m.key)){const w=p.indexOf(m.currentTarget);p=p.slice(w+1)}setTimeout(()=>Nh(p)),m.preventDefault()}})})})},"FocusGroupItem"));function Bm(e){const a=[],l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Vt(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;l.nextNode();)a.push(l.currentNode);return a}Vt(Bm,"getTabbableCandidates");function Nh(e){const a=document.activeElement;return e.some(l=>l===a?!0:(l.focus(),document.activeElement!==a))}Vt(Nh,"focusFirst");function vS(e){return e.forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")}),()=>{e.forEach(a=>{const l=a.dataset.tabindex;a.setAttribute("tabindex",l)})}}Vt(vS,"removeFromTabOrder");function eR(e,a){const l=jt(a);_t(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(l)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,l])}Vt(eR,"useResizeObserver");function tR(e){return e?"open":"closed"}Vt(tR,"getOpenState");function nR(e,a){return`${e}-trigger-${a}`}Vt(nR,"makeTriggerId");function aR(e,a){return`${e}-content-${a}`}Vt(aR,"makeContentId");function lR(e){return a=>a.pointerType==="mouse"?e(a):void 0}Vt(lR,"whenMouse");var rR=B2,oR=$2,sR=q2,iR=W2,cR=Object.defineProperty,uR=(e,a)=>cR(e,"name",{value:a,configurable:!0});function Um(e,[a,l]){return Math.min(l,Math.max(a,e))}uR(Um,"clamp");var dR=Object.defineProperty,Ll=(e,a)=>dR(e,"name",{value:a,configurable:!0}),Mh="Popover",[xS,pz]=Kn(Mh,[Do]),_h=Do(),[fR,Eo]=xS(Mh),mR=Ll(e=>{const{__scopePopover:a,children:l,open:r,defaultOpen:i,onOpenChange:u,modal:f=!1}=e,m=_h(a),g=v.useRef(null),[p,x]=v.useState(!1),[y,w]=Tl({prop:r,defaultProp:i??!1,onChange:u,caller:Mh});return c.jsx(mh,{...m,children:c.jsx(fR,{scope:a,contentId:Fn(),triggerRef:g,open:y,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(b=>!b),[w]),hasCustomAnchor:p,onCustomAnchorAdd:v.useCallback(()=>x(!0),[]),onCustomAnchorRemove:v.useCallback(()=>x(!1),[]),modal:f,children:l})})},"Popover"),hR="PopoverTrigger",gR=v.forwardRef(Ll(function(a,l){const{__scopePopover:r,...i}=a,u=Eo(hR,r),f=_h(r),m=Ke(l,u.triggerRef),g=c.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":Dh(u.open),...i,ref:m,onClick:we(a.onClick,u.onOpenToggle)});return u.hasCustomAnchor?g:c.jsx(hh,{asChild:!0,...f,children:g})},"PopoverTrigger")),yS="PopoverPortal",[pR,vR]=xS(yS,{forceMount:void 0}),xR=Ll(e=>{const{__scopePopover:a,forceMount:l,children:r,container:i}=e,u=Eo(yS,a);return c.jsx(pR,{scope:a,forceMount:l,children:c.jsx(Ka,{present:l||u.open,children:c.jsx(nu,{asChild:!0,container:i,children:r})})})},"PopoverPortal"),Ls="PopoverContent",yR=v.forwardRef(Ll(function(a,l){const r=vR(Ls,a.__scopePopover),{forceMount:i=r.forceMount,...u}=a,f=Eo(Ls,a.__scopePopover);return c.jsx(Ka,{present:i||f.open,children:f.modal?c.jsx(SR,{...u,ref:l}):c.jsx(wR,{...u,ref:l})})},"PopoverContent")),bR=da("PopoverContent.RemoveScroll"),SR=v.forwardRef(Ll(function(a,l){const r=Eo(Ls,a.__scopePopover),i=v.useRef(null),u=Ke(l,i),f=v.useRef(!1);return v.useEffect(()=>{const m=i.current;if(m)return lu(m)},[]),c.jsx(Ws,{as:bR,allowPinchZoom:!0,children:c.jsx(bS,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(a.onCloseAutoFocus,m=>{var g;m.preventDefault(),f.current||(g=r.triggerRef.current)==null||g.focus()}),onPointerDownOutside:we(a.onPointerDownOutside,m=>{const g=m.detail.originalEvent,p=g.button===0&&g.ctrlKey===!0,x=g.button===2||p;f.current=x},{checkForDefaultPrevented:!1}),onFocusOutside:we(a.onFocusOutside,m=>m.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),wR=v.forwardRef(Ll(function(a,l){const r=Eo(Ls,a.__scopePopover),i=v.useRef(!1),u=v.useRef(!1);return c.jsx(bS,{...a,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var m,g;(m=a.onCloseAutoFocus)==null||m.call(a,f),f.defaultPrevented||(i.current||(g=r.triggerRef.current)==null||g.focus(),f.preventDefault()),i.current=!1,u.current=!1},onInteractOutside:f=>{var p,x;(p=a.onInteractOutside)==null||p.call(a,f),f.defaultPrevented||(i.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const m=f.target;((x=r.triggerRef.current)==null?void 0:x.contains(m))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})},"PopoverContentNonModal")),bS=v.forwardRef(Ll(function(a,l){const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:u,onCloseAutoFocus:f,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:p,onFocusOutside:x,onInteractOutside:y,...w}=a,b=Eo(Ls,r),C=_h(r);return No(),c.jsx(tu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:u,onUnmountAutoFocus:f,children:c.jsx(eu,{asChild:!0,disableOutsidePointerEvents:m,onInteractOutside:y,onEscapeKeyDown:g,onPointerDownOutside:p,onFocusOutside:x,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:c.jsx(gh,{"data-state":Dh(b.open),role:"dialog",id:b.contentId,...C,...w,ref:l,style:{...w.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function Dh(e){return e?"open":"closed"}Ll(Dh,"getState");var CR=mR,jR=gR,NR=xR,MR=yR,_R=Object.defineProperty,tt=(e,a)=>_R(e,"name",{value:a,configurable:!0}),DR=[" ","Enter","ArrowUp","ArrowDown"],RR=[" ","Enter"],xo="Select",[mu,Rh,ER]=Co(xo),[br,vz]=Kn(xo,[ER,Do]),Eh=Do(),[OR,Vl]=br(xo),[TR,kR]=br(xo);function SS(e){const{__scopeSelect:a,children:l,open:r,defaultOpen:i,onOpenChange:u,value:f,defaultValue:m,onValueChange:g,dir:p,name:x,autoComplete:y,disabled:w,required:b,form:C,internal_do_not_use_render:j}=e,N=Eh(a),[E,O]=v.useState(null),[D,k]=v.useState(null),[z,_]=v.useState(!1),H=qs(p),[L,W]=Tl({prop:r,defaultProp:i??!1,onChange:u,caller:xo}),[Y,K]=Tl({prop:f,defaultProp:m,onChange:g,caller:xo}),ee=v.useRef(null),te=v.useRef(Y);v.useEffect(()=>{const V=C?E==null?void 0:E.ownerDocument.getElementById(C):E==null?void 0:E.form;if(V instanceof HTMLFormElement){const X=tt(()=>K(te.current),"reset");return V.addEventListener("reset",X),()=>V.removeEventListener("reset",X)}},[C,E,K]);const se=E?!!C||!!E.closest("form"):!0,[ce,A]=v.useState(new Set),U=Fn(),ae=Array.from(ce).map(V=>V.props.value).join(";"),Z=v.useCallback(V=>{A(X=>new Set(X).add(V))},[]),T=v.useCallback(V=>{A(X=>{const le=new Set(X);return le.delete(V),le})},[]),R={required:b,trigger:E,onTriggerChange:O,valueNode:D,onValueNodeChange:k,valueNodeHasChildren:z,onValueNodeHasChildrenChange:_,contentId:U,value:Y,onValueChange:K,open:L,onOpenChange:W,dir:H,triggerPointerDownPosRef:ee,disabled:w,name:x,autoComplete:y,form:C,nativeOptions:ce,nativeSelectKey:ae,isFormControl:se};return c.jsx(mh,{...N,children:c.jsx(OR,{scope:a,...R,children:c.jsx(mu.Provider,{scope:a,children:c.jsx(TR,{scope:a,onNativeOptionAdd:Z,onNativeOptionRemove:T,children:jS(j)?j(R):l})})})})}tt(SS,"SelectProvider");var AR=tt(e=>{const{__scopeSelect:a,children:l,...r}=e;return c.jsx(SS,{__scopeSelect:a,...r,internal_do_not_use_render:({isFormControl:i})=>c.jsxs(c.Fragment,{children:[l,i?c.jsx(oE,{__scopeSelect:a}):null]})})},"Select"),zR="SelectTrigger",PR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,disabled:i=!1,...u}=a,f=Eh(r),m=Vl(zR,r),g=m.disabled||i,p=Ke(l,m.onTriggerChange),x=Rh(r),y=v.useRef("touch"),[w,b,C]=Oh(N=>{const E=x().filter(k=>!k.disabled),O=E.find(k=>k.value===m.value),D=Th(E,N,O);D!==void 0&&m.onValueChange(D.value)}),j=tt(N=>{g||(m.onOpenChange(!0),C()),N&&(m.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})},"handleOpen");return c.jsx(hh,{asChild:!0,...f,children:c.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":m.open?m.contentId:void 0,"aria-expanded":m.open,"aria-required":m.required,"aria-autocomplete":"none",dir:m.dir,"data-state":m.open?"open":"closed",disabled:g,"data-disabled":g?"":void 0,"data-placeholder":Xs(m.value)?"":void 0,...u,ref:p,onClick:we(u.onClick,N=>{N.currentTarget.focus(),y.current!=="mouse"&&j(N)}),onPointerDown:we(u.onPointerDown,N=>{y.current=N.pointerType;const E=N.target;E.hasPointerCapture(N.pointerId)&&E.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(j(N),N.preventDefault())}),onKeyDown:we(u.onKeyDown,N=>{const E=w.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&b(N.key),!(E&&N.key===" ")&&DR.includes(N.key)&&(j(),N.preventDefault())})})})},"SelectTrigger")),HR="SelectValue",FR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,className:i,style:u,children:f,placeholder:m="",...g}=a,p=Vl(HR,r),{onValueNodeHasChildrenChange:x}=p,y=f!==void 0,w=Ke(l,p.onValueNodeChange);_t(()=>{x(y)},[x,y]);const b=Xs(p.value);return c.jsx(Ge.span,{...g,asChild:b?!1:g.asChild,ref:w,style:{pointerEvents:"none"},children:c.jsx(v.Fragment,{children:b?m:f},b?"placeholder":"value")})},"SelectValue")),LR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,children:i,...u}=a;return c.jsx(Ge.span,{"aria-hidden":!0,...u,ref:l,children:i||"▼"})},"SelectIcon")),VR="SelectPortal",[BR,UR]=br(VR,{forceMount:void 0}),IR=tt(e=>{const{__scopeSelect:a,forceMount:l,...r}=e;return c.jsx(BR,{scope:e.__scopeSelect,forceMount:l,children:c.jsx(nu,{asChild:!0,...r})})},"SelectPortal"),pr="SelectContent",$R=v.forwardRef(tt(function(a,l){const r=UR(pr,a.__scopeSelect),{forceMount:i=r.forceMount,...u}=a,f=Vl(pr,a.__scopeSelect),[m,g]=v.useState();return _t(()=>{g(new DocumentFragment)},[]),c.jsx(Ka,{present:i||f.open,children:({present:p})=>p?c.jsx(qR,{...u,ref:l}):c.jsx(GR,{...u,fragment:m})})},"SelectContent")),GR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,children:i,fragment:u}=a;return u?Gs.createPortal(c.jsx(wS,{scope:r,children:c.jsx(mu.Slot,{scope:r,children:c.jsx("div",{ref:l,children:i})})}),u):null},"SelectContentFragment")),$n=10,[wS,hu]=br(pr),YR=da("SelectContent.RemoveScroll"),qR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r}=a,{position:i="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:f,onPointerDownOutside:m,side:g,sideOffset:p,align:x,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:C,sticky:j,hideWhenDetached:N,avoidCollisions:E,...O}=a,D=Vl(pr,r),[k,z]=v.useState(null),[_,H]=v.useState(null),L=Ke(l,z),[W,Y]=v.useState(null),[K,ee]=v.useState(null),te=Rh(r),[se,ce]=v.useState(!1),A=v.useRef(!1);v.useEffect(()=>{if(k)return lu(k)},[k]),No();const U=v.useCallback(ue=>{const[ie,...Se]=te().map(Pe=>Pe.ref.current),[Me]=Se.slice(-1),_e=document.activeElement;for(const Pe of ue)if(Pe===_e||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===ie&&_&&(_.scrollTop=0),Pe===Me&&_&&(_.scrollTop=_.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==_e))return},[te,_]),ae=v.useCallback(()=>U([W,k]),[U,W,k]);v.useEffect(()=>{se&&ae()},[se,ae]);const{onOpenChange:Z,triggerPointerDownPosRef:T}=D;v.useEffect(()=>{if(k){let ue={x:0,y:0};const ie=tt(Me=>{var _e,Pe;ue={x:Math.abs(Math.round(Me.pageX)-(((_e=T.current)==null?void 0:_e.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((Pe=T.current)==null?void 0:Pe.y)??0))}},"handlePointerMove"),Se=tt(Me=>{ue.x<=10&&ue.y<=10?Me.preventDefault():Me.composedPath().includes(k)||Z(!1),document.removeEventListener("pointermove",ie),T.current=null},"handlePointerUp");return T.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",Se,{capture:!0})}}},[k,Z,T]),v.useEffect(()=>{const ue=tt(()=>Z(!1),"close");return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[Z]);const[R,V]=Oh(ue=>{const ie=te().filter(_e=>!_e.disabled),Se=ie.find(_e=>_e.ref.current===document.activeElement),Me=Th(ie,ue,Se);Me&&setTimeout(()=>{var _e;return(_e=Me.ref.current)==null?void 0:_e.focus()})}),X=v.useCallback((ue,ie,Se)=>{const Me=!A.current&&!Se;(D.value!==void 0&&D.value===ie||Me)&&(Y(ue),Me&&(A.current=!0))},[D.value]),le=v.useCallback(()=>k==null?void 0:k.focus(),[k]),re=v.useCallback((ue,ie,Se)=>{const Me=!A.current&&!Se;(D.value!==void 0&&D.value===ie||Me)&&ee(ue)},[D.value]),fe=i==="popper"?Py:WR,ve=fe===Py?{side:g,sideOffset:p,align:x,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:C,sticky:j,hideWhenDetached:N,avoidCollisions:E}:{};return c.jsx(wS,{scope:r,content:k,viewport:_,onViewportChange:H,itemRefCallback:X,selectedItem:W,onItemLeave:le,itemTextRefCallback:re,focusSelectedItem:ae,selectedItemText:K,position:i,isPositioned:se,searchRef:R,children:c.jsx(Ws,{as:YR,allowPinchZoom:!0,children:c.jsx(tu,{asChild:!0,trapped:D.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:we(u,ue=>{var ie;(ie=D.trigger)==null||ie.focus({preventScroll:!0}),ue.preventDefault()}),children:c.jsx(eu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>D.onOpenChange(!1),children:c.jsx(fe,{role:"listbox",id:D.contentId,"data-state":D.open?"open":"closed",dir:D.dir,onContextMenu:ue=>ue.preventDefault(),...O,...ve,onPlaced:()=>ce(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:we(O.onKeyDown,ue=>{const ie=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!ie&&ue.key.length===1&&V(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let Me=te().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const _e=ue.target,Pe=Me.indexOf(_e);Me=Me.slice(Pe+1)}setTimeout(()=>U(Me)),ue.preventDefault()}})})})})})})},"SelectContentImpl")),WR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,onPlaced:i,...u}=a,f=Vl(pr,r),m=hu(pr,r),[g,p]=v.useState(null),[x,y]=v.useState(null),w=Ke(l,y),b=Rh(r),C=v.useRef(!1),j=v.useRef(!0),{viewport:N,selectedItem:E,selectedItemText:O,focusSelectedItem:D}=m,k=v.useCallback(()=>{if(f.trigger&&f.valueNode&&g&&x&&N&&E&&O){const L=f.trigger.getBoundingClientRect(),W=x.getBoundingClientRect(),Y=f.valueNode.getBoundingClientRect(),K=O.getBoundingClientRect();if(f.dir!=="rtl"){const _e=K.left-W.left,Pe=Y.left-_e,ot=L.left-Pe,kt=L.width+ot,un=Math.max(kt,W.width),Xn=window.innerWidth-$n,Qn=Um(Pe,[$n,Math.max($n,Xn-un)]);g.style.minWidth=kt+"px",g.style.left=Qn+"px"}else{const _e=W.right-K.right,Pe=window.innerWidth-Y.right-_e,ot=window.innerWidth-L.right-Pe,kt=L.width+ot,un=Math.max(kt,W.width),Xn=window.innerWidth-$n,Qn=Um(Pe,[$n,Math.max($n,Xn-un)]);g.style.minWidth=kt+"px",g.style.right=Qn+"px"}const ee=b(),te=window.innerHeight-$n*2,se=N.scrollHeight,ce=window.getComputedStyle(x),A=parseInt(ce.borderTopWidth,10),U=parseInt(ce.paddingTop,10),ae=parseInt(ce.borderBottomWidth,10),Z=parseInt(ce.paddingBottom,10),T=A+U+se+Z+ae,R=Math.min(E.offsetHeight*5,T),V=window.getComputedStyle(N),X=parseInt(V.paddingTop,10),le=parseInt(V.paddingBottom,10),re=L.top+L.height/2-$n,fe=te-re,ve=E.offsetHeight/2,ue=E.offsetTop+ve,ie=A+U+ue,Se=T-ie;if(ie<=re){const _e=ee.length>0&&E===ee[ee.length-1].ref.current;g.style.bottom="0px";const Pe=x.clientHeight-N.offsetTop-N.offsetHeight,ot=Math.max(fe,ve+(_e?le:0)+Pe+ae),kt=ie+ot;g.style.height=kt+"px"}else{const _e=ee.length>0&&E===ee[0].ref.current;g.style.top="0px";const ot=Math.max(re,A+N.offsetTop+(_e?X:0)+ve)+Se;g.style.height=ot+"px",N.scrollTop=ie-re+N.offsetTop}g.style.margin=`${$n}px 0`,g.style.minHeight=R+"px",g.style.maxHeight=te+"px",i==null||i(),requestAnimationFrame(()=>C.current=!0)}},[b,f.trigger,f.valueNode,g,x,N,E,O,f.dir,i]);_t(()=>k(),[k]);const[z,_]=v.useState();_t(()=>{x&&_(window.getComputedStyle(x).zIndex)},[x]);const H=v.useCallback(L=>{L&&j.current===!0&&(k(),D==null||D(),j.current=!1)},[k,D]);return c.jsx(KR,{scope:r,contentWrapper:g,shouldExpandOnScrollRef:C,onScrollButtonChange:H,children:c.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:c.jsx(Ge.div,{...u,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),Py=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,align:i="start",collisionPadding:u=$n,...f}=a,m=Eh(r);return c.jsx(gh,{...m,...f,ref:l,align:i,collisionPadding:u,style:{boxSizing:"border-box",...f.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[KR,XR]=br(pr,{}),Hy="SelectViewport",QR=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,nonce:i,...u}=a,f=hu(Hy,r),m=XR(Hy,r),g=Ke(l,f.onViewportChange),p=v.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),c.jsx(mu.Slot,{scope:r,children:c.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:g,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:we(u.onScroll,x=>{const y=x.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:b}=m;if(b!=null&&b.current&&w){const C=Math.abs(p.current-y.scrollTop);if(C>0){const j=window.innerHeight-$n*2,N=parseFloat(w.style.minHeight),E=parseFloat(w.style.height),O=Math.max(N,E);if(O<j){const D=O+C,k=Math.min(j,D),z=D-k;w.style.height=k+"px",w.style.bottom==="0px"&&(y.scrollTop=z>0?z:0,w.style.justifyContent="flex-end")}}}p.current=y.scrollTop})})})]})},"SelectViewport")),ZR="SelectGroup",[xz,yz]=br(ZR),Im="SelectItem",[JR,CS]=br(Im),eE=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,value:i,disabled:u=!1,textValue:f,...m}=a,g=Vl(Im,r),p=hu(Im,r),x=g.value===i,[y,w]=v.useState(f??""),[b,C]=v.useState(!1),j=jt(k=>{var z;return(z=p.itemRefCallback)==null?void 0:z.call(p,k,i,u)}),N=Ke(l,j),E=Fn(),O=v.useRef("touch"),D=tt(()=>{u||(g.onValueChange(i),g.onOpenChange(!1))},"handleSelect");return c.jsx(JR,{scope:r,value:i,disabled:u,textId:E,isSelected:x,onItemTextChange:v.useCallback(k=>{w(z=>z||((k==null?void 0:k.textContent)??"").trim())},[]),children:c.jsx(mu.ItemSlot,{scope:r,value:i,disabled:u,textValue:y,children:c.jsx(Ge.div,{role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":x&&b,"data-state":x?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...m,ref:N,onFocus:we(m.onFocus,()=>C(!0)),onBlur:we(m.onBlur,()=>C(!1)),onClick:we(m.onClick,()=>{O.current!=="mouse"&&D()}),onPointerUp:we(m.onPointerUp,()=>{O.current==="mouse"&&D()}),onPointerDown:we(m.onPointerDown,k=>{O.current=k.pointerType}),onPointerMove:we(m.onPointerMove,k=>{var z;O.current=k.pointerType,u?(z=p.onItemLeave)==null||z.call(p):O.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(m.onPointerLeave,k=>{var z;k.currentTarget===document.activeElement&&((z=p.onItemLeave)==null||z.call(p))}),onKeyDown:we(m.onKeyDown,k=>{var _;u||k.target!==k.currentTarget||((_=p.searchRef)==null?void 0:_.current)!==""&&k.key===" "||(RR.includes(k.key)&&D(),k.key===" "&&k.preventDefault())})})})})},"SelectItem")),kc="SelectItemText",tE=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,className:i,style:u,...f}=a,m=Vl(kc,r),g=hu(kc,r),p=CS(kc,r),x=kR(kc,r),[y,w]=v.useState(null),b=jt(D=>{var k;return(k=g.itemTextRefCallback)==null?void 0:k.call(g,D,p.value,p.disabled)}),C=Ke(l,w,p.onItemTextChange,b),j=y==null?void 0:y.textContent,N=v.useMemo(()=>c.jsx("option",{value:p.value,disabled:p.disabled,children:j},p.value),[p.disabled,p.value,j]),{onNativeOptionAdd:E,onNativeOptionRemove:O}=x;return _t(()=>(E(N),()=>O(N)),[E,O,N]),c.jsxs(c.Fragment,{children:[c.jsx(Ge.span,{id:p.textId,...f,ref:C}),p.isSelected&&m.valueNode&&!m.valueNodeHasChildren&&!Xs(m.value)?Gs.createPortal(f.children,m.valueNode):null]})},"SelectItemText")),nE="SelectItemIndicator",aE=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,...i}=a;return CS(nE,r).isSelected?c.jsx(Ge.span,{"aria-hidden":!0,...i,ref:l}):null},"SelectItemIndicator")),lE=v.forwardRef(tt(function(a,l){const{__scopeSelect:r,...i}=a;return c.jsx(Ge.div,{"aria-hidden":!0,...i,ref:l})},"SelectSeparator")),rE="SelectBubbleInput",oE=v.forwardRef(tt(function({__scopeSelect:a,...l},r){const i=Vl(rE,a),{value:u,onValueChange:f,required:m,disabled:g,name:p,autoComplete:x,form:y}=i,{nativeOptions:w,nativeSelectKey:b}=i,C=v.useRef(null),j=Ke(r,C),N=u??"",E=wh(N),O=Array.from(w).some(D=>(D.props.value??"")==="");return v.useEffect(()=>{const D=C.current;if(!D)return;const k=window.HTMLSelectElement.prototype,_=Object.getOwnPropertyDescriptor(k,"value").set;if(E!==N&&_){const H=new Event("change",{bubbles:!0});_.call(D,N),D.dispatchEvent(H)}},[E,N]),c.jsxs(Ge.select,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:x,disabled:g,form:y,onChange:D=>f(D.target.value),...l,style:{...yN,...l.style},ref:j,defaultValue:N,children:[Xs(u)&&!O?c.jsx("option",{value:""}):null,Array.from(w)]},b)},"SelectBubbleInput"));function jS(e){return typeof e=="function"}tt(jS,"isFunction");function Xs(e){return e===""||e===void 0}tt(Xs,"shouldShowPlaceholder");function Oh(e){const a=jt(e),l=v.useRef(""),r=v.useRef(0),i=v.useCallback(f=>{const m=l.current+f;a(m),tt((function g(p){l.current=p,window.clearTimeout(r.current),p!==""&&(r.current=window.setTimeout(()=>g(""),1e3))}),"updateSearch")(m)},[a]),u=v.useCallback(()=>{l.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[l,i,u]}tt(Oh,"useTypeaheadSearch");function Th(e,a,l){const i=a.length>1&&Array.from(a).every(p=>p===a[0])?a[0]:a,u=l?e.indexOf(l):-1;let f=NS(e,Math.max(u,0));i.length===1&&(f=f.filter(p=>p!==l));const g=f.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return g!==l?g:void 0}tt(Th,"findNextItem");function NS(e,a){return e.map((l,r)=>e[(a+r)%e.length])}tt(NS,"wrapArray");const Bl=j2,Ul=N2,Ja=v.forwardRef(({className:e,sideOffset:a=4,...l},r)=>c.jsx(M2,{children:c.jsx(_2,{ref:r,sideOffset:a,className:Te("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in",e),...l})}));Ja.displayName="DropdownMenuContent";const mt=v.forwardRef(({className:e,inset:a,...l},r)=>c.jsx(R2,{ref:r,className:Te("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",a&&"pl-8",e),...l}));mt.displayName="DropdownMenuItem";const sE=v.forwardRef(({className:e,children:a,checked:l,...r},i)=>c.jsxs(E2,{ref:i,className:Te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:l,...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(O2,{children:c.jsx(x0,{className:"h-4 w-4"})})}),a]}));sE.displayName="DropdownMenuCheckboxItem";const iE=v.forwardRef(({className:e,inset:a,...l},r)=>c.jsx(D2,{ref:r,className:Te("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",e),...l}));iE.displayName="DropdownMenuLabel";const Oo=v.forwardRef(({className:e,...a},l)=>c.jsx(T2,{ref:l,className:Te("-mx-1 my-1 h-px bg-muted",e),...a}));Oo.displayName="DropdownMenuSeparator";function cE(){const{setTheme:e}=QC();return c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsxs(oe,{variant:"outline",size:"icon",className:"size-8",children:[c.jsx(ny,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(ty,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>e("light"),children:[c.jsx(ny,{className:"mr-2 h-4 w-4"})," Light"]}),c.jsxs(mt,{onClick:()=>e("dark"),children:[c.jsx(ty,{className:"mr-2 h-4 w-4"})," Dark"]}),c.jsxs(mt,{onClick:()=>e("system"),children:[c.jsx(mj,{className:"mr-2 h-4 w-4"})," System"]})]})]})}const Nt=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("rounded-xl border bg-card text-card-foreground",e),...a}));Nt.displayName="Card";const Kt=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("flex flex-col space-y-1.5 p-6",e),...a}));Kt.displayName="CardHeader";const Xt=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("font-semibold leading-none tracking-tight",e),...a}));Xt.displayName="CardTitle";const uE=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("text-sm text-muted-foreground",e),...a}));uE.displayName="CardDescription";const Mt=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("p-6 pt-0",e),...a}));Mt.displayName="CardContent";const dE=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{ref:l,className:Te("flex items-center p-6 pt-0",e),...a}));dE.displayName="CardFooter";function Fy(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s ago`;const l=Math.floor(a/60);if(l<60)return`${l}m ago`;const r=Math.floor(l/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function fE(e){return{pending:"bg-yellow-500",in_progress:"bg-blue-500",completed:"bg-green-500",failed:"bg-red-500",cancelled:"bg-gray-400"}[e]||"bg-gray-400"}function mE({stats:e}){const[a,l]=v.useState([]),[r,i]=v.useState([]);v.useEffect(()=>{fetch("/api/tasks?limit=8").then(m=>m.json()).then(l),fetch("/api/activity?limit=10").then(m=>m.json()).then(i).catch(()=>{})},[]);const u=e.total_tasks>0?Math.round(e.completed/e.total_tasks*100):0,f=[{label:"Total Tasks",value:e.total_tasks,icon:fj,color:"text-foreground"},{label:"Pending",value:e.pending,icon:b0,color:"text-yellow-500"},{label:"In Progress",value:e.in_progress,icon:vo,color:"text-blue-500"},{label:"Completed",value:e.completed,icon:po,color:"text-green-500"},{label:"Failed",value:e.failed,icon:oj,color:"text-red-500"},{label:"Cancelled",value:e.cancelled,icon:aj,color:"text-muted-foreground"},{label:"Projects",value:e.projects,icon:Zc,color:"text-purple-500"},{label:"Agents",value:e.agents,icon:Us,color:"text-orange-500"}];return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:f.map(m=>c.jsxs(Nt,{children:[c.jsxs(Kt,{className:"flex flex-row items-center justify-between space-y-0 pb-2 p-4",children:[c.jsx(Xt,{className:"text-sm font-medium text-muted-foreground",children:m.label}),c.jsx(m.icon,{className:`size-4 ${m.color}`})]}),c.jsx(Mt,{className:"p-4 pt-0",children:c.jsx("div",{className:"text-2xl font-bold",children:m.value})})]},m.label))}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(vj,{className:"size-4 text-green-500"})," Completion Rate"]})}),c.jsxs(Mt,{children:[c.jsxs("div",{className:"text-3xl font-bold",children:[u,"%"]}),c.jsx("div",{className:"mt-2 h-2 rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:"h-full rounded-full bg-green-500 transition-all",style:{width:`${u}%`}})}),c.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[e.completed," of ",e.total_tasks," tasks completed"]})]})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(tj,{className:"size-4 text-blue-500"})," Recent Activity"]})}),c.jsx(Mt,{children:a.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No recent tasks."}):c.jsx("div",{className:"space-y-2",children:a.map(m=>c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${fE(m.status)}`}),c.jsx("span",{className:"truncate flex-1",children:m.title}),c.jsx("span",{className:"text-muted-foreground shrink-0",children:Fy(m.updated_at)})]},m.id))})})]})]}),r.length>0&&c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(ij,{className:"size-4 text-purple-500"})," Audit Log"]})}),c.jsx(Mt,{children:c.jsx("div",{className:"space-y-1.5",children:r.map(m=>c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx("code",{className:"text-muted-foreground shrink-0",children:m.task_id.slice(0,8)}),c.jsx("span",{className:"font-medium",children:m.action}),m.field&&c.jsx("span",{className:"text-muted-foreground",children:m.field}),m.old_value&&m.new_value&&c.jsxs("span",{className:"text-muted-foreground",children:[m.old_value," → ",m.new_value]}),m.agent_id&&c.jsxs("span",{className:"text-muted-foreground",children:["by ",m.agent_id]}),c.jsx("span",{className:"text-muted-foreground ml-auto shrink-0",children:Fy(m.created_at)})]},m.id))})})]})]})}/**
|
|
315
|
+
* table-core
|
|
316
|
+
*
|
|
317
|
+
* Copyright (c) TanStack
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the MIT license found in the
|
|
320
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
321
|
+
*
|
|
322
|
+
* @license MIT
|
|
323
|
+
*/function Dl(e,a){return typeof e=="function"?e(a):e}function jn(e,a){return l=>{a.setState(r=>({...r,[e]:Dl(l,r[e])}))}}function gu(e){return e instanceof Function}function hE(e){return Array.isArray(e)&&e.every(a=>typeof a=="number")}function gE(e,a){const l=[],r=i=>{i.forEach(u=>{l.push(u);const f=a(u);f!=null&&f.length&&r(f)})};return r(e),l}function je(e,a,l){let r=[],i;return u=>{let f;l.key&&l.debug&&(f=Date.now());const m=e(u);if(!(m.length!==r.length||m.some((x,y)=>r[y]!==x)))return i;r=m;let p;if(l.key&&l.debug&&(p=Date.now()),i=a(...m),l==null||l.onChange==null||l.onChange(i),l.key&&l.debug&&l!=null&&l.debug()){const x=Math.round((Date.now()-f)*100)/100,y=Math.round((Date.now()-p)*100)/100,w=y/16,b=(C,j)=>{for(C=String(C);C.length<j;)C=" "+C;return C};console.info(`%c⏱ ${b(y,5)} /${b(x,5)} ms`,`
|
|
324
|
+
font-size: .6rem;
|
|
325
|
+
font-weight: bold;
|
|
326
|
+
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,l==null?void 0:l.key)}return i}}function Ne(e,a,l,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[a]},key:!1,onChange:r}}function pE(e,a,l,r){const i=()=>{var f;return(f=u.getValue())!=null?f:e.options.renderFallbackValue},u={id:`${a.id}_${l.id}`,row:a,column:l,getValue:()=>a.getValue(r),renderValue:i,getContext:je(()=>[e,l,a,u],(f,m,g,p)=>({table:f,column:m,row:g,cell:p,getValue:p.getValue,renderValue:p.renderValue}),Ne(e.options,"debugCells"))};return e._features.forEach(f=>{f.createCell==null||f.createCell(u,l,a,e)},{}),u}function vE(e,a,l,r){var i,u;const m={...e._getDefaultColumnDef(),...a},g=m.accessorKey;let p=(i=(u=m.id)!=null?u:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?i:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:g&&(g.includes(".")?x=w=>{let b=w;for(const j of g.split(".")){var C;b=(C=b)==null?void 0:C[j]}return b}:x=w=>w[m.accessorKey]),!p)throw new Error;let y={id:`${String(p)}`,accessorFn:x,parent:r,depth:l,columnDef:m,columns:[],getFlatColumns:je(()=>[!0],()=>{var w;return[y,...(w=y.columns)==null?void 0:w.flatMap(b=>b.getFlatColumns())]},Ne(e.options,"debugColumns")),getLeafColumns:je(()=>[e._getOrderColumnsFn()],w=>{var b;if((b=y.columns)!=null&&b.length){let C=y.columns.flatMap(j=>j.getLeafColumns());return w(C)}return[y]},Ne(e.options,"debugColumns"))};for(const w of e._features)w.createColumn==null||w.createColumn(y,e);return y}const It="debugHeaders";function Ly(e,a,l){var r;let u={id:(r=l.id)!=null?r:a.id,column:a,index:l.index,isPlaceholder:!!l.isPlaceholder,placeholderId:l.placeholderId,depth:l.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const f=[],m=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(m),f.push(g)};return m(u),f},getContext:()=>({table:e,header:u,column:a})};return e._features.forEach(f=>{f.createHeader==null||f.createHeader(u,e)}),u}const xE={createTable:e=>{e.getHeaderGroups=je(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(a,l,r,i)=>{var u,f;const m=(u=r==null?void 0:r.map(y=>l.find(w=>w.id===y)).filter(Boolean))!=null?u:[],g=(f=i==null?void 0:i.map(y=>l.find(w=>w.id===y)).filter(Boolean))!=null?f:[],p=l.filter(y=>!(r!=null&&r.includes(y.id))&&!(i!=null&&i.includes(y.id)));return Ac(a,[...m,...p,...g],e)},Ne(e.options,It)),e.getCenterHeaderGroups=je(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(a,l,r,i)=>(l=l.filter(u=>!(r!=null&&r.includes(u.id))&&!(i!=null&&i.includes(u.id))),Ac(a,l,e,"center")),Ne(e.options,It)),e.getLeftHeaderGroups=je(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(a,l,r)=>{var i;const u=(i=r==null?void 0:r.map(f=>l.find(m=>m.id===f)).filter(Boolean))!=null?i:[];return Ac(a,u,e,"left")},Ne(e.options,It)),e.getRightHeaderGroups=je(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(a,l,r)=>{var i;const u=(i=r==null?void 0:r.map(f=>l.find(m=>m.id===f)).filter(Boolean))!=null?i:[];return Ac(a,u,e,"right")},Ne(e.options,It)),e.getFooterGroups=je(()=>[e.getHeaderGroups()],a=>[...a].reverse(),Ne(e.options,It)),e.getLeftFooterGroups=je(()=>[e.getLeftHeaderGroups()],a=>[...a].reverse(),Ne(e.options,It)),e.getCenterFooterGroups=je(()=>[e.getCenterHeaderGroups()],a=>[...a].reverse(),Ne(e.options,It)),e.getRightFooterGroups=je(()=>[e.getRightHeaderGroups()],a=>[...a].reverse(),Ne(e.options,It)),e.getFlatHeaders=je(()=>[e.getHeaderGroups()],a=>a.map(l=>l.headers).flat(),Ne(e.options,It)),e.getLeftFlatHeaders=je(()=>[e.getLeftHeaderGroups()],a=>a.map(l=>l.headers).flat(),Ne(e.options,It)),e.getCenterFlatHeaders=je(()=>[e.getCenterHeaderGroups()],a=>a.map(l=>l.headers).flat(),Ne(e.options,It)),e.getRightFlatHeaders=je(()=>[e.getRightHeaderGroups()],a=>a.map(l=>l.headers).flat(),Ne(e.options,It)),e.getCenterLeafHeaders=je(()=>[e.getCenterFlatHeaders()],a=>a.filter(l=>{var r;return!((r=l.subHeaders)!=null&&r.length)}),Ne(e.options,It)),e.getLeftLeafHeaders=je(()=>[e.getLeftFlatHeaders()],a=>a.filter(l=>{var r;return!((r=l.subHeaders)!=null&&r.length)}),Ne(e.options,It)),e.getRightLeafHeaders=je(()=>[e.getRightFlatHeaders()],a=>a.filter(l=>{var r;return!((r=l.subHeaders)!=null&&r.length)}),Ne(e.options,It)),e.getLeafHeaders=je(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(a,l,r)=>{var i,u,f,m,g,p;return[...(i=(u=a[0])==null?void 0:u.headers)!=null?i:[],...(f=(m=l[0])==null?void 0:m.headers)!=null?f:[],...(g=(p=r[0])==null?void 0:p.headers)!=null?g:[]].map(x=>x.getLeafHeaders()).flat()},Ne(e.options,It))}};function Ac(e,a,l,r){var i,u;let f=0;const m=function(w,b){b===void 0&&(b=1),f=Math.max(f,b),w.filter(C=>C.getIsVisible()).forEach(C=>{var j;(j=C.columns)!=null&&j.length&&m(C.columns,b+1)},0)};m(e);let g=[];const p=(w,b)=>{const C={depth:b,id:[r,`${b}`].filter(Boolean).join("_"),headers:[]},j=[];w.forEach(N=>{const E=[...j].reverse()[0],O=N.column.depth===C.depth;let D,k=!1;if(O&&N.column.parent?D=N.column.parent:(D=N.column,k=!0),E&&(E==null?void 0:E.column)===D)E.subHeaders.push(N);else{const z=Ly(l,D,{id:[r,b,D.id,N==null?void 0:N.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${j.filter(_=>_.column===D).length}`:void 0,depth:b,index:j.length});z.subHeaders.push(N),j.push(z)}C.headers.push(N),N.headerGroup=C}),g.push(C),b>0&&p(j,b-1)},x=a.map((w,b)=>Ly(l,w,{depth:f,index:b}));p(x,f-1),g.reverse();const y=w=>w.filter(C=>C.column.getIsVisible()).map(C=>{let j=0,N=0,E=[0];C.subHeaders&&C.subHeaders.length?(E=[],y(C.subHeaders).forEach(D=>{let{colSpan:k,rowSpan:z}=D;j+=k,E.push(z)})):j=1;const O=Math.min(...E);return N=N+O,C.colSpan=j,C.rowSpan=N,{colSpan:j,rowSpan:N}});return y((i=(u=g[0])==null?void 0:u.headers)!=null?i:[]),g}const kh=(e,a,l,r,i,u,f)=>{let m={id:a,index:r,original:l,depth:i,parentId:f,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(m._valuesCache.hasOwnProperty(g))return m._valuesCache[g];const p=e.getColumn(g);if(p!=null&&p.accessorFn)return m._valuesCache[g]=p.accessorFn(m.original,r),m._valuesCache[g]},getUniqueValues:g=>{if(m._uniqueValuesCache.hasOwnProperty(g))return m._uniqueValuesCache[g];const p=e.getColumn(g);if(p!=null&&p.accessorFn)return p.columnDef.getUniqueValues?(m._uniqueValuesCache[g]=p.columnDef.getUniqueValues(m.original,r),m._uniqueValuesCache[g]):(m._uniqueValuesCache[g]=[m.getValue(g)],m._uniqueValuesCache[g])},renderValue:g=>{var p;return(p=m.getValue(g))!=null?p:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>gE(m.subRows,g=>g.subRows),getParentRow:()=>m.parentId?e.getRow(m.parentId,!0):void 0,getParentRows:()=>{let g=[],p=m;for(;;){const x=p.getParentRow();if(!x)break;g.push(x),p=x}return g.reverse()},getAllCells:je(()=>[e.getAllLeafColumns()],g=>g.map(p=>pE(e,m,p,p.id)),Ne(e.options,"debugRows")),_getAllCellsByColumnId:je(()=>[m.getAllCells()],g=>g.reduce((p,x)=>(p[x.column.id]=x,p),{}),Ne(e.options,"debugRows"))};for(let g=0;g<e._features.length;g++){const p=e._features[g];p==null||p.createRow==null||p.createRow(m,e)}return m},yE={createColumn:(e,a)=>{e._getFacetedRowModel=a.options.getFacetedRowModel&&a.options.getFacetedRowModel(a,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():a.getPreFilteredRowModel(),e._getFacetedUniqueValues=a.options.getFacetedUniqueValues&&a.options.getFacetedUniqueValues(a,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=a.options.getFacetedMinMaxValues&&a.options.getFacetedMinMaxValues(a,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},MS=(e,a,l)=>{var r,i;const u=l==null||(r=l.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(a))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(u))};MS.autoRemove=e=>Yn(e);const _S=(e,a,l)=>{var r;return!!(!((r=e.getValue(a))==null||(r=r.toString())==null)&&r.includes(l))};_S.autoRemove=e=>Yn(e);const DS=(e,a,l)=>{var r;return((r=e.getValue(a))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(l==null?void 0:l.toLowerCase())};DS.autoRemove=e=>Yn(e);const RS=(e,a,l)=>{var r;return(r=e.getValue(a))==null?void 0:r.includes(l)};RS.autoRemove=e=>Yn(e);const ES=(e,a,l)=>!l.some(r=>{var i;return!((i=e.getValue(a))!=null&&i.includes(r))});ES.autoRemove=e=>Yn(e)||!(e!=null&&e.length);const OS=(e,a,l)=>l.some(r=>{var i;return(i=e.getValue(a))==null?void 0:i.includes(r)});OS.autoRemove=e=>Yn(e)||!(e!=null&&e.length);const TS=(e,a,l)=>e.getValue(a)===l;TS.autoRemove=e=>Yn(e);const kS=(e,a,l)=>e.getValue(a)==l;kS.autoRemove=e=>Yn(e);const Ah=(e,a,l)=>{let[r,i]=l;const u=e.getValue(a);return u>=r&&u<=i};Ah.resolveFilterValue=e=>{let[a,l]=e,r=typeof a!="number"?parseFloat(a):a,i=typeof l!="number"?parseFloat(l):l,u=a===null||Number.isNaN(r)?-1/0:r,f=l===null||Number.isNaN(i)?1/0:i;if(u>f){const m=u;u=f,f=m}return[u,f]};Ah.autoRemove=e=>Yn(e)||Yn(e[0])&&Yn(e[1]);const Va={includesString:MS,includesStringSensitive:_S,equalsString:DS,arrIncludes:RS,arrIncludesAll:ES,arrIncludesSome:OS,equals:TS,weakEquals:kS,inNumberRange:Ah};function Yn(e){return e==null||e===""}const bE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:jn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,a)=>{e.getAutoFilterFn=()=>{const l=a.getCoreRowModel().flatRows[0],r=l==null?void 0:l.getValue(e.id);return typeof r=="string"?Va.includesString:typeof r=="number"?Va.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Va.equals:Array.isArray(r)?Va.arrIncludes:Va.weakEquals},e.getFilterFn=()=>{var l,r;return gu(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(l=(r=a.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?l:Va[e.columnDef.filterFn]},e.getCanFilter=()=>{var l,r,i;return((l=e.columnDef.enableColumnFilter)!=null?l:!0)&&((r=a.options.enableColumnFilters)!=null?r:!0)&&((i=a.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var l;return(l=a.getState().columnFilters)==null||(l=l.find(r=>r.id===e.id))==null?void 0:l.value},e.getFilterIndex=()=>{var l,r;return(l=(r=a.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?l:-1},e.setFilterValue=l=>{a.setColumnFilters(r=>{const i=e.getFilterFn(),u=r==null?void 0:r.find(x=>x.id===e.id),f=Dl(l,u?u.value:void 0);if(Vy(i,f,e)){var m;return(m=r==null?void 0:r.filter(x=>x.id!==e.id))!=null?m:[]}const g={id:e.id,value:f};if(u){var p;return(p=r==null?void 0:r.map(x=>x.id===e.id?g:x))!=null?p:[]}return r!=null&&r.length?[...r,g]:[g]})}},createRow:(e,a)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=a=>{const l=e.getAllLeafColumns(),r=i=>{var u;return(u=Dl(a,i))==null?void 0:u.filter(f=>{const m=l.find(g=>g.id===f.id);if(m){const g=m.getFilterFn();if(Vy(g,f.value,m))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=a=>{var l,r;e.setColumnFilters(a?[]:(l=(r=e.initialState)==null?void 0:r.columnFilters)!=null?l:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Vy(e,a,l){return(e&&e.autoRemove?e.autoRemove(a,l):!1)||typeof a>"u"||typeof a=="string"&&!a}const SE=(e,a,l)=>l.reduce((r,i)=>{const u=i.getValue(e);return r+(typeof u=="number"?u:0)},0),wE=(e,a,l)=>{let r;return l.forEach(i=>{const u=i.getValue(e);u!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}),r},CE=(e,a,l)=>{let r;return l.forEach(i=>{const u=i.getValue(e);u!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}),r},jE=(e,a,l)=>{let r,i;return l.forEach(u=>{const f=u.getValue(e);f!=null&&(r===void 0?f>=f&&(r=i=f):(r>f&&(r=f),i<f&&(i=f)))}),[r,i]},NE=(e,a)=>{let l=0,r=0;if(a.forEach(i=>{let u=i.getValue(e);u!=null&&(u=+u)>=u&&(++l,r+=u)}),l)return r/l},ME=(e,a)=>{if(!a.length)return;const l=a.map(u=>u.getValue(e));if(!hE(l))return;if(l.length===1)return l[0];const r=Math.floor(l.length/2),i=l.sort((u,f)=>u-f);return l.length%2!==0?i[r]:(i[r-1]+i[r])/2},_E=(e,a)=>Array.from(new Set(a.map(l=>l.getValue(e))).values()),DE=(e,a)=>new Set(a.map(l=>l.getValue(e))).size,RE=(e,a)=>a.length,sm={sum:SE,min:wE,max:CE,extent:jE,mean:NE,median:ME,unique:_E,uniqueCount:DE,count:RE},EE={getDefaultColumnDef:()=>({aggregatedCell:e=>{var a,l;return(a=(l=e.getValue())==null||l.toString==null?void 0:l.toString())!=null?a:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:jn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,a)=>{e.toggleGrouping=()=>{a.setGrouping(l=>l!=null&&l.includes(e.id)?l.filter(r=>r!==e.id):[...l??[],e.id])},e.getCanGroup=()=>{var l,r;return((l=e.columnDef.enableGrouping)!=null?l:!0)&&((r=a.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var l;return(l=a.getState().grouping)==null?void 0:l.includes(e.id)},e.getGroupedIndex=()=>{var l;return(l=a.getState().grouping)==null?void 0:l.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const l=e.getCanGroup();return()=>{l&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const l=a.getCoreRowModel().flatRows[0],r=l==null?void 0:l.getValue(e.id);if(typeof r=="number")return sm.sum;if(Object.prototype.toString.call(r)==="[object Date]")return sm.extent},e.getAggregationFn=()=>{var l,r;if(!e)throw new Error;return gu(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(l=(r=a.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?l:sm[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=a=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(a),e.resetGrouping=a=>{var l,r;e.setGrouping(a?[]:(l=(r=e.initialState)==null?void 0:r.grouping)!=null?l:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,a)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=l=>{if(e._groupingValuesCache.hasOwnProperty(l))return e._groupingValuesCache[l];const r=a.getColumn(l);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[l]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[l]):e.getValue(l)},e._groupingValuesCache={}},createCell:(e,a,l,r)=>{e.getIsGrouped=()=>a.getIsGrouped()&&a.id===l.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&a.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=l.subRows)!=null&&i.length)}}};function OE(e,a,l){if(!(a!=null&&a.length)||!l)return e;const r=e.filter(u=>!a.includes(u.id));return l==="remove"?r:[...a.map(u=>e.find(f=>f.id===u)).filter(Boolean),...r]}const TE={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:jn("columnOrder",e)}),createColumn:(e,a)=>{e.getIndex=je(l=>[ks(a,l)],l=>l.findIndex(r=>r.id===e.id),Ne(a.options,"debugColumns")),e.getIsFirstColumn=l=>{var r;return((r=ks(a,l)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=l=>{var r;const i=ks(a,l);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=a=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(a),e.resetColumnOrder=a=>{var l;e.setColumnOrder(a?[]:(l=e.initialState.columnOrder)!=null?l:[])},e._getOrderColumnsFn=je(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(a,l,r)=>i=>{let u=[];if(!(a!=null&&a.length))u=i;else{const f=[...a],m=[...i];for(;m.length&&f.length;){const g=f.shift(),p=m.findIndex(x=>x.id===g);p>-1&&u.push(m.splice(p,1)[0])}u=[...u,...m]}return OE(u,l,r)},Ne(e.options,"debugTable"))}},im=()=>({left:[],right:[]}),kE={getInitialState:e=>({columnPinning:im(),...e}),getDefaultOptions:e=>({onColumnPinningChange:jn("columnPinning",e)}),createColumn:(e,a)=>{e.pin=l=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);a.setColumnPinning(i=>{var u,f;if(l==="right"){var m,g;return{left:((m=i==null?void 0:i.left)!=null?m:[]).filter(y=>!(r!=null&&r.includes(y))),right:[...((g=i==null?void 0:i.right)!=null?g:[]).filter(y=>!(r!=null&&r.includes(y))),...r]}}if(l==="left"){var p,x;return{left:[...((p=i==null?void 0:i.left)!=null?p:[]).filter(y=>!(r!=null&&r.includes(y))),...r],right:((x=i==null?void 0:i.right)!=null?x:[]).filter(y=>!(r!=null&&r.includes(y)))}}return{left:((u=i==null?void 0:i.left)!=null?u:[]).filter(y=>!(r!=null&&r.includes(y))),right:((f=i==null?void 0:i.right)!=null?f:[]).filter(y=>!(r!=null&&r.includes(y)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,u,f;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((u=(f=a.options.enableColumnPinning)!=null?f:a.options.enablePinning)!=null?u:!0)}),e.getIsPinned=()=>{const l=e.getLeafColumns().map(m=>m.id),{left:r,right:i}=a.getState().columnPinning,u=l.some(m=>r==null?void 0:r.includes(m)),f=l.some(m=>i==null?void 0:i.includes(m));return u?"left":f?"right":!1},e.getPinnedIndex=()=>{var l,r;const i=e.getIsPinned();return i?(l=(r=a.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?l:-1:0}},createRow:(e,a)=>{e.getCenterVisibleCells=je(()=>[e._getAllVisibleCells(),a.getState().columnPinning.left,a.getState().columnPinning.right],(l,r,i)=>{const u=[...r??[],...i??[]];return l.filter(f=>!u.includes(f.column.id))},Ne(a.options,"debugRows")),e.getLeftVisibleCells=je(()=>[e._getAllVisibleCells(),a.getState().columnPinning.left],(l,r)=>(r??[]).map(u=>l.find(f=>f.column.id===u)).filter(Boolean).map(u=>({...u,position:"left"})),Ne(a.options,"debugRows")),e.getRightVisibleCells=je(()=>[e._getAllVisibleCells(),a.getState().columnPinning.right],(l,r)=>(r??[]).map(u=>l.find(f=>f.column.id===u)).filter(Boolean).map(u=>({...u,position:"right"})),Ne(a.options,"debugRows"))},createTable:e=>{e.setColumnPinning=a=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(a),e.resetColumnPinning=a=>{var l,r;return e.setColumnPinning(a?im():(l=(r=e.initialState)==null?void 0:r.columnPinning)!=null?l:im())},e.getIsSomeColumnsPinned=a=>{var l;const r=e.getState().columnPinning;if(!a){var i,u;return!!((i=r.left)!=null&&i.length||(u=r.right)!=null&&u.length)}return!!((l=r[a])!=null&&l.length)},e.getLeftLeafColumns=je(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(a,l)=>(l??[]).map(r=>a.find(i=>i.id===r)).filter(Boolean),Ne(e.options,"debugColumns")),e.getRightLeafColumns=je(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(a,l)=>(l??[]).map(r=>a.find(i=>i.id===r)).filter(Boolean),Ne(e.options,"debugColumns")),e.getCenterLeafColumns=je(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(a,l,r)=>{const i=[...l??[],...r??[]];return a.filter(u=>!i.includes(u.id))},Ne(e.options,"debugColumns"))}};function AE(e){return e||(typeof document<"u"?document:null)}const zc={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},cm=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),zE={getDefaultColumnDef:()=>zc,getInitialState:e=>({columnSizing:{},columnSizingInfo:cm(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:jn("columnSizing",e),onColumnSizingInfoChange:jn("columnSizingInfo",e)}),createColumn:(e,a)=>{e.getSize=()=>{var l,r,i;const u=a.getState().columnSizing[e.id];return Math.min(Math.max((l=e.columnDef.minSize)!=null?l:zc.minSize,(r=u??e.columnDef.size)!=null?r:zc.size),(i=e.columnDef.maxSize)!=null?i:zc.maxSize)},e.getStart=je(l=>[l,ks(a,l),a.getState().columnSizing],(l,r)=>r.slice(0,e.getIndex(l)).reduce((i,u)=>i+u.getSize(),0),Ne(a.options,"debugColumns")),e.getAfter=je(l=>[l,ks(a,l),a.getState().columnSizing],(l,r)=>r.slice(e.getIndex(l)+1).reduce((i,u)=>i+u.getSize(),0),Ne(a.options,"debugColumns")),e.resetSize=()=>{a.setColumnSizing(l=>{let{[e.id]:r,...i}=l;return i})},e.getCanResize=()=>{var l,r;return((l=e.columnDef.enableResizing)!=null?l:!0)&&((r=a.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>a.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,a)=>{e.getSize=()=>{let l=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var u;l+=(u=i.column.getSize())!=null?u:0}};return r(e),l},e.getStart=()=>{if(e.index>0){const l=e.headerGroup.headers[e.index-1];return l.getStart()+l.getSize()}return 0},e.getResizeHandler=l=>{const r=a.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return u=>{if(!r||!i||(u.persist==null||u.persist(),um(u)&&u.touches&&u.touches.length>1))return;const f=e.getSize(),m=e?e.getLeafHeaders().map(E=>[E.column.id,E.column.getSize()]):[[r.id,r.getSize()]],g=um(u)?Math.round(u.touches[0].clientX):u.clientX,p={},x=(E,O)=>{typeof O=="number"&&(a.setColumnSizingInfo(D=>{var k,z;const _=a.options.columnResizeDirection==="rtl"?-1:1,H=(O-((k=D==null?void 0:D.startOffset)!=null?k:0))*_,L=Math.max(H/((z=D==null?void 0:D.startSize)!=null?z:0),-.999999);return D.columnSizingStart.forEach(W=>{let[Y,K]=W;p[Y]=Math.round(Math.max(K+K*L,0)*100)/100}),{...D,deltaOffset:H,deltaPercentage:L}}),(a.options.columnResizeMode==="onChange"||E==="end")&&a.setColumnSizing(D=>({...D,...p})))},y=E=>x("move",E),w=E=>{x("end",E),a.setColumnSizingInfo(O=>({...O,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},b=AE(l),C={moveHandler:E=>y(E.clientX),upHandler:E=>{b==null||b.removeEventListener("mousemove",C.moveHandler),b==null||b.removeEventListener("mouseup",C.upHandler),w(E.clientX)}},j={moveHandler:E=>(E.cancelable&&(E.preventDefault(),E.stopPropagation()),y(E.touches[0].clientX),!1),upHandler:E=>{var O;b==null||b.removeEventListener("touchmove",j.moveHandler),b==null||b.removeEventListener("touchend",j.upHandler),E.cancelable&&(E.preventDefault(),E.stopPropagation()),w((O=E.touches[0])==null?void 0:O.clientX)}},N=PE()?{passive:!1}:!1;um(u)?(b==null||b.addEventListener("touchmove",j.moveHandler,N),b==null||b.addEventListener("touchend",j.upHandler,N)):(b==null||b.addEventListener("mousemove",C.moveHandler,N),b==null||b.addEventListener("mouseup",C.upHandler,N)),a.setColumnSizingInfo(E=>({...E,startOffset:g,startSize:f,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=a=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(a),e.setColumnSizingInfo=a=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(a),e.resetColumnSizing=a=>{var l;e.setColumnSizing(a?{}:(l=e.initialState.columnSizing)!=null?l:{})},e.resetHeaderSizeInfo=a=>{var l;e.setColumnSizingInfo(a?cm():(l=e.initialState.columnSizingInfo)!=null?l:cm())},e.getTotalSize=()=>{var a,l;return(a=(l=e.getHeaderGroups()[0])==null?void 0:l.headers.reduce((r,i)=>r+i.getSize(),0))!=null?a:0},e.getLeftTotalSize=()=>{var a,l;return(a=(l=e.getLeftHeaderGroups()[0])==null?void 0:l.headers.reduce((r,i)=>r+i.getSize(),0))!=null?a:0},e.getCenterTotalSize=()=>{var a,l;return(a=(l=e.getCenterHeaderGroups()[0])==null?void 0:l.headers.reduce((r,i)=>r+i.getSize(),0))!=null?a:0},e.getRightTotalSize=()=>{var a,l;return(a=(l=e.getRightHeaderGroups()[0])==null?void 0:l.headers.reduce((r,i)=>r+i.getSize(),0))!=null?a:0}}};let Pc=null;function PE(){if(typeof Pc=="boolean")return Pc;let e=!1;try{const a={get passive(){return e=!0,!1}},l=()=>{};window.addEventListener("test",l,a),window.removeEventListener("test",l)}catch{e=!1}return Pc=e,Pc}function um(e){return e.type==="touchstart"}const HE={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:jn("columnVisibility",e)}),createColumn:(e,a)=>{e.toggleVisibility=l=>{e.getCanHide()&&a.setColumnVisibility(r=>({...r,[e.id]:l??!e.getIsVisible()}))},e.getIsVisible=()=>{var l,r;const i=e.columns;return(l=i.length?i.some(u=>u.getIsVisible()):(r=a.getState().columnVisibility)==null?void 0:r[e.id])!=null?l:!0},e.getCanHide=()=>{var l,r;return((l=e.columnDef.enableHiding)!=null?l:!0)&&((r=a.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>l=>{e.toggleVisibility==null||e.toggleVisibility(l.target.checked)}},createRow:(e,a)=>{e._getAllVisibleCells=je(()=>[e.getAllCells(),a.getState().columnVisibility],l=>l.filter(r=>r.column.getIsVisible()),Ne(a.options,"debugRows")),e.getVisibleCells=je(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(l,r,i)=>[...l,...r,...i],Ne(a.options,"debugRows"))},createTable:e=>{const a=(l,r)=>je(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(u=>u.getIsVisible==null?void 0:u.getIsVisible()),Ne(e.options,"debugColumns"));e.getVisibleFlatColumns=a("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=a("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=a("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=a("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=a("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=l=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(l),e.resetColumnVisibility=l=>{var r;e.setColumnVisibility(l?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=l=>{var r;l=(r=l)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,u)=>({...i,[u.id]:l||!(u.getCanHide!=null&&u.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(l=>!(l.getIsVisible!=null&&l.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(l=>l.getIsVisible==null?void 0:l.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>l=>{var r;e.toggleAllColumnsVisible((r=l.target)==null?void 0:r.checked)}}};function ks(e,a){return a?a==="center"?e.getCenterVisibleLeafColumns():a==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const FE={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},LE={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:jn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:a=>{var l;const r=(l=e.getCoreRowModel().flatRows[0])==null||(l=l._getAllCellsByColumnId()[a.id])==null?void 0:l.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,a)=>{e.getCanGlobalFilter=()=>{var l,r,i,u;return((l=e.columnDef.enableGlobalFilter)!=null?l:!0)&&((r=a.options.enableGlobalFilter)!=null?r:!0)&&((i=a.options.enableFilters)!=null?i:!0)&&((u=a.options.getColumnCanGlobalFilter==null?void 0:a.options.getColumnCanGlobalFilter(e))!=null?u:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Va.includesString,e.getGlobalFilterFn=()=>{var a,l;const{globalFilterFn:r}=e.options;return gu(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(a=(l=e.options.filterFns)==null?void 0:l[r])!=null?a:Va[r]},e.setGlobalFilter=a=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(a)},e.resetGlobalFilter=a=>{e.setGlobalFilter(a?void 0:e.initialState.globalFilter)}}},VE={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:jn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let a=!1,l=!1;e._autoResetExpanded=()=>{var r,i;if(!a){e._queue(()=>{a=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(l)return;l=!0,e._queue(()=>{e.resetExpanded(),l=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,u;e.setExpanded(r?{}:(i=(u=e.initialState)==null?void 0:u.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(u=>{const f=u.split(".");r=Math.max(r,f.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,a)=>{e.toggleExpanded=l=>{a.setExpanded(r=>{var i;const u=r===!0?!0:!!(r!=null&&r[e.id]);let f={};if(r===!0?Object.keys(a.getRowModel().rowsById).forEach(m=>{f[m]=!0}):f=r,l=(i=l)!=null?i:!u,!u&&l)return{...f,[e.id]:!0};if(u&&!l){const{[e.id]:m,...g}=f;return g}return r})},e.getIsExpanded=()=>{var l;const r=a.getState().expanded;return!!((l=a.options.getIsRowExpanded==null?void 0:a.options.getIsRowExpanded(e))!=null?l:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var l,r,i;return(l=a.options.getRowCanExpand==null?void 0:a.options.getRowCanExpand(e))!=null?l:((r=a.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let l=!0,r=e;for(;l&&r.parentId;)r=a.getRow(r.parentId,!0),l=r.getIsExpanded();return l},e.getToggleExpandedHandler=()=>{const l=e.getCanExpand();return()=>{l&&e.toggleExpanded()}}}},$m=0,Gm=10,dm=()=>({pageIndex:$m,pageSize:Gm}),BE={getInitialState:e=>({...e,pagination:{...dm(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:jn("pagination",e)}),createTable:e=>{let a=!1,l=!1;e._autoResetPageIndex=()=>{var r,i;if(!a){e._queue(()=>{a=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(l)return;l=!0,e._queue(()=>{e.resetPageIndex(),l=!1})}},e.setPagination=r=>{const i=u=>Dl(r,u);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?dm():(i=e.initialState.pagination)!=null?i:dm())},e.setPageIndex=r=>{e.setPagination(i=>{let u=Dl(r,i.pageIndex);const f=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return u=Math.max(0,Math.min(u,f)),{...i,pageIndex:u}})},e.resetPageIndex=r=>{var i,u;e.setPageIndex(r?$m:(i=(u=e.initialState)==null||(u=u.pagination)==null?void 0:u.pageIndex)!=null?i:$m)},e.resetPageSize=r=>{var i,u;e.setPageSize(r?Gm:(i=(u=e.initialState)==null||(u=u.pagination)==null?void 0:u.pageSize)!=null?i:Gm)},e.setPageSize=r=>{e.setPagination(i=>{const u=Math.max(1,Dl(r,i.pageSize)),f=i.pageSize*i.pageIndex,m=Math.floor(f/u);return{...i,pageIndex:m,pageSize:u}})},e.setPageCount=r=>e.setPagination(i=>{var u;let f=Dl(r,(u=e.options.pageCount)!=null?u:-1);return typeof f=="number"&&(f=Math.max(-1,f)),{...i,pageCount:f}}),e.getPageOptions=je(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((u,f)=>f)),i},Ne(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},fm=()=>({top:[],bottom:[]}),UE={getInitialState:e=>({rowPinning:fm(),...e}),getDefaultOptions:e=>({onRowPinningChange:jn("rowPinning",e)}),createRow:(e,a)=>{e.pin=(l,r,i)=>{const u=r?e.getLeafRows().map(g=>{let{id:p}=g;return p}):[],f=i?e.getParentRows().map(g=>{let{id:p}=g;return p}):[],m=new Set([...f,e.id,...u]);a.setRowPinning(g=>{var p,x;if(l==="bottom"){var y,w;return{top:((y=g==null?void 0:g.top)!=null?y:[]).filter(j=>!(m!=null&&m.has(j))),bottom:[...((w=g==null?void 0:g.bottom)!=null?w:[]).filter(j=>!(m!=null&&m.has(j))),...Array.from(m)]}}if(l==="top"){var b,C;return{top:[...((b=g==null?void 0:g.top)!=null?b:[]).filter(j=>!(m!=null&&m.has(j))),...Array.from(m)],bottom:((C=g==null?void 0:g.bottom)!=null?C:[]).filter(j=>!(m!=null&&m.has(j)))}}return{top:((p=g==null?void 0:g.top)!=null?p:[]).filter(j=>!(m!=null&&m.has(j))),bottom:((x=g==null?void 0:g.bottom)!=null?x:[]).filter(j=>!(m!=null&&m.has(j)))}})},e.getCanPin=()=>{var l;const{enableRowPinning:r,enablePinning:i}=a.options;return typeof r=="function"?r(e):(l=r??i)!=null?l:!0},e.getIsPinned=()=>{const l=[e.id],{top:r,bottom:i}=a.getState().rowPinning,u=l.some(m=>r==null?void 0:r.includes(m)),f=l.some(m=>i==null?void 0:i.includes(m));return u?"top":f?"bottom":!1},e.getPinnedIndex=()=>{var l,r;const i=e.getIsPinned();if(!i)return-1;const u=(l=i==="top"?a.getTopRows():a.getBottomRows())==null?void 0:l.map(f=>{let{id:m}=f;return m});return(r=u==null?void 0:u.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=a=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(a),e.resetRowPinning=a=>{var l,r;return e.setRowPinning(a?fm():(l=(r=e.initialState)==null?void 0:r.rowPinning)!=null?l:fm())},e.getIsSomeRowsPinned=a=>{var l;const r=e.getState().rowPinning;if(!a){var i,u;return!!((i=r.top)!=null&&i.length||(u=r.bottom)!=null&&u.length)}return!!((l=r[a])!=null&&l.length)},e._getPinnedRows=(a,l,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(l??[]).map(f=>{const m=e.getRow(f,!0);return m.getIsAllParentsExpanded()?m:null}):(l??[]).map(f=>a.find(m=>m.id===f))).filter(Boolean).map(f=>({...f,position:r}))},e.getTopRows=je(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(a,l)=>e._getPinnedRows(a,l,"top"),Ne(e.options,"debugRows")),e.getBottomRows=je(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(a,l)=>e._getPinnedRows(a,l,"bottom"),Ne(e.options,"debugRows")),e.getCenterRows=je(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(a,l,r)=>{const i=new Set([...l??[],...r??[]]);return a.filter(u=>!i.has(u.id))},Ne(e.options,"debugRows"))}},IE={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:jn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=a=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(a),e.resetRowSelection=a=>{var l;return e.setRowSelection(a?{}:(l=e.initialState.rowSelection)!=null?l:{})},e.toggleAllRowsSelected=a=>{e.setRowSelection(l=>{a=typeof a<"u"?a:!e.getIsAllRowsSelected();const r={...l},i=e.getPreGroupedRowModel().flatRows;return a?i.forEach(u=>{u.getCanSelect()&&(r[u.id]=!0)}):i.forEach(u=>{delete r[u.id]}),r})},e.toggleAllPageRowsSelected=a=>e.setRowSelection(l=>{const r=typeof a<"u"?a:!e.getIsAllPageRowsSelected(),i={...l};return e.getRowModel().rows.forEach(u=>{Ym(i,u.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=je(()=>[e.getState().rowSelection,e.getCoreRowModel()],(a,l)=>Object.keys(a).length?mm(e,l):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getFilteredSelectedRowModel=je(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(a,l)=>Object.keys(a).length?mm(e,l):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getGroupedSelectedRowModel=je(()=>[e.getState().rowSelection,e.getSortedRowModel()],(a,l)=>Object.keys(a).length?mm(e,l):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const a=e.getFilteredRowModel().flatRows,{rowSelection:l}=e.getState();let r=!!(a.length&&Object.keys(l).length);return r&&a.some(i=>i.getCanSelect()&&!l[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const a=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:l}=e.getState();let r=!!a.length;return r&&a.some(i=>!l[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var a;const l=Object.keys((a=e.getState().rowSelection)!=null?a:{}).length;return l>0&&l<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const a=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:a.filter(l=>l.getCanSelect()).some(l=>l.getIsSelected()||l.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>a=>{e.toggleAllRowsSelected(a.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>a=>{e.toggleAllPageRowsSelected(a.target.checked)}},createRow:(e,a)=>{e.toggleSelected=(l,r)=>{const i=e.getIsSelected();a.setRowSelection(u=>{var f;if(l=typeof l<"u"?l:!i,e.getCanSelect()&&i===l)return u;const m={...u};return Ym(m,e.id,l,(f=r==null?void 0:r.selectChildren)!=null?f:!0,a),m})},e.getIsSelected=()=>{const{rowSelection:l}=a.getState();return zh(e,l)},e.getIsSomeSelected=()=>{const{rowSelection:l}=a.getState();return qm(e,l)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:l}=a.getState();return qm(e,l)==="all"},e.getCanSelect=()=>{var l;return typeof a.options.enableRowSelection=="function"?a.options.enableRowSelection(e):(l=a.options.enableRowSelection)!=null?l:!0},e.getCanSelectSubRows=()=>{var l;return typeof a.options.enableSubRowSelection=="function"?a.options.enableSubRowSelection(e):(l=a.options.enableSubRowSelection)!=null?l:!0},e.getCanMultiSelect=()=>{var l;return typeof a.options.enableMultiRowSelection=="function"?a.options.enableMultiRowSelection(e):(l=a.options.enableMultiRowSelection)!=null?l:!0},e.getToggleSelectedHandler=()=>{const l=e.getCanSelect();return r=>{var i;l&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Ym=(e,a,l,r,i)=>{var u;const f=i.getRow(a,!0);l?(f.getCanMultiSelect()||Object.keys(e).forEach(m=>delete e[m]),f.getCanSelect()&&(e[a]=!0)):delete e[a],r&&(u=f.subRows)!=null&&u.length&&f.getCanSelectSubRows()&&f.subRows.forEach(m=>Ym(e,m.id,l,r,i))};function mm(e,a){const l=e.getState().rowSelection,r=[],i={},u=function(f,m){return f.map(g=>{var p;const x=zh(g,l);if(x&&(r.push(g),i[g.id]=g),(p=g.subRows)!=null&&p.length&&(g={...g,subRows:u(g.subRows)}),x)return g}).filter(Boolean)};return{rows:u(a.rows),flatRows:r,rowsById:i}}function zh(e,a){var l;return(l=a[e.id])!=null?l:!1}function qm(e,a,l){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,u=!1;return e.subRows.forEach(f=>{if(!(u&&!i)&&(f.getCanSelect()&&(zh(f,a)?u=!0:i=!1),f.subRows&&f.subRows.length)){const m=qm(f,a);m==="all"?u=!0:(m==="some"&&(u=!0),i=!1)}}),i?"all":u?"some":!1}const Wm=/([0-9]+)/gm,$E=(e,a,l)=>AS(zl(e.getValue(l)).toLowerCase(),zl(a.getValue(l)).toLowerCase()),GE=(e,a,l)=>AS(zl(e.getValue(l)),zl(a.getValue(l))),YE=(e,a,l)=>Ph(zl(e.getValue(l)).toLowerCase(),zl(a.getValue(l)).toLowerCase()),qE=(e,a,l)=>Ph(zl(e.getValue(l)),zl(a.getValue(l))),WE=(e,a,l)=>{const r=e.getValue(l),i=a.getValue(l);return r>i?1:r<i?-1:0},KE=(e,a,l)=>Ph(e.getValue(l),a.getValue(l));function Ph(e,a){return e===a?0:e>a?1:-1}function zl(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function AS(e,a){const l=e.split(Wm).filter(Boolean),r=a.split(Wm).filter(Boolean);for(;l.length&&r.length;){const i=l.shift(),u=r.shift(),f=parseInt(i,10),m=parseInt(u,10),g=[f,m].sort();if(isNaN(g[0])){if(i>u)return 1;if(u>i)return-1;continue}if(isNaN(g[1]))return isNaN(f)?-1:1;if(f>m)return 1;if(m>f)return-1}return l.length-r.length}const Ds={alphanumeric:$E,alphanumericCaseSensitive:GE,text:YE,textCaseSensitive:qE,datetime:WE,basic:KE},XE={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:jn("sorting",e),isMultiSortEvent:a=>a.shiftKey}),createColumn:(e,a)=>{e.getAutoSortingFn=()=>{const l=a.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of l){const u=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(u)==="[object Date]")return Ds.datetime;if(typeof u=="string"&&(r=!0,u.split(Wm).length>1))return Ds.alphanumeric}return r?Ds.text:Ds.basic},e.getAutoSortDir=()=>{const l=a.getFilteredRowModel().flatRows[0];return typeof(l==null?void 0:l.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var l,r;if(!e)throw new Error;return gu(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(l=(r=a.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?l:Ds[e.columnDef.sortingFn]},e.toggleSorting=(l,r)=>{const i=e.getNextSortingOrder(),u=typeof l<"u"&&l!==null;a.setSorting(f=>{const m=f==null?void 0:f.find(b=>b.id===e.id),g=f==null?void 0:f.findIndex(b=>b.id===e.id);let p=[],x,y=u?l:i==="desc";if(f!=null&&f.length&&e.getCanMultiSort()&&r?m?x="toggle":x="add":f!=null&&f.length&&g!==f.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(u||i||(x="remove")),x==="add"){var w;p=[...f,{id:e.id,desc:y}],p.splice(0,p.length-((w=a.options.maxMultiSortColCount)!=null?w:Number.MAX_SAFE_INTEGER))}else x==="toggle"?p=f.map(b=>b.id===e.id?{...b,desc:y}:b):x==="remove"?p=f.filter(b=>b.id!==e.id):p=[{id:e.id,desc:y}];return p})},e.getFirstSortDir=()=>{var l,r;return((l=(r=e.columnDef.sortDescFirst)!=null?r:a.options.sortDescFirst)!=null?l:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=l=>{var r,i;const u=e.getFirstSortDir(),f=e.getIsSorted();return f?f!==u&&((r=a.options.enableSortingRemoval)==null||r)&&(!(l&&(i=a.options.enableMultiRemove)!=null)||i)?!1:f==="desc"?"asc":"desc":u},e.getCanSort=()=>{var l,r;return((l=e.columnDef.enableSorting)!=null?l:!0)&&((r=a.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var l,r;return(l=(r=e.columnDef.enableMultiSort)!=null?r:a.options.enableMultiSort)!=null?l:!!e.accessorFn},e.getIsSorted=()=>{var l;const r=(l=a.getState().sorting)==null?void 0:l.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var l,r;return(l=(r=a.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?l:-1},e.clearSorting=()=>{a.setSorting(l=>l!=null&&l.length?l.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const l=e.getCanSort();return r=>{l&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?a.options.isMultiSortEvent==null?void 0:a.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=a=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(a),e.resetSorting=a=>{var l,r;e.setSorting(a?[]:(l=(r=e.initialState)==null?void 0:r.sorting)!=null?l:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},QE=[xE,HE,TE,kE,yE,bE,FE,LE,XE,EE,VE,BE,UE,IE,zE];function ZE(e){var a,l;const r=[...QE,...(a=e._features)!=null?a:[]];let i={_features:r};const u=i._features.reduce((w,b)=>Object.assign(w,b.getDefaultOptions==null?void 0:b.getDefaultOptions(i)),{}),f=w=>i.options.mergeOptions?i.options.mergeOptions(u,w):{...u,...w};let g={...{},...(l=e.initialState)!=null?l:{}};i._features.forEach(w=>{var b;g=(b=w.getInitialState==null?void 0:w.getInitialState(g))!=null?b:g});const p=[];let x=!1;const y={_features:r,options:{...u,...e},initialState:g,_queue:w=>{p.push(w),x||(x=!0,Promise.resolve().then(()=>{for(;p.length;)p.shift()();x=!1}).catch(b=>setTimeout(()=>{throw b})))},reset:()=>{i.setState(i.initialState)},setOptions:w=>{const b=Dl(w,i.options);i.options=f(b)},getState:()=>i.options.state,setState:w=>{i.options.onStateChange==null||i.options.onStateChange(w)},_getRowId:(w,b,C)=>{var j;return(j=i.options.getRowId==null?void 0:i.options.getRowId(w,b,C))!=null?j:`${C?[C.id,b].join("."):b}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(w,b)=>{let C=(b?i.getPrePaginationRowModel():i.getRowModel()).rowsById[w];if(!C&&(C=i.getCoreRowModel().rowsById[w],!C))throw new Error;return C},_getDefaultColumnDef:je(()=>[i.options.defaultColumn],w=>{var b;return w=(b=w)!=null?b:{},{header:C=>{const j=C.header.column.columnDef;return j.accessorKey?j.accessorKey:j.accessorFn?j.id:null},cell:C=>{var j,N;return(j=(N=C.renderValue())==null||N.toString==null?void 0:N.toString())!=null?j:null},...i._features.reduce((C,j)=>Object.assign(C,j.getDefaultColumnDef==null?void 0:j.getDefaultColumnDef()),{}),...w}},Ne(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:je(()=>[i._getColumnDefs()],w=>{const b=function(C,j,N){return N===void 0&&(N=0),C.map(E=>{const O=vE(i,E,N,j),D=E;return O.columns=D.columns?b(D.columns,O,N+1):[],O})};return b(w)},Ne(e,"debugColumns")),getAllFlatColumns:je(()=>[i.getAllColumns()],w=>w.flatMap(b=>b.getFlatColumns()),Ne(e,"debugColumns")),_getAllFlatColumnsById:je(()=>[i.getAllFlatColumns()],w=>w.reduce((b,C)=>(b[C.id]=C,b),{}),Ne(e,"debugColumns")),getAllLeafColumns:je(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(w,b)=>{let C=w.flatMap(j=>j.getLeafColumns());return b(C)},Ne(e,"debugColumns")),getColumn:w=>i._getAllFlatColumnsById()[w]};Object.assign(i,y);for(let w=0;w<i._features.length;w++){const b=i._features[w];b==null||b.createTable==null||b.createTable(i)}return i}function pu(){return e=>je(()=>[e.options.data],a=>{const l={rows:[],flatRows:[],rowsById:{}},r=function(i,u,f){u===void 0&&(u=0);const m=[];for(let p=0;p<i.length;p++){const x=kh(e,e._getRowId(i[p],p,f),i[p],p,u,void 0,f==null?void 0:f.id);if(l.flatRows.push(x),l.rowsById[x.id]=x,m.push(x),e.options.getSubRows){var g;x.originalSubRows=e.options.getSubRows(i[p],p),(g=x.originalSubRows)!=null&&g.length&&(x.subRows=r(x.originalSubRows,u+1,x))}}return m};return l.rows=r(a),l},Ne(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function JE(e){const a=[],l=r=>{var i;a.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(l)};return e.rows.forEach(l),{rows:a,flatRows:e.flatRows,rowsById:e.rowsById}}function eO(e,a,l){return l.options.filterFromLeafRows?tO(e,a,l):nO(e,a,l)}function tO(e,a,l){var r;const i=[],u={},f=(r=l.options.maxLeafRowFilterDepth)!=null?r:100,m=function(g,p){p===void 0&&(p=0);const x=[];for(let w=0;w<g.length;w++){var y;let b=g[w];const C=kh(l,b.id,b.original,b.index,b.depth,void 0,b.parentId);if(C.columnFilters=b.columnFilters,(y=b.subRows)!=null&&y.length&&p<f){if(C.subRows=m(b.subRows,p+1),b=C,a(b)&&!C.subRows.length){x.push(b),u[b.id]=b,i.push(b);continue}if(a(b)||C.subRows.length){x.push(b),u[b.id]=b,i.push(b);continue}}else b=C,a(b)&&(x.push(b),u[b.id]=b,i.push(b))}return x};return{rows:m(e),flatRows:i,rowsById:u}}function nO(e,a,l){var r;const i=[],u={},f=(r=l.options.maxLeafRowFilterDepth)!=null?r:100,m=function(g,p){p===void 0&&(p=0);const x=[];for(let w=0;w<g.length;w++){let b=g[w];if(a(b)){var y;if((y=b.subRows)!=null&&y.length&&p<f){const j=kh(l,b.id,b.original,b.index,b.depth,void 0,b.parentId);j.subRows=m(b.subRows,p+1),b=j}x.push(b),i.push(b),u[b.id]=b}}return x};return{rows:m(e),flatRows:i,rowsById:u}}function vu(){return e=>je(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(a,l,r)=>{if(!a.rows.length||!(l!=null&&l.length)&&!r){for(let w=0;w<a.flatRows.length;w++)a.flatRows[w].columnFilters={},a.flatRows[w].columnFiltersMeta={};return a}const i=[],u=[];(l??[]).forEach(w=>{var b;const C=e.getColumn(w.id);if(!C)return;const j=C.getFilterFn();j&&i.push({id:w.id,filterFn:j,resolvedValue:(b=j.resolveFilterValue==null?void 0:j.resolveFilterValue(w.value))!=null?b:w.value})});const f=(l??[]).map(w=>w.id),m=e.getGlobalFilterFn(),g=e.getAllLeafColumns().filter(w=>w.getCanGlobalFilter());r&&m&&g.length&&(f.push("__global__"),g.forEach(w=>{var b;u.push({id:w.id,filterFn:m,resolvedValue:(b=m.resolveFilterValue==null?void 0:m.resolveFilterValue(r))!=null?b:r})}));let p,x;for(let w=0;w<a.flatRows.length;w++){const b=a.flatRows[w];if(b.columnFilters={},i.length)for(let C=0;C<i.length;C++){p=i[C];const j=p.id;b.columnFilters[j]=p.filterFn(b,j,p.resolvedValue,N=>{b.columnFiltersMeta[j]=N})}if(u.length){for(let C=0;C<u.length;C++){x=u[C];const j=x.id;if(x.filterFn(b,j,x.resolvedValue,N=>{b.columnFiltersMeta[j]=N})){b.columnFilters.__global__=!0;break}}b.columnFilters.__global__!==!0&&(b.columnFilters.__global__=!1)}}const y=w=>{for(let b=0;b<f.length;b++)if(w.columnFilters[f[b]]===!1)return!1;return!0};return eO(a.rows,y,e)},Ne(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function xu(e){return a=>je(()=>[a.getState().pagination,a.getPrePaginationRowModel(),a.options.paginateExpandedRows?void 0:a.getState().expanded],(l,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:u}=l;let{rows:f,flatRows:m,rowsById:g}=r;const p=i*u,x=p+i;f=f.slice(p,x);let y;a.options.paginateExpandedRows?y={rows:f,flatRows:m,rowsById:g}:y=JE({rows:f,flatRows:m,rowsById:g}),y.flatRows=[];const w=b=>{y.flatRows.push(b),b.subRows.length&&b.subRows.forEach(w)};return y.rows.forEach(w),y},Ne(a.options,"debugTable"))}function yu(){return e=>je(()=>[e.getState().sorting,e.getPreSortedRowModel()],(a,l)=>{if(!l.rows.length||!(a!=null&&a.length))return l;const r=e.getState().sorting,i=[],u=r.filter(g=>{var p;return(p=e.getColumn(g.id))==null?void 0:p.getCanSort()}),f={};u.forEach(g=>{const p=e.getColumn(g.id);p&&(f[g.id]={sortUndefined:p.columnDef.sortUndefined,invertSorting:p.columnDef.invertSorting,sortingFn:p.getSortingFn()})});const m=g=>{const p=g.map(x=>({...x}));return p.sort((x,y)=>{for(let b=0;b<u.length;b+=1){var w;const C=u[b],j=f[C.id],N=j.sortUndefined,E=(w=C==null?void 0:C.desc)!=null?w:!1;let O=0;if(N){const D=x.getValue(C.id),k=y.getValue(C.id),z=D===void 0,_=k===void 0;if(z||_){if(N==="first")return z?-1:1;if(N==="last")return z?1:-1;O=z&&_?0:z?N:-N}}if(O===0&&(O=j.sortingFn(x,y,C.id)),O!==0)return E&&(O*=-1),j.invertSorting&&(O*=-1),O}return x.index-y.index}),p.forEach(x=>{var y;i.push(x),(y=x.subRows)!=null&&y.length&&(x.subRows=m(x.subRows))}),p};return{rows:m(l.rows),flatRows:i,rowsById:l.rowsById}},Ne(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
327
|
+
* react-table
|
|
328
|
+
*
|
|
329
|
+
* Copyright (c) TanStack
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the MIT license found in the
|
|
332
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
333
|
+
*
|
|
334
|
+
* @license MIT
|
|
335
|
+
*/function Pl(e,a){return e?aO(e)?v.createElement(e,a):e:null}function aO(e){return lO(e)||typeof e=="function"||rO(e)}function lO(e){return typeof e=="function"&&(()=>{const a=Object.getPrototypeOf(e);return a.prototype&&a.prototype.isReactComponent})()}function rO(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function bu(e){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[l]=v.useState(()=>({current:ZE(a)})),[r,i]=v.useState(()=>l.current.initialState);return l.current.setOptions(u=>({...u,...e,state:{...r,...e.state},onStateChange:f=>{i(f),e.onStateChange==null||e.onStateChange(f)}})),l.current}const oO=N0("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Gt({className:e,variant:a,...l}){return c.jsx("div",{className:Te(oO({variant:a}),e),...l})}const Zt=v.forwardRef(({className:e,type:a,...l},r)=>c.jsx("input",{type:a,className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",e),ref:r,...l}));Zt.displayName="Input";const Qs=v.forwardRef(({className:e,...a},l)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:l,className:Te("w-full caption-bottom text-sm",e),...a})}));Qs.displayName="Table";const Zs=v.forwardRef(({className:e,...a},l)=>c.jsx("thead",{ref:l,className:Te("[&_tr]:border-b",e),...a}));Zs.displayName="TableHeader";const Js=v.forwardRef(({className:e,...a},l)=>c.jsx("tbody",{ref:l,className:Te("[&_tr:last-child]:border-0",e),...a}));Js.displayName="TableBody";const sO=v.forwardRef(({className:e,...a},l)=>c.jsx("tfoot",{ref:l,className:Te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));sO.displayName="TableFooter";const Sn=v.forwardRef(({className:e,...a},l)=>c.jsx("tr",{ref:l,className:Te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));Sn.displayName="TableRow";const ei=v.forwardRef(({className:e,...a},l)=>c.jsx("th",{ref:l,className:Te("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));ei.displayName="TableHead";const Wa=v.forwardRef(({className:e,...a},l)=>c.jsx("td",{ref:l,className:Te("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));Wa.displayName="TableCell";const iO=v.forwardRef(({className:e,...a},l)=>c.jsx("caption",{ref:l,className:Te("mt-4 text-sm text-muted-foreground",e),...a}));iO.displayName="TableCaption";const wn=AR,Cn=FR,sn=v.forwardRef(({className:e,children:a,...l},r)=>c.jsxs(PR,{ref:r,className:Te("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...l,children:[a,c.jsx(LR,{asChild:!0,children:c.jsx(y0,{className:"size-4 opacity-50"})})]}));sn.displayName="SelectTrigger";const cn=v.forwardRef(({className:e,children:a,position:l="popper",...r},i)=>c.jsx(IR,{children:c.jsx($R,{ref:i,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in",l==="popper"&&"translate-y-1",e),position:l,...r,children:c.jsx(QR,{className:Te("p-1",l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a})})}));cn.displayName="SelectContent";const Ee=v.forwardRef(({className:e,children:a,...l},r)=>c.jsxs(eE,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,children:[c.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(aE,{children:c.jsx(x0,{className:"h-4 w-4"})})}),c.jsx(tE,{children:a})]}));Ee.displayName="SelectItem";const cO=v.forwardRef(({className:e,...a},l)=>c.jsx(lE,{ref:l,className:Te("-mx-1 my-1 h-px bg-muted",e),...a}));cO.displayName="SelectSeparator";const ha=HM,uO=LM,zS=v.forwardRef(({className:e,...a},l)=>c.jsx(VM,{ref:l,className:Te("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out",e),...a}));zS.displayName="DialogOverlay";const qn=v.forwardRef(({className:e,children:a,...l},r)=>c.jsxs(uO,{children:[c.jsx(zS,{}),c.jsxs(IM,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out sm:rounded-lg",e),...l,children:[a,c.jsxs(QM,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Qm,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));qn.displayName="DialogContent";const el=({className:e,...a})=>c.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...a}),ti=({className:e,...a})=>c.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a}),pa=v.forwardRef(({className:e,...a},l)=>c.jsx(qM,{ref:l,className:Te("text-lg font-semibold leading-none tracking-tight",e),...a}));pa.displayName="DialogTitle";const dO=v.forwardRef(({className:e,...a},l)=>c.jsx(KM,{ref:l,className:Te("text-sm text-muted-foreground",e),...a}));dO.displayName="DialogDescription";function By(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s`;const l=Math.floor(a/60);if(l<60)return`${l}m`;const r=Math.floor(l/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}const Uy={critical:{border:"border-l-red-500",dot:"bg-red-500",label:"Critical"},high:{border:"border-l-orange-500",dot:"bg-orange-500",label:"High"},medium:{border:"border-l-blue-500",dot:"bg-blue-500",label:"Medium"},low:{border:"border-l-gray-400",dot:"bg-gray-400",label:"Low"}},Iy={pending:{text:"text-yellow-500",bg:"bg-yellow-500"},in_progress:{text:"text-blue-500",bg:"bg-blue-500"},completed:{text:"text-green-500",bg:"bg-green-500"},failed:{text:"text-red-500",bg:"bg-red-500"},cancelled:{text:"text-gray-400",bg:"bg-gray-400"}},$y=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-pink-500","bg-teal-500","bg-indigo-500","bg-red-500"];function fO(e){let a=0;for(const l of e)a=(a<<5)-a+l.charCodeAt(0)|0;return $y[Math.abs(a)%$y.length]}function Gy({name:e}){return c.jsx("span",{className:`inline-flex size-5 items-center justify-center rounded-full text-[10px] font-bold text-white ${fO(e)}`,title:e,children:e[0].toUpperCase()})}function mO(e,a){const l={critical:0,high:1,medium:2,low:3};return[...e].sort((r,i)=>a==="priority"?(l[r.priority]??4)-(l[i.priority]??4):a==="updated"?new Date(i.updated_at).getTime()-new Date(r.updated_at).getTime():a==="created"?new Date(i.created_at).getTime()-new Date(r.created_at).getTime():0)}function hO({task:e,projectMap:a,compact:l,onStart:r,onComplete:i,onDelete:u,onEdit:f,onSelect:m,onDragStart:g}){const[p,x]=v.useState(!1),y=e.project_id?a.get(e.project_id):null,w=Uy[e.priority]||Uy.medium,b=e.assigned_to||e.agent_id;return l?c.jsxs("div",{draggable:!0,onDragStart:C=>g(C,e),onClick:()=>m(e),className:`flex items-center gap-2 rounded-md border border-l-4 ${w.border} px-2 py-1.5 cursor-pointer hover:bg-accent/50 transition-colors`,children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${w.dot}`}),c.jsx("span",{className:"text-sm truncate flex-1",children:e.title}),b&&c.jsx(Gy,{name:b}),c.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:By(e.updated_at)})]}):c.jsxs("div",{draggable:!0,onDragStart:C=>g(C,e),onClick:()=>m(e),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:`rounded-lg border border-l-4 ${w.border} bg-card p-3 cursor-pointer hover:bg-accent/50 transition-colors relative`,children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${w.dot}`,title:w.label}),c.jsx("code",{className:"text-sm text-muted-foreground",children:e.short_id||e.id.slice(0,8)})]}),c.jsx("p",{className:"text-sm font-medium leading-tight line-clamp-2",children:e.title}),p&&e.description&&c.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:e.description})]}),c.jsx("div",{onClick:C=>C.stopPropagation(),className:"shrink-0",children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-6",children:c.jsx($s,{className:"size-3.5"})})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>f(e),children:[c.jsx(wo,{className:"size-3.5 mr-2"})," Edit"]}),e.status==="pending"&&c.jsxs(mt,{onClick:()=>r(e.id),children:[c.jsx(vo,{className:"size-3.5 mr-2"})," Start"]}),e.status==="in_progress"&&c.jsxs(mt,{onClick:()=>i(e.id),children:[c.jsx(po,{className:"size-3.5 mr-2"})," Complete"]}),c.jsx(Oo,{}),c.jsxs(mt,{className:"text-red-500 focus:text-red-500",onClick:()=>u(e.id),children:[c.jsx(ua,{className:"size-3.5 mr-2"})," Delete"]})]})]})})]}),c.jsxs("div",{className:"mt-2 flex items-center gap-2 text-sm text-muted-foreground",children:[y&&c.jsx(Gt,{variant:"outline",className:"text-sm px-1.5 py-0",children:y}),c.jsx("div",{className:"flex-1"}),c.jsxs("div",{onClick:C=>C.stopPropagation(),className:"flex items-center gap-0.5",children:[e.status==="pending"&&c.jsx(oe,{variant:"ghost",size:"icon",className:"size-5",title:"Start",onClick:()=>r(e.id),children:c.jsx(vo,{className:"size-3 text-blue-500"})}),e.status==="in_progress"&&c.jsx(oe,{variant:"ghost",size:"icon",className:"size-5",title:"Complete",onClick:()=>i(e.id),children:c.jsx(po,{className:"size-3 text-green-500"})})]}),b&&c.jsx(Gy,{name:b}),c.jsx("span",{children:By(e.updated_at)})]})]})}function Yy({status:e,label:a,tasks:l,collapsed:r,onToggleCollapse:i,sortField:u,onSortChange:f,showLimit:m,onShowMore:g,compact:p,projectMap:x,onStart:y,onComplete:w,onDelete:b,onEdit:C,onSelect:j,onDragStart:N,onDrop:E,onDragOver:O}){const D=Iy[e]||Iy.pending,k=mO(l,u),z=k.slice(0,m),_=k.length-z.length;return c.jsxs("div",{className:"flex flex-col",onDragOver:O,onDrop:()=>E(e),children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(oe,{variant:"ghost",size:"icon",className:"size-5",onClick:i,children:r?c.jsx(So,{className:"size-3.5"}):c.jsx(y0,{className:"size-3.5"})}),c.jsx("span",{className:`size-2.5 rounded-full ${D.bg}`}),c.jsx("h3",{className:`text-sm font-semibold ${D.text}`,children:a}),c.jsx(Gt,{variant:"secondary",className:"text-sm px-1.5 py-0 ml-auto",children:l.length}),!r&&c.jsx("div",{onClick:H=>H.stopPropagation(),children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-5",children:c.jsx(bn,{className:"size-3"})})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>f("priority"),children:[u==="priority"&&"• ","Priority"]}),c.jsxs(mt,{onClick:()=>f("updated"),children:[u==="updated"&&"• ","Updated"]}),c.jsxs(mt,{onClick:()=>f("created"),children:[u==="created"&&"• ","Created"]})]})]})})]}),!r&&c.jsxs("div",{className:"space-y-2 min-h-[100px]",children:[z.length===0?c.jsx("div",{className:"rounded-lg border border-dashed p-4 text-center text-sm text-muted-foreground",children:"No tasks"}):z.map(H=>c.jsx(hO,{task:H,projectMap:x,compact:p,onStart:y,onComplete:w,onDelete:b,onEdit:C,onSelect:j,onDragStart:N},H.id)),_>0&&c.jsxs(oe,{variant:"ghost",size:"sm",className:"w-full text-sm text-muted-foreground",onClick:g,children:["Show ",Math.min(_,20)," more (",_," remaining)"]})]}),r&&c.jsxs("div",{className:"text-sm text-muted-foreground text-center py-2 border border-dashed rounded-lg",children:[l.length," task(s)"]})]})}const qy=[{key:"pending",label:"Pending"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"failed",label:"Failed"},{key:"cancelled",label:"Cancelled"}];function gO({data:e,projectMap:a,onStart:l,onComplete:r,onDelete:i,onEdit:u,onSelect:f,onStatusChange:m}){const[g,p]=v.useState({completed:!0,cancelled:!0}),[x,y]=v.useState({}),[w,b]=v.useState({}),[C,j]=v.useState(!1),[N,E]=v.useState(!1),[O,D]=v.useState("all"),[k,z]=v.useState(!1),[_,H]=v.useState(null),[L,W]=v.useState(null),Y=15,K=v.useMemo(()=>O==="all"?e:e.filter(Z=>Z.priority===O),[e,O]),ee=N?qy:qy.filter(Z=>Z.key!=="cancelled");function te(Z,T){H(T),Z.dataTransfer.effectAllowed="move",Z.dataTransfer.setData("text/plain",T.id)}function se(Z){Z.preventDefault(),Z.dataTransfer.dropEffect="move"}function ce(Z){if(!_||_.status===Z){H(null),W(null);return}m?m(_.id,Z):Z==="in_progress"&&_.status==="pending"?l(_.id):Z==="completed"&&_.status==="in_progress"&&r(_.id),H(null),W(null)}function A(Z){p(T=>({...T,[Z]:!T[Z]}))}function U(Z,T){y(R=>({...R,[Z]:T}))}function ae(Z){b(T=>({...T,[Z]:(T[Z]||Y)+20}))}if(k){const T=[...new Set(K.map(R=>R.project_id||"__none__"))].map(R=>({id:R,name:R==="__none__"?"No Project":a.get(R)||R.slice(0,8),tasks:K.filter(V=>(V.project_id||"__none__")===R)}));return T.sort((R,V)=>V.tasks.length-R.tasks.length),c.jsxs("div",{className:"space-y-6",children:[c.jsx(Wy,{compact:C,onCompactChange:j,showCancelled:N,onShowCancelledChange:E,priorityFilter:O,onPriorityFilterChange:D,groupByProject:k,onGroupByProjectChange:z}),T.map(R=>c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[c.jsx("span",{className:"size-3 rounded bg-muted"}),R.name,c.jsx(Gt,{variant:"secondary",className:"text-sm",children:R.tasks.length})]}),c.jsx("div",{className:`grid gap-4 ${ee.length<=4?"grid-cols-4":"grid-cols-5"}`,children:ee.map(V=>{const X=`${R.id}_${V.key}`;return c.jsx(Yy,{status:V.key,label:V.label,tasks:R.tasks.filter(le=>le.status===V.key),collapsed:!!g[X],onToggleCollapse:()=>p(le=>({...le,[X]:!le[X]})),sortField:x[X]||"priority",onSortChange:le=>U(X,le),showLimit:w[X]||Y,onShowMore:()=>ae(X),compact:C,projectMap:a,onStart:l,onComplete:r,onDelete:i,onEdit:u,onSelect:f,onDragStart:te,onDrop:ce,onDragOver:se},X)})})]},R.id))]})}return c.jsxs("div",{className:"space-y-4",children:[c.jsx(Wy,{compact:C,onCompactChange:j,showCancelled:N,onShowCancelledChange:E,priorityFilter:O,onPriorityFilterChange:D,groupByProject:k,onGroupByProjectChange:z}),c.jsx("div",{className:`grid gap-4 ${ee.length<=4?"grid-cols-4":"grid-cols-5"}`,children:ee.map(Z=>c.jsx(Yy,{status:Z.key,label:Z.label,tasks:K.filter(T=>T.status===Z.key),collapsed:!!g[Z.key],onToggleCollapse:()=>A(Z.key),sortField:x[Z.key]||"priority",onSortChange:T=>U(Z.key,T),showLimit:w[Z.key]||Y,onShowMore:()=>ae(Z.key),compact:C,projectMap:a,onStart:l,onComplete:r,onDelete:i,onEdit:u,onSelect:f,onDragStart:te,onDrop:ce,onDragOver:se},Z.key))})]})}function Wy({compact:e,onCompactChange:a,showCancelled:l,onShowCancelledChange:r,priorityFilter:i,onPriorityFilterChange:u,groupByProject:f,onGroupByProjectChange:m}){return c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs(wn,{value:i,onValueChange:u,children:[c.jsx(sn,{className:"w-[130px] h-8",children:c.jsx(Cn,{placeholder:"Priority"})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"all",children:"All Priorities"}),c.jsx(Ee,{value:"critical",children:"Critical"}),c.jsx(Ee,{value:"high",children:"High"}),c.jsx(Ee,{value:"medium",children:"Medium"}),c.jsx(Ee,{value:"low",children:"Low"})]})]}),c.jsx(oe,{variant:f?"secondary":"outline",size:"sm",className:"h-8 text-sm",onClick:()=>m(!f),children:"Group by Project"}),c.jsx(oe,{variant:l?"secondary":"outline",size:"sm",className:"h-8 text-sm",onClick:()=>r(!l),children:"Cancelled"}),c.jsx(oe,{variant:e?"secondary":"outline",size:"sm",className:"h-8 text-sm ml-auto",onClick:()=>a(!e),children:e?"Detailed":"Compact"})]})}function pO(e){let a=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return a=a.replace(/```(\w*)\n([\s\S]*?)```/g,(l,r,i)=>`<pre class="my-2 rounded bg-muted p-3 text-xs font-mono overflow-x-auto"><code>${i.trim()}</code></pre>`),a=a.replace(/`([^`]+)`/g,'<code class="rounded bg-muted px-1 py-0.5 text-xs font-mono">$1</code>'),a=a.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),a=a.replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)","g"),"<em>$1</em>"),a=a.replace(/^### (.+)$/gm,'<h3 class="text-sm font-semibold mt-3 mb-1">$1</h3>'),a=a.replace(/^## (.+)$/gm,'<h2 class="text-base font-semibold mt-4 mb-1">$1</h2>'),a=a.replace(/^- (.+)$/gm,'<li class="ml-4 list-disc">$1</li>'),a=a.replace(/((?:<li[^>]*>.*<\/li>\n?)+)/g,'<ul class="my-1 space-y-0.5 text-sm">$1</ul>'),a=a.replace(/^\d+\. (.+)$/gm,'<li class="ml-4 list-decimal">$1</li>'),a=a.replace(/\n\n/g,'</p><p class="my-1.5">'),a=a.replace(new RegExp("(?<!<\\/pre>|<\\/li>|<\\/ul>|<\\/h[23]>)\\n(?!<)","g"),"<br>"),`<p class="my-1.5">${a}</p>`}function vO({content:e}){return c.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm text-foreground leading-relaxed",dangerouslySetInnerHTML:{__html:pO(e)}})}function PS({status:e}){const l={pending:{label:"Pending",variant:"outline"},in_progress:{label:"In Progress",variant:"default"},completed:{label:"Completed",variant:"secondary"},failed:{label:"Failed",variant:"destructive"},cancelled:{label:"Cancelled",variant:"outline"}}[e]||{label:e,variant:"outline"};return c.jsx(Gt,{variant:l.variant,children:l.label})}function HS({priority:e}){const a={critical:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",high:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",medium:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",low:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};return c.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${a[e]||""}`,children:e})}function $c(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s ago`;const l=Math.floor(a/60);if(l<60)return`${l}m ago`;const r=Math.floor(l/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function xO(e){return e<6e4?`${Math.round(e/1e3)}s`:e<36e5?`${Math.round(e/6e4)}m`:`${(e/36e5).toFixed(1)}h`}function FS(e){return e?new Date(e).getTime()<Date.now():!1}function yO({task:e,projectName:a,onBack:l,onStart:r,onComplete:i,onDelete:u,onEdit:f}){const m=new Date(e.created_at).getTime(),p=((e.completed_at?new Date(e.completed_at).getTime():null)||Date.now())-m;return c.jsx("div",{className:"space-y-4",children:c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"space-y-1.5 min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("code",{className:"text-xs text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:e.short_id||e.id.slice(0,8)}),c.jsx(PS,{status:e.status}),c.jsx(HS,{priority:e.priority}),e.due_at&&c.jsxs("span",{className:`inline-flex items-center gap-1 text-xs ${FS(e.due_at)&&e.status!=="completed"?"text-red-500 font-medium":"text-muted-foreground"}`,children:[c.jsx(p0,{className:"size-3"}),"Due ",new Date(e.due_at).toLocaleDateString()]})]}),c.jsx(Xt,{className:"text-lg leading-tight",children:e.title})]}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[c.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>f(e),children:[c.jsx(wo,{className:"size-3.5"})," Edit"]}),e.status==="pending"&&c.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>r(e.id),children:[c.jsx(vo,{className:"size-3.5"})," Start"]}),e.status==="in_progress"&&c.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>i(e.id),children:[c.jsx(po,{className:"size-3.5"})," Complete"]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"text-red-500 hover:text-red-600",onClick:()=>{u(e.id),l()},children:[c.jsx(Qm,{className:"size-3.5"})," Delete"]})]})]})}),c.jsxs(Mt,{className:"space-y-4",children:[e.description&&c.jsx("div",{className:"rounded-lg border bg-muted/30 p-4",children:c.jsx(vO,{content:e.description})}),c.jsx("div",{className:"flex flex-wrap gap-3",children:c.jsxs("div",{className:"flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs",children:[c.jsx(b0,{className:"size-3 text-muted-foreground"}),c.jsx("span",{className:"text-muted-foreground",children:"Total:"}),c.jsx("span",{className:"font-medium",children:xO(p)})]})}),c.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-sm sm:grid-cols-3",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Project:"})," ",c.jsx("span",{className:"font-medium",children:a||"None"})]}),e.task_list_id&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Task List:"})," ",c.jsx("span",{className:"font-medium",children:e.task_list_id})]}),e.assigned_to&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Assigned to:"})," ",c.jsx("span",{className:"font-medium",children:e.assigned_to})]}),e.agent_id&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Agent:"})," ",c.jsx("span",{className:"font-medium",children:e.agent_id})]}),e.locked_by&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Locked by:"})," ",c.jsx("span",{className:"font-medium",children:e.locked_by})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Created:"})," ",c.jsx("span",{children:$c(e.created_at)})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Updated:"})," ",c.jsx("span",{children:$c(e.updated_at)})]}),e.completed_at&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Completed:"})," ",c.jsx("span",{children:$c(e.completed_at)})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Version:"})," ",c.jsx("span",{children:e.version})]})]}),e.tags.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.tags.map(x=>c.jsx(Gt,{variant:"outline",className:"text-xs",children:x},x))})]})]})})}const bO=[{id:"select",header:({table:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsAllPageRowsSelected(),onChange:a=>e.toggleAllPageRowsSelected(a.target.checked)}),cell:({row:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsSelected(),onChange:a=>{a.stopPropagation(),e.toggleSelected(a.target.checked)},onClick:a=>a.stopPropagation()}),size:30,enableSorting:!1},{accessorKey:"short_id",header:"ID",cell:({row:e})=>c.jsx("code",{className:"text-xs text-muted-foreground",children:e.original.short_id||e.original.id.slice(0,8)}),size:100},{accessorKey:"title",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Title ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsxs("div",{className:"max-w-[400px]",children:[c.jsx("div",{className:"font-medium truncate",children:e.original.title}),e.original.due_at&&FS(e.original.due_at)&&e.original.status!=="completed"&&c.jsx("span",{className:"text-[10px] text-red-500 font-medium",children:"Overdue"})]})},{accessorKey:"status",header:"Status",cell:({row:e})=>c.jsx(PS,{status:e.original.status}),filterFn:(e,a,l)=>!l||l==="all"?!0:e.original.status===l},{accessorKey:"priority",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Priority ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx(HS,{priority:e.original.priority}),sortingFn:(e,a)=>{const l={critical:0,high:1,medium:2,low:3};return(l[e.original.priority]??4)-(l[a.original.priority]??4)}},{accessorKey:"assigned_to",header:"Assigned",cell:({row:e})=>c.jsx("span",{className:"text-xs text-muted-foreground",children:e.original.assigned_to||e.original.agent_id||"—"})},{accessorKey:"updated_at",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Updated ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:$c(e.original.updated_at)})},{id:"actions",header:"",cell:({row:e,table:a})=>{const l=a.options.meta,r=e.original;return c.jsx("div",{onClick:i=>i.stopPropagation(),children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-7",children:c.jsx($s,{className:"size-4"})})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>l==null?void 0:l.onEdit(r),children:[c.jsx(wo,{className:"size-3.5 mr-2"})," Edit"]}),r.status==="pending"&&c.jsxs(mt,{onClick:()=>l==null?void 0:l.onStart(r.id),children:[c.jsx(vo,{className:"size-3.5 mr-2"})," Start"]}),r.status==="in_progress"&&c.jsxs(mt,{onClick:()=>l==null?void 0:l.onComplete(r.id),children:[c.jsx(po,{className:"size-3.5 mr-2"})," Complete"]}),c.jsx(Oo,{}),c.jsxs(mt,{className:"text-red-500 focus:text-red-500",onClick:()=>l==null?void 0:l.onConfirmDelete(r.id),children:[c.jsx(ua,{className:"size-3.5 mr-2"})," Delete"]})]})]})})},size:50}];function SO({data:e,projectMap:a,projects:l,onStart:r,onComplete:i,onDelete:u,onEdit:f,onBulkAction:m,onNewTask:g}){var Z;const[p,x]=v.useState([]),[y,w]=v.useState([]),[b,C]=v.useState(""),[j,N]=v.useState("table"),[E,O]=v.useState(null),[D,k]=v.useState(null),[z,_]=v.useState({}),[H,L]=v.useState("all"),W=v.useRef(null);v.useEffect(()=>{function T(R){var V,X,le;if(R.key==="/"&&!R.ctrlKey&&!R.metaKey){const re=(V=R.target)==null?void 0:V.tagName;re!=="INPUT"&&re!=="TEXTAREA"&&(R.preventDefault(),(X=W.current)==null||X.focus())}R.key==="Escape"&&(E?O(null):(C(""),(le=W.current)==null||le.blur()))}return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[E]),v.useEffect(()=>{if(E){const T=e.find(R=>R.id===E.id);O(T||null)}},[e,E==null?void 0:E.id]);const Y=v.useMemo(()=>H==="all"?e:H==="none"?e.filter(T=>!T.project_id):e.filter(T=>T.project_id===H),[e,H]),K=v.useMemo(()=>{const T={all:Y.length};for(const R of Y)T[R.status]=(T[R.status]||0)+1;return T},[Y]),ee=v.useMemo(()=>{const T=[...bO];return T.splice(4,0,{accessorKey:"project_id",header:"Project",cell:({row:R})=>{const V=R.original.project_id;return V?c.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[120px] block",children:a.get(V)||V.slice(0,8)}):c.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}}),T},[a]),te=bu({data:Y,columns:ee,state:{sorting:p,columnFilters:y,globalFilter:b,rowSelection:z},onSortingChange:x,onColumnFiltersChange:w,onGlobalFilterChange:C,onRowSelectionChange:_,getCoreRowModel:pu(),getSortedRowModel:yu(),getFilteredRowModel:vu(),getPaginationRowModel:xu(),enableRowSelection:!0,getRowId:T=>T.id,initialState:{pagination:{pageSize:15}},meta:{onStart:r,onComplete:i,onDelete:u,onConfirmDelete:U,onEdit:f}}),se=((Z=te.getColumn("status"))==null?void 0:Z.getFilterValue())||"all",ce=Object.keys(z).filter(T=>z[T]),A=ce.length>0;function U(T){k(T)}function ae(){D&&(u(D),k(null),(E==null?void 0:E.id)===D&&O(null))}return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g&&c.jsxs(oe,{size:"sm",className:"h-9",onClick:g,title:"Press n",children:[c.jsx(Ol,{className:"size-4"})," New Task"]}),c.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-xs",children:[c.jsx(Jc,{className:"absolute left-2.5 top-2.5 size-4 text-muted-foreground"}),c.jsx(Zt,{ref:W,placeholder:"Search... (/)",value:b,onChange:T=>C(T.target.value),className:"pl-8 h-9"})]}),c.jsxs(wn,{value:H,onValueChange:L,children:[c.jsx(sn,{className:"w-[140px] h-9",children:c.jsx(Cn,{placeholder:"All Projects"})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"all",children:"All Projects"}),c.jsx(Ee,{value:"none",children:"No Project"}),l.map(T=>c.jsx(Ee,{value:T.id,children:T.name},T.id))]})]}),c.jsxs(wn,{value:se,onValueChange:T=>{var R;return(R=te.getColumn("status"))==null?void 0:R.setFilterValue(T==="all"?void 0:T)},children:[c.jsx(sn,{className:"w-[140px] h-9",children:c.jsx(Cn,{placeholder:"All Statuses"})}),c.jsx(cn,{children:["all","pending","in_progress","completed","failed","cancelled"].map(T=>{const R=K[T]||0,V=T==="all"?"All":T==="in_progress"?"In Progress":T.charAt(0).toUpperCase()+T.slice(1);return c.jsxs(Ee,{value:T,children:[V," (",R,")"]},T)})})]}),c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"outline",size:"icon",className:"size-9 shrink-0",title:"Export",children:c.jsx(sj,{className:"size-4"})})}),c.jsxs(Ja,{align:"end",children:[c.jsx(mt,{onClick:()=>window.open("/api/tasks/export?format=csv","_blank"),children:"Export CSV"}),c.jsx(mt,{onClick:()=>window.open("/api/tasks/export?format=json","_blank"),children:"Export JSON"})]})]}),c.jsxs("div",{className:"flex items-center border rounded-md",children:[c.jsx(oe,{variant:j==="table"?"secondary":"ghost",size:"icon",className:"size-8 rounded-r-none",onClick:()=>N("table"),title:"Table view",children:c.jsx(dj,{className:"size-4"})}),c.jsx(oe,{variant:j==="kanban"?"secondary":"ghost",size:"icon",className:"size-8 rounded-l-none",onClick:()=>N("kanban"),title:"Kanban view",children:c.jsx(uj,{className:"size-4"})})]})]}),j==="kanban"&&c.jsx(gO,{data:te.getFilteredRowModel().rows.map(T=>T.original),projectMap:a,onStart:r,onComplete:i,onDelete:U,onEdit:f,onSelect:O,onStatusChange:async(T,R)=>{try{const V=e.find(X=>X.id===T);if(!V)return;R==="in_progress"&&V.status==="pending"?r(T):R==="completed"&&V.status==="in_progress"?i(T):(await fetch(`/api/tasks/${T}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:R})}),r("__reload__"))}catch{}}}),j==="table"&&c.jsx("div",{className:"rounded-md border",children:c.jsxs(Qs,{children:[c.jsx(Zs,{children:te.getHeaderGroups().map(T=>c.jsx(Sn,{children:T.headers.map(R=>c.jsx(ei,{children:R.isPlaceholder?null:Pl(R.column.columnDef.header,R.getContext())},R.id))},T.id))}),c.jsx(Js,{children:te.getRowModel().rows.length?te.getRowModel().rows.map(T=>c.jsx(Sn,{className:"cursor-pointer","data-state":T.getIsSelected()?"selected":void 0,onClick:()=>O(T.original),children:T.getVisibleCells().map(R=>c.jsx(Wa,{children:Pl(R.column.columnDef.cell,R.getContext())},R.id))},T.id)):c.jsx(Sn,{children:c.jsx(Wa,{colSpan:ee.length,className:"h-24 text-center text-muted-foreground",children:"No tasks found."})})})]})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[te.getFilteredRowModel().rows.length," task(s)"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>te.previousPage(),disabled:!te.getCanPreviousPage(),children:c.jsx(Is,{className:"size-4"})}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",te.getState().pagination.pageIndex+1," of ",te.getPageCount()]}),c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>te.nextPage(),disabled:!te.getCanNextPage(),children:c.jsx(So,{className:"size-4"})})]})]}),A&&c.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-3 rounded-xl border bg-background px-5 py-3 shadow-xl",children:[c.jsxs("span",{className:"text-sm font-medium",children:[ce.length," selected"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>{m(ce,"start"),_({})},children:[c.jsx(vo,{className:"size-4"})," Start"]}),c.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>{m(ce,"complete"),_({})},children:[c.jsx(po,{className:"size-4"})," Complete"]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"text-red-500",onClick:()=>{m(ce,"delete"),_({})},children:[c.jsx(ua,{className:"size-4"})," Delete"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx(oe,{variant:"ghost",size:"sm",onClick:()=>_({}),children:"Clear"})]})]}),c.jsx(ha,{open:!!E,onOpenChange:T=>{T||O(null)},children:c.jsx(qn,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:E&&c.jsx(yO,{task:E,projectName:E.project_id&&a.get(E.project_id)||null,onBack:()=>O(null),onStart:r,onComplete:i,onDelete:T=>{O(null),U(T)},onEdit:f})})}),c.jsx(ha,{open:!!D,onOpenChange:T=>{T||k(null)},children:c.jsxs(qn,{className:"max-w-sm",children:[c.jsx(el,{children:c.jsx(pa,{children:"Delete Task"})}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Are you sure you want to delete this task? This action cannot be undone."}),c.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[c.jsx(oe,{variant:"outline",onClick:()=>k(null),children:"Cancel"}),c.jsxs(oe,{variant:"destructive",onClick:ae,children:[c.jsx(ua,{className:"size-4"})," Delete"]})]})]})})]})}function LS(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s ago`;const l=Math.floor(a/60);if(l<60)return`${l}m ago`;const r=Math.floor(l/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Ky(e){return{pending:"text-yellow-500",in_progress:"text-blue-500",completed:"text-green-500",failed:"text-red-500",cancelled:"text-muted-foreground"}[e]||"text-foreground"}function Xy({open:e,onOpenChange:a,onCreated:l}){const[r,i]=v.useState(""),[u,f]=v.useState(""),[m,g]=v.useState(""),[p,x]=v.useState(!1),[y,w]=v.useState(null);async function b(C){if(C.preventDefault(),!(!r.trim()||!u.trim())){x(!0),w(null);try{const N=await(await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r.trim(),path:u.trim(),description:m.trim()||void 0})})).json();N.error?w(N.error):(i(""),f(""),g(""),a(!1),l())}catch{w("Failed to create project")}finally{x(!1)}}}return c.jsx(ha,{open:e,onOpenChange:a,children:c.jsxs(qn,{children:[c.jsx(el,{children:c.jsx(pa,{children:"New Project"})}),c.jsxs("form",{onSubmit:b,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Name"}),c.jsx(Zt,{value:r,onChange:C=>i(C.target.value),placeholder:"Project name",className:"h-9",autoFocus:!0})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Path"}),c.jsx(Zt,{value:u,onChange:C=>f(C.target.value),placeholder:"/path/to/project",className:"h-9"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx(Zt,{value:m,onChange:C=>g(C.target.value),placeholder:"Optional description",className:"h-9"})]}),y&&c.jsx("p",{className:"text-sm text-red-500",children:y}),c.jsxs(ti,{children:[c.jsx(oe,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsx(oe,{type:"submit",disabled:!r.trim()||!u.trim()||p,children:p?"Creating...":"Create"})]})]})]})})}function wO({project:e,onBack:a}){const[l,r]=v.useState([]),[i,u]=v.useState(!0);v.useEffect(()=>{fetch(`/api/tasks?project_id=${e.id}`).then(m=>m.json()).then(r).finally(()=>u(!1))},[e.id]);const f={};for(const m of l)f[m.status]=(f[m.status]||0)+1;return c.jsxs("div",{className:"space-y-4",children:[c.jsxs(oe,{variant:"ghost",size:"sm",onClick:a,className:"gap-1.5 -ml-2",children:[c.jsx(nj,{className:"size-3.5"})," Back to projects"]}),c.jsxs(Nt,{className:"shadow-none",children:[c.jsxs(Kt,{children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{children:[c.jsxs(Xt,{className:"text-lg flex items-center gap-2",children:[c.jsx(Zc,{className:"size-5 text-purple-500"}),e.name]}),c.jsx("code",{className:"text-sm text-muted-foreground mt-1 block",children:e.path})]}),e.task_prefix&&c.jsx(Gt,{variant:"outline",children:e.task_prefix})]}),e.description&&c.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e.description})]}),c.jsxs(Mt,{className:"space-y-4",children:[c.jsx("div",{className:"grid grid-cols-5 gap-2 text-center",children:["pending","in_progress","completed","failed","cancelled"].map(m=>c.jsxs("div",{className:"rounded-lg border p-2",children:[c.jsx("div",{className:`text-xl font-bold ${Ky(m)}`,children:f[m]||0}),c.jsx("div",{className:"text-sm text-muted-foreground capitalize",children:m==="in_progress"?"Active":m})]},m))}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Tasks (",l.length,")"]}),i?c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):l.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No tasks in this project."}):c.jsx("div",{className:"space-y-1 max-h-[400px] overflow-y-auto",children:l.map(m=>c.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-muted/50",children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${Ky(m.status).replace("text-","bg-")}`}),c.jsx("code",{className:"text-sm text-muted-foreground shrink-0",children:m.short_id||m.id.slice(0,8)}),c.jsx("span",{className:"truncate flex-1",children:m.title}),c.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:m.assigned_to||"—"}),c.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:LS(m.updated_at)})]},m.id))})]})]})]})]})}function CO(){return[{id:"select",header:({table:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsAllPageRowsSelected(),onChange:a=>e.toggleAllPageRowsSelected(a.target.checked)}),cell:({row:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsSelected(),onChange:a=>{a.stopPropagation(),e.toggleSelected(a.target.checked)},onClick:a=>a.stopPropagation()}),size:30,enableSorting:!1},{accessorKey:"name",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Name ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Zc,{className:"size-4 text-purple-500 shrink-0"}),c.jsx("span",{className:"font-medium text-sm",children:e.original.name})]})},{accessorKey:"path",header:"Path",cell:({row:e})=>c.jsx("code",{className:"text-sm text-muted-foreground truncate max-w-[300px] block",children:e.original.path})},{accessorKey:"task_prefix",header:"Prefix",cell:({row:e})=>e.original.task_prefix?c.jsx(Gt,{variant:"outline",className:"text-sm",children:e.original.task_prefix}):c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"})},{accessorKey:"task_counter",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Tasks ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx("span",{className:"text-sm",children:e.original.task_counter})},{accessorKey:"task_list_id",header:"Task List",cell:({row:e})=>c.jsx("span",{className:"text-sm text-muted-foreground truncate max-w-[150px] block",children:e.original.task_list_id||"—"})},{accessorKey:"created_at",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Created ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:LS(e.original.created_at)})},{id:"actions",header:"",cell:({row:e,table:a})=>{const l=a.options.meta;return c.jsx("div",{onClick:r=>r.stopPropagation(),children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-7",children:c.jsx($s,{className:"size-4"})})}),c.jsxs(Ja,{align:"end",children:[c.jsx(Oo,{className:"hidden"}),c.jsxs(mt,{className:"text-red-500 focus:text-red-500",onClick:()=>l==null?void 0:l.onDelete(e.original.id),children:[c.jsx(ua,{className:"size-3.5 mr-2"})," Delete"]})]})]})})},size:50}]}function jO(){const[e,a]=v.useState([]),[l,r]=v.useState(!0),[i,u]=v.useState(null),[f,m]=v.useState([]),[g,p]=v.useState(""),[x,y]=v.useState({}),[w,b]=v.useState(!1),C=v.useRef(null),j=v.useMemo(()=>CO(),[]);function N(){fetch("/api/projects").then(_=>_.json()).then(a).finally(()=>r(!1))}v.useEffect(()=>{N()},[]),v.useEffect(()=>{function _(H){var L,W,Y;if(H.key==="/"&&!H.ctrlKey&&!H.metaKey){const K=(L=H.target)==null?void 0:L.tagName;K!=="INPUT"&&K!=="TEXTAREA"&&(H.preventDefault(),(W=C.current)==null||W.focus())}H.key==="Escape"&&(i?u(null):(p(""),(Y=C.current)==null||Y.blur()))}return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[i]);async function E(_){await fetch(`/api/projects/${_}`,{method:"DELETE"}),a(H=>H.filter(L=>L.id!==_))}async function O(_){await Promise.all(_.map(H=>fetch(`/api/projects/${H}`,{method:"DELETE"}))),a(H=>H.filter(L=>!_.includes(L.id))),y({})}const D=bu({data:e,columns:j,state:{sorting:f,globalFilter:g,rowSelection:x},onSortingChange:m,onGlobalFilterChange:p,onRowSelectionChange:y,getCoreRowModel:pu(),getSortedRowModel:yu(),getFilteredRowModel:vu(),getPaginationRowModel:xu(),enableRowSelection:!0,getRowId:_=>_.id,initialState:{pagination:{pageSize:15}},meta:{onDelete:E}}),k=Object.keys(x).filter(_=>x[_]),z=k.length>0;return l?c.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading projects..."}):i?c.jsx(wO,{project:i,onBack:()=>u(null)}):e.length===0&&!w?c.jsxs("div",{className:"text-center py-12",children:[c.jsx(Zc,{className:"mx-auto size-10 text-muted-foreground/50 mb-3"}),c.jsx("p",{className:"text-muted-foreground",children:"No projects registered."}),c.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Projects are auto-created when you run ",c.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm",children:"todos add"})," from a git repo."]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"mt-4 gap-1.5",onClick:()=>b(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Project"]}),c.jsx(Xy,{open:w,onOpenChange:b,onCreated:N})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[c.jsx(Jc,{className:"absolute left-2.5 top-2.5 size-3.5 text-muted-foreground"}),c.jsx(Zt,{ref:C,placeholder:"Search projects... (press /)",value:g,onChange:_=>p(_.target.value),className:"pl-8 h-9"})]}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.length," project(s)"]}),c.jsx("div",{className:"flex-1"}),c.jsxs(oe,{variant:"outline",size:"sm",className:"gap-1.5 h-9",onClick:()=>b(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Project"]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(Qs,{children:[c.jsx(Zs,{children:D.getHeaderGroups().map(_=>c.jsx(Sn,{children:_.headers.map(H=>c.jsx(ei,{children:H.isPlaceholder?null:Pl(H.column.columnDef.header,H.getContext())},H.id))},_.id))}),c.jsx(Js,{children:D.getRowModel().rows.length?D.getRowModel().rows.map(_=>c.jsx(Sn,{className:"cursor-pointer","data-state":_.getIsSelected()?"selected":void 0,onClick:()=>u(_.original),children:_.getVisibleCells().map(H=>c.jsx(Wa,{children:Pl(H.column.columnDef.cell,H.getContext())},H.id))},_.id)):c.jsx(Sn,{children:c.jsx(Wa,{colSpan:j.length,className:"h-24 text-center text-muted-foreground",children:"No projects found."})})})]})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[D.getFilteredRowModel().rows.length," project(s)"]}),D.getPageCount()>1&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>D.previousPage(),disabled:!D.getCanPreviousPage(),children:c.jsx(Is,{className:"size-3.5"})}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",D.getState().pagination.pageIndex+1," of ",D.getPageCount()]}),c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>D.nextPage(),disabled:!D.getCanNextPage(),children:c.jsx(So,{className:"size-3.5"})})]})]}),z&&c.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-3 rounded-xl border bg-background px-5 py-3 shadow-xl",children:[c.jsxs("span",{className:"text-sm font-medium",children:[k.length," selected"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs(oe,{variant:"outline",size:"sm",className:"h-7 text-sm text-red-500",onClick:()=>O(k),children:[c.jsx(ua,{className:"size-3"})," Delete"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx(oe,{variant:"ghost",size:"sm",className:"h-7 text-sm",onClick:()=>y({}),children:"Clear"})]}),c.jsx(Xy,{open:w,onOpenChange:b,onCreated:N})]})}function VS(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s ago`;const l=Math.floor(a/60);if(l<60)return`${l}m ago`;const r=Math.floor(l/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function BS(e){return e<6e4?`${Math.round(e/1e3)}s`:e<36e5?`${Math.round(e/6e4)}m`:`${(e/36e5).toFixed(1)}h`}function Hh(e){const a=Date.now()-new Date(e).getTime();return a<300*1e3?{color:"bg-green-500",label:"Online"}:a<3600*1e3?{color:"bg-yellow-500",label:"Away"}:{color:"bg-gray-400",label:"Offline"}}function Fh({role:e}){const a=e||"agent",l={admin:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",agent:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",observer:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};return c.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[a]||l.agent}`,children:a})}function US(e,a){return e.filter(l=>l.assigned_to===a.name||l.assigned_to===a.id||l.agent_id===a.id||l.agent_id===a.name)}function NO(e){return e.length===0?null:e.reduce((a,l)=>{const r=new Date(a.updated_at||a.created_at).getTime();return new Date(l.updated_at||l.created_at).getTime()>r?l:a})}function Qy(e,a){const l=e.length,r=a.length,i=Array.from({length:l+1},()=>Array(r+1).fill(0));for(let u=0;u<=l;u++)i[u][0]=u;for(let u=0;u<=r;u++)i[0][u]=u;for(let u=1;u<=l;u++)for(let f=1;f<=r;f++)i[u][f]=Math.min(i[u-1][f]+1,i[u][f-1]+1,i[u-1][f-1]+(e[u-1]===a[f-1]?0:1));return i[l][r]}function Zy({open:e,onOpenChange:a,onCreated:l}){const[r,i]=v.useState(""),[u,f]=v.useState(""),[m,g]=v.useState("agent"),[p,x]=v.useState(!1),[y,w]=v.useState(null);async function b(C){if(C.preventDefault(),!!r.trim()){x(!0),w(null);try{const N=await(await fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r.trim(),description:u.trim()||void 0,role:m})})).json();N.error?w(N.error):(i(""),f(""),g("agent"),a(!1),l())}catch{w("Failed to register agent")}finally{x(!1)}}}return c.jsx(ha,{open:e,onOpenChange:a,children:c.jsxs(qn,{children:[c.jsx(el,{children:c.jsx(pa,{children:"New Agent"})}),c.jsxs("form",{onSubmit:b,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Name"}),c.jsx(Zt,{value:r,onChange:C=>i(C.target.value),placeholder:"Agent name",className:"h-9",autoFocus:!0})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx(Zt,{value:u,onChange:C=>f(C.target.value),placeholder:"Optional description",className:"h-9"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Role"}),c.jsxs(wn,{value:m,onValueChange:g,children:[c.jsx(sn,{className:"h-9",children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"agent",children:"Agent"}),c.jsx(Ee,{value:"admin",children:"Admin"}),c.jsx(Ee,{value:"observer",children:"Observer"})]})]})]}),y&&c.jsx("p",{className:"text-sm text-red-500",children:y}),c.jsxs(ti,{children:[c.jsx(oe,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsx(oe,{type:"submit",disabled:!r.trim()||p,children:p?"Creating...":"Create"})]})]})]})})}function MO({agent:e,tasks:a,open:l,onOpenChange:r,onUpdated:i}){const[u,f]=v.useState(!1),[m,g]=v.useState(""),[p,x]=v.useState(""),[y,w]=v.useState("agent"),[b,C]=v.useState(!1),[j,N]=v.useState(null);if(v.useEffect(()=>{e&&(g(e.name),x(e.description||""),w(e.role||"agent"),f(!1),N(null))},[e]),!e)return null;const E=Hh(e.last_seen_at),D=US(a,e).sort((_,H)=>new Date(H.updated_at||H.created_at).getTime()-new Date(_.updated_at||_.created_at).getTime()).slice(0,20);async function k(){C(!0),N(null);try{const H=await(await fetch(`/api/agents/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:m.trim(),description:p.trim()||null,role:y})})).json();H.error?N(H.error):(f(!1),i())}catch{N("Failed to update agent")}finally{C(!1)}}const z={pending:"text-yellow-500",in_progress:"text-blue-500",completed:"text-green-500",cancelled:"text-red-500"};return c.jsx(ha,{open:l,onOpenChange:r,children:c.jsxs(qn,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[c.jsx(el,{children:c.jsxs(pa,{className:"flex items-center gap-2",children:[c.jsx(Us,{className:"size-5 text-orange-500"}),u?"Edit Agent":"Agent Details"]})}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:`size-2 rounded-full ${E.color}`}),c.jsx("span",{className:"text-sm text-muted-foreground",children:E.label}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["— last seen ",VS(e.last_seen_at)]})]}),u?c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Name"}),c.jsx(Zt,{value:m,onChange:_=>g(_.target.value),className:"h-9"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx(Zt,{value:p,onChange:_=>x(_.target.value),className:"h-9"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Role"}),c.jsxs(wn,{value:y,onValueChange:w,children:[c.jsx(sn,{className:"h-9",children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"agent",children:"Agent"}),c.jsx(Ee,{value:"admin",children:"Admin"}),c.jsx(Ee,{value:"observer",children:"Observer"})]})]})]}),j&&c.jsx("p",{className:"text-sm text-red-500",children:j}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(oe,{size:"sm",onClick:k,disabled:b||!m.trim(),className:"gap-1.5",children:[c.jsx(w0,{className:"size-3.5"}),b?"Saving...":"Save"]}),c.jsx(oe,{size:"sm",variant:"outline",onClick:()=>{f(!1),N(null)},children:"Cancel"})]})]}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Name"}),c.jsx("p",{className:"font-medium",children:e.name})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"ID"}),c.jsx("p",{className:"font-mono text-xs",children:e.id})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Role"}),c.jsx("div",{className:"mt-0.5",children:c.jsx(Fh,{role:e.role})})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Description"}),c.jsx("p",{children:e.description||"—"})]})]}),c.jsxs(oe,{size:"sm",variant:"outline",onClick:()=>f(!0),className:"gap-1.5",children:[c.jsx(wo,{className:"size-3.5"})," Edit"]})]}),c.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[c.jsx(Nt,{className:"py-2",children:c.jsxs(Mt,{className:"px-3 py-0 text-center",children:[c.jsx("p",{className:"text-lg font-bold",children:e.total}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Total"})]})}),c.jsx(Nt,{className:"py-2",children:c.jsxs(Mt,{className:"px-3 py-0 text-center",children:[c.jsx("p",{className:"text-lg font-bold text-yellow-500",children:e.pending}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Pending"})]})}),c.jsx(Nt,{className:"py-2",children:c.jsxs(Mt,{className:"px-3 py-0 text-center",children:[c.jsx("p",{className:"text-lg font-bold text-blue-500",children:e.inProgress}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Active"})]})}),c.jsx(Nt,{className:"py-2",children:c.jsxs(Mt,{className:"px-3 py-0 text-center",children:[c.jsx("p",{className:"text-lg font-bold text-green-500",children:e.completed}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Done"})]})})]}),c.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Completion rate: "}),c.jsx(Gt,{variant:e.completionRate>=80?"default":e.completionRate>=50?"secondary":"outline",children:e.total>0?`${e.completionRate}%`:"—"})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Avg work time: "}),c.jsx("span",{className:"font-medium",children:e.avgWorkTime!==null?BS(e.avgWorkTime):"—"})]})]}),e.lastTask&&c.jsxs("div",{className:"text-sm",children:[c.jsx("span",{className:"text-muted-foreground",children:"Last active task: "}),c.jsx("span",{className:"font-medium",children:e.lastTask.title}),c.jsxs("span",{className:`ml-1.5 ${z[e.lastTask.status]||"text-muted-foreground"}`,children:["(",e.lastTask.status.replace("_"," "),")"]})]}),D.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm font-medium mb-2",children:["Recent Tasks (",D.length,")"]}),c.jsx("div",{className:"max-h-[200px] overflow-y-auto rounded border divide-y",children:D.map(_=>c.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[c.jsx("span",{className:"truncate max-w-[300px]",children:_.title}),c.jsx(Gt,{variant:"outline",className:`text-xs shrink-0 ml-2 ${z[_.status]||""}`,children:_.status.replace("_"," ")})]},_.id))})]})]})]})})}function _O(e){const a=[],l=new Set;for(let r=0;r<e.length;r++){if(l.has(e[r].id))continue;const i=[e[r]];for(let u=r+1;u<e.length;u++){if(l.has(e[u].id))continue;const f=e[r].name.toLowerCase(),m=e[u].name.toLowerCase(),g=Math.max(f.length,m.length);if(g===0)continue;(1-Qy(f,m)/g>=.6||f.includes(m)||m.includes(f))&&(i.push(e[u]),l.add(e[u].id))}if(i.length>1){l.add(e[r].id);const u=i[0].name.toLowerCase(),f=i[1].name.toLowerCase(),m=Math.max(u.length,f.length),g=Qy(u,f);a.push({agents:i,similarity:Math.round((1-g/m)*100)})}}return a}function DO({open:e,onOpenChange:a,agents:l,onMerged:r}){const i=v.useMemo(()=>_O(l),[l]),[u,f]=v.useState(null);async function m(g,p){f(p);try{const x=g.agents.filter(y=>y.id!==p).map(y=>y.id);await Promise.all(x.map(y=>fetch(`/api/agents/${y}`,{method:"DELETE"}))),r()}finally{f(null)}}return c.jsx(ha,{open:e,onOpenChange:a,children:c.jsxs(qn,{className:"max-w-md max-h-[70vh] overflow-y-auto",children:[c.jsx(el,{children:c.jsxs(pa,{className:"flex items-center gap-2",children:[c.jsx(S0,{className:"size-5"})," Merge Duplicate Agents"]})}),i.length===0?c.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No duplicate agents found."}):c.jsx("div",{className:"space-y-4",children:i.map((g,p)=>c.jsxs("div",{className:"rounded border p-3 space-y-2",children:[c.jsxs("p",{className:"text-sm font-medium",children:["Similar names (",g.similarity,"% match)"]}),c.jsx("div",{className:"space-y-1.5",children:g.agents.map(x=>c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Us,{className:"size-3.5 text-orange-500"}),c.jsx("span",{children:x.name}),c.jsx("code",{className:"text-xs text-muted-foreground",children:x.id})]}),c.jsx(oe,{size:"sm",variant:"outline",className:"h-7 text-xs",disabled:u!==null,onClick:()=>m(g,x.id),children:u===x.id?"Merging...":"Keep"})]},x.id))}),c.jsx("p",{className:"text-xs text-muted-foreground",children:'Click "Keep" to keep that agent and delete the others.'})]},p))})]})})}function RO({agents:e,onClear:a}){return e.length<2?null:c.jsxs(Nt,{className:"mt-4",children:[c.jsx(Kt,{className:"pb-2",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(v0,{className:"size-4"})," Agent Comparison"]}),c.jsxs(oe,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:a,children:[c.jsx(Qm,{className:"size-3 mr-1"})," Close"]})]})}),c.jsx(Mt,{children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b",children:[c.jsx("th",{className:"text-left py-2 pr-4 text-muted-foreground font-medium",children:"Metric"}),e.map(l=>c.jsx("th",{className:"text-center py-2 px-3 font-medium",children:l.name},l.id))]})}),c.jsxs("tbody",{className:"divide-y",children:[c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Status"}),e.map(l=>{const r=Hh(l.last_seen_at);return c.jsx("td",{className:"text-center py-1.5 px-3",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:`size-2 rounded-full ${r.color}`}),r.label]})},l.id)})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Role"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3",children:c.jsx(Fh,{role:l.role})},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Total Tasks"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3 font-medium",children:l.total},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Pending"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3 text-yellow-500",children:l.pending},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"In Progress"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3 text-blue-500",children:l.inProgress},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Completed"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3 text-green-500",children:l.completed},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Rate"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3",children:c.jsx(Gt,{variant:l.completionRate>=80?"default":l.completionRate>=50?"secondary":"outline",children:l.total>0?`${l.completionRate}%`:"—"})},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Avg Time"}),e.map(l=>c.jsx("td",{className:"text-center py-1.5 px-3",children:l.avgWorkTime!==null?BS(l.avgWorkTime):"—"},l.id))]}),c.jsxs("tr",{children:[c.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:"Last Task"}),e.map(l=>{var r;return c.jsx("td",{className:"text-center py-1.5 px-3 max-w-[150px] truncate",children:((r=l.lastTask)==null?void 0:r.title)||"—"},l.id)})]})]})]})})})]})}function EO(){return[{id:"select",header:({table:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsAllPageRowsSelected(),onChange:a=>e.toggleAllPageRowsSelected(a.target.checked)}),cell:({row:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsSelected(),onChange:a=>{a.stopPropagation(),e.toggleSelected(a.target.checked)},onClick:a=>a.stopPropagation()}),size:30,enableSorting:!1},{accessorKey:"name",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Name ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>{const a=Hh(e.original.last_seen_at);return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${a.color}`,title:a.label}),c.jsx(Us,{className:"size-4 text-orange-500 shrink-0"}),c.jsx("span",{className:"font-medium text-sm",children:e.original.name})]})}},{accessorKey:"role",header:"Role",cell:({row:e})=>c.jsx(Fh,{role:e.original.role}),size:80},{accessorKey:"id",header:"ID",cell:({row:e})=>c.jsx("code",{className:"text-sm text-muted-foreground",children:e.original.id})},{accessorKey:"description",header:"Description",cell:({row:e})=>c.jsx("span",{className:"text-sm text-muted-foreground truncate max-w-[200px] block",children:e.original.description||"—"})},{accessorKey:"total",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Tasks ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>{const{total:a,pending:l,inProgress:r,completed:i}=e.original;return a===0?c.jsx("span",{className:"text-sm text-muted-foreground",children:"0"}):c.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[c.jsx("span",{className:"font-medium",children:a}),c.jsxs("span",{className:"text-muted-foreground",children:["(",c.jsx("span",{className:"text-yellow-500",children:l}),"/",c.jsx("span",{className:"text-blue-500",children:r}),"/",c.jsx("span",{className:"text-green-500",children:i}),")"]})]})}},{accessorKey:"completionRate",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Rate ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>{const a=e.original.completionRate;return e.original.total===0?c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"}):c.jsxs(Gt,{variant:a>=80?"default":a>=50?"secondary":"outline",className:"text-sm",children:[a,"%"]})}},{id:"lastTask",header:"Last Task",cell:({row:e})=>{const a=e.original.lastTask;return a?c.jsx("span",{className:"text-sm truncate max-w-[180px] block",title:a.title,children:a.title}):c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"})}},{accessorKey:"last_seen_at",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Last Seen ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:VS(e.original.last_seen_at)})},{id:"actions",header:"",cell:({row:e,table:a})=>{const l=a.options.meta;return c.jsx("div",{onClick:r=>r.stopPropagation(),children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-7",children:c.jsx($s,{className:"size-4"})})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>l==null?void 0:l.onOpenDetail(e.original),children:[c.jsx(wo,{className:"size-3.5 mr-2"})," View / Edit"]}),c.jsx(Oo,{}),c.jsxs(mt,{className:"text-red-500 focus:text-red-500",onClick:()=>l==null?void 0:l.onDelete(e.original.id),children:[c.jsx(ua,{className:"size-3.5 mr-2"})," Delete"]})]})]})})},size:50}]}function OO(){const[e,a]=v.useState([]),[l,r]=v.useState([]),[i,u]=v.useState(!0),[f,m]=v.useState([{id:"total",desc:!0}]),[g,p]=v.useState(""),[x,y]=v.useState({}),[w,b]=v.useState(!1),[C,j]=v.useState(!1),[N,E]=v.useState(null),[O,D]=v.useState(!1),[k,z]=v.useState("all"),[_,H]=v.useState(!1),L=v.useRef(null),W=v.useMemo(()=>EO(),[]);function Y(){Promise.all([fetch("/api/agents").then(T=>T.json()),fetch("/api/tasks").then(T=>T.json())]).then(([T,R])=>{a(T),r(R)}).finally(()=>u(!1))}v.useEffect(()=>{Y()},[]),v.useEffect(()=>{function T(R){var V,X,le;if(R.key==="/"&&!R.ctrlKey&&!R.metaKey){const re=(V=R.target)==null?void 0:V.tagName;re!=="INPUT"&&re!=="TEXTAREA"&&(R.preventDefault(),(X=L.current)==null||X.focus())}R.key==="Escape"&&(p(""),(le=L.current)==null||le.blur())}return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[]);const K=v.useMemo(()=>e.map(T=>{const R=US(l,T),V=R.length,X=R.filter(Se=>Se.status==="pending").length,le=R.filter(Se=>Se.status==="in_progress").length,re=R.filter(Se=>Se.status==="completed").length,fe=V>0?Math.round(re/V*100):0,ve=R.filter(Se=>Se.status==="completed"&&Se.completed_at);let ue=null;if(ve.length>0){const Se=ve.map(Me=>{const _e=new Date(Me.completed_at).getTime(),Pe=new Date(Me.created_at).getTime();return _e-Pe}).filter(Me=>Me>0);Se.length>0&&(ue=Se.reduce((Me,_e)=>Me+_e,0)/Se.length)}const ie=NO(R);return{...T,total:V,pending:X,inProgress:le,completed:re,completionRate:fe,avgWorkTime:ue,lastTask:ie}}),[e,l]),ee=v.useMemo(()=>k==="all"?K:k==="active"?K.filter(T=>T.inProgress>0):K.filter(T=>T.inProgress===0),[K,k]);async function te(T){await fetch(`/api/agents/${T}`,{method:"DELETE"}),a(R=>R.filter(V=>V.id!==T))}async function se(T){await Promise.all(T.map(R=>fetch(`/api/agents/${R}`,{method:"DELETE"}))),a(R=>R.filter(V=>!T.includes(V.id))),y({})}function ce(T){E(T),D(!0)}const A=bu({data:ee,columns:W,state:{sorting:f,globalFilter:g,rowSelection:x},onSortingChange:m,onGlobalFilterChange:p,onRowSelectionChange:y,getCoreRowModel:pu(),getSortedRowModel:yu(),getFilteredRowModel:vu(),getPaginationRowModel:xu(),enableRowSelection:!0,getRowId:T=>T.id,initialState:{pagination:{pageSize:15}},meta:{onDelete:te,onOpenDetail:ce}}),U=Object.keys(x).filter(T=>x[T]),ae=U.length>0,Z=K.filter(T=>U.includes(T.id));return i?c.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading agents..."}):e.length===0&&!w?c.jsxs("div",{className:"text-center py-12",children:[c.jsx(Us,{className:"mx-auto size-10 text-muted-foreground/50 mb-3"}),c.jsx("p",{className:"text-muted-foreground",children:"No agents registered."}),c.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Agents register via ",c.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm",children:"register_agent"})," MCP tool or CLI."]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"mt-4 gap-1.5",onClick:()=>b(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Agent"]}),c.jsx(Zy,{open:w,onOpenChange:b,onCreated:Y})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-xs",children:[c.jsx(Jc,{className:"absolute left-2.5 top-2.5 size-3.5 text-muted-foreground"}),c.jsx(Zt,{ref:L,placeholder:"Search agents... (press /)",value:g,onChange:T=>p(T.target.value),className:"pl-8 h-9"})]}),c.jsxs(wn,{value:k,onValueChange:T=>z(T),children:[c.jsx(sn,{className:"h-9 w-[130px]",children:c.jsx(Cn,{placeholder:"Filter"})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"all",children:"All"}),c.jsx(Ee,{value:"active",children:"Active"}),c.jsx(Ee,{value:"idle",children:"Idle"})]})]}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:[ee.length," agent(s)"]}),c.jsx("div",{className:"flex-1"}),c.jsxs(oe,{variant:"outline",size:"sm",className:"gap-1.5 h-9",onClick:()=>j(!0),children:[c.jsx(S0,{className:"size-3.5"})," Merge"]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"gap-1.5 h-9",onClick:()=>b(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Agent"]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(Qs,{children:[c.jsx(Zs,{children:A.getHeaderGroups().map(T=>c.jsx(Sn,{children:T.headers.map(R=>c.jsx(ei,{children:R.isPlaceholder?null:Pl(R.column.columnDef.header,R.getContext())},R.id))},T.id))}),c.jsx(Js,{children:A.getRowModel().rows.length?A.getRowModel().rows.map(T=>c.jsx(Sn,{"data-state":T.getIsSelected()?"selected":void 0,className:"cursor-pointer",onClick:()=>ce(T.original),children:T.getVisibleCells().map(R=>c.jsx(Wa,{children:Pl(R.column.columnDef.cell,R.getContext())},R.id))},T.id)):c.jsx(Sn,{children:c.jsx(Wa,{colSpan:W.length,className:"h-24 text-center text-muted-foreground",children:"No agents found."})})})]})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[A.getFilteredRowModel().rows.length," agent(s)"]}),A.getPageCount()>1&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>A.previousPage(),disabled:!A.getCanPreviousPage(),children:c.jsx(Is,{className:"size-3.5"})}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",A.getState().pagination.pageIndex+1," of ",A.getPageCount()]}),c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>A.nextPage(),disabled:!A.getCanNextPage(),children:c.jsx(So,{className:"size-3.5"})})]})]}),_&&Z.length>=2&&c.jsx(RO,{agents:Z,onClear:()=>{H(!1),y({})}}),ae&&c.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-3 rounded-xl border bg-background px-5 py-3 shadow-xl",children:[c.jsxs("span",{className:"text-sm font-medium",children:[U.length," selected"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),U.length>=2&&c.jsxs(c.Fragment,{children:[c.jsxs(oe,{variant:"outline",size:"sm",className:"h-7 text-sm gap-1",onClick:()=>H(!0),children:[c.jsx(v0,{className:"size-3"})," Compare"]}),c.jsx("div",{className:"h-4 w-px bg-border"})]}),c.jsxs(oe,{variant:"outline",size:"sm",className:"h-7 text-sm text-red-500",onClick:()=>se(U),children:[c.jsx(ua,{className:"size-3"})," Delete"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx(oe,{variant:"ghost",size:"sm",className:"h-7 text-sm",onClick:()=>{y({}),H(!1)},children:"Clear"})]}),c.jsx(Zy,{open:w,onOpenChange:b,onCreated:Y}),c.jsx(DO,{open:C,onOpenChange:j,agents:e,onMerged:Y}),c.jsx(MO,{agent:N,tasks:l,open:O,onOpenChange:D,onUpdated:Y})]})}function IS(e){const a=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(a<60)return`${a}s ago`;const l=Math.floor(a/60);if(l<60)return`${l}m ago`;const r=Math.floor(l/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function TO(e){return{pending:"text-yellow-500",in_progress:"text-blue-500",completed:"text-green-500",failed:"text-red-500",cancelled:"text-muted-foreground"}[e]||"text-foreground"}function $S(e){return e==="active"?"default":e==="completed"?"secondary":"outline"}function kO(e){let a=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return a=a.replace(/```(\w*)\n([\s\S]*?)```/g,(l,r,i)=>`<pre class="my-2 rounded bg-muted p-3 text-xs font-mono overflow-x-auto"><code>${i.trim()}</code></pre>`),a=a.replace(/`([^`]+)`/g,'<code class="rounded bg-muted px-1 py-0.5 text-xs font-mono">$1</code>'),a=a.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),a=a.replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)","g"),"<em>$1</em>"),a=a.replace(/^### (.+)$/gm,'<h3 class="text-sm font-semibold mt-3 mb-1">$1</h3>'),a=a.replace(/^## (.+)$/gm,'<h2 class="text-base font-semibold mt-4 mb-1">$1</h2>'),a=a.replace(/^- (.+)$/gm,'<li class="ml-4 list-disc">$1</li>'),a=a.replace(/((?:<li[^>]*>.*<\/li>\n?)+)/g,'<ul class="my-1 space-y-0.5 text-sm">$1</ul>'),a=a.replace(/^\d+\. (.+)$/gm,'<li class="ml-4 list-decimal">$1</li>'),a=a.replace(/\n\n/g,'</p><p class="my-1.5">'),a=a.replace(new RegExp("(?<!<\\/pre>|<\\/li>|<\\/ul>|<\\/h[23]>)\\n(?!<)","g"),"<br>"),`<p class="my-1.5">${a}</p>`}function hm({open:e,onOpenChange:a,onSaved:l,projects:r,agents:i,editPlan:u}){const[f,m]=v.useState(""),[g,p]=v.useState(""),[x,y]=v.useState("active"),[w,b]=v.useState("none"),[C,j]=v.useState("none"),[N,E]=v.useState(!1),[O,D]=v.useState(null),k=!!u;v.useEffect(()=>{u?(m(u.name),p(u.description||""),y(u.status),b(u.project_id||"none"),j(u.agent_id||"none")):(m(""),p(""),y("active"),b("none"),j("none")),D(null)},[u,e]);async function z(_){if(_.preventDefault(),!!f.trim()){E(!0),D(null);try{const H={name:f.trim(),status:x};g.trim()&&(H.description=g.trim()),w!=="none"&&(H.project_id=w),C!=="none"&&(H.agent_id=C);const L=k?`/api/plans/${u.id}`:"/api/plans",K=await(await fetch(L,{method:k?"PATCH":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(H)})).json();K.error?D(K.error):(a(!1),l())}catch{D(k?"Failed to update plan":"Failed to create plan")}finally{E(!1)}}}return c.jsx(ha,{open:e,onOpenChange:a,children:c.jsxs(qn,{className:"max-w-lg",children:[c.jsx(el,{children:c.jsx(pa,{children:k?"Edit Plan":"New Plan"})}),c.jsxs("form",{onSubmit:z,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Name"}),c.jsx(Zt,{value:f,onChange:_=>m(_.target.value),placeholder:"Plan name",className:"h-9",autoFocus:!0})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx("textarea",{value:g,onChange:_=>p(_.target.value),placeholder:"Plan description (supports markdown)",rows:8,className:"flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-y font-mono"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Supports markdown: **bold**, *italic*, `code`, ```code blocks```, lists, headings"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Status"}),c.jsxs(wn,{value:x,onValueChange:y,children:[c.jsx(sn,{className:"h-9",children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"active",children:"Active"}),c.jsx(Ee,{value:"completed",children:"Completed"}),c.jsx(Ee,{value:"archived",children:"Archived"})]})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Project"}),c.jsxs(wn,{value:w,onValueChange:b,children:[c.jsx(sn,{className:"h-9",children:c.jsx(Cn,{placeholder:"No project"})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"none",children:"No project"}),r.map(_=>c.jsx(Ee,{value:_.id,children:_.name},_.id))]})]})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Owner (Agent)"}),c.jsxs(wn,{value:C,onValueChange:j,children:[c.jsx(sn,{className:"h-9",children:c.jsx(Cn,{placeholder:"No owner"})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"none",children:"No owner"}),i.map(_=>c.jsx(Ee,{value:_.id,children:_.name},_.id))]})]})]}),O&&c.jsx("p",{className:"text-sm text-red-500",children:O}),c.jsxs(ti,{children:[c.jsx(oe,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsx(oe,{type:"submit",disabled:!f.trim()||N,children:N?k?"Saving...":"Creating...":k?"Save":"Create"})]})]})]})})}function AO({plan:e,open:a,onOpenChange:l,projects:r,agents:i}){var y,w;const[u,f]=v.useState(null),[m,g]=v.useState(!1);v.useEffect(()=>{if(!e||!a){f(null);return}g(!0),fetch(`/api/plans/${e.id}`).then(b=>b.json()).then(b=>{b&&b.id?f(b):f({...e,tasks:b.tasks||[]})}).catch(()=>f({...e,tasks:[]})).finally(()=>g(!1))},[e,a]);const p=v.useMemo(()=>{var b;return e!=null&&e.project_id?((b=r.find(C=>C.id===e.project_id))==null?void 0:b.name)||e.project_id.slice(0,8):null},[e,r]),x=v.useMemo(()=>{var b;return e!=null&&e.agent_id?((b=i.find(C=>C.id===e.agent_id))==null?void 0:b.name)||e.agent_id.slice(0,8):null},[e,i]);return e?c.jsx(ha,{open:a,onOpenChange:l,children:c.jsxs(qn,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[c.jsx(el,{children:c.jsxs(pa,{className:"flex items-center gap-2",children:[c.jsx(Xm,{className:"size-5 text-blue-500"}),e.name]})}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(Gt,{variant:$S(e.status),children:e.status}),p&&c.jsx(Gt,{variant:"outline",children:p}),x&&c.jsxs(Gt,{variant:"outline",className:"text-xs",children:["Owner: ",x]})]}),e.description&&c.jsxs(Nt,{className:"shadow-none",children:[c.jsx(Kt,{className:"pb-2",children:c.jsx(Xt,{className:"text-sm",children:"Description"})}),c.jsx(Mt,{children:c.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-sm leading-relaxed",dangerouslySetInnerHTML:{__html:kO(e.description)}})})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Task List"}),c.jsx("p",{className:"font-medium",children:e.task_list_id||"—"})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Created"}),c.jsx("p",{className:"font-medium",children:new Date(e.created_at).toLocaleString()})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Updated"}),c.jsx("p",{className:"font-medium",children:new Date(e.updated_at).toLocaleString()})]})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Tasks (",((y=u==null?void 0:u.tasks)==null?void 0:y.length)??0,")"]}),m?c.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading tasks..."}):(w=u==null?void 0:u.tasks)!=null&&w.length?c.jsx("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:u.tasks.map(b=>c.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-muted/50",children:[c.jsx("span",{className:`size-2 rounded-full shrink-0 ${TO(b.status).replace("text-","bg-")}`}),c.jsx("code",{className:"text-sm text-muted-foreground shrink-0",children:b.short_id||b.id.slice(0,8)}),c.jsx("span",{className:"truncate flex-1",children:b.title}),c.jsx(Gt,{variant:"outline",className:"text-xs shrink-0",children:b.priority}),c.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:b.assigned_to||"—"}),c.jsx("span",{className:"text-sm text-muted-foreground shrink-0",children:IS(b.updated_at)})]},b.id))}):c.jsx("p",{className:"text-sm text-muted-foreground",children:"No tasks in this plan."})]})]})]})}):null}function zO(){return[{id:"select",header:({table:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsAllPageRowsSelected(),onChange:a=>e.toggleAllPageRowsSelected(a.target.checked)}),cell:({row:e})=>c.jsx("input",{type:"checkbox",className:"rounded",checked:e.getIsSelected(),onChange:a=>{a.stopPropagation(),e.toggleSelected(a.target.checked)},onClick:a=>a.stopPropagation()}),size:30,enableSorting:!1},{accessorKey:"name",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Name ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Xm,{className:"size-4 text-blue-500 shrink-0"}),c.jsx("span",{className:"font-medium text-sm",children:e.original.name})]})},{accessorKey:"status",header:"Status",cell:({row:e})=>c.jsx(Gt,{variant:$S(e.original.status),children:e.original.status}),filterFn:(e,a,l)=>!l||l==="all"?!0:e.original.status===l},{accessorKey:"agent_id",header:"Owner",cell:({row:e,table:a})=>{var u;const l=a.options.meta,r=e.original.agent_id;if(!r)return c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"});const i=(u=l==null?void 0:l.agents)==null?void 0:u.find(f=>f.id===r);return c.jsx("span",{className:"text-sm",children:(i==null?void 0:i.name)||r.slice(0,8)})}},{accessorKey:"project_id",header:"Project",cell:({row:e,table:a})=>{var u;const l=a.options.meta,r=e.original.project_id;if(!r)return c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"});const i=(u=l==null?void 0:l.projects)==null?void 0:u.find(f=>f.id===r);return c.jsx("span",{className:"text-sm",children:(i==null?void 0:i.name)||r.slice(0,8)})}},{accessorKey:"description",header:"Description",cell:({row:e})=>{const a=e.original.description;if(!a)return c.jsx("span",{className:"text-sm text-muted-foreground",children:"—"});const l=a.length>80?a.slice(0,80)+"...":a;return c.jsx("span",{className:"text-sm text-muted-foreground truncate max-w-[250px] block",children:l})}},{accessorKey:"created_at",header:({column:e})=>c.jsxs(oe,{variant:"ghost",size:"sm",className:"-ml-3",onClick:()=>e.toggleSorting(),children:["Created ",c.jsx(bn,{className:"size-3"})]}),cell:({row:e})=>c.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:IS(e.original.created_at)})},{id:"actions",header:"",cell:({row:e,table:a})=>{const l=a.options.meta;return c.jsx("div",{onClick:r=>r.stopPropagation(),children:c.jsxs(Bl,{children:[c.jsx(Ul,{asChild:!0,children:c.jsx(oe,{variant:"ghost",size:"icon",className:"size-7",children:c.jsx($s,{className:"size-4"})})}),c.jsxs(Ja,{align:"end",children:[c.jsxs(mt,{onClick:()=>l==null?void 0:l.onEdit(e.original),children:[c.jsx(wo,{className:"size-3.5 mr-2"})," Edit"]}),c.jsx(Oo,{}),c.jsxs(mt,{className:"text-red-500 focus:text-red-500",onClick:()=>l==null?void 0:l.onDelete(e.original.id),children:[c.jsx(ua,{className:"size-3.5 mr-2"})," Delete"]})]})]})})},size:50}]}function PO(){const[e,a]=v.useState([]),[l,r]=v.useState([]),[i,u]=v.useState([]),[f,m]=v.useState(!0),[g,p]=v.useState([]),[x,y]=v.useState(""),[w,b]=v.useState("all"),[C,j]=v.useState({}),[N,E]=v.useState(!1),[O,D]=v.useState(null),[k,z]=v.useState(null),_=v.useRef(null),H=v.useMemo(()=>zO(),[]);function L(){fetch("/api/plans").then(A=>A.json()).then(a).finally(()=>m(!1))}function W(){fetch("/api/projects").then(A=>A.json()).then(A=>r(A))}function Y(){fetch("/api/agents").then(A=>A.json()).then(A=>u(A))}v.useEffect(()=>{L(),W(),Y()},[]),v.useEffect(()=>{function A(U){var ae,Z,T;if(U.key==="/"&&!U.ctrlKey&&!U.metaKey){const R=(ae=U.target)==null?void 0:ae.tagName;R!=="INPUT"&&R!=="TEXTAREA"&&(U.preventDefault(),(Z=_.current)==null||Z.focus())}U.key==="Escape"&&(k?z(null):(y(""),(T=_.current)==null||T.blur()))}return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[k]);async function K(A){await fetch(`/api/plans/${A}`,{method:"DELETE"}),a(U=>U.filter(ae=>ae.id!==A))}async function ee(A){await Promise.all(A.map(U=>fetch(`/api/plans/${U}`,{method:"DELETE"}))),a(U=>U.filter(ae=>!A.includes(ae.id))),j({})}const te=bu({data:e,columns:H,state:{sorting:g,globalFilter:x,rowSelection:C,columnFilters:w!=="all"?[{id:"status",value:w}]:[]},onSortingChange:p,onGlobalFilterChange:y,onRowSelectionChange:j,getCoreRowModel:pu(),getSortedRowModel:yu(),getFilteredRowModel:vu(),getPaginationRowModel:xu(),enableRowSelection:!0,getRowId:A=>A.id,initialState:{pagination:{pageSize:15}},meta:{onDelete:K,onEdit:A=>D(A),projects:l,agents:i}}),se=Object.keys(C).filter(A=>C[A]),ce=se.length>0;return f?c.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading plans..."}):e.length===0&&!N?c.jsxs("div",{className:"text-center py-12",children:[c.jsx(Xm,{className:"mx-auto size-10 text-muted-foreground/50 mb-3"}),c.jsx("p",{className:"text-muted-foreground",children:"No plans yet."}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Plans help you organize groups of tasks into execution phases."}),c.jsxs(oe,{variant:"outline",size:"sm",className:"mt-4 gap-1.5",onClick:()=>E(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Plan"]}),c.jsx(hm,{open:N,onOpenChange:E,onSaved:L,projects:l,agents:i})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[c.jsx(Jc,{className:"absolute left-2.5 top-2.5 size-3.5 text-muted-foreground"}),c.jsx(Zt,{ref:_,placeholder:"Search plans... (press /)",value:x,onChange:A=>y(A.target.value),className:"pl-8 h-9"})]}),c.jsxs(wn,{value:w,onValueChange:b,children:[c.jsx(sn,{className:"h-9 w-[140px]",children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"all",children:"All Statuses"}),c.jsx(Ee,{value:"active",children:"Active"}),c.jsx(Ee,{value:"completed",children:"Completed"}),c.jsx(Ee,{value:"archived",children:"Archived"})]})]}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:[te.getFilteredRowModel().rows.length," plan(s)"]}),c.jsx("div",{className:"flex-1"}),c.jsxs(oe,{variant:"outline",size:"sm",className:"gap-1.5 h-9",onClick:()=>E(!0),children:[c.jsx(Ol,{className:"size-3.5"})," New Plan"]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(Qs,{children:[c.jsx(Zs,{children:te.getHeaderGroups().map(A=>c.jsx(Sn,{children:A.headers.map(U=>c.jsx(ei,{children:U.isPlaceholder?null:Pl(U.column.columnDef.header,U.getContext())},U.id))},A.id))}),c.jsx(Js,{children:te.getRowModel().rows.length?te.getRowModel().rows.map(A=>c.jsx(Sn,{className:"cursor-pointer","data-state":A.getIsSelected()?"selected":void 0,onClick:()=>z(A.original),children:A.getVisibleCells().map(U=>c.jsx(Wa,{children:Pl(U.column.columnDef.cell,U.getContext())},U.id))},A.id)):c.jsx(Sn,{children:c.jsx(Wa,{colSpan:H.length,className:"h-24 text-center text-muted-foreground",children:"No plans found."})})})]})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[te.getFilteredRowModel().rows.length," plan(s)"]}),te.getPageCount()>1&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>te.previousPage(),disabled:!te.getCanPreviousPage(),children:c.jsx(Is,{className:"size-3.5"})}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",te.getState().pagination.pageIndex+1," of"," ",te.getPageCount()]}),c.jsx(oe,{variant:"outline",size:"sm",onClick:()=>te.nextPage(),disabled:!te.getCanNextPage(),children:c.jsx(So,{className:"size-3.5"})})]})]}),ce&&c.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-3 rounded-xl border bg-background px-5 py-3 shadow-xl",children:[c.jsxs("span",{className:"text-sm font-medium",children:[se.length," selected"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs(oe,{variant:"outline",size:"sm",className:"h-7 text-sm text-red-500",onClick:()=>ee(se),children:[c.jsx(ua,{className:"size-3"})," Delete"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx(oe,{variant:"ghost",size:"sm",className:"h-7 text-sm",onClick:()=>j({}),children:"Clear"})]}),c.jsx(hm,{open:N,onOpenChange:E,onSaved:L,projects:l,agents:i}),c.jsx(hm,{open:!!O,onOpenChange:A=>{A||D(null)},onSaved:L,projects:l,agents:i,editPlan:O}),c.jsx(AO,{plan:k,open:!!k,onOpenChange:A=>{A||z(null)},projects:l,agents:i})]})}function HO(){return c.jsxs("div",{className:"space-y-6",children:[c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsx(Xt,{className:"text-sm",children:"Agent-native & headless"})}),c.jsxs(Mt,{className:"space-y-2 text-sm text-muted-foreground",children:[c.jsxs("p",{children:[c.jsx("strong",{className:"text-foreground",children:"CLI and MCP are the primary surfaces."})," This dashboard is an optional local admin view that talks only to ",c.jsx("code",{className:"font-mono",children:"/api/*"})," on your machine — there is no sign-in, no hosted auth, and no connection to hosted platform services."]}),c.jsxs("p",{children:["For agent workflows use ",c.jsx("code",{className:"font-mono",children:"todos claim"}),", ",c.jsx("code",{className:"font-mono",children:"todos-mcp"}),", or"," ",c.jsx("code",{className:"font-mono",children:"TODOS_PROFILE=minimal"}),". Native remote storage is explicit opt-in through storage configuration."]})]})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsx(Xt,{className:"text-sm",children:"How it works"})}),c.jsx(Mt,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[c.jsx(Hc,{n:"1",label:"Install",desc:"bun install -g @hasna/todos"}),c.jsx(qf,{className:"size-4 text-muted-foreground shrink-0"}),c.jsx(Hc,{n:"2",label:"Add tasks",desc:"todos add 'Fix login bug'"}),c.jsx(qf,{className:"size-4 text-muted-foreground shrink-0"}),c.jsx(Hc,{n:"3",label:"Connect AI",desc:"Add todos-mcp to your agent"}),c.jsx(qf,{className:"size-4 text-muted-foreground shrink-0"}),c.jsx(Hc,{n:"4",label:"Track",desc:"todos serve or todos interactive"})]})})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(cj,{className:"size-4"})," Keyboard Shortcuts"]})}),c.jsx(Mt,{children:c.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-sm sm:grid-cols-3",children:[c.jsx(Fa,{keys:"/",label:"Focus search"}),c.jsx(Fa,{keys:"n",label:"New task"}),c.jsx(Fa,{keys:"r",label:"Reload data"}),c.jsx(Fa,{keys:"0",label:"Dashboard"}),c.jsx(Fa,{keys:"1",label:"Tasks"}),c.jsx(Fa,{keys:"2",label:"Projects"}),c.jsx(Fa,{keys:"3",label:"Agents"}),c.jsx(Fa,{keys:"4",label:"Help"}),c.jsx(Fa,{keys:"Esc",label:"Back / clear"})]})})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(pj,{className:"size-4"})," CLI Commands"]})}),c.jsx(Mt,{children:c.jsxs("div",{className:"space-y-2 text-sm",children:[c.jsx(ra,{cmd:"todos add 'Task'",desc:"Create a new task"}),c.jsx(ra,{cmd:"todos list",desc:"List all tasks"}),c.jsx(ra,{cmd:"todos list --status pending",desc:"Filter by status"}),c.jsx(ra,{cmd:"todos show <id>",desc:"Show task details"}),c.jsx(ra,{cmd:"todos start <id>",desc:"Start a task"}),c.jsx(ra,{cmd:"todos done <id>",desc:"Complete a task"}),c.jsx(ra,{cmd:"todos search 'query'",desc:"Full-text search"}),c.jsx(ra,{cmd:"todos serve",desc:"Start web dashboard"}),c.jsx(ra,{cmd:"todos interactive",desc:"Interactive TUI"}),c.jsx(ra,{cmd:"todos sync --task-list <id>",desc:"Sync with Claude Code"})]})})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(gj,{className:"size-4"})," MCP Server"]})}),c.jsxs(Mt,{children:[c.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Add to your Claude Code or AI agent config:"}),c.jsx("pre",{className:"rounded-lg bg-muted p-3 text-sm font-mono overflow-x-auto",children:`{
|
|
336
|
+
"mcpServers": {
|
|
337
|
+
"todos": {
|
|
338
|
+
"command": "todos-mcp",
|
|
339
|
+
"args": []
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}`}),c.jsx("p",{className:"text-sm text-muted-foreground mt-3",children:"29 tools available: create_task, list_tasks, get_task, update_task, delete_task, start_task, complete_task, lock_task, unlock_task, add_dependency, remove_dependency, add_comment, create_project, list_projects, create_plan, list_plans, get_plan, update_plan, delete_plan, register_agent, list_agents, get_agent, create_task_list, list_task_lists, get_task_list, update_task_list, delete_task_list, search_tasks, sync."})]})]}),c.jsxs(Nt,{children:[c.jsx(Kt,{className:"pb-3",children:c.jsxs(Xt,{className:"text-sm flex items-center gap-2",children:[c.jsx(lj,{className:"size-4"})," Resources"]})}),c.jsx(Mt,{children:c.jsxs("div",{className:"space-y-2 text-sm",children:[c.jsx("a",{href:"https://github.com/hasna/todos",target:"_blank",rel:"noopener noreferrer",className:"block text-primary hover:underline",children:"GitHub Repository"}),c.jsx("a",{href:"https://github.com/hasna/todos#readme",target:"_blank",rel:"noopener noreferrer",className:"block text-primary hover:underline",children:"Documentation"}),c.jsx("a",{href:"https://github.com/hasna/todos/issues",target:"_blank",rel:"noopener noreferrer",className:"block text-primary hover:underline",children:"Report Issues"}),c.jsx("a",{href:"https://www.npmjs.com/package/@hasna/todos",target:"_blank",rel:"noopener noreferrer",className:"block text-primary hover:underline",children:"npm Package"})]})})]})]})}function Hc({n:e,label:a,desc:l}){return c.jsxs("div",{className:"flex items-center gap-2 rounded-lg border px-3 py-2",children:[c.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-primary text-primary-foreground text-sm font-bold",children:e}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium",children:a}),c.jsx("code",{className:"text-muted-foreground font-mono text-sm",children:l})]})]})}function Fa({keys:e,label:a}){return c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("span",{className:"text-muted-foreground",children:a}),c.jsx("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-sm font-mono",children:e})]})}function ra({cmd:e,desc:a}){return c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("code",{className:"rounded bg-muted px-2 py-0.5 text-sm font-mono shrink-0",children:e}),c.jsx("span",{className:"text-muted-foreground",children:a})]})}const GS=6048e5,FO=864e5,YS=6e4,qS=36e5,Jy=Symbol.for("constructDateFrom");function pt(e,a){return typeof e=="function"?e(a):e&&typeof e=="object"&&Jy in e?e[Jy](a):e instanceof Date?new e.constructor(a):new Date(a)}function Xe(e,a){return pt(a||e,e)}function WS(e,a,l){const r=Xe(e,l==null?void 0:l.in);return isNaN(a)?pt(e,NaN):(a&&r.setDate(r.getDate()+a),r)}function KS(e,a,l){const r=Xe(e,l==null?void 0:l.in);if(isNaN(a))return pt(e,NaN);if(!a)return r;const i=r.getDate(),u=pt(e,r.getTime());u.setMonth(r.getMonth()+a+1,0);const f=u.getDate();return i>=f?u:(r.setFullYear(u.getFullYear(),u.getMonth(),i),r)}let LO={};function ni(){return LO}function yo(e,a){var m,g,p,x;const l=ni(),r=(a==null?void 0:a.weekStartsOn)??((g=(m=a==null?void 0:a.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??l.weekStartsOn??((x=(p=l.locale)==null?void 0:p.options)==null?void 0:x.weekStartsOn)??0,i=Xe(e,a==null?void 0:a.in),u=i.getDay(),f=(u<r?7:0)+u-r;return i.setDate(i.getDate()-f),i.setHours(0,0,0,0),i}function Vs(e,a){return yo(e,{...a,weekStartsOn:1})}function XS(e,a){const l=Xe(e,a==null?void 0:a.in),r=l.getFullYear(),i=pt(l,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const u=Vs(i),f=pt(l,0);f.setFullYear(r,0,4),f.setHours(0,0,0,0);const m=Vs(f);return l.getTime()>=u.getTime()?r+1:l.getTime()>=m.getTime()?r:r-1}function e0(e){const a=Xe(e),l=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return l.setUTCFullYear(a.getFullYear()),+e-+l}function To(e,...a){const l=pt.bind(null,a.find(r=>typeof r=="object"));return a.map(l)}function Bs(e,a){const l=Xe(e,a==null?void 0:a.in);return l.setHours(0,0,0,0),l}function Lh(e,a,l){const[r,i]=To(l==null?void 0:l.in,e,a),u=Bs(r),f=Bs(i),m=+u-e0(u),g=+f-e0(f);return Math.round((m-g)/FO)}function VO(e,a){const l=XS(e,a),r=pt(e,0);return r.setFullYear(l,0,4),r.setHours(0,0,0,0),Vs(r)}function BO(e,a,l){return WS(e,a*7,l)}function UO(e,a,l){return KS(e,a*12,l)}function IO(e,a){let l,r=a==null?void 0:a.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=pt.bind(null,i));const u=Xe(i,r);(!l||l<u||isNaN(+u))&&(l=u)}),pt(r,l||NaN)}function $O(e,a){let l,r=a==null?void 0:a.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=pt.bind(null,i));const u=Xe(i,r);(!l||l>u||isNaN(+u))&&(l=u)}),pt(r,l||NaN)}function GO(e,a,l){const[r,i]=To(l==null?void 0:l.in,e,a);return+Bs(r)==+Bs(i)}function QS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function YO(e){return!(!QS(e)&&typeof e!="number"||isNaN(+Xe(e)))}function ZS(e,a,l){const[r,i]=To(l==null?void 0:l.in,e,a),u=r.getFullYear()-i.getFullYear(),f=r.getMonth()-i.getMonth();return u*12+f}function qO(e,a){const l=Xe(e,a==null?void 0:a.in),r=l.getMonth();return l.setFullYear(l.getFullYear(),r+1,0),l.setHours(23,59,59,999),l}function JS(e,a){const[l,r]=To(e,a.start,a.end);return{start:l,end:r}}function WO(e,a){const{start:l,end:r}=JS(a==null?void 0:a.in,e);let i=+l>+r;const u=i?+l:+r,f=i?r:l;f.setHours(0,0,0,0),f.setDate(1);let m=1;const g=[];for(;+f<=u;)g.push(pt(l,f)),f.setMonth(f.getMonth()+m);return i?g.reverse():g}function KO(e,a){const l=Xe(e,a==null?void 0:a.in);return l.setDate(1),l.setHours(0,0,0,0),l}function XO(e,a){const l=Xe(e,a==null?void 0:a.in),r=l.getFullYear();return l.setFullYear(r+1,0,0),l.setHours(23,59,59,999),l}function ew(e,a){const l=Xe(e,a==null?void 0:a.in);return l.setFullYear(l.getFullYear(),0,1),l.setHours(0,0,0,0),l}function QO(e,a){const{start:l,end:r}=JS(a==null?void 0:a.in,e);let i=+l>+r;const u=i?+l:+r,f=i?r:l;f.setHours(0,0,0,0),f.setMonth(0,1);let m=1;const g=[];for(;+f<=u;)g.push(pt(l,f)),f.setFullYear(f.getFullYear()+m);return i?g.reverse():g}function tw(e,a){var m,g,p,x;const l=ni(),r=(a==null?void 0:a.weekStartsOn)??((g=(m=a==null?void 0:a.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??l.weekStartsOn??((x=(p=l.locale)==null?void 0:p.options)==null?void 0:x.weekStartsOn)??0,i=Xe(e,a==null?void 0:a.in),u=i.getDay(),f=(u<r?-7:0)+6-(u-r);return i.setDate(i.getDate()+f),i.setHours(23,59,59,999),i}function ZO(e,a){return tw(e,{...a,weekStartsOn:1})}const JO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eT=(e,a,l)=>{let r;const i=JO[e];return typeof i=="string"?r=i:a===1?r=i.one:r=i.other.replace("{{count}}",a.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+r:r+" ago":r};function gm(e){return(a={})=>{const l=a.width?String(a.width):e.defaultWidth;return e.formats[l]||e.formats[e.defaultWidth]}}const tT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lT={date:gm({formats:tT,defaultWidth:"full"}),time:gm({formats:nT,defaultWidth:"full"}),dateTime:gm({formats:aT,defaultWidth:"full"})},rT={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},oT=(e,a,l,r)=>rT[e];function Rs(e){return(a,l)=>{const r=l!=null&&l.context?String(l.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const f=e.defaultFormattingWidth||e.defaultWidth,m=l!=null&&l.width?String(l.width):f;i=e.formattingValues[m]||e.formattingValues[f]}else{const f=e.defaultWidth,m=l!=null&&l.width?String(l.width):e.defaultWidth;i=e.values[m]||e.values[f]}const u=e.argumentCallback?e.argumentCallback(a):a;return i[u]}}const sT={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iT={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cT={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uT={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mT=(e,a)=>{const l=Number(e),r=l%100;if(r>20||r<10)switch(r%10){case 1:return l+"st";case 2:return l+"nd";case 3:return l+"rd"}return l+"th"},hT={ordinalNumber:mT,era:Rs({values:sT,defaultWidth:"wide"}),quarter:Rs({values:iT,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Rs({values:cT,defaultWidth:"wide"}),day:Rs({values:uT,defaultWidth:"wide"}),dayPeriod:Rs({values:dT,defaultWidth:"wide",formattingValues:fT,defaultFormattingWidth:"wide"})};function Es(e){return(a,l={})=>{const r=l.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],u=a.match(i);if(!u)return null;const f=u[0],m=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],g=Array.isArray(m)?pT(m,y=>y.test(f)):gT(m,y=>y.test(f));let p;p=e.valueCallback?e.valueCallback(g):g,p=l.valueCallback?l.valueCallback(p):p;const x=a.slice(f.length);return{value:p,rest:x}}}function gT(e,a){for(const l in e)if(Object.prototype.hasOwnProperty.call(e,l)&&a(e[l]))return l}function pT(e,a){for(let l=0;l<e.length;l++)if(a(e[l]))return l}function vT(e){return(a,l={})=>{const r=a.match(e.matchPattern);if(!r)return null;const i=r[0],u=a.match(e.parsePattern);if(!u)return null;let f=e.valueCallback?e.valueCallback(u[0]):u[0];f=l.valueCallback?l.valueCallback(f):f;const m=a.slice(i.length);return{value:f,rest:m}}}const xT=/^(\d+)(th|st|nd|rd)?/i,yT=/\d+/i,bT={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ST={any:[/^b/i,/^(a|c)/i]},wT={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CT={any:[/1/i,/2/i,/3/i,/4/i]},jT={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},NT={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},MT={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},_T={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},DT={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},RT={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ET={ordinalNumber:vT({matchPattern:xT,parsePattern:yT,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:bT,defaultMatchWidth:"wide",parsePatterns:ST,defaultParseWidth:"any"}),quarter:Es({matchPatterns:wT,defaultMatchWidth:"wide",parsePatterns:CT,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:jT,defaultMatchWidth:"wide",parsePatterns:NT,defaultParseWidth:"any"}),day:Es({matchPatterns:MT,defaultMatchWidth:"wide",parsePatterns:_T,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:DT,defaultMatchWidth:"any",parsePatterns:RT,defaultParseWidth:"any"})},mo={code:"en-US",formatDistance:eT,formatLong:lT,formatRelative:oT,localize:hT,match:ET,options:{weekStartsOn:0,firstWeekContainsDate:1}};function OT(e,a){const l=Xe(e,a==null?void 0:a.in);return Lh(l,ew(l))+1}function Vh(e,a){const l=Xe(e,a==null?void 0:a.in),r=+Vs(l)-+VO(l);return Math.round(r/GS)+1}function nw(e,a){var x,y,w,b;const l=Xe(e,a==null?void 0:a.in),r=l.getFullYear(),i=ni(),u=(a==null?void 0:a.firstWeekContainsDate)??((y=(x=a==null?void 0:a.locale)==null?void 0:x.options)==null?void 0:y.firstWeekContainsDate)??i.firstWeekContainsDate??((b=(w=i.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??1,f=pt((a==null?void 0:a.in)||e,0);f.setFullYear(r+1,0,u),f.setHours(0,0,0,0);const m=yo(f,a),g=pt((a==null?void 0:a.in)||e,0);g.setFullYear(r,0,u),g.setHours(0,0,0,0);const p=yo(g,a);return+l>=+m?r+1:+l>=+p?r:r-1}function TT(e,a){var m,g,p,x;const l=ni(),r=(a==null?void 0:a.firstWeekContainsDate)??((g=(m=a==null?void 0:a.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??l.firstWeekContainsDate??((x=(p=l.locale)==null?void 0:p.options)==null?void 0:x.firstWeekContainsDate)??1,i=nw(e,a),u=pt((a==null?void 0:a.in)||e,0);return u.setFullYear(i,0,r),u.setHours(0,0,0,0),yo(u,a)}function Bh(e,a){const l=Xe(e,a==null?void 0:a.in),r=+yo(l,a)-+TT(l,a);return Math.round(r/GS)+1}function Je(e,a){const l=e<0?"-":"",r=Math.abs(e).toString().padStart(a,"0");return l+r}const _l={y(e,a){const l=e.getFullYear(),r=l>0?l:1-l;return Je(a==="yy"?r%100:r,a.length)},M(e,a){const l=e.getMonth();return a==="M"?String(l+1):Je(l+1,2)},d(e,a){return Je(e.getDate(),a.length)},a(e,a){const l=e.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h(e,a){return Je(e.getHours()%12||12,a.length)},H(e,a){return Je(e.getHours(),a.length)},m(e,a){return Je(e.getMinutes(),a.length)},s(e,a){return Je(e.getSeconds(),a.length)},S(e,a){const l=a.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,l-3));return Je(i,a.length)}},co={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},t0={G:function(e,a,l){const r=e.getFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return l.era(r,{width:"abbreviated"});case"GGGGG":return l.era(r,{width:"narrow"});case"GGGG":default:return l.era(r,{width:"wide"})}},y:function(e,a,l){if(a==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return l.ordinalNumber(i,{unit:"year"})}return _l.y(e,a)},Y:function(e,a,l,r){const i=nw(e,r),u=i>0?i:1-i;if(a==="YY"){const f=u%100;return Je(f,2)}return a==="Yo"?l.ordinalNumber(u,{unit:"year"}):Je(u,a.length)},R:function(e,a){const l=XS(e);return Je(l,a.length)},u:function(e,a){const l=e.getFullYear();return Je(l,a.length)},Q:function(e,a,l){const r=Math.ceil((e.getMonth()+1)/3);switch(a){case"Q":return String(r);case"QQ":return Je(r,2);case"Qo":return l.ordinalNumber(r,{unit:"quarter"});case"QQQ":return l.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return l.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return l.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,a,l){const r=Math.ceil((e.getMonth()+1)/3);switch(a){case"q":return String(r);case"qq":return Je(r,2);case"qo":return l.ordinalNumber(r,{unit:"quarter"});case"qqq":return l.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return l.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return l.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,a,l){const r=e.getMonth();switch(a){case"M":case"MM":return _l.M(e,a);case"Mo":return l.ordinalNumber(r+1,{unit:"month"});case"MMM":return l.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return l.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return l.month(r,{width:"wide",context:"formatting"})}},L:function(e,a,l){const r=e.getMonth();switch(a){case"L":return String(r+1);case"LL":return Je(r+1,2);case"Lo":return l.ordinalNumber(r+1,{unit:"month"});case"LLL":return l.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return l.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return l.month(r,{width:"wide",context:"standalone"})}},w:function(e,a,l,r){const i=Bh(e,r);return a==="wo"?l.ordinalNumber(i,{unit:"week"}):Je(i,a.length)},I:function(e,a,l){const r=Vh(e);return a==="Io"?l.ordinalNumber(r,{unit:"week"}):Je(r,a.length)},d:function(e,a,l){return a==="do"?l.ordinalNumber(e.getDate(),{unit:"date"}):_l.d(e,a)},D:function(e,a,l){const r=OT(e);return a==="Do"?l.ordinalNumber(r,{unit:"dayOfYear"}):Je(r,a.length)},E:function(e,a,l){const r=e.getDay();switch(a){case"E":case"EE":case"EEE":return l.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return l.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return l.day(r,{width:"short",context:"formatting"});case"EEEE":default:return l.day(r,{width:"wide",context:"formatting"})}},e:function(e,a,l,r){const i=e.getDay(),u=(i-r.weekStartsOn+8)%7||7;switch(a){case"e":return String(u);case"ee":return Je(u,2);case"eo":return l.ordinalNumber(u,{unit:"day"});case"eee":return l.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return l.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return l.day(i,{width:"short",context:"formatting"});case"eeee":default:return l.day(i,{width:"wide",context:"formatting"})}},c:function(e,a,l,r){const i=e.getDay(),u=(i-r.weekStartsOn+8)%7||7;switch(a){case"c":return String(u);case"cc":return Je(u,a.length);case"co":return l.ordinalNumber(u,{unit:"day"});case"ccc":return l.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return l.day(i,{width:"narrow",context:"standalone"});case"cccccc":return l.day(i,{width:"short",context:"standalone"});case"cccc":default:return l.day(i,{width:"wide",context:"standalone"})}},i:function(e,a,l){const r=e.getDay(),i=r===0?7:r;switch(a){case"i":return String(i);case"ii":return Je(i,a.length);case"io":return l.ordinalNumber(i,{unit:"day"});case"iii":return l.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return l.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return l.day(r,{width:"short",context:"formatting"});case"iiii":default:return l.day(r,{width:"wide",context:"formatting"})}},a:function(e,a,l){const i=e.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return l.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return l.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return l.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return l.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,a,l){const r=e.getHours();let i;switch(r===12?i=co.noon:r===0?i=co.midnight:i=r/12>=1?"pm":"am",a){case"b":case"bb":return l.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return l.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return l.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return l.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,a,l){const r=e.getHours();let i;switch(r>=17?i=co.evening:r>=12?i=co.afternoon:r>=4?i=co.morning:i=co.night,a){case"B":case"BB":case"BBB":return l.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return l.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return l.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,a,l){if(a==="ho"){let r=e.getHours()%12;return r===0&&(r=12),l.ordinalNumber(r,{unit:"hour"})}return _l.h(e,a)},H:function(e,a,l){return a==="Ho"?l.ordinalNumber(e.getHours(),{unit:"hour"}):_l.H(e,a)},K:function(e,a,l){const r=e.getHours()%12;return a==="Ko"?l.ordinalNumber(r,{unit:"hour"}):Je(r,a.length)},k:function(e,a,l){let r=e.getHours();return r===0&&(r=24),a==="ko"?l.ordinalNumber(r,{unit:"hour"}):Je(r,a.length)},m:function(e,a,l){return a==="mo"?l.ordinalNumber(e.getMinutes(),{unit:"minute"}):_l.m(e,a)},s:function(e,a,l){return a==="so"?l.ordinalNumber(e.getSeconds(),{unit:"second"}):_l.s(e,a)},S:function(e,a){return _l.S(e,a)},X:function(e,a,l){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(a){case"X":return a0(r);case"XXXX":case"XX":return fr(r);case"XXXXX":case"XXX":default:return fr(r,":")}},x:function(e,a,l){const r=e.getTimezoneOffset();switch(a){case"x":return a0(r);case"xxxx":case"xx":return fr(r);case"xxxxx":case"xxx":default:return fr(r,":")}},O:function(e,a,l){const r=e.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+n0(r,":");case"OOOO":default:return"GMT"+fr(r,":")}},z:function(e,a,l){const r=e.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+n0(r,":");case"zzzz":default:return"GMT"+fr(r,":")}},t:function(e,a,l){const r=Math.trunc(+e/1e3);return Je(r,a.length)},T:function(e,a,l){return Je(+e,a.length)}};function n0(e,a=""){const l=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),u=r%60;return u===0?l+String(i):l+String(i)+a+Je(u,2)}function a0(e,a){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):fr(e,a)}function fr(e,a=""){const l=e>0?"-":"+",r=Math.abs(e),i=Je(Math.trunc(r/60),2),u=Je(r%60,2);return l+i+a+u}const l0=(e,a)=>{switch(e){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},aw=(e,a)=>{switch(e){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},kT=(e,a)=>{const l=e.match(/(P+)(p+)?/)||[],r=l[1],i=l[2];if(!i)return l0(e,a);let u;switch(r){case"P":u=a.dateTime({width:"short"});break;case"PP":u=a.dateTime({width:"medium"});break;case"PPP":u=a.dateTime({width:"long"});break;case"PPPP":default:u=a.dateTime({width:"full"});break}return u.replace("{{date}}",l0(r,a)).replace("{{time}}",aw(i,a))},AT={p:aw,P:kT},zT=/^D+$/,PT=/^Y+$/,HT=["D","DD","YY","YYYY"];function FT(e){return zT.test(e)}function LT(e){return PT.test(e)}function VT(e,a,l){const r=BT(e,a,l);if(console.warn(r),HT.includes(e))throw new RangeError(r)}function BT(e,a,l){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${a}\`) for formatting ${r} to the input \`${l}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const UT=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IT=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$T=/^'([^]*?)'?$/,GT=/''/g,YT=/[a-zA-Z]/;function mr(e,a,l){var x,y,w,b,C,j,N,E;const r=ni(),i=(l==null?void 0:l.locale)??r.locale??mo,u=(l==null?void 0:l.firstWeekContainsDate)??((y=(x=l==null?void 0:l.locale)==null?void 0:x.options)==null?void 0:y.firstWeekContainsDate)??r.firstWeekContainsDate??((b=(w=r.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??1,f=(l==null?void 0:l.weekStartsOn)??((j=(C=l==null?void 0:l.locale)==null?void 0:C.options)==null?void 0:j.weekStartsOn)??r.weekStartsOn??((E=(N=r.locale)==null?void 0:N.options)==null?void 0:E.weekStartsOn)??0,m=Xe(e,l==null?void 0:l.in);if(!YO(m))throw new RangeError("Invalid time value");let g=a.match(IT).map(O=>{const D=O[0];if(D==="p"||D==="P"){const k=AT[D];return k(O,i.formatLong)}return O}).join("").match(UT).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const D=O[0];if(D==="'")return{isToken:!1,value:qT(O)};if(t0[D])return{isToken:!0,value:O};if(D.match(YT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:O}});i.localize.preprocessor&&(g=i.localize.preprocessor(m,g));const p={firstWeekContainsDate:u,weekStartsOn:f,locale:i};return g.map(O=>{if(!O.isToken)return O.value;const D=O.value;(!(l!=null&&l.useAdditionalWeekYearTokens)&<(D)||!(l!=null&&l.useAdditionalDayOfYearTokens)&&FT(D))&&VT(D,a,String(e));const k=t0[D[0]];return k(m,D,i.localize,p)}).join("")}function qT(e){const a=e.match($T);return a?a[1].replace(GT,"'"):e}function WT(e,a){const l=Xe(e,a==null?void 0:a.in),r=l.getFullYear(),i=l.getMonth(),u=pt(l,0);return u.setFullYear(r,i+1,0),u.setHours(0,0,0,0),u.getDate()}function KT(e,a){return Xe(e,a==null?void 0:a.in).getMonth()}function XT(e,a){return Xe(e,a==null?void 0:a.in).getFullYear()}function QT(e,a){return+Xe(e)>+Xe(a)}function ZT(e,a){return+Xe(e)<+Xe(a)}function JT(e,a,l){const[r,i]=To(l==null?void 0:l.in,e,a);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function ek(e,a,l){const[r,i]=To(l==null?void 0:l.in,e,a);return r.getFullYear()===i.getFullYear()}function tk(e,a){const l=()=>pt(a==null?void 0:a.in,NaN),i=rk(e);let u;if(i.date){const p=ok(i.date,2);u=sk(p.restDateString,p.year)}if(!u||isNaN(+u))return l();const f=+u;let m=0,g;if(i.time&&(m=ik(i.time),isNaN(m)))return l();if(i.timezone){if(g=ck(i.timezone),isNaN(g))return l()}else{const p=new Date(f+m),x=Xe(0,a==null?void 0:a.in);return x.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),x.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),x}return Xe(f+m+g,a==null?void 0:a.in)}const Fc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nk=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ak=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,lk=/^([+-])(\d{2})(?::?(\d{2}))?$/;function rk(e){const a={},l=e.split(Fc.dateTimeDelimiter);let r;if(l.length>2)return a;if(/:/.test(l[0])?r=l[0]:(a.date=l[0],r=l[1],Fc.timeZoneDelimiter.test(a.date)&&(a.date=e.split(Fc.timeZoneDelimiter)[0],r=e.substr(a.date.length,e.length))),r){const i=Fc.timezone.exec(r);i?(a.time=r.replace(i[1],""),a.timezone=i[1]):a.time=r}return a}function ok(e,a){const l=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),r=e.match(l);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,u=r[2]?parseInt(r[2]):null;return{year:u===null?i:u*100,restDateString:e.slice((r[1]||r[2]).length)}}function sk(e,a){if(a===null)return new Date(NaN);const l=e.match(nk);if(!l)return new Date(NaN);const r=!!l[4],i=Os(l[1]),u=Os(l[2])-1,f=Os(l[3]),m=Os(l[4]),g=Os(l[5])-1;if(r)return hk(a,m,g)?uk(a,m,g):new Date(NaN);{const p=new Date(0);return!fk(a,u,f)||!mk(a,i)?new Date(NaN):(p.setUTCFullYear(a,u,Math.max(i,f)),p)}}function Os(e){return e?parseInt(e):1}function ik(e){const a=e.match(ak);if(!a)return NaN;const l=pm(a[1]),r=pm(a[2]),i=pm(a[3]);return gk(l,r,i)?l*qS+r*YS+i*1e3:NaN}function pm(e){return e&&parseFloat(e.replace(",","."))||0}function ck(e){if(e==="Z")return 0;const a=e.match(lk);if(!a)return 0;const l=a[1]==="+"?-1:1,r=parseInt(a[2]),i=a[3]&&parseInt(a[3])||0;return pk(r,i)?l*(r*qS+i*YS):NaN}function uk(e,a,l){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,u=(a-1)*7+l+1-i;return r.setUTCDate(r.getUTCDate()+u),r}const dk=[31,null,31,30,31,30,31,31,30,31,30,31];function lw(e){return e%400===0||e%4===0&&e%100!==0}function fk(e,a,l){return a>=0&&a<=11&&l>=1&&l<=(dk[a]||(lw(e)?29:28))}function mk(e,a){return a>=1&&a<=(lw(e)?366:365)}function hk(e,a,l){return a>=1&&a<=53&&l>=0&&l<=6}function gk(e,a,l){return e===24?a===0&&l===0:l>=0&&l<60&&a>=0&&a<60&&e>=0&&e<25}function pk(e,a){return a>=0&&a<=59}function vk(e,a,l){const r=Xe(e,l==null?void 0:l.in),i=r.getFullYear(),u=r.getDate(),f=pt(e,0);f.setFullYear(i,a,15),f.setHours(0,0,0,0);const m=WT(f);return r.setMonth(a,Math.min(u,m)),r}function xk(e,a,l){const r=Xe(e,l==null?void 0:l.in);return isNaN(+r)?pt(e,NaN):(r.setFullYear(a),r)}function yk(e,a,l="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:l}).format(a).split(/\s/g).slice(2).join(" ")}const vm={},Ts={};function Ba(e,a){try{const r=(vm[e]||(vm[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(a).split("GMT")[1];return r in Ts?Ts[r]:r0(r,r.split(":"))}catch{if(e in Ts)return Ts[e];const l=e==null?void 0:e.match(bk);return l?r0(e,l.slice(1)):NaN}}const bk=/([+-]\d\d):?(\d\d)?/;function r0(e,a){const l=+(a[0]||0),r=+(a[1]||0),i=+(a[2]||0)/60;return Ts[e]=l*60+r>0?l*60+r+i:l*60-r-i}class ca extends Date{constructor(...a){super(),a.length>1&&typeof a[a.length-1]=="string"&&(this.timeZone=a.pop()),this.internal=new Date,isNaN(Ba(this.timeZone,this))?this.setTime(NaN):a.length?typeof a[0]=="number"&&(a.length===1||a.length===2&&typeof a[1]!="number")?this.setTime(a[0]):typeof a[0]=="string"?this.setTime(+new Date(a[0])):a[0]instanceof Date?this.setTime(+a[0]):(this.setTime(+new Date(...a)),rw(this,a)):this.setTime(Date.now())}static tz(a,...l){return l.length?new ca(...l,a):new ca(Date.now(),a)}withTimeZone(a){return new ca(+this,a)}getTimezoneOffset(){const a=-Ba(this.timeZone,this);return a>0?Math.floor(a):Math.ceil(a)}setTime(a){return Date.prototype.setTime.apply(this,arguments),Qc(this),+this}[Symbol.for("constructDateFrom")](a){return new ca(+new Date(a),this.timeZone)}}const o0=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!o0.test(e))return;const a=e.replace(o0,"$1UTC");ca.prototype[a]&&(e.startsWith("get")?ca.prototype[e]=function(){return this.internal[a]()}:(ca.prototype[e]=function(){return Date.prototype[a].apply(this.internal,arguments),Sk(this),+this},ca.prototype[a]=function(){return Date.prototype[a].apply(this,arguments),Qc(this),+this}))});function Qc(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ba(e.timeZone,e)*60))}function Sk(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),rw(e)}function rw(e,a){const l=Array.isArray(a)?wk(a):+e.internal,r=Ba(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),u=new Date(+e);u.setUTCHours(u.getUTCHours()-1);const f=-new Date(+e).getTimezoneOffset(),m=-new Date(+u).getTimezoneOffset(),g=f-m;let p=f;if(g&&f!==i){const W=Date.prototype.getHours.apply(e),Y=Array.isArray(a)?a[3]||0:e.internal.getUTCHours();if(W!==Y){const K=new Date(+e),ee=f-i;ee&&K.setUTCMinutes(K.getUTCMinutes()+ee);const te=Ba(e.timeZone,K);(te>0?Math.floor(te):Math.ceil(te))===i&&(p=m)}}const x=p-i;x&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x);const y=new Date(+e);y.setUTCSeconds(0);const w=f>0?y.getSeconds():(y.getSeconds()-60)%60,b=Math.round(-(Ba(e.timeZone,e)*60))%60;(b||w)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+b+w);const C=Ba(e.timeZone,e),j=C>0?Math.floor(C):Math.ceil(C),E=-new Date(+e).getTimezoneOffset()-j,O=j!==i,D=E-x,k=j-i,z=l-j*60*1e3,_=k>0&&s0(e)-l===k*60*1e3&&s0(e,z)!==l;if(O&&D&&!_){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+D);const W=Ba(e.timeZone,e),Y=W>0?Math.floor(W):Math.ceil(W),K=j-Y;K&&D<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+K)}Qc(e);const L=(a?l:l+b*1e3)-+e.internal;L&&Math.abs(L)<1800*1e3&&(Date.prototype.setTime.call(e,+e+L),Qc(e))}function wk(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function s0(e,a){const l=new Date(a??+e);return l.setUTCSeconds(l.getUTCSeconds()-Math.round(-Ba(e.timeZone,l)*60)),+l}class $t extends ca{static tz(a,...l){return l.length?new $t(...l,a):new $t(Date.now(),a)}toISOString(){const[a,l,r]=this.tzComponents(),i=`${a}${l}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[a,l,r,i]=this.internal.toUTCString().split(" ");return`${a==null?void 0:a.slice(0,-1)} ${r} ${l} ${i}`}toTimeString(){const a=this.internal.toUTCString().split(" ")[4],[l,r,i]=this.tzComponents();return`${a} GMT${l}${r}${i} (${yk(this.timeZone,this)})`}toLocaleString(a,l){return Date.prototype.toLocaleString.call(this,a,{...l,timeZone:(l==null?void 0:l.timeZone)||this.timeZone})}toLocaleDateString(a,l){return Date.prototype.toLocaleDateString.call(this,a,{...l,timeZone:(l==null?void 0:l.timeZone)||this.timeZone})}toLocaleTimeString(a,l){return Date.prototype.toLocaleTimeString.call(this,a,{...l,timeZone:(l==null?void 0:l.timeZone)||this.timeZone})}tzComponents(){const a=this.getTimezoneOffset(),l=a>0?"-":"+",r=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),i=String(Math.abs(a)%60).padStart(2,"0");return[l,r,i]}withTimeZone(a){return new $t(+this,a)}[Symbol.for("constructDateFrom")](a){return new $t(+new Date(a),this.timeZone)}}const i0=5,Ck=4;function jk(e,a){const l=a.startOfMonth(e),r=l.getDay()>0?l.getDay():7,i=a.addDays(e,-r+1),u=a.addDays(i,i0*7-1);return a.getMonth(e)===a.getMonth(u)?i0:Ck}function ow(e,a){const l=a.startOfMonth(e),r=l.getDay();return r===1?l:r===0?a.addDays(l,-6):a.addDays(l,-1*(r-1))}function Nk(e,a){const l=ow(e,a),r=jk(e,a);return a.addDays(l,r*7-1)}const sw={...mo,labels:{labelDayButton:(e,a,l,r)=>{let i;r&&typeof r.format=="function"?i=r.format.bind(r):i=(f,m)=>mr(f,m,{locale:mo,...l});let u=i(e,"PPPP");return a.today&&(u=`Today, ${u}`),a.selected&&(u=`${u}, selected`),u},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,a,l)=>{let r;return l&&typeof l.format=="function"?r=l.format.bind(l):r=(i,u)=>mr(i,u,{locale:mo,...a}),r(e,"LLLL yyyy")},labelGridcell:(e,a,l,r)=>{let i;r&&typeof r.format=="function"?i=r.format.bind(r):i=(f,m)=>mr(f,m,{locale:mo,...l});let u=i(e,"PPPP");return a!=null&&a.today&&(u=`Today, ${u}`),u},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,a,l)=>{let r;return l&&typeof l.format=="function"?r=l.format.bind(l):r=(i,u)=>mr(i,u,{locale:mo,...a}),r(e,"cccc")}}};class Nn{constructor(a,l){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?$t.tz(this.options.timeZone):new this.Date},this.newDate=(r,i,u)=>{var f;return(f=this.overrides)!=null&&f.newDate?this.overrides.newDate(r,i,u):this.options.timeZone?new $t(r,i,u,this.options.timeZone):new Date(r,i,u)},this.addDays=(r,i)=>{var u;return(u=this.overrides)!=null&&u.addDays?this.overrides.addDays(r,i):WS(r,i)},this.addMonths=(r,i)=>{var u;return(u=this.overrides)!=null&&u.addMonths?this.overrides.addMonths(r,i):KS(r,i)},this.addWeeks=(r,i)=>{var u;return(u=this.overrides)!=null&&u.addWeeks?this.overrides.addWeeks(r,i):BO(r,i)},this.addYears=(r,i)=>{var u;return(u=this.overrides)!=null&&u.addYears?this.overrides.addYears(r,i):UO(r,i)},this.differenceInCalendarDays=(r,i)=>{var u;return(u=this.overrides)!=null&&u.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):Lh(r,i)},this.differenceInCalendarMonths=(r,i)=>{var u;return(u=this.overrides)!=null&&u.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):ZS(r,i)},this.eachMonthOfInterval=r=>{var i;return(i=this.overrides)!=null&&i.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):WO(r)},this.eachYearOfInterval=r=>{var m;const i=(m=this.overrides)!=null&&m.eachYearOfInterval?this.overrides.eachYearOfInterval(r):QO(r),u=new Set(i.map(g=>this.getYear(g)));if(u.size===i.length)return i;const f=[];return u.forEach(g=>{f.push(new Date(g,0,1))}),f},this.endOfBroadcastWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Nk(r,this)},this.endOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfISOWeek?this.overrides.endOfISOWeek(r):ZO(r)},this.endOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.endOfMonth?this.overrides.endOfMonth(r):qO(r)},this.endOfWeek=(r,i)=>{var u;return(u=this.overrides)!=null&&u.endOfWeek?this.overrides.endOfWeek(r,i):tw(r,this.options)},this.endOfYear=r=>{var i;return(i=this.overrides)!=null&&i.endOfYear?this.overrides.endOfYear(r):XO(r)},this.format=(r,i,u)=>{var m;const f=(m=this.overrides)!=null&&m.format?this.overrides.format(r,i,this.options):mr(r,i,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(f):f},this.getISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.getISOWeek?this.overrides.getISOWeek(r):Vh(r)},this.getMonth=(r,i)=>{var u;return(u=this.overrides)!=null&&u.getMonth?this.overrides.getMonth(r,this.options):KT(r,this.options)},this.getYear=(r,i)=>{var u;return(u=this.overrides)!=null&&u.getYear?this.overrides.getYear(r,this.options):XT(r,this.options)},this.getWeek=(r,i)=>{var u;return(u=this.overrides)!=null&&u.getWeek?this.overrides.getWeek(r,this.options):Bh(r,this.options)},this.isAfter=(r,i)=>{var u;return(u=this.overrides)!=null&&u.isAfter?this.overrides.isAfter(r,i):QT(r,i)},this.isBefore=(r,i)=>{var u;return(u=this.overrides)!=null&&u.isBefore?this.overrides.isBefore(r,i):ZT(r,i)},this.isDate=r=>{var i;return(i=this.overrides)!=null&&i.isDate?this.overrides.isDate(r):QS(r)},this.isSameDay=(r,i)=>{var u;return(u=this.overrides)!=null&&u.isSameDay?this.overrides.isSameDay(r,i):GO(r,i)},this.isSameMonth=(r,i)=>{var u;return(u=this.overrides)!=null&&u.isSameMonth?this.overrides.isSameMonth(r,i):JT(r,i)},this.isSameYear=(r,i)=>{var u;return(u=this.overrides)!=null&&u.isSameYear?this.overrides.isSameYear(r,i):ek(r,i)},this.max=r=>{var i;return(i=this.overrides)!=null&&i.max?this.overrides.max(r):IO(r)},this.min=r=>{var i;return(i=this.overrides)!=null&&i.min?this.overrides.min(r):$O(r)},this.setMonth=(r,i)=>{var u;return(u=this.overrides)!=null&&u.setMonth?this.overrides.setMonth(r,i):vk(r,i)},this.setYear=(r,i)=>{var u;return(u=this.overrides)!=null&&u.setYear?this.overrides.setYear(r,i):xk(r,i)},this.startOfBroadcastWeek=(r,i)=>{var u;return(u=this.overrides)!=null&&u.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ow(r,this)},this.startOfDay=r=>{var i;return(i=this.overrides)!=null&&i.startOfDay?this.overrides.startOfDay(r):Bs(r)},this.startOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfISOWeek?this.overrides.startOfISOWeek(r):Vs(r)},this.startOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.startOfMonth?this.overrides.startOfMonth(r):KO(r)},this.startOfWeek=(r,i)=>{var u;return(u=this.overrides)!=null&&u.startOfWeek?this.overrides.startOfWeek(r,this.options):yo(r,this.options)},this.startOfYear=r=>{var i;return(i=this.overrides)!=null&&i.startOfYear?this.overrides.startOfYear(r):ew(r)},this.options={locale:sw,...a},this.overrides=l}getDigitMap(){const{numerals:a="latn"}=this.options,l=new Intl.NumberFormat("en-US",{numberingSystem:a}),r={};for(let i=0;i<10;i++)r[i.toString()]=l.format(i);return r}replaceDigits(a){const l=this.getDigitMap();return a.replace(/\d/g,r=>l[r]||r)}formatNumber(a){return this.replaceDigits(a.toString())}getMonthYearOrder(){var l;const a=(l=this.options.locale)==null?void 0:l.code;return a&&Nn.yearFirstLocales.has(a)?"year-first":"month-first"}formatMonthYear(a){const{locale:l,timeZone:r,numerals:i}=this.options,u=l==null?void 0:l.code;if(u&&Nn.yearFirstLocales.has(u))try{return new Intl.DateTimeFormat(u,{month:"long",year:"numeric",timeZone:r,numberingSystem:i}).format(a)}catch{}const f=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(a,f)}}Nn.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const va=new Nn;class iw{constructor(a,l,r=va){this.date=a,this.displayMonth=l,this.outside=!!(l&&!r.isSameMonth(a,l)),this.dateLib=r,this.isoDate=r.format(a,"yyyy-MM-dd"),this.displayMonthId=r.format(l,"yyyy-MM"),this.dateMonthId=r.format(a,"yyyy-MM")}isEqualTo(a){return this.dateLib.isSameDay(a.date,this.date)&&this.dateLib.isSameMonth(a.displayMonth,this.displayMonth)}}class Mk{constructor(a,l){this.date=a,this.weeks=l}}class _k{constructor(a,l){this.days=l,this.weekNumber=a}}function Dk(e){return de.createElement("button",{...e})}function Rk(e){return de.createElement("span",{...e})}function Ek(e){const{size:a=24,orientation:l="left",className:r}=e;return de.createElement("svg",{className:r,width:a,height:a,viewBox:"0 0 24 24"},l==="up"&&de.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),l==="down"&&de.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),l==="left"&&de.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),l==="right"&&de.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Ok(e){const{day:a,modifiers:l,...r}=e;return de.createElement("td",{...r})}function Tk(e){const{day:a,modifiers:l,...r}=e,i=de.useRef(null);return de.useEffect(()=>{var u;l.focused&&((u=i.current)==null||u.focus())},[l.focused]),de.createElement("button",{ref:i,...r})}var xe;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(xe||(xe={}));var ut;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ut||(ut={}));var Gn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Gn||(Gn={}));var xn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(xn||(xn={}));function kk(e){const{options:a,className:l,components:r,classNames:i,...u}=e,f=[i[xe.Dropdown],l].join(" "),m=a==null?void 0:a.find(({value:g})=>g===u.value);return de.createElement("span",{"data-disabled":u.disabled,className:i[xe.DropdownRoot]},de.createElement(r.Select,{className:f,...u},a==null?void 0:a.map(({value:g,label:p,disabled:x})=>de.createElement(r.Option,{key:g,value:g,disabled:x},p))),de.createElement("span",{className:i[xe.CaptionLabel],"aria-hidden":!0},m==null?void 0:m.label,de.createElement(r.Chevron,{orientation:"down",size:18,className:i[xe.Chevron]})))}function Ak(e){return de.createElement("div",{...e})}function zk(e){return de.createElement("div",{...e})}function Pk(e){const{calendarMonth:a,displayIndex:l,...r}=e;return de.createElement("div",{...r},e.children)}function Hk(e){const{calendarMonth:a,displayIndex:l,...r}=e;return de.createElement("div",{...r})}function Fk(e){return de.createElement("table",{...e})}function Lk(e){return de.createElement("div",{...e})}const cw=v.createContext(void 0);function ai(){const e=v.useContext(cw);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Vk(e){const{components:a}=ai();return de.createElement(a.Dropdown,{...e})}function Bk(e){const{onPreviousClick:a,onNextClick:l,previousMonth:r,nextMonth:i,...u}=e,{components:f,classNames:m,labels:{labelPrevious:g,labelNext:p}}=ai(),x=v.useCallback(w=>{i&&(l==null||l(w))},[i,l]),y=v.useCallback(w=>{r&&(a==null||a(w))},[r,a]);return de.createElement("nav",{...u},de.createElement(f.PreviousMonthButton,{type:"button",className:m[xe.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":g(r),onClick:y},de.createElement(f.Chevron,{disabled:r?void 0:!0,className:m[xe.Chevron],orientation:"left"})),de.createElement(f.NextMonthButton,{type:"button",className:m[xe.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":p(i),onClick:x},de.createElement(f.Chevron,{disabled:i?void 0:!0,orientation:"right",className:m[xe.Chevron]})))}function Uk(e){const{components:a}=ai();return de.createElement(a.Button,{...e})}function Ik(e){return de.createElement("option",{...e})}function $k(e){const{components:a}=ai();return de.createElement(a.Button,{...e})}function Gk(e){const{rootRef:a,...l}=e;return de.createElement("div",{...l,ref:a})}function Yk(e){return de.createElement("select",{...e})}function qk(e){const{week:a,...l}=e;return de.createElement("tr",{...l})}function Wk(e){return de.createElement("th",{...e})}function Kk(e){return de.createElement("thead",{"aria-hidden":!0},de.createElement("tr",{...e}))}function Xk(e){const{week:a,...l}=e;return de.createElement("th",{...l})}function Qk(e){return de.createElement("th",{...e})}function Zk(e){return de.createElement("tbody",{...e})}function Jk(e){const{components:a}=ai();return de.createElement(a.Dropdown,{...e})}const eA=Object.freeze(Object.defineProperty({__proto__:null,Button:Dk,CaptionLabel:Rk,Chevron:Ek,Day:Ok,DayButton:Tk,Dropdown:kk,DropdownNav:Ak,Footer:zk,Month:Pk,MonthCaption:Hk,MonthGrid:Fk,Months:Lk,MonthsDropdown:Vk,Nav:Bk,NextMonthButton:Uk,Option:Ik,PreviousMonthButton:$k,Root:Gk,Select:Yk,Week:qk,WeekNumber:Xk,WeekNumberHeader:Qk,Weekday:Wk,Weekdays:Kk,Weeks:Zk,YearsDropdown:Jk},Symbol.toStringTag,{value:"Module"}));function Ua(e,a,l=!1,r=va){let{from:i,to:u}=e;const{differenceInCalendarDays:f,isSameDay:m}=r;return i&&u?(f(u,i)<0&&([i,u]=[u,i]),f(a,i)>=(l?1:0)&&f(u,a)>=(l?1:0)):!l&&u?m(u,a):!l&&i?m(i,a):!1}function Uh(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Su(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ih(e){return!!(e&&typeof e=="object"&&"after"in e)}function $h(e){return!!(e&&typeof e=="object"&&"before"in e)}function uw(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function dw(e,a){return Array.isArray(e)&&e.every(a.isDate)}function Ia(e,a,l=va){const r=Array.isArray(a)?a:[a],{isSameDay:i,differenceInCalendarDays:u,isAfter:f}=l;return r.some(m=>{if(typeof m=="boolean")return m;if(l.isDate(m))return i(e,m);if(dw(m,l))return m.some(g=>i(e,g));if(Su(m))return Ua(m,e,!1,l);if(uw(m))return Array.isArray(m.dayOfWeek)?m.dayOfWeek.includes(e.getDay()):m.dayOfWeek===e.getDay();if(Uh(m)){const g=u(m.before,e),p=u(m.after,e),x=g>0,y=p<0;return f(m.before,m.after)?y&&x:x||y}return Ih(m)?u(e,m.after)>0:$h(m)?u(m.before,e)>0:typeof m=="function"?m(e):!1})}function tA(e,a,l,r,i){const{disabled:u,hidden:f,modifiers:m,showOutsideDays:g,broadcastCalendar:p,today:x=i.today()}=a,{isSameDay:y,isSameMonth:w,startOfMonth:b,isBefore:C,endOfMonth:j,isAfter:N}=i,E=l&&b(l),O=r&&j(r),D={[ut.focused]:[],[ut.outside]:[],[ut.disabled]:[],[ut.hidden]:[],[ut.today]:[]},k={};for(const z of e){const{date:_,displayMonth:H}=z,L=!!(H&&!w(_,H)),W=!!(E&&C(_,E)),Y=!!(O&&N(_,O)),K=!!(u&&Ia(_,u,i)),ee=!!(f&&Ia(_,f,i))||W||Y||!p&&!g&&L||p&&g===!1&&L,te=y(_,x);L&&D.outside.push(z),K&&D.disabled.push(z),ee&&D.hidden.push(z),te&&D.today.push(z),m&&Object.keys(m).forEach(se=>{const ce=m==null?void 0:m[se];ce&&Ia(_,ce,i)&&(k[se]?k[se].push(z):k[se]=[z])})}return z=>{const _={[ut.focused]:!1,[ut.disabled]:!1,[ut.hidden]:!1,[ut.outside]:!1,[ut.today]:!1},H={};for(const L in D){const W=D[L];_[L]=W.some(Y=>Y===z)}for(const L in k)H[L]=k[L].some(W=>W===z);return{..._,...H}}}function nA(e,a,l={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[u])=>(l[u]?i.push(l[u]):a[ut[u]]?i.push(a[ut[u]]):a[Gn[u]]&&i.push(a[Gn[u]]),i),[a[xe.Day]])}function aA(e){return{...eA,...e}}function lA(e){const a={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([l,r])=>{l.startsWith("data-")&&(a[l]=r)}),a}function rA(){const e={};for(const a in xe)e[xe[a]]=`rdp-${xe[a]}`;for(const a in ut)e[ut[a]]=`rdp-${ut[a]}`;for(const a in Gn)e[Gn[a]]=`rdp-${Gn[a]}`;for(const a in xn)e[xn[a]]=`rdp-${xn[a]}`;return e}function fw(e,a,l){return(l??new Nn(a)).formatMonthYear(e)}const oA=fw;function sA(e,a,l){return(l??new Nn(a)).format(e,"d")}function iA(e,a=va){return a.format(e,"LLLL")}function cA(e,a,l){return(l??new Nn(a)).format(e,"cccccc")}function uA(e,a=va){return e<10?a.formatNumber(`0${e.toLocaleString()}`):a.formatNumber(`${e.toLocaleString()}`)}function dA(){return""}function mw(e,a=va){return a.format(e,"yyyy")}const fA=mw,mA=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:fw,formatDay:sA,formatMonthCaption:oA,formatMonthDropdown:iA,formatWeekNumber:uA,formatWeekNumberHeader:dA,formatWeekdayName:cA,formatYearCaption:fA,formatYearDropdown:mw},Symbol.toStringTag,{value:"Module"}));function hA(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...mA,...e}}function Gh(e,a,l,r){let i=(r??new Nn(l)).format(e,"PPPP");return a.today&&(i=`Today, ${i}`),a.selected&&(i=`${i}, selected`),i}const gA=Gh;function Yh(e,a,l){return(l??new Nn(a)).formatMonthYear(e)}const pA=Yh;function hw(e,a,l,r){let i=(r??new Nn(l)).format(e,"PPPP");return a!=null&&a.today&&(i=`Today, ${i}`),i}function gw(e){return"Choose the Month"}function pw(){return""}const vA="Go to the Next Month";function vw(e,a){return vA}function xw(e){return"Go to the Previous Month"}function yw(e,a,l){return(l??new Nn(a)).format(e,"cccc")}function bw(e,a){return`Week ${e}`}function Sw(e){return"Week Number"}function ww(e){return"Choose the Year"}const xA=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:pA,labelDay:gA,labelDayButton:Gh,labelGrid:Yh,labelGridcell:hw,labelMonthDropdown:gw,labelNav:pw,labelNext:vw,labelPrevious:xw,labelWeekNumber:bw,labelWeekNumberHeader:Sw,labelWeekday:yw,labelYearDropdown:ww},Symbol.toStringTag,{value:"Module"})),In=(e,a,l)=>a||(l?typeof l=="function"?l:(...r)=>l:e);function yA(e,a){var r;const l=((r=a.locale)==null?void 0:r.labels)??{};return{...xA,...e??{},labelDayButton:In(Gh,e==null?void 0:e.labelDayButton,l.labelDayButton),labelMonthDropdown:In(gw,e==null?void 0:e.labelMonthDropdown,l.labelMonthDropdown),labelNext:In(vw,e==null?void 0:e.labelNext,l.labelNext),labelPrevious:In(xw,e==null?void 0:e.labelPrevious,l.labelPrevious),labelWeekNumber:In(bw,e==null?void 0:e.labelWeekNumber,l.labelWeekNumber),labelYearDropdown:In(ww,e==null?void 0:e.labelYearDropdown,l.labelYearDropdown),labelGrid:In(Yh,e==null?void 0:e.labelGrid,l.labelGrid),labelGridcell:In(hw,e==null?void 0:e.labelGridcell,l.labelGridcell),labelNav:In(pw,e==null?void 0:e.labelNav,l.labelNav),labelWeekNumberHeader:In(Sw,e==null?void 0:e.labelWeekNumberHeader,l.labelWeekNumberHeader),labelWeekday:In(yw,e==null?void 0:e.labelWeekday,l.labelWeekday)}}function bA(e,a,l,r,i){const{startOfMonth:u,startOfYear:f,endOfYear:m,eachMonthOfInterval:g,getMonth:p}=i;return g({start:f(e),end:m(e)}).map(w=>{const b=r.formatMonthDropdown(w,i),C=p(w),j=a&&w<u(a)||l&&w>u(l)||!1;return{value:C,label:b,disabled:j}})}function SA(e,a={},l={}){let r={...a==null?void 0:a[xe.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...l==null?void 0:l[i]}}),r}function wA(e,a,l,r){const i=r??e.today(),u=l?e.startOfBroadcastWeek(i,e):a?e.startOfISOWeek(i):e.startOfWeek(i),f=[];for(let m=0;m<7;m++){const g=e.addDays(u,m);f.push(g)}return f}function CA(e,a,l,r,i=!1){if(!e||!a)return;const{startOfYear:u,endOfYear:f,eachYearOfInterval:m,getYear:g}=r,p=u(e),x=f(a),y=m({start:p,end:x});return i&&y.reverse(),y.map(w=>{const b=l.formatYearDropdown(w,r);return{value:g(w),label:b,disabled:!1}})}function jA(e,a={}){var m;const{weekStartsOn:l,locale:r}=a,i=l??((m=r==null?void 0:r.options)==null?void 0:m.weekStartsOn)??0,u=g=>{const p=typeof g=="number"||typeof g=="string"?new Date(g):g;return new $t(p.getFullYear(),p.getMonth(),p.getDate(),12,0,0,e)},f=g=>{const p=u(g);return new Date(p.getFullYear(),p.getMonth(),p.getDate(),0,0,0,0)};return{today:()=>u($t.tz(e)),newDate:(g,p,x)=>new $t(g,p,x,12,0,0,e),startOfDay:g=>u(g),startOfWeek:(g,p)=>{const x=u(g),y=(p==null?void 0:p.weekStartsOn)??i,w=(x.getDay()-y+7)%7;return x.setDate(x.getDate()-w),x},startOfISOWeek:g=>{const p=u(g),x=(p.getDay()-1+7)%7;return p.setDate(p.getDate()-x),p},startOfMonth:g=>{const p=u(g);return p.setDate(1),p},startOfYear:g=>{const p=u(g);return p.setMonth(0,1),p},endOfWeek:(g,p)=>{const x=u(g),b=((((p==null?void 0:p.weekStartsOn)??i)+6)%7-x.getDay()+7)%7;return x.setDate(x.getDate()+b),x},endOfISOWeek:g=>{const p=u(g),x=(7-p.getDay())%7;return p.setDate(p.getDate()+x),p},endOfMonth:g=>{const p=u(g);return p.setMonth(p.getMonth()+1,0),p},endOfYear:g=>{const p=u(g);return p.setMonth(11,31),p},eachMonthOfInterval:g=>{const p=u(g.start),x=u(g.end),y=[],w=new $t(p.getFullYear(),p.getMonth(),1,12,0,0,e),b=x.getFullYear()*12+x.getMonth();for(;w.getFullYear()*12+w.getMonth()<=b;)y.push(new $t(w,e)),w.setMonth(w.getMonth()+1,1);return y},addDays:(g,p)=>{const x=u(g);return x.setDate(x.getDate()+p),x},addWeeks:(g,p)=>{const x=u(g);return x.setDate(x.getDate()+p*7),x},addMonths:(g,p)=>{const x=u(g);return x.setMonth(x.getMonth()+p),x},addYears:(g,p)=>{const x=u(g);return x.setFullYear(x.getFullYear()+p),x},eachYearOfInterval:g=>{const p=u(g.start),x=u(g.end),y=[],w=new $t(p.getFullYear(),0,1,12,0,0,e);for(;w.getFullYear()<=x.getFullYear();)y.push(new $t(w,e)),w.setFullYear(w.getFullYear()+1,0,1);return y},getWeek:(g,p)=>{var y;const x=f(g);return Bh(x,{weekStartsOn:(p==null?void 0:p.weekStartsOn)??i,firstWeekContainsDate:(p==null?void 0:p.firstWeekContainsDate)??((y=r==null?void 0:r.options)==null?void 0:y.firstWeekContainsDate)??1})},getISOWeek:g=>{const p=f(g);return Vh(p)},differenceInCalendarDays:(g,p)=>{const x=f(g),y=f(p);return Lh(x,y)},differenceInCalendarMonths:(g,p)=>{const x=f(g),y=f(p);return ZS(x,y)}}}const li=e=>e instanceof HTMLElement?e:null,xm=e=>[...e.querySelectorAll("[data-animated-month]")??[]],NA=e=>li(e.querySelector("[data-animated-month]")),ym=e=>li(e.querySelector("[data-animated-caption]")),bm=e=>li(e.querySelector("[data-animated-weeks]")),MA=e=>li(e.querySelector("[data-animated-nav]")),_A=e=>li(e.querySelector("[data-animated-weekdays]"));function DA(e,a,{classNames:l,months:r,focused:i,dateLib:u}){const f=v.useRef(null),m=v.useRef(r),g=v.useRef(!1);v.useLayoutEffect(()=>{const p=m.current;if(m.current=r,!a||!e.current||!(e.current instanceof HTMLElement)||r.length===0||p.length===0||r.length!==p.length)return;const x=u.isSameMonth(r[0].date,p[0].date),y=u.isAfter(r[0].date,p[0].date),w=y?l[xn.caption_after_enter]:l[xn.caption_before_enter],b=y?l[xn.weeks_after_enter]:l[xn.weeks_before_enter],C=f.current,j=e.current.cloneNode(!0);if(j instanceof HTMLElement?(xm(j).forEach(D=>{if(!(D instanceof HTMLElement))return;const k=NA(D);k&&D.contains(k)&&D.removeChild(k);const z=ym(D);z&&z.classList.remove(w);const _=bm(D);_&&_.classList.remove(b)}),f.current=j):f.current=null,g.current||x||i)return;const N=C instanceof HTMLElement?xm(C):[],E=xm(e.current);if(E!=null&&E.every(O=>O instanceof HTMLElement)&&N&&N.every(O=>O instanceof HTMLElement)){g.current=!0,e.current.style.isolation="isolate";const O=MA(e.current);O&&(O.style.zIndex="1"),E.forEach((D,k)=>{const z=N[k];if(!z)return;D.style.position="relative",D.style.overflow="hidden";const _=ym(D);_&&_.classList.add(w);const H=bm(D);H&&H.classList.add(b);const L=()=>{g.current=!1,e.current&&(e.current.style.isolation=""),O&&(O.style.zIndex=""),_&&_.classList.remove(w),H&&H.classList.remove(b),D.style.position="",D.style.overflow="",D.contains(z)&&D.removeChild(z)};z.style.pointerEvents="none",z.style.position="absolute",z.style.overflow="hidden",z.setAttribute("aria-hidden","true");const W=_A(z);W&&(W.style.opacity="0");const Y=ym(z);Y&&(Y.classList.add(y?l[xn.caption_before_exit]:l[xn.caption_after_exit]),Y.addEventListener("animationend",L));const K=bm(z);K&&K.classList.add(y?l[xn.weeks_before_exit]:l[xn.weeks_after_exit]),D.insertBefore(z,D.firstChild)})}})}function RA(e,a,l,r){const i=e[0],u=e[e.length-1],{ISOWeek:f,fixedWeeks:m,broadcastCalendar:g}=l??{},{addDays:p,differenceInCalendarDays:x,differenceInCalendarMonths:y,endOfBroadcastWeek:w,endOfISOWeek:b,endOfMonth:C,endOfWeek:j,isAfter:N,startOfBroadcastWeek:E,startOfISOWeek:O,startOfWeek:D}=r,k=g?E(i,r):f?O(i):D(i),z=g?w(u):f?b(C(u)):j(C(u)),_=a&&(g?w(a):f?b(a):j(a)),H=_&&N(z,_)?_:z,L=x(H,k),W=y(u,i)+1,Y=[];for(let te=0;te<=L;te++){const se=p(k,te);Y.push(se)}const ee=(g?35:42)*W;if(m&&Y.length<ee){const te=ee-Y.length;for(let se=0;se<te;se++){const ce=p(Y[Y.length-1],1);Y.push(ce)}}return Y}function EA(e){const a=[];return e.reduce((l,r)=>{const i=r.weeks.reduce((u,f)=>u.concat(f.days.slice()),a.slice());return l.concat(i.slice())},a.slice())}function OA(e,a,l,r){const{numberOfMonths:i=1}=l,u=[];for(let f=0;f<i;f++){const m=r.addMonths(e,f);if(a&&m>a)break;u.push(m)}return u}function c0(e,a,l,r){const{month:i,defaultMonth:u,today:f=r.today(),numberOfMonths:m=1}=e;let g=i||u||f;const{differenceInCalendarMonths:p,addMonths:x,startOfMonth:y}=r;if(l&&p(l,g)<m-1){const w=-1*(m-1);g=x(l,w)}return a&&p(g,a)<0&&(g=a),y(g)}function TA(e,a,l,r){const{addDays:i,endOfBroadcastWeek:u,endOfISOWeek:f,endOfMonth:m,endOfWeek:g,getISOWeek:p,getWeek:x,startOfBroadcastWeek:y,startOfISOWeek:w,startOfWeek:b}=r,C=e.reduce((j,N)=>{const E=l.broadcastCalendar?y(N,r):l.ISOWeek?w(N):b(N),O=l.broadcastCalendar?u(N):l.ISOWeek?f(m(N)):g(m(N)),D=a.filter(H=>H>=E&&H<=O),k=l.broadcastCalendar?35:42;if(l.fixedWeeks&&D.length<k){const H=a.filter(L=>{const W=k-D.length;return L>O&&L<=i(O,W)});D.push(...H)}const z=D.reduce((H,L)=>{const W=l.ISOWeek?p(L):x(L),Y=H.find(ee=>ee.weekNumber===W),K=new iw(L,N,r);return Y?Y.days.push(K):H.push(new _k(W,[K])),H},[]),_=new Mk(N,z);return j.push(_),j},[]);return l.reverseMonths?C.reverse():C}function kA(e,a){let{startMonth:l,endMonth:r}=e;const{startOfYear:i,startOfDay:u,startOfMonth:f,endOfMonth:m,addYears:g,endOfYear:p,newDate:x,today:y}=a,{fromYear:w,toYear:b,fromMonth:C,toMonth:j}=e;!l&&C&&(l=C),!l&&w&&(l=a.newDate(w,0,1)),!r&&j&&(r=j),!r&&b&&(r=x(b,11,31));const N=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return l?l=f(l):w?l=x(w,0,1):!l&&N&&(l=i(g(e.today??y(),-100))),r?r=m(r):b?r=x(b,11,31):!r&&N&&(r=p(e.today??y())),[l&&u(l),r&&u(r)]}function AA(e,a,l,r){if(l.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:u=1}=l,{startOfMonth:f,addMonths:m,differenceInCalendarMonths:g}=r,p=i?u:1,x=f(e);if(!a)return m(x,p);if(!(g(a,e)<u))return m(x,p)}function zA(e,a,l,r){if(l.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:u}=l,{startOfMonth:f,addMonths:m,differenceInCalendarMonths:g}=r,p=i?u??1:1,x=f(e);if(!a)return m(x,-p);if(!(g(x,a)<=0))return m(x,-p)}function PA(e){const a=[];return e.reduce((l,r)=>l.concat(r.weeks.slice()),a.slice())}function wu(e,a){const[l,r]=v.useState(e);return[a===void 0?l:a,r]}function HA(e,a){var k;const[l,r]=kA(e,a),{startOfMonth:i,endOfMonth:u}=a,f=c0(e,l,r,a),[m,g]=wu(f,e.month?f:void 0);v.useEffect(()=>{const z=c0(e,l,r,a);g(z)},[e.timeZone]);const{months:p,weeks:x,days:y,previousMonth:w,nextMonth:b}=v.useMemo(()=>{const z=OA(m,r,{numberOfMonths:e.numberOfMonths},a),_=RA(z,e.endMonth?u(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},a),H=TA(z,_,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},a),L=PA(H),W=EA(H),Y=zA(m,l,e,a),K=AA(m,r,e,a);return{months:H,weeks:L,days:W,previousMonth:Y,nextMonth:K}},[a,m.getTime(),r==null?void 0:r.getTime(),l==null?void 0:l.getTime(),e.disableNavigation,e.broadcastCalendar,(k=e.endMonth)==null?void 0:k.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:C,onMonthChange:j}=e,N=z=>x.some(_=>_.days.some(H=>H.isEqualTo(z))),E=z=>{if(C)return;let _=i(z);l&&_<i(l)&&(_=i(l)),r&&_>i(r)&&(_=i(r)),g(_),j==null||j(_)};return{months:p,weeks:x,days:y,navStart:l,navEnd:r,previousMonth:w,nextMonth:b,goToMonth:E,goToDay:z=>{N(z)||E(z.date)}}}var oa;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(oa||(oa={}));function u0(e){return!e[ut.disabled]&&!e[ut.hidden]&&!e[ut.outside]}function FA(e,a,l,r){let i,u=-1;for(const f of e){const m=a(f);u0(m)&&(m[ut.focused]&&u<oa.FocusedModifier?(i=f,u=oa.FocusedModifier):r!=null&&r.isEqualTo(f)&&u<oa.LastFocused?(i=f,u=oa.LastFocused):l(f.date)&&u<oa.Selected?(i=f,u=oa.Selected):m[ut.today]&&u<oa.Today&&(i=f,u=oa.Today))}return i||(i=e.find(f=>u0(a(f)))),i}function LA(e,a,l,r,i,u,f){const{ISOWeek:m,broadcastCalendar:g}=u,{addDays:p,addMonths:x,addWeeks:y,addYears:w,endOfBroadcastWeek:b,endOfISOWeek:C,endOfWeek:j,max:N,min:E,startOfBroadcastWeek:O,startOfISOWeek:D,startOfWeek:k}=f;let _={day:p,week:y,month:x,year:w,startOfWeek:H=>g?O(H,f):m?D(H):k(H),endOfWeek:H=>g?b(H):m?C(H):j(H)}[e](l,a==="after"?1:-1);return a==="before"&&r?_=N([r,_]):a==="after"&&i&&(_=E([i,_])),_}function Cw(e,a,l,r,i,u,f,m=0){if(m>365)return;const g=LA(e,a,l.date,r,i,u,f),p=!!(u.disabled&&Ia(g,u.disabled,f)),x=!!(u.hidden&&Ia(g,u.hidden,f)),y=g,w=new iw(g,y,f);return!p&&!x?w:Cw(e,a,w,r,i,u,f,m+1)}function VA(e,a,l,r,i){const{autoFocus:u}=e,[f,m]=v.useState(),g=FA(a.days,l,r||(()=>!1),f),[p,x]=v.useState(u?g:void 0);return{isFocusTarget:j=>!!(g!=null&&g.isEqualTo(j)),setFocused:x,focused:p,blur:()=>{m(p),x(void 0)},moveFocus:(j,N)=>{if(!p)return;const E=Cw(j,N,p,a.navStart,a.navEnd,e,i);E&&(e.disableNavigation&&!a.days.some(D=>D.isEqualTo(E))||(a.goToDay(E),x(E)))}}}function BA(e,a){const{selected:l,required:r,onSelect:i}=e,[u,f]=wu(l,i?l:void 0),m=i?l:u,{isSameDay:g}=a,p=b=>(m==null?void 0:m.some(C=>g(C,b)))??!1,{min:x,max:y}=e;return{selected:m,select:(b,C,j)=>{let N=[...m??[]];if(p(b)){if((m==null?void 0:m.length)===x||r&&(m==null?void 0:m.length)===1)return;N=m==null?void 0:m.filter(E=>!g(E,b))}else(m==null?void 0:m.length)===y?N=[b]:N=[...N,b];return i||f(N),i==null||i(N,b,C,j),N},isSelected:p}}function UA(e,a,l=0,r=0,i=!1,u=va){const{from:f,to:m}=a||{},{isSameDay:g,isAfter:p,isBefore:x}=u;let y;if(!f&&!m)y={from:e,to:l>0?void 0:e};else if(f&&!m)g(f,e)?l===0?y={from:f,to:e}:i?y={from:f,to:void 0}:y=void 0:x(e,f)?y={from:e,to:f}:y={from:f,to:e};else if(f&&m)if(g(f,e)&&g(m,e))i?y={from:f,to:m}:y=void 0;else if(g(f,e))y={from:f,to:l>0?void 0:e};else if(g(m,e))y={from:e,to:l>0?void 0:e};else if(x(e,f))y={from:e,to:m};else if(p(e,f))y={from:f,to:e};else if(p(e,m))y={from:f,to:e};else throw new Error("Invalid range");if(y!=null&&y.from&&(y!=null&&y.to)){const w=u.differenceInCalendarDays(y.to,y.from);r>0&&w>r?y={from:e,to:void 0}:l>1&&w<l&&(y={from:e,to:void 0})}return y}function IA(e,a,l=va){const r=Array.isArray(a)?a:[a];let i=e.from;const u=l.differenceInCalendarDays(e.to,e.from),f=Math.min(u,6);for(let m=0;m<=f;m++){if(r.includes(i.getDay()))return!0;i=l.addDays(i,1)}return!1}function d0(e,a,l=va){return Ua(e,a.from,!1,l)||Ua(e,a.to,!1,l)||Ua(a,e.from,!1,l)||Ua(a,e.to,!1,l)}function $A(e,a,l=va){const r=Array.isArray(a)?a:[a];if(r.filter(m=>typeof m!="function").some(m=>typeof m=="boolean"?m:l.isDate(m)?Ua(e,m,!1,l):dw(m,l)?m.some(g=>Ua(e,g,!1,l)):Su(m)?m.from&&m.to?d0(e,{from:m.from,to:m.to},l):!1:uw(m)?IA(e,m.dayOfWeek,l):Uh(m)?l.isAfter(m.before,m.after)?d0(e,{from:l.addDays(m.after,1),to:l.addDays(m.before,-1)},l):Ia(e.from,m,l)||Ia(e.to,m,l):Ih(m)||$h(m)?Ia(e.from,m,l)||Ia(e.to,m,l):!1))return!0;const f=r.filter(m=>typeof m=="function");if(f.length){let m=e.from;const g=l.differenceInCalendarDays(e.to,e.from);for(let p=0;p<=g;p++){if(f.some(x=>x(m)))return!0;m=l.addDays(m,1)}}return!1}function GA(e,a){const{disabled:l,excludeDisabled:r,resetOnSelect:i,selected:u,required:f,onSelect:m}=e,[g,p]=wu(u,m?u:void 0),x=m?u:g;return{selected:x,select:(b,C,j)=>{const{min:N,max:E}=e;let O;if(b){const D=x==null?void 0:x.from,k=x==null?void 0:x.to,z=!!D&&!!k,_=!!D&&!!k&&a.isSameDay(D,k)&&a.isSameDay(b,D);i&&(z||!(x!=null&&x.from))?!f&&_?O=void 0:O={from:b,to:void 0}:O=UA(b,x,N,E,f,a)}return r&&l&&(O!=null&&O.from)&&O.to&&$A({from:O.from,to:O.to},l,a)&&(O.from=b,O.to=void 0),m||p(O),m==null||m(O,b,C,j),O},isSelected:b=>x&&Ua(x,b,!1,a)}}function YA(e,a){const{selected:l,required:r,onSelect:i}=e,[u,f]=wu(l,i?l:void 0),m=i?l:u,{isSameDay:g}=a;return{selected:m,select:(y,w,b)=>{let C=y;return!r&&m&&m&&g(y,m)&&(C=void 0),i||f(C),i==null||i(C,y,w,b),C},isSelected:y=>m?g(m,y):!1}}function qA(e,a){const l=YA(e,a),r=BA(e,a),i=GA(e,a);switch(e.mode){case"single":return l;case"multiple":return r;case"range":return i;default:return}}function Pn(e,a){return e instanceof $t&&e.timeZone===a?e:new $t(e,a)}function uo(e,a,l){return Pn(e,a)}function f0(e,a,l){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?uo(e,a):Array.isArray(e)?e.map(r=>r instanceof Date?uo(r,a):r):Su(e)?{...e,from:e.from?Pn(e.from,a):e.from,to:e.to?Pn(e.to,a):e.to}:Uh(e)?{before:uo(e.before,a),after:uo(e.after,a)}:Ih(e)?{after:uo(e.after,a)}:$h(e)?{before:uo(e.before,a)}:e}function Sm(e,a,l){return e&&(Array.isArray(e)?e.map(r=>f0(r,a)):f0(e,a))}function WA(e){var ui;let a=e;const l=a.timeZone;if(l&&(a={...e,timeZone:l},a.today&&(a.today=Pn(a.today,l)),a.month&&(a.month=Pn(a.month,l)),a.defaultMonth&&(a.defaultMonth=Pn(a.defaultMonth,l)),a.startMonth&&(a.startMonth=Pn(a.startMonth,l)),a.endMonth&&(a.endMonth=Pn(a.endMonth,l)),a.mode==="single"&&a.selected?a.selected=Pn(a.selected,l):a.mode==="multiple"&&a.selected?a.selected=(ui=a.selected)==null?void 0:ui.map(De=>Pn(De,l)):a.mode==="range"&&a.selected&&(a.selected={from:a.selected.from?Pn(a.selected.from,l):a.selected.from,to:a.selected.to?Pn(a.selected.to,l):a.selected.to}),a.disabled!==void 0&&(a.disabled=Sm(a.disabled,l)),a.hidden!==void 0&&(a.hidden=Sm(a.hidden,l)),a.modifiers)){const De={};Object.keys(a.modifiers).forEach(Ie=>{var be;De[Ie]=Sm((be=a.modifiers)==null?void 0:be[Ie],l)}),a.modifiers=De}const{components:r,formatters:i,labels:u,dateLib:f,locale:m,classNames:g}=v.useMemo(()=>{const De={...sw,...a.locale},Ie=a.broadcastCalendar?1:a.weekStartsOn,be=a.noonSafe&&a.timeZone?jA(a.timeZone,{weekStartsOn:Ie,locale:De}):void 0,He=a.dateLib&&be?{...be,...a.dateLib}:a.dateLib??be,Dt=new Nn({locale:De,weekStartsOn:Ie,firstWeekContainsDate:a.firstWeekContainsDate,useAdditionalWeekYearTokens:a.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:a.useAdditionalDayOfYearTokens,timeZone:a.timeZone,numerals:a.numerals},He);return{dateLib:Dt,components:aA(a.components),formatters:hA(a.formatters),labels:yA(a.labels,Dt.options),locale:De,classNames:{...rA(),...a.classNames}}},[a.locale,a.broadcastCalendar,a.weekStartsOn,a.firstWeekContainsDate,a.useAdditionalWeekYearTokens,a.useAdditionalDayOfYearTokens,a.timeZone,a.numerals,a.dateLib,a.noonSafe,a.components,a.formatters,a.labels,a.classNames]);a.today||(a={...a,today:f.today()});const{captionLayout:p,mode:x,navLayout:y,numberOfMonths:w=1,onDayBlur:b,onDayClick:C,onDayFocus:j,onDayKeyDown:N,onDayMouseEnter:E,onDayMouseLeave:O,onNextClick:D,onPrevClick:k,showWeekNumber:z,styles:_}=a,{formatCaption:H,formatDay:L,formatMonthDropdown:W,formatWeekNumber:Y,formatWeekNumberHeader:K,formatWeekdayName:ee,formatYearDropdown:te}=i,se=HA(a,f),{days:ce,months:A,navStart:U,navEnd:ae,previousMonth:Z,nextMonth:T,goToMonth:R}=se,V=tA(ce,a,U,ae,f),{isSelected:X,select:le,selected:re}=qA(a,f)??{},{blur:fe,focused:ve,isFocusTarget:ue,moveFocus:ie,setFocused:Se}=VA(a,se,V,X??(()=>!1),f),{labelDayButton:Me,labelGridcell:_e,labelGrid:Pe,labelMonthDropdown:ot,labelNav:kt,labelPrevious:un,labelNext:Xn,labelWeekday:Qn,labelWeekNumber:Il,labelWeekNumberHeader:$l,labelYearDropdown:Gl}=u,tl=v.useMemo(()=>wA(f,a.ISOWeek,a.broadcastCalendar,a.today),[f,a.ISOWeek,a.broadcastCalendar,a.today]),ri=x!==void 0||C!==void 0,At=v.useCallback(()=>{Z&&(R(Z),k==null||k(Z))},[Z,R,k]),ko=v.useCallback(()=>{T&&(R(T),D==null||D(T))},[R,T,D]),oi=v.useCallback((De,Ie)=>be=>{be.preventDefault(),be.stopPropagation(),Se(De),!Ie.disabled&&(le==null||le(De.date,Ie,be),C==null||C(De.date,Ie,be))},[le,C,Se]),si=v.useCallback((De,Ie)=>be=>{Se(De),j==null||j(De.date,Ie,be)},[j,Se]),Sr=v.useCallback((De,Ie)=>be=>{fe(),b==null||b(De.date,Ie,be)},[fe,b]),Cu=v.useCallback((De,Ie)=>be=>{const He={ArrowLeft:[be.shiftKey?"month":"day",a.dir==="rtl"?"after":"before"],ArrowRight:[be.shiftKey?"month":"day",a.dir==="rtl"?"before":"after"],ArrowDown:[be.shiftKey?"year":"week","after"],ArrowUp:[be.shiftKey?"year":"week","before"],PageUp:[be.shiftKey?"year":"month","before"],PageDown:[be.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(He[be.key]){be.preventDefault(),be.stopPropagation();const[Dt,ze]=He[be.key];ie(Dt,ze)}N==null||N(De.date,Ie,be)},[ie,N,a.dir]),ii=v.useCallback((De,Ie)=>be=>{E==null||E(De.date,Ie,be)},[E]),ju=v.useCallback((De,Ie)=>be=>{O==null||O(De.date,Ie,be)},[O]),Nu=v.useCallback(De=>Ie=>{const be=Number(Ie.target.value),He=f.setMonth(f.startOfMonth(De),be);R(He)},[f,R]),Yl=v.useCallback(De=>Ie=>{const be=Number(Ie.target.value),He=f.setYear(f.startOfMonth(De),be);R(He)},[f,R]),{className:Yt,style:Zn}=v.useMemo(()=>({className:[g[xe.Root],a.className].filter(Boolean).join(" "),style:{..._==null?void 0:_[xe.Root],...a.style}}),[g,a.className,a.style,_]),qt=lA(a),ci=v.useRef(null);DA(ci,!!a.animate,{classNames:g,months:A,focused:ve,dateLib:f});const Mu={dayPickerProps:a,selected:re,select:le,isSelected:X,months:A,nextMonth:T,previousMonth:Z,goToMonth:R,getModifiers:V,components:r,classNames:g,styles:_,labels:u,formatters:i};return de.createElement(cw.Provider,{value:Mu},de.createElement(r.Root,{rootRef:a.animate?ci:void 0,className:Yt,style:Zn,dir:a.dir,id:a.id,lang:a.lang??m.code,nonce:a.nonce,title:a.title,role:a.role,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],...qt},de.createElement(r.Months,{className:g[xe.Months],style:_==null?void 0:_[xe.Months]},!a.hideNavigation&&!y&&de.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:g[xe.Nav],style:_==null?void 0:_[xe.Nav],"aria-label":kt(),onPreviousClick:At,onNextClick:ko,previousMonth:Z,nextMonth:T}),A.map((De,Ie)=>de.createElement(r.Month,{"data-animated-month":a.animate?"true":void 0,className:g[xe.Month],style:_==null?void 0:_[xe.Month],key:Ie,displayIndex:Ie,calendarMonth:De},y==="around"&&!a.hideNavigation&&Ie===0&&de.createElement(r.PreviousMonthButton,{type:"button",className:g[xe.PreviousMonthButton],tabIndex:Z?void 0:-1,"aria-disabled":Z?void 0:!0,"aria-label":un(Z),onClick:At,"data-animated-button":a.animate?"true":void 0},de.createElement(r.Chevron,{disabled:Z?void 0:!0,className:g[xe.Chevron],orientation:a.dir==="rtl"?"right":"left"})),de.createElement(r.MonthCaption,{"data-animated-caption":a.animate?"true":void 0,className:g[xe.MonthCaption],style:_==null?void 0:_[xe.MonthCaption],calendarMonth:De,displayIndex:Ie},p!=null&&p.startsWith("dropdown")?de.createElement(r.DropdownNav,{className:g[xe.Dropdowns],style:_==null?void 0:_[xe.Dropdowns]},(()=>{const be=p==="dropdown"||p==="dropdown-months"?de.createElement(r.MonthsDropdown,{key:"month",className:g[xe.MonthsDropdown],"aria-label":ot(),classNames:g,components:r,disabled:!!a.disableNavigation,onChange:Nu(De.date),options:bA(De.date,U,ae,i,f),style:_==null?void 0:_[xe.Dropdown],value:f.getMonth(De.date)}):de.createElement("span",{key:"month"},W(De.date,f)),He=p==="dropdown"||p==="dropdown-years"?de.createElement(r.YearsDropdown,{key:"year",className:g[xe.YearsDropdown],"aria-label":Gl(f.options),classNames:g,components:r,disabled:!!a.disableNavigation,onChange:Yl(De.date),options:CA(U,ae,i,f,!!a.reverseYears),style:_==null?void 0:_[xe.Dropdown],value:f.getYear(De.date)}):de.createElement("span",{key:"year"},te(De.date,f));return f.getMonthYearOrder()==="year-first"?[He,be]:[be,He]})(),de.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},H(De.date,f.options,f))):de.createElement(r.CaptionLabel,{className:g[xe.CaptionLabel],role:"status","aria-live":"polite"},H(De.date,f.options,f))),y==="around"&&!a.hideNavigation&&Ie===w-1&&de.createElement(r.NextMonthButton,{type:"button",className:g[xe.NextMonthButton],tabIndex:T?void 0:-1,"aria-disabled":T?void 0:!0,"aria-label":Xn(T),onClick:ko,"data-animated-button":a.animate?"true":void 0},de.createElement(r.Chevron,{disabled:T?void 0:!0,className:g[xe.Chevron],orientation:a.dir==="rtl"?"left":"right"})),Ie===w-1&&y==="after"&&!a.hideNavigation&&de.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:g[xe.Nav],style:_==null?void 0:_[xe.Nav],"aria-label":kt(),onPreviousClick:At,onNextClick:ko,previousMonth:Z,nextMonth:T}),de.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":x==="multiple"||x==="range","aria-label":Pe(De.date,f.options,f)||void 0,className:g[xe.MonthGrid],style:_==null?void 0:_[xe.MonthGrid]},!a.hideWeekdays&&de.createElement(r.Weekdays,{"data-animated-weekdays":a.animate?"true":void 0,className:g[xe.Weekdays],style:_==null?void 0:_[xe.Weekdays]},z&&de.createElement(r.WeekNumberHeader,{"aria-label":$l(f.options),className:g[xe.WeekNumberHeader],style:_==null?void 0:_[xe.WeekNumberHeader],scope:"col"},K()),tl.map(be=>de.createElement(r.Weekday,{"aria-label":Qn(be,f.options,f),className:g[xe.Weekday],key:String(be),style:_==null?void 0:_[xe.Weekday],scope:"col"},ee(be,f.options,f)))),de.createElement(r.Weeks,{"data-animated-weeks":a.animate?"true":void 0,className:g[xe.Weeks],style:_==null?void 0:_[xe.Weeks]},De.weeks.map(be=>de.createElement(r.Week,{className:g[xe.Week],key:be.weekNumber,style:_==null?void 0:_[xe.Week],week:be},z&&de.createElement(r.WeekNumber,{week:be,style:_==null?void 0:_[xe.WeekNumber],"aria-label":Il(be.weekNumber,{locale:m}),className:g[xe.WeekNumber],scope:"row",role:"rowheader"},Y(be.weekNumber,f)),be.days.map(He=>{const{date:Dt}=He,ze=V(He);if(ze[ut.focused]=!ze.hidden&&!!(ve!=null&&ve.isEqualTo(He)),ze[Gn.selected]=(X==null?void 0:X(Dt))||ze.selected,Su(re)){const{from:xa,to:zo}=re;ze[Gn.range_start]=!!(xa&&zo&&f.isSameDay(Dt,xa)),ze[Gn.range_end]=!!(xa&&zo&&f.isSameDay(Dt,zo)),ze[Gn.range_middle]=Ua(re,Dt,!0,f)}const _u=SA(ze,_,a.modifiersStyles),di=nA(ze,g,a.modifiersClassNames),Ao=!ri&&!ze.hidden?_e(Dt,ze,f.options,f):void 0;return de.createElement(r.Day,{key:`${He.isoDate}_${He.displayMonthId}`,day:He,modifiers:ze,className:di.join(" "),style:_u,role:"gridcell","aria-selected":ze.selected||void 0,"aria-label":Ao,"data-day":He.isoDate,"data-month":He.outside?He.dateMonthId:void 0,"data-selected":ze.selected||void 0,"data-disabled":ze.disabled||void 0,"data-hidden":ze.hidden||void 0,"data-outside":He.outside||void 0,"data-focused":ze.focused||void 0,"data-today":ze.today||void 0},!ze.hidden&&ri?de.createElement(r.DayButton,{className:g[xe.DayButton],style:_==null?void 0:_[xe.DayButton],type:"button",day:He,modifiers:ze,disabled:!ze.focused&&ze.disabled||void 0,"aria-disabled":ze.focused&&ze.disabled||void 0,tabIndex:ue(He)?0:-1,"aria-label":Me(Dt,ze,f.options,f),onClick:oi(He,ze),onBlur:Sr(He,ze),onFocus:si(He,ze),onKeyDown:Cu(He,ze),onMouseEnter:ii(He,ze),onMouseLeave:ju(He,ze)},L(Dt,f.options,f)):!ze.hidden&&L(He.date,f.options,f))})))))))),a.footer&&de.createElement(r.Footer,{className:g[xe.Footer],style:_==null?void 0:_[xe.Footer],role:"status","aria-live":"polite"},a.footer)))}function KA({className:e,classNames:a,showOutsideDays:l=!0,...r}){return c.jsx(WA,{showOutsideDays:l,className:Te("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",button_previous:Te(Lc({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute left-1"),button_next:Te(Lc({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute right-1"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:Te("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md"),day_button:Te(Lc({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...a},components:{Chevron:({orientation:i})=>i==="left"?c.jsx(Is,{className:"size-4"}):c.jsx(So,{className:"size-4"})},...r})}const XA=CR,QA=jR,jw=v.forwardRef(({className:e,align:a="center",sideOffset:l=4,...r},i)=>c.jsx(NR,{children:c.jsx(MR,{ref:i,align:a,sideOffset:l,className:Te("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in",e),...r})}));jw.displayName="PopoverContent";function Nw({value:e,onChange:a,placeholder:l="Pick a date"}){const[r,i]=v.useState(!1),u=e?tk(e):void 0;return c.jsxs(XA,{open:r,onOpenChange:i,children:[c.jsx(QA,{asChild:!0,children:c.jsxs(oe,{variant:"outline",className:Te("w-full justify-start text-left font-normal h-9",!u&&"text-muted-foreground"),children:[c.jsx(p0,{className:"mr-2 size-4"}),u?mr(u,"PPP"):l]})}),c.jsx(jw,{className:"w-auto p-0",align:"start",children:c.jsx(KA,{mode:"single",selected:u,onSelect:f=>{a(f?mr(f,"yyyy-MM-dd"):""),i(!1)}})})]})}function ZA({open:e,onOpenChange:a,onCreated:l}){const[r,i]=v.useState(""),[u,f]=v.useState(""),[m,g]=v.useState("medium"),[p,x]=v.useState(""),[y,w]=v.useState(!1),[b,C]=v.useState(null);async function j(N){if(N.preventDefault(),!!r.trim()){w(!0),C(null);try{const E={title:r.trim(),priority:m};u.trim()&&(E.description=u.trim()),p&&(E.due_at=new Date(p).toISOString());const D=await(await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)})).json();D.error?C(D.error):(i(""),f(""),g("medium"),x(""),a(!1),l())}catch{C("Failed to create task")}finally{w(!1)}}}return c.jsx(ha,{open:e,onOpenChange:a,children:c.jsxs(qn,{children:[c.jsx(el,{children:c.jsx(pa,{children:"Create Task"})}),c.jsxs("form",{onSubmit:j,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Title"}),c.jsx(Zt,{value:r,onChange:N=>i(N.target.value),placeholder:"What needs to be done?",autoFocus:!0})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx("textarea",{value:u,onChange:N=>f(N.target.value),placeholder:"Add details (supports markdown)...",rows:4,className:"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"space-y-1.5 flex-1",children:[c.jsx("label",{className:"text-sm font-medium",children:"Priority"}),c.jsxs(wn,{value:m,onValueChange:g,children:[c.jsx(sn,{children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"low",children:"Low"}),c.jsx(Ee,{value:"medium",children:"Medium"}),c.jsx(Ee,{value:"high",children:"High"}),c.jsx(Ee,{value:"critical",children:"Critical"})]})]})]}),c.jsxs("div",{className:"space-y-1.5 flex-1",children:[c.jsx("label",{className:"text-sm font-medium",children:"Due Date"}),c.jsx(Nw,{value:p,onChange:x})]})]}),b&&c.jsx("p",{className:"text-sm text-red-500",children:b}),c.jsxs(ti,{children:[c.jsx(oe,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsxs(oe,{type:"submit",disabled:!r.trim()||y,children:[c.jsx(Ol,{className:"size-4"})," ",y?"Creating...":"Create"]})]})]})]})})}function JA({task:e,open:a,onOpenChange:l,onSaved:r}){const[i,u]=v.useState(""),[f,m]=v.useState(""),[g,p]=v.useState("medium"),[x,y]=v.useState("pending"),[w,b]=v.useState(""),[C,j]=v.useState(!1),[N,E]=v.useState(null);v.useEffect(()=>{e&&(u(e.title),m(e.description||""),p(e.priority),y(e.status),b(e.due_at?e.due_at.split("T")[0]:""))},[e]);async function O(D){if(D.preventDefault(),!(!e||!i.trim())){j(!0),E(null);try{const k={};i.trim()!==e.title&&(k.title=i.trim()),f.trim()!==(e.description||"")&&(k.description=f.trim()),g!==e.priority&&(k.priority=g),x!==e.status&&(k.status=x);const z=w?new Date(w).toISOString():null;if(z!==e.due_at&&(k.due_at=z),Object.keys(k).length===0){l(!1);return}const H=await(await fetch(`/api/tasks/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();H.error?E(H.error):(l(!1),r())}catch{E("Failed to update task")}finally{j(!1)}}}return c.jsx(ha,{open:a,onOpenChange:l,children:c.jsxs(qn,{children:[c.jsx(el,{children:c.jsx(pa,{children:"Edit Task"})}),c.jsxs("form",{onSubmit:O,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Title"}),c.jsx(Zt,{value:i,onChange:D=>u(D.target.value),autoFocus:!0})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Description"}),c.jsx("textarea",{value:f,onChange:D=>m(D.target.value),placeholder:"Add details (supports markdown)...",rows:4,className:"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"space-y-1.5 flex-1",children:[c.jsx("label",{className:"text-sm font-medium",children:"Status"}),c.jsxs(wn,{value:x,onValueChange:y,children:[c.jsx(sn,{children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"pending",children:"Pending"}),c.jsx(Ee,{value:"in_progress",children:"In Progress"}),c.jsx(Ee,{value:"completed",children:"Completed"}),c.jsx(Ee,{value:"failed",children:"Failed"}),c.jsx(Ee,{value:"cancelled",children:"Cancelled"})]})]})]}),c.jsxs("div",{className:"space-y-1.5 flex-1",children:[c.jsx("label",{className:"text-sm font-medium",children:"Priority"}),c.jsxs(wn,{value:g,onValueChange:p,children:[c.jsx(sn,{children:c.jsx(Cn,{})}),c.jsxs(cn,{children:[c.jsx(Ee,{value:"low",children:"Low"}),c.jsx(Ee,{value:"medium",children:"Medium"}),c.jsx(Ee,{value:"high",children:"High"}),c.jsx(Ee,{value:"critical",children:"Critical"})]})]})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-sm font-medium",children:"Due Date"}),c.jsx(Nw,{value:w,onChange:b})]}),N&&c.jsx("p",{className:"text-sm text-red-500",children:N}),c.jsxs(ti,{children:[c.jsx(oe,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),c.jsxs(oe,{type:"submit",disabled:!i.trim()||C,children:[c.jsx(w0,{className:"size-4"})," ",C?"Saving...":"Save"]})]})]})]})})}const Mw=v.forwardRef(({className:e,children:a,...l},r)=>c.jsx(rR,{ref:r,className:Te("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...l,children:a}));Mw.displayName="NavigationMenu";const _w=v.forwardRef(({className:e,...a},l)=>c.jsx(oR,{ref:l,className:Te("group flex flex-1 list-none items-center justify-center gap-1",e),...a}));_w.displayName="NavigationMenuList";const ez=sR,tz=()=>"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50",nz=iR;function az(){const[e,a]=v.useState("dashboard"),[l,r]=v.useState([]),[i,u]=v.useState([]),[f,m]=v.useState({total_tasks:0,pending:0,in_progress:0,completed:0,failed:0,cancelled:0,projects:0,agents:0}),[g,p]=v.useState(!0),[x,y]=v.useState(null),[w,b]=v.useState(!1),[C,j]=v.useState(null),[N,E]=v.useState(!1);function O(Y,K){y({message:Y,type:K}),setTimeout(()=>y(null),3e3)}const D=v.useCallback(async()=>{try{const[Y,K,ee]=await Promise.all([fetch("/api/tasks").then(te=>te.json()),fetch("/api/stats").then(te=>te.json()),fetch("/api/projects").then(te=>te.json())]);r(Y),m(K),u(ee)}catch{O("Failed to load data","error")}finally{p(!1)}},[]);v.useEffect(()=>{D()},[D]),v.useEffect(()=>{const Y=setInterval(D,3e4);return()=>clearInterval(Y)},[D]),v.useEffect(()=>{function Y(K){var te;const ee=(te=K.target)==null?void 0:te.tagName;ee==="INPUT"||ee==="TEXTAREA"||ee==="SELECT"||(K.key==="n"&&!K.ctrlKey&&!K.metaKey&&(K.preventDefault(),b(!0)),K.key==="0"&&a("dashboard"),K.key==="1"&&a("tasks"),K.key==="2"&&a("projects"),K.key==="3"&&a("plans"),K.key==="4"&&a("agents"),(K.key==="?"||K.key==="5")&&a("help"),K.key==="r"&&!K.ctrlKey&&!K.metaKey&&D())}return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[D]);async function k(Y){const ee=await(await fetch(`/api/tasks/${Y}/start`,{method:"POST"})).json();ee.error?O(ee.error,"error"):(O("Task started","success"),D())}async function z(Y){const ee=await(await fetch(`/api/tasks/${Y}/complete`,{method:"POST"})).json();ee.error?O(ee.error,"error"):(O("Task completed","success"),D())}async function _(Y){const ee=await(await fetch(`/api/tasks/${Y}`,{method:"DELETE"})).json();ee.error?O(ee.error,"error"):(O("Task deleted","success"),D())}async function H(Y,K){const te=await(await fetch("/api/tasks/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:Y,action:K})})).json();te.error?O(te.error,"error"):(O(`${K}: ${te.succeeded} succeeded, ${te.failed} failed`,"success"),D())}const L=v.useMemo(()=>{const Y=new Map;for(const K of i)Y.set(K.id,K.name);return Y},[i]),W=[{key:"dashboard",label:"Dashboard"},{key:"tasks",label:"Tasks"},{key:"projects",label:"Projects"},{key:"plans",label:"Plans"},{key:"agents",label:"Agents"}];return c.jsxs("div",{className:"min-h-screen",children:[c.jsx("header",{className:"border-b",children:c.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center justify-between px-6",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs("button",{className:"flex items-center gap-3 hover:opacity-80 transition-opacity",onClick:()=>a("dashboard"),children:[c.jsx("img",{src:"/logo.jpg",alt:"Hasna",className:"h-7 w-auto rounded"}),c.jsxs("h1",{className:"text-base font-semibold",children:["Hasna ",c.jsx("span",{className:"font-normal text-muted-foreground",children:"Todos"})]})]}),c.jsx(Mw,{children:c.jsx(_w,{children:W.map(Y=>c.jsx(ez,{children:c.jsx(nz,{className:tz(),"data-active":e===Y.key?"":void 0,onClick:()=>a(Y.key),style:{cursor:"pointer"},children:Y.label})},Y.key))})})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oe,{variant:"outline",size:"icon",className:"size-8",onClick:D,disabled:g,title:"Reload (r)",children:c.jsx(hj,{className:`size-4 ${g?"animate-spin":""}`})}),c.jsx(oe,{variant:e==="help"?"secondary":"outline",size:"icon",className:"size-8",onClick:()=>a("help"),title:"Help (?)",children:c.jsx(rj,{className:"size-4"})}),c.jsx(cE,{})]})]})}),c.jsxs("main",{className:"mx-auto max-w-6xl space-y-6 px-6 py-6",children:[e==="dashboard"&&c.jsx(mE,{stats:f}),e==="tasks"&&c.jsx(SO,{data:l,projectMap:L,projects:i,onStart:k,onComplete:z,onDelete:_,onEdit:Y=>{j(Y),E(!0)},onBulkAction:H,onNewTask:()=>b(!0)}),e==="projects"&&c.jsx(jO,{}),e==="plans"&&c.jsx(PO,{}),e==="agents"&&c.jsx(OO,{}),e==="help"&&c.jsx(HO,{})]}),c.jsx(ZA,{open:w,onOpenChange:b,onCreated:()=>{O("Task created","success"),D()}}),c.jsx(JA,{task:C,open:N,onOpenChange:E,onSaved:()=>{O("Task updated","success"),D()}}),x&&c.jsx("div",{className:`fixed bottom-6 right-6 z-50 rounded-lg border px-4 py-3 text-sm shadow-lg ${x.type==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950 dark:text-green-200":"border-red-200 bg-red-50 text-red-800 dark:border-red-900 dark:bg-red-950 dark:text-red-200"}`,children:x.message})]})}KC.createRoot(document.getElementById("root")).render(c.jsx(v.StrictMode,{children:c.jsx(XC,{defaultTheme:"light",children:c.jsx(az,{})})}));
|