@elizaos/cli 1.0.0-alpha.3 → 1.0.0-alpha.30

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.
Files changed (70) hide show
  1. package/dist/assets/index-C23YxA-V.js +266 -0
  2. package/dist/assets/index-C23YxA-V.js.br +0 -0
  3. package/dist/assets/index-CLvpMkks.css +1 -0
  4. package/dist/assets/index-CLvpMkks.css.br +0 -0
  5. package/dist/chunk-2Q4U5ZSL.js +388 -0
  6. package/dist/chunk-567UPUC7.js +52 -0
  7. package/dist/chunk-5LH7NKB4.js +2770 -0
  8. package/dist/chunk-7N6BBH6O.js +36027 -0
  9. package/dist/chunk-B6RM67KA.js +1476 -0
  10. package/dist/chunk-BSCANRKC.js +662 -0
  11. package/dist/chunk-JE3WCXNS.js +16 -0
  12. package/dist/chunk-K4N2VKCD.js +175 -0
  13. package/dist/chunk-LERSUKTF.js +67140 -0
  14. package/dist/chunk-LIA2BGYJ.js +1989 -0
  15. package/dist/chunk-LRSU7IN6.js +4862 -0
  16. package/dist/chunk-M2L42JIU.js +497 -0
  17. package/dist/chunk-MIME4LLQ.js +5848 -0
  18. package/dist/chunk-NXAPHVBS.js +326 -0
  19. package/dist/chunk-OPF56ENC.js +266 -0
  20. package/dist/chunk-P5UPNKFB.js +590 -0
  21. package/dist/chunk-PRUBYPCA.js +632 -0
  22. package/dist/chunk-PVUQZDOP.js +153 -0
  23. package/dist/chunk-QLIKE5SE.js +6363 -0
  24. package/dist/chunk-SHPZMT5X.js +9460 -0
  25. package/dist/chunk-TIOTZNWK.js +358 -0
  26. package/dist/chunk-USQBYZ5B.js +79 -0
  27. package/dist/chunk-W3KDCQVE.js +106 -0
  28. package/dist/chunk-X47KQ7OX.js +24 -0
  29. package/dist/chunk-XDVWGVQZ.js +346 -0
  30. package/dist/chunk-Y3J2P4FD.js +7816 -0
  31. package/dist/chunk-YQ7Z5L6F.js +141 -0
  32. package/dist/chunk-ZHVNQA54.js +327 -0
  33. package/dist/commands/agent-plugin.js +43 -0
  34. package/dist/commands/agent.js +16 -0
  35. package/dist/commands/create.js +20 -0
  36. package/dist/commands/dev.js +19 -0
  37. package/dist/commands/env.js +20 -0
  38. package/dist/commands/plugin.js +21 -0
  39. package/dist/commands/project.js +20 -0
  40. package/dist/commands/start.js +30 -0
  41. package/dist/commands/tee.js +17 -0
  42. package/dist/commands/test.js +26 -0
  43. package/dist/commands/update.js +21 -0
  44. package/dist/eliza-KQMR7EKO.js +11 -0
  45. package/dist/elizaos-icon.png +0 -0
  46. package/dist/elizaos.webp +0 -0
  47. package/dist/esm-CDFO4YCA.js +1707 -0
  48. package/dist/index.html +13 -0
  49. package/dist/index.js +126 -42260
  50. package/dist/prompts-I4LK5NKX.js +9 -0
  51. package/dist/registry-EKJVOTIQ.js +63 -0
  52. package/package.json +17 -28
  53. package/templates/plugin-starter/biome.json +88 -10
  54. package/templates/plugin-starter/package.json +48 -36
  55. package/templates/plugin-starter/src/index.ts +75 -14
  56. package/templates/plugin-starter/tsconfig.build.json +13 -0
  57. package/templates/plugin-starter/tsconfig.json +6 -1
  58. package/templates/plugin-starter/tsup.config.ts +2 -0
  59. package/templates/project-starter/biome.json +88 -10
  60. package/templates/project-starter/package.json +43 -33
  61. package/templates/project-starter/src/index.ts +16 -9
  62. package/templates/project-starter/src/plugin.ts +34 -27
  63. package/templates/project-starter/src/tests.ts +190 -0
  64. package/templates/project-starter/tsconfig.build.json +13 -0
  65. package/templates/project-starter/tsconfig.json +6 -1
  66. package/templates/project-starter/tsup.config.ts +2 -0
  67. package/dist/index.d.ts +0 -1
  68. package/dist/index.js.map +0 -1
  69. package/templates/plugin-starter/vitest.config.ts +0 -8
  70. package/templates/project-starter/vitest.config.ts +0 -8
@@ -0,0 +1,266 @@
1
+ var yb=t=>{throw TypeError(t)};var kd=(t,r,a)=>r.has(t)||yb("Cannot "+a);var P=(t,r,a)=>(kd(t,r,"read from private field"),a?a.call(t):r.get(t)),be=(t,r,a)=>r.has(t)?yb("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,a),ce=(t,r,a,s)=>(kd(t,r,"write to private field"),s?s.call(t,a):r.set(t,a),a),Ne=(t,r,a)=>(kd(t,r,"access private method"),a);var vc=(t,r,a,s)=>({set _(o){ce(t,r,o,a)},get _(){return P(t,r,s)}});function cA(t,r){for(var a=0;a<r.length;a++){const s=r[a];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(s,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();function gs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $d={exports:{}},Rl={};/**
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 bb;function uA(){if(bb)return Rl;bb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(s,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var d in o)d!=="key"&&(c[d]=o[d])}else c=o;return o=c.ref,{$$typeof:t,type:s,key:f,ref:o!==void 0?o:null,props:c}}return Rl.Fragment=r,Rl.jsx=a,Rl.jsxs=a,Rl}var xb;function fA(){return xb||(xb=1,$d.exports=uA()),$d.exports}var v=fA(),Hd={exports:{}},Te={};/**
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 Sb;function dA(){if(Sb)return Te;Sb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function w(M,G,ee){this.props=M,this.context=G,this.refs=S,this.updater=ee||E}w.prototype.isReactComponent={},w.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,G,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=w.prototype;function N(M,G,ee){this.props=M,this.context=G,this.refs=S,this.updater=ee||E}var O=N.prototype=new C;O.constructor=N,T(O,w.prototype),O.isPureReactComponent=!0;var _=Array.isArray,L={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function V(M,G,ee,ae,re,oe){return ee=oe.ref,{$$typeof:t,type:M,key:G,ref:ee!==void 0?ee:null,props:oe}}function $(M,G){return V(M.type,G,void 0,void 0,void 0,M.props)}function U(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function K(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return G[ee]})}var te=/\/+/g;function se(M,G){return typeof M=="object"&&M!==null&&M.key!=null?K(""+M.key):G.toString(36)}function de(){}function q(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(de,de):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function H(M,G,ee,ae,re){var oe=typeof M;(oe==="undefined"||oe==="boolean")&&(M=null);var pe=!1;if(M===null)pe=!0;else switch(oe){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(M.$$typeof){case t:case r:pe=!0;break;case g:return pe=M._init,H(pe(M._payload),G,ee,ae,re)}}if(pe)return re=re(M),pe=ae===""?"."+se(M,0):ae,_(re)?(ee="",pe!=null&&(ee=pe.replace(te,"$&/")+"/"),H(re,G,ee,"",function(Ee){return Ee})):re!=null&&(U(re)&&(re=$(re,ee+(re.key==null||M&&M.key===re.key?"":(""+re.key).replace(te,"$&/")+"/")+pe)),G.push(re)),1;pe=0;var ue=ae===""?".":ae+":";if(_(M))for(var me=0;me<M.length;me++)ae=M[me],oe=ue+se(ae,me),pe+=H(ae,G,ee,oe,re);else if(me=x(M),typeof me=="function")for(M=me.call(M),me=0;!(ae=M.next()).done;)ae=ae.value,oe=ue+se(ae,me++),pe+=H(ae,G,ee,oe,re);else if(oe==="object"){if(typeof M.then=="function")return H(q(M),G,ee,ae,re);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return pe}function j(M,G,ee){if(M==null)return M;var ae=[],re=0;return H(M,ae,"","",function(oe){return G.call(ee,oe,re++)}),ae}function B(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var z=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function Q(){}return Te.Children={map:j,forEach:function(M,G,ee){j(M,function(){G.apply(this,arguments)},ee)},count:function(M){var G=0;return j(M,function(){G++}),G},toArray:function(M){return j(M,function(G){return G})||[]},only:function(M){if(!U(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Te.Component=w,Te.Fragment=a,Te.Profiler=o,Te.PureComponent=N,Te.StrictMode=s,Te.Suspense=m,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Te.act=function(){throw Error("act(...) is not supported in production builds of React.")},Te.cache=function(M){return function(){return M.apply(null,arguments)}},Te.cloneElement=function(M,G,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ae=T({},M.props),re=M.key,oe=void 0;if(G!=null)for(pe in G.ref!==void 0&&(oe=void 0),G.key!==void 0&&(re=""+G.key),G)!k.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(ae[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)ae.children=ee;else if(1<pe){for(var ue=Array(pe),me=0;me<pe;me++)ue[me]=arguments[me+2];ae.children=ue}return V(M.type,re,void 0,void 0,oe,ae)},Te.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},Te.createElement=function(M,G,ee){var ae,re={},oe=null;if(G!=null)for(ae in G.key!==void 0&&(oe=""+G.key),G)k.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(re[ae]=G[ae]);var pe=arguments.length-2;if(pe===1)re.children=ee;else if(1<pe){for(var ue=Array(pe),me=0;me<pe;me++)ue[me]=arguments[me+2];re.children=ue}if(M&&M.defaultProps)for(ae in pe=M.defaultProps,pe)re[ae]===void 0&&(re[ae]=pe[ae]);return V(M,oe,void 0,void 0,null,re)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(M){return{$$typeof:d,render:M}},Te.isValidElement=U,Te.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:B}},Te.memo=function(M,G){return{$$typeof:p,type:M,compare:G===void 0?null:G}},Te.startTransition=function(M){var G=L.T,ee={};L.T=ee;try{var ae=M(),re=L.S;re!==null&&re(ee,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(Q,z)}catch(oe){z(oe)}finally{L.T=G}},Te.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Te.use=function(M){return L.H.use(M)},Te.useActionState=function(M,G,ee){return L.H.useActionState(M,G,ee)},Te.useCallback=function(M,G){return L.H.useCallback(M,G)},Te.useContext=function(M){return L.H.useContext(M)},Te.useDebugValue=function(){},Te.useDeferredValue=function(M,G){return L.H.useDeferredValue(M,G)},Te.useEffect=function(M,G){return L.H.useEffect(M,G)},Te.useId=function(){return L.H.useId()},Te.useImperativeHandle=function(M,G,ee){return L.H.useImperativeHandle(M,G,ee)},Te.useInsertionEffect=function(M,G){return L.H.useInsertionEffect(M,G)},Te.useLayoutEffect=function(M,G){return L.H.useLayoutEffect(M,G)},Te.useMemo=function(M,G){return L.H.useMemo(M,G)},Te.useOptimistic=function(M,G){return L.H.useOptimistic(M,G)},Te.useReducer=function(M,G,ee){return L.H.useReducer(M,G,ee)},Te.useRef=function(M){return L.H.useRef(M)},Te.useState=function(M){return L.H.useState(M)},Te.useSyncExternalStore=function(M,G,ee){return L.H.useSyncExternalStore(M,G,ee)},Te.useTransition=function(){return L.H.useTransition()},Te.version="19.0.0",Te}var wb;function Gl(){return wb||(wb=1,Hd.exports=dA()),Hd.exports}var y=Gl();const hr=gs(y),hA=cA({__proto__:null,default:hr},[y]);var qd={exports:{}},Tl={},Bd={exports:{}},Id={};/**
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 Eb;function mA(){return Eb||(Eb=1,function(t){function r(j,B){var z=j.length;j.push(B);e:for(;0<z;){var Q=z-1>>>1,M=j[Q];if(0<o(M,B))j[Q]=B,j[z]=M,z=Q;else break e}}function a(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var B=j[0],z=j.pop();if(z!==B){j[0]=z;e:for(var Q=0,M=j.length,G=M>>>1;Q<G;){var ee=2*(Q+1)-1,ae=j[ee],re=ee+1,oe=j[re];if(0>o(ae,z))re<M&&0>o(oe,ae)?(j[Q]=oe,j[re]=z,Q=re):(j[Q]=ae,j[ee]=z,Q=ee);else if(re<M&&0>o(oe,z))j[Q]=oe,j[re]=z,Q=re;else break e}}return B}function o(j,B){var z=j.sortIndex-B.sortIndex;return z!==0?z:j.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,d=f.now();t.unstable_now=function(){return f.now()-d}}var m=[],p=[],g=1,b=null,x=3,E=!1,T=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function O(j){for(var B=a(p);B!==null;){if(B.callback===null)s(p);else if(B.startTime<=j)s(p),B.sortIndex=B.expirationTime,r(m,B);else break;B=a(p)}}function _(j){if(S=!1,O(j),!T)if(a(m)!==null)T=!0,q();else{var B=a(p);B!==null&&H(_,B.startTime-j)}}var L=!1,k=-1,V=5,$=-1;function U(){return!(t.unstable_now()-$<V)}function K(){if(L){var j=t.unstable_now();$=j;var B=!0;try{e:{T=!1,S&&(S=!1,C(k),k=-1),E=!0;var z=x;try{t:{for(O(j),b=a(m);b!==null&&!(b.expirationTime>j&&U());){var Q=b.callback;if(typeof Q=="function"){b.callback=null,x=b.priorityLevel;var M=Q(b.expirationTime<=j);if(j=t.unstable_now(),typeof M=="function"){b.callback=M,O(j),B=!0;break t}b===a(m)&&s(m),O(j)}else s(m);b=a(m)}if(b!==null)B=!0;else{var G=a(p);G!==null&&H(_,G.startTime-j),B=!1}}break e}finally{b=null,x=z,E=!1}B=void 0}}finally{B?te():L=!1}}}var te;if(typeof N=="function")te=function(){N(K)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,de=se.port2;se.port1.onmessage=K,te=function(){de.postMessage(null)}}else te=function(){w(K,0)};function q(){L||(L=!0,te())}function H(j,B){k=w(function(){j(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){T||E||(T=!0,q())},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_getFirstCallbackNode=function(){return a(m)},t.unstable_next=function(j){switch(x){case 1:case 2:case 3:var B=3;break;default:B=x}var z=x;x=B;try{return j()}finally{x=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,B){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var z=x;x=j;try{return B()}finally{x=z}},t.unstable_scheduleCallback=function(j,B,z){var Q=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Q+z:Q):z=Q,j){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=z+M,j={id:g++,callback:B,priorityLevel:j,startTime:z,expirationTime:M,sortIndex:-1},z>Q?(j.sortIndex=z,r(p,j),a(m)===null&&j===a(p)&&(S?(C(k),k=-1):S=!0,H(_,z-Q))):(j.sortIndex=M,r(m,j),T||E||(T=!0,q())),j},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(j){var B=x;return function(){var z=x;x=B;try{return j.apply(this,arguments)}finally{x=z}}}}(Id)),Id}var Rb;function pA(){return Rb||(Rb=1,Bd.exports=mA()),Bd.exports}var Vd={exports:{}},St={};/**
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 Tb;function gA(){if(Tb)return St;Tb=1;var t=Gl();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(r(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:m,containerInfo:p,implementation:g}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,St.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return c(m,p,null,g)},St.flushSync=function(m){var p=f.T,g=s.p;try{if(f.T=null,s.p=2,m)return m()}finally{f.T=p,s.p=g,s.d.f()}},St.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(m,p))},St.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},St.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,b=d(g,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?s.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:E}):g==="script"&&s.d.X(m,{crossOrigin:b,integrity:x,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},St.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);s.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(m)},St.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,b=d(g,p.crossOrigin);s.d.L(m,g,{crossOrigin:b,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})}},St.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=d(p.as,p.crossOrigin);s.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(m)},St.requestFormReset=function(m){s.d.r(m)},St.unstable_batchedUpdates=function(m,p){return m(p)},St.useFormState=function(m,p,g){return f.H.useFormState(m,p,g)},St.useFormStatus=function(){return f.H.useHostTransitionStatus()},St.version="19.0.0",St}var Cb;function $x(){if(Cb)return Vd.exports;Cb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Vd.exports=gA(),Vd.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 Ab;function vA(){if(Ab)return Tl;Ab=1;var t=pA(),r=Gl(),a=$x();function s(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}var c=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),x=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),_=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function k(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case m:return"Fragment";case d:return"Portal";case g:return"Profiler";case p:return"StrictMode";case S:return"Suspense";case w:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:return(e.displayName||"Context")+".Provider";case x:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return n=e.displayName||null,n!==null?n:$(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return $(e(n))}catch{}}return null}var U=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=Object.assign,te,se;function de(e){if(te===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);te=n&&n[1]||"",se=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+te+e+se}var q=!1;function H(e,n){if(!e||q)return"";q=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Z){var W=Z}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(Z){W=Z}e.call(ie.prototype)}}else{try{throw Error()}catch(Z){W=Z}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),R=h[0],A=h[1];if(R&&A){var D=R.split(`
44
+ `),Y=A.split(`
45
+ `);for(u=l=0;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;for(;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;if(l===D.length||u===Y.length)for(l=D.length-1,u=Y.length-1;1<=l&&0<=u&&D[l]!==Y[u];)u--;for(;1<=l&&0<=u;l--,u--)if(D[l]!==Y[u]){if(l!==1||u!==1)do if(l--,u--,0>u||D[l]!==Y[u]){var J=`
46
+ `+D[l].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=l&&0<=u);break}}}finally{q=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?de(i):""}function j(e){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de("Lazy");case 13:return de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return e=H(e.type,!1),e;case 11:return e=H(e.type.render,!1),e;case 1:return e=H(e.type,!0),e;default:return""}}function B(e){try{var n="";do n+=j(e),e=e.return;while(e);return n}catch(i){return`
47
+ Error generating stack: `+i.message+`
48
+ `+i.stack}}function z(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function Q(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function M(e){if(z(e)!==e)throw Error(s(188))}function G(e){var n=e.alternate;if(!n){if(n=z(e),n===null)throw Error(s(188));return n!==e?null:e}for(var i=e,l=n;;){var u=i.return;if(u===null)break;var h=u.alternate;if(h===null){if(l=u.return,l!==null){i=l;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===i)return M(u),e;if(h===l)return M(u),n;h=h.sibling}throw Error(s(188))}if(i.return!==l.return)i=u,l=h;else{for(var R=!1,A=u.child;A;){if(A===i){R=!0,i=u,l=h;break}if(A===l){R=!0,l=u,i=h;break}A=A.sibling}if(!R){for(A=h.child;A;){if(A===i){R=!0,i=h,l=u;break}if(A===l){R=!0,l=h,i=u;break}A=A.sibling}if(!R)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:n}function ee(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=ee(e),n!==null)return n;e=e.sibling}return null}var ae=Array.isArray,re=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},pe=[],ue=-1;function me(e){return{current:e}}function Ee(e){0>ue||(e.current=pe[ue],pe[ue]=null,ue--)}function fe(e,n){ue++,pe[ue]=e.current,e.current=n}var Se=me(null),Ae=me(null),Ie=me(null),Et=me(null);function Rn(e,n){switch(fe(Ie,n),fe(Ae,e),fe(Se,null),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)&&(n=n.namespaceURI)?Fy(n):0;break;default:if(e=e===8?n.parentNode:n,n=e.tagName,e=e.namespaceURI)e=Fy(e),n=Qy(e,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Ee(Se),fe(Se,n)}function Vt(){Ee(Se),Ee(Ae),Ee(Ie)}function Fn(e){e.memoizedState!==null&&fe(Et,e);var n=Se.current,i=Qy(n,e.type);n!==i&&(fe(Ae,e),fe(Se,i))}function si(e){Ae.current===e&&(Ee(Se),Ee(Ae)),Et.current===e&&(Ee(Et),bl._currentValue=oe)}var Cr=Object.prototype.hasOwnProperty,Mu=t.unstable_scheduleCallback,ju=t.unstable_cancelCallback,qR=t.unstable_shouldYield,BR=t.unstable_requestPaint,Tn=t.unstable_now,IR=t.unstable_getCurrentPriorityLevel,Pp=t.unstable_ImmediatePriority,Up=t.unstable_UserBlockingPriority,io=t.unstable_NormalPriority,VR=t.unstable_LowPriority,kp=t.unstable_IdlePriority,YR=t.log,GR=t.unstable_setDisableYieldValue,Ns=null,zt=null;function FR(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Ns,e,void 0,(e.current.flags&128)===128)}catch{}}function Ar(e){if(typeof YR=="function"&&GR(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(Ns,e)}catch{}}var Pt=Math.clz32?Math.clz32:KR,QR=Math.log,XR=Math.LN2;function KR(e){return e>>>=0,e===0?32:31-(QR(e)/XR|0)|0}var so=128,lo=4194304;function ya(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128: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 e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oo(e,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,u=e.suspendedLanes,h=e.pingedLanes,R=e.warmLanes;e=e.finishedLanes!==0;var A=i&134217727;return A!==0?(i=A&~u,i!==0?l=ya(i):(h&=A,h!==0?l=ya(h):e||(R=A&~R,R!==0&&(l=ya(R))))):(A=i&~u,A!==0?l=ya(A):h!==0?l=ya(h):e||(R=i&~R,R!==0&&(l=ya(R)))),l===0?0:n!==0&&n!==l&&(n&u)===0&&(u=l&-l,R=n&-n,u>=R||u===32&&(R&4194176)!==0)?n:l}function Os(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function WR(e,n){switch(e){case 1:case 2:case 4:case 8:return n+250;case 16:case 32:case 64: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 $p(){var e=so;return so<<=1,(so&4194176)===0&&(so=128),e}function Hp(){var e=lo;return lo<<=1,(lo&62914560)===0&&(lo=4194304),e}function Du(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Ms(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ZR(e,n,i,l,u,h){var R=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var A=e.entanglements,D=e.expirationTimes,Y=e.hiddenUpdates;for(i=R&~i;0<i;){var J=31-Pt(i),ie=1<<J;A[J]=0,D[J]=-1;var W=Y[J];if(W!==null)for(Y[J]=null,J=0;J<W.length;J++){var Z=W[J];Z!==null&&(Z.lane&=-536870913)}i&=~ie}l!==0&&qp(e,l,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(R&~n))}function qp(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Pt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|i&4194218}function Bp(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var l=31-Pt(i),u=1<<l;u&n|e[l]&n&&(e[l]|=n),i&=~u}}function Ip(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vp(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:db(e.type))}function JR(e,n){var i=re.p;try{return re.p=e,n()}finally{re.p=i}}var Nr=Math.random().toString(36).slice(2),bt="__reactFiber$"+Nr,Ot="__reactProps$"+Nr,li="__reactContainer$"+Nr,_u="__reactEvents$"+Nr,eT="__reactListeners$"+Nr,tT="__reactHandles$"+Nr,Yp="__reactResources$"+Nr,js="__reactMarker$"+Nr;function Lu(e){delete e[bt],delete e[Ot],delete e[_u],delete e[eT],delete e[tT]}function ba(e){var n=e[bt];if(n)return n;for(var i=e.parentNode;i;){if(n=i[li]||i[bt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Wy(e);e!==null;){if(i=e[bt])return i;e=Wy(e)}return n}e=i,i=e.parentNode}return null}function oi(e){if(e=e[bt]||e[li]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function Ds(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(s(33))}function ci(e){var n=e[Yp];return n||(n=e[Yp]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function dt(e){e[js]=!0}var Gp=new Set,Fp={};function xa(e,n){ui(e,n),ui(e+"Capture",n)}function ui(e,n){for(Fp[e]=n,e=0;e<n.length;e++)Gp.add(n[e])}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nT=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]*$"),Qp={},Xp={};function rT(e){return Cr.call(Xp,e)?!0:Cr.call(Qp,e)?!1:nT.test(e)?Xp[e]=!0:(Qp[e]=!0,!1)}function co(e,n,i){if(rT(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function uo(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Xn(e,n,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+l)}}function Yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kp(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function aT(e){var n=Kp(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,h=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(R){l=""+R,h.call(this,R)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(R){l=""+R},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function fo(e){e._valueTracker||(e._valueTracker=aT(e))}function Wp(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),l="";return e&&(l=Kp(e)?e.checked?"true":"false":e.value),e=l,e!==i?(n.setValue(e),!0):!1}function ho(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var iT=/[\n"\\]/g;function Gt(e){return e.replace(iT,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function zu(e,n,i,l,u,h,R,A){e.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.type=R:e.removeAttribute("type"),n!=null?R==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Yt(n)):e.value!==""+Yt(n)&&(e.value=""+Yt(n)):R!=="submit"&&R!=="reset"||e.removeAttribute("value"),n!=null?Pu(e,R,Yt(n)):i!=null?Pu(e,R,Yt(i)):l!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+Yt(A):e.removeAttribute("name")}function Zp(e,n,i,l,u,h,R,A){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null))return;i=i!=null?""+Yt(i):"",n=n!=null?""+Yt(n):i,A||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=A?e.checked:!!l,e.defaultChecked=!!l,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(e.name=R)}function Pu(e,n,i){n==="number"&&ho(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function fi(e,n,i,l){if(e=e.options,n){n={};for(var u=0;u<i.length;u++)n["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=n.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Yt(i),n=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Jp(e,n,i){if(n!=null&&(n=""+Yt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+Yt(i):""}function eg(e,n,i,l){if(n==null){if(l!=null){if(i!=null)throw Error(s(92));if(ae(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),n=i}i=Yt(n),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l)}function di(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var sT=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 tg(e,n,i){var l=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,i):typeof i!="number"||i===0||sT.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function ng(e,n,i){if(n!=null&&typeof n!="object")throw Error(s(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&i[u]!==l&&tg(e,u,l)}else for(var h in n)n.hasOwnProperty(h)&&tg(e,h,n[h])}function Uu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lT=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"]]),oT=/^[\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 mo(e){return oT.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ku=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,mi=null;function rg(e){var n=oi(e);if(n&&(e=n.stateNode)){var i=e[Ot]||null;e:switch(e=n.stateNode,n.type){case"input":if(zu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Gt(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var l=i[n];if(l!==e&&l.form===e.form){var u=l[Ot]||null;if(!u)throw Error(s(90));zu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<i.length;n++)l=i[n],l.form===e.form&&Wp(l)}break e;case"textarea":Jp(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&fi(e,!!i.multiple,n,!1)}}}var Hu=!1;function ag(e,n,i){if(Hu)return e(n,i);Hu=!0;try{var l=e(n);return l}finally{if(Hu=!1,(hi!==null||mi!==null)&&(Wo(),hi&&(n=hi,e=mi,mi=hi=null,rg(n),e)))for(n=0;n<e.length;n++)rg(e[n])}}function _s(e,n){var i=e.stateNode;if(i===null)return null;var l=i[Ot]||null;if(l===null)return null;i=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,n,typeof i));return i}var qu=!1;if(Qn)try{var Ls={};Object.defineProperty(Ls,"passive",{get:function(){qu=!0}}),window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{qu=!1}var Or=null,Bu=null,po=null;function ig(){if(po)return po;var e,n=Bu,i=n.length,l,u="value"in Or?Or.value:Or.textContent,h=u.length;for(e=0;e<i&&n[e]===u[e];e++);var R=i-e;for(l=1;l<=R&&n[i-l]===u[h-l];l++);return po=u.slice(e,1<l?1-l:void 0)}function go(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function vo(){return!0}function sg(){return!1}function Mt(e){function n(i,l,u,h,R){this._reactName=i,this._targetInst=u,this.type=l,this.nativeEvent=h,this.target=R,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(i=e[A],this[A]=i?i(h):h[A]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?vo:sg,this.isPropagationStopped=sg,this}return K(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=vo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=vo)},persist:function(){},isPersistent:vo}),n}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=Mt(Sa),zs=K({},Sa,{view:0,detail:0}),cT=Mt(zs),Iu,Vu,Ps,bo=K({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ps&&(Ps&&e.type==="mousemove"?(Iu=e.screenX-Ps.screenX,Vu=e.screenY-Ps.screenY):Vu=Iu=0,Ps=e),Iu)},movementY:function(e){return"movementY"in e?e.movementY:Vu}}),lg=Mt(bo),uT=K({},bo,{dataTransfer:0}),fT=Mt(uT),dT=K({},zs,{relatedTarget:0}),Yu=Mt(dT),hT=K({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),mT=Mt(hT),pT=K({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gT=Mt(pT),vT=K({},Sa,{data:0}),og=Mt(vT),yT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bT={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"},xT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ST(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=xT[e])?!!n[e]:!1}function Gu(){return ST}var wT=K({},zs,{key:function(e){if(e.key){var n=yT[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gu,charCode:function(e){return e.type==="keypress"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ET=Mt(wT),RT=K({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=Mt(RT),TT=K({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gu}),CT=Mt(TT),AT=K({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),NT=Mt(AT),OT=K({},bo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),MT=Mt(OT),jT=K({},Sa,{newState:0,oldState:0}),DT=Mt(jT),_T=[9,13,27,32],Fu=Qn&&"CompositionEvent"in window,Us=null;Qn&&"documentMode"in document&&(Us=document.documentMode);var LT=Qn&&"TextEvent"in window&&!Us,ug=Qn&&(!Fu||Us&&8<Us&&11>=Us),fg=" ",dg=!1;function hg(e,n){switch(e){case"keyup":return _T.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function zT(e,n){switch(e){case"compositionend":return mg(n);case"keypress":return n.which!==32?null:(dg=!0,fg);case"textInput":return e=n.data,e===fg&&dg?null:e;default:return null}}function PT(e,n){if(pi)return e==="compositionend"||!Fu&&hg(e,n)?(e=ig(),po=Bu=Or=null,pi=!1,e):null;switch(e){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 ug&&n.locale!=="ko"?null:n.data;default:return null}}var UT={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 pg(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!UT[e.type]:n==="textarea"}function gg(e,n,i,l){hi?mi?mi.push(l):mi=[l]:hi=l,n=nc(n,"onChange"),0<n.length&&(i=new yo("onChange","change",null,i,l),e.push({event:i,listeners:n}))}var ks=null,$s=null;function kT(e){By(e,0)}function xo(e){var n=Ds(e);if(Wp(n))return e}function vg(e,n){if(e==="change")return n}var yg=!1;if(Qn){var Qu;if(Qn){var Xu="oninput"in document;if(!Xu){var bg=document.createElement("div");bg.setAttribute("oninput","return;"),Xu=typeof bg.oninput=="function"}Qu=Xu}else Qu=!1;yg=Qu&&(!document.documentMode||9<document.documentMode)}function xg(){ks&&(ks.detachEvent("onpropertychange",Sg),$s=ks=null)}function Sg(e){if(e.propertyName==="value"&&xo($s)){var n=[];gg(n,$s,e,$u(e)),ag(kT,n)}}function $T(e,n,i){e==="focusin"?(xg(),ks=n,$s=i,ks.attachEvent("onpropertychange",Sg)):e==="focusout"&&xg()}function HT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo($s)}function qT(e,n){if(e==="click")return xo(n)}function BT(e,n){if(e==="input"||e==="change")return xo(n)}function IT(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ut=typeof Object.is=="function"?Object.is:IT;function Hs(e,n){if(Ut(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),l=Object.keys(n);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var u=i[l];if(!Cr.call(n,u)||!Ut(e[u],n[u]))return!1}return!0}function wg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Eg(e,n){var i=wg(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=n&&l>=n)return{node:i,offset:n-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=wg(i)}}function Rg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Rg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Tg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ho(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=ho(e.document)}return n}function Ku(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function VT(e,n){var i=Tg(n);n=e.focusedElem;var l=e.selectionRange;if(i!==n&&n&&n.ownerDocument&&Rg(n.ownerDocument.documentElement,n)){if(l!==null&&Ku(n)){if(e=l.start,i=l.end,i===void 0&&(i=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(i,n.value.length);else if(i=(e=n.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var u=n.textContent.length,h=Math.min(l.start,u);l=l.end===void 0?h:Math.min(l.end,u),!i.extend&&h>l&&(u=l,l=h,h=u),u=Eg(n,h);var R=Eg(n,l);u&&R&&(i.rangeCount!==1||i.anchorNode!==u.node||i.anchorOffset!==u.offset||i.focusNode!==R.node||i.focusOffset!==R.offset)&&(e=e.createRange(),e.setStart(u.node,u.offset),i.removeAllRanges(),h>l?(i.addRange(e),i.extend(R.node,R.offset)):(e.setEnd(R.node,R.offset),i.addRange(e)))}}for(e=[],i=n;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)i=e[n],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var YT=Qn&&"documentMode"in document&&11>=document.documentMode,gi=null,Wu=null,qs=null,Zu=!1;function Cg(e,n,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Zu||gi==null||gi!==ho(l)||(l=gi,"selectionStart"in l&&Ku(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qs&&Hs(qs,l)||(qs=l,l=nc(Wu,"onSelect"),0<l.length&&(n=new yo("onSelect","select",null,n,i),e.push({event:n,listeners:l}),n.target=gi)))}function wa(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var vi={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},Ju={},Ag={};Qn&&(Ag=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Ea(e){if(Ju[e])return Ju[e];if(!vi[e])return e;var n=vi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Ag)return Ju[e]=n[i];return e}var Ng=Ea("animationend"),Og=Ea("animationiteration"),Mg=Ea("animationstart"),GT=Ea("transitionrun"),FT=Ea("transitionstart"),QT=Ea("transitioncancel"),jg=Ea("transitionend"),Dg=new Map,_g="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 scrollEnd toggle touchMove waiting wheel".split(" ");function cn(e,n){Dg.set(e,n),xa(n,[e])}var Ft=[],yi=0,ef=0;function So(){for(var e=yi,n=ef=yi=0;n<e;){var i=Ft[n];Ft[n++]=null;var l=Ft[n];Ft[n++]=null;var u=Ft[n];Ft[n++]=null;var h=Ft[n];if(Ft[n++]=null,l!==null&&u!==null){var R=l.pending;R===null?u.next=u:(u.next=R.next,R.next=u),l.pending=u}h!==0&&Lg(i,u,h)}}function wo(e,n,i,l){Ft[yi++]=e,Ft[yi++]=n,Ft[yi++]=i,Ft[yi++]=l,ef|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function tf(e,n,i,l){return wo(e,n,i,l),Eo(e)}function Mr(e,n){return wo(e,null,null,n),Eo(e)}function Lg(e,n,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var u=!1,h=e.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;u&&n!==null&&e.tag===3&&(h=e.stateNode,u=31-Pt(i),h=h.hiddenUpdates,e=h[u],e===null?h[u]=[n]:e.push(n),n.lane=i|536870912)}function Eo(e){if(50<dl)throw dl=0,od=null,Error(s(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var bi={},zg=new WeakMap;function Qt(e,n){if(typeof e=="object"&&e!==null){var i=zg.get(e);return i!==void 0?i:(n={value:e,source:n,stack:B(n)},zg.set(e,n),n)}return{value:e,source:n,stack:B(n)}}var xi=[],Si=0,Ro=null,To=0,Xt=[],Kt=0,Ra=null,Kn=1,Wn="";function Ta(e,n){xi[Si++]=To,xi[Si++]=Ro,Ro=e,To=n}function Pg(e,n,i){Xt[Kt++]=Kn,Xt[Kt++]=Wn,Xt[Kt++]=Ra,Ra=e;var l=Kn;e=Wn;var u=32-Pt(l)-1;l&=~(1<<u),i+=1;var h=32-Pt(n)+u;if(30<h){var R=u-u%5;h=(l&(1<<R)-1).toString(32),l>>=R,u-=R,Kn=1<<32-Pt(n)+u|i<<u|l,Wn=h+e}else Kn=1<<h|i<<u|l,Wn=e}function nf(e){e.return!==null&&(Ta(e,1),Pg(e,1,0))}function rf(e){for(;e===Ro;)Ro=xi[--Si],xi[Si]=null,To=xi[--Si],xi[Si]=null;for(;e===Ra;)Ra=Xt[--Kt],Xt[Kt]=null,Wn=Xt[--Kt],Xt[Kt]=null,Kn=Xt[--Kt],Xt[Kt]=null}var Rt=null,gt=null,ze=!1,un=null,Cn=!1,af=Error(s(519));function Ca(e){var n=Error(s(418,""));throw Vs(Qt(n,e)),af}function Ug(e){var n=e.stateNode,i=e.type,l=e.memoizedProps;switch(n[bt]=e,n[Ot]=l,i){case"dialog":De("cancel",n),De("close",n);break;case"iframe":case"object":case"embed":De("load",n);break;case"video":case"audio":for(i=0;i<ml.length;i++)De(ml[i],n);break;case"source":De("error",n);break;case"img":case"image":case"link":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"input":De("invalid",n),Zp(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),fo(n);break;case"select":De("invalid",n);break;case"textarea":De("invalid",n),eg(n,l.value,l.defaultValue,l.children),fo(n)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||l.suppressHydrationWarning===!0||Gy(n.textContent,i)?(l.popover!=null&&(De("beforetoggle",n),De("toggle",n)),l.onScroll!=null&&De("scroll",n),l.onScrollEnd!=null&&De("scrollend",n),l.onClick!=null&&(n.onclick=rc),n=!0):n=!1,n||Ca(e)}function kg(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 3:case 27:Cn=!0;return;case 5:case 13:Cn=!1;return;default:Rt=Rt.return}}function Bs(e){if(e!==Rt)return!1;if(!ze)return kg(e),ze=!0,!1;var n=!1,i;if((i=e.tag!==3&&e.tag!==27)&&((i=e.tag===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Td(e.type,e.memoizedProps)),i=!i),i&&(n=!0),n&&gt&&Ca(e),kg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(i=e.data,i==="/$"){if(n===0){gt=dn(e.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++;e=e.nextSibling}gt=null}}else gt=Rt?dn(e.stateNode.nextSibling):null;return!0}function Is(){gt=Rt=null,ze=!1}function Vs(e){un===null?un=[e]:un.push(e)}var Ys=Error(s(460)),$g=Error(s(474)),sf={then:function(){}};function Hg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Co(){}function qg(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(Co,Co),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,e===Ys?Error(s(483)):e;default:if(typeof n.status=="string")n.then(Co,Co);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,e===Ys?Error(s(483)):e}throw Gs=n,Ys}}var Gs=null;function Bg(){if(Gs===null)throw Error(s(459));var e=Gs;return Gs=null,e}var wi=null,Fs=0;function Ao(e){var n=Fs;return Fs+=1,wi===null&&(wi=[]),qg(wi,e,n)}function Qs(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function No(e,n){throw n.$$typeof===c?Error(s(525)):(e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ig(e){var n=e._init;return n(e._payload)}function Vg(e){function n(F,I){if(e){var X=F.deletions;X===null?(F.deletions=[I],F.flags|=16):X.push(I)}}function i(F,I){if(!e)return null;for(;I!==null;)n(F,I),I=I.sibling;return null}function l(F){for(var I=new Map;F!==null;)F.key!==null?I.set(F.key,F):I.set(F.index,F),F=F.sibling;return I}function u(F,I){return F=Br(F,I),F.index=0,F.sibling=null,F}function h(F,I,X){return F.index=X,e?(X=F.alternate,X!==null?(X=X.index,X<I?(F.flags|=33554434,I):X):(F.flags|=33554434,I)):(F.flags|=1048576,I)}function R(F){return e&&F.alternate===null&&(F.flags|=33554434),F}function A(F,I,X,ne){return I===null||I.tag!==6?(I=ed(X,F.mode,ne),I.return=F,I):(I=u(I,X),I.return=F,I)}function D(F,I,X,ne){var he=X.type;return he===m?J(F,I,X.props.children,ne,X.key):I!==null&&(I.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===N&&Ig(he)===I.type)?(I=u(I,X.props),Qs(I,X),I.return=F,I):(I=Go(X.type,X.key,X.props,null,F.mode,ne),Qs(I,X),I.return=F,I)}function Y(F,I,X,ne){return I===null||I.tag!==4||I.stateNode.containerInfo!==X.containerInfo||I.stateNode.implementation!==X.implementation?(I=td(X,F.mode,ne),I.return=F,I):(I=u(I,X.children||[]),I.return=F,I)}function J(F,I,X,ne,he){return I===null||I.tag!==7?(I=Pa(X,F.mode,ne,he),I.return=F,I):(I=u(I,X),I.return=F,I)}function ie(F,I,X){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=ed(""+I,F.mode,X),I.return=F,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case f:return X=Go(I.type,I.key,I.props,null,F.mode,X),Qs(X,I),X.return=F,X;case d:return I=td(I,F.mode,X),I.return=F,I;case N:var ne=I._init;return I=ne(I._payload),ie(F,I,X)}if(ae(I)||k(I))return I=Pa(I,F.mode,X,null),I.return=F,I;if(typeof I.then=="function")return ie(F,Ao(I),X);if(I.$$typeof===E)return ie(F,Io(F,I),X);No(F,I)}return null}function W(F,I,X,ne){var he=I!==null?I.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return he!==null?null:A(F,I,""+X,ne);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case f:return X.key===he?D(F,I,X,ne):null;case d:return X.key===he?Y(F,I,X,ne):null;case N:return he=X._init,X=he(X._payload),W(F,I,X,ne)}if(ae(X)||k(X))return he!==null?null:J(F,I,X,ne,null);if(typeof X.then=="function")return W(F,I,Ao(X),ne);if(X.$$typeof===E)return W(F,I,Io(F,X),ne);No(F,X)}return null}function Z(F,I,X,ne,he){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return F=F.get(X)||null,A(I,F,""+ne,he);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case f:return F=F.get(ne.key===null?X:ne.key)||null,D(I,F,ne,he);case d:return F=F.get(ne.key===null?X:ne.key)||null,Y(I,F,ne,he);case N:var Me=ne._init;return ne=Me(ne._payload),Z(F,I,X,ne,he)}if(ae(ne)||k(ne))return F=F.get(X)||null,J(I,F,ne,he,null);if(typeof ne.then=="function")return Z(F,I,X,Ao(ne),he);if(ne.$$typeof===E)return Z(F,I,X,Io(I,ne),he);No(I,ne)}return null}function ge(F,I,X,ne){for(var he=null,Me=null,ye=I,xe=I=0,pt=null;ye!==null&&xe<X.length;xe++){ye.index>xe?(pt=ye,ye=null):pt=ye.sibling;var Pe=W(F,ye,X[xe],ne);if(Pe===null){ye===null&&(ye=pt);break}e&&ye&&Pe.alternate===null&&n(F,ye),I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe,ye=pt}if(xe===X.length)return i(F,ye),ze&&Ta(F,xe),he;if(ye===null){for(;xe<X.length;xe++)ye=ie(F,X[xe],ne),ye!==null&&(I=h(ye,I,xe),Me===null?he=ye:Me.sibling=ye,Me=ye);return ze&&Ta(F,xe),he}for(ye=l(ye);xe<X.length;xe++)pt=Z(ye,F,xe,X[xe],ne),pt!==null&&(e&&pt.alternate!==null&&ye.delete(pt.key===null?xe:pt.key),I=h(pt,I,xe),Me===null?he=pt:Me.sibling=pt,Me=pt);return e&&ye.forEach(function(Xr){return n(F,Xr)}),ze&&Ta(F,xe),he}function Re(F,I,X,ne){if(X==null)throw Error(s(151));for(var he=null,Me=null,ye=I,xe=I=0,pt=null,Pe=X.next();ye!==null&&!Pe.done;xe++,Pe=X.next()){ye.index>xe?(pt=ye,ye=null):pt=ye.sibling;var Xr=W(F,ye,Pe.value,ne);if(Xr===null){ye===null&&(ye=pt);break}e&&ye&&Xr.alternate===null&&n(F,ye),I=h(Xr,I,xe),Me===null?he=Xr:Me.sibling=Xr,Me=Xr,ye=pt}if(Pe.done)return i(F,ye),ze&&Ta(F,xe),he;if(ye===null){for(;!Pe.done;xe++,Pe=X.next())Pe=ie(F,Pe.value,ne),Pe!==null&&(I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe);return ze&&Ta(F,xe),he}for(ye=l(ye);!Pe.done;xe++,Pe=X.next())Pe=Z(ye,F,xe,Pe.value,ne),Pe!==null&&(e&&Pe.alternate!==null&&ye.delete(Pe.key===null?xe:Pe.key),I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe);return e&&ye.forEach(function(oA){return n(F,oA)}),ze&&Ta(F,xe),he}function et(F,I,X,ne){if(typeof X=="object"&&X!==null&&X.type===m&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case f:e:{for(var he=X.key;I!==null;){if(I.key===he){if(he=X.type,he===m){if(I.tag===7){i(F,I.sibling),ne=u(I,X.props.children),ne.return=F,F=ne;break e}}else if(I.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===N&&Ig(he)===I.type){i(F,I.sibling),ne=u(I,X.props),Qs(ne,X),ne.return=F,F=ne;break e}i(F,I);break}else n(F,I);I=I.sibling}X.type===m?(ne=Pa(X.props.children,F.mode,ne,X.key),ne.return=F,F=ne):(ne=Go(X.type,X.key,X.props,null,F.mode,ne),Qs(ne,X),ne.return=F,F=ne)}return R(F);case d:e:{for(he=X.key;I!==null;){if(I.key===he)if(I.tag===4&&I.stateNode.containerInfo===X.containerInfo&&I.stateNode.implementation===X.implementation){i(F,I.sibling),ne=u(I,X.children||[]),ne.return=F,F=ne;break e}else{i(F,I);break}else n(F,I);I=I.sibling}ne=td(X,F.mode,ne),ne.return=F,F=ne}return R(F);case N:return he=X._init,X=he(X._payload),et(F,I,X,ne)}if(ae(X))return ge(F,I,X,ne);if(k(X)){if(he=k(X),typeof he!="function")throw Error(s(150));return X=he.call(X),Re(F,I,X,ne)}if(typeof X.then=="function")return et(F,I,Ao(X),ne);if(X.$$typeof===E)return et(F,I,Io(F,X),ne);No(F,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,I!==null&&I.tag===6?(i(F,I.sibling),ne=u(I,X),ne.return=F,F=ne):(i(F,I),ne=ed(X,F.mode,ne),ne.return=F,F=ne),R(F)):i(F,I)}return function(F,I,X,ne){try{Fs=0;var he=et(F,I,X,ne);return wi=null,he}catch(ye){if(ye===Ys)throw ye;var Me=en(29,ye,null,F.mode);return Me.lanes=ne,Me.return=F,Me}finally{}}}var Aa=Vg(!0),Yg=Vg(!1),Ei=me(null),Oo=me(0);function Gg(e,n){e=or,fe(Oo,e),fe(Ei,n),or=e|n.baseLanes}function lf(){fe(Oo,or),fe(Ei,Ei.current)}function of(){or=Oo.current,Ee(Ei),Ee(Oo)}var Wt=me(null),An=null;function jr(e){var n=e.alternate;fe(ot,ot.current&1),fe(Wt,e),An===null&&(n===null||Ei.current!==null||n.memoizedState!==null)&&(An=e)}function Fg(e){if(e.tag===22){if(fe(ot,ot.current),fe(Wt,e),An===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(An=e)}}else Dr()}function Dr(){fe(ot,ot.current),fe(Wt,Wt.current)}function Zn(e){Ee(Wt),An===e&&(An=null),Ee(ot)}var ot=me(0);function Mo(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var XT=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},KT=t.unstable_scheduleCallback,WT=t.unstable_NormalPriority,ct={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cf(){return{controller:new XT,data:new Map,refCount:0}}function Xs(e){e.refCount--,e.refCount===0&&KT(WT,function(){e.controller.abort()})}var Ks=null,uf=0,Ri=0,Ti=null;function ZT(e,n){if(Ks===null){var i=Ks=[];uf=0,Ri=gd(),Ti={status:"pending",value:void 0,then:function(l){i.push(l)}}}return uf++,n.then(Qg,Qg),n}function Qg(){if(--uf===0&&Ks!==null){Ti!==null&&(Ti.status="fulfilled");var e=Ks;Ks=null,Ri=0,Ti=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function JT(e,n){var i=[],l={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<i.length;u++)(0,i[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),l}var Xg=U.S;U.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&ZT(e,n),Xg!==null&&Xg(e,n)};var Na=me(null);function ff(){var e=Na.current;return e!==null?e:Ye.pooledCache}function jo(e,n){n===null?fe(Na,Na.current):fe(Na,n.pool)}function Kg(){var e=ff();return e===null?null:{parent:ct._currentValue,pool:e}}var _r=0,Oe=null,He=null,at=null,Do=!1,Ci=!1,Oa=!1,_o=0,Ws=0,Ai=null,eC=0;function rt(){throw Error(s(321))}function df(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Ut(e[i],n[i]))return!1;return!0}function hf(e,n,i,l,u,h){return _r=h,Oe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Ma:Lr,Oa=!1,h=i(l,u),Oa=!1,Ci&&(h=Zg(n,i,l,u)),Wg(e),h}function Wg(e){U.H=Nn;var n=He!==null&&He.next!==null;if(_r=0,at=He=Oe=null,Do=!1,Ws=0,Ai=null,n)throw Error(s(300));e===null||ht||(e=e.dependencies,e!==null&&Bo(e)&&(ht=!0))}function Zg(e,n,i,l){Oe=e;var u=0;do{if(Ci&&(Ai=null),Ws=0,Ci=!1,25<=u)throw Error(s(301));if(u+=1,at=He=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=ja,h=n(i,l)}while(Ci);return h}function tC(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Zs(n):n,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Oe.flags|=1024),n}function mf(){var e=_o!==0;return _o=0,e}function pf(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function gf(e){if(Do){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Do=!1}_r=0,at=He=Oe=null,Ci=!1,Ws=_o=0,Ai=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Oe.memoizedState=at=e:at=at.next=e,at}function it(){if(He===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var n=at===null?Oe.memoizedState:at.next;if(n!==null)at=n,He=e;else{if(e===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},at===null?Oe.memoizedState=at=e:at=at.next=e}return at}var Lo;Lo=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Zs(e){var n=Ws;return Ws+=1,Ai===null&&(Ai=[]),e=qg(Ai,e,n),n=Oe,(at===null?n.memoizedState:at.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Ma:Lr),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zs(e);if(e.$$typeof===E)return xt(e)}throw Error(s(438,String(e)))}function vf(e){var n=null,i=Oe.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var l=Oe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Lo(),Oe.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),l=0;l<e;l++)i[l]=_;return n.index++,i}function Jn(e,n){return typeof n=="function"?n(e):n}function Po(e){var n=it();return yf(n,He,e)}function yf(e,n,i){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var u=e.baseQueue,h=l.pending;if(h!==null){if(u!==null){var R=u.next;u.next=h.next,h.next=R}n.baseQueue=u=h,l.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{n=u.next;var A=R=null,D=null,Y=n,J=!1;do{var ie=Y.lane&-536870913;if(ie!==Y.lane?(Le&ie)===ie:(_r&ie)===ie){var W=Y.revertLane;if(W===0)D!==null&&(D=D.next={lane:0,revertLane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ie===Ri&&(J=!0);else if((_r&W)===W){Y=Y.next,W===Ri&&(J=!0);continue}else ie={lane:0,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},D===null?(A=D=ie,R=h):D=D.next=ie,Oe.lanes|=W,Ir|=W;ie=Y.action,Oa&&i(h,ie),h=Y.hasEagerState?Y.eagerState:i(h,ie)}else W={lane:ie,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},D===null?(A=D=W,R=h):D=D.next=W,Oe.lanes|=ie,Ir|=ie;Y=Y.next}while(Y!==null&&Y!==n);if(D===null?R=h:D.next=A,!Ut(h,e.memoizedState)&&(ht=!0,J&&(i=Ti,i!==null)))throw i;e.memoizedState=h,e.baseState=R,e.baseQueue=D,l.lastRenderedState=h}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function bf(e){var n=it(),i=n.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var l=i.dispatch,u=i.pending,h=n.memoizedState;if(u!==null){i.pending=null;var R=u=u.next;do h=e(h,R.action),R=R.next;while(R!==u);Ut(h,n.memoizedState)||(ht=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,l]}function Jg(e,n,i){var l=Oe,u=it(),h=ze;if(h){if(i===void 0)throw Error(s(407));i=i()}else i=n();var R=!Ut((He||u).memoizedState,i);if(R&&(u.memoizedState=i,ht=!0),u=u.queue,wf(nv.bind(null,l,u,e),[e]),u.getSnapshot!==n||R||at!==null&&at.memoizedState.tag&1){if(l.flags|=2048,Ni(9,tv.bind(null,l,u,i,n),{destroy:void 0},null),Ye===null)throw Error(s(349));h||(_r&60)!==0||ev(l,n,i)}return i}function ev(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Oe.updateQueue,n===null?(n=Lo(),Oe.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function tv(e,n,i,l){n.value=i,n.getSnapshot=l,rv(n)&&av(e)}function nv(e,n,i){return i(function(){rv(n)&&av(e)})}function rv(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Ut(e,i)}catch{return!0}}function av(e){var n=Mr(e,2);n!==null&&Tt(n,e,2)}function xf(e){var n=jt();if(typeof e=="function"){var i=e;if(e=i(),Oa){Ar(!0);try{i()}finally{Ar(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function iv(e,n,i,l){return e.baseState=i,yf(e,He,typeof l=="function"?l:Jn)}function nC(e,n,i,l,u){if($o(e))throw Error(s(485));if(e=n.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){h.listeners.push(R)}};U.T!==null?i(!0):h.isTransition=!1,l(h),i=n.pending,i===null?(h.next=n.pending=h,sv(n,h)):(h.next=i.next,n.pending=i.next=h)}}function sv(e,n){var i=n.action,l=n.payload,u=e.state;if(n.isTransition){var h=U.T,R={};U.T=R;try{var A=i(u,l),D=U.S;D!==null&&D(R,A),lv(e,n,A)}catch(Y){Sf(e,n,Y)}finally{U.T=h}}else try{h=i(u,l),lv(e,n,h)}catch(Y){Sf(e,n,Y)}}function lv(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){ov(e,n,l)},function(l){return Sf(e,n,l)}):ov(e,n,i)}function ov(e,n,i){n.status="fulfilled",n.value=i,cv(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,sv(e,i)))}function Sf(e,n,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=i,cv(n),n=n.next;while(n!==l)}e.action=null}function cv(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function uv(e,n){return n}function fv(e,n){if(ze){var i=Ye.formState;if(i!==null){e:{var l=Oe;if(ze){if(gt){t:{for(var u=gt,h=Cn;u.nodeType!==8;){if(!h){u=null;break t}if(u=dn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){gt=dn(u.nextSibling),l=u.data==="F!";break e}}Ca(l)}l=!1}l&&(n=i[0])}}return i=jt(),i.memoizedState=i.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uv,lastRenderedState:n},i.queue=l,i=Ov.bind(null,Oe,l),l.dispatch=i,l=xf(!1),h=Af.bind(null,Oe,!1,l.queue),l=jt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,i=nC.bind(null,Oe,u,h,i),u.dispatch=i,l.memoizedState=e,[n,i,!1]}function dv(e){var n=it();return hv(n,He,e)}function hv(e,n,i){n=yf(e,n,uv)[0],e=Po(Jn)[0],n=typeof n=="object"&&n!==null&&typeof n.then=="function"?Zs(n):n;var l=it(),u=l.queue,h=u.dispatch;return i!==l.memoizedState&&(Oe.flags|=2048,Ni(9,rC.bind(null,u,i),{destroy:void 0},null)),[n,h,e]}function rC(e,n){e.action=n}function mv(e){var n=it(),i=He;if(i!==null)return hv(n,i,e);it(),n=n.memoizedState,i=it();var l=i.queue.dispatch;return i.memoizedState=e,[n,l,!1]}function Ni(e,n,i,l){return e={tag:e,create:n,inst:i,deps:l,next:null},n=Oe.updateQueue,n===null&&(n=Lo(),Oe.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,n.lastEffect=e),e}function pv(){return it().memoizedState}function Uo(e,n,i,l){var u=jt();Oe.flags|=e,u.memoizedState=Ni(1|n,i,{destroy:void 0},l===void 0?null:l)}function ko(e,n,i,l){var u=it();l=l===void 0?null:l;var h=u.memoizedState.inst;He!==null&&l!==null&&df(l,He.memoizedState.deps)?u.memoizedState=Ni(n,i,h,l):(Oe.flags|=e,u.memoizedState=Ni(1|n,i,h,l))}function gv(e,n){Uo(8390656,8,e,n)}function wf(e,n){ko(2048,8,e,n)}function vv(e,n){return ko(4,2,e,n)}function yv(e,n){return ko(4,4,e,n)}function bv(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function xv(e,n,i){i=i!=null?i.concat([e]):null,ko(4,4,bv.bind(null,n,e),i)}function Ef(){}function Sv(e,n){var i=it();n=n===void 0?null:n;var l=i.memoizedState;return n!==null&&df(n,l[1])?l[0]:(i.memoizedState=[e,n],e)}function wv(e,n){var i=it();n=n===void 0?null:n;var l=i.memoizedState;if(n!==null&&df(n,l[1]))return l[0];if(l=e(),Oa){Ar(!0);try{e()}finally{Ar(!1)}}return i.memoizedState=[l,n],l}function Rf(e,n,i){return i===void 0||(_r&1073741824)!==0?e.memoizedState=n:(e.memoizedState=i,e=Ry(),Oe.lanes|=e,Ir|=e,i)}function Ev(e,n,i,l){return Ut(i,n)?i:Ei.current!==null?(e=Rf(e,i,l),Ut(e,n)||(ht=!0),e):(_r&42)===0?(ht=!0,e.memoizedState=i):(e=Ry(),Oe.lanes|=e,Ir|=e,n)}function Rv(e,n,i,l,u){var h=re.p;re.p=h!==0&&8>h?h:8;var R=U.T,A={};U.T=A,Af(e,!1,n,i);try{var D=u(),Y=U.S;if(Y!==null&&Y(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var J=JT(D,l);Js(e,n,J,qt(e))}else Js(e,n,l,qt(e))}catch(ie){Js(e,n,{then:function(){},status:"rejected",reason:ie},qt())}finally{re.p=h,U.T=R}}function aC(){}function Tf(e,n,i,l){if(e.tag!==5)throw Error(s(476));var u=Tv(e).queue;Rv(e,u,n,oe,i===null?aC:function(){return Cv(e),i(l)})}function Tv(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:oe},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Cv(e){var n=Tv(e).next.queue;Js(e,n,{},qt())}function Cf(){return xt(bl)}function Av(){return it().memoizedState}function Nv(){return it().memoizedState}function iC(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=qt();e=Ur(i);var l=kr(n,e,i);l!==null&&(Tt(l,n,i),nl(l,n,i)),n={cache:cf()},e.payload=n;return}n=n.return}}function sC(e,n,i){var l=qt();i={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},$o(e)?Mv(n,i):(i=tf(e,n,i,l),i!==null&&(Tt(i,e,l),jv(i,n,l)))}function Ov(e,n,i){var l=qt();Js(e,n,i,l)}function Js(e,n,i,l){var u={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if($o(e))Mv(n,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var R=n.lastRenderedState,A=h(R,i);if(u.hasEagerState=!0,u.eagerState=A,Ut(A,R))return wo(e,n,u,0),Ye===null&&So(),!1}catch{}finally{}if(i=tf(e,n,u,l),i!==null)return Tt(i,e,l),jv(i,n,l),!0}return!1}function Af(e,n,i,l){if(l={lane:2,revertLane:gd(),action:l,hasEagerState:!1,eagerState:null,next:null},$o(e)){if(n)throw Error(s(479))}else n=tf(e,i,l,2),n!==null&&Tt(n,e,2)}function $o(e){var n=e.alternate;return e===Oe||n!==null&&n===Oe}function Mv(e,n){Ci=Do=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function jv(e,n,i){if((i&4194176)!==0){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Bp(e,i)}}var Nn={readContext:xt,use:zo,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt};Nn.useCacheRefresh=rt,Nn.useMemoCache=rt,Nn.useHostTransitionStatus=rt,Nn.useFormState=rt,Nn.useActionState=rt,Nn.useOptimistic=rt;var Ma={readContext:xt,use:zo,useCallback:function(e,n){return jt().memoizedState=[e,n===void 0?null:n],e},useContext:xt,useEffect:gv,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Uo(4194308,4,bv.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Uo(4194308,4,e,n)},useInsertionEffect:function(e,n){Uo(4,2,e,n)},useMemo:function(e,n){var i=jt();n=n===void 0?null:n;var l=e();if(Oa){Ar(!0);try{e()}finally{Ar(!1)}}return i.memoizedState=[l,n],l},useReducer:function(e,n,i){var l=jt();if(i!==void 0){var u=i(n);if(Oa){Ar(!0);try{i(n)}finally{Ar(!1)}}}else u=n;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=sC.bind(null,Oe,e),[l.memoizedState,e]},useRef:function(e){var n=jt();return e={current:e},n.memoizedState=e},useState:function(e){e=xf(e);var n=e.queue,i=Ov.bind(null,Oe,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:Ef,useDeferredValue:function(e,n){var i=jt();return Rf(i,e,n)},useTransition:function(){var e=xf(!1);return e=Rv.bind(null,Oe,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var l=Oe,u=jt();if(ze){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),Ye===null)throw Error(s(349));(Le&60)!==0||ev(l,n,i)}u.memoizedState=i;var h={value:i,getSnapshot:n};return u.queue=h,gv(nv.bind(null,l,h,e),[e]),l.flags|=2048,Ni(9,tv.bind(null,l,h,i,n),{destroy:void 0},null),i},useId:function(){var e=jt(),n=Ye.identifierPrefix;if(ze){var i=Wn,l=Kn;i=(l&~(1<<32-Pt(l)-1)).toString(32)+i,n=":"+n+"R"+i,i=_o++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=eC++,n=":"+n+"r"+i.toString(32)+":";return e.memoizedState=n},useCacheRefresh:function(){return jt().memoizedState=iC.bind(null,Oe)}};Ma.useMemoCache=vf,Ma.useHostTransitionStatus=Cf,Ma.useFormState=fv,Ma.useActionState=fv,Ma.useOptimistic=function(e){var n=jt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Af.bind(null,Oe,!0,i),i.dispatch=n,[e,n]};var Lr={readContext:xt,use:zo,useCallback:Sv,useContext:xt,useEffect:wf,useImperativeHandle:xv,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:wv,useReducer:Po,useRef:pv,useState:function(){return Po(Jn)},useDebugValue:Ef,useDeferredValue:function(e,n){var i=it();return Ev(i,He.memoizedState,e,n)},useTransition:function(){var e=Po(Jn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Zs(e),n]},useSyncExternalStore:Jg,useId:Av};Lr.useCacheRefresh=Nv,Lr.useMemoCache=vf,Lr.useHostTransitionStatus=Cf,Lr.useFormState=dv,Lr.useActionState=dv,Lr.useOptimistic=function(e,n){var i=it();return iv(i,He,e,n)};var ja={readContext:xt,use:zo,useCallback:Sv,useContext:xt,useEffect:wf,useImperativeHandle:xv,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:wv,useReducer:bf,useRef:pv,useState:function(){return bf(Jn)},useDebugValue:Ef,useDeferredValue:function(e,n){var i=it();return He===null?Rf(i,e,n):Ev(i,He.memoizedState,e,n)},useTransition:function(){var e=bf(Jn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Zs(e),n]},useSyncExternalStore:Jg,useId:Av};ja.useCacheRefresh=Nv,ja.useMemoCache=vf,ja.useHostTransitionStatus=Cf,ja.useFormState=mv,ja.useActionState=mv,ja.useOptimistic=function(e,n){var i=it();return He!==null?iv(i,He,e,n):(i.baseState=e,[e,i.queue.dispatch])};function Nf(e,n,i,l){n=e.memoizedState,i=i(l,n),i=i==null?n:K({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Of={isMounted:function(e){return(e=e._reactInternals)?z(e)===e:!1},enqueueSetState:function(e,n,i){e=e._reactInternals;var l=qt(),u=Ur(l);u.payload=n,i!=null&&(u.callback=i),n=kr(e,u,l),n!==null&&(Tt(n,e,l),nl(n,e,l))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var l=qt(),u=Ur(l);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=kr(e,u,l),n!==null&&(Tt(n,e,l),nl(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=qt(),l=Ur(i);l.tag=2,n!=null&&(l.callback=n),n=kr(e,l,i),n!==null&&(Tt(n,e,i),nl(n,e,i))}};function Dv(e,n,i,l,u,h,R){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,h,R):n.prototype&&n.prototype.isPureReactComponent?!Hs(i,l)||!Hs(u,h):!0}function _v(e,n,i,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,l),n.state!==e&&Of.enqueueReplaceState(n,n.state,null)}function Da(e,n){var i=n;if("ref"in n){i={};for(var l in n)l!=="ref"&&(i[l]=n[l])}if(e=e.defaultProps){i===n&&(i=K({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}var Ho=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Lv(e){Ho(e)}function zv(e){console.error(e)}function Pv(e){Ho(e)}function qo(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Uv(e,n,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Mf(e,n,i){return i=Ur(i),i.tag=3,i.payload={element:null},i.callback=function(){qo(e,n)},i}function kv(e){return e=Ur(e),e.tag=3,e}function $v(e,n,i,l){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var h=l.value;e.payload=function(){return u(h)},e.callback=function(){Uv(n,i,l)}}var R=i.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(e.callback=function(){Uv(n,i,l),typeof u!="function"&&(Vr===null?Vr=new Set([this]):Vr.add(this));var A=l.stack;this.componentDidCatch(l.value,{componentStack:A!==null?A:""})})}function lC(e,n,i,l,u){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=i.alternate,n!==null&&tl(n,i,u,!0),i=Wt.current,i!==null){switch(i.tag){case 13:return An===null?fd():i.alternate===null&&Je===0&&(Je=3),i.flags&=-257,i.flags|=65536,i.lanes=u,l===sf?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([l]):n.add(l),hd(e,l,u)),!1;case 22:return i.flags|=65536,l===sf?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([l]):i.add(l)),hd(e,l,u)),!1}throw Error(s(435,i.tag))}return hd(e,l,u),fd(),!1}if(ze)return n=Wt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==af&&(e=Error(s(422),{cause:l}),Vs(Qt(e,i)))):(l!==af&&(n=Error(s(423),{cause:l}),Vs(Qt(n,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Qt(l,i),u=Mf(e.stateNode,l,u),Yf(e,u),Je!==4&&(Je=2)),!1;var h=Error(s(520),{cause:l});if(h=Qt(h,i),ul===null?ul=[h]:ul.push(h),Je!==4&&(Je=2),n===null)return!0;l=Qt(l,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=Mf(i.stateNode,l,e),Yf(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Vr===null||!Vr.has(h))))return i.flags|=65536,u&=-u,i.lanes|=u,u=kv(u),$v(u,e,i,l),Yf(i,u),!1}i=i.return}while(i!==null);return!1}var Hv=Error(s(461)),ht=!1;function vt(e,n,i,l){n.child=e===null?Yg(n,null,i,l):Aa(n,e.child,i,l)}function qv(e,n,i,l,u){i=i.render;var h=n.ref;if("ref"in l){var R={};for(var A in l)A!=="ref"&&(R[A]=l[A])}else R=l;return La(n),l=hf(e,n,i,R,h,u),A=mf(),e!==null&&!ht?(pf(e,n,u),er(e,n,u)):(ze&&A&&nf(n),n.flags|=1,vt(e,n,l,u),n.child)}function Bv(e,n,i,l,u){if(e===null){var h=i.type;return typeof h=="function"&&!Jf(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Iv(e,n,h,l,u)):(e=Go(i.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!$f(e,u)){var R=h.memoizedProps;if(i=i.compare,i=i!==null?i:Hs,i(R,l)&&e.ref===n.ref)return er(e,n,u)}return n.flags|=1,e=Br(h,l),e.ref=n.ref,e.return=n,n.child=e}function Iv(e,n,i,l,u){if(e!==null){var h=e.memoizedProps;if(Hs(h,l)&&e.ref===n.ref)if(ht=!1,n.pendingProps=l=h,$f(e,u))(e.flags&131072)!==0&&(ht=!0);else return n.lanes=e.lanes,er(e,n,u)}return jf(e,n,i,l,u)}function Vv(e,n,i){var l=n.pendingProps,u=l.children,h=(n.stateNode._pendingVisibility&2)!==0,R=e!==null?e.memoizedState:null;if(el(e,n),l.mode==="hidden"||h){if((n.flags&128)!==0){if(l=R!==null?R.baseLanes|i:i,e!==null){for(u=n.child=e.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;n.childLanes=h&~l}else n.childLanes=0,n.child=null;return Yv(e,n,l,i)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&jo(n,R!==null?R.cachePool:null),R!==null?Gg(n,R):lf(),Fg(n);else return n.lanes=n.childLanes=536870912,Yv(e,n,R!==null?R.baseLanes|i:i,i)}else R!==null?(jo(n,R.cachePool),Gg(n,R),Dr(),n.memoizedState=null):(e!==null&&jo(n,null),lf(),Dr());return vt(e,n,u,i),n.child}function Yv(e,n,i,l){var u=ff();return u=u===null?null:{parent:ct._currentValue,pool:u},n.memoizedState={baseLanes:i,cachePool:u},e!==null&&jo(n,null),lf(),Fg(n),e!==null&&tl(e,n,l,!0),null}function el(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=2097664);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(n.flags|=2097664)}}function jf(e,n,i,l,u){return La(n),i=hf(e,n,i,l,void 0,u),l=mf(),e!==null&&!ht?(pf(e,n,u),er(e,n,u)):(ze&&l&&nf(n),n.flags|=1,vt(e,n,i,u),n.child)}function Gv(e,n,i,l,u,h){return La(n),n.updateQueue=null,i=Zg(n,l,i,u),Wg(e),l=mf(),e!==null&&!ht?(pf(e,n,h),er(e,n,h)):(ze&&l&&nf(n),n.flags|=1,vt(e,n,i,h),n.child)}function Fv(e,n,i,l,u){if(La(n),n.stateNode===null){var h=bi,R=i.contextType;typeof R=="object"&&R!==null&&(h=xt(R)),h=new i(l,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Of,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=l,h.state=n.memoizedState,h.refs={},If(n),R=i.contextType,h.context=typeof R=="object"&&R!==null?xt(R):bi,h.state=n.memoizedState,R=i.getDerivedStateFromProps,typeof R=="function"&&(Nf(n,i,R,l),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(R=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),R!==h.state&&Of.enqueueReplaceState(h,h.state,null),al(n,l,h,u),rl(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){h=n.stateNode;var A=n.memoizedProps,D=Da(i,A);h.props=D;var Y=h.context,J=i.contextType;R=bi,typeof J=="object"&&J!==null&&(R=xt(J));var ie=i.getDerivedStateFromProps;J=typeof ie=="function"||typeof h.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,J||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(A||Y!==R)&&_v(n,h,l,R),Pr=!1;var W=n.memoizedState;h.state=W,al(n,l,h,u),rl(),Y=n.memoizedState,A||W!==Y||Pr?(typeof ie=="function"&&(Nf(n,i,ie,l),Y=n.memoizedState),(D=Pr||Dv(n,i,D,l,W,Y,R))?(J||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=l,n.memoizedState=Y),h.props=l,h.state=Y,h.context=R,l=D):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{h=n.stateNode,Vf(e,n),R=n.memoizedProps,J=Da(i,R),h.props=J,ie=n.pendingProps,W=h.context,Y=i.contextType,D=bi,typeof Y=="object"&&Y!==null&&(D=xt(Y)),A=i.getDerivedStateFromProps,(Y=typeof A=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(R!==ie||W!==D)&&_v(n,h,l,D),Pr=!1,W=n.memoizedState,h.state=W,al(n,l,h,u),rl();var Z=n.memoizedState;R!==ie||W!==Z||Pr||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof A=="function"&&(Nf(n,i,A,l),Z=n.memoizedState),(J=Pr||Dv(n,i,J,l,W,Z,D)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(Y||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,Z,D),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,Z,D)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=Z),h.props=l,h.state=Z,h.context=D,l=J):(typeof h.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),l=!1)}return h=l,el(e,n),l=(n.flags&128)!==0,h||l?(h=n.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&l?(n.child=Aa(n,e.child,null,u),n.child=Aa(n,null,i,u)):vt(e,n,i,u),n.memoizedState=h.state,e=n.child):e=er(e,n,u),e}function Qv(e,n,i,l){return Is(),n.flags|=256,vt(e,n,i,l),n.child}var Df={dehydrated:null,treeContext:null,retryLane:0};function _f(e){return{baseLanes:e,cachePool:Kg()}}function Lf(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=tn),e}function Xv(e,n,i){var l=n.pendingProps,u=!1,h=(n.flags&128)!==0,R;if((R=h)||(R=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),R&&(u=!0,n.flags&=-129),R=(n.flags&32)!==0,n.flags&=-33,e===null){if(ze){if(u?jr(n):Dr(),ze){var A=gt,D;if(D=A){e:{for(D=A,A=Cn;D.nodeType!==8;){if(!A){A=null;break e}if(D=dn(D.nextSibling),D===null){A=null;break e}}A=D}A!==null?(n.memoizedState={dehydrated:A,treeContext:Ra!==null?{id:Kn,overflow:Wn}:null,retryLane:536870912},D=en(18,null,null,0),D.stateNode=A,D.return=n,n.child=D,Rt=n,gt=null,D=!0):D=!1}D||Ca(n)}if(A=n.memoizedState,A!==null&&(A=A.dehydrated,A!==null))return A.data==="$!"?n.lanes=16:n.lanes=536870912,null;Zn(n)}return A=l.children,l=l.fallback,u?(Dr(),u=n.mode,A=Pf({mode:"hidden",children:A},u),l=Pa(l,u,i,null),A.return=n,l.return=n,A.sibling=l,n.child=A,u=n.child,u.memoizedState=_f(i),u.childLanes=Lf(e,R,i),n.memoizedState=Df,l):(jr(n),zf(n,A))}if(D=e.memoizedState,D!==null&&(A=D.dehydrated,A!==null)){if(h)n.flags&256?(jr(n),n.flags&=-257,n=Uf(e,n,i)):n.memoizedState!==null?(Dr(),n.child=e.child,n.flags|=128,n=null):(Dr(),u=l.fallback,A=n.mode,l=Pf({mode:"visible",children:l.children},A),u=Pa(u,A,i,null),u.flags|=2,l.return=n,u.return=n,l.sibling=u,n.child=l,Aa(n,e.child,null,i),l=n.child,l.memoizedState=_f(i),l.childLanes=Lf(e,R,i),n.memoizedState=Df,n=u);else if(jr(n),A.data==="$!"){if(R=A.nextSibling&&A.nextSibling.dataset,R)var Y=R.dgst;R=Y,l=Error(s(419)),l.stack="",l.digest=R,Vs({value:l,source:null,stack:null}),n=Uf(e,n,i)}else if(ht||tl(e,n,i,!1),R=(i&e.childLanes)!==0,ht||R){if(R=Ye,R!==null){if(l=i&-i,(l&42)!==0)l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:l=64;break;case 268435456:l=134217728;break;default:l=0}if(l=(l&(R.suspendedLanes|i))!==0?0:l,l!==0&&l!==D.retryLane)throw D.retryLane=l,Mr(e,l),Tt(R,e,l),Hv}A.data==="$?"||fd(),n=Uf(e,n,i)}else A.data==="$?"?(n.flags|=128,n.child=e.child,n=wC.bind(null,e),A._reactRetry=n,n=null):(e=D.treeContext,gt=dn(A.nextSibling),Rt=n,ze=!0,un=null,Cn=!1,e!==null&&(Xt[Kt++]=Kn,Xt[Kt++]=Wn,Xt[Kt++]=Ra,Kn=e.id,Wn=e.overflow,Ra=n),n=zf(n,l.children),n.flags|=4096);return n}return u?(Dr(),u=l.fallback,A=n.mode,D=e.child,Y=D.sibling,l=Br(D,{mode:"hidden",children:l.children}),l.subtreeFlags=D.subtreeFlags&31457280,Y!==null?u=Br(Y,u):(u=Pa(u,A,i,null),u.flags|=2),u.return=n,l.return=n,l.sibling=u,n.child=l,l=u,u=n.child,A=e.child.memoizedState,A===null?A=_f(i):(D=A.cachePool,D!==null?(Y=ct._currentValue,D=D.parent!==Y?{parent:Y,pool:Y}:D):D=Kg(),A={baseLanes:A.baseLanes|i,cachePool:D}),u.memoizedState=A,u.childLanes=Lf(e,R,i),n.memoizedState=Df,l):(jr(n),i=e.child,e=i.sibling,i=Br(i,{mode:"visible",children:l.children}),i.return=n,i.sibling=null,e!==null&&(R=n.deletions,R===null?(n.deletions=[e],n.flags|=16):R.push(e)),n.child=i,n.memoizedState=null,i)}function zf(e,n){return n=Pf({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Pf(e,n){return Sy(e,n,0,null)}function Uf(e,n,i){return Aa(n,e.child,null,i),e=zf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Kv(e,n,i){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),qf(e.return,n,i)}function kf(e,n,i,l,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:u}:(h.isBackwards=n,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=i,h.tailMode=u)}function Wv(e,n,i){var l=n.pendingProps,u=l.revealOrder,h=l.tail;if(vt(e,n,l.children,i),l=ot.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kv(e,i,n);else if(e.tag===19)Kv(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(fe(ot,l),u){case"forwards":for(i=n.child,u=null;i!==null;)e=i.alternate,e!==null&&Mo(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=n.child,n.child=null):(u=i.sibling,i.sibling=null),kf(n,!1,u,i,h);break;case"backwards":for(i=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Mo(e)===null){n.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}kf(n,!0,i,null,h);break;case"together":kf(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function er(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Ir|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(tl(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,i=Br(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Br(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function $f(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function oC(e,n,i){switch(n.tag){case 3:Rn(n,n.stateNode.containerInfo),zr(n,ct,e.memoizedState.cache),Is();break;case 27:case 5:Fn(n);break;case 4:Rn(n,n.stateNode.containerInfo);break;case 10:zr(n,n.type,n.memoizedProps.value);break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(jr(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Xv(e,n,i):(jr(n),e=er(e,n,i),e!==null?e.sibling:null);jr(n);break;case 19:var u=(e.flags&128)!==0;if(l=(i&n.childLanes)!==0,l||(tl(e,n,i,!1),l=(i&n.childLanes)!==0),u){if(l)return Wv(e,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),fe(ot,ot.current),l)break;return null;case 22:case 23:return n.lanes=0,Vv(e,n,i);case 24:zr(n,ct,e.memoizedState.cache)}return er(e,n,i)}function Zv(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)ht=!0;else{if(!$f(e,i)&&(n.flags&128)===0)return ht=!1,oC(e,n,i);ht=(e.flags&131072)!==0}else ht=!1,ze&&(n.flags&1048576)!==0&&Pg(n,To,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var l=n.elementType,u=l._init;if(l=u(l._payload),n.type=l,typeof l=="function")Jf(l)?(e=Da(l,e),n.tag=1,n=Fv(null,n,l,e,i)):(n.tag=0,n=jf(null,n,l,e,i));else{if(l!=null){if(u=l.$$typeof,u===T){n.tag=11,n=qv(null,n,l,e,i);break e}else if(u===C){n.tag=14,n=Bv(null,n,l,e,i);break e}}throw n=$(l)||l,Error(s(306,n,""))}}return n;case 0:return jf(e,n,n.type,n.pendingProps,i);case 1:return l=n.type,u=Da(l,n.pendingProps),Fv(e,n,l,u,i);case 3:e:{if(Rn(n,n.stateNode.containerInfo),e===null)throw Error(s(387));var h=n.pendingProps;u=n.memoizedState,l=u.element,Vf(e,n),al(n,h,null,i);var R=n.memoizedState;if(h=R.cache,zr(n,ct,h),h!==u.cache&&Bf(n,[ct],i,!0),rl(),h=R.element,u.isDehydrated)if(u={element:h,isDehydrated:!1,cache:R.cache},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){n=Qv(e,n,h,i);break e}else if(h!==l){l=Qt(Error(s(424)),n),Vs(l),n=Qv(e,n,h,i);break e}else for(gt=dn(n.stateNode.containerInfo.firstChild),Rt=n,ze=!0,un=null,Cn=!0,i=Yg(n,null,h,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Is(),h===l){n=er(e,n,i);break e}vt(e,n,h,i)}n=n.child}return n;case 26:return el(e,n),e===null?(i=tb(n.type,null,n.pendingProps,null))?n.memoizedState=i:ze||(i=n.type,e=n.pendingProps,l=ac(Ie.current).createElement(i),l[bt]=n,l[Ot]=e,yt(l,i,e),dt(l),n.stateNode=l):n.memoizedState=tb(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Fn(n),e===null&&ze&&(l=n.stateNode=Zy(n.type,n.pendingProps,Ie.current),Rt=n,Cn=!0,gt=dn(l.firstChild)),l=n.pendingProps.children,e!==null||ze?vt(e,n,l,i):n.child=Aa(n,null,l,i),el(e,n),n.child;case 5:return e===null&&ze&&((u=l=gt)&&(l=kC(l,n.type,n.pendingProps,Cn),l!==null?(n.stateNode=l,Rt=n,gt=dn(l.firstChild),Cn=!1,u=!0):u=!1),u||Ca(n)),Fn(n),u=n.type,h=n.pendingProps,R=e!==null?e.memoizedProps:null,l=h.children,Td(u,h)?l=null:R!==null&&Td(u,R)&&(n.flags|=32),n.memoizedState!==null&&(u=hf(e,n,tC,null,null,i),bl._currentValue=u),el(e,n),vt(e,n,l,i),n.child;case 6:return e===null&&ze&&((e=i=gt)&&(i=$C(i,n.pendingProps,Cn),i!==null?(n.stateNode=i,Rt=n,gt=null,e=!0):e=!1),e||Ca(n)),null;case 13:return Xv(e,n,i);case 4:return Rn(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Aa(n,null,l,i):vt(e,n,l,i),n.child;case 11:return qv(e,n,n.type,n.pendingProps,i);case 7:return vt(e,n,n.pendingProps,i),n.child;case 8:return vt(e,n,n.pendingProps.children,i),n.child;case 12:return vt(e,n,n.pendingProps.children,i),n.child;case 10:return l=n.pendingProps,zr(n,n.type,l.value),vt(e,n,l.children,i),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,La(n),u=xt(u),l=l(u),n.flags|=1,vt(e,n,l,i),n.child;case 14:return Bv(e,n,n.type,n.pendingProps,i);case 15:return Iv(e,n,n.type,n.pendingProps,i);case 19:return Wv(e,n,i);case 22:return Vv(e,n,i);case 24:return La(n),l=xt(ct),e===null?(u=ff(),u===null&&(u=Ye,h=cf(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=i),u=h),n.memoizedState={parent:l,cache:u},If(n),zr(n,ct,u)):((e.lanes&i)!==0&&(Vf(e,n),al(n,null,null,i),rl()),u=e.memoizedState,h=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),zr(n,ct,l)):(l=h.cache,zr(n,ct,l),l!==u.cache&&Bf(n,[ct],i,!0))),vt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}var Hf=me(null),_a=null,tr=null;function zr(e,n,i){fe(Hf,n._currentValue),n._currentValue=i}function nr(e){e._currentValue=Hf.current,Ee(Hf)}function qf(e,n,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===i)break;e=e.return}}function Bf(e,n,i,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var R=u.child;h=h.firstContext;e:for(;h!==null;){var A=h;h=u;for(var D=0;D<n.length;D++)if(A.context===n[D]){h.lanes|=i,A=h.alternate,A!==null&&(A.lanes|=i),qf(h.return,i,e),l||(R=null);break e}h=A.next}}else if(u.tag===18){if(R=u.return,R===null)throw Error(s(341));R.lanes|=i,h=R.alternate,h!==null&&(h.lanes|=i),qf(R,i,e),R=null}else R=u.child;if(R!==null)R.return=u;else for(R=u;R!==null;){if(R===e){R=null;break}if(u=R.sibling,u!==null){u.return=R.return,R=u;break}R=R.return}u=R}}function tl(e,n,i,l){e=null;for(var u=n,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var R=u.alternate;if(R===null)throw Error(s(387));if(R=R.memoizedProps,R!==null){var A=u.type;Ut(u.pendingProps.value,R.value)||(e!==null?e.push(A):e=[A])}}else if(u===Et.current){if(R=u.alternate,R===null)throw Error(s(387));R.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(bl):e=[bl])}u=u.return}e!==null&&Bf(n,e,i,l),n.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function La(e){_a=e,tr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Jv(_a,e)}function Io(e,n){return _a===null&&La(e),Jv(e,n)}function Jv(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},tr===null){if(e===null)throw Error(s(308));tr=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else tr=tr.next=n;return i}var Pr=!1;function If(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ur(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kr(e,n,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Eo(e),Lg(e,null,i),n}return wo(e,l,n,i),Eo(e)}function nl(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194176)!==0)){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Bp(e,i)}}function Yf(e,n){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var u=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var R={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?u=h=R:h=h.next=R,i=i.next}while(i!==null);h===null?u=h=n:h=h.next=n}else u=h=n;i={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Gf=!1;function rl(){if(Gf){var e=Ti;if(e!==null)throw e}}function al(e,n,i,l){Gf=!1;var u=e.updateQueue;Pr=!1;var h=u.firstBaseUpdate,R=u.lastBaseUpdate,A=u.shared.pending;if(A!==null){u.shared.pending=null;var D=A,Y=D.next;D.next=null,R===null?h=Y:R.next=Y,R=D;var J=e.alternate;J!==null&&(J=J.updateQueue,A=J.lastBaseUpdate,A!==R&&(A===null?J.firstBaseUpdate=Y:A.next=Y,J.lastBaseUpdate=D))}if(h!==null){var ie=u.baseState;R=0,J=Y=D=null,A=h;do{var W=A.lane&-536870913,Z=W!==A.lane;if(Z?(Le&W)===W:(l&W)===W){W!==0&&W===Ri&&(Gf=!0),J!==null&&(J=J.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ge=e,Re=A;W=n;var et=i;switch(Re.tag){case 1:if(ge=Re.payload,typeof ge=="function"){ie=ge.call(et,ie,W);break e}ie=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Re.payload,W=typeof ge=="function"?ge.call(et,ie,W):ge,W==null)break e;ie=K({},ie,W);break e;case 2:Pr=!0}}W=A.callback,W!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:A.tag,payload:A.payload,callback:A.callback,next:null},J===null?(Y=J=Z,D=ie):J=J.next=Z,R|=W;if(A=A.next,A===null){if(A=u.shared.pending,A===null)break;Z=A,A=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);J===null&&(D=ie),u.baseState=D,u.firstBaseUpdate=Y,u.lastBaseUpdate=J,h===null&&(u.shared.lanes=0),Ir|=R,e.lanes=R,e.memoizedState=ie}}function ey(e,n){if(typeof e!="function")throw Error(s(191,e));e.call(n)}function ty(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ey(i[e],n)}function il(e,n){try{var i=n.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var u=l.next;i=u;do{if((i.tag&e)===e){l=void 0;var h=i.create,R=i.inst;l=h(),R.destroy=l}i=i.next}while(i!==u)}}catch(A){Ve(n,n.return,A)}}function $r(e,n,i){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&e)===e){var R=l.inst,A=R.destroy;if(A!==void 0){R.destroy=void 0,u=n;var D=i;try{A()}catch(Y){Ve(u,D,Y)}}}l=l.next}while(l!==h)}}catch(Y){Ve(n,n.return,Y)}}function ny(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{ty(n,i)}catch(l){Ve(e,e.return,l)}}}function ry(e,n,i){i.props=Da(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Ve(e,n,l)}}function za(e,n){try{var i=e.ref;if(i!==null){var l=e.stateNode;switch(e.tag){case 26:case 27:case 5:var u=l;break;default:u=l}typeof i=="function"?e.refCleanup=i(u):i.current=u}}catch(h){Ve(e,n,h)}}function kt(e,n){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(u){Ve(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Ve(e,n,u)}else i.current=null}function ay(e){var n=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(u){Ve(e,e.return,u)}}function iy(e,n,i){try{var l=e.stateNode;_C(l,e.type,i,n),l[Ot]=n}catch(u){Ve(e,e.return,u)}}function sy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function Ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qf(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=rc));else if(l!==4&&l!==27&&(e=e.child,e!==null))for(Qf(e,n,i),e=e.sibling;e!==null;)Qf(e,n,i),e=e.sibling}function Vo(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(l!==4&&l!==27&&(e=e.child,e!==null))for(Vo(e,n,i),e=e.sibling;e!==null;)Vo(e,n,i),e=e.sibling}var rr=!1,Ze=!1,Xf=!1,ly=typeof WeakSet=="function"?WeakSet:Set,mt=null,oy=!1;function cC(e,n){if(e=e.containerInfo,Ed=uc,e=Tg(e),Ku(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var u=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var R=0,A=-1,D=-1,Y=0,J=0,ie=e,W=null;t:for(;;){for(var Z;ie!==i||u!==0&&ie.nodeType!==3||(A=R+u),ie!==h||l!==0&&ie.nodeType!==3||(D=R+l),ie.nodeType===3&&(R+=ie.nodeValue.length),(Z=ie.firstChild)!==null;)W=ie,ie=Z;for(;;){if(ie===e)break t;if(W===i&&++Y===u&&(A=R),W===h&&++J===l&&(D=R),(Z=ie.nextSibling)!==null)break;ie=W,W=ie.parentNode}ie=Z}i=A===-1||D===-1?null:{start:A,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(Rd={focusedElem:e,selectionRange:i},uc=!1,mt=n;mt!==null;)if(n=mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,mt=e;else for(;mt!==null;){switch(n=mt,h=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,u=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var ge=Da(i.type,u,i.elementType===i.type);e=l.getSnapshotBeforeUpdate(ge,h),l.__reactInternalSnapshotBeforeUpdate=e}catch(Re){Ve(i,i.return,Re)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Nd(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=n.sibling,e!==null){e.return=n.return,mt=e;break}mt=n.return}return ge=oy,oy=!1,ge}function cy(e,n,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ir(e,i),l&4&&il(5,i);break;case 1:if(ir(e,i),l&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(A){Ve(i,i.return,A)}else{var u=Da(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ve(i,i.return,A)}}l&64&&ny(i),l&512&&za(i,i.return);break;case 3:if(ir(e,i),l&64&&(l=i.updateQueue,l!==null)){if(e=null,i.child!==null)switch(i.child.tag){case 27:case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}try{ty(l,e)}catch(A){Ve(i,i.return,A)}}break;case 26:ir(e,i),l&512&&za(i,i.return);break;case 27:case 5:ir(e,i),n===null&&l&4&&ay(i),l&512&&za(i,i.return);break;case 12:ir(e,i);break;case 13:ir(e,i),l&4&&dy(e,i);break;case 22:if(u=i.memoizedState!==null||rr,!u){n=n!==null&&n.memoizedState!==null||Ze;var h=rr,R=Ze;rr=u,(Ze=n)&&!R?Hr(e,i,(i.subtreeFlags&8772)!==0):ir(e,i),rr=h,Ze=R}l&512&&(i.memoizedProps.mode==="manual"?za(i,i.return):kt(i,i.return));break;default:ir(e,i)}}function uy(e){var n=e.alternate;n!==null&&(e.alternate=null,uy(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Lu(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,$t=!1;function ar(e,n,i){for(i=i.child;i!==null;)fy(e,n,i),i=i.sibling}function fy(e,n,i){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Ns,i)}catch{}switch(i.tag){case 26:Ze||kt(i,n),ar(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ze||kt(i,n);var l=st,u=$t;for(st=i.stateNode,ar(e,n,i),i=i.stateNode,n=i.attributes;n.length;)i.removeAttributeNode(n[0]);Lu(i),st=l,$t=u;break;case 5:Ze||kt(i,n);case 6:u=st;var h=$t;if(st=null,ar(e,n,i),st=u,$t=h,st!==null)if($t)try{e=st,l=i.stateNode,e.nodeType===8?e.parentNode.removeChild(l):e.removeChild(l)}catch(R){Ve(i,n,R)}else try{st.removeChild(i.stateNode)}catch(R){Ve(i,n,R)}break;case 18:st!==null&&($t?(n=st,i=i.stateNode,n.nodeType===8?Ad(n.parentNode,i):n.nodeType===1&&Ad(n,i),El(n)):Ad(st,i.stateNode));break;case 4:l=st,u=$t,st=i.stateNode.containerInfo,$t=!0,ar(e,n,i),st=l,$t=u;break;case 0:case 11:case 14:case 15:Ze||$r(2,i,n),Ze||$r(4,i,n),ar(e,n,i);break;case 1:Ze||(kt(i,n),l=i.stateNode,typeof l.componentWillUnmount=="function"&&ry(i,n,l)),ar(e,n,i);break;case 21:ar(e,n,i);break;case 22:Ze||kt(i,n),Ze=(l=Ze)||i.memoizedState!==null,ar(e,n,i),Ze=l;break;default:ar(e,n,i)}}function dy(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{El(e)}catch(i){Ve(n,n.return,i)}}function uC(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new ly),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new ly),n;default:throw Error(s(435,e.tag))}}function Kf(e,n){var i=uC(e);n.forEach(function(l){var u=EC.bind(null,e,l);i.has(l)||(i.add(l),l.then(u,u))})}function Zt(e,n){var i=n.deletions;if(i!==null)for(var l=0;l<i.length;l++){var u=i[l],h=e,R=n,A=R;e:for(;A!==null;){switch(A.tag){case 27:case 5:st=A.stateNode,$t=!1;break e;case 3:st=A.stateNode.containerInfo,$t=!0;break e;case 4:st=A.stateNode.containerInfo,$t=!0;break e}A=A.return}if(st===null)throw Error(s(160));fy(h,R,u),st=null,$t=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)hy(n,e),n=n.sibling}var fn=null;function hy(e,n){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(n,e),Jt(e),l&4&&($r(3,e,e.return),il(3,e),$r(5,e,e.return));break;case 1:Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),l&64&&rr&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var u=fn;if(Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),l&4){var h=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":h=u.getElementsByTagName("title")[0],(!h||h[js]||h[bt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(l),u.head.insertBefore(h,u.querySelector("head > title"))),yt(h,l,i),h[bt]=e,dt(h),l=h;break e;case"link":var R=ab("link","href",u).get(l+(i.href||""));if(R){for(var A=0;A<R.length;A++)if(h=R[A],h.getAttribute("href")===(i.href==null?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){R.splice(A,1);break t}}h=u.createElement(l),yt(h,l,i),u.head.appendChild(h);break;case"meta":if(R=ab("meta","content",u).get(l+(i.content||""))){for(A=0;A<R.length;A++)if(h=R[A],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){R.splice(A,1);break t}}h=u.createElement(l),yt(h,l,i),u.head.appendChild(h);break;default:throw Error(s(468,l))}h[bt]=e,dt(h),l=h}e.stateNode=l}else ib(u,e.type,e.stateNode);else e.stateNode=rb(u,l,e.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?ib(u,e.type,e.stateNode):rb(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&iy(e,e.memoizedProps,i.memoizedProps)}break;case 27:if(l&4&&e.alternate===null){u=e.stateNode,h=e.memoizedProps;try{for(var D=u.firstChild;D;){var Y=D.nextSibling,J=D.nodeName;D[js]||J==="HEAD"||J==="BODY"||J==="SCRIPT"||J==="STYLE"||J==="LINK"&&D.rel.toLowerCase()==="stylesheet"||u.removeChild(D),D=Y}for(var ie=e.type,W=u.attributes;W.length;)u.removeAttributeNode(W[0]);yt(u,ie,h),u[bt]=e,u[Ot]=h}catch(ge){Ve(e,e.return,ge)}}case 5:if(Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),e.flags&32){u=e.stateNode;try{di(u,"")}catch(ge){Ve(e,e.return,ge)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,iy(e,u,i!==null?i.memoizedProps:u)),l&1024&&(Xf=!0);break;case 6:if(Zt(n,e),Jt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ge){Ve(e,e.return,ge)}}break;case 3:if(lc=null,u=fn,fn=ic(n.containerInfo),Zt(n,e),fn=u,Jt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{El(n.containerInfo)}catch(ge){Ve(e,e.return,ge)}Xf&&(Xf=!1,my(e));break;case 4:l=fn,fn=ic(e.stateNode.containerInfo),Zt(n,e),Jt(e),fn=l;break;case 12:Zt(n,e),Jt(e);break;case 13:Zt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(id=Tn()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Kf(e,l)));break;case 22:if(l&512&&(Ze||i===null||kt(i,i.return)),D=e.memoizedState!==null,Y=i!==null&&i.memoizedState!==null,J=rr,ie=Ze,rr=J||D,Ze=ie||Y,Zt(n,e),Ze=ie,rr=J,Jt(e),n=e.stateNode,n._current=e,n._visibility&=-3,n._visibility|=n._pendingVisibility&2,l&8192&&(n._visibility=D?n._visibility&-2:n._visibility|1,D&&(n=rr||Ze,i===null||Y||n||Oi(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(i=null,n=e;;){if(n.tag===5||n.tag===26||n.tag===27){if(i===null){Y=i=n;try{if(u=Y.stateNode,D)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{R=Y.stateNode,A=Y.memoizedProps.style;var Z=A!=null&&A.hasOwnProperty("display")?A.display:null;R.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ge){Ve(Y,Y.return,ge)}}}else if(n.tag===6){if(i===null){Y=n;try{Y.stateNode.nodeValue=D?"":Y.memoizedProps}catch(ge){Ve(Y,Y.return,ge)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Kf(e,i))));break;case 19:Zt(n,e),Jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Kf(e,l)));break;case 21:break;default:Zt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{if(e.tag!==27){e:{for(var i=e.return;i!==null;){if(sy(i)){var l=i;break e}i=i.return}throw Error(s(160))}switch(l.tag){case 27:var u=l.stateNode,h=Ff(e);Vo(e,h,u);break;case 5:var R=l.stateNode;l.flags&32&&(di(R,""),l.flags&=-33);var A=Ff(e);Vo(e,A,R);break;case 3:case 4:var D=l.stateNode.containerInfo,Y=Ff(e);Qf(e,Y,D);break;default:throw Error(s(161))}}}catch(J){Ve(e,e.return,J)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function my(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;my(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ir(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)cy(e,n.alternate,n),n=n.sibling}function Oi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:$r(4,n,n.return),Oi(n);break;case 1:kt(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&ry(n,n.return,i),Oi(n);break;case 26:case 27:case 5:kt(n,n.return),Oi(n);break;case 22:kt(n,n.return),n.memoizedState===null&&Oi(n);break;default:Oi(n)}e=e.sibling}}function Hr(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=e,h=n,R=h.flags;switch(h.tag){case 0:case 11:case 15:Hr(u,h,i),il(4,h);break;case 1:if(Hr(u,h,i),l=h,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Y){Ve(l,l.return,Y)}if(l=h,u=l.updateQueue,u!==null){var A=l.stateNode;try{var D=u.shared.hiddenCallbacks;if(D!==null)for(u.shared.hiddenCallbacks=null,u=0;u<D.length;u++)ey(D[u],A)}catch(Y){Ve(l,l.return,Y)}}i&&R&64&&ny(h),za(h,h.return);break;case 26:case 27:case 5:Hr(u,h,i),i&&l===null&&R&4&&ay(h),za(h,h.return);break;case 12:Hr(u,h,i);break;case 13:Hr(u,h,i),i&&R&4&&dy(u,h);break;case 22:h.memoizedState===null&&Hr(u,h,i),za(h,h.return);break;default:Hr(u,h,i)}n=n.sibling}}function Wf(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Xs(i))}function Zf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Xs(e))}function qr(e,n,i,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)py(e,n,i,l),n=n.sibling}function py(e,n,i,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:qr(e,n,i,l),u&2048&&il(9,n);break;case 3:qr(e,n,i,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Xs(e)));break;case 12:if(u&2048){qr(e,n,i,l),e=n.stateNode;try{var h=n.memoizedProps,R=h.id,A=h.onPostCommit;typeof A=="function"&&A(R,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){Ve(n,n.return,D)}}else qr(e,n,i,l);break;case 23:break;case 22:h=n.stateNode,n.memoizedState!==null?h._visibility&4?qr(e,n,i,l):sl(e,n):h._visibility&4?qr(e,n,i,l):(h._visibility|=4,Mi(e,n,i,l,(n.subtreeFlags&10256)!==0)),u&2048&&Wf(n.alternate,n);break;case 24:qr(e,n,i,l),u&2048&&Zf(n.alternate,n);break;default:qr(e,n,i,l)}}function Mi(e,n,i,l,u){for(u=u&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var h=e,R=n,A=i,D=l,Y=R.flags;switch(R.tag){case 0:case 11:case 15:Mi(h,R,A,D,u),il(8,R);break;case 23:break;case 22:var J=R.stateNode;R.memoizedState!==null?J._visibility&4?Mi(h,R,A,D,u):sl(h,R):(J._visibility|=4,Mi(h,R,A,D,u)),u&&Y&2048&&Wf(R.alternate,R);break;case 24:Mi(h,R,A,D,u),u&&Y&2048&&Zf(R.alternate,R);break;default:Mi(h,R,A,D,u)}n=n.sibling}}function sl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,l=n,u=l.flags;switch(l.tag){case 22:sl(i,l),u&2048&&Wf(l.alternate,l);break;case 24:sl(i,l),u&2048&&Zf(l.alternate,l);break;default:sl(i,l)}n=n.sibling}}var ll=8192;function ji(e){if(e.subtreeFlags&ll)for(e=e.child;e!==null;)gy(e),e=e.sibling}function gy(e){switch(e.tag){case 26:ji(e),e.flags&ll&&e.memoizedState!==null&&ZC(fn,e.memoizedState,e.memoizedProps);break;case 5:ji(e);break;case 3:case 4:var n=fn;fn=ic(e.stateNode.containerInfo),ji(e),fn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ll,ll=16777216,ji(e),ll=n):ji(e));break;default:ji(e)}}function vy(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ol(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];mt=l,by(l,e)}vy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yy(e),e=e.sibling}function yy(e){switch(e.tag){case 0:case 11:case 15:ol(e),e.flags&2048&&$r(9,e,e.return);break;case 3:ol(e);break;case 12:ol(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&4&&(e.return===null||e.return.tag!==13)?(n._visibility&=-5,Yo(e)):ol(e);break;default:ol(e)}}function Yo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];mt=l,by(l,e)}vy(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:$r(8,n,n.return),Yo(n);break;case 22:i=n.stateNode,i._visibility&4&&(i._visibility&=-5,Yo(n));break;default:Yo(n)}e=e.sibling}}function by(e,n){for(;mt!==null;){var i=mt;switch(i.tag){case 0:case 11:case 15:$r(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Xs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,mt=l;else e:for(i=e;mt!==null;){l=mt;var u=l.sibling,h=l.return;if(uy(l),l===i){mt=null;break e}if(u!==null){u.return=h,mt=u;break e}mt=h}}}function fC(e,n,i,l){this.tag=e,this.key=i,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,n,i,l){return new fC(e,n,i,l)}function Jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Br(e,n){var i=e.alternate;return i===null?(i=en(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&31457280,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function xy(e,n){e.flags&=31457282;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Go(e,n,i,l,u,h){var R=0;if(l=e,typeof e=="function")Jf(e)&&(R=1);else if(typeof e=="string")R=KC(e,i,Se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case m:return Pa(i.children,u,h,n);case p:R=8,u|=24;break;case g:return e=en(12,i,n,u|2),e.elementType=g,e.lanes=h,e;case S:return e=en(13,i,n,u),e.elementType=S,e.lanes=h,e;case w:return e=en(19,i,n,u),e.elementType=w,e.lanes=h,e;case O:return Sy(i,u,h,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case b:case E:R=10;break e;case x:R=9;break e;case T:R=11;break e;case C:R=14;break e;case N:R=16,l=null;break e}R=29,i=Error(s(130,e===null?"null":typeof e,"")),l=null}return n=en(R,i,n,u),n.elementType=e,n.type=l,n.lanes=h,n}function Pa(e,n,i,l){return e=en(7,e,l,n),e.lanes=i,e}function Sy(e,n,i,l){e=en(22,e,l,n),e.elementType=O,e.lanes=i;var u={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var h=u._current;if(h===null)throw Error(s(456));if((u._pendingVisibility&2)===0){var R=Mr(h,2);R!==null&&(u._pendingVisibility|=2,Tt(R,h,2))}},attach:function(){var h=u._current;if(h===null)throw Error(s(456));if((u._pendingVisibility&2)!==0){var R=Mr(h,2);R!==null&&(u._pendingVisibility&=-3,Tt(R,h,2))}}};return e.stateNode=u,e}function ed(e,n,i){return e=en(6,e,null,n),e.lanes=i,e}function td(e,n,i){return n=en(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function sr(e){e.flags|=4}function wy(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sb(n)){if(n=Wt.current,n!==null&&((Le&4194176)===Le?An!==null:(Le&62914560)!==Le&&(Le&536870912)===0||n!==An))throw Gs=sf,$g;e.flags|=8192}}function Fo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Hp():536870912,e.lanes|=n,_i|=n)}function cl(e,n){if(!ze)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Xe(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(n)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags&31457280,l|=u.flags&31457280,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=i,n}function dC(e,n,i){var l=n.pendingProps;switch(rf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return Xe(n),null;case 3:return i=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),nr(ct),Vt(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(n)?sr(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,un!==null&&(cd(un),un=null))),Xe(n),null;case 26:return i=n.memoizedState,e===null?(sr(n),i!==null?(Xe(n),wy(n,i)):(Xe(n),n.flags&=-16777217)):i?i!==e.memoizedState?(sr(n),Xe(n),wy(n,i)):(Xe(n),n.flags&=-16777217):(e.memoizedProps!==l&&sr(n),Xe(n),n.flags&=-16777217),null;case 27:si(n),i=Ie.current;var u=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}e=Se.current,Bs(n)?Ug(n):(e=Zy(u,l,i),n.stateNode=e,sr(n))}return Xe(n),null;case 5:if(si(n),i=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}if(e=Se.current,Bs(n))Ug(n);else{switch(u=ac(Ie.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?u.createElement(i,{is:l.is}):u.createElement(i)}}e[bt]=n,e[Ot]=l;e:for(u=n.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===n)break e;for(;u.sibling===null;){if(u.return===null||u.return===n)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}n.stateNode=e;e:switch(yt(e,i,l),i){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&sr(n)}}return Xe(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(s(166));if(e=Ie.current,Bs(n)){if(e=n.stateNode,i=n.memoizedProps,l=null,u=Rt,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[bt]=n,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Gy(e.nodeValue,i)),e||Ca(n)}else e=ac(e).createTextNode(l),e[bt]=n,n.stateNode=e}return Xe(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Bs(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[bt]=n}else Is(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),u=!1}else un!==null&&(cd(un),un=null),u=!0;if(!u)return n.flags&256?(Zn(n),n):(Zn(n),null)}if(Zn(n),(n.flags&128)!==0)return n.lanes=i,n;if(i=l!==null,e=e!==null&&e.memoizedState!==null,i){l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool);var h=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==u&&(l.flags|=2048)}return i!==e&&i&&(n.child.flags|=8192),Fo(n,n.updateQueue),Xe(n),null;case 4:return Vt(),e===null&&xd(n.stateNode.containerInfo),Xe(n),null;case 10:return nr(n.type),Xe(n),null;case 19:if(Ee(ot),u=n.memoizedState,u===null)return Xe(n),null;if(l=(n.flags&128)!==0,h=u.rendering,h===null)if(l)cl(u,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Mo(e),h!==null){for(n.flags|=128,cl(u,!1),e=h.updateQueue,n.updateQueue=e,Fo(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)xy(i,e),i=i.sibling;return fe(ot,ot.current&1|2),n.child}e=e.sibling}u.tail!==null&&Tn()>Qo&&(n.flags|=128,l=!0,cl(u,!1),n.lanes=4194304)}else{if(!l)if(e=Mo(h),e!==null){if(n.flags|=128,l=!0,e=e.updateQueue,n.updateQueue=e,Fo(n,e),cl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!ze)return Xe(n),null}else 2*Tn()-u.renderingStartTime>Qo&&i!==536870912&&(n.flags|=128,l=!0,cl(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Tn(),n.sibling=null,e=ot.current,fe(ot,l?e&1|2:e&1),n):(Xe(n),null);case 22:case 23:return Zn(n),of(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(i&536870912)!==0&&(n.flags&128)===0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),i=n.updateQueue,i!==null&&Fo(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==i&&(n.flags|=2048),e!==null&&Ee(Na),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),nr(ct),Xe(n),null;case 25:return null}throw Error(s(156,n.tag))}function hC(e,n){switch(rf(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return nr(ct),Vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return si(n),null;case 13:if(Zn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));Is()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ee(ot),null;case 4:return Vt(),null;case 10:return nr(n.type),null;case 22:case 23:return Zn(n),of(),e!==null&&Ee(Na),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return nr(ct),null;case 25:return null;default:return null}}function Ey(e,n){switch(rf(n),n.tag){case 3:nr(ct),Vt();break;case 26:case 27:case 5:si(n);break;case 4:Vt();break;case 13:Zn(n);break;case 19:Ee(ot);break;case 10:nr(n.type);break;case 22:case 23:Zn(n),of(),e!==null&&Ee(Na);break;case 24:nr(ct)}}var mC={getCacheForType:function(e){var n=xt(ct),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i}},pC=typeof WeakMap=="function"?WeakMap:Map,Ke=0,Ye=null,je=null,Le=0,Ge=0,Ht=null,lr=!1,Di=!1,nd=!1,or=0,Je=0,Ir=0,Ua=0,rd=0,tn=0,_i=0,ul=null,On=null,ad=!1,id=0,Qo=1/0,Xo=null,Vr=null,Ko=!1,ka=null,fl=0,sd=0,ld=null,dl=0,od=null;function qt(){if((Ke&2)!==0&&Le!==0)return Le&-Le;if(U.T!==null){var e=Ri;return e!==0?e:gd()}return Vp()}function Ry(){tn===0&&(tn=(Le&536870912)===0||ze?$p():536870912);var e=Wt.current;return e!==null&&(e.flags|=32),tn}function Tt(e,n,i){(e===Ye&&Ge===2||e.cancelPendingCommit!==null)&&(Li(e,0),cr(e,Le,tn,!1)),Ms(e,i),((Ke&2)===0||e!==Ye)&&(e===Ye&&((Ke&2)===0&&(Ua|=i),Je===4&&cr(e,Le,tn,!1)),Mn(e))}function Ty(e,n,i){if((Ke&6)!==0)throw Error(s(327));var l=!i&&(n&60)===0&&(n&e.expiredLanes)===0||Os(e,n),u=l?yC(e,n):dd(e,n,!0),h=l;do{if(u===0){Di&&!l&&cr(e,n,0,!1);break}else if(u===6)cr(e,n,0,!lr);else{if(i=e.current.alternate,h&&!gC(i)){u=dd(e,n,!1),h=!1;continue}if(u===2){if(h=n,e.errorRecoveryDisabledLanes&h)var R=0;else R=e.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){n=R;e:{var A=e;u=ul;var D=A.current.memoizedState.isDehydrated;if(D&&(Li(A,R).flags|=256),R=dd(A,R,!1),R!==2){if(nd&&!D){A.errorRecoveryDisabledLanes|=h,Ua|=h,u=4;break e}h=On,On=u,h!==null&&cd(h)}u=R}if(h=!1,u!==2)continue}}if(u===1){Li(e,0),cr(e,n,0,!0);break}e:{switch(l=e,u){case 0:case 1:throw Error(s(345));case 4:if((n&4194176)===n){cr(l,n,tn,!lr);break e}break;case 2:On=null;break;case 3:case 5:break;default:throw Error(s(329))}if(l.finishedWork=i,l.finishedLanes=n,(n&62914560)===n&&(h=id+300-Tn(),10<h)){if(cr(l,n,tn,!lr),oo(l,0)!==0)break e;l.timeoutHandle=Xy(Cy.bind(null,l,i,On,Xo,ad,n,tn,Ua,_i,lr,2,-0,0),h);break e}Cy(l,i,On,Xo,ad,n,tn,Ua,_i,lr,0,-0,0)}}break}while(!0);Mn(e)}function cd(e){On===null?On=e:On.push.apply(On,e)}function Cy(e,n,i,l,u,h,R,A,D,Y,J,ie,W){var Z=n.subtreeFlags;if((Z&8192||(Z&16785408)===16785408)&&(yl={stylesheets:null,count:0,unsuspend:WC},gy(n),n=JC(),n!==null)){e.cancelPendingCommit=n(_y.bind(null,e,i,l,u,R,A,D,1,ie,W)),cr(e,h,R,!Y);return}_y(e,i,l,u,R,A,D,J,ie,W)}function gC(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var u=i[l],h=u.getSnapshot;u=u.value;try{if(!Ut(h(),u))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function cr(e,n,i,l){n&=~rd,n&=~Ua,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var h=31-Pt(u),R=1<<h;l[h]=-1,u&=~R}i!==0&&qp(e,i,n)}function Wo(){return(Ke&6)===0?(hl(0),!1):!0}function ud(){if(je!==null){if(Ge===0)var e=je.return;else e=je,tr=_a=null,gf(e),wi=null,Fs=0,e=je;for(;e!==null;)Ey(e.alternate,e),e=e.return;je=null}}function Li(e,n){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,zC(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ud(),Ye=e,je=i=Br(e.current,null),Le=n,Ge=0,Ht=null,lr=!1,Di=Os(e,n),nd=!1,_i=tn=rd=Ua=Ir=Je=0,On=ul=null,ad=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var u=31-Pt(l),h=1<<u;n|=e[u],l&=~h}return or=n,So(),i}function Ay(e,n){Oe=null,U.H=Nn,n===Ys?(n=Bg(),Ge=3):n===$g?(n=Bg(),Ge=4):Ge=n===Hv?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ht=n,je===null&&(Je=1,qo(e,Qt(n,e.current)))}function Ny(){var e=U.H;return U.H=Nn,e===null?Nn:e}function Oy(){var e=U.A;return U.A=mC,e}function fd(){Je=4,lr||(Le&4194176)!==Le&&Wt.current!==null||(Di=!0),(Ir&134217727)===0&&(Ua&134217727)===0||Ye===null||cr(Ye,Le,tn,!1)}function dd(e,n,i){var l=Ke;Ke|=2;var u=Ny(),h=Oy();(Ye!==e||Le!==n)&&(Xo=null,Li(e,n)),n=!1;var R=Je;e:do try{if(Ge!==0&&je!==null){var A=je,D=Ht;switch(Ge){case 8:ud(),R=6;break e;case 3:case 2:case 6:Wt.current===null&&(n=!0);var Y=Ge;if(Ge=0,Ht=null,zi(e,A,D,Y),i&&Di){R=0;break e}break;default:Y=Ge,Ge=0,Ht=null,zi(e,A,D,Y)}}vC(),R=Je;break}catch(J){Ay(e,J)}while(!0);return n&&e.shellSuspendCounter++,tr=_a=null,Ke=l,U.H=u,U.A=h,je===null&&(Ye=null,Le=0,So()),R}function vC(){for(;je!==null;)My(je)}function yC(e,n){var i=Ke;Ke|=2;var l=Ny(),u=Oy();Ye!==e||Le!==n?(Xo=null,Qo=Tn()+500,Li(e,n)):Di=Os(e,n);e:do try{if(Ge!==0&&je!==null){n=je;var h=Ht;t:switch(Ge){case 1:Ge=0,Ht=null,zi(e,n,h,1);break;case 2:if(Hg(h)){Ge=0,Ht=null,jy(n);break}n=function(){Ge===2&&Ye===e&&(Ge=7),Mn(e)},h.then(n,n);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Hg(h)?(Ge=0,Ht=null,jy(n)):(Ge=0,Ht=null,zi(e,n,h,7));break;case 5:var R=null;switch(je.tag){case 26:R=je.memoizedState;case 5:case 27:var A=je;if(!R||sb(R)){Ge=0,Ht=null;var D=A.sibling;if(D!==null)je=D;else{var Y=A.return;Y!==null?(je=Y,Zo(Y)):je=null}break t}}Ge=0,Ht=null,zi(e,n,h,5);break;case 6:Ge=0,Ht=null,zi(e,n,h,6);break;case 8:ud(),Je=6;break e;default:throw Error(s(462))}}bC();break}catch(J){Ay(e,J)}while(!0);return tr=_a=null,U.H=l,U.A=u,Ke=i,je!==null?0:(Ye=null,Le=0,So(),Je)}function bC(){for(;je!==null&&!qR();)My(je)}function My(e){var n=Zv(e.alternate,e,or);e.memoizedProps=e.pendingProps,n===null?Zo(e):je=n}function jy(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Gv(i,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=Gv(i,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:gf(n);default:Ey(i,n),n=je=xy(n,or),n=Zv(i,n,or)}e.memoizedProps=e.pendingProps,n===null?Zo(e):je=n}function zi(e,n,i,l){tr=_a=null,gf(n),wi=null,Fs=0;var u=n.return;try{if(lC(e,u,n,i,Le)){Je=1,qo(e,Qt(i,e.current)),je=null;return}}catch(h){if(u!==null)throw je=u,h;Je=1,qo(e,Qt(i,e.current)),je=null;return}n.flags&32768?(ze||l===1?e=!0:Di||(Le&536870912)!==0?e=!1:(lr=e=!0,(l===2||l===3||l===6)&&(l=Wt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Dy(n,e)):Zo(n)}function Zo(e){var n=e;do{if((n.flags&32768)!==0){Dy(n,lr);return}e=n.return;var i=dC(n.alternate,n,or);if(i!==null){je=i;return}if(n=n.sibling,n!==null){je=n;return}je=n=e}while(n!==null);Je===0&&(Je=5)}function Dy(e,n){do{var i=hC(e.alternate,e);if(i!==null){i.flags&=32767,je=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){je=e;return}je=e=i}while(e!==null);Je=6,je=null}function _y(e,n,i,l,u,h,R,A,D,Y){var J=U.T,ie=re.p;try{re.p=2,U.T=null,xC(e,n,i,l,ie,u,h,R,A,D,Y)}finally{U.T=J,re.p=ie}}function xC(e,n,i,l,u,h,R,A){do Pi();while(ka!==null);if((Ke&6)!==0)throw Error(s(327));var D=e.finishedWork;if(l=e.finishedLanes,D===null)return null;if(e.finishedWork=null,e.finishedLanes=0,D===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var Y=D.lanes|D.childLanes;if(Y|=ef,ZR(e,l,Y,h,R,A),e===Ye&&(je=Ye=null,Le=0),(D.subtreeFlags&10256)===0&&(D.flags&10256)===0||Ko||(Ko=!0,sd=Y,ld=i,RC(io,function(){return Pi(),null})),i=(D.flags&15990)!==0,(D.subtreeFlags&15990)!==0||i?(i=U.T,U.T=null,h=re.p,re.p=2,R=Ke,Ke|=4,cC(e,D),hy(D,e),VT(Rd,e.containerInfo),uc=!!Ed,Rd=Ed=null,e.current=D,cy(e,D.alternate,D),BR(),Ke=R,re.p=h,U.T=i):e.current=D,Ko?(Ko=!1,ka=e,fl=l):Ly(e,Y),Y=e.pendingLanes,Y===0&&(Vr=null),FR(D.stateNode),Mn(e),n!==null)for(u=e.onRecoverableError,D=0;D<n.length;D++)Y=n[D],u(Y.value,{componentStack:Y.stack});return(fl&3)!==0&&Pi(),Y=e.pendingLanes,(l&4194218)!==0&&(Y&42)!==0?e===od?dl++:(dl=0,od=e):dl=0,hl(0),null}function Ly(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Xs(n)))}function Pi(){if(ka!==null){var e=ka,n=sd;sd=0;var i=Ip(fl),l=U.T,u=re.p;try{if(re.p=32>i?32:i,U.T=null,ka===null)var h=!1;else{i=ld,ld=null;var R=ka,A=fl;if(ka=null,fl=0,(Ke&6)!==0)throw Error(s(331));var D=Ke;if(Ke|=4,yy(R.current),py(R,R.current,A,i),Ke=D,hl(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Ns,R)}catch{}h=!0}return h}finally{re.p=u,U.T=l,Ly(e,n)}}return!1}function zy(e,n,i){n=Qt(i,n),n=Mf(e.stateNode,n,2),e=kr(e,n,2),e!==null&&(Ms(e,2),Mn(e))}function Ve(e,n,i){if(e.tag===3)zy(e,e,i);else for(;n!==null;){if(n.tag===3){zy(n,e,i);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Vr===null||!Vr.has(l))){e=Qt(i,e),i=kv(2),l=kr(n,i,2),l!==null&&($v(i,l,n,e),Ms(l,2),Mn(l));break}}n=n.return}}function hd(e,n,i){var l=e.pingCache;if(l===null){l=e.pingCache=new pC;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(i)||(nd=!0,u.add(i),e=SC.bind(null,e,n,i),n.then(e,e))}function SC(e,n,i){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ye===e&&(Le&i)===i&&(Je===4||Je===3&&(Le&62914560)===Le&&300>Tn()-id?(Ke&2)===0&&Li(e,0):rd|=i,_i===Le&&(_i=0)),Mn(e)}function Py(e,n){n===0&&(n=Hp()),e=Mr(e,n),e!==null&&(Ms(e,n),Mn(e))}function wC(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Py(e,i)}function EC(e,n){var i=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(n),Py(e,i)}function RC(e,n){return Mu(e,n)}var Jo=null,Ui=null,md=!1,ec=!1,pd=!1,$a=0;function Mn(e){e!==Ui&&e.next===null&&(Ui===null?Jo=Ui=e:Ui=Ui.next=e),ec=!0,md||(md=!0,CC(TC))}function hl(e,n){if(!pd&&ec){pd=!0;do for(var i=!1,l=Jo;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var h=0;else{var R=l.suspendedLanes,A=l.pingedLanes;h=(1<<31-Pt(42|e)+1)-1,h&=u&~(R&~A),h=h&201326677?h&201326677|1:h?h|2:0}h!==0&&(i=!0,$y(l,h))}else h=Le,h=oo(l,l===Ye?h:0),(h&3)===0||Os(l,h)||(i=!0,$y(l,h));l=l.next}while(i);pd=!1}}function TC(){ec=md=!1;var e=0;$a!==0&&(LC()&&(e=$a),$a=0);for(var n=Tn(),i=null,l=Jo;l!==null;){var u=l.next,h=Uy(l,n);h===0?(l.next=null,i===null?Jo=u:i.next=u,u===null&&(Ui=i)):(i=l,(e!==0||(h&3)!==0)&&(ec=!0)),l=u}hl(e)}function Uy(e,n){for(var i=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var R=31-Pt(h),A=1<<R,D=u[R];D===-1?((A&i)===0||(A&l)!==0)&&(u[R]=WR(A,n)):D<=n&&(e.expiredLanes|=A),h&=~A}if(n=Ye,i=Le,i=oo(e,e===n?i:0),l=e.callbackNode,i===0||e===n&&Ge===2||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ju(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Os(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(l!==null&&ju(l),Ip(i)){case 2:case 8:i=Up;break;case 32:i=io;break;case 268435456:i=kp;break;default:i=io}return l=ky.bind(null,e),i=Mu(i,l),e.callbackPriority=n,e.callbackNode=i,n}return l!==null&&l!==null&&ju(l),e.callbackPriority=2,e.callbackNode=null,2}function ky(e,n){var i=e.callbackNode;if(Pi()&&e.callbackNode!==i)return null;var l=Le;return l=oo(e,e===Ye?l:0),l===0?null:(Ty(e,l,n),Uy(e,Tn()),e.callbackNode!=null&&e.callbackNode===i?ky.bind(null,e):null)}function $y(e,n){if(Pi())return null;Ty(e,n,!0)}function CC(e){PC(function(){(Ke&6)!==0?Mu(Pp,e):e()})}function gd(){return $a===0&&($a=$p()),$a}function Hy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function qy(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function AC(e,n,i,l,u){if(n==="submit"&&i&&i.stateNode===u){var h=Hy((u[Ot]||null).action),R=l.submitter;R&&(n=(n=R[Ot]||null)?Hy(n.formAction):R.getAttribute("formAction"),n!==null&&(h=n,R=null));var A=new yo("action","action",null,l,u);e.push({event:A,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($a!==0){var D=R?qy(u,R):new FormData(u);Tf(i,{pending:!0,data:D,method:u.method,action:h},null,D)}}else typeof h=="function"&&(A.preventDefault(),D=R?qy(u,R):new FormData(u),Tf(i,{pending:!0,data:D,method:u.method,action:h},h,D))},currentTarget:u}]})}}for(var vd=0;vd<_g.length;vd++){var yd=_g[vd],NC=yd.toLowerCase(),OC=yd[0].toUpperCase()+yd.slice(1);cn(NC,"on"+OC)}cn(Ng,"onAnimationEnd"),cn(Og,"onAnimationIteration"),cn(Mg,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(GT,"onTransitionRun"),cn(FT,"onTransitionStart"),cn(QT,"onTransitionCancel"),cn(jg,"onTransitionEnd"),ui("onMouseEnter",["mouseout","mouseover"]),ui("onMouseLeave",["mouseout","mouseover"]),ui("onPointerEnter",["pointerout","pointerover"]),ui("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="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(" "),MC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function By(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],u=l.event;l=l.listeners;e:{var h=void 0;if(n)for(var R=l.length-1;0<=R;R--){var A=l[R],D=A.instance,Y=A.currentTarget;if(A=A.listener,D!==h&&u.isPropagationStopped())break e;h=A,u.currentTarget=Y;try{h(u)}catch(J){Ho(J)}u.currentTarget=null,h=D}else for(R=0;R<l.length;R++){if(A=l[R],D=A.instance,Y=A.currentTarget,A=A.listener,D!==h&&u.isPropagationStopped())break e;h=A,u.currentTarget=Y;try{h(u)}catch(J){Ho(J)}u.currentTarget=null,h=D}}}}function De(e,n){var i=n[_u];i===void 0&&(i=n[_u]=new Set);var l=e+"__bubble";i.has(l)||(Iy(n,e,2,!1),i.add(l))}function bd(e,n,i){var l=0;n&&(l|=4),Iy(i,e,l,n)}var tc="_reactListening"+Math.random().toString(36).slice(2);function xd(e){if(!e[tc]){e[tc]=!0,Gp.forEach(function(i){i!=="selectionchange"&&(MC.has(i)||bd(i,!1,e),bd(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[tc]||(n[tc]=!0,bd("selectionchange",!1,n))}}function Iy(e,n,i,l){switch(db(n)){case 2:var u=nA;break;case 8:u=rA;break;default:u=_d}i=u.bind(null,n,i,e),u=void 0,!qu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,i,{capture:!0,passive:u}):e.addEventListener(n,i,!0):u!==void 0?e.addEventListener(n,i,{passive:u}):e.addEventListener(n,i,!1)}function Sd(e,n,i,l,u){var h=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var R=l.tag;if(R===3||R===4){var A=l.stateNode.containerInfo;if(A===u||A.nodeType===8&&A.parentNode===u)break;if(R===4)for(R=l.return;R!==null;){var D=R.tag;if((D===3||D===4)&&(D=R.stateNode.containerInfo,D===u||D.nodeType===8&&D.parentNode===u))return;R=R.return}for(;A!==null;){if(R=ba(A),R===null)return;if(D=R.tag,D===5||D===6||D===26||D===27){l=h=R;continue e}A=A.parentNode}}l=l.return}ag(function(){var Y=h,J=$u(i),ie=[];e:{var W=Dg.get(e);if(W!==void 0){var Z=yo,ge=e;switch(e){case"keypress":if(go(i)===0)break e;case"keydown":case"keyup":Z=ET;break;case"focusin":ge="focus",Z=Yu;break;case"focusout":ge="blur",Z=Yu;break;case"beforeblur":case"afterblur":Z=Yu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=fT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=CT;break;case Ng:case Og:case Mg:Z=mT;break;case jg:Z=NT;break;case"scroll":case"scrollend":Z=cT;break;case"wheel":Z=MT;break;case"copy":case"cut":case"paste":Z=gT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=cg;break;case"toggle":case"beforetoggle":Z=DT}var Re=(n&4)!==0,et=!Re&&(e==="scroll"||e==="scrollend"),F=Re?W!==null?W+"Capture":null:W;Re=[];for(var I=Y,X;I!==null;){var ne=I;if(X=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||X===null||F===null||(ne=_s(I,F),ne!=null&&Re.push(pl(I,ne,X))),et)break;I=I.return}0<Re.length&&(W=new Z(W,ge,null,i,J),ie.push({event:W,listeners:Re}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",W&&i!==ku&&(ge=i.relatedTarget||i.fromElement)&&(ba(ge)||ge[li]))break e;if((Z||W)&&(W=J.window===J?J:(W=J.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(ge=i.relatedTarget||i.toElement,Z=Y,ge=ge?ba(ge):null,ge!==null&&(et=z(ge),Re=ge.tag,ge!==et||Re!==5&&Re!==27&&Re!==6)&&(ge=null)):(Z=null,ge=Y),Z!==ge)){if(Re=lg,ne="onMouseLeave",F="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Re=cg,ne="onPointerLeave",F="onPointerEnter",I="pointer"),et=Z==null?W:Ds(Z),X=ge==null?W:Ds(ge),W=new Re(ne,I+"leave",Z,i,J),W.target=et,W.relatedTarget=X,ne=null,ba(J)===Y&&(Re=new Re(F,I+"enter",ge,i,J),Re.target=X,Re.relatedTarget=et,ne=Re),et=ne,Z&&ge)t:{for(Re=Z,F=ge,I=0,X=Re;X;X=ki(X))I++;for(X=0,ne=F;ne;ne=ki(ne))X++;for(;0<I-X;)Re=ki(Re),I--;for(;0<X-I;)F=ki(F),X--;for(;I--;){if(Re===F||F!==null&&Re===F.alternate)break t;Re=ki(Re),F=ki(F)}Re=null}else Re=null;Z!==null&&Vy(ie,W,Z,Re,!1),ge!==null&&et!==null&&Vy(ie,et,ge,Re,!0)}}e:{if(W=Y?Ds(Y):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var he=vg;else if(pg(W))if(yg)he=BT;else{he=HT;var Me=$T}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?Y&&Uu(Y.elementType)&&(he=vg):he=qT;if(he&&(he=he(e,Y))){gg(ie,he,i,J);break e}Me&&Me(e,W,Y),e==="focusout"&&Y&&W.type==="number"&&Y.memoizedProps.value!=null&&Pu(W,"number",W.value)}switch(Me=Y?Ds(Y):window,e){case"focusin":(pg(Me)||Me.contentEditable==="true")&&(gi=Me,Wu=Y,qs=null);break;case"focusout":qs=Wu=gi=null;break;case"mousedown":Zu=!0;break;case"contextmenu":case"mouseup":case"dragend":Zu=!1,Cg(ie,i,J);break;case"selectionchange":if(YT)break;case"keydown":case"keyup":Cg(ie,i,J)}var ye;if(Fu)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else pi?hg(e,i)&&(xe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(xe="onCompositionStart");xe&&(ug&&i.locale!=="ko"&&(pi||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&pi&&(ye=ig()):(Or=J,Bu="value"in Or?Or.value:Or.textContent,pi=!0)),Me=nc(Y,xe),0<Me.length&&(xe=new og(xe,e,null,i,J),ie.push({event:xe,listeners:Me}),ye?xe.data=ye:(ye=mg(i),ye!==null&&(xe.data=ye)))),(ye=LT?zT(e,i):PT(e,i))&&(xe=nc(Y,"onBeforeInput"),0<xe.length&&(Me=new og("onBeforeInput","beforeinput",null,i,J),ie.push({event:Me,listeners:xe}),Me.data=ye)),AC(ie,e,Y,i,J)}By(ie,n)})}function pl(e,n,i){return{instance:e,listener:n,currentTarget:i}}function nc(e,n){for(var i=n+"Capture",l=[];e!==null;){var u=e,h=u.stateNode;u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=_s(e,i),u!=null&&l.unshift(pl(e,u,h)),u=_s(e,n),u!=null&&l.push(pl(e,u,h))),e=e.return}return l}function ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vy(e,n,i,l,u){for(var h=n._reactName,R=[];i!==null&&i!==l;){var A=i,D=A.alternate,Y=A.stateNode;if(A=A.tag,D!==null&&D===l)break;A!==5&&A!==26&&A!==27||Y===null||(D=Y,u?(Y=_s(i,h),Y!=null&&R.unshift(pl(i,Y,D))):u||(Y=_s(i,h),Y!=null&&R.push(pl(i,Y,D)))),i=i.return}R.length!==0&&e.push({event:n,listeners:R})}var jC=/\r\n?/g,DC=/\u0000|\uFFFD/g;function Yy(e){return(typeof e=="string"?e:""+e).replace(jC,`
49
+ `).replace(DC,"")}function Gy(e,n){return n=Yy(n),Yy(e)===n}function rc(){}function qe(e,n,i,l,u,h){switch(i){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||di(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&di(e,""+l);break;case"className":uo(e,"class",l);break;case"tabIndex":uo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(e,i,l);break;case"style":ng(e,l,h);break;case"data":if(n!=="object"){uo(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=mo(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(n!=="input"&&qe(e,n,"name",u.name,u,null),qe(e,n,"formEncType",u.formEncType,u,null),qe(e,n,"formMethod",u.formMethod,u,null),qe(e,n,"formTarget",u.formTarget,u,null)):(qe(e,n,"encType",u.encType,u,null),qe(e,n,"method",u.method,u,null),qe(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=mo(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=rc);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=mo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":De("beforetoggle",e),De("toggle",e),co(e,"popover",l);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":co(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=lT.get(i)||i,co(e,i,l))}}function wd(e,n,i,l,u,h){switch(i){case"style":ng(e,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof l=="string"?di(e,l):(typeof l=="number"||typeof l=="bigint")&&di(e,""+l);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"onClick":l!=null&&(e.onclick=rc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fp.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),n=i.slice(2,u?i.length-7:void 0),h=e[Ot]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,u),typeof l=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,l,u);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):co(e,i,l)}}}function yt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var l=!1,u=!1,h;for(h in i)if(i.hasOwnProperty(h)){var R=i[h];if(R!=null)switch(h){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:qe(e,n,h,R,i,null)}}u&&qe(e,n,"srcSet",i.srcSet,i,null),l&&qe(e,n,"src",i.src,i,null);return;case"input":De("invalid",e);var A=h=R=u=null,D=null,Y=null;for(l in i)if(i.hasOwnProperty(l)){var J=i[l];if(J!=null)switch(l){case"name":u=J;break;case"type":R=J;break;case"checked":D=J;break;case"defaultChecked":Y=J;break;case"value":h=J;break;case"defaultValue":A=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(s(137,n));break;default:qe(e,n,l,J,i,null)}}Zp(e,h,A,D,Y,R,u,!1),fo(e);return;case"select":De("invalid",e),l=R=h=null;for(u in i)if(i.hasOwnProperty(u)&&(A=i[u],A!=null))switch(u){case"value":h=A;break;case"defaultValue":R=A;break;case"multiple":l=A;default:qe(e,n,u,A,i,null)}n=h,i=R,e.multiple=!!l,n!=null?fi(e,!!l,n,!1):i!=null&&fi(e,!!l,i,!0);return;case"textarea":De("invalid",e),h=u=l=null;for(R in i)if(i.hasOwnProperty(R)&&(A=i[R],A!=null))switch(R){case"value":l=A;break;case"defaultValue":u=A;break;case"children":h=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(91));break;default:qe(e,n,R,A,i,null)}eg(e,l,u,h),fo(e);return;case"option":for(D in i)if(i.hasOwnProperty(D)&&(l=i[D],l!=null))switch(D){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:qe(e,n,D,l,i,null)}return;case"dialog":De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(l=0;l<ml.length;l++)De(ml[l],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in i)if(i.hasOwnProperty(Y)&&(l=i[Y],l!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:qe(e,n,Y,l,i,null)}return;default:if(Uu(n)){for(J in i)i.hasOwnProperty(J)&&(l=i[J],l!==void 0&&wd(e,n,J,l,i,void 0));return}}for(A in i)i.hasOwnProperty(A)&&(l=i[A],l!=null&&qe(e,n,A,l,i,null))}function _C(e,n,i,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,R=null,A=null,D=null,Y=null,J=null;for(Z in i){var ie=i[Z];if(i.hasOwnProperty(Z)&&ie!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":D=ie;default:l.hasOwnProperty(Z)||qe(e,n,Z,null,l,ie)}}for(var W in l){var Z=l[W];if(ie=i[W],l.hasOwnProperty(W)&&(Z!=null||ie!=null))switch(W){case"type":h=Z;break;case"name":u=Z;break;case"checked":Y=Z;break;case"defaultChecked":J=Z;break;case"value":R=Z;break;case"defaultValue":A=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(s(137,n));break;default:Z!==ie&&qe(e,n,W,Z,l,ie)}}zu(e,R,A,D,Y,J,h,u);return;case"select":Z=R=A=W=null;for(h in i)if(D=i[h],i.hasOwnProperty(h)&&D!=null)switch(h){case"value":break;case"multiple":Z=D;default:l.hasOwnProperty(h)||qe(e,n,h,null,l,D)}for(u in l)if(h=l[u],D=i[u],l.hasOwnProperty(u)&&(h!=null||D!=null))switch(u){case"value":W=h;break;case"defaultValue":A=h;break;case"multiple":R=h;default:h!==D&&qe(e,n,u,h,l,D)}n=A,i=R,l=Z,W!=null?fi(e,!!i,W,!1):!!l!=!!i&&(n!=null?fi(e,!!i,n,!0):fi(e,!!i,i?[]:"",!1));return;case"textarea":Z=W=null;for(A in i)if(u=i[A],i.hasOwnProperty(A)&&u!=null&&!l.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:qe(e,n,A,null,l,u)}for(R in l)if(u=l[R],h=i[R],l.hasOwnProperty(R)&&(u!=null||h!=null))switch(R){case"value":W=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==h&&qe(e,n,R,u,l,h)}Jp(e,W,Z);return;case"option":for(var ge in i)if(W=i[ge],i.hasOwnProperty(ge)&&W!=null&&!l.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:qe(e,n,ge,null,l,W)}for(D in l)if(W=l[D],Z=i[D],l.hasOwnProperty(D)&&W!==Z&&(W!=null||Z!=null))switch(D){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:qe(e,n,D,W,l,Z)}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 Re in i)W=i[Re],i.hasOwnProperty(Re)&&W!=null&&!l.hasOwnProperty(Re)&&qe(e,n,Re,null,l,W);for(Y in l)if(W=l[Y],Z=i[Y],l.hasOwnProperty(Y)&&W!==Z&&(W!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(s(137,n));break;default:qe(e,n,Y,W,l,Z)}return;default:if(Uu(n)){for(var et in i)W=i[et],i.hasOwnProperty(et)&&W!==void 0&&!l.hasOwnProperty(et)&&wd(e,n,et,void 0,l,W);for(J in l)W=l[J],Z=i[J],!l.hasOwnProperty(J)||W===Z||W===void 0&&Z===void 0||wd(e,n,J,W,l,Z);return}}for(var F in i)W=i[F],i.hasOwnProperty(F)&&W!=null&&!l.hasOwnProperty(F)&&qe(e,n,F,null,l,W);for(ie in l)W=l[ie],Z=i[ie],!l.hasOwnProperty(ie)||W===Z||W==null&&Z==null||qe(e,n,ie,W,l,Z)}var Ed=null,Rd=null;function ac(e){return e.nodeType===9?e:e.ownerDocument}function Fy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qy(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Td(e,n){return e==="textarea"||e==="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 Cd=null;function LC(){var e=window.event;return e&&e.type==="popstate"?e===Cd?!1:(Cd=e,!0):(Cd=null,!1)}var Xy=typeof setTimeout=="function"?setTimeout:void 0,zC=typeof clearTimeout=="function"?clearTimeout:void 0,Ky=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Ky<"u"?function(e){return Ky.resolve(null).then(e).catch(UC)}:Xy;function UC(e){setTimeout(function(){throw e})}function Ad(e,n){var i=n,l=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(l===0){e.removeChild(u),El(n);return}l--}else i!=="$"&&i!=="$?"&&i!=="$!"||l++;i=u}while(i);El(n)}function Nd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Nd(i),Lu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function kC(e,n,i,l){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[js])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=dn(e.nextSibling),e===null)break}return null}function $C(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=dn(e.nextSibling),e===null))return null;return e}function dn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}function Wy(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return e;n--}else i==="/$"&&n++}e=e.previousSibling}return null}function Zy(e,n,i){switch(n=ac(i),e){case"html":if(e=n.documentElement,!e)throw Error(s(452));return e;case"head":if(e=n.head,!e)throw Error(s(453));return e;case"body":if(e=n.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}var nn=new Map,Jy=new Set;function ic(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var ur=re.d;re.d={f:HC,r:qC,D:BC,C:IC,L:VC,m:YC,X:FC,S:GC,M:QC};function HC(){var e=ur.f(),n=Wo();return e||n}function qC(e){var n=oi(e);n!==null&&n.tag===5&&n.type==="form"?Cv(n):ur.r(e)}var $i=typeof document>"u"?null:document;function eb(e,n,i){var l=$i;if(l&&typeof n=="string"&&n){var u=Gt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),Jy.has(u)||(Jy.add(u),e={rel:e,crossOrigin:i,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),yt(n,"link",e),dt(n),l.head.appendChild(n)))}}function BC(e){ur.D(e),eb("dns-prefetch",e,null)}function IC(e,n){ur.C(e,n),eb("preconnect",e,n)}function VC(e,n,i){ur.L(e,n,i);var l=$i;if(l&&e&&n){var u='link[rel="preload"][as="'+Gt(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+Gt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+Gt(i.imageSizes)+'"]')):u+='[href="'+Gt(e)+'"]';var h=u;switch(n){case"style":h=Hi(e);break;case"script":h=qi(e)}nn.has(h)||(e=K({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),nn.set(h,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(gl(h))||n==="script"&&l.querySelector(vl(h))||(n=l.createElement("link"),yt(n,"link",e),dt(n),l.head.appendChild(n)))}}function YC(e,n){ur.m(e,n);var i=$i;if(i&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Gt(l)+'"][href="'+Gt(e)+'"]',h=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=qi(e)}if(!nn.has(h)&&(e=K({rel:"modulepreload",href:e},n),nn.set(h,e),i.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(vl(h)))return}l=i.createElement("link"),yt(l,"link",e),dt(l),i.head.appendChild(l)}}}function GC(e,n,i){ur.S(e,n,i);var l=$i;if(l&&e){var u=ci(l).hoistableStyles,h=Hi(e);n=n||"default";var R=u.get(h);if(!R){var A={loading:0,preload:null};if(R=l.querySelector(gl(h)))A.loading=5;else{e=K({rel:"stylesheet",href:e,"data-precedence":n},i),(i=nn.get(h))&&Od(e,i);var D=R=l.createElement("link");dt(D),yt(D,"link",e),D._p=new Promise(function(Y,J){D.onload=Y,D.onerror=J}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,sc(R,n,l)}R={type:"stylesheet",instance:R,count:1,state:A},u.set(h,R)}}}function FC(e,n){ur.X(e,n);var i=$i;if(i&&e){var l=ci(i).hoistableScripts,u=qi(e),h=l.get(u);h||(h=i.querySelector(vl(u)),h||(e=K({src:e,async:!0},n),(n=nn.get(u))&&Md(e,n),h=i.createElement("script"),dt(h),yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function QC(e,n){ur.M(e,n);var i=$i;if(i&&e){var l=ci(i).hoistableScripts,u=qi(e),h=l.get(u);h||(h=i.querySelector(vl(u)),h||(e=K({src:e,async:!0,type:"module"},n),(n=nn.get(u))&&Md(e,n),h=i.createElement("script"),dt(h),yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function tb(e,n,i,l){var u=(u=Ie.current)?ic(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Hi(i.href),i=ci(u).hoistableStyles,l=i.get(n),l||(l={type:"style",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Hi(i.href);var h=ci(u).hoistableStyles,R=h.get(e);if(R||(u=u.ownerDocument||u,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,R),(h=u.querySelector(gl(e)))&&!h._p&&(R.instance=h,R.state.loading=5),nn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},nn.set(e,i),h||XC(u,e,i,R.state))),n&&l===null)throw Error(s(528,""));return R}if(n&&l!==null)throw Error(s(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qi(i),i=ci(u).hoistableScripts,l=i.get(n),l||(l={type:"script",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Hi(e){return'href="'+Gt(e)+'"'}function gl(e){return'link[rel="stylesheet"]['+e+"]"}function nb(e){return K({},e,{"data-precedence":e.precedence,precedence:null})}function XC(e,n,i,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),yt(n,"link",i),dt(n),e.head.appendChild(n))}function qi(e){return'[src="'+Gt(e)+'"]'}function vl(e){return"script[async]"+e}function rb(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Gt(i.href)+'"]');if(l)return n.instance=l,dt(l),l;var u=K({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),dt(l),yt(l,"style",u),sc(l,i.precedence,e),n.instance=l;case"stylesheet":u=Hi(i.href);var h=e.querySelector(gl(u));if(h)return n.state.loading|=4,n.instance=h,dt(h),h;l=nb(i),(u=nn.get(u))&&Od(l,u),h=(e.ownerDocument||e).createElement("link"),dt(h);var R=h;return R._p=new Promise(function(A,D){R.onload=A,R.onerror=D}),yt(h,"link",l),n.state.loading|=4,sc(h,i.precedence,e),n.instance=h;case"script":return h=qi(i.src),(u=e.querySelector(vl(h)))?(n.instance=u,dt(u),u):(l=i,(u=nn.get(h))&&(l=K({},i),Md(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),dt(u),yt(u,"link",l),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,sc(l,i.precedence,e));return n.instance}function sc(e,n,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,h=u,R=0;R<l.length;R++){var A=l[R];if(A.dataset.precedence===n)h=A;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function Od(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Md(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var lc=null;function ab(e,n,i){if(lc===null){var l=new Map,u=lc=new Map;u.set(i,l)}else u=lc,l=u.get(i),l||(l=new Map,u.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var h=i[u];if(!(h[js]||h[bt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var R=h.getAttribute(n)||"";R=e+R;var A=l.get(R);A?A.push(h):l.set(R,[h])}}return l}function ib(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function KC(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){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 e=n.disabled,typeof n.precedence=="string"&&e==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 sb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var yl=null;function WC(){}function ZC(e,n,i){if(yl===null)throw Error(s(475));var l=yl;if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Hi(i.href),h=e.querySelector(gl(u));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=oc.bind(l),e.then(l,l)),n.state.loading|=4,n.instance=h,dt(h);return}h=e.ownerDocument||e,i=nb(i),(u=nn.get(u))&&Od(i,u),h=h.createElement("link"),dt(h);var R=h;R._p=new Promise(function(A,D){R.onload=A,R.onerror=D}),yt(h,"link",i),n.instance=h}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(l.count++,n=oc.bind(l),e.addEventListener("load",n),e.addEventListener("error",n))}}function JC(){if(yl===null)throw Error(s(475));var e=yl;return e.stylesheets&&e.count===0&&jd(e,e.stylesheets),0<e.count?function(n){var i=setTimeout(function(){if(e.stylesheets&&jd(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i)}}:null}function oc(){if(this.count--,this.count===0){if(this.stylesheets)jd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cc=null;function jd(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cc=new Map,n.forEach(eA,e),cc=null,oc.call(e))}function eA(e,n){if(!(n.state.loading&4)){var i=cc.get(e);if(i)var l=i.get(null);else{i=new Map,cc.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var R=u[h];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(i.set(R.dataset.precedence,R),l=R)}l&&i.set(null,l)}u=n.instance,R=u.getAttribute("data-precedence"),h=i.get(R)||l,h===l&&i.set(null,u),i.set(R,u),this.count++,l=oc.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var bl={$$typeof:E,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function tA(e,n,i,l,u,h,R,A){this.tag=1,this.containerInfo=e,this.finishedWork=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=Du(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Du(0),this.hiddenUpdates=Du(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function lb(e,n,i,l,u,h,R,A,D,Y,J,ie){return e=new tA(e,n,i,R,A,D,Y,ie),n=1,h===!0&&(n|=24),h=en(3,null,null,n),e.current=h,h.stateNode=e,n=cf(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:n},If(h),e}function ob(e){return e?(e=bi,e):bi}function cb(e,n,i,l,u,h){u=ob(u),l.context===null?l.context=u:l.pendingContext=u,l=Ur(n),l.payload={element:i},h=h===void 0?null:h,h!==null&&(l.callback=h),i=kr(e,l,n),i!==null&&(Tt(i,e,n),nl(i,e,n))}function ub(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Dd(e,n){ub(e,n),(e=e.alternate)&&ub(e,n)}function fb(e){if(e.tag===13){var n=Mr(e,67108864);n!==null&&Tt(n,e,67108864),Dd(e,67108864)}}var uc=!0;function nA(e,n,i,l){var u=U.T;U.T=null;var h=re.p;try{re.p=2,_d(e,n,i,l)}finally{re.p=h,U.T=u}}function rA(e,n,i,l){var u=U.T;U.T=null;var h=re.p;try{re.p=8,_d(e,n,i,l)}finally{re.p=h,U.T=u}}function _d(e,n,i,l){if(uc){var u=Ld(l);if(u===null)Sd(e,n,l,fc,i),hb(e,l);else if(iA(u,e,n,i,l))l.stopPropagation();else if(hb(e,l),n&4&&-1<aA.indexOf(e)){for(;u!==null;){var h=oi(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var R=ya(h.pendingLanes);if(R!==0){var A=h;for(A.pendingLanes|=2,A.entangledLanes|=2;R;){var D=1<<31-Pt(R);A.entanglements[1]|=D,R&=~D}Mn(h),(Ke&6)===0&&(Qo=Tn()+500,hl(0))}}break;case 13:A=Mr(h,2),A!==null&&Tt(A,h,2),Wo(),Dd(h,2)}if(h=Ld(l),h===null&&Sd(e,n,l,fc,i),h===u)break;u=h}u!==null&&l.stopPropagation()}else Sd(e,n,l,null,i)}}function Ld(e){return e=$u(e),zd(e)}var fc=null;function zd(e){if(fc=null,e=ba(e),e!==null){var n=z(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=Q(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return fc=e,null}function db(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(IR()){case Pp:return 2;case Up:return 8;case io:case VR:return 32;case kp:return 268435456;default:return 32}default:return 32}}var Pd=!1,Yr=null,Gr=null,Fr=null,xl=new Map,Sl=new Map,Qr=[],aA="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 hb(e,n){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":xl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sl.delete(n.pointerId)}}function wl(e,n,i,l,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[u]},n!==null&&(n=oi(n),n!==null&&fb(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function iA(e,n,i,l,u){switch(n){case"focusin":return Yr=wl(Yr,e,n,i,l,u),!0;case"dragenter":return Gr=wl(Gr,e,n,i,l,u),!0;case"mouseover":return Fr=wl(Fr,e,n,i,l,u),!0;case"pointerover":var h=u.pointerId;return xl.set(h,wl(xl.get(h)||null,e,n,i,l,u)),!0;case"gotpointercapture":return h=u.pointerId,Sl.set(h,wl(Sl.get(h)||null,e,n,i,l,u)),!0}return!1}function mb(e){var n=ba(e.target);if(n!==null){var i=z(n);if(i!==null){if(n=i.tag,n===13){if(n=Q(i),n!==null){e.blockedOn=n,JR(e.priority,function(){if(i.tag===13){var l=qt(),u=Mr(i,l);u!==null&&Tt(u,i,l),Dd(i,l)}});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Ld(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);ku=l,i.target.dispatchEvent(l),ku=null}else return n=oi(i),n!==null&&fb(n),e.blockedOn=i,!1;n.shift()}return!0}function pb(e,n,i){dc(e)&&i.delete(n)}function sA(){Pd=!1,Yr!==null&&dc(Yr)&&(Yr=null),Gr!==null&&dc(Gr)&&(Gr=null),Fr!==null&&dc(Fr)&&(Fr=null),xl.forEach(pb),Sl.forEach(pb)}function hc(e,n){e.blockedOn===n&&(e.blockedOn=null,Pd||(Pd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sA)))}var mc=null;function gb(e){mc!==e&&(mc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){mc===e&&(mc=null);for(var n=0;n<e.length;n+=3){var i=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(zd(l||i)===null)continue;break}var h=oi(i);h!==null&&(e.splice(n,3),n-=3,Tf(h,{pending:!0,data:u,method:i.method,action:l},l,u))}}))}function El(e){function n(D){return hc(D,e)}Yr!==null&&hc(Yr,e),Gr!==null&&hc(Gr,e),Fr!==null&&hc(Fr,e),xl.forEach(n),Sl.forEach(n);for(var i=0;i<Qr.length;i++){var l=Qr[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qr.length&&(i=Qr[0],i.blockedOn===null);)mb(i),i.blockedOn===null&&Qr.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var u=i[l],h=i[l+1],R=u[Ot]||null;if(typeof h=="function")R||gb(i);else if(R){var A=null;if(h&&h.hasAttribute("formAction")){if(u=h,R=h[Ot]||null)A=R.formAction;else if(zd(u)!==null)continue}else A=R.action;typeof A=="function"?i[l+1]=A:(i.splice(l,3),l-=3),gb(i)}}}function Ud(e){this._internalRoot=e}pc.prototype.render=Ud.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));var i=n.current,l=qt();cb(i,l,e,n,null,null)},pc.prototype.unmount=Ud.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;e.tag===0&&Pi(),cb(e.current,2,null,e,null,null),Wo(),n[li]=null}};function pc(e){this._internalRoot=e}pc.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vp();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Qr.length&&n!==0&&n<Qr[i].priority;i++);Qr.splice(i,0,e),i===0&&mb(e)}};var vb=r.version;if(vb!=="19.0.0")throw Error(s(527,vb,"19.0.0"));re.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=G(n),e=e!==null?ee(e):null,e=e===null?null:e.stateNode,e};var lA={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:U,findFiberByHostInstance:ba,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gc.isDisabled&&gc.supportsFiber)try{Ns=gc.inject(lA),zt=gc}catch{}}return Tl.createRoot=function(e,n){if(!o(e))throw Error(s(299));var i=!1,l="",u=Lv,h=zv,R=Pv,A=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(R=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(A=n.unstable_transitionCallbacks)),n=lb(e,1,!1,null,null,i,l,u,h,R,A,null),e[li]=n.current,xd(e.nodeType===8?e.parentNode:e),new Ud(n)},Tl.hydrateRoot=function(e,n,i){if(!o(e))throw Error(s(299));var l=!1,u="",h=Lv,R=zv,A=Pv,D=null,Y=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(R=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(D=i.unstable_transitionCallbacks),i.formState!==void 0&&(Y=i.formState)),n=lb(e,1,!0,n,i??null,l,u,h,R,A,D,Y),n.context=ob(null),i=n.current,l=qt(),u=Ur(l),u.callback=null,kr(i,u,l),n.current.lanes=l,Ms(n,l),Mn(n),e[li]=n.current,xd(e),new pc(n)},Tl.version="19.0.0",Tl}var Nb;function yA(){if(Nb)return qd.exports;Nb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),qd.exports=vA(),qd.exports}var bA=yA();function Ob(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Hx(...t){return r=>{let a=!1;const s=t.map(o=>{const c=Ob(o,r);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let o=0;o<s.length;o++){const c=s[o];typeof c=="function"?c():Ob(t[o],null)}}}}function Ue(...t){return y.useCallback(Hx(...t),t)}var sn=y.forwardRef((t,r)=>{const{children:a,...s}=t,o=y.Children.toArray(a),c=o.find(xA);if(c){const f=c.props.children,d=o.map(m=>m===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:m);return v.jsx(tm,{...s,ref:r,children:y.isValidElement(f)?y.cloneElement(f,void 0,d):null})}return v.jsx(tm,{...s,ref:r,children:a})});sn.displayName="Slot";var tm=y.forwardRef((t,r)=>{const{children:a,...s}=t;if(y.isValidElement(a)){const o=wA(a),c=SA(s,a.props);return a.type!==y.Fragment&&(c.ref=r?Hx(r,o):o),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});tm.displayName="SlotClone";var qx=({children:t})=>v.jsx(v.Fragment,{children:t});function xA(t){return y.isValidElement(t)&&t.type===qx}function SA(t,r){const a={...r};for(const s in r){const o=t[s],c=r[s];/^on[A-Z]/.test(s)?o&&c?a[s]=(...d)=>{c(...d),o(...d)}:o&&(a[s]=o):s==="style"?a[s]={...o,...c}:s==="className"&&(a[s]=[o,c].filter(Boolean).join(" "))}return{...t,...a}}function wA(t){var s,o;let r=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?t.ref:(r=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}function Bx(t){var r,a,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(a=Bx(t[r]))&&(s&&(s+=" "),s+=a)}else for(a in t)t[a]&&(s&&(s+=" "),s+=a);return s}function Ix(){for(var t,r,a=0,s="",o=arguments.length;a<o;a++)(t=arguments[a])&&(r=Bx(t))&&(s&&(s+=" "),s+=r);return s}const Mb=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,jb=Ix,ma=(t,r)=>a=>{var s;if((r==null?void 0:r.variants)==null)return jb(t,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:o,defaultVariants:c}=r,f=Object.keys(o).map(p=>{const g=a==null?void 0:a[p],b=c==null?void 0:c[p];if(g===null)return null;const x=Mb(g)||Mb(b);return o[p][x]}),d=a&&Object.entries(a).reduce((p,g)=>{let[b,x]=g;return x===void 0||(p[b]=x),p},{}),m=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:b,className:x,...E}=g;return Object.entries(E).every(T=>{let[S,w]=T;return Array.isArray(w)?w.includes({...c,...d}[S]):{...c,...d}[S]===w})?[...p,b,x]:p},[]);return jb(t,f,m,a==null?void 0:a.class,a==null?void 0:a.className)};var Oc={exports:{}},EA=Oc.exports,Db;function RA(){return Db||(Db=1,function(t,r){(function(a,s){t.exports=s()})(EA,function(){var a=1e3,s=6e4,o=36e5,c="millisecond",f="second",d="minute",m="hour",p="day",g="week",b="month",x="quarter",E="year",T="date",S="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,N={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var H=["th","st","nd","rd"],j=q%100;return"["+q+(H[(j-20)%10]||H[j]||H[0])+"]"}},O=function(q,H,j){var B=String(q);return!B||B.length>=H?q:""+Array(H+1-B.length).join(j)+q},_={s:O,z:function(q){var H=-q.utcOffset(),j=Math.abs(H),B=Math.floor(j/60),z=j%60;return(H<=0?"+":"-")+O(B,2,"0")+":"+O(z,2,"0")},m:function q(H,j){if(H.date()<j.date())return-q(j,H);var B=12*(j.year()-H.year())+(j.month()-H.month()),z=H.clone().add(B,b),Q=j-z<0,M=H.clone().add(B+(Q?-1:1),b);return+(-(B+(j-z)/(Q?z-M:M-z))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:b,y:E,w:g,d:p,D:T,h:m,m:d,s:f,ms:c,Q:x}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},L="en",k={};k[L]=N;var V="$isDayjsObject",$=function(q){return q instanceof se||!(!q||!q[V])},U=function q(H,j,B){var z;if(!H)return L;if(typeof H=="string"){var Q=H.toLowerCase();k[Q]&&(z=Q),j&&(k[Q]=j,z=Q);var M=H.split("-");if(!z&&M.length>1)return q(M[0])}else{var G=H.name;k[G]=H,z=G}return!B&&z&&(L=z),z||!B&&L},K=function(q,H){if($(q))return q.clone();var j=typeof H=="object"?H:{};return j.date=q,j.args=arguments,new se(j)},te=_;te.l=U,te.i=$,te.w=function(q,H){return K(q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var se=function(){function q(j){this.$L=U(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[V]=!0}var H=q.prototype;return H.parse=function(j){this.$d=function(B){var z=B.date,Q=B.utc;if(z===null)return new Date(NaN);if(te.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var M=z.match(w);if(M){var G=M[2]-1||0,ee=(M[7]||"0").substring(0,3);return Q?new Date(Date.UTC(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)):new Date(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)}}return new Date(z)}(j),this.init()},H.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},H.$utils=function(){return te},H.isValid=function(){return this.$d.toString()!==S},H.isSame=function(j,B){var z=K(j);return this.startOf(B)<=z&&z<=this.endOf(B)},H.isAfter=function(j,B){return K(j)<this.startOf(B)},H.isBefore=function(j,B){return this.endOf(B)<K(j)},H.$g=function(j,B,z){return te.u(j)?this[B]:this.set(z,j)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(j,B){var z=this,Q=!!te.u(B)||B,M=te.p(j),G=function(Ee,fe){var Se=te.w(z.$u?Date.UTC(z.$y,fe,Ee):new Date(z.$y,fe,Ee),z);return Q?Se:Se.endOf(p)},ee=function(Ee,fe){return te.w(z.toDate()[Ee].apply(z.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(fe)),z)},ae=this.$W,re=this.$M,oe=this.$D,pe="set"+(this.$u?"UTC":"");switch(M){case E:return Q?G(1,0):G(31,11);case b:return Q?G(1,re):G(0,re+1);case g:var ue=this.$locale().weekStart||0,me=(ae<ue?ae+7:ae)-ue;return G(Q?oe-me:oe+(6-me),re);case p:case T:return ee(pe+"Hours",0);case m:return ee(pe+"Minutes",1);case d:return ee(pe+"Seconds",2);case f:return ee(pe+"Milliseconds",3);default:return this.clone()}},H.endOf=function(j){return this.startOf(j,!1)},H.$set=function(j,B){var z,Q=te.p(j),M="set"+(this.$u?"UTC":""),G=(z={},z[p]=M+"Date",z[T]=M+"Date",z[b]=M+"Month",z[E]=M+"FullYear",z[m]=M+"Hours",z[d]=M+"Minutes",z[f]=M+"Seconds",z[c]=M+"Milliseconds",z)[Q],ee=Q===p?this.$D+(B-this.$W):B;if(Q===b||Q===E){var ae=this.clone().set(T,1);ae.$d[G](ee),ae.init(),this.$d=ae.set(T,Math.min(this.$D,ae.daysInMonth())).$d}else G&&this.$d[G](ee);return this.init(),this},H.set=function(j,B){return this.clone().$set(j,B)},H.get=function(j){return this[te.p(j)]()},H.add=function(j,B){var z,Q=this;j=Number(j);var M=te.p(B),G=function(re){var oe=K(Q);return te.w(oe.date(oe.date()+Math.round(re*j)),Q)};if(M===b)return this.set(b,this.$M+j);if(M===E)return this.set(E,this.$y+j);if(M===p)return G(1);if(M===g)return G(7);var ee=(z={},z[d]=s,z[m]=o,z[f]=a,z)[M]||1,ae=this.$d.getTime()+j*ee;return te.w(ae,this)},H.subtract=function(j,B){return this.add(-1*j,B)},H.format=function(j){var B=this,z=this.$locale();if(!this.isValid())return z.invalidDate||S;var Q=j||"YYYY-MM-DDTHH:mm:ssZ",M=te.z(this),G=this.$H,ee=this.$m,ae=this.$M,re=z.weekdays,oe=z.months,pe=z.meridiem,ue=function(fe,Se,Ae,Ie){return fe&&(fe[Se]||fe(B,Q))||Ae[Se].slice(0,Ie)},me=function(fe){return te.s(G%12||12,fe,"0")},Ee=pe||function(fe,Se,Ae){var Ie=fe<12?"AM":"PM";return Ae?Ie.toLowerCase():Ie};return Q.replace(C,function(fe,Se){return Se||function(Ae){switch(Ae){case"YY":return String(B.$y).slice(-2);case"YYYY":return te.s(B.$y,4,"0");case"M":return ae+1;case"MM":return te.s(ae+1,2,"0");case"MMM":return ue(z.monthsShort,ae,oe,3);case"MMMM":return ue(oe,ae);case"D":return B.$D;case"DD":return te.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ue(z.weekdaysMin,B.$W,re,2);case"ddd":return ue(z.weekdaysShort,B.$W,re,3);case"dddd":return re[B.$W];case"H":return String(G);case"HH":return te.s(G,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Ee(G,ee,!0);case"A":return Ee(G,ee,!1);case"m":return String(ee);case"mm":return te.s(ee,2,"0");case"s":return String(B.$s);case"ss":return te.s(B.$s,2,"0");case"SSS":return te.s(B.$ms,3,"0");case"Z":return M}return null}(fe)||M.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(j,B,z){var Q,M=this,G=te.p(B),ee=K(j),ae=(ee.utcOffset()-this.utcOffset())*s,re=this-ee,oe=function(){return te.m(M,ee)};switch(G){case E:Q=oe()/12;break;case b:Q=oe();break;case x:Q=oe()/3;break;case g:Q=(re-ae)/6048e5;break;case p:Q=(re-ae)/864e5;break;case m:Q=re/o;break;case d:Q=re/s;break;case f:Q=re/a;break;default:Q=re}return z?Q:te.a(Q)},H.daysInMonth=function(){return this.endOf(b).$D},H.$locale=function(){return k[this.$L]},H.locale=function(j,B){if(!j)return this.$L;var z=this.clone(),Q=U(j,B,!0);return Q&&(z.$L=Q),z},H.clone=function(){return te.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},q}(),de=se.prototype;return K.prototype=de,[["$ms",c],["$s",f],["$m",d],["$H",m],["$W",p],["$M",b],["$y",E],["$D",T]].forEach(function(q){de[q[1]]=function(H){return this.$g(H,q[0],q[1])}}),K.extend=function(q,H){return q.$i||(q(H,se,K),q.$i=!0),K},K.locale=U,K.isDayjs=$,K.unix=function(q){return K(1e3*q)},K.en=k[L],K.Ls=k,K.p={},K})}(Oc)),Oc.exports}var TA=RA();const Vx=gs(TA);var Mc={exports:{}},CA=Mc.exports,_b;function AA(){return _b||(_b=1,function(t,r){(function(a,s){t.exports=s()})(CA,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(s,o,c){var f=o.prototype,d=f.format;c.en.formats=a,f.format=function(m){m===void 0&&(m="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,g=function(b,x){return b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,T,S){var w=S&&S.toUpperCase();return T||x[S]||a[S]||x[w].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,N,O){return N||O.slice(1)})})}(m,p===void 0?{}:p);return d.call(this,g)}}})}(Mc)),Mc.exports}var NA=AA();const OA=gs(NA),Bm="-",MA=t=>{const r=DA(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:f=>{const d=f.split(Bm);return d[0]===""&&d.length!==1&&d.shift(),Yx(d,r)||jA(f)},getConflictingClassGroupIds:(f,d)=>{const m=a[f]||[];return d&&s[f]?[...m,...s[f]]:m}}},Yx=(t,r)=>{var f;if(t.length===0)return r.classGroupId;const a=t[0],s=r.nextPart.get(a),o=s?Yx(t.slice(1),s):void 0;if(o)return o;if(r.validators.length===0)return;const c=t.join(Bm);return(f=r.validators.find(({validator:d})=>d(c)))==null?void 0:f.classGroupId},Lb=/^\[(.+)\]$/,jA=t=>{if(Lb.test(t)){const r=Lb.exec(t)[1],a=r==null?void 0:r.substring(0,r.indexOf(":"));if(a)return"arbitrary.."+a}},DA=t=>{const{theme:r,prefix:a}=t,s={nextPart:new Map,validators:[]};return LA(Object.entries(t.classGroups),a).forEach(([c,f])=>{nm(f,s,c,r)}),s},nm=(t,r,a,s)=>{t.forEach(o=>{if(typeof o=="string"){const c=o===""?r:zb(r,o);c.classGroupId=a;return}if(typeof o=="function"){if(_A(o)){nm(o(s),r,a,s);return}r.validators.push({validator:o,classGroupId:a});return}Object.entries(o).forEach(([c,f])=>{nm(f,zb(r,c),a,s)})})},zb=(t,r)=>{let a=t;return r.split(Bm).forEach(s=>{a.nextPart.has(s)||a.nextPart.set(s,{nextPart:new Map,validators:[]}),a=a.nextPart.get(s)}),a},_A=t=>t.isThemeGetter,LA=(t,r)=>r?t.map(([a,s])=>{const o=s.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([f,d])=>[r+f,d])):c);return[a,o]}):t,zA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,a=new Map,s=new Map;const o=(c,f)=>{a.set(c,f),r++,r>t&&(r=0,s=a,a=new Map)};return{get(c){let f=a.get(c);if(f!==void 0)return f;if((f=s.get(c))!==void 0)return o(c,f),f},set(c,f){a.has(c)?a.set(c,f):o(c,f)}}},Gx="!",PA=t=>{const{separator:r,experimentalParseClassName:a}=t,s=r.length===1,o=r[0],c=r.length,f=d=>{const m=[];let p=0,g=0,b;for(let w=0;w<d.length;w++){let C=d[w];if(p===0){if(C===o&&(s||d.slice(w,w+c)===r)){m.push(d.slice(g,w)),g=w+c;continue}if(C==="/"){b=w;continue}}C==="["?p++:C==="]"&&p--}const x=m.length===0?d:d.substring(g),E=x.startsWith(Gx),T=E?x.substring(1):x,S=b&&b>g?b-g:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:S}};return a?d=>a({className:d,parseClassName:f}):f},UA=t=>{if(t.length<=1)return t;const r=[];let a=[];return t.forEach(s=>{s[0]==="["?(r.push(...a.sort(),s),a=[]):a.push(s)}),r.push(...a.sort()),r},kA=t=>({cache:zA(t.cacheSize),parseClassName:PA(t),...MA(t)}),$A=/\s+/,HA=(t,r)=>{const{parseClassName:a,getClassGroupId:s,getConflictingClassGroupIds:o}=r,c=[],f=t.trim().split($A);let d="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{modifiers:g,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:E}=a(p);let T=!!E,S=s(T?x.substring(0,E):x);if(!S){if(!T){d=p+(d.length>0?" "+d:d);continue}if(S=s(x),!S){d=p+(d.length>0?" "+d:d);continue}T=!1}const w=UA(g).join(":"),C=b?w+Gx:w,N=C+S;if(c.includes(N))continue;c.push(N);const O=o(S,T);for(let _=0;_<O.length;++_){const L=O[_];c.push(C+L)}d=p+(d.length>0?" "+d:d)}return d};function qA(){let t=0,r,a,s="";for(;t<arguments.length;)(r=arguments[t++])&&(a=Fx(r))&&(s&&(s+=" "),s+=a);return s}const Fx=t=>{if(typeof t=="string")return t;let r,a="";for(let s=0;s<t.length;s++)t[s]&&(r=Fx(t[s]))&&(a&&(a+=" "),a+=r);return a};function BA(t,...r){let a,s,o,c=f;function f(m){const p=r.reduce((g,b)=>b(g),t());return a=kA(p),s=a.cache.get,o=a.cache.set,c=d,d(m)}function d(m){const p=s(m);if(p)return p;const g=HA(m,a);return o(m,g),g}return function(){return c(qA.apply(null,arguments))}}const Fe=t=>{const r=a=>a[t]||[];return r.isThemeGetter=!0,r},Qx=/^\[(?:([a-z-]+):)?(.+)\]$/i,IA=/^\d+\/\d+$/,VA=new Set(["px","full","screen"]),YA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GA=/\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$/,FA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,QA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=t=>Xi(t)||VA.has(t)||IA.test(t),Kr=t=>vs(t,"length",rN),Xi=t=>!!t&&!Number.isNaN(Number(t)),Yd=t=>vs(t,"number",Xi),Cl=t=>!!t&&Number.isInteger(Number(t)),KA=t=>t.endsWith("%")&&Xi(t.slice(0,-1)),Ce=t=>Qx.test(t),Wr=t=>YA.test(t),WA=new Set(["length","size","percentage"]),ZA=t=>vs(t,WA,Xx),JA=t=>vs(t,"position",Xx),eN=new Set(["image","url"]),tN=t=>vs(t,eN,iN),nN=t=>vs(t,"",aN),Al=()=>!0,vs=(t,r,a)=>{const s=Qx.exec(t);return s?s[1]?typeof r=="string"?s[1]===r:r.has(s[1]):a(s[2]):!1},rN=t=>GA.test(t)&&!FA.test(t),Xx=()=>!1,aN=t=>QA.test(t),iN=t=>XA.test(t),sN=()=>{const t=Fe("colors"),r=Fe("spacing"),a=Fe("blur"),s=Fe("brightness"),o=Fe("borderColor"),c=Fe("borderRadius"),f=Fe("borderSpacing"),d=Fe("borderWidth"),m=Fe("contrast"),p=Fe("grayscale"),g=Fe("hueRotate"),b=Fe("invert"),x=Fe("gap"),E=Fe("gradientColorStops"),T=Fe("gradientColorStopPositions"),S=Fe("inset"),w=Fe("margin"),C=Fe("opacity"),N=Fe("padding"),O=Fe("saturate"),_=Fe("scale"),L=Fe("sepia"),k=Fe("skew"),V=Fe("space"),$=Fe("translate"),U=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],te=()=>["auto",Ce,r],se=()=>[Ce,r],de=()=>["",fr,Kr],q=()=>["auto",Xi,Ce],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Ce],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Xi,Ce];return{cacheSize:500,separator:":",theme:{colors:[Al],spacing:[fr,Kr],blur:["none","",Wr,Ce],brightness:G(),borderColor:[t],borderRadius:["none","","full",Wr,Ce],borderSpacing:se(),borderWidth:de(),contrast:G(),grayscale:Q(),hueRotate:G(),invert:Q(),gap:se(),gradientColorStops:[t],gradientColorStopPositions:[KA,Kr],inset:te(),margin:te(),opacity:G(),padding:se(),saturate:G(),scale:G(),sepia:Q(),skew:G(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Wr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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"],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:[...H(),Ce]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cl,Ce]}],basis:[{basis:te()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Cl,Ce]}],"grid-cols":[{"grid-cols":[Al]}],"col-start-end":[{col:["auto",{span:["full",Cl,Ce]},Ce]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Al]}],"row-start-end":[{row:["auto",{span:[Cl,Ce]},Ce]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,r]}],"min-w":[{"min-w":[Ce,r,"min","max","fit"]}],"max-w":[{"max-w":[Ce,r,"none","full","min","max","fit","prose",{screen:[Wr]},Wr]}],h:[{h:[Ce,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Wr,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yd]}],"font-family":[{font:[Al]}],"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:["tighter","tight","normal","wide","wider","widest",Ce]}],"line-clamp":[{"line-clamp":["none",Xi,Yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fr,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fr,Kr]}],"underline-offset":[{"underline-offset":["auto",fr,Ce]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),JA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tN]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[fr,Ce]}],"outline-w":[{outline:[fr,Kr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[fr,Kr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Wr,nN]}],"shadow-color":[{shadow:[Al]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[s]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Wr,Ce]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[b]}],saturate:[{saturate:[O]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Cl,Ce]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",Ce]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"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",Ce]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[fr,Kr,Yd]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},lN=BA(sN);function le(...t){return lN(Ix(t))}Vx.extend(OA);const oN=Vx,cN=t=>t.substring(0,2),uN=ma("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-destructive-foreground 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:"size-[30px] rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Qe=y.forwardRef(({className:t,variant:r,size:a,asChild:s=!1,...o},c)=>{const f=s?sn:"button";return v.jsx(f,{type:"button",className:le(uN({variant:r,size:a,className:t})),ref:c,...o})});Qe.displayName="Button";const vr=y.forwardRef(({className:t,type:r,...a},s)=>v.jsx("input",{type:r,className:le("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",t),ref:s,...a}));vr.displayName="Input";var ys=$x();const fN=gs(ys);var dN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=dN.reduce((t,r)=>{const a=y.forwardRef((s,o)=>{const{asChild:c,...f}=s,d=c?sn:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(d,{...f,ref:o})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function Kx(t,r){t&&ys.flushSync(()=>t.dispatchEvent(r))}var hN="Separator",Pb="horizontal",mN=["horizontal","vertical"],Wx=y.forwardRef((t,r)=>{const{decorative:a,orientation:s=Pb,...o}=t,c=pN(s)?s:Pb,d=a?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return v.jsx(we.div,{"data-orientation":c,...d,...o,ref:r})});Wx.displayName=hN;function pN(t){return mN.includes(t)}var Zx=Wx;const Jx=y.forwardRef(({className:t,orientation:r="horizontal",decorative:a=!0,...s},o)=>v.jsx(Zx,{ref:o,decorative:a,orientation:r,className:le("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...s}));Jx.displayName=Zx.displayName;function ve(t,r,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t==null||t(o),a===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}function gN(t,r){const a=y.createContext(r),s=c=>{const{children:f,...d}=c,m=y.useMemo(()=>d,Object.values(d));return v.jsx(a.Provider,{value:m,children:f})};s.displayName=t+"Provider";function o(c){const f=y.useContext(a);if(f)return f;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[s,o]}function qn(t,r=[]){let a=[];function s(c,f){const d=y.createContext(f),m=a.length;a=[...a,f];const p=b=>{var C;const{scope:x,children:E,...T}=b,S=((C=x==null?void 0:x[t])==null?void 0:C[m])||d,w=y.useMemo(()=>T,Object.values(T));return v.jsx(S.Provider,{value:w,children:E})};p.displayName=c+"Provider";function g(b,x){var S;const E=((S=x==null?void 0:x[t])==null?void 0:S[m])||d,T=y.useContext(E);if(T)return T;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[p,g]}const o=()=>{const c=a.map(f=>y.createContext(f));return function(d){const m=(d==null?void 0:d[t])||c;return y.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return o.scopeName=t,[s,vN(o,...r)]}function vN(...t){const r=t[0];if(t.length===1)return r;const a=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(c){const f=s.reduce((d,{useScope:m,scopeName:p})=>{const b=m(c)[`__scope${p}`];return{...d,...b}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return a.scopeName=r.scopeName,a}var ft=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},yN=hA.useId||(()=>{}),bN=0;function yr(t){const[r,a]=y.useState(yN());return ft(()=>{a(s=>s??String(bN++))},[t]),r?`radix-${r}`:""}function nt(t){const r=y.useRef(t);return y.useEffect(()=>{r.current=t}),y.useMemo(()=>(...a)=>{var s;return(s=r.current)==null?void 0:s.call(r,...a)},[])}function ei({prop:t,defaultProp:r,onChange:a=()=>{}}){const[s,o]=xN({defaultProp:r,onChange:a}),c=t!==void 0,f=c?t:s,d=nt(a),m=y.useCallback(p=>{if(c){const b=typeof p=="function"?p(t):p;b!==t&&d(b)}else o(p)},[c,t,o,d]);return[f,m]}function xN({defaultProp:t,onChange:r}){const a=y.useState(t),[s]=a,o=y.useRef(s),c=nt(r);return y.useEffect(()=>{o.current!==s&&(c(s),o.current=s)},[s,o,c]),a}function SN(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t);y.useEffect(()=>{const s=o=>{o.key==="Escape"&&a(o)};return r.addEventListener("keydown",s,{capture:!0}),()=>r.removeEventListener("keydown",s,{capture:!0})},[a,r])}var wN="DismissableLayer",rm="dismissableLayer.update",EN="dismissableLayer.pointerDownOutside",RN="dismissableLayer.focusOutside",Ub,eS=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fl=y.forwardRef((t,r)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:f,onDismiss:d,...m}=t,p=y.useContext(eS),[g,b]=y.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=y.useState({}),T=Ue(r,V=>b(V)),S=Array.from(p.layers),[w]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=S.indexOf(w),N=g?S.indexOf(g):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,_=N>=C,L=CN(V=>{const $=V.target,U=[...p.branches].some(K=>K.contains($));!_||U||(o==null||o(V),f==null||f(V),V.defaultPrevented||d==null||d())},x),k=AN(V=>{const $=V.target;[...p.branches].some(K=>K.contains($))||(c==null||c(V),f==null||f(V),V.defaultPrevented||d==null||d())},x);return SN(V=>{N===p.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&d&&(V.preventDefault(),d()))},x),y.useEffect(()=>{if(g)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ub=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),kb(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Ub)}},[g,x,a,p]),y.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),kb())},[g,p]),y.useEffect(()=>{const V=()=>E({});return document.addEventListener(rm,V),()=>document.removeEventListener(rm,V)},[]),v.jsx(we.div,{...m,ref:T,style:{pointerEvents:O?_?"auto":"none":void 0,...t.style},onFocusCapture:ve(t.onFocusCapture,k.onFocusCapture),onBlurCapture:ve(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ve(t.onPointerDownCapture,L.onPointerDownCapture)})});Fl.displayName=wN;var TN="DismissableLayerBranch",tS=y.forwardRef((t,r)=>{const a=y.useContext(eS),s=y.useRef(null),o=Ue(r,s);return y.useEffect(()=>{const c=s.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),v.jsx(we.div,{...t,ref:o})});tS.displayName=TN;function CN(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t),s=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const c=d=>{if(d.target&&!s.current){let m=function(){nS(EN,a,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(r.removeEventListener("click",o.current),o.current=m,r.addEventListener("click",o.current,{once:!0})):m()}else r.removeEventListener("click",o.current);s.current=!1},f=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),r.removeEventListener("pointerdown",c),r.removeEventListener("click",o.current)}},[r,a]),{onPointerDownCapture:()=>s.current=!0}}function AN(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t),s=y.useRef(!1);return y.useEffect(()=>{const o=c=>{c.target&&!s.current&&nS(RN,a,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",o),()=>r.removeEventListener("focusin",o)},[r,a]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function kb(){const t=new CustomEvent(rm);document.dispatchEvent(t)}function nS(t,r,a,{discrete:s}){const o=a.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});r&&o.addEventListener(t,r,{once:!0}),s?Kx(o,c):o.dispatchEvent(c)}var NN=Fl,ON=tS,Gd="focusScope.autoFocusOnMount",Fd="focusScope.autoFocusOnUnmount",$b={bubbles:!1,cancelable:!0},MN="FocusScope",Im=y.forwardRef((t,r)=>{const{loop:a=!1,trapped:s=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...f}=t,[d,m]=y.useState(null),p=nt(o),g=nt(c),b=y.useRef(null),x=Ue(r,S=>m(S)),E=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(s){let S=function(O){if(E.paused||!d)return;const _=O.target;d.contains(_)?b.current=_:Jr(b.current,{select:!0})},w=function(O){if(E.paused||!d)return;const _=O.relatedTarget;_!==null&&(d.contains(_)||Jr(b.current,{select:!0}))},C=function(O){if(document.activeElement===document.body)for(const L of O)L.removedNodes.length>0&&Jr(d)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const N=new MutationObserver(C);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),N.disconnect()}}},[s,d,E.paused]),y.useEffect(()=>{if(d){qb.add(E);const S=document.activeElement;if(!d.contains(S)){const C=new CustomEvent(Gd,$b);d.addEventListener(Gd,p),d.dispatchEvent(C),C.defaultPrevented||(jN(PN(rS(d)),{select:!0}),document.activeElement===S&&Jr(d))}return()=>{d.removeEventListener(Gd,p),setTimeout(()=>{const C=new CustomEvent(Fd,$b);d.addEventListener(Fd,g),d.dispatchEvent(C),C.defaultPrevented||Jr(S??document.body,{select:!0}),d.removeEventListener(Fd,g),qb.remove(E)},0)}}},[d,p,g,E]);const T=y.useCallback(S=>{if(!a&&!s||E.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,C=document.activeElement;if(w&&C){const N=S.currentTarget,[O,_]=DN(N);O&&_?!S.shiftKey&&C===_?(S.preventDefault(),a&&Jr(O,{select:!0})):S.shiftKey&&C===O&&(S.preventDefault(),a&&Jr(_,{select:!0})):C===N&&S.preventDefault()}},[a,s,E.paused]);return v.jsx(we.div,{tabIndex:-1,...f,ref:x,onKeyDown:T})});Im.displayName=MN;function jN(t,{select:r=!1}={}){const a=document.activeElement;for(const s of t)if(Jr(s,{select:r}),document.activeElement!==a)return}function DN(t){const r=rS(t),a=Hb(r,t),s=Hb(r.reverse(),t);return[a,s]}function rS(t){const r=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function Hb(t,r){for(const a of t)if(!_N(a,{upTo:r}))return a}function _N(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function LN(t){return t instanceof HTMLInputElement&&"select"in t}function Jr(t,{select:r=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&LN(t)&&r&&t.select()}}var qb=zN();function zN(){let t=[];return{add(r){const a=t[0];r!==a&&(a==null||a.pause()),t=Bb(t,r),t.unshift(r)},remove(r){var a;t=Bb(t,r),(a=t[0])==null||a.resume()}}}function Bb(t,r){const a=[...t],s=a.indexOf(r);return s!==-1&&a.splice(s,1),a}function PN(t){return t.filter(r=>r.tagName!=="A")}var UN="Portal",Ql=y.forwardRef((t,r)=>{var d;const{container:a,...s}=t,[o,c]=y.useState(!1);ft(()=>c(!0),[]);const f=a||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return f?fN.createPortal(v.jsx(we.div,{...s,ref:r}),f):null});Ql.displayName=UN;function kN(t,r){return y.useReducer((a,s)=>r[a][s]??a,t)}var ln=t=>{const{present:r,children:a}=t,s=$N(r),o=typeof a=="function"?a({present:s.isPresent}):y.Children.only(a),c=Ue(s.ref,HN(o));return typeof a=="function"||s.isPresent?y.cloneElement(o,{ref:c}):null};ln.displayName="Presence";function $N(t){const[r,a]=y.useState(),s=y.useRef({}),o=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[d,m]=kN(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=yc(s.current);c.current=d==="mounted"?p:"none"},[d]),ft(()=>{const p=s.current,g=o.current;if(g!==t){const x=c.current,E=yc(p);t?m("MOUNT"):E==="none"||(p==null?void 0:p.display)==="none"?m("UNMOUNT"):m(g&&x!==E?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,m]),ft(()=>{if(r){let p;const g=r.ownerDocument.defaultView??window,b=E=>{const S=yc(s.current).includes(E.animationName);if(E.target===r&&S&&(m("ANIMATION_END"),!o.current)){const w=r.style.animationFillMode;r.style.animationFillMode="forwards",p=g.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=w)})}},x=E=>{E.target===r&&(c.current=yc(s.current))};return r.addEventListener("animationstart",x),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{g.clearTimeout(p),r.removeEventListener("animationstart",x),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(p=>{p&&(s.current=getComputedStyle(p)),a(p)},[])}}function yc(t){return(t==null?void 0:t.animationName)||"none"}function HN(t){var s,o;let r=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?t.ref:(r=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Qd=0;function aS(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Ib()),document.body.insertAdjacentElement("beforeend",t[1]??Ib()),Qd++,()=>{Qd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Qd--}},[])}function Ib(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var zn=function(){return zn=Object.assign||function(r){for(var a,s=1,o=arguments.length;s<o;s++){a=arguments[s];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(r[c]=a[c])}return r},zn.apply(this,arguments)};function iS(t,r){var a={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.indexOf(s)<0&&(a[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)r.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(a[s[o]]=t[s[o]]);return a}function qN(t,r,a){if(a||arguments.length===2)for(var s=0,o=r.length,c;s<o;s++)(c||!(s in r))&&(c||(c=Array.prototype.slice.call(r,0,s)),c[s]=r[s]);return t.concat(c||Array.prototype.slice.call(r))}var jc="right-scroll-bar-position",Dc="width-before-scroll-bar",BN="with-scroll-bars-hidden",IN="--removed-body-scroll-bar-size";function Xd(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function VN(t,r){var a=y.useState(function(){return{value:t,callback:r,facade:{get current(){return a.value},set current(s){var o=a.value;o!==s&&(a.value=s,a.callback(s,o))}}}})[0];return a.callback=r,a.facade}var YN=typeof window<"u"?y.useLayoutEffect:y.useEffect,Vb=new WeakMap;function GN(t,r){var a=VN(null,function(s){return t.forEach(function(o){return Xd(o,s)})});return YN(function(){var s=Vb.get(a);if(s){var o=new Set(s),c=new Set(t),f=a.current;o.forEach(function(d){c.has(d)||Xd(d,null)}),c.forEach(function(d){o.has(d)||Xd(d,f)})}Vb.set(a,t)},[t]),a}function FN(t){return t}function QN(t,r){r===void 0&&(r=FN);var a=[],s=!1,o={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(c){var f=r(c,s);return a.push(f),function(){a=a.filter(function(d){return d!==f})}},assignSyncMedium:function(c){for(s=!0;a.length;){var f=a;a=[],f.forEach(c)}a={push:function(d){return c(d)},filter:function(){return a}}},assignMedium:function(c){s=!0;var f=[];if(a.length){var d=a;a=[],d.forEach(c),f=a}var m=function(){var g=f;f=[],g.forEach(c)},p=function(){return Promise.resolve().then(m)};p(),a={push:function(g){f.push(g),p()},filter:function(g){return f=f.filter(g),a}}}};return o}function XN(t){t===void 0&&(t={});var r=QN(null);return r.options=zn({async:!0,ssr:!1},t),r}var sS=function(t){var r=t.sideCar,a=iS(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=r.read();if(!s)throw new Error("Sidecar medium not found");return y.createElement(s,zn({},a))};sS.isSideCarExport=!0;function KN(t,r){return t.useMedium(r),sS}var lS=XN(),Kd=function(){},Jc=y.forwardRef(function(t,r){var a=y.useRef(null),s=y.useState({onScrollCapture:Kd,onWheelCapture:Kd,onTouchMoveCapture:Kd}),o=s[0],c=s[1],f=t.forwardProps,d=t.children,m=t.className,p=t.removeScrollBar,g=t.enabled,b=t.shards,x=t.sideCar,E=t.noIsolation,T=t.inert,S=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,N=t.gapMode,O=iS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=x,L=GN([a,r]),k=zn(zn({},O),o);return y.createElement(y.Fragment,null,g&&y.createElement(_,{sideCar:lS,removeScrollBar:p,shards:b,noIsolation:E,inert:T,setCallbacks:c,allowPinchZoom:!!S,lockRef:a,gapMode:N}),f?y.cloneElement(y.Children.only(d),zn(zn({},k),{ref:L})):y.createElement(C,zn({},k,{className:m,ref:L}),d))});Jc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jc.classNames={fullWidth:Dc,zeroRight:jc};var WN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=WN();return r&&t.setAttribute("nonce",r),t}function JN(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function eO(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var tO=function(){var t=0,r=null;return{add:function(a){t==0&&(r=ZN())&&(JN(r,a),eO(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},nO=function(){var t=tO();return function(r,a){y.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&a])}},oS=function(){var t=nO(),r=function(a){var s=a.styles,o=a.dynamic;return t(s,o),null};return r},rO={left:0,top:0,right:0,gap:0},Wd=function(t){return parseInt(t||"",10)||0},aO=function(t){var r=window.getComputedStyle(document.body),a=r[t==="padding"?"paddingLeft":"marginLeft"],s=r[t==="padding"?"paddingTop":"marginTop"],o=r[t==="padding"?"paddingRight":"marginRight"];return[Wd(a),Wd(s),Wd(o)]},iO=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return rO;var r=aO(t),a=document.documentElement.clientWidth,s=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,s-a+r[2]-r[0])}},sO=oS(),Ki="data-scroll-locked",lO=function(t,r,a,s){var o=t.left,c=t.top,f=t.right,d=t.gap;return a===void 0&&(a="margin"),`
50
+ .`.concat(BN,` {
51
+ overflow: hidden `).concat(s,`;
52
+ padding-right: `).concat(d,"px ").concat(s,`;
53
+ }
54
+ body[`).concat(Ki,`] {
55
+ overflow: hidden `).concat(s,`;
56
+ overscroll-behavior: contain;
57
+ `).concat([r&&"position: relative ".concat(s,";"),a==="margin"&&`
58
+ padding-left: `.concat(o,`px;
59
+ padding-top: `).concat(c,`px;
60
+ padding-right: `).concat(f,`px;
61
+ margin-left:0;
62
+ margin-top:0;
63
+ margin-right: `).concat(d,"px ").concat(s,`;
64
+ `),a==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
65
+ }
66
+
67
+ .`).concat(jc,` {
68
+ right: `).concat(d,"px ").concat(s,`;
69
+ }
70
+
71
+ .`).concat(Dc,` {
72
+ margin-right: `).concat(d,"px ").concat(s,`;
73
+ }
74
+
75
+ .`).concat(jc," .").concat(jc,` {
76
+ right: 0 `).concat(s,`;
77
+ }
78
+
79
+ .`).concat(Dc," .").concat(Dc,` {
80
+ margin-right: 0 `).concat(s,`;
81
+ }
82
+
83
+ body[`).concat(Ki,`] {
84
+ `).concat(IN,": ").concat(d,`px;
85
+ }
86
+ `)},Yb=function(){var t=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(t)?t:0},oO=function(){y.useEffect(function(){return document.body.setAttribute(Ki,(Yb()+1).toString()),function(){var t=Yb()-1;t<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,t.toString())}},[])},cO=function(t){var r=t.noRelative,a=t.noImportant,s=t.gapMode,o=s===void 0?"margin":s;oO();var c=y.useMemo(function(){return iO(o)},[o]);return y.createElement(sO,{styles:lO(c,!r,o,a?"":"!important")})},am=!1;if(typeof window<"u")try{var bc=Object.defineProperty({},"passive",{get:function(){return am=!0,!0}});window.addEventListener("test",bc,bc),window.removeEventListener("test",bc,bc)}catch{am=!1}var Bi=am?{passive:!1}:!1,uO=function(t){return t.tagName==="TEXTAREA"},cS=function(t,r){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[r]!=="hidden"&&!(a.overflowY===a.overflowX&&!uO(t)&&a[r]==="visible")},fO=function(t){return cS(t,"overflowY")},dO=function(t){return cS(t,"overflowX")},Gb=function(t,r){var a=r.ownerDocument,s=r;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var o=uS(t,s);if(o){var c=fS(t,s),f=c[1],d=c[2];if(f>d)return!0}s=s.parentNode}while(s&&s!==a.body);return!1},hO=function(t){var r=t.scrollTop,a=t.scrollHeight,s=t.clientHeight;return[r,a,s]},mO=function(t){var r=t.scrollLeft,a=t.scrollWidth,s=t.clientWidth;return[r,a,s]},uS=function(t,r){return t==="v"?fO(r):dO(r)},fS=function(t,r){return t==="v"?hO(r):mO(r)},pO=function(t,r){return t==="h"&&r==="rtl"?-1:1},gO=function(t,r,a,s,o){var c=pO(t,window.getComputedStyle(r).direction),f=c*s,d=a.target,m=r.contains(d),p=!1,g=f>0,b=0,x=0;do{var E=fS(t,d),T=E[0],S=E[1],w=E[2],C=S-w-c*T;(T||C)&&uS(t,d)&&(b+=C,x+=T),d instanceof ShadowRoot?d=d.host:d=d.parentNode}while(!m&&d!==document.body||m&&(r.contains(d)||r===d));return(g&&Math.abs(b)<1||!g&&Math.abs(x)<1)&&(p=!0),p},xc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Fb=function(t){return[t.deltaX,t.deltaY]},Qb=function(t){return t&&"current"in t?t.current:t},vO=function(t,r){return t[0]===r[0]&&t[1]===r[1]},yO=function(t){return`
87
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
88
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
89
+ `)},bO=0,Ii=[];function xO(t){var r=y.useRef([]),a=y.useRef([0,0]),s=y.useRef(),o=y.useState(bO++)[0],c=y.useState(oS)[0],f=y.useRef(t);y.useEffect(function(){f.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var S=qN([t.lockRef.current],(t.shards||[]).map(Qb),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var d=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var C=xc(S),N=a.current,O="deltaX"in S?S.deltaX:N[0]-C[0],_="deltaY"in S?S.deltaY:N[1]-C[1],L,k=S.target,V=Math.abs(O)>Math.abs(_)?"h":"v";if("touches"in S&&V==="h"&&k.type==="range")return!1;var $=Gb(V,k);if(!$)return!0;if($?L=V:(L=V==="v"?"h":"v",$=Gb(V,k)),!$)return!1;if(!s.current&&"changedTouches"in S&&(O||_)&&(s.current=L),!L)return!0;var U=s.current||L;return gO(U,w,S,U==="h"?O:_)},[]),m=y.useCallback(function(S){var w=S;if(!(!Ii.length||Ii[Ii.length-1]!==c)){var C="deltaY"in w?Fb(w):xc(w),N=r.current.filter(function(L){return L.name===w.type&&(L.target===w.target||w.target===L.shadowParent)&&vO(L.delta,C)})[0];if(N&&N.should){w.cancelable&&w.preventDefault();return}if(!N){var O=(f.current.shards||[]).map(Qb).filter(Boolean).filter(function(L){return L.contains(w.target)}),_=O.length>0?d(w,O[0]):!f.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),p=y.useCallback(function(S,w,C,N){var O={name:S,delta:w,target:C,should:N,shadowParent:SO(C)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(_){return _!==O})},1)},[]),g=y.useCallback(function(S){a.current=xc(S),s.current=void 0},[]),b=y.useCallback(function(S){p(S.type,Fb(S),S.target,d(S,t.lockRef.current))},[]),x=y.useCallback(function(S){p(S.type,xc(S),S.target,d(S,t.lockRef.current))},[]);y.useEffect(function(){return Ii.push(c),t.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:x}),document.addEventListener("wheel",m,Bi),document.addEventListener("touchmove",m,Bi),document.addEventListener("touchstart",g,Bi),function(){Ii=Ii.filter(function(S){return S!==c}),document.removeEventListener("wheel",m,Bi),document.removeEventListener("touchmove",m,Bi),document.removeEventListener("touchstart",g,Bi)}},[]);var E=t.removeScrollBar,T=t.inert;return y.createElement(y.Fragment,null,T?y.createElement(c,{styles:yO(o)}):null,E?y.createElement(cO,{gapMode:t.gapMode}):null)}function SO(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const wO=KN(lS,xO);var Vm=y.forwardRef(function(t,r){return y.createElement(Jc,zn({},t,{ref:r,sideCar:wO}))});Vm.classNames=Jc.classNames;var EO=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Vi=new WeakMap,Sc=new WeakMap,wc={},Zd=0,dS=function(t){return t&&(t.host||dS(t.parentNode))},RO=function(t,r){return r.map(function(a){if(t.contains(a))return a;var s=dS(a);return s&&t.contains(s)?s:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},TO=function(t,r,a,s){var o=RO(r,Array.isArray(t)?t:[t]);wc[a]||(wc[a]=new WeakMap);var c=wc[a],f=[],d=new Set,m=new Set(o),p=function(b){!b||d.has(b)||(d.add(b),p(b.parentNode))};o.forEach(p);var g=function(b){!b||m.has(b)||Array.prototype.forEach.call(b.children,function(x){if(d.has(x))g(x);else try{var E=x.getAttribute(s),T=E!==null&&E!=="false",S=(Vi.get(x)||0)+1,w=(c.get(x)||0)+1;Vi.set(x,S),c.set(x,w),f.push(x),S===1&&T&&Sc.set(x,!0),w===1&&x.setAttribute(a,"true"),T||x.setAttribute(s,"true")}catch(C){console.error("aria-hidden: cannot operate on ",x,C)}})};return g(r),d.clear(),Zd++,function(){f.forEach(function(b){var x=Vi.get(b)-1,E=c.get(b)-1;Vi.set(b,x),c.set(b,E),x||(Sc.has(b)||b.removeAttribute(s),Sc.delete(b)),E||b.removeAttribute(a)}),Zd--,Zd||(Vi=new WeakMap,Vi=new WeakMap,Sc=new WeakMap,wc={})}},hS=function(t,r,a){a===void 0&&(a="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),o=EO(t);return o?(s.push.apply(s,Array.from(o.querySelectorAll("[aria-live]"))),TO(s,o,a,"aria-hidden")):function(){return null}},Ym="Dialog",[mS,fz]=qn(Ym),[CO,bn]=mS(Ym),pS=t=>{const{__scopeDialog:r,children:a,open:s,defaultOpen:o,onOpenChange:c,modal:f=!0}=t,d=y.useRef(null),m=y.useRef(null),[p=!1,g]=ei({prop:s,defaultProp:o,onChange:c});return v.jsx(CO,{scope:r,triggerRef:d,contentRef:m,contentId:yr(),titleId:yr(),descriptionId:yr(),open:p,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(b=>!b),[g]),modal:f,children:a})};pS.displayName=Ym;var gS="DialogTrigger",vS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(gS,a),c=Ue(r,o.triggerRef);return v.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qm(o.open),...s,ref:c,onClick:ve(t.onClick,o.onOpenToggle)})});vS.displayName=gS;var Gm="DialogPortal",[AO,yS]=mS(Gm,{forceMount:void 0}),bS=t=>{const{__scopeDialog:r,forceMount:a,children:s,container:o}=t,c=bn(Gm,r);return v.jsx(AO,{scope:r,forceMount:a,children:y.Children.map(s,f=>v.jsx(ln,{present:a||c.open,children:v.jsx(Ql,{asChild:!0,container:o,children:f})}))})};bS.displayName=Gm;var Hc="DialogOverlay",xS=y.forwardRef((t,r)=>{const a=yS(Hc,t.__scopeDialog),{forceMount:s=a.forceMount,...o}=t,c=bn(Hc,t.__scopeDialog);return c.modal?v.jsx(ln,{present:s||c.open,children:v.jsx(NO,{...o,ref:r})}):null});xS.displayName=Hc;var NO=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(Hc,a);return v.jsx(Vm,{as:sn,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(we.div,{"data-state":Qm(o.open),...s,ref:r,style:{pointerEvents:"auto",...s.style}})})}),ti="DialogContent",SS=y.forwardRef((t,r)=>{const a=yS(ti,t.__scopeDialog),{forceMount:s=a.forceMount,...o}=t,c=bn(ti,t.__scopeDialog);return v.jsx(ln,{present:s||c.open,children:c.modal?v.jsx(OO,{...o,ref:r}):v.jsx(MO,{...o,ref:r})})});SS.displayName=ti;var OO=y.forwardRef((t,r)=>{const a=bn(ti,t.__scopeDialog),s=y.useRef(null),o=Ue(r,a.contentRef,s);return y.useEffect(()=>{const c=s.current;if(c)return hS(c)},[]),v.jsx(wS,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(t.onCloseAutoFocus,c=>{var f;c.preventDefault(),(f=a.triggerRef.current)==null||f.focus()}),onPointerDownOutside:ve(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&c.preventDefault()}),onFocusOutside:ve(t.onFocusOutside,c=>c.preventDefault())})}),MO=y.forwardRef((t,r)=>{const a=bn(ti,t.__scopeDialog),s=y.useRef(!1),o=y.useRef(!1);return v.jsx(wS,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,d;(f=t.onCloseAutoFocus)==null||f.call(t,c),c.defaultPrevented||(s.current||(d=a.triggerRef.current)==null||d.focus(),c.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:c=>{var m,p;(m=t.onInteractOutside)==null||m.call(t,c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const f=c.target;((p=a.triggerRef.current)==null?void 0:p.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.current&&c.preventDefault()}})}),wS=y.forwardRef((t,r)=>{const{__scopeDialog:a,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:c,...f}=t,d=bn(ti,a),m=y.useRef(null),p=Ue(r,m);return aS(),v.jsxs(v.Fragment,{children:[v.jsx(Im,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:c,children:v.jsx(Fl,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Qm(d.open),...f,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(jO,{titleId:d.titleId}),v.jsx(_O,{contentRef:m,descriptionId:d.descriptionId})]})]})}),Fm="DialogTitle",ES=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(Fm,a);return v.jsx(we.h2,{id:o.titleId,...s,ref:r})});ES.displayName=Fm;var RS="DialogDescription",TS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(RS,a);return v.jsx(we.p,{id:o.descriptionId,...s,ref:r})});TS.displayName=RS;var CS="DialogClose",AS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(CS,a);return v.jsx(we.button,{type:"button",...s,ref:r,onClick:ve(t.onClick,()=>o.onOpenChange(!1))})});AS.displayName=CS;function Qm(t){return t?"open":"closed"}var NS="DialogTitleWarning",[dz,OS]=gN(NS,{contentName:ti,titleName:Fm,docsSlug:"dialog"}),jO=({titleId:t})=>{const r=OS(NS),a=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
90
+
91
+ If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
92
+
93
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},DO="DialogDescriptionWarning",_O=({contentRef:t,descriptionId:r})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OS(DO).contentName}}.`;return y.useEffect(()=>{var c;const o=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&o&&(document.getElementById(r)||console.warn(s))},[s,t,r]),null},MS=pS,LO=vS,jS=bS,eu=xS,tu=SS,nu=ES,ru=TS,DS=AS;/**
94
+ * @license lucide-react v0.469.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const zO=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_S=(...t)=>t.filter((r,a,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===a).join(" ").trim();/**
99
+ * @license lucide-react v0.469.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */var PO={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"};/**
104
+ * @license lucide-react v0.469.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const UO=y.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:f,...d},m)=>y.createElement("svg",{ref:m,...PO,width:r,height:r,stroke:t,strokeWidth:s?Number(a)*24/Number(r):a,className:_S("lucide",o),...d},[...f.map(([p,g])=>y.createElement(p,g)),...Array.isArray(c)?c:[c]]));/**
109
+ * @license lucide-react v0.469.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const Be=(t,r)=>{const a=y.forwardRef(({className:s,...o},c)=>y.createElement(UO,{ref:c,iconNode:r,className:_S(`lucide-${zO(t)}`,s),...o}));return a.displayName=`${t}`,a};/**
114
+ * @license lucide-react v0.469.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const kO=Be("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"}]]);/**
119
+ * @license lucide-react v0.469.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const $O=Be("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
124
+ * @license lucide-react v0.469.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const HO=Be("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
129
+ * @license lucide-react v0.469.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const Xm=Be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
134
+ * @license lucide-react v0.469.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const LS=Be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
139
+ * @license lucide-react v0.469.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const qO=Be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
144
+ * @license lucide-react v0.469.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const BO=Be("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
149
+ * @license lucide-react v0.469.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const zS=Be("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
154
+ * @license lucide-react v0.469.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const IO=Be("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
159
+ * @license lucide-react v0.469.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const VO=Be("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
164
+ * @license lucide-react v0.469.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const PS=Be("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"}]]);/**
169
+ * @license lucide-react v0.469.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const YO=Be("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
174
+ * @license lucide-react v0.469.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const GO=Be("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
179
+ * @license lucide-react v0.469.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const Xb=Be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
184
+ * @license lucide-react v0.469.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const FO=Be("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
189
+ * @license lucide-react v0.469.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const QO=Be("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
194
+ * @license lucide-react v0.469.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const XO=Be("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
199
+ * @license lucide-react v0.469.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const KO=Be("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
204
+ * @license lucide-react v0.469.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const WO=Be("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
209
+ * @license lucide-react v0.469.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const ZO=Be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
214
+ * @license lucide-react v0.469.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const JO=Be("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"}]]);/**
219
+ * @license lucide-react v0.469.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const e2=Be("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
224
+ * @license lucide-react v0.469.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const US=Be("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
229
+ * @license lucide-react v0.469.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const t2=Be("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
234
+ * @license lucide-react v0.469.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const n2=Be("Trash",[["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"}]]);/**
239
+ * @license lucide-react v0.469.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const Kb=Be("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
244
+ * @license lucide-react v0.469.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const r2=Be("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
249
+ * @license lucide-react v0.469.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const bs=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),a2=MS,i2=jS,kS=y.forwardRef(({className:t,...r},a)=>v.jsx(eu,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r,ref:a}));kS.displayName=eu.displayName;const s2=ma("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),$S=y.forwardRef(({side:t="right",className:r,children:a,...s},o)=>v.jsxs(i2,{children:[v.jsx(kS,{}),v.jsxs(tu,{ref:o,className:le(s2({side:t}),r),...s,children:[v.jsxs(DS,{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 data-[state=open]:bg-secondary",children:[v.jsx(bs,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));$S.displayName=tu.displayName;const l2=y.forwardRef(({className:t,...r},a)=>v.jsx(nu,{ref:a,className:le("text-lg font-semibold text-foreground",t),...r}));l2.displayName=nu.displayName;const o2=y.forwardRef(({className:t,...r},a)=>v.jsx(ru,{ref:a,className:le("text-sm text-muted-foreground",t),...r}));o2.displayName=ru.displayName;function Wb({className:t,...r}){return v.jsx("div",{className:le("animate-pulse rounded-md bg-primary/10",t),...r})}const c2=["top","right","bottom","left"],ua=Math.min,Bt=Math.max,qc=Math.round,Ec=Math.floor,Pn=t=>({x:t,y:t}),u2={left:"right",right:"left",bottom:"top",top:"bottom"},f2={start:"end",end:"start"};function im(t,r,a){return Bt(t,ua(r,a))}function Er(t,r){return typeof t=="function"?t(r):t}function Rr(t){return t.split("-")[0]}function xs(t){return t.split("-")[1]}function Km(t){return t==="x"?"y":"x"}function Wm(t){return t==="y"?"height":"width"}function fa(t){return["top","bottom"].includes(Rr(t))?"y":"x"}function Zm(t){return Km(fa(t))}function d2(t,r,a){a===void 0&&(a=!1);const s=xs(t),o=Zm(t),c=Wm(o);let f=o==="x"?s===(a?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(f=Bc(f)),[f,Bc(f)]}function h2(t){const r=Bc(t);return[sm(t),r,sm(r)]}function sm(t){return t.replace(/start|end/g,r=>f2[r])}function m2(t,r,a){const s=["left","right"],o=["right","left"],c=["top","bottom"],f=["bottom","top"];switch(t){case"top":case"bottom":return a?r?o:s:r?s:o;case"left":case"right":return r?c:f;default:return[]}}function p2(t,r,a,s){const o=xs(t);let c=m2(Rr(t),a==="start",s);return o&&(c=c.map(f=>f+"-"+o),r&&(c=c.concat(c.map(sm)))),c}function Bc(t){return t.replace(/left|right|bottom|top/g,r=>u2[r])}function g2(t){return{top:0,right:0,bottom:0,left:0,...t}}function HS(t){return typeof t!="number"?g2(t):{top:t,right:t,bottom:t,left:t}}function Ic(t){const{x:r,y:a,width:s,height:o}=t;return{width:s,height:o,top:a,left:r,right:r+s,bottom:a+o,x:r,y:a}}function Zb(t,r,a){let{reference:s,floating:o}=t;const c=fa(r),f=Zm(r),d=Wm(f),m=Rr(r),p=c==="y",g=s.x+s.width/2-o.width/2,b=s.y+s.height/2-o.height/2,x=s[d]/2-o[d]/2;let E;switch(m){case"top":E={x:g,y:s.y-o.height};break;case"bottom":E={x:g,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:b};break;case"left":E={x:s.x-o.width,y:b};break;default:E={x:s.x,y:s.y}}switch(xs(r)){case"start":E[f]-=x*(a&&p?-1:1);break;case"end":E[f]+=x*(a&&p?-1:1);break}return E}const v2=async(t,r,a)=>{const{placement:s="bottom",strategy:o="absolute",middleware:c=[],platform:f}=a,d=c.filter(Boolean),m=await(f.isRTL==null?void 0:f.isRTL(r));let p=await f.getElementRects({reference:t,floating:r,strategy:o}),{x:g,y:b}=Zb(p,s,m),x=s,E={},T=0;for(let S=0;S<d.length;S++){const{name:w,fn:C}=d[S],{x:N,y:O,data:_,reset:L}=await C({x:g,y:b,initialPlacement:s,placement:x,strategy:o,middlewareData:E,rects:p,platform:f,elements:{reference:t,floating:r}});g=N??g,b=O??b,E={...E,[w]:{...E[w],..._}},L&&T<=50&&(T++,typeof L=="object"&&(L.placement&&(x=L.placement),L.rects&&(p=L.rects===!0?await f.getElementRects({reference:t,floating:r,strategy:o}):L.rects),{x:g,y:b}=Zb(p,x,m)),S=-1)}return{x:g,y:b,placement:x,strategy:o,middlewareData:E}};async function Ul(t,r){var a;r===void 0&&(r={});const{x:s,y:o,platform:c,rects:f,elements:d,strategy:m}=t,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:x=!1,padding:E=0}=Er(r,t),T=HS(E),w=d[x?b==="floating"?"reference":"floating":b],C=Ic(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(w)))==null||a?w:w.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(d.floating)),boundary:p,rootBoundary:g,strategy:m})),N=b==="floating"?{x:s,y:o,width:f.floating.width,height:f.floating.height}:f.reference,O=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d.floating)),_=await(c.isElement==null?void 0:c.isElement(O))?await(c.getScale==null?void 0:c.getScale(O))||{x:1,y:1}:{x:1,y:1},L=Ic(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:O,strategy:m}):N);return{top:(C.top-L.top+T.top)/_.y,bottom:(L.bottom-C.bottom+T.bottom)/_.y,left:(C.left-L.left+T.left)/_.x,right:(L.right-C.right+T.right)/_.x}}const y2=t=>({name:"arrow",options:t,async fn(r){const{x:a,y:s,placement:o,rects:c,platform:f,elements:d,middlewareData:m}=r,{element:p,padding:g=0}=Er(t,r)||{};if(p==null)return{};const b=HS(g),x={x:a,y:s},E=Zm(o),T=Wm(E),S=await f.getDimensions(p),w=E==="y",C=w?"top":"left",N=w?"bottom":"right",O=w?"clientHeight":"clientWidth",_=c.reference[T]+c.reference[E]-x[E]-c.floating[T],L=x[E]-c.reference[E],k=await(f.getOffsetParent==null?void 0:f.getOffsetParent(p));let V=k?k[O]:0;(!V||!await(f.isElement==null?void 0:f.isElement(k)))&&(V=d.floating[O]||c.floating[T]);const $=_/2-L/2,U=V/2-S[T]/2-1,K=ua(b[C],U),te=ua(b[N],U),se=K,de=V-S[T]-te,q=V/2-S[T]/2+$,H=im(se,q,de),j=!m.arrow&&xs(o)!=null&&q!==H&&c.reference[T]/2-(q<se?K:te)-S[T]/2<0,B=j?q<se?q-se:q-de:0;return{[E]:x[E]+B,data:{[E]:H,centerOffset:q-H-B,...j&&{alignmentOffset:B}},reset:j}}}),b2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var a,s;const{placement:o,middlewareData:c,rects:f,initialPlacement:d,platform:m,elements:p}=r,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:x,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:S=!0,...w}=Er(t,r);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=Rr(o),N=fa(d),O=Rr(d)===d,_=await(m.isRTL==null?void 0:m.isRTL(p.floating)),L=x||(O||!S?[Bc(d)]:h2(d)),k=T!=="none";!x&&k&&L.push(...p2(d,S,T,_));const V=[d,...L],$=await Ul(r,w),U=[];let K=((s=c.flip)==null?void 0:s.overflows)||[];if(g&&U.push($[C]),b){const q=d2(o,f,_);U.push($[q[0]],$[q[1]])}if(K=[...K,{placement:o,overflows:U}],!U.every(q=>q<=0)){var te,se;const q=(((te=c.flip)==null?void 0:te.index)||0)+1,H=V[q];if(H)return{data:{index:q,overflows:K},reset:{placement:H}};let j=(se=K.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:se.placement;if(!j)switch(E){case"bestFit":{var de;const B=(de=K.filter(z=>{if(k){const Q=fa(z.placement);return Q===N||Q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((z,Q)=>z[1]-Q[1])[0])==null?void 0:de[0];B&&(j=B);break}case"initialPlacement":j=d;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function Jb(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function e0(t){return c2.some(r=>t[r]>=0)}const x2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:a}=r,{strategy:s="referenceHidden",...o}=Er(t,r);switch(s){case"referenceHidden":{const c=await Ul(r,{...o,elementContext:"reference"}),f=Jb(c,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:e0(f)}}}case"escaped":{const c=await Ul(r,{...o,altBoundary:!0}),f=Jb(c,a.floating);return{data:{escapedOffsets:f,escaped:e0(f)}}}default:return{}}}}};async function S2(t,r){const{placement:a,platform:s,elements:o}=t,c=await(s.isRTL==null?void 0:s.isRTL(o.floating)),f=Rr(a),d=xs(a),m=fa(a)==="y",p=["left","top"].includes(f)?-1:1,g=c&&m?-1:1,b=Er(r,t);let{mainAxis:x,crossAxis:E,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof T=="number"&&(E=d==="end"?T*-1:T),m?{x:E*g,y:x*p}:{x:x*p,y:E*g}}const w2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var a,s;const{x:o,y:c,placement:f,middlewareData:d}=r,m=await S2(r,t);return f===((a=d.offset)==null?void 0:a.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:o+m.x,y:c+m.y,data:{...m,placement:f}}}}},E2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:a,y:s,placement:o}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:d={fn:w=>{let{x:C,y:N}=w;return{x:C,y:N}}},...m}=Er(t,r),p={x:a,y:s},g=await Ul(r,m),b=fa(Rr(o)),x=Km(b);let E=p[x],T=p[b];if(c){const w=x==="y"?"top":"left",C=x==="y"?"bottom":"right",N=E+g[w],O=E-g[C];E=im(N,E,O)}if(f){const w=b==="y"?"top":"left",C=b==="y"?"bottom":"right",N=T+g[w],O=T-g[C];T=im(N,T,O)}const S=d.fn({...r,[x]:E,[b]:T});return{...S,data:{x:S.x-a,y:S.y-s,enabled:{[x]:c,[b]:f}}}}}},R2=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:a,y:s,placement:o,rects:c,middlewareData:f}=r,{offset:d=0,mainAxis:m=!0,crossAxis:p=!0}=Er(t,r),g={x:a,y:s},b=fa(o),x=Km(b);let E=g[x],T=g[b];const S=Er(d,r),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const O=x==="y"?"height":"width",_=c.reference[x]-c.floating[O]+w.mainAxis,L=c.reference[x]+c.reference[O]-w.mainAxis;E<_?E=_:E>L&&(E=L)}if(p){var C,N;const O=x==="y"?"width":"height",_=["top","left"].includes(Rr(o)),L=c.reference[b]-c.floating[O]+(_&&((C=f.offset)==null?void 0:C[b])||0)+(_?0:w.crossAxis),k=c.reference[b]+c.reference[O]+(_?0:((N=f.offset)==null?void 0:N[b])||0)-(_?w.crossAxis:0);T<L?T=L:T>k&&(T=k)}return{[x]:E,[b]:T}}}},T2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var a,s;const{placement:o,rects:c,platform:f,elements:d}=r,{apply:m=()=>{},...p}=Er(t,r),g=await Ul(r,p),b=Rr(o),x=xs(o),E=fa(o)==="y",{width:T,height:S}=c.floating;let w,C;b==="top"||b==="bottom"?(w=b,C=x===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(C=b,w=x==="end"?"top":"bottom");const N=S-g.top-g.bottom,O=T-g.left-g.right,_=ua(S-g[w],N),L=ua(T-g[C],O),k=!r.middlewareData.shift;let V=_,$=L;if((a=r.middlewareData.shift)!=null&&a.enabled.x&&($=O),(s=r.middlewareData.shift)!=null&&s.enabled.y&&(V=N),k&&!x){const K=Bt(g.left,0),te=Bt(g.right,0),se=Bt(g.top,0),de=Bt(g.bottom,0);E?$=T-2*(K!==0||te!==0?K+te:Bt(g.left,g.right)):V=S-2*(se!==0||de!==0?se+de:Bt(g.top,g.bottom))}await m({...r,availableWidth:$,availableHeight:V});const U=await f.getDimensions(d.floating);return T!==U.width||S!==U.height?{reset:{rects:!0}}:{}}}};function au(){return typeof window<"u"}function Ss(t){return qS(t)?(t.nodeName||"").toLowerCase():"#document"}function It(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function Bn(t){var r;return(r=(qS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function qS(t){return au()?t instanceof Node||t instanceof It(t).Node:!1}function vn(t){return au()?t instanceof Element||t instanceof It(t).Element:!1}function $n(t){return au()?t instanceof HTMLElement||t instanceof It(t).HTMLElement:!1}function t0(t){return!au()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof It(t).ShadowRoot}function Xl(t){const{overflow:r,overflowX:a,overflowY:s,display:o}=yn(t);return/auto|scroll|overlay|hidden|clip/.test(r+s+a)&&!["inline","contents"].includes(o)}function C2(t){return["table","td","th"].includes(Ss(t))}function iu(t){return[":popover-open",":modal"].some(r=>{try{return t.matches(r)}catch{return!1}})}function Jm(t){const r=ep(),a=vn(t)?yn(t):t;return["transform","translate","scale","rotate","perspective"].some(s=>a[s]?a[s]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!r&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!r&&(a.filter?a.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(a.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(a.contain||"").includes(s))}function A2(t){let r=da(t);for(;$n(r)&&!hs(r);){if(Jm(r))return r;if(iu(r))return null;r=da(r)}return null}function ep(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hs(t){return["html","body","#document"].includes(Ss(t))}function yn(t){return It(t).getComputedStyle(t)}function su(t){return vn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function da(t){if(Ss(t)==="html")return t;const r=t.assignedSlot||t.parentNode||t0(t)&&t.host||Bn(t);return t0(r)?r.host:r}function BS(t){const r=da(t);return hs(r)?t.ownerDocument?t.ownerDocument.body:t.body:$n(r)&&Xl(r)?r:BS(r)}function kl(t,r,a){var s;r===void 0&&(r=[]),a===void 0&&(a=!0);const o=BS(t),c=o===((s=t.ownerDocument)==null?void 0:s.body),f=It(o);if(c){const d=lm(f);return r.concat(f,f.visualViewport||[],Xl(o)?o:[],d&&a?kl(d):[])}return r.concat(o,kl(o,[],a))}function lm(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function IS(t){const r=yn(t);let a=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const o=$n(t),c=o?t.offsetWidth:a,f=o?t.offsetHeight:s,d=qc(a)!==c||qc(s)!==f;return d&&(a=c,s=f),{width:a,height:s,$:d}}function tp(t){return vn(t)?t:t.contextElement}function Wi(t){const r=tp(t);if(!$n(r))return Pn(1);const a=r.getBoundingClientRect(),{width:s,height:o,$:c}=IS(r);let f=(c?qc(a.width):a.width)/s,d=(c?qc(a.height):a.height)/o;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const N2=Pn(0);function VS(t){const r=It(t);return!ep()||!r.visualViewport?N2:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function O2(t,r,a){return r===void 0&&(r=!1),!a||r&&a!==It(t)?!1:r}function ni(t,r,a,s){r===void 0&&(r=!1),a===void 0&&(a=!1);const o=t.getBoundingClientRect(),c=tp(t);let f=Pn(1);r&&(s?vn(s)&&(f=Wi(s)):f=Wi(t));const d=O2(c,a,s)?VS(c):Pn(0);let m=(o.left+d.x)/f.x,p=(o.top+d.y)/f.y,g=o.width/f.x,b=o.height/f.y;if(c){const x=It(c),E=s&&vn(s)?It(s):s;let T=x,S=lm(T);for(;S&&s&&E!==T;){const w=Wi(S),C=S.getBoundingClientRect(),N=yn(S),O=C.left+(S.clientLeft+parseFloat(N.paddingLeft))*w.x,_=C.top+(S.clientTop+parseFloat(N.paddingTop))*w.y;m*=w.x,p*=w.y,g*=w.x,b*=w.y,m+=O,p+=_,T=It(S),S=lm(T)}}return Ic({width:g,height:b,x:m,y:p})}function np(t,r){const a=su(t).scrollLeft;return r?r.left+a:ni(Bn(t)).left+a}function YS(t,r,a){a===void 0&&(a=!1);const s=t.getBoundingClientRect(),o=s.left+r.scrollLeft-(a?0:np(t,s)),c=s.top+r.scrollTop;return{x:o,y:c}}function M2(t){let{elements:r,rect:a,offsetParent:s,strategy:o}=t;const c=o==="fixed",f=Bn(s),d=r?iu(r.floating):!1;if(s===f||d&&c)return a;let m={scrollLeft:0,scrollTop:0},p=Pn(1);const g=Pn(0),b=$n(s);if((b||!b&&!c)&&((Ss(s)!=="body"||Xl(f))&&(m=su(s)),$n(s))){const E=ni(s);p=Wi(s),g.x=E.x+s.clientLeft,g.y=E.y+s.clientTop}const x=f&&!b&&!c?YS(f,m,!0):Pn(0);return{width:a.width*p.x,height:a.height*p.y,x:a.x*p.x-m.scrollLeft*p.x+g.x+x.x,y:a.y*p.y-m.scrollTop*p.y+g.y+x.y}}function j2(t){return Array.from(t.getClientRects())}function D2(t){const r=Bn(t),a=su(t),s=t.ownerDocument.body,o=Bt(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),c=Bt(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+np(t);const d=-a.scrollTop;return yn(s).direction==="rtl"&&(f+=Bt(r.clientWidth,s.clientWidth)-o),{width:o,height:c,x:f,y:d}}function _2(t,r){const a=It(t),s=Bn(t),o=a.visualViewport;let c=s.clientWidth,f=s.clientHeight,d=0,m=0;if(o){c=o.width,f=o.height;const p=ep();(!p||p&&r==="fixed")&&(d=o.offsetLeft,m=o.offsetTop)}return{width:c,height:f,x:d,y:m}}function L2(t,r){const a=ni(t,!0,r==="fixed"),s=a.top+t.clientTop,o=a.left+t.clientLeft,c=$n(t)?Wi(t):Pn(1),f=t.clientWidth*c.x,d=t.clientHeight*c.y,m=o*c.x,p=s*c.y;return{width:f,height:d,x:m,y:p}}function n0(t,r,a){let s;if(r==="viewport")s=_2(t,a);else if(r==="document")s=D2(Bn(t));else if(vn(r))s=L2(r,a);else{const o=VS(t);s={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Ic(s)}function GS(t,r){const a=da(t);return a===r||!vn(a)||hs(a)?!1:yn(a).position==="fixed"||GS(a,r)}function z2(t,r){const a=r.get(t);if(a)return a;let s=kl(t,[],!1).filter(d=>vn(d)&&Ss(d)!=="body"),o=null;const c=yn(t).position==="fixed";let f=c?da(t):t;for(;vn(f)&&!hs(f);){const d=yn(f),m=Jm(f);!m&&d.position==="fixed"&&(o=null),(c?!m&&!o:!m&&d.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Xl(f)&&!m&&GS(t,f))?s=s.filter(g=>g!==f):o=d,f=da(f)}return r.set(t,s),s}function P2(t){let{element:r,boundary:a,rootBoundary:s,strategy:o}=t;const f=[...a==="clippingAncestors"?iu(r)?[]:z2(r,this._c):[].concat(a),s],d=f[0],m=f.reduce((p,g)=>{const b=n0(r,g,o);return p.top=Bt(b.top,p.top),p.right=ua(b.right,p.right),p.bottom=ua(b.bottom,p.bottom),p.left=Bt(b.left,p.left),p},n0(r,d,o));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function U2(t){const{width:r,height:a}=IS(t);return{width:r,height:a}}function k2(t,r,a){const s=$n(r),o=Bn(r),c=a==="fixed",f=ni(t,!0,c,r);let d={scrollLeft:0,scrollTop:0};const m=Pn(0);if(s||!s&&!c)if((Ss(r)!=="body"||Xl(o))&&(d=su(r)),s){const x=ni(r,!0,c,r);m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}else o&&(m.x=np(o));const p=o&&!s&&!c?YS(o,d):Pn(0),g=f.left+d.scrollLeft-m.x-p.x,b=f.top+d.scrollTop-m.y-p.y;return{x:g,y:b,width:f.width,height:f.height}}function Jd(t){return yn(t).position==="static"}function r0(t,r){if(!$n(t)||yn(t).position==="fixed")return null;if(r)return r(t);let a=t.offsetParent;return Bn(t)===a&&(a=a.ownerDocument.body),a}function FS(t,r){const a=It(t);if(iu(t))return a;if(!$n(t)){let o=da(t);for(;o&&!hs(o);){if(vn(o)&&!Jd(o))return o;o=da(o)}return a}let s=r0(t,r);for(;s&&C2(s)&&Jd(s);)s=r0(s,r);return s&&hs(s)&&Jd(s)&&!Jm(s)?a:s||A2(t)||a}const $2=async function(t){const r=this.getOffsetParent||FS,a=this.getDimensions,s=await a(t.floating);return{reference:k2(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function H2(t){return yn(t).direction==="rtl"}const q2={convertOffsetParentRelativeRectToViewportRelativeRect:M2,getDocumentElement:Bn,getClippingRect:P2,getOffsetParent:FS,getElementRects:$2,getClientRects:j2,getDimensions:U2,getScale:Wi,isElement:vn,isRTL:H2};function QS(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function B2(t,r){let a=null,s;const o=Bn(t);function c(){var d;clearTimeout(s),(d=a)==null||d.disconnect(),a=null}function f(d,m){d===void 0&&(d=!1),m===void 0&&(m=1),c();const p=t.getBoundingClientRect(),{left:g,top:b,width:x,height:E}=p;if(d||r(),!x||!E)return;const T=Ec(b),S=Ec(o.clientWidth-(g+x)),w=Ec(o.clientHeight-(b+E)),C=Ec(g),O={rootMargin:-T+"px "+-S+"px "+-w+"px "+-C+"px",threshold:Bt(0,ua(1,m))||1};let _=!0;function L(k){const V=k[0].intersectionRatio;if(V!==m){if(!_)return f();V?f(!1,V):s=setTimeout(()=>{f(!1,1e-7)},1e3)}V===1&&!QS(p,t.getBoundingClientRect())&&f(),_=!1}try{a=new IntersectionObserver(L,{...O,root:o.ownerDocument})}catch{a=new IntersectionObserver(L,O)}a.observe(t)}return f(!0),c}function I2(t,r,a,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:m=!1}=s,p=tp(t),g=o||c?[...p?kl(p):[],...kl(r)]:[];g.forEach(C=>{o&&C.addEventListener("scroll",a,{passive:!0}),c&&C.addEventListener("resize",a)});const b=p&&d?B2(p,a):null;let x=-1,E=null;f&&(E=new ResizeObserver(C=>{let[N]=C;N&&N.target===p&&E&&(E.unobserve(r),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=E)==null||O.observe(r)})),a()}),p&&!m&&E.observe(p),E.observe(r));let T,S=m?ni(t):null;m&&w();function w(){const C=ni(t);S&&!QS(S,C)&&a(),S=C,T=requestAnimationFrame(w)}return a(),()=>{var C;g.forEach(N=>{o&&N.removeEventListener("scroll",a),c&&N.removeEventListener("resize",a)}),b==null||b(),(C=E)==null||C.disconnect(),E=null,m&&cancelAnimationFrame(T)}}const V2=w2,Y2=E2,G2=b2,F2=T2,Q2=x2,a0=y2,X2=R2,K2=(t,r,a)=>{const s=new Map,o={platform:q2,...a},c={...o.platform,_c:s};return v2(t,r,{...o,platform:c})};var _c=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Vc(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let a,s,o;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==r.length)return!1;for(s=a;s--!==0;)if(!Vc(t[s],r[s]))return!1;return!0}if(o=Object.keys(t),a=o.length,a!==Object.keys(r).length)return!1;for(s=a;s--!==0;)if(!{}.hasOwnProperty.call(r,o[s]))return!1;for(s=a;s--!==0;){const c=o[s];if(!(c==="_owner"&&t.$$typeof)&&!Vc(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function XS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function i0(t,r){const a=XS(t);return Math.round(r*a)/a}function eh(t){const r=y.useRef(t);return _c(()=>{r.current=t}),r}function W2(t){t===void 0&&(t={});const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:o,elements:{reference:c,floating:f}={},transform:d=!0,whileElementsMounted:m,open:p}=t,[g,b]=y.useState({x:0,y:0,strategy:a,placement:r,middlewareData:{},isPositioned:!1}),[x,E]=y.useState(s);Vc(x,s)||E(s);const[T,S]=y.useState(null),[w,C]=y.useState(null),N=y.useCallback(z=>{z!==k.current&&(k.current=z,S(z))},[]),O=y.useCallback(z=>{z!==V.current&&(V.current=z,C(z))},[]),_=c||T,L=f||w,k=y.useRef(null),V=y.useRef(null),$=y.useRef(g),U=m!=null,K=eh(m),te=eh(o),se=eh(p),de=y.useCallback(()=>{if(!k.current||!V.current)return;const z={placement:r,strategy:a,middleware:x};te.current&&(z.platform=te.current),K2(k.current,V.current,z).then(Q=>{const M={...Q,isPositioned:se.current!==!1};q.current&&!Vc($.current,M)&&($.current=M,ys.flushSync(()=>{b(M)}))})},[x,r,a,te,se]);_c(()=>{p===!1&&$.current.isPositioned&&($.current.isPositioned=!1,b(z=>({...z,isPositioned:!1})))},[p]);const q=y.useRef(!1);_c(()=>(q.current=!0,()=>{q.current=!1}),[]),_c(()=>{if(_&&(k.current=_),L&&(V.current=L),_&&L){if(K.current)return K.current(_,L,de);de()}},[_,L,de,K,U]);const H=y.useMemo(()=>({reference:k,floating:V,setReference:N,setFloating:O}),[N,O]),j=y.useMemo(()=>({reference:_,floating:L}),[_,L]),B=y.useMemo(()=>{const z={position:a,left:0,top:0};if(!j.floating)return z;const Q=i0(j.floating,g.x),M=i0(j.floating,g.y);return d?{...z,transform:"translate("+Q+"px, "+M+"px)",...XS(j.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Q,top:M}},[a,d,j.floating,g.x,g.y]);return y.useMemo(()=>({...g,update:de,refs:H,elements:j,floatingStyles:B}),[g,de,H,j,B])}const Z2=t=>{function r(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){const{element:s,padding:o}=typeof t=="function"?t(a):t;return s&&r(s)?s.current!=null?a0({element:s.current,padding:o}).fn(a):{}:s?a0({element:s,padding:o}).fn(a):{}}}},J2=(t,r)=>({...V2(t),options:[t,r]}),eM=(t,r)=>({...Y2(t),options:[t,r]}),tM=(t,r)=>({...X2(t),options:[t,r]}),nM=(t,r)=>({...G2(t),options:[t,r]}),rM=(t,r)=>({...F2(t),options:[t,r]}),aM=(t,r)=>({...Q2(t),options:[t,r]}),iM=(t,r)=>({...Z2(t),options:[t,r]});var sM="Arrow",KS=y.forwardRef((t,r)=>{const{children:a,width:s=10,height:o=5,...c}=t;return v.jsx(we.svg,{...c,ref:r,width:s,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?a:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});KS.displayName=sM;var lM=KS;function oM(t){const[r,a]=y.useState(void 0);return ft(()=>{if(t){a({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let f,d;if("borderBoxSize"in c){const m=c.borderBoxSize,p=Array.isArray(m)?m[0]:m;f=p.inlineSize,d=p.blockSize}else f=t.offsetWidth,d=t.offsetHeight;a({width:f,height:d})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else a(void 0)},[t]),r}var rp="Popper",[WS,lu]=qn(rp),[cM,ZS]=WS(rp),JS=t=>{const{__scopePopper:r,children:a}=t,[s,o]=y.useState(null);return v.jsx(cM,{scope:r,anchor:s,onAnchorChange:o,children:a})};JS.displayName=rp;var ew="PopperAnchor",tw=y.forwardRef((t,r)=>{const{__scopePopper:a,virtualRef:s,...o}=t,c=ZS(ew,a),f=y.useRef(null),d=Ue(r,f);return y.useEffect(()=>{c.onAnchorChange((s==null?void 0:s.current)||f.current)}),s?null:v.jsx(we.div,{...o,ref:d})});tw.displayName=ew;var ap="PopperContent",[uM,fM]=WS(ap),nw=y.forwardRef((t,r)=>{var ue,me,Ee,fe,Se,Ae;const{__scopePopper:a,side:s="bottom",sideOffset:o=0,align:c="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:E="optimized",onPlaced:T,...S}=t,w=ZS(ap,a),[C,N]=y.useState(null),O=Ue(r,Ie=>N(Ie)),[_,L]=y.useState(null),k=oM(_),V=(k==null?void 0:k.width)??0,$=(k==null?void 0:k.height)??0,U=s+(c!=="center"?"-"+c:""),K=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},te=Array.isArray(p)?p:[p],se=te.length>0,de={padding:K,boundary:te.filter(hM),altBoundary:se},{refs:q,floatingStyles:H,placement:j,isPositioned:B,middlewareData:z}=W2({strategy:"fixed",placement:U,whileElementsMounted:(...Ie)=>I2(...Ie,{animationFrame:E==="always"}),elements:{reference:w.anchor},middleware:[J2({mainAxis:o+$,alignmentAxis:f}),m&&eM({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?tM():void 0,...de}),m&&nM({...de}),rM({...de,apply:({elements:Ie,rects:Et,availableWidth:Rn,availableHeight:Vt})=>{const{width:Fn,height:si}=Et.reference,Cr=Ie.floating.style;Cr.setProperty("--radix-popper-available-width",`${Rn}px`),Cr.setProperty("--radix-popper-available-height",`${Vt}px`),Cr.setProperty("--radix-popper-anchor-width",`${Fn}px`),Cr.setProperty("--radix-popper-anchor-height",`${si}px`)}}),_&&iM({element:_,padding:d}),mM({arrowWidth:V,arrowHeight:$}),x&&aM({strategy:"referenceHidden",...de})]}),[Q,M]=iw(j),G=nt(T);ft(()=>{B&&(G==null||G())},[B,G]);const ee=(ue=z.arrow)==null?void 0:ue.x,ae=(me=z.arrow)==null?void 0:me.y,re=((Ee=z.arrow)==null?void 0:Ee.centerOffset)!==0,[oe,pe]=y.useState();return ft(()=>{C&&pe(window.getComputedStyle(C).zIndex)},[C]),v.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(fe=z.transformOrigin)==null?void 0:fe.x,(Se=z.transformOrigin)==null?void 0:Se.y].join(" "),...((Ae=z.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:v.jsx(uM,{scope:a,placedSide:Q,onArrowChange:L,arrowX:ee,arrowY:ae,shouldHideArrow:re,children:v.jsx(we.div,{"data-side":Q,"data-align":M,...S,ref:O,style:{...S.style,animation:B?void 0:"none"}})})})});nw.displayName=ap;var rw="PopperArrow",dM={top:"bottom",right:"left",bottom:"top",left:"right"},aw=y.forwardRef(function(r,a){const{__scopePopper:s,...o}=r,c=fM(rw,s),f=dM[c.placedSide];return v.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:v.jsx(lM,{...o,ref:a,style:{...o.style,display:"block"}})})});aw.displayName=rw;function hM(t){return t!==null}var mM=t=>({name:"transformOrigin",options:t,fn(r){var w,C,N;const{placement:a,rects:s,middlewareData:o}=r,f=((w=o.arrow)==null?void 0:w.centerOffset)!==0,d=f?0:t.arrowWidth,m=f?0:t.arrowHeight,[p,g]=iw(a),b={start:"0%",center:"50%",end:"100%"}[g],x=(((C=o.arrow)==null?void 0:C.x)??0)+d/2,E=(((N=o.arrow)==null?void 0:N.y)??0)+m/2;let T="",S="";return p==="bottom"?(T=f?b:`${x}px`,S=`${-m}px`):p==="top"?(T=f?b:`${x}px`,S=`${s.floating.height+m}px`):p==="right"?(T=`${-m}px`,S=f?b:`${E}px`):p==="left"&&(T=`${s.floating.width+m}px`,S=f?b:`${E}px`),{data:{x:T,y:S}}}});function iw(t){const[r,a="center"]=t.split("-");return[r,a]}var sw=JS,lw=tw,ow=nw,cw=aw,pM="VisuallyHidden",Kl=y.forwardRef((t,r)=>v.jsx(we.span,{...t,ref:r,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));Kl.displayName=pM;var gM=Kl,[ou,hz]=qn("Tooltip",[lu]),cu=lu(),uw="TooltipProvider",vM=700,om="tooltip.open",[yM,ip]=ou(uw),fw=t=>{const{__scopeTooltip:r,delayDuration:a=vM,skipDelayDuration:s=300,disableHoverableContent:o=!1,children:c}=t,[f,d]=y.useState(!0),m=y.useRef(!1),p=y.useRef(0);return y.useEffect(()=>{const g=p.current;return()=>window.clearTimeout(g)},[]),v.jsx(yM,{scope:r,isOpenDelayed:f,delayDuration:a,onOpen:y.useCallback(()=>{window.clearTimeout(p.current),d(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>d(!0),s)},[s]),isPointerInTransitRef:m,onPointerInTransitChange:y.useCallback(g=>{m.current=g},[]),disableHoverableContent:o,children:c})};fw.displayName=uw;var uu="Tooltip",[bM,Wl]=ou(uu),dw=t=>{const{__scopeTooltip:r,children:a,open:s,defaultOpen:o=!1,onOpenChange:c,disableHoverableContent:f,delayDuration:d}=t,m=ip(uu,t.__scopeTooltip),p=cu(r),[g,b]=y.useState(null),x=yr(),E=y.useRef(0),T=f??m.disableHoverableContent,S=d??m.delayDuration,w=y.useRef(!1),[C=!1,N]=ei({prop:s,defaultProp:o,onChange:V=>{V?(m.onOpen(),document.dispatchEvent(new CustomEvent(om))):m.onClose(),c==null||c(V)}}),O=y.useMemo(()=>C?w.current?"delayed-open":"instant-open":"closed",[C]),_=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,w.current=!1,N(!0)},[N]),L=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,N(!1)},[N]),k=y.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{w.current=!0,N(!0),E.current=0},S)},[S,N]);return y.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]),v.jsx(sw,{...p,children:v.jsx(bM,{scope:r,contentId:x,open:C,stateAttribute:O,trigger:g,onTriggerChange:b,onTriggerEnter:y.useCallback(()=>{m.isOpenDelayed?k():_()},[m.isOpenDelayed,k,_]),onTriggerLeave:y.useCallback(()=>{T?L():(window.clearTimeout(E.current),E.current=0)},[L,T]),onOpen:_,onClose:L,disableHoverableContent:T,children:a})})};dw.displayName=uu;var cm="TooltipTrigger",hw=y.forwardRef((t,r)=>{const{__scopeTooltip:a,...s}=t,o=Wl(cm,a),c=ip(cm,a),f=cu(a),d=y.useRef(null),m=Ue(r,d,o.onTriggerChange),p=y.useRef(!1),g=y.useRef(!1),b=y.useCallback(()=>p.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),v.jsx(lw,{asChild:!0,...f,children:v.jsx(we.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...s,ref:m,onPointerMove:ve(t.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!c.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:ve(t.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:ve(t.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:ve(t.onFocus,()=>{p.current||o.onOpen()}),onBlur:ve(t.onBlur,o.onClose),onClick:ve(t.onClick,o.onClose)})})});hw.displayName=cm;var sp="TooltipPortal",[xM,SM]=ou(sp,{forceMount:void 0}),mw=t=>{const{__scopeTooltip:r,forceMount:a,children:s,container:o}=t,c=Wl(sp,r);return v.jsx(xM,{scope:r,forceMount:a,children:v.jsx(ln,{present:a||c.open,children:v.jsx(Ql,{asChild:!0,container:o,children:s})})})};mw.displayName=sp;var ms="TooltipContent",pw=y.forwardRef((t,r)=>{const a=SM(ms,t.__scopeTooltip),{forceMount:s=a.forceMount,side:o="top",...c}=t,f=Wl(ms,t.__scopeTooltip);return v.jsx(ln,{present:s||f.open,children:f.disableHoverableContent?v.jsx(gw,{side:o,...c,ref:r}):v.jsx(wM,{side:o,...c,ref:r})})}),wM=y.forwardRef((t,r)=>{const a=Wl(ms,t.__scopeTooltip),s=ip(ms,t.__scopeTooltip),o=y.useRef(null),c=Ue(r,o),[f,d]=y.useState(null),{trigger:m,onClose:p}=a,g=o.current,{onPointerInTransitChange:b}=s,x=y.useCallback(()=>{d(null),b(!1)},[b]),E=y.useCallback((T,S)=>{const w=T.currentTarget,C={x:T.clientX,y:T.clientY},N=CM(C,w.getBoundingClientRect()),O=AM(C,N),_=NM(S.getBoundingClientRect()),L=MM([...O,..._]);d(L),b(!0)},[b]);return y.useEffect(()=>()=>x(),[x]),y.useEffect(()=>{if(m&&g){const T=w=>E(w,g),S=w=>E(w,m);return m.addEventListener("pointerleave",T),g.addEventListener("pointerleave",S),()=>{m.removeEventListener("pointerleave",T),g.removeEventListener("pointerleave",S)}}},[m,g,E,x]),y.useEffect(()=>{if(f){const T=S=>{const w=S.target,C={x:S.clientX,y:S.clientY},N=(m==null?void 0:m.contains(w))||(g==null?void 0:g.contains(w)),O=!OM(C,f);N?x():O&&(x(),p())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[m,g,f,p,x]),v.jsx(gw,{...t,ref:c})}),[EM,RM]=ou(uu,{isInside:!1}),gw=y.forwardRef((t,r)=>{const{__scopeTooltip:a,children:s,"aria-label":o,onEscapeKeyDown:c,onPointerDownOutside:f,...d}=t,m=Wl(ms,a),p=cu(a),{onClose:g}=m;return y.useEffect(()=>(document.addEventListener(om,g),()=>document.removeEventListener(om,g)),[g]),y.useEffect(()=>{if(m.trigger){const b=x=>{const E=x.target;E!=null&&E.contains(m.trigger)&&g()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[m.trigger,g]),v.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:b=>b.preventDefault(),onDismiss:g,children:v.jsxs(ow,{"data-state":m.stateAttribute,...p,...d,ref:r,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(qx,{children:s}),v.jsx(EM,{scope:a,isInside:!0,children:v.jsx(gM,{id:m.contentId,role:"tooltip",children:o||s})})]})})});pw.displayName=ms;var vw="TooltipArrow",TM=y.forwardRef((t,r)=>{const{__scopeTooltip:a,...s}=t,o=cu(a);return RM(vw,a).isInside?null:v.jsx(cw,{...o,...s,ref:r})});TM.displayName=vw;function CM(t,r){const a=Math.abs(r.top-t.y),s=Math.abs(r.bottom-t.y),o=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(a,s,o,c)){case c:return"left";case o:return"right";case a:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function AM(t,r,a=5){const s=[];switch(r){case"top":s.push({x:t.x-a,y:t.y+a},{x:t.x+a,y:t.y+a});break;case"bottom":s.push({x:t.x-a,y:t.y-a},{x:t.x+a,y:t.y-a});break;case"left":s.push({x:t.x+a,y:t.y-a},{x:t.x+a,y:t.y+a});break;case"right":s.push({x:t.x-a,y:t.y-a},{x:t.x-a,y:t.y+a});break}return s}function NM(t){const{top:r,right:a,bottom:s,left:o}=t;return[{x:o,y:r},{x:a,y:r},{x:a,y:s},{x:o,y:s}]}function OM(t,r){const{x:a,y:s}=t;let o=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const d=r[c].x,m=r[c].y,p=r[f].x,g=r[f].y;m>s!=g>s&&a<(p-d)*(s-m)/(g-m)+d&&(o=!o)}return o}function MM(t){const r=t.slice();return r.sort((a,s)=>a.x<s.x?-1:a.x>s.x?1:a.y<s.y?-1:a.y>s.y?1:0),jM(r)}function jM(t){if(t.length<=1)return t.slice();const r=[];for(let s=0;s<t.length;s++){const o=t[s];for(;r.length>=2;){const c=r[r.length-1],f=r[r.length-2];if((c.x-f.x)*(o.y-f.y)>=(c.y-f.y)*(o.x-f.x))r.pop();else break}r.push(o)}r.pop();const a=[];for(let s=t.length-1;s>=0;s--){const o=t[s];for(;a.length>=2;){const c=a[a.length-1],f=a[a.length-2];if((c.x-f.x)*(o.y-f.y)>=(c.y-f.y)*(o.x-f.x))a.pop();else break}a.push(o)}return a.pop(),r.length===1&&a.length===1&&r[0].x===a[0].x&&r[0].y===a[0].y?r:r.concat(a)}var DM=fw,_M=dw,LM=hw,zM=mw,yw=pw;const bw=DM,br=_M,xr=LM,Un=y.forwardRef(({className:t,sideOffset:r=4,...a},s)=>v.jsx(zM,{children:v.jsx(yw,{ref:s,sideOffset:r,className:le("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a})}));Un.displayName=yw.displayName;const th=768;function PM(){const[t,r]=y.useState(void 0);return y.useEffect(()=>{const a=window.matchMedia(`(max-width: ${th-1}px)`),s=()=>{r(window.innerWidth<th)};return a.addEventListener("change",s),r(window.innerWidth<th),()=>a.removeEventListener("change",s)},[]),!!t}const UM="sidebar:state",kM=60*60*24*7,$M="16rem",HM="18rem",qM="3rem",BM="b",xw=y.createContext(null);function fu(){const t=y.useContext(xw);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}const Sw=y.forwardRef(({defaultOpen:t=!0,open:r,onOpenChange:a,className:s,style:o,children:c,...f},d)=>{const m=PM(),[p,g]=y.useState(!1),[b,x]=y.useState(t),E=r??b,T=y.useCallback(N=>{const O=typeof N=="function"?N(E):N;a?a(O):x(O),document.cookie=`${UM}=${O}; path=/; max-age=${kM}`},[a,E]),S=y.useCallback(()=>m?g(N=>!N):T(N=>!N),[m,T,g]);y.useEffect(()=>{const N=O=>{O.key===BM&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),S())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[S]);const w=E?"expanded":"collapsed",C=y.useMemo(()=>({state:w,open:E,setOpen:T,isMobile:m,openMobile:p,setOpenMobile:g,toggleSidebar:S}),[w,E,T,m,p,g,S]);return v.jsx(xw.Provider,{value:C,children:v.jsx(bw,{delayDuration:0,children:v.jsx("div",{style:{"--sidebar-width":$M,"--sidebar-width-icon":qM,...o},className:le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",s),ref:d,...f,children:c})})})});Sw.displayName="SidebarProvider";const ww=y.forwardRef(({side:t="left",variant:r="sidebar",collapsible:a="offcanvas",className:s,children:o,...c},f)=>{const{isMobile:d,state:m,openMobile:p,setOpenMobile:g}=fu();return a==="none"?v.jsx("div",{className:le("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",s),ref:f,...c,children:o}):d?v.jsx(a2,{open:p,onOpenChange:g,...c,children:v.jsx($S,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":HM},side:t,children:v.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):v.jsxs("div",{ref:f,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?a:"","data-variant":r,"data-side":t,children:[v.jsx("div",{className:le("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),v.jsx("div",{className:le("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...c,children:v.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md border w-full flex-col bg-card group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});ww.displayName="Sidebar";const IM=y.forwardRef(({className:t,onClick:r,...a},s)=>{const{toggleSidebar:o}=fu();return v.jsxs(Qe,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:le("h-7 w-7",t),onClick:c=>{r==null||r(c),o()},...a,children:[v.jsx(XO,{}),v.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});IM.displayName="SidebarTrigger";const VM=y.forwardRef(({className:t,...r},a)=>{const{toggleSidebar:s}=fu();return v.jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:le("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...r})});VM.displayName="SidebarRail";const Ew=y.forwardRef(({className:t,...r},a)=>v.jsx("main",{ref:a,className:le("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",t),...r}));Ew.displayName="SidebarInset";const YM=y.forwardRef(({className:t,...r},a)=>v.jsx(vr,{ref:a,"data-sidebar":"input",className:le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...r}));YM.displayName="SidebarInput";const Rw=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"header",className:le("flex flex-col gap-2 p-2",t),...r}));Rw.displayName="SidebarHeader";const Tw=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"footer",className:le("flex flex-col gap-2 p-2",t),...r}));Tw.displayName="SidebarFooter";const GM=y.forwardRef(({className:t,...r},a)=>v.jsx(Jx,{ref:a,"data-sidebar":"separator",className:le("mx-2 w-auto bg-card-border",t),...r}));GM.displayName="SidebarSeparator";const Cw=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"content",className:le("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...r}));Cw.displayName="SidebarContent";const Aw=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"group",className:le("relative flex w-full min-w-0 flex-col p-2",t),...r}));Aw.displayName="SidebarGroup";const Nw=y.forwardRef(({className:t,asChild:r=!1,...a},s)=>{const o=r?sn:"div";return v.jsx(o,{ref:s,"data-sidebar":"group-label",className:le("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...a})});Nw.displayName="SidebarGroupLabel";const FM=y.forwardRef(({className:t,asChild:r=!1,...a},s)=>{const o=r?sn:"button";return v.jsx(o,{ref:s,"data-sidebar":"group-action",className:le("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...a})});FM.displayName="SidebarGroupAction";const Ow=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"group-content",className:le("w-full text-sm",t),...r}));Ow.displayName="SidebarGroupContent";const Lc=y.forwardRef(({className:t,...r},a)=>v.jsx("ul",{ref:a,"data-sidebar":"menu",className:le("flex w-full min-w-0 flex-col gap-1",t),...r}));Lc.displayName="SidebarMenu";const mr=y.forwardRef(({className:t,...r},a)=>v.jsx("li",{ref:a,"data-sidebar":"menu-item",className:le("group/menu-item relative",t),...r}));mr.displayName="SidebarMenuItem";const QM=ma("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ia=y.forwardRef(({asChild:t=!1,isActive:r=!1,variant:a="default",size:s="default",tooltip:o,className:c,...f},d)=>{const m=t?sn:"button",{isMobile:p,state:g}=fu(),b=v.jsx(m,{ref:d,"data-sidebar":"menu-button","data-size":s,"data-active":r,className:le(QM({variant:a,size:s}),c),...f});return o?(typeof o=="string"&&(o={children:o}),v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:b}),v.jsx(Un,{side:"right",align:"center",hidden:g!=="collapsed"||p,...o})]})):b});Ia.displayName="SidebarMenuButton";const XM=y.forwardRef(({className:t,asChild:r=!1,showOnHover:a=!1,...s},o)=>{const c=r?sn:"button";return v.jsx(c,{ref:o,"data-sidebar":"menu-action",className:le("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",t),...s})});XM.displayName="SidebarMenuAction";const KM=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,"data-sidebar":"menu-badge",className:le("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...r}));KM.displayName="SidebarMenuBadge";const Mw=y.forwardRef(({className:t,showIcon:r=!1,...a},s)=>{const o=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return v.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:le("rounded-md h-8 flex gap-2 px-2 items-center",t),...a,children:[r&&v.jsx(Wb,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),v.jsx(Wb,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});Mw.displayName="SidebarMenuSkeleton";const WM=y.forwardRef(({className:t,...r},a)=>v.jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:le("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...r}));WM.displayName="SidebarMenuSub";const ZM=y.forwardRef(({...t},r)=>v.jsx("li",{ref:r,...t}));ZM.displayName="SidebarMenuSubItem";const JM=y.forwardRef(({asChild:t=!1,size:r="md",isActive:a,className:s,...o},c)=>{const f=t?sn:"a";return v.jsx(f,{ref:c,"data-sidebar":"menu-sub-button","data-size":r,"data-active":a,className:le("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})});JM.displayName="SidebarMenuSubButton";var ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ri=typeof window>"u"||"Deno"in globalThis;function an(){}function ej(t,r){return typeof t=="function"?t(r):t}function um(t){return typeof t=="number"&&t>=0&&t!==1/0}function jw(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Zi(t,r){return typeof t=="function"?t(r):t}function gn(t,r){return typeof t=="function"?t(r):t}function s0(t,r){const{type:a="all",exact:s,fetchStatus:o,predicate:c,queryKey:f,stale:d}=t;if(f){if(s){if(r.queryHash!==lp(f,r.options))return!1}else if(!$l(r.queryKey,f))return!1}if(a!=="all"){const m=r.isActive();if(a==="active"&&!m||a==="inactive"&&m)return!1}return!(typeof d=="boolean"&&r.isStale()!==d||o&&o!==r.state.fetchStatus||c&&!c(r))}function l0(t,r){const{exact:a,status:s,predicate:o,mutationKey:c}=t;if(c){if(!r.options.mutationKey)return!1;if(a){if(ai(r.options.mutationKey)!==ai(c))return!1}else if(!$l(r.options.mutationKey,c))return!1}return!(s&&r.state.status!==s||o&&!o(r))}function lp(t,r){return((r==null?void 0:r.queryKeyHashFn)||ai)(t)}function ai(t){return JSON.stringify(t,(r,a)=>fm(a)?Object.keys(a).sort().reduce((s,o)=>(s[o]=a[o],s),{}):a)}function $l(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?!Object.keys(r).some(a=>!$l(t[a],r[a])):!1}function Dw(t,r){if(t===r)return t;const a=o0(t)&&o0(r);if(a||fm(t)&&fm(r)){const s=a?t:Object.keys(t),o=s.length,c=a?r:Object.keys(r),f=c.length,d=a?[]:{};let m=0;for(let p=0;p<f;p++){const g=a?p:c[p];(!a&&s.includes(g)||a)&&t[g]===void 0&&r[g]===void 0?(d[g]=void 0,m++):(d[g]=Dw(t[g],r[g]),d[g]===t[g]&&t[g]!==void 0&&m++)}return o===f&&m===o?t:d}return r}function Yc(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const a in t)if(t[a]!==r[a])return!1;return!0}function o0(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function fm(t){if(!c0(t))return!1;const r=t.constructor;if(r===void 0)return!0;const a=r.prototype;return!(!c0(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function c0(t){return Object.prototype.toString.call(t)==="[object Object]"}function tj(t){return new Promise(r=>{setTimeout(r,t)})}function dm(t,r,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,r):a.structuralSharing!==!1?Dw(t,r):r}function nj(t,r,a=0){const s=[...t,r];return a&&s.length>a?s.slice(1):s}function rj(t,r,a=0){const s=[r,...t];return a&&s.length>a?s.slice(0,-1):s}var op=Symbol();function _w(t,r){return!t.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!t.queryFn||t.queryFn===op?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ga,ta,es,Ox,aj=(Ox=class extends ws{constructor(){super();be(this,Ga);be(this,ta);be(this,es);ce(this,es,r=>{if(!ri&&window.addEventListener){const a=()=>r();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){P(this,ta)||this.setEventListener(P(this,es))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,ta))==null||r.call(this),ce(this,ta,void 0))}setEventListener(r){var a;ce(this,es,r),(a=P(this,ta))==null||a.call(this),ce(this,ta,r(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(r){P(this,Ga)!==r&&(ce(this,Ga,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(a=>{a(r)})}isFocused(){var r;return typeof P(this,Ga)=="boolean"?P(this,Ga):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Ga=new WeakMap,ta=new WeakMap,es=new WeakMap,Ox),cp=new aj,ts,na,ns,Mx,ij=(Mx=class extends ws{constructor(){super();be(this,ts,!0);be(this,na);be(this,ns);ce(this,ns,r=>{if(!ri&&window.addEventListener){const a=()=>r(!0),s=()=>r(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",s)}}})}onSubscribe(){P(this,na)||this.setEventListener(P(this,ns))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,na))==null||r.call(this),ce(this,na,void 0))}setEventListener(r){var a;ce(this,ns,r),(a=P(this,na))==null||a.call(this),ce(this,na,r(this.setOnline.bind(this)))}setOnline(r){P(this,ts)!==r&&(ce(this,ts,r),this.listeners.forEach(s=>{s(r)}))}isOnline(){return P(this,ts)}},ts=new WeakMap,na=new WeakMap,ns=new WeakMap,Mx),Gc=new ij;function hm(){let t,r;const a=new Promise((o,c)=>{t=o,r=c});a.status="pending",a.catch(()=>{});function s(o){Object.assign(a,o),delete a.resolve,delete a.reject}return a.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},a.reject=o=>{s({status:"rejected",reason:o}),r(o)},a}function sj(t){return Math.min(1e3*2**t,3e4)}function Lw(t){return(t??"online")==="online"?Gc.isOnline():!0}var zw=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function nh(t){return t instanceof zw}function Pw(t){let r=!1,a=0,s=!1,o;const c=hm(),f=S=>{var w;s||(x(new zw(S)),(w=t.abort)==null||w.call(t))},d=()=>{r=!0},m=()=>{r=!1},p=()=>cp.isFocused()&&(t.networkMode==="always"||Gc.isOnline())&&t.canRun(),g=()=>Lw(t.networkMode)&&t.canRun(),b=S=>{var w;s||(s=!0,(w=t.onSuccess)==null||w.call(t,S),o==null||o(),c.resolve(S))},x=S=>{var w;s||(s=!0,(w=t.onError)==null||w.call(t,S),o==null||o(),c.reject(S))},E=()=>new Promise(S=>{var w;o=C=>{(s||p())&&S(C)},(w=t.onPause)==null||w.call(t)}).then(()=>{var S;o=void 0,s||(S=t.onContinue)==null||S.call(t)}),T=()=>{if(s)return;let S;const w=a===0?t.initialPromise:void 0;try{S=w??t.fn()}catch(C){S=Promise.reject(C)}Promise.resolve(S).then(b).catch(C=>{var k;if(s)return;const N=t.retry??(ri?0:3),O=t.retryDelay??sj,_=typeof O=="function"?O(a,C):O,L=N===!0||typeof N=="number"&&a<N||typeof N=="function"&&N(a,C);if(r||!L){x(C);return}a++,(k=t.onFail)==null||k.call(t,a,C),tj(_).then(()=>p()?void 0:E()).then(()=>{r?x(C):T()})})};return{promise:c,cancel:f,continue:()=>(o==null||o(),c),cancelRetry:d,continueRetry:m,canStart:g,start:()=>(g()?T():E().then(T),c)}}function lj(){let t=[],r=0,a=d=>{d()},s=d=>{d()},o=d=>setTimeout(d,0);const c=d=>{r?t.push(d):o(()=>{a(d)})},f=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(m=>{a(m)})})})};return{batch:d=>{let m;r++;try{m=d()}finally{r--,r||f()}return m},batchCalls:d=>(...m)=>{c(()=>{d(...m)})},schedule:c,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var ut=lj(),Fa,jx,Uw=(jx=class{constructor(){be(this,Fa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),um(this.gcTime)&&ce(this,Fa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ri?1/0:5*60*1e3))}clearGcTimeout(){P(this,Fa)&&(clearTimeout(P(this,Fa)),ce(this,Fa,void 0))}},Fa=new WeakMap,jx),rs,as,rn,Qa,wt,Bl,Xa,mn,dr,Dx,oj=(Dx=class extends Uw{constructor(r){super();be(this,mn);be(this,rs);be(this,as);be(this,rn);be(this,Qa);be(this,wt);be(this,Bl);be(this,Xa);ce(this,Xa,!1),ce(this,Bl,r.defaultOptions),this.setOptions(r.options),this.observers=[],ce(this,Qa,r.client),ce(this,rn,P(this,Qa).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,ce(this,rs,cj(this.options)),this.state=r.state??P(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=P(this,wt))==null?void 0:r.promise}setOptions(r){this.options={...P(this,Bl),...r},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,rn).remove(this)}setData(r,a){const s=dm(this.state.data,r,this.options);return Ne(this,mn,dr).call(this,{data:s,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),s}setState(r,a){Ne(this,mn,dr).call(this,{type:"setState",state:r,setStateOptions:a})}cancel(r){var s,o;const a=(s=P(this,wt))==null?void 0:s.promise;return(o=P(this,wt))==null||o.cancel(r),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,rs))}isActive(){return this.observers.some(r=>gn(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===op||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(r=0){return this.state.isInvalidated||this.state.data===void 0||!jw(this.state.dataUpdatedAt,r)}onFocus(){var a;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(a=P(this,wt))==null||a.continue()}onOnline(){var a;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(a=P(this,wt))==null||a.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),P(this,rn).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(a=>a!==r),this.observers.length||(P(this,wt)&&(P(this,Xa)?P(this,wt).cancel({revert:!0}):P(this,wt).cancelRetry()),this.scheduleGc()),P(this,rn).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,mn,dr).call(this,{type:"invalidate"})}fetch(r,a){var m,p,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(P(this,wt))return P(this,wt).continueRetry(),P(this,wt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const b=this.observers.find(x=>x.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,o=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ce(this,Xa,!0),s.signal)})},c=()=>{const b=_w(this.options,a),x={client:P(this,Qa),queryKey:this.queryKey,meta:this.meta};return o(x),ce(this,Xa,!1),this.options.persister?this.options.persister(b,x,this):b(x)},f={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:P(this,Qa),state:this.state,fetchFn:c};o(f),(m=this.options.behavior)==null||m.onFetch(f,this),ce(this,as,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=f.fetchOptions)==null?void 0:p.meta))&&Ne(this,mn,dr).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta});const d=b=>{var x,E,T,S;nh(b)&&b.silent||Ne(this,mn,dr).call(this,{type:"error",error:b}),nh(b)||((E=(x=P(this,rn).config).onError)==null||E.call(x,b,this),(S=(T=P(this,rn).config).onSettled)==null||S.call(T,this.state.data,b,this)),this.scheduleGc()};return ce(this,wt,Pw({initialPromise:a==null?void 0:a.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var x,E,T,S;if(b===void 0){d(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(w){d(w);return}(E=(x=P(this,rn).config).onSuccess)==null||E.call(x,b,this),(S=(T=P(this,rn).config).onSettled)==null||S.call(T,b,this.state.error,this),this.scheduleGc()},onError:d,onFail:(b,x)=>{Ne(this,mn,dr).call(this,{type:"failed",failureCount:b,error:x})},onPause:()=>{Ne(this,mn,dr).call(this,{type:"pause"})},onContinue:()=>{Ne(this,mn,dr).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),P(this,wt).start()}},rs=new WeakMap,as=new WeakMap,rn=new WeakMap,Qa=new WeakMap,wt=new WeakMap,Bl=new WeakMap,Xa=new WeakMap,mn=new WeakSet,dr=function(r){const a=s=>{switch(r.type){case"failed":return{...s,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...kw(s.data,this.options),fetchMeta:r.meta??null};case"success":return{...s,data:r.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:r.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=r.error;return nh(o)&&o.revert&&P(this,as)?{...P(this,as),fetchStatus:"idle"}:{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...r.state}}};this.state=a(this.state),ut.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),P(this,rn).notify({query:this,type:"updated",action:r})})},Dx);function kw(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Lw(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function cj(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,a=r!==void 0,s=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var jn,_x,uj=(_x=class extends ws{constructor(r={}){super();be(this,jn);this.config=r,ce(this,jn,new Map)}build(r,a,s){const o=a.queryKey,c=a.queryHash??lp(o,a);let f=this.get(c);return f||(f=new oj({client:r,queryKey:o,queryHash:c,options:r.defaultQueryOptions(a),state:s,defaultOptions:r.getQueryDefaults(o)}),this.add(f)),f}add(r){P(this,jn).has(r.queryHash)||(P(this,jn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const a=P(this,jn).get(r.queryHash);a&&(r.destroy(),a===r&&P(this,jn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){ut.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return P(this,jn).get(r)}getAll(){return[...P(this,jn).values()]}find(r){const a={exact:!0,...r};return this.getAll().find(s=>s0(a,s))}findAll(r={}){const a=this.getAll();return Object.keys(r).length>0?a.filter(s=>s0(r,s)):a}notify(r){ut.batch(()=>{this.listeners.forEach(a=>{a(r)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},jn=new WeakMap,_x),Dn,Ct,Ka,_n,ea,Lx,fj=(Lx=class extends Uw{constructor(r){super();be(this,_n);be(this,Dn);be(this,Ct);be(this,Ka);this.mutationId=r.mutationId,ce(this,Ct,r.mutationCache),ce(this,Dn,[]),this.state=r.state||$w(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){P(this,Dn).includes(r)||(P(this,Dn).push(r),this.clearGcTimeout(),P(this,Ct).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){ce(this,Dn,P(this,Dn).filter(a=>a!==r)),this.scheduleGc(),P(this,Ct).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){P(this,Dn).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ct).remove(this))}continue(){var r;return((r=P(this,Ka))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var o,c,f,d,m,p,g,b,x,E,T,S,w,C,N,O,_,L,k,V;ce(this,Ka,Pw({fn:()=>this.options.mutationFn?this.options.mutationFn(r):Promise.reject(new Error("No mutationFn found")),onFail:($,U)=>{Ne(this,_n,ea).call(this,{type:"failed",failureCount:$,error:U})},onPause:()=>{Ne(this,_n,ea).call(this,{type:"pause"})},onContinue:()=>{Ne(this,_n,ea).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ct).canRun(this)}));const a=this.state.status==="pending",s=!P(this,Ka).canStart();try{if(!a){Ne(this,_n,ea).call(this,{type:"pending",variables:r,isPaused:s}),await((c=(o=P(this,Ct).config).onMutate)==null?void 0:c.call(o,r,this));const U=await((d=(f=this.options).onMutate)==null?void 0:d.call(f,r));U!==this.state.context&&Ne(this,_n,ea).call(this,{type:"pending",context:U,variables:r,isPaused:s})}const $=await P(this,Ka).start();return await((p=(m=P(this,Ct).config).onSuccess)==null?void 0:p.call(m,$,r,this.state.context,this)),await((b=(g=this.options).onSuccess)==null?void 0:b.call(g,$,r,this.state.context)),await((E=(x=P(this,Ct).config).onSettled)==null?void 0:E.call(x,$,null,this.state.variables,this.state.context,this)),await((S=(T=this.options).onSettled)==null?void 0:S.call(T,$,null,r,this.state.context)),Ne(this,_n,ea).call(this,{type:"success",data:$}),$}catch($){try{throw await((C=(w=P(this,Ct).config).onError)==null?void 0:C.call(w,$,r,this.state.context,this)),await((O=(N=this.options).onError)==null?void 0:O.call(N,$,r,this.state.context)),await((L=(_=P(this,Ct).config).onSettled)==null?void 0:L.call(_,void 0,$,this.state.variables,this.state.context,this)),await((V=(k=this.options).onSettled)==null?void 0:V.call(k,void 0,$,r,this.state.context)),$}finally{Ne(this,_n,ea).call(this,{type:"error",error:$})}}finally{P(this,Ct).runNext(this)}}},Dn=new WeakMap,Ct=new WeakMap,Ka=new WeakMap,_n=new WeakSet,ea=function(r){const a=s=>{switch(r.type){case"failed":return{...s,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...s,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:r.error,failureCount:s.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=a(this.state),ut.batch(()=>{P(this,Dn).forEach(s=>{s.onMutationUpdate(r)}),P(this,Ct).notify({mutation:this,type:"updated",action:r})})},Lx);function $w(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pr,pn,Il,zx,dj=(zx=class extends ws{constructor(r={}){super();be(this,pr);be(this,pn);be(this,Il);this.config=r,ce(this,pr,new Set),ce(this,pn,new Map),ce(this,Il,0)}build(r,a,s){const o=new fj({mutationCache:this,mutationId:++vc(this,Il)._,options:r.defaultMutationOptions(a),state:s});return this.add(o),o}add(r){P(this,pr).add(r);const a=Rc(r);if(typeof a=="string"){const s=P(this,pn).get(a);s?s.push(r):P(this,pn).set(a,[r])}this.notify({type:"added",mutation:r})}remove(r){if(P(this,pr).delete(r)){const a=Rc(r);if(typeof a=="string"){const s=P(this,pn).get(a);if(s)if(s.length>1){const o=s.indexOf(r);o!==-1&&s.splice(o,1)}else s[0]===r&&P(this,pn).delete(a)}}this.notify({type:"removed",mutation:r})}canRun(r){const a=Rc(r);if(typeof a=="string"){const s=P(this,pn).get(a),o=s==null?void 0:s.find(c=>c.state.status==="pending");return!o||o===r}else return!0}runNext(r){var s;const a=Rc(r);if(typeof a=="string"){const o=(s=P(this,pn).get(a))==null?void 0:s.find(c=>c!==r&&c.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{P(this,pr).forEach(r=>{this.notify({type:"removed",mutation:r})}),P(this,pr).clear(),P(this,pn).clear()})}getAll(){return Array.from(P(this,pr))}find(r){const a={exact:!0,...r};return this.getAll().find(s=>l0(a,s))}findAll(r={}){return this.getAll().filter(a=>l0(r,a))}notify(r){ut.batch(()=>{this.listeners.forEach(a=>{a(r)})})}resumePausedMutations(){const r=this.getAll().filter(a=>a.state.isPaused);return ut.batch(()=>Promise.all(r.map(a=>a.continue().catch(an))))}},pr=new WeakMap,pn=new WeakMap,Il=new WeakMap,zx);function Rc(t){var r;return(r=t.options.scope)==null?void 0:r.id}function u0(t){return{onFetch:(r,a)=>{var g,b,x,E,T;const s=r.options,o=(x=(b=(g=r.fetchOptions)==null?void 0:g.meta)==null?void 0:b.fetchMore)==null?void 0:x.direction,c=((E=r.state.data)==null?void 0:E.pages)||[],f=((T=r.state.data)==null?void 0:T.pageParams)||[];let d={pages:[],pageParams:[]},m=0;const p=async()=>{let S=!1;const w=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(r.signal.aborted?S=!0:r.signal.addEventListener("abort",()=>{S=!0}),r.signal)})},C=_w(r.options,r.fetchOptions),N=async(O,_,L)=>{if(S)return Promise.reject();if(_==null&&O.pages.length)return Promise.resolve(O);const k={client:r.client,queryKey:r.queryKey,pageParam:_,direction:L?"backward":"forward",meta:r.options.meta};w(k);const V=await C(k),{maxPages:$}=r.options,U=L?rj:nj;return{pages:U(O.pages,V,$),pageParams:U(O.pageParams,_,$)}};if(o&&c.length){const O=o==="backward",_=O?hj:f0,L={pages:c,pageParams:f},k=_(s,L);d=await N(L,k,O)}else{const O=t??c.length;do{const _=m===0?f[0]??s.initialPageParam:f0(s,d);if(m>0&&_==null)break;d=await N(d,_),m++}while(m<O)}return d};r.options.persister?r.fetchFn=()=>{var S,w;return(w=(S=r.options).persister)==null?void 0:w.call(S,p,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},a)}:r.fetchFn=p}}}function f0(t,{pages:r,pageParams:a}){const s=r.length-1;return r.length>0?t.getNextPageParam(r[s],r,a[s],a):void 0}function hj(t,{pages:r,pageParams:a}){var s;return r.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,r[0],r,a[0],a):void 0}var tt,ra,aa,is,ss,ia,ls,os,Px,mj=(Px=class{constructor(t={}){be(this,tt);be(this,ra);be(this,aa);be(this,is);be(this,ss);be(this,ia);be(this,ls);be(this,os);ce(this,tt,t.queryCache||new uj),ce(this,ra,t.mutationCache||new dj),ce(this,aa,t.defaultOptions||{}),ce(this,is,new Map),ce(this,ss,new Map),ce(this,ia,0)}mount(){vc(this,ia)._++,P(this,ia)===1&&(ce(this,ls,cp.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,tt).onFocus())})),ce(this,os,Gc.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,tt).onOnline())})))}unmount(){var t,r;vc(this,ia)._--,P(this,ia)===0&&((t=P(this,ls))==null||t.call(this),ce(this,ls,void 0),(r=P(this,os))==null||r.call(this),ce(this,os,void 0))}isFetching(t){return P(this,tt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,ra).findAll({...t,status:"pending"}).length}getQueryData(t){var a;const r=this.defaultQueryOptions({queryKey:t});return(a=P(this,tt).get(r.queryHash))==null?void 0:a.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),a=P(this,tt).build(this,r),s=a.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(Zi(r.staleTime,a))&&this.prefetchQuery(r),Promise.resolve(s))}getQueriesData(t){return P(this,tt).findAll(t).map(({queryKey:r,state:a})=>{const s=a.data;return[r,s]})}setQueryData(t,r,a){const s=this.defaultQueryOptions({queryKey:t}),o=P(this,tt).get(s.queryHash),c=o==null?void 0:o.state.data,f=ej(r,c);if(f!==void 0)return P(this,tt).build(this,s).setData(f,{...a,manual:!0})}setQueriesData(t,r,a){return ut.batch(()=>P(this,tt).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,r,a)]))}getQueryState(t){var a;const r=this.defaultQueryOptions({queryKey:t});return(a=P(this,tt).get(r.queryHash))==null?void 0:a.state}removeQueries(t){const r=P(this,tt);ut.batch(()=>{r.findAll(t).forEach(a=>{r.remove(a)})})}resetQueries(t,r){const a=P(this,tt);return ut.batch(()=>(a.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const a={revert:!0,...r},s=ut.batch(()=>P(this,tt).findAll(t).map(o=>o.cancel(a)));return Promise.all(s).then(an).catch(an)}invalidateQueries(t,r={}){return ut.batch(()=>(P(this,tt).findAll(t).forEach(a=>{a.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},r)))}refetchQueries(t,r={}){const a={...r,cancelRefetch:r.cancelRefetch??!0},s=ut.batch(()=>P(this,tt).findAll(t).filter(o=>!o.isDisabled()).map(o=>{let c=o.fetch(void 0,a);return a.throwOnError||(c=c.catch(an)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(an)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const a=P(this,tt).build(this,r);return a.isStaleByTime(Zi(r.staleTime,a))?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(an).catch(an)}fetchInfiniteQuery(t){return t.behavior=u0(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(an).catch(an)}ensureInfiniteQueryData(t){return t.behavior=u0(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Gc.isOnline()?P(this,ra).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,tt)}getMutationCache(){return P(this,ra)}getDefaultOptions(){return P(this,aa)}setDefaultOptions(t){ce(this,aa,t)}setQueryDefaults(t,r){P(this,is).set(ai(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...P(this,is).values()],a={};return r.forEach(s=>{$l(t,s.queryKey)&&Object.assign(a,s.defaultOptions)}),a}setMutationDefaults(t,r){P(this,ss).set(ai(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...P(this,ss).values()],a={};return r.forEach(s=>{$l(t,s.mutationKey)&&Object.assign(a,s.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;const r={...P(this,aa).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=lp(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===op&&(r.enabled=!1),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,aa).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,tt).clear(),P(this,ra).clear()}},tt=new WeakMap,ra=new WeakMap,aa=new WeakMap,is=new WeakMap,ss=new WeakMap,ia=new WeakMap,ls=new WeakMap,os=new WeakMap,Px),Dt,_e,Vl,At,Wa,cs,sa,Ln,Yl,us,fs,Za,Ja,la,ds,ke,Ll,mm,pm,gm,vm,ym,bm,xm,Hw,Ux,pj=(Ux=class extends ws{constructor(r,a){super();be(this,ke);be(this,Dt);be(this,_e);be(this,Vl);be(this,At);be(this,Wa);be(this,cs);be(this,sa);be(this,Ln);be(this,Yl);be(this,us);be(this,fs);be(this,Za);be(this,Ja);be(this,la);be(this,ds,new Set);this.options=a,ce(this,Dt,r),ce(this,Ln,null),ce(this,sa,hm()),this.options.experimental_prefetchInRender||P(this,sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,_e).addObserver(this),d0(P(this,_e),this.options)?Ne(this,ke,Ll).call(this):this.updateResult(),Ne(this,ke,vm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sm(P(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sm(P(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,ke,ym).call(this),Ne(this,ke,bm).call(this),P(this,_e).removeObserver(this)}setOptions(r,a){const s=this.options,o=P(this,_e);if(this.options=P(this,Dt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gn(this.options.enabled,P(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,ke,xm).call(this),P(this,_e).setOptions(this.options),s._defaulted&&!Yc(this.options,s)&&P(this,Dt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,_e),observer:this});const c=this.hasListeners();c&&h0(P(this,_e),o,this.options,s)&&Ne(this,ke,Ll).call(this),this.updateResult(a),c&&(P(this,_e)!==o||gn(this.options.enabled,P(this,_e))!==gn(s.enabled,P(this,_e))||Zi(this.options.staleTime,P(this,_e))!==Zi(s.staleTime,P(this,_e)))&&Ne(this,ke,mm).call(this);const f=Ne(this,ke,pm).call(this);c&&(P(this,_e)!==o||gn(this.options.enabled,P(this,_e))!==gn(s.enabled,P(this,_e))||f!==P(this,la))&&Ne(this,ke,gm).call(this,f)}getOptimisticResult(r){const a=P(this,Dt).getQueryCache().build(P(this,Dt),r),s=this.createResult(a,r);return vj(this,s)&&(ce(this,At,s),ce(this,cs,this.options),ce(this,Wa,P(this,_e).state)),s}getCurrentResult(){return P(this,At)}trackResult(r,a){const s={};return Object.keys(r).forEach(o=>{Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),a==null||a(o),r[o])})}),s}trackProp(r){P(this,ds).add(r)}getCurrentQuery(){return P(this,_e)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const a=P(this,Dt).defaultQueryOptions(r),s=P(this,Dt).getQueryCache().build(P(this,Dt),a);return s.fetch().then(()=>this.createResult(s,a))}fetch(r){return Ne(this,ke,Ll).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,At)))}createResult(r,a){var $;const s=P(this,_e),o=this.options,c=P(this,At),f=P(this,Wa),d=P(this,cs),p=r!==s?r.state:P(this,Vl),{state:g}=r;let b={...g},x=!1,E;if(a._optimisticResults){const U=this.hasListeners(),K=!U&&d0(r,a),te=U&&h0(r,s,a,o);(K||te)&&(b={...b,...kw(g.data,r.options)}),a._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:T,errorUpdatedAt:S,status:w}=b;if(a.select&&b.data!==void 0)if(c&&b.data===(f==null?void 0:f.data)&&a.select===P(this,Yl))E=P(this,us);else try{ce(this,Yl,a.select),E=a.select(b.data),E=dm(c==null?void 0:c.data,E,a),ce(this,us,E),ce(this,Ln,null)}catch(U){ce(this,Ln,U)}else E=b.data;if(a.placeholderData!==void 0&&E===void 0&&w==="pending"){let U;if(c!=null&&c.isPlaceholderData&&a.placeholderData===(d==null?void 0:d.placeholderData))U=c.data;else if(U=typeof a.placeholderData=="function"?a.placeholderData(($=P(this,fs))==null?void 0:$.state.data,P(this,fs)):a.placeholderData,a.select&&U!==void 0)try{U=a.select(U),ce(this,Ln,null)}catch(K){ce(this,Ln,K)}U!==void 0&&(w="success",E=dm(c==null?void 0:c.data,U,a),x=!0)}P(this,Ln)&&(T=P(this,Ln),E=P(this,us),S=Date.now(),w="error");const C=b.fetchStatus==="fetching",N=w==="pending",O=w==="error",_=N&&C,L=E!==void 0,V={status:w,fetchStatus:b.fetchStatus,isPending:N,isSuccess:w==="success",isError:O,isInitialLoading:_,isLoading:_,data:E,dataUpdatedAt:b.dataUpdatedAt,error:T,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:C,isRefetching:C&&!N,isLoadingError:O&&!L,isPaused:b.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:O&&L,isStale:up(r,a),refetch:this.refetch,promise:P(this,sa)};if(this.options.experimental_prefetchInRender){const U=se=>{V.status==="error"?se.reject(V.error):V.data!==void 0&&se.resolve(V.data)},K=()=>{const se=ce(this,sa,V.promise=hm());U(se)},te=P(this,sa);switch(te.status){case"pending":r.queryHash===s.queryHash&&U(te);break;case"fulfilled":(V.status==="error"||V.data!==te.value)&&K();break;case"rejected":(V.status!=="error"||V.error!==te.reason)&&K();break}}return V}updateResult(r){const a=P(this,At),s=this.createResult(P(this,_e),this.options);if(ce(this,Wa,P(this,_e).state),ce(this,cs,this.options),P(this,Wa).data!==void 0&&ce(this,fs,P(this,_e)),Yc(s,a))return;ce(this,At,s);const o={},c=()=>{if(!a)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!P(this,ds).size)return!0;const m=new Set(d??P(this,ds));return this.options.throwOnError&&m.add("error"),Object.keys(P(this,At)).some(p=>{const g=p;return P(this,At)[g]!==a[g]&&m.has(g)})};(r==null?void 0:r.listeners)!==!1&&c()&&(o.listeners=!0),Ne(this,ke,Hw).call(this,{...o,...r})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,ke,vm).call(this)}},Dt=new WeakMap,_e=new WeakMap,Vl=new WeakMap,At=new WeakMap,Wa=new WeakMap,cs=new WeakMap,sa=new WeakMap,Ln=new WeakMap,Yl=new WeakMap,us=new WeakMap,fs=new WeakMap,Za=new WeakMap,Ja=new WeakMap,la=new WeakMap,ds=new WeakMap,ke=new WeakSet,Ll=function(r){Ne(this,ke,xm).call(this);let a=P(this,_e).fetch(this.options,r);return r!=null&&r.throwOnError||(a=a.catch(an)),a},mm=function(){Ne(this,ke,ym).call(this);const r=Zi(this.options.staleTime,P(this,_e));if(ri||P(this,At).isStale||!um(r))return;const s=jw(P(this,At).dataUpdatedAt,r)+1;ce(this,Za,setTimeout(()=>{P(this,At).isStale||this.updateResult()},s))},pm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,_e)):this.options.refetchInterval)??!1},gm=function(r){Ne(this,ke,bm).call(this),ce(this,la,r),!(ri||gn(this.options.enabled,P(this,_e))===!1||!um(P(this,la))||P(this,la)===0)&&ce(this,Ja,setInterval(()=>{(this.options.refetchIntervalInBackground||cp.isFocused())&&Ne(this,ke,Ll).call(this)},P(this,la)))},vm=function(){Ne(this,ke,mm).call(this),Ne(this,ke,gm).call(this,Ne(this,ke,pm).call(this))},ym=function(){P(this,Za)&&(clearTimeout(P(this,Za)),ce(this,Za,void 0))},bm=function(){P(this,Ja)&&(clearInterval(P(this,Ja)),ce(this,Ja,void 0))},xm=function(){const r=P(this,Dt).getQueryCache().build(P(this,Dt),this.options);if(r===P(this,_e))return;const a=P(this,_e);ce(this,_e,r),ce(this,Vl,r.state),this.hasListeners()&&(a==null||a.removeObserver(this),r.addObserver(this))},Hw=function(r){ut.batch(()=>{r.listeners&&this.listeners.forEach(a=>{a(P(this,At))}),P(this,Dt).getQueryCache().notify({query:P(this,_e),type:"observerResultsUpdated"})})},Ux);function gj(t,r){return gn(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function d0(t,r){return gj(t,r)||t.state.data!==void 0&&Sm(t,r,r.refetchOnMount)}function Sm(t,r,a){if(gn(r.enabled,t)!==!1){const s=typeof a=="function"?a(t):a;return s==="always"||s!==!1&&up(t,r)}return!1}function h0(t,r,a,s){return(t!==r||gn(s.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&up(t,a)}function up(t,r){return gn(r.enabled,t)!==!1&&t.isStaleByTime(Zi(r.staleTime,t))}function vj(t,r){return!Yc(t.getCurrentResult(),r)}var oa,ca,_t,gr,wr,zc,wm,kx,yj=(kx=class extends ws{constructor(a,s){super();be(this,wr);be(this,oa);be(this,ca);be(this,_t);be(this,gr);ce(this,oa,a),this.setOptions(s),this.bindMethods(),Ne(this,wr,zc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var o;const s=this.options;this.options=P(this,oa).defaultMutationOptions(a),Yc(this.options,s)||P(this,oa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,_t),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&ai(s.mutationKey)!==ai(this.options.mutationKey)?this.reset():((o=P(this,_t))==null?void 0:o.state.status)==="pending"&&P(this,_t).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=P(this,_t))==null||a.removeObserver(this)}onMutationUpdate(a){Ne(this,wr,zc).call(this),Ne(this,wr,wm).call(this,a)}getCurrentResult(){return P(this,ca)}reset(){var a;(a=P(this,_t))==null||a.removeObserver(this),ce(this,_t,void 0),Ne(this,wr,zc).call(this),Ne(this,wr,wm).call(this)}mutate(a,s){var o;return ce(this,gr,s),(o=P(this,_t))==null||o.removeObserver(this),ce(this,_t,P(this,oa).getMutationCache().build(P(this,oa),this.options)),P(this,_t).addObserver(this),P(this,_t).execute(a)}},oa=new WeakMap,ca=new WeakMap,_t=new WeakMap,gr=new WeakMap,wr=new WeakSet,zc=function(){var s;const a=((s=P(this,_t))==null?void 0:s.state)??$w();ce(this,ca,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},wm=function(a){ut.batch(()=>{var s,o,c,f,d,m,p,g;if(P(this,gr)&&this.hasListeners()){const b=P(this,ca).variables,x=P(this,ca).context;(a==null?void 0:a.type)==="success"?((o=(s=P(this,gr)).onSuccess)==null||o.call(s,a.data,b,x),(f=(c=P(this,gr)).onSettled)==null||f.call(c,a.data,null,b,x)):(a==null?void 0:a.type)==="error"&&((m=(d=P(this,gr)).onError)==null||m.call(d,a.error,b,x),(g=(p=P(this,gr)).onSettled)==null||g.call(p,void 0,a.error,b,x))}this.listeners.forEach(b=>{b(P(this,ca))})})},kx),qw=y.createContext(void 0),In=t=>{const r=y.useContext(qw);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},bj=({client:t,children:r})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),v.jsx(qw.Provider,{value:t,children:r})),Bw=y.createContext(!1),xj=()=>y.useContext(Bw);Bw.Provider;function Sj(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var wj=y.createContext(Sj()),Ej=()=>y.useContext(wj);function Iw(t,r){return typeof t=="function"?t(...r):!!t}function Em(){}var Rj=(t,r)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(r.isReset()||(t.retryOnMount=!1))},Tj=t=>{y.useEffect(()=>{t.clearReset()},[t])},Cj=({result:t,errorResetBoundary:r,throwOnError:a,query:s,suspense:o})=>t.isError&&!r.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||Iw(a,[t.error,s])),Aj=t=>{const r=t.staleTime;t.suspense&&(t.staleTime=typeof r=="function"?(...a)=>Math.max(r(...a),1e3):Math.max(r??1e3,1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},Nj=(t,r)=>t.isLoading&&t.isFetching&&!r,Oj=(t,r)=>(t==null?void 0:t.suspense)&&r.isPending,m0=(t,r,a)=>r.fetchOptimistic(t).catch(()=>{a.clearReset()});function Mj(t,r,a){var b,x,E,T,S;const s=In(),o=xj(),c=Ej(),f=s.defaultQueryOptions(t);(x=(b=s.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||x.call(b,f),f._optimisticResults=o?"isRestoring":"optimistic",Aj(f),Rj(f,c),Tj(c);const d=!s.getQueryCache().get(f.queryHash),[m]=y.useState(()=>new r(s,f)),p=m.getOptimisticResult(f),g=!o&&t.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(w=>{const C=g?m.subscribe(ut.batchCalls(w)):Em;return m.updateResult(),C},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(f,{listeners:!1})},[f,m]),Oj(f,p))throw m0(f,m,c);if(Cj({result:p,errorResetBoundary:c,throwOnError:f.throwOnError,query:s.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((T=(E=s.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||T.call(E,f,p),f.experimental_prefetchInRender&&!ri&&Nj(p,o)){const w=d?m0(f,m,c):(S=s.getQueryCache().get(f.queryHash))==null?void 0:S.promise;w==null||w.catch(Em).finally(()=>{m.updateResult()})}return f.notifyOnChangeProps?p:m.trackResult(p)}function Es(t,r){return Mj(t,pj)}function Zl(t,r){const a=In(),[s]=y.useState(()=>new yj(a,t));y.useEffect(()=>{s.setOptions(t)},[s,t]);const o=y.useSyncExternalStore(y.useCallback(f=>s.subscribe(ut.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=y.useCallback((f,d)=>{s.mutate(f,d).catch(Em)},[s]);if(o.error&&Iw(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var Nl={},p0;function jj(){if(p0)return Nl;p0=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.parse=f,Nl.serialize=p;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,c=(()=>{const x=function(){};return x.prototype=Object.create(null),x})();function f(x,E){const T=new c,S=x.length;if(S<2)return T;const w=(E==null?void 0:E.decode)||g;let C=0;do{const N=x.indexOf("=",C);if(N===-1)break;const O=x.indexOf(";",C),_=O===-1?S:O;if(N>_){C=x.lastIndexOf(";",N-1)+1;continue}const L=d(x,C,N),k=m(x,N,L),V=x.slice(L,k);if(T[V]===void 0){let $=d(x,N+1,_),U=m(x,_,$);const K=w(x.slice($,U));T[V]=K}C=_+1}while(C<S);return T}function d(x,E,T){do{const S=x.charCodeAt(E);if(S!==32&&S!==9)return E}while(++E<T);return T}function m(x,E,T){for(;E>T;){const S=x.charCodeAt(--E);if(S!==32&&S!==9)return E+1}return T}function p(x,E,T){const S=(T==null?void 0:T.encode)||encodeURIComponent;if(!t.test(x))throw new TypeError(`argument name is invalid: ${x}`);const w=S(E);if(!r.test(w))throw new TypeError(`argument val is invalid: ${E}`);let C=x+"="+w;if(!T)return C;if(T.maxAge!==void 0){if(!Number.isInteger(T.maxAge))throw new TypeError(`option maxAge is invalid: ${T.maxAge}`);C+="; Max-Age="+T.maxAge}if(T.domain){if(!a.test(T.domain))throw new TypeError(`option domain is invalid: ${T.domain}`);C+="; Domain="+T.domain}if(T.path){if(!s.test(T.path))throw new TypeError(`option path is invalid: ${T.path}`);C+="; Path="+T.path}if(T.expires){if(!b(T.expires)||!Number.isFinite(T.expires.valueOf()))throw new TypeError(`option expires is invalid: ${T.expires}`);C+="; Expires="+T.expires.toUTCString()}if(T.httpOnly&&(C+="; HttpOnly"),T.secure&&(C+="; Secure"),T.partitioned&&(C+="; Partitioned"),T.priority)switch(typeof T.priority=="string"?T.priority.toLowerCase():void 0){case"low":C+="; Priority=Low";break;case"medium":C+="; Priority=Medium";break;case"high":C+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${T.priority}`)}if(T.sameSite)switch(typeof T.sameSite=="string"?T.sameSite.toLowerCase():T.sameSite){case!0:case"strict":C+="; SameSite=Strict";break;case"lax":C+="; SameSite=Lax";break;case"none":C+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${T.sameSite}`)}return C}function g(x){if(x.indexOf("%")===-1)return x;try{return decodeURIComponent(x)}catch{return x}}function b(x){return o.call(x)==="[object Date]"}return Nl}jj();/**
254
+ * react-router v7.3.0
255
+ *
256
+ * Copyright (c) Remix Software Inc.
257
+ *
258
+ * This source code is licensed under the MIT license found in the
259
+ * LICENSE.md file in the root directory of this source tree.
260
+ *
261
+ * @license MIT
262
+ */var g0="popstate";function Dj(t={}){function r(s,o){let{pathname:c,search:f,hash:d}=s.location;return Rm("",{pathname:c,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(s,o){return typeof o=="string"?o:Hl(o)}return Lj(r,a,null,t)}function We(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Hn(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function _j(){return Math.random().toString(36).substring(2,10)}function v0(t,r){return{usr:t.state,key:t.key,idx:r}}function Rm(t,r,a=null,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof r=="string"?Rs(r):r,state:a,key:r&&r.key||s||_j()}}function Hl({pathname:t="/",search:r="",hash:a=""}){return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Rs(t){let r={};if(t){let a=t.indexOf("#");a>=0&&(r.hash=t.substring(a),t=t.substring(0,a));let s=t.indexOf("?");s>=0&&(r.search=t.substring(s),t=t.substring(0,s)),t&&(r.pathname=t)}return r}function Lj(t,r,a,s={}){let{window:o=document.defaultView,v5Compat:c=!1}=s,f=o.history,d="POP",m=null,p=g();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function g(){return(f.state||{idx:null}).idx}function b(){d="POP";let w=g(),C=w==null?null:w-p;p=w,m&&m({action:d,location:S.location,delta:C})}function x(w,C){d="PUSH";let N=Rm(S.location,w,C);p=g()+1;let O=v0(N,p),_=S.createHref(N);try{f.pushState(O,"",_)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(_)}c&&m&&m({action:d,location:S.location,delta:1})}function E(w,C){d="REPLACE";let N=Rm(S.location,w,C);p=g();let O=v0(N,p),_=S.createHref(N);f.replaceState(O,"",_),c&&m&&m({action:d,location:S.location,delta:0})}function T(w){let C=o.location.origin!=="null"?o.location.origin:o.location.href,N=typeof w=="string"?w:Hl(w);return N=N.replace(/ $/,"%20"),We(C,`No window.location.(origin|href) available to create URL for href: ${N}`),new URL(N,C)}let S={get action(){return d},get location(){return t(o,f)},listen(w){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(g0,b),m=w,()=>{o.removeEventListener(g0,b),m=null}},createHref(w){return r(o,w)},createURL:T,encodeLocation(w){let C=T(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:x,replace:E,go(w){return f.go(w)}};return S}function Vw(t,r,a="/"){return zj(t,r,a,!1)}function zj(t,r,a,s){let o=typeof r=="string"?Rs(r):r,c=Tr(o.pathname||"/",a);if(c==null)return null;let f=Yw(t);Pj(f);let d=null;for(let m=0;d==null&&m<f.length;++m){let p=Fj(c);d=Yj(f[m],p,s)}return d}function Yw(t,r=[],a=[],s=""){let o=(c,f,d)=>{let m={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};m.relativePath.startsWith("/")&&(We(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length));let p=Sr([s,m.relativePath]),g=a.concat(m);c.children&&c.children.length>0&&(We(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Yw(c.children,r,g,p)),!(c.path==null&&!c.index)&&r.push({path:p,score:Ij(p,c.index),routesMeta:g})};return t.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let m of Gw(c.path))o(c,f,m)}),r}function Gw(t){let r=t.split("/");if(r.length===0)return[];let[a,...s]=r,o=a.endsWith("?"),c=a.replace(/\?$/,"");if(s.length===0)return o?[c,""]:[c];let f=Gw(s.join("/")),d=[];return d.push(...f.map(m=>m===""?c:[c,m].join("/"))),o&&d.push(...f),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function Pj(t){t.sort((r,a)=>r.score!==a.score?a.score-r.score:Vj(r.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var Uj=/^:[\w-]+$/,kj=3,$j=2,Hj=1,qj=10,Bj=-2,y0=t=>t==="*";function Ij(t,r){let a=t.split("/"),s=a.length;return a.some(y0)&&(s+=Bj),r&&(s+=$j),a.filter(o=>!y0(o)).reduce((o,c)=>o+(Uj.test(c)?kj:c===""?Hj:qj),s)}function Vj(t,r){return t.length===r.length&&t.slice(0,-1).every((s,o)=>s===r[o])?t[t.length-1]-r[r.length-1]:0}function Yj(t,r,a=!1){let{routesMeta:s}=t,o={},c="/",f=[];for(let d=0;d<s.length;++d){let m=s[d],p=d===s.length-1,g=c==="/"?r:r.slice(c.length)||"/",b=Fc({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},g),x=m.route;if(!b&&p&&a&&!s[s.length-1].route.index&&(b=Fc({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!b)return null;Object.assign(o,b.params),f.push({params:o,pathname:Sr([c,b.pathname]),pathnameBase:Wj(Sr([c,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(c=Sr([c,b.pathnameBase]))}return f}function Fc(t,r){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,s]=Gj(t.path,t.caseSensitive,t.end),o=r.match(a);if(!o)return null;let c=o[0],f=c.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:s.reduce((p,{paramName:g,isOptional:b},x)=>{if(g==="*"){let T=d[x]||"";f=c.slice(0,c.length-T.length).replace(/(.)\/+$/,"$1")}const E=d[x];return b&&!E?p[g]=void 0:p[g]=(E||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:f,pattern:t}}function Gj(t,r=!1,a=!0){Hn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,m)=>(s.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,r?void 0:"i"),s]}function Fj(t){try{return t.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Hn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),t}}function Tr(t,r){if(r==="/")return t;if(!t.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,s=t.charAt(a);return s&&s!=="/"?null:t.slice(a)||"/"}function Qj(t,r="/"){let{pathname:a,search:s="",hash:o=""}=typeof t=="string"?Rs(t):t;return{pathname:a?a.startsWith("/")?a:Xj(a,r):r,search:Zj(s),hash:Jj(o)}}function Xj(t,r){let a=r.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function rh(t,r,a,s){return`Cannot include a '${t}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Kj(t){return t.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function Fw(t){let r=Kj(t);return r.map((a,s)=>s===r.length-1?a.pathname:a.pathnameBase)}function Qw(t,r,a,s=!1){let o;typeof t=="string"?o=Rs(t):(o={...t},We(!o.pathname||!o.pathname.includes("?"),rh("?","pathname","search",o)),We(!o.pathname||!o.pathname.includes("#"),rh("#","pathname","hash",o)),We(!o.search||!o.search.includes("#"),rh("#","search","hash",o)));let c=t===""||o.pathname==="",f=c?"/":o.pathname,d;if(f==null)d=a;else{let b=r.length-1;if(!s&&f.startsWith("..")){let x=f.split("/");for(;x[0]==="..";)x.shift(),b-=1;o.pathname=x.join("/")}d=b>=0?r[b]:"/"}let m=Qj(o,d),p=f&&f!=="/"&&f.endsWith("/"),g=(c||f===".")&&a.endsWith("/");return!m.pathname.endsWith("/")&&(p||g)&&(m.pathname+="/"),m}var Sr=t=>t.join("/").replace(/\/\/+/g,"/"),Wj=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Zj=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Jj=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function eD(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var Xw=["POST","PUT","PATCH","DELETE"];new Set(Xw);var tD=["GET",...Xw];new Set(tD);var Ts=y.createContext(null);Ts.displayName="DataRouter";var du=y.createContext(null);du.displayName="DataRouterState";var Kw=y.createContext({isTransitioning:!1});Kw.displayName="ViewTransition";var nD=y.createContext(new Map);nD.displayName="Fetchers";var rD=y.createContext(null);rD.displayName="Await";var Vn=y.createContext(null);Vn.displayName="Navigation";var Jl=y.createContext(null);Jl.displayName="Location";var Yn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName="Route";var fp=y.createContext(null);fp.displayName="RouteError";function aD(t,{relative:r}={}){We(eo(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:s}=y.useContext(Vn),{hash:o,pathname:c,search:f}=no(t,{relative:r}),d=c;return a!=="/"&&(d=c==="/"?a:Sr([a,c])),s.createHref({pathname:d,search:f,hash:o})}function eo(){return y.useContext(Jl)!=null}function pa(){return We(eo(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Jl).location}var Ww="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zw(t){y.useContext(Vn).static||y.useLayoutEffect(t)}function to(){let{isDataRoute:t}=y.useContext(Yn);return t?vD():iD()}function iD(){We(eo(),"useNavigate() may be used only in the context of a <Router> component.");let t=y.useContext(Ts),{basename:r,navigator:a}=y.useContext(Vn),{matches:s}=y.useContext(Yn),{pathname:o}=pa(),c=JSON.stringify(Fw(s)),f=y.useRef(!1);return Zw(()=>{f.current=!0}),y.useCallback((m,p={})=>{if(Hn(f.current,Ww),!f.current)return;if(typeof m=="number"){a.go(m);return}let g=Qw(m,JSON.parse(c),o,p.relative==="path");t==null&&r!=="/"&&(g.pathname=g.pathname==="/"?r:Sr([r,g.pathname])),(p.replace?a.replace:a.push)(g,p.state,p)},[r,a,c,o,t])}y.createContext(null);function Jw(){let{matches:t}=y.useContext(Yn),r=t[t.length-1];return r?r.params:{}}function no(t,{relative:r}={}){let{matches:a}=y.useContext(Yn),{pathname:s}=pa(),o=JSON.stringify(Fw(a));return y.useMemo(()=>Qw(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function sD(t,r){return eE(t,r)}function eE(t,r,a,s){var N;We(eo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:c}=y.useContext(Vn),{matches:f}=y.useContext(Yn),d=f[f.length-1],m=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",b=d&&d.route;{let O=b&&b.path||"";tE(p,!b||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
263
+
264
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=pa(),E;if(r){let O=typeof r=="string"?Rs(r):r;We(g==="/"||((N=O.pathname)==null?void 0:N.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${O.pathname}" was given in the \`location\` prop.`),E=O}else E=x;let T=E.pathname||"/",S=T;if(g!=="/"){let O=g.replace(/^\//,"").split("/");S="/"+T.replace(/^\//,"").split("/").slice(O.length).join("/")}let w=!c&&a&&a.matches&&a.matches.length>0?a.matches:Vw(t,{pathname:S});Hn(b||w!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Hn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=fD(w&&w.map(O=>Object.assign({},O,{params:Object.assign({},m,O.params),pathname:Sr([g,o.encodeLocation?o.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?g:Sr([g,o.encodeLocation?o.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),f,a,s);return r&&C?y.createElement(Jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},C):C}function lD(){let t=gD(),r=eD(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),a?y.createElement("pre",{style:o},a):null,f)}var oD=y.createElement(lD,null),cD=class extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Yn.Provider,{value:this.props.routeContext},y.createElement(fp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function uD({routeContext:t,match:r,children:a}){let s=y.useContext(Ts);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Yn.Provider,{value:t},a)}function fD(t,r=[],a=null,s=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let o=t,c=a==null?void 0:a.errors;if(c!=null){let m=o.findIndex(p=>p.route.id&&(c==null?void 0:c[p.route.id])!==void 0);We(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let f=!1,d=-1;if(a)for(let m=0;m<o.length;m++){let p=o[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=m),p.route.id){let{loaderData:g,errors:b}=a,x=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!b||b[p.route.id]===void 0);if(p.route.lazy||x){f=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((m,p,g)=>{let b,x=!1,E=null,T=null;a&&(b=c&&p.route.id?c[p.route.id]:void 0,E=p.route.errorElement||oD,f&&(d<0&&g===0?(tE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,T=null):d===g&&(x=!0,T=p.route.hydrateFallbackElement||null)));let S=r.concat(o.slice(0,g+1)),w=()=>{let C;return b?C=E:x?C=T:p.route.Component?C=y.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=m,y.createElement(uD,{match:p,routeContext:{outlet:m,matches:S,isDataRoute:a!=null},children:C})};return a&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?y.createElement(cD,{location:a.location,revalidation:a.revalidation,component:E,error:b,children:w(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):w()},null)}function dp(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dD(t){let r=y.useContext(Ts);return We(r,dp(t)),r}function hD(t){let r=y.useContext(du);return We(r,dp(t)),r}function mD(t){let r=y.useContext(Yn);return We(r,dp(t)),r}function hp(t){let r=mD(t),a=r.matches[r.matches.length-1];return We(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function pD(){return hp("useRouteId")}function gD(){var s;let t=y.useContext(fp),r=hD("useRouteError"),a=hp("useRouteError");return t!==void 0?t:(s=r.errors)==null?void 0:s[a]}function vD(){let{router:t}=dD("useNavigate"),r=hp("useNavigate"),a=y.useRef(!1);return Zw(()=>{a.current=!0}),y.useCallback(async(o,c={})=>{Hn(a.current,Ww),a.current&&(typeof o=="number"?t.navigate(o):await t.navigate(o,{fromRouteId:r,...c}))},[t,r])}var b0={};function tE(t,r,a){!r&&!b0[t]&&(b0[t]=!0,Hn(!1,a))}y.memo(yD);function yD({routes:t,future:r,state:a}){return eE(t,void 0,a,r)}function qa(t){We(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function bD({basename:t="/",children:r=null,location:a,navigationType:s="POP",navigator:o,static:c=!1}){We(!eo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),d=y.useMemo(()=>({basename:f,navigator:o,static:c,future:{}}),[f,o,c]);typeof a=="string"&&(a=Rs(a));let{pathname:m="/",search:p="",hash:g="",state:b=null,key:x="default"}=a,E=y.useMemo(()=>{let T=Tr(m,f);return T==null?null:{location:{pathname:T,search:p,hash:g,state:b,key:x},navigationType:s}},[f,m,p,g,b,x,s]);return Hn(E!=null,`<Router basename="${f}"> is not able to match the URL "${m}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:y.createElement(Vn.Provider,{value:d},y.createElement(Jl.Provider,{children:r,value:E}))}function xD({children:t,location:r}){return sD(Tm(t),r)}function Tm(t,r=[]){let a=[];return y.Children.forEach(t,(s,o)=>{if(!y.isValidElement(s))return;let c=[...r,o];if(s.type===y.Fragment){a.push.apply(a,Tm(s.props.children,c));return}We(s.type===qa,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),We(!s.props.index||!s.props.children,"An index route cannot have child routes.");let f={id:s.props.id||c.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(f.children=Tm(s.props.children,c)),a.push(f)}),a}var Pc="get",Uc="application/x-www-form-urlencoded";function hu(t){return t!=null&&typeof t.tagName=="string"}function SD(t){return hu(t)&&t.tagName.toLowerCase()==="button"}function wD(t){return hu(t)&&t.tagName.toLowerCase()==="form"}function ED(t){return hu(t)&&t.tagName.toLowerCase()==="input"}function RD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function TD(t,r){return t.button===0&&(!r||r==="_self")&&!RD(t)}var Tc=null;function CD(){if(Tc===null)try{new FormData(document.createElement("form"),0),Tc=!1}catch{Tc=!0}return Tc}var AD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ah(t){return t!=null&&!AD.has(t)?(Hn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Uc}"`),null):t}function ND(t,r){let a,s,o,c,f;if(wD(t)){let d=t.getAttribute("action");s=d?Tr(d,r):null,a=t.getAttribute("method")||Pc,o=ah(t.getAttribute("enctype"))||Uc,c=new FormData(t)}else if(SD(t)||ED(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(s=m?Tr(m,r):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Pc,o=ah(t.getAttribute("formenctype"))||ah(d.getAttribute("enctype"))||Uc,c=new FormData(d,t),!CD()){let{name:p,type:g,value:b}=t;if(g==="image"){let x=p?`${p}.`:"";c.append(`${x}x`,"0"),c.append(`${x}y`,"0")}else p&&c.append(p,b)}}else{if(hu(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Pc,s=null,o=Uc,f=t}return c&&o==="text/plain"&&(f=c,c=void 0),{action:s,method:a.toLowerCase(),encType:o,formData:c,body:f}}function mp(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}async function OD(t,r){if(t.id in r)return r[t.id];try{let a=await import(t.module);return r[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function MD(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function jD(t,r,a){let s=await Promise.all(t.map(async o=>{let c=r.routes[o.route.id];if(c){let f=await OD(c,a);return f.links?f.links():[]}return[]}));return zD(s.flat(1).filter(MD).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function x0(t,r,a,s,o,c){let f=(m,p)=>a[p]?m.route.id!==a[p].route.id:!0,d=(m,p)=>{var g;return a[p].pathname!==m.pathname||((g=a[p].route.path)==null?void 0:g.endsWith("*"))&&a[p].params["*"]!==m.params["*"]};return c==="assets"?r.filter((m,p)=>f(m,p)||d(m,p)):c==="data"?r.filter((m,p)=>{var b;let g=s.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(f(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=a[0])==null?void 0:b.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function DD(t,r,{includeHydrateFallback:a}={}){return _D(t.map(s=>{let o=r.routes[s.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function _D(t){return[...new Set(t)]}function LD(t){let r={},a=Object.keys(t).sort();for(let s of a)r[s]=t[s];return r}function zD(t,r){let a=new Set;return new Set(r),t.reduce((s,o)=>{let c=JSON.stringify(LD(o));return a.has(c)||(a.add(c),s.push({key:c,link:o})),s},[])}function PD(t,r){let a=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a.pathname==="/"?a.pathname="_root.data":r&&Tr(a.pathname,r)==="/"?a.pathname=`${r.replace(/\/$/,"")}/_root.data`:a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a}function nE(){let t=y.useContext(Ts);return mp(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function UD(){let t=y.useContext(du);return mp(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var pp=y.createContext(void 0);pp.displayName="FrameworkContext";function rE(){let t=y.useContext(pp);return mp(t,"You must render this element inside a <HydratedRouter> element"),t}function kD(t,r){let a=y.useContext(pp),[s,o]=y.useState(!1),[c,f]=y.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:g,onTouchStart:b}=r,x=y.useRef(null);y.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let S=C=>{C.forEach(N=>{f(N.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[t]),y.useEffect(()=>{if(s){let S=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(S)}}},[s]);let E=()=>{o(!0)},T=()=>{o(!1),f(!1)};return a?t!=="intent"?[c,x,{}]:[c,x,{onFocus:Ol(d,E),onBlur:Ol(m,T),onMouseEnter:Ol(p,E),onMouseLeave:Ol(g,T),onTouchStart:Ol(b,E)}]:[!1,x,{}]}function Ol(t,r){return a=>{t&&t(a),a.defaultPrevented||r(a)}}function $D({page:t,...r}){let{router:a}=nE(),s=y.useMemo(()=>Vw(a.routes,t,a.basename),[a.routes,t,a.basename]);return s?y.createElement(qD,{page:t,matches:s,...r}):null}function HD(t){let{manifest:r,routeModules:a}=rE(),[s,o]=y.useState([]);return y.useEffect(()=>{let c=!1;return jD(t,r,a).then(f=>{c||o(f)}),()=>{c=!0}},[t,r,a]),s}function qD({page:t,matches:r,...a}){let s=pa(),{manifest:o,routeModules:c}=rE(),{basename:f}=nE(),{loaderData:d,matches:m}=UD(),p=y.useMemo(()=>x0(t,r,m,o,s,"data"),[t,r,m,o,s]),g=y.useMemo(()=>x0(t,r,m,o,s,"assets"),[t,r,m,o,s]),b=y.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let T=new Set,S=!1;if(r.forEach(C=>{var O;let N=o.routes[C.route.id];!N||!N.hasLoader||(!p.some(_=>_.route.id===C.route.id)&&C.route.id in d&&((O=c[C.route.id])!=null&&O.shouldRevalidate)||N.hasClientLoader?S=!0:T.add(C.route.id))}),T.size===0)return[];let w=PD(t,f);return S&&T.size>0&&w.searchParams.set("_routes",r.filter(C=>T.has(C.route.id)).map(C=>C.route.id).join(",")),[w.pathname+w.search]},[f,d,s,o,p,r,t,c]),x=y.useMemo(()=>DD(g,o),[g,o]),E=HD(g);return y.createElement(y.Fragment,null,b.map(T=>y.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...a})),x.map(T=>y.createElement("link",{key:T,rel:"modulepreload",href:T,...a})),E.map(({key:T,link:S})=>y.createElement("link",{key:T,...S})))}function BD(...t){return r=>{t.forEach(a=>{typeof a=="function"?a(r):a!=null&&(a.current=r)})}}var aE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aE&&(window.__reactRouterVersion="7.3.0")}catch{}function ID({basename:t,children:r,window:a}){let s=y.useRef();s.current==null&&(s.current=Dj({window:a,v5Compat:!0}));let o=s.current,[c,f]=y.useState({action:o.action,location:o.location}),d=y.useCallback(m=>{y.startTransition(()=>f(m))},[f]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.createElement(bD,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:o})}var iE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sE=y.forwardRef(function({onClick:r,discover:a="render",prefetch:s="none",relative:o,reloadDocument:c,replace:f,state:d,target:m,to:p,preventScrollReset:g,viewTransition:b,...x},E){let{basename:T}=y.useContext(Vn),S=typeof p=="string"&&iE.test(p),w,C=!1;if(typeof p=="string"&&S&&(w=p,aE))try{let U=new URL(window.location.href),K=p.startsWith("//")?new URL(U.protocol+p):new URL(p),te=Tr(K.pathname,T);K.origin===U.origin&&te!=null?p=te+K.search+K.hash:C=!0}catch{Hn(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let N=aD(p,{relative:o}),[O,_,L]=kD(s,x),k=GD(p,{replace:f,state:d,target:m,preventScrollReset:g,relative:o,viewTransition:b});function V(U){r&&r(U),U.defaultPrevented||k(U)}let $=y.createElement("a",{...x,...L,href:w||N,onClick:C||c?r:V,ref:BD(E,_),target:m,"data-discover":!S&&a==="render"?"true":void 0});return O&&!S?y.createElement(y.Fragment,null,$,y.createElement($D,{page:N})):$});sE.displayName="Link";var Va=y.forwardRef(function({"aria-current":r="page",caseSensitive:a=!1,className:s="",end:o=!1,style:c,to:f,viewTransition:d,children:m,...p},g){let b=no(f,{relative:p.relative}),x=pa(),E=y.useContext(du),{navigator:T,basename:S}=y.useContext(Vn),w=E!=null&&WD(b)&&d===!0,C=T.encodeLocation?T.encodeLocation(b).pathname:b.pathname,N=x.pathname,O=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;a||(N=N.toLowerCase(),O=O?O.toLowerCase():null,C=C.toLowerCase()),O&&S&&(O=Tr(O,S)||O);const _=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let L=N===C||!o&&N.startsWith(C)&&N.charAt(_)==="/",k=O!=null&&(O===C||!o&&O.startsWith(C)&&O.charAt(C.length)==="/"),V={isActive:L,isPending:k,isTransitioning:w},$=L?r:void 0,U;typeof s=="function"?U=s(V):U=[s,L?"active":null,k?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let K=typeof c=="function"?c(V):c;return y.createElement(sE,{...p,"aria-current":$,className:U,ref:g,style:K,to:f,viewTransition:d},typeof m=="function"?m(V):m)});Va.displayName="NavLink";var VD=y.forwardRef(({discover:t="render",fetcherKey:r,navigate:a,reloadDocument:s,replace:o,state:c,method:f=Pc,action:d,onSubmit:m,relative:p,preventScrollReset:g,viewTransition:b,...x},E)=>{let T=XD(),S=KD(d,{relative:p}),w=f.toLowerCase()==="get"?"get":"post",C=typeof d=="string"&&iE.test(d),N=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let _=O.nativeEvent.submitter,L=(_==null?void 0:_.getAttribute("formmethod"))||f;T(_||O.currentTarget,{fetcherKey:r,method:L,navigate:a,replace:o,state:c,relative:p,preventScrollReset:g,viewTransition:b})};return y.createElement("form",{ref:E,method:w,action:S,onSubmit:s?m:N,...x,"data-discover":!C&&t==="render"?"true":void 0})});VD.displayName="Form";function YD(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lE(t){let r=y.useContext(Ts);return We(r,YD(t)),r}function GD(t,{target:r,replace:a,state:s,preventScrollReset:o,relative:c,viewTransition:f}={}){let d=to(),m=pa(),p=no(t,{relative:c});return y.useCallback(g=>{if(TD(g,r)){g.preventDefault();let b=a!==void 0?a:Hl(m)===Hl(p);d(t,{replace:b,state:s,preventScrollReset:o,relative:c,viewTransition:f})}},[m,d,p,a,s,r,t,o,c,f])}var FD=0,QD=()=>`__${String(++FD)}__`;function XD(){let{router:t}=lE("useSubmit"),{basename:r}=y.useContext(Vn),a=pD();return y.useCallback(async(s,o={})=>{let{action:c,method:f,encType:d,formData:m,body:p}=ND(s,r);if(o.navigate===!1){let g=o.fetcherKey||QD();await t.fetch(g,a,o.action||c,{preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||f,formEncType:o.encType||d,flushSync:o.flushSync})}else await t.navigate(o.action||c,{preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||f,formEncType:o.encType||d,replace:o.replace,state:o.state,fromRouteId:a,flushSync:o.flushSync,viewTransition:o.viewTransition})},[t,r,a])}function KD(t,{relative:r}={}){let{basename:a}=y.useContext(Vn),s=y.useContext(Yn);We(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),c={...no(t||".",{relative:r})},f=pa();if(t==null){c.search=f.search;let d=new URLSearchParams(c.search),m=d.getAll("index");if(m.some(g=>g==="")){d.delete("index"),m.filter(b=>b).forEach(b=>d.append("index",b));let g=d.toString();c.search=g?`?${g}`:""}}return(!t||t===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:Sr([a,c.pathname])),Hl(c)}function WD(t,r={}){let a=y.useContext(Kw);We(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=lE("useViewTransitionState"),o=no(t,{relative:r.relative});if(!a.isTransitioning)return!1;let c=Tr(a.currentLocation.pathname,s)||a.currentLocation.pathname,f=Tr(a.nextLocation.pathname,s)||a.nextLocation.pathname;return Fc(o.pathname,f)!=null||Fc(o.pathname,c)!=null}new TextEncoder;const ZD=ma("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Cm({className:t,variant:r,...a}){return v.jsx("div",{className:le(ZD({variant:r}),t),...a})}var JD="Label",oE=y.forwardRef((t,r)=>v.jsx(we.label,{...t,ref:r,onMouseDown:a=>{var o;a.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));oE.displayName=JD;var cE=oE;const e_=ma("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qc=y.forwardRef(({className:t,...r},a)=>v.jsx(cE,{ref:a,className:le(e_(),t),...r}));Qc.displayName=cE.displayName;const t_=({tag:t,onRemove:r})=>v.jsxs(Cm,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-white hover:text-black dark:hover:text-black",children:[t,v.jsxs(Qe,{type:"button",variant:"ghost",size:"icon",onClick:()=>r(t),className:"hover:bg-muted/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[v.jsx(bs,{className:"h-3 w-3"}),v.jsxs("span",{className:"sr-only",children:["Remove ",t]})]})]}),n_=({tags:t,onRemove:r})=>v.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(a=>v.jsx(t_,{tag:a,onRemove:r},a))}),r_=({value:t,onChange:r,onKeyDown:a})=>v.jsx(vr,{value:t,onChange:r,onKeyDown:a,placeholder:"Type and press Enter to add...",className:le("bg-background",!t&&"text-muted-foreground")});function a_({title:t,data:r,onChange:a}){const[s,o]=y.useState(""),c=d=>{if(d.key==="Enter"){d.preventDefault();const m=s.trim();m&&!r.includes(m)&&(a([...r,m]),o(""))}},f=d=>{a(r.filter(m=>m!==d))};return v.jsxs("div",{className:"space-y-2",children:[v.jsx(Qc,{children:t}),v.jsxs("div",{className:"p-2 bg-card rounded-md border",children:[v.jsx(n_,{tags:r,onRemove:f}),v.jsx(r_,{value:s,onChange:d=>o(d.target.value),onKeyDown:c})]})]})}const mu=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("rounded-xl border bg-card text-card-foreground shadow",t),...r}));mu.displayName="Card";const uE=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("flex flex-col space-y-1.5 p-6",t),...r}));uE.displayName="CardHeader";const fE=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("font-semibold leading-none tracking-tight",t),...r}));fE.displayName="CardTitle";const i_=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("text-sm text-muted-foreground",t),...r}));i_.displayName="CardDescription";const gp=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("p-6 pt-0",t),...r}));gp.displayName="CardContent";const dE=y.forwardRef(({className:t,...r},a)=>v.jsx("div",{ref:a,className:le("flex items-center p-6 pt-0",t),...r}));dE.displayName="CardFooter";function vp(t){const r=t+"CollectionProvider",[a,s]=qn(r),[o,c]=a(r,{collectionRef:{current:null},itemMap:new Map}),f=E=>{const{scope:T,children:S}=E,w=hr.useRef(null),C=hr.useRef(new Map).current;return v.jsx(o,{scope:T,itemMap:C,collectionRef:w,children:S})};f.displayName=r;const d=t+"CollectionSlot",m=hr.forwardRef((E,T)=>{const{scope:S,children:w}=E,C=c(d,S),N=Ue(T,C.collectionRef);return v.jsx(sn,{ref:N,children:w})});m.displayName=d;const p=t+"CollectionItemSlot",g="data-radix-collection-item",b=hr.forwardRef((E,T)=>{const{scope:S,children:w,...C}=E,N=hr.useRef(null),O=Ue(T,N),_=c(p,S);return hr.useEffect(()=>(_.itemMap.set(N,{ref:N,...C}),()=>void _.itemMap.delete(N))),v.jsx(sn,{[g]:"",ref:O,children:w})});b.displayName=p;function x(E){const T=c(t+"CollectionConsumer",E);return hr.useCallback(()=>{const w=T.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${g}]`));return Array.from(T.itemMap.values()).sort((_,L)=>C.indexOf(_.ref.current)-C.indexOf(L.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:f,Slot:m,ItemSlot:b},x,s]}var s_=y.createContext(void 0);function pu(t){const r=y.useContext(s_);return t||r||"ltr"}var ih="rovingFocusGroup.onEntryFocus",l_={bubbles:!1,cancelable:!0},gu="RovingFocusGroup",[Am,hE,o_]=vp(gu),[c_,mE]=qn(gu,[o_]),[u_,f_]=c_(gu),pE=y.forwardRef((t,r)=>v.jsx(Am.Provider,{scope:t.__scopeRovingFocusGroup,children:v.jsx(Am.Slot,{scope:t.__scopeRovingFocusGroup,children:v.jsx(d_,{...t,ref:r})})}));pE.displayName=gu;var d_=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:a,orientation:s,loop:o=!1,dir:c,currentTabStopId:f,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:g=!1,...b}=t,x=y.useRef(null),E=Ue(r,x),T=pu(c),[S=null,w]=ei({prop:f,defaultProp:d,onChange:m}),[C,N]=y.useState(!1),O=nt(p),_=hE(a),L=y.useRef(!1),[k,V]=y.useState(0);return y.useEffect(()=>{const $=x.current;if($)return $.addEventListener(ih,O),()=>$.removeEventListener(ih,O)},[O]),v.jsx(u_,{scope:a,orientation:s,dir:T,loop:o,currentTabStopId:S,onItemFocus:y.useCallback($=>w($),[w]),onItemShiftTab:y.useCallback(()=>N(!0),[]),onFocusableItemAdd:y.useCallback(()=>V($=>$+1),[]),onFocusableItemRemove:y.useCallback(()=>V($=>$-1),[]),children:v.jsx(we.div,{tabIndex:C||k===0?-1:0,"data-orientation":s,...b,ref:E,style:{outline:"none",...t.style},onMouseDown:ve(t.onMouseDown,()=>{L.current=!0}),onFocus:ve(t.onFocus,$=>{const U=!L.current;if($.target===$.currentTarget&&U&&!C){const K=new CustomEvent(ih,l_);if($.currentTarget.dispatchEvent(K),!K.defaultPrevented){const te=_().filter(j=>j.focusable),se=te.find(j=>j.active),de=te.find(j=>j.id===S),H=[se,de,...te].filter(Boolean).map(j=>j.ref.current);yE(H,g)}}L.current=!1}),onBlur:ve(t.onBlur,()=>N(!1))})})}),gE="RovingFocusGroupItem",vE=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:a,focusable:s=!0,active:o=!1,tabStopId:c,...f}=t,d=yr(),m=c||d,p=f_(gE,a),g=p.currentTabStopId===m,b=hE(a),{onFocusableItemAdd:x,onFocusableItemRemove:E}=p;return y.useEffect(()=>{if(s)return x(),()=>E()},[s,x,E]),v.jsx(Am.ItemSlot,{scope:a,id:m,focusable:s,active:o,children:v.jsx(we.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...f,ref:r,onMouseDown:ve(t.onMouseDown,T=>{s?p.onItemFocus(m):T.preventDefault()}),onFocus:ve(t.onFocus,()=>p.onItemFocus(m)),onKeyDown:ve(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){p.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const S=p_(T,p.orientation,p.dir);if(S!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=b().filter(N=>N.focusable).map(N=>N.ref.current);if(S==="last")C.reverse();else if(S==="prev"||S==="next"){S==="prev"&&C.reverse();const N=C.indexOf(T.currentTarget);C=p.loop?g_(C,N+1):C.slice(N+1)}setTimeout(()=>yE(C))}})})})});vE.displayName=gE;var h_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function m_(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function p_(t,r,a){const s=m_(t.key,a);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return h_[s]}function yE(t,r=!1){const a=document.activeElement;for(const s of t)if(s===a||(s.focus({preventScroll:r}),document.activeElement!==a))return}function g_(t,r){return t.map((a,s)=>t[(r+s)%t.length])}var v_=pE,y_=vE,yp="Tabs",[b_,pz]=qn(yp,[mE]),bE=mE(),[x_,bp]=b_(yp),xE=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,onValueChange:o,defaultValue:c,orientation:f="horizontal",dir:d,activationMode:m="automatic",...p}=t,g=pu(d),[b,x]=ei({prop:s,onChange:o,defaultProp:c});return v.jsx(x_,{scope:a,baseId:yr(),value:b,onValueChange:x,orientation:f,dir:g,activationMode:m,children:v.jsx(we.div,{dir:g,"data-orientation":f,...p,ref:r})})});xE.displayName=yp;var SE="TabsList",wE=y.forwardRef((t,r)=>{const{__scopeTabs:a,loop:s=!0,...o}=t,c=bp(SE,a),f=bE(a);return v.jsx(v_,{asChild:!0,...f,orientation:c.orientation,dir:c.dir,loop:s,children:v.jsx(we.div,{role:"tablist","aria-orientation":c.orientation,...o,ref:r})})});wE.displayName=SE;var EE="TabsTrigger",RE=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,disabled:o=!1,...c}=t,f=bp(EE,a),d=bE(a),m=AE(f.baseId,s),p=NE(f.baseId,s),g=s===f.value;return v.jsx(y_,{asChild:!0,...d,focusable:!o,active:g,children:v.jsx(we.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":p,"data-state":g?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...c,ref:r,onMouseDown:ve(t.onMouseDown,b=>{!o&&b.button===0&&b.ctrlKey===!1?f.onValueChange(s):b.preventDefault()}),onKeyDown:ve(t.onKeyDown,b=>{[" ","Enter"].includes(b.key)&&f.onValueChange(s)}),onFocus:ve(t.onFocus,()=>{const b=f.activationMode!=="manual";!g&&!o&&b&&f.onValueChange(s)})})})});RE.displayName=EE;var TE="TabsContent",CE=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,forceMount:o,children:c,...f}=t,d=bp(TE,a),m=AE(d.baseId,s),p=NE(d.baseId,s),g=s===d.value,b=y.useRef(g);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),v.jsx(ln,{present:o||g,children:({present:x})=>v.jsx(we.div,{"data-state":g?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":m,hidden:!x,id:p,tabIndex:0,...f,ref:r,style:{...t.style,animationDuration:b.current?"0s":void 0},children:x&&c})})});CE.displayName=TE;function AE(t,r){return`${t}-trigger-${r}`}function NE(t,r){return`${t}-content-${r}`}var S_=xE,OE=wE,ME=RE,jE=CE;const w_=S_,DE=y.forwardRef(({className:t,...r},a)=>v.jsx(OE,{ref:a,className:le("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));DE.displayName=OE.displayName;const Nm=y.forwardRef(({className:t,...r},a)=>v.jsx(ME,{ref:a,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...r}));Nm.displayName=ME.displayName;const Om=y.forwardRef(({className:t,...r},a)=>v.jsx(jE,{ref:a,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));Om.displayName=jE.displayName;const xp=y.forwardRef(({className:t,...r},a)=>v.jsx("textarea",{className:le("flex min-h-[60px] select-none w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm 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",t),ref:a,...r}));xp.displayName="Textarea";const E_=1,R_=1e6;let sh=0;function T_(){return sh=(sh+1)%Number.MAX_SAFE_INTEGER,sh.toString()}const lh=new Map,S0=t=>{if(lh.has(t))return;const r=setTimeout(()=>{lh.delete(t),Pl({type:"REMOVE_TOAST",toastId:t})},R_);lh.set(t,r)},C_=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,E_)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(a=>a.id===r.toast.id?{...a,...r.toast}:a)};case"DISMISS_TOAST":{const{toastId:a}=r;if(a)S0(a);else for(const s of t.toasts)S0(s.id);return{...t,toasts:t.toasts.map(s=>s.id===a||a===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==r.toastId)}}},kc=[];let $c={toasts:[]};function Pl(t){$c=C_($c,t);for(const r of kc)r($c)}function A_({...t}){const r=T_(),a=o=>Pl({type:"UPDATE_TOAST",toast:{...o,id:r}}),s=()=>Pl({type:"DISMISS_TOAST",toastId:r});return Pl({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:o=>{o||s()}}}),{id:r,dismiss:s,update:a}}function xn(){const[t,r]=y.useState($c);return y.useEffect(()=>(kc.push(r),()=>{const a=kc.indexOf(r);a>-1&&kc.splice(a,1)}),[]),{...t,toast:A_,dismiss:a=>Pl({type:"DISMISS_TOAST",toastId:a})}}const w0=[{sectionTitle:"Basic Info",sectionValue:"basic",sectionType:"input",fields:[{title:"Name",name:"name",description:"The display name of your character",fieldType:"text",getValue:t=>t.name||""},{title:"Username",name:"username",description:"Unique identifier for your character",fieldType:"text",getValue:t=>t.username||""},{title:"System",name:"system",description:"System prompt for character behavior",fieldType:"textarea",getValue:t=>t.system||""},{title:"Voice Model",name:"settings.voice.model",description:"Voice model used for speech synthesis",fieldType:"text",getValue:t=>{var r,a;return((a=(r=t.settings)==null?void 0:r.voice)==null?void 0:a.model)||""}}]},{sectionTitle:"Content",sectionValue:"content",sectionType:"array",fields:[{title:"Bio",description:"Key information about your character",path:"bio",getData:t=>Array.isArray(t.bio)?t.bio:[]},{title:"Topics",description:"Topics your character is knowledgeable about",path:"topics",getData:t=>t.topics||[]},{title:"Adjectives",description:"Words that describe your character's personality",path:"adjectives",getData:t=>t.adjectives||[]}]},{sectionTitle:"Style",sectionValue:"style",sectionType:"array",fields:[{title:"All",description:"Style rules applied to all interactions",path:"style.all",getData:t=>{var r;return((r=t.style)==null?void 0:r.all)||[]}},{title:"Chat",description:"Style rules for chat interactions",path:"style.chat",getData:t=>{var r;return((r=t.style)==null?void 0:r.chat)||[]}},{title:"Post",description:"Style rules for social media posts",path:"style.post",getData:t=>{var r;return((r=t.style)==null?void 0:r.post)||[]}}]}];function _E({characterValue:t,setCharacterValue:r,title:a,description:s,onSubmit:o,onDelete:c,onReset:f,customComponents:d=[]}){const{toast:m}=xn(),[p,g]=y.useState(!1),b=w=>{const{name:C,value:N,type:O}=w.target,_=w.target.checked;if(C.includes(".")){const L=C.split(".");r(k=>{const V={...k};let $=V;for(let U=0;U<L.length-1;U++)$[L[U]]||($[L[U]]={}),$=$[L[U]];return $[L[L.length-1]]=O==="checkbox"?_:N,V})}else r(L=>({...L,[C]:O==="checkbox"?_:N}))},x=(w,C)=>{r(N=>{const O={...N},_=w.split(".");let L=O;for(let k=0;k<_.length-1;k++){const V=_[k];(!L[V]||typeof L[V]!="object")&&(L[V]={}),L=L[V]}return L[_[_.length-1]]=C,O})},E=async w=>{w.preventDefault(),g(!0);try{await o(t)}catch(C){m({title:"Error",description:C instanceof Error?C.message:"Failed to update",variant:"destructive"})}finally{g(!1)}},T=w=>v.jsxs("div",{className:"space-y-2",children:[v.jsx(Qc,{htmlFor:w.name,children:w.title}),w.description&&v.jsx("p",{className:"text-sm text-muted-foreground",children:w.description}),w.fieldType==="textarea"?v.jsx(xp,{id:w.name,name:w.name,value:w.getValue(t),onChange:b,className:"min-h-[120px] resize-y"}):w.fieldType==="checkbox"?v.jsx(vr,{id:w.name,name:w.name,type:"checkbox",checked:t[w.name]==="true",onChange:b}):v.jsx(vr,{id:w.name,name:w.name,type:w.fieldType,value:w.getValue(t),onChange:b})]},w.name),S=w=>v.jsxs("div",{className:"space-y-2",children:[v.jsx(Qc,{htmlFor:w.path,children:w.title}),w.description&&v.jsx("p",{className:"text-sm text-muted-foreground",children:w.description}),v.jsx(a_,{data:w.getData(t),onChange:C=>x(w.path,C)})]},w.path);return v.jsxs("div",{className:"container max-w-4xl mx-auto p-6",children:[v.jsx("div",{className:"flex items-center justify-between mb-6",children:v.jsxs("div",{children:[v.jsx("h1",{className:"text-3xl font-bold",children:a}),v.jsx("p",{className:"text-muted-foreground mt-1",children:s})]})}),v.jsxs("form",{onSubmit:E,children:[v.jsxs(w_,{defaultValue:"basic",className:"w-full",children:[v.jsxs(DE,{className:"grid w-full mb-6",style:{gridTemplateColumns:`repeat(${d.length+3}, minmax(0, 1fr))`},children:[w0.map(w=>v.jsx(Nm,{value:w.sectionValue,children:w.sectionTitle},w.sectionValue)),d.map(w=>v.jsx(Nm,{value:`custom-${w.name}`,children:w.name},`custom-${w.name}`))]}),v.jsx(mu,{children:v.jsxs(gp,{className:"p-6",children:[w0.map(w=>v.jsx(Om,{value:w.sectionValue,className:"space-y-6",children:w.sectionType==="input"?w.fields.map(T):w.fields.map(S)},w.sectionValue)),d.map(w=>v.jsx(Om,{value:`custom-${w.name}`,children:w.component},`custom-${w.name}`))]})})]}),v.jsxs("div",{className:"flex justify-between gap-4 mt-6",children:[v.jsx("div",{className:"flex gap-4 text-red-500",children:v.jsx(Qe,{type:"button",variant:"outline",onClick:()=>{c==null||c()},children:"Delete Character"})}),v.jsxs("div",{className:"flex gap-4",children:[v.jsx(Qe,{type:"button",variant:"outline",onClick:()=>{f==null||f()},children:"Reset Changes"}),v.jsx(Qe,{type:"submit",disabled:p,children:p?"Saving...":"Save Changes"})]})]})]})]})}const oh="elizaos-world-id",Ya={getWorldId:()=>{const t=localStorage.getItem(oh);if(t)return t;const r=crypto.randomUUID();return localStorage.setItem(oh,r),r},resetWorldId:()=>{const t=crypto.randomUUID();return localStorage.setItem(oh,t),t},getRoomStorageKey:t=>`room-${Ya.getWorldId()}-${t}`},N_="http://localhost:3000",lt=async({url:t,method:r,body:a,headers:s})=>{const o={method:r??"GET",headers:s||{Accept:"application/json","Content-Type":"application/json"}};return(r==="POST"||r==="PUT"||r==="PATCH")&&(a instanceof FormData?(o.headers&&typeof o.headers=="object"&&(o.headers=Object.fromEntries(Object.entries(o.headers).filter(([c])=>c!=="Content-Type"))),o.body=a):o.body=JSON.stringify(a)),fetch(`${N_}${t}`,o).then(async c=>{if(c.headers.get("Content-Type")==="audio/mpeg")return await c.blob();if(!c.ok){const d=await c.text();console.error("Error: ",d);let m="An error occurred.";try{m=JSON.parse(d).message||m}catch{m=d||m}throw new Error(m)}try{return await c.json()}catch(d){return console.error("JSON Parse Error:",d),null}})},Lt={sendMessage:(t,r,a,s)=>{const o=Ya.getWorldId();if(a){const c=new FormData;return c.append("text",r),c.append("name","Anon"),c.append("file",a),s&&c.append("roomId",s),c.append("worldId",o),lt({url:`/agents/${t}/messages`,method:"POST",body:c})}return lt({url:`/agents/${t}/messages`,method:"POST",body:{text:r,name:"Anon",roomId:s||void 0,worldId:o}})},getAgents:()=>lt({url:"/agents"}),getAgent:t=>lt({url:`/agents/${t}`}),tts:(t,r)=>lt({url:`/agents/${t}/speech/generate`,method:"POST",body:{text:r},headers:{"Content-Type":"application/json",Accept:"audio/mpeg","Transfer-Encoding":"chunked"}}),whisper:async(t,r)=>{const a=new FormData;return a.append("file",r,"recording.wav"),lt({url:`/agents/${t}/transcriptions`,method:"POST",body:a})},sendAudioMessage:async(t,r,a)=>{const s=new FormData;if(s.append("file",r,"recording.wav"),a)for(const[o,c]of Object.entries(a))c&&s.append(o,c);return lt({url:`/agents/${t}/audio-messages`,method:"POST",body:s})},speechConversation:async(t,r,a)=>lt({url:`/agents/${t}/speech/conversation`,method:"POST",body:{text:r,...a},headers:{"Content-Type":"application/json",Accept:"audio/mpeg","Transfer-Encoding":"chunked"}}),deleteAgent:t=>lt({url:`/agents/${t}`,method:"DELETE"}),updateAgent:(t,r)=>lt({url:`/agents/${t}`,method:"PATCH",body:r}),createAgent:t=>lt({url:"/agents/",method:"POST",body:t}),startAgent:t=>lt({url:`/agents/${t}`,method:"POST",body:{start:!0}}),stopAgent:t=>lt({url:`/agents/${t}`,method:"PUT"}),getMemories:(t,r,a)=>{const o={worldId:Ya.getWorldId()};return a!=null&&a.limit&&(o.limit=a.limit),a!=null&&a.before&&(o.end=a.before),lt({url:`/agents/${t}/rooms/${r}/memories`,method:"GET",body:o})},getRooms:t=>{const r=Ya.getWorldId();return lt({url:`/agents/${t}/rooms`,method:"GET",body:{worldId:r}})},createRoom:(t,r)=>{const a=Ya.getWorldId();return lt({url:`/agents/${t}/rooms`,method:"POST",body:{name:r,worldId:a}})},getRoom:(t,r)=>lt({url:`/agents/${t}/rooms/${r}`,method:"GET"}),updateRoom:(t,r,a)=>lt({url:`/agents/${t}/rooms/${r}`,method:"PATCH",body:a}),deleteRoom:(t,r)=>lt({url:`/agents/${t}/rooms/${r}`,method:"DELETE"}),getLogs:t=>lt({url:`/logs?level=${t}`,method:"GET"})},O_=MS,M_=LO,j_=jS,LE=y.forwardRef(({className:t,...r},a)=>v.jsx(eu,{ref:a,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));LE.displayName=eu.displayName;const zE=y.forwardRef(({className:t,children:r,...a},s)=>v.jsxs(j_,{children:[v.jsx(LE,{}),v.jsxs(tu,{ref:s,className:le("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 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...a,children:[r,v.jsxs(DS,{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 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[v.jsx(bs,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zE.displayName=tu.displayName;const PE=({className:t,...r})=>v.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});PE.displayName="DialogHeader";const UE=y.forwardRef(({className:t,...r},a)=>v.jsx(nu,{ref:a,className:le("text-lg font-semibold leading-none tracking-tight",t),...r}));UE.displayName=nu.displayName;const D_=y.forwardRef(({className:t,...r},a)=>v.jsx(ru,{ref:a,className:le("text-sm text-muted-foreground",t),...r}));D_.displayName=ru.displayName;function __(){return Es({queryKey:["plugins"],queryFn:async()=>(await fetch("https://raw.githubusercontent.com/elizaos/registry/refs/heads/main/index.json")).json()})}function kE({characterValue:t,setCharacterValue:r}){const{data:a,error:s}=__(),[o,c]=y.useState(""),[f,d]=y.useState(!1),m=y.useMemo(()=>a?Object.keys(a).map(x=>x.replace(/^@elizaos-plugins\//,"@elizaos/")):[],[a]),p=y.useMemo(()=>Array.isArray(t==null?void 0:t.plugins)?t.plugins:[],[t==null?void 0:t.plugins]),g=y.useMemo(()=>m.filter(x=>!p.includes(x)).filter(x=>x.toLowerCase().includes(o.toLowerCase())),[m,p,o]),b=x=>{r(E=>{const T=Array.isArray(E.plugins)?E.plugins:[],S=T.includes(x)?T.filter(w=>w!==x):[...T,x];return{...E,plugins:S}})};return v.jsx("div",{className:"space-y-6",children:v.jsx("div",{className:"space-y-4",children:v.jsxs("div",{children:[v.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Plugins"}),s?v.jsxs("p",{className:"text-destructive",children:["Failed to load plugins: ",s.message]}):v.jsxs("div",{className:"space-y-4",children:[p.length>0&&v.jsxs("div",{className:"rounded-md bg-muted p-4",children:[v.jsx("h4",{className:"text-sm font-medium mb-2",children:"Currently Enabled"}),v.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(x=>v.jsxs(Qe,{type:"button",variant:"ghost",size:"sm",className:"inline-flex items-center rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20 h-auto",onClick:()=>b(x),children:[x," ×"]},x))})]}),v.jsx("div",{className:"space-y-2",children:v.jsxs(O_,{open:f,onOpenChange:d,children:[v.jsx(M_,{asChild:!0,children:v.jsx(Qe,{variant:"outline",className:"w-full justify-start",children:"Search and add plugins..."})}),v.jsxs(zE,{className:"max-w-[400px]",children:[v.jsx(PE,{children:v.jsx(UE,{children:"Add Plugins"})}),v.jsxs("div",{className:"space-y-4 py-4",children:[v.jsx("div",{className:"space-y-2",children:v.jsx(vr,{type:"search",placeholder:"Search plugins...",value:o,onChange:x=>c(x.target.value)})}),v.jsx("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:g.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins found."}):g.map(x=>v.jsx(Qe,{variant:"ghost",className:"w-full justify-start font-normal",onClick:()=>{b(x),c(""),d(!1)},children:x},x))})]})]})]})})]})]})})})}function $E({characterValue:t,setCharacterValue:r}){var L;const[a,s]=y.useState(Object.entries(((L=t==null?void 0:t.settings)==null?void 0:L.secrets)||{}).map(([k,V])=>({name:k,value:String(V)}))),[o,c]=y.useState(""),[f,d]=y.useState(""),[m,p]=y.useState(!1),[g,b]=y.useState(null),[x,E]=y.useState(null),[T,S]=y.useState(""),w=y.useRef(null),C=()=>{o&&f&&(s([...a,{name:o,value:f}]),c(""),d(""))},N=k=>{E(k),S(a[k].value),b(null)},O=k=>{const V=[...a];V[k].value=T,s(V),E(null)},_=k=>{s(a.filter((V,$)=>$!==k)),b(null),E(null)};return y.useEffect(()=>{const k=V=>{w.current&&!w.current.contains(V.target)&&b(null)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),y.useEffect(()=>{r(k=>({...k,settings:{...k.settings,secrets:Object.fromEntries(a.map(({name:V,value:$})=>[V,$]))}}))},[a,r]),v.jsxs("div",{className:"rounded-lg w-full",children:[v.jsx("h2",{className:"text-xl font-bold mb-4 pb-5 ml-1",children:"Environment Settings"}),v.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 items-end w-full pb-4",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("label",{htmlFor:"secret-name",className:"ml-2 text-xs font-medium text-gray-400",children:"NAME"}),v.jsx(vr,{id:"secret-name",placeholder:"VARIABLE_NAME",value:o,onChange:k=>c(k.target.value)})]}),v.jsxs("div",{className:"flex flex-col gap-1 relative",children:[v.jsx("label",{htmlFor:"secret-value",className:"ml-2 text-xs font-medium text-gray-400",children:"VALUE"}),v.jsxs("div",{className:"relative",children:[v.jsx(vr,{id:"secret-value",type:m?"text":"password",placeholder:"i9ju23nfsdf56",value:f,onChange:k=>d(k.target.value),className:"pr-10"}),v.jsx("div",{className:"absolute inset-y-0 right-3 flex items-center cursor-pointer text-gray-500",onClick:()=>p(!m),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&p(!m)},children:m?v.jsx(YO,{}):v.jsx(GO,{})})]})]}),v.jsx(Qe,{className:"shrink-0",onClick:C,children:"Add"})]}),a.length>0&&v.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 mt-6 font-medium text-gray-400 border-b pb-2 ml-1",children:[v.jsx("div",{children:"Name"}),v.jsx("div",{children:"Value"}),v.jsx("div",{children:"Action"})]}),v.jsx("div",{className:"mt-2",children:a.map((k,V)=>v.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 items-center border-b py-2 ml-1 relative",children:[v.jsx("div",{children:k.name}),v.jsx("div",{children:x===V?v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(vr,{value:T,onChange:$=>S($.target.value),className:"w-full"}),v.jsx(Qe,{variant:"ghost",onClick:()=>O(V),children:v.jsx(Xm,{className:"w-5 h-5 text-green-500"})}),v.jsx(Qe,{variant:"ghost",onClick:()=>E(null),children:v.jsx(bs,{className:"w-5 h-5 text-red-500"})})]}):v.jsx("div",{className:"truncate text-gray-500",children:"Encrypted"})}),v.jsxs("div",{className:"relative",children:[v.jsx(Qe,{variant:"ghost",className:"p-2 text-gray-500",onClick:()=>b(g===V?null:V),children:v.jsx(VO,{className:"w-5 h-5"})}),g===V&&v.jsxs("div",{className:"absolute right-0 -top-2 mt-2 w-24 bg-muted border rounded shadow-md z-10",ref:w,children:[v.jsx("button",{className:"w-full px-4 py-2 text-left hover:opacity-50",onClick:()=>N(V),type:"button",children:"Edit"}),v.jsx("div",{className:"w-full px-4 py-2 text-left text-red-500 hover:opacity-50 cursor-pointer",onClick:()=>_(V),children:"Remove"})]})]})]},V))})]})}const E0={name:"",username:"",system:"",bio:[],topics:[],adjectives:[]};function HE(){const t=to(),{toast:r}=xn(),a=In(),[s,o]=y.useState({...E0}),c=d=>{var m,p,g;return{...d,bio:d.bio??[],messageExamples:d.messageExamples??[],postExamples:d.postExamples??[],topics:d.topics??[],adjectives:d.adjectives??[],plugins:d.plugins??[],style:{all:((m=d.style)==null?void 0:m.all)??[],chat:((p=d.style)==null?void 0:p.chat)??[],post:((g=d.style)==null?void 0:g.post)??[]}}},f=async d=>{try{const m=c(d);await Lt.createAgent({characterJson:m}),a.invalidateQueries({queryKey:["characters"]}),r({title:"Success",description:"Character created successfully!"}),a.invalidateQueries({queryKey:["agents"]}),t("/")}catch(m){r({title:"Error",description:m instanceof Error?m.message:"Failed to create character",variant:"destructive"})}};return v.jsx(_E,{characterValue:s,setCharacterValue:o,title:"Character Settings",description:"Configure your AI character's behavior and capabilities",onSubmit:f,onReset:()=>o(E0),onDelete:()=>{t("/")},isAgent:!0,customComponents:[{name:"Plugins",component:v.jsx(kE,{characterValue:s,setCharacterValue:o})},{name:"Secret",component:v.jsx($E,{characterValue:s,setCharacterValue:o})}]})}const kn={FREQUENT:30*1e3,STANDARD:2*60*1e3,RARE:10*60*1e3,NEVER:Number.POSITIVE_INFINITY},qE=()=>{const t=typeof navigator<"u"&&"connection"in navigator?navigator.connection:null;return{isOffline:typeof navigator<"u"&&!navigator.onLine,effectiveType:(t==null?void 0:t.effectiveType)||"unknown",saveData:(t==null?void 0:t.saveData)||!1}};function BE(t={}){const r=qE();return Es({queryKey:["agents"],queryFn:()=>Lt.getAgents(),staleTime:kn.FREQUENT,refetchInterval:r.isOffline?!1:kn.FREQUENT,refetchIntervalInBackground:!1,...!r.isOffline&&r.effectiveType==="slow-2g"&&{refetchInterval:kn.STANDARD},...t})}function L_(t,r={}){const a=qE();return Es({queryKey:["agent",t],queryFn:()=>Lt.getAgent(t||""),staleTime:kn.FREQUENT,enabled:!!t,refetchInterval:!a.isOffline&&t?kn.FREQUENT:!1,refetchIntervalInBackground:!1,...!a.isOffline&&a.effectiveType==="slow-2g"&&{refetchInterval:kn.STANDARD},...r})}function z_(){const t=In(),{toast:r}=xn();return Zl({mutationFn:async a=>{try{return await Lt.startAgent(a)}catch(s){if(s instanceof Error){if(s.message.includes("network"))throw new Error("Network error: Please check your connection and try again.");if(s.message.includes("already running"))throw new Error("Agent is already running.")}throw s}},onMutate:async a=>(r({title:"Starting Agent",description:"Initializing agent..."}),{agentId:a}),onSuccess:a=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["active-agents"]}),a!=null&&a.id&&t.invalidateQueries({queryKey:["agent",a.id]}),r({title:"Agent Started",description:`${(a==null?void 0:a.name)||"Agent"} is now running`})},onError:a=>{const s=a instanceof Error?a.message:"Failed to start agent";r({title:"Error Starting Agent",description:`${s}. Please try again.`,variant:"destructive"})}})}function P_(){const t=In(),{toast:r}=xn();return Zl({mutationFn:a=>Lt.stopAgent(a),onMutate:async a=>{const s=t.getQueryData(["agent",a]);s&&r({title:"Stopping Agent",description:`Stopping ${s.name}...`})},onSuccess:(a,s)=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["agent",s]}),r({title:"Agent Stopped",description:"The agent has been successfully stopped"})},onError:(a,s)=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["agent",s]}),r({title:"Error",description:a instanceof Error?a.message:"Failed to stop agent",variant:"destructive"})}})}function U_(t){const r=In(),a=Ya.getWorldId();return{messages:r.getQueryData(["messages",t,a])||[]}}const k_="1.0.0-alpha.29",Ji={version:k_};function $_(){const[t,r]=y.useState(null),[a,s]=y.useState(!0),[o,c]=y.useState(typeof navigator<"u"?navigator.onLine:!0),[f,d]=y.useState(!1),m=In(),[p,g]=y.useState(Date.now()),b=y.useRef(0),x=y.useRef(Date.now());y.useEffect(()=>{const k=()=>{s(document.visibilityState==="visible"),document.visibilityState==="visible"&&(b.current=0,Date.now()-p>1e4&&m.invalidateQueries({queryKey:["status"]}))},V=()=>{c(navigator.onLine),navigator.onLine&&(b.current=0,m.invalidateQueries({queryKey:["status"]}))};return document.addEventListener("visibilitychange",k),window.addEventListener("online",V),window.addEventListener("offline",V),s(document.visibilityState==="visible"),()=>{document.removeEventListener("visibilitychange",k),window.removeEventListener("online",V),window.removeEventListener("offline",V)}},[m,p]);const T=Es({queryKey:["status"],queryFn:async()=>{try{const k=performance.now(),V=await Lt.getAgents(),$=performance.now();return b.current=0,x.current=Date.now(),r($-k),g(Date.now()),V}catch(k){throw b.current+=1,console.error("Connection check failed:",k),k}},refetchInterval:o?b.current>0?Math.min(5e3*2**(b.current-1),6e4):a?3e3:15e3:!1,retry:3,retryDelay:k=>Math.min(1e3*1.5**k,1e4),refetchOnWindowFocus:!0,refetchOnReconnect:!0,staleTime:500,gcTime:kn.STANDARD}),S=(T==null?void 0:T.isSuccess)&&!(T!=null&&T.isError),w=(T==null?void 0:T.isRefetching)||(T==null?void 0:T.isPending),C=S===!1&&b.current>5&&Date.now()-x.current>6e4,N=()=>o?C?"bg-yellow-600":w?"bg-muted-foreground":S?"bg-green-600":"bg-red-600":"bg-orange-600",O=()=>o?C?"Reconnecting...":w?"Connecting...":S?"Connected":"Disconnected":"Offline",_=()=>o?C?"text-yellow-600":w?"text-muted-foreground":S?"text-green-600":"text-red-600":"text-orange-600",L=()=>{b.current=0,m.invalidateQueries({queryKey:["agents"]}),m.invalidateQueries({queryKey:["status"]})};return v.jsx(mr,{children:v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx(Ia,{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:L,children:v.jsx("div",{className:"flex flex-col gap-1 select-none transition-all duration-200",children:v.jsxs("div",{className:"flex items-center gap-1",children:[f?v.jsx(JO,{className:"h-3.5 w-3.5 text-muted-foreground animate-pulse"}):v.jsx("div",{className:le(["h-2.5 w-2.5 rounded-full",N()])}),v.jsx("span",{className:le(["text-xs",f?"text-muted-foreground":_()]),children:f?"Refresh":O()})]})})})}),S&&!f?v.jsx(Un,{side:"top",children:v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(kO,{className:"size-4"}),v.jsxs("span",{children:[t==null?void 0:t.toFixed(2)," ms"]})]})}):null]})})}function H_(){const t=pa(),{data:{data:r}={},isPending:a}=BE();return v.jsxs(ww,{className:"bg-background",children:[v.jsx(Rw,{className:"pb-4",children:v.jsx(Lc,{children:v.jsx(mr,{children:v.jsx(Ia,{size:"lg",asChild:!0,children:v.jsxs(Va,{to:"/",className:"px-6 py-4",children:[v.jsx("img",{alt:"elizaos-icon",src:"/elizaos-icon.png",width:"100%",height:"100%",className:"size-9"}),v.jsxs("div",{className:"flex flex-col leading-none ",children:[v.jsx("span",{className:"font-semibold text-lg",children:"ElizaOS"}),v.jsxs("span",{className:"text-sm -mt-0.5 text-muted-foreground",children:["v",Ji==null?void 0:Ji.version]})]})]})})})})}),v.jsx(Cw,{children:v.jsxs(Aw,{children:[v.jsx(Nw,{className:"px-6 py-2 text-sm font-medium text-muted-foreground",children:v.jsx(Va,{to:"/",children:"AGENTS"})}),v.jsx(Ow,{className:"px-2",children:v.jsx(Lc,{children:a?v.jsx("div",{children:Array.from({length:5}).map((s,o)=>v.jsx(mr,{children:v.jsx(Mw,{})},`skeleton-item-${o}`))}):v.jsx("div",{children:(()=>{const s=[...(r==null?void 0:r.agents)||[]].sort((f,d)=>f.enabled&&!d.enabled?-1:!f.enabled&&d.enabled?1:f.name.localeCompare(d.name)),o=s.filter(f=>f.status==="active"),c=s.filter(f=>f.status==="inactive");return v.jsxs(v.Fragment,{children:[o.length>0&&v.jsx("div",{className:"px-4 py-2 mt-4",children:v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx("div",{className:"size-2.5 rounded-full bg-green-500"}),v.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Active"})]})}),o.map(f=>v.jsx(mr,{children:v.jsx(Va,{to:`/chat/${f.id}`,children:v.jsx(Ia,{isActive:t.pathname.includes(f.id),className:"transition-colors px-4 py-2 my-1 rounded-md",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Kb,{className:"size-5"}),v.jsx("span",{className:"text-base",children:f.name})]})})})},f.id)),c.length>0&&v.jsx("div",{className:"px-4 py-2 mt-4",children:v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx("div",{className:"size-2.5 rounded-full bg-muted-foreground/50"}),v.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Inactive"})]})}),c.map(f=>v.jsx(mr,{children:v.jsx("div",{className:"px-4 py-2 my-1 rounded-md",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Kb,{className:"size-5"}),v.jsx("span",{className:"text-base",children:f.name})]})})},f.id))]})})()})})})]})}),v.jsx(Tw,{className:"px-4 py-4",children:v.jsxs(Lc,{children:[v.jsx(mr,{children:v.jsx(Va,{to:"https://elizaos.github.io/eliza/docs/intro/",target:"_blank",children:v.jsxs(Ia,{className:"text-muted-foreground rounded-md",children:[v.jsx(HO,{className:"size-5"}),v.jsx("span",{children:"Documentation"})]})})}),v.jsx(mr,{children:v.jsx(Va,{to:"/logs",children:v.jsxs(Ia,{className:"text-muted-foreground rounded-md",children:[v.jsx(e2,{className:"size-5"}),v.jsx("span",{children:"Logs"})]})})}),v.jsx(mr,{children:v.jsxs(Ia,{disabled:!0,className:"text-muted-foreground/50 rounded-md",children:[v.jsx(zS,{className:"size-5"}),v.jsx("span",{children:"Settings"})]})}),v.jsx($_,{})]})})]})}const IE=6048e5,q_=864e5,R0=Symbol.for("constructDateFrom");function ha(t,r){return typeof t=="function"?t(r):t&&typeof t=="object"&&R0 in t?t[R0](r):t instanceof Date?new t.constructor(r):new Date(r)}function Sn(t,r){return ha(r||t,t)}let B_={};function vu(){return B_}function ql(t,r){var d,m,p,g;const a=vu(),s=(r==null?void 0:r.weekStartsOn)??((m=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??a.weekStartsOn??((g=(p=a.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,o=Sn(t,r==null?void 0:r.in),c=o.getDay(),f=(c<s?7:0)+c-s;return o.setDate(o.getDate()-f),o.setHours(0,0,0,0),o}function Xc(t,r){return ql(t,{...r,weekStartsOn:1})}function VE(t,r){const a=Sn(t,r==null?void 0:r.in),s=a.getFullYear(),o=ha(a,0);o.setFullYear(s+1,0,4),o.setHours(0,0,0,0);const c=Xc(o),f=ha(a,0);f.setFullYear(s,0,4),f.setHours(0,0,0,0);const d=Xc(f);return a.getTime()>=c.getTime()?s+1:a.getTime()>=d.getTime()?s:s-1}function T0(t){const r=Sn(t),a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),+t-+a}function I_(t,...r){const a=ha.bind(null,r.find(s=>typeof s=="object"));return r.map(a)}function C0(t,r){const a=Sn(t,r==null?void 0:r.in);return a.setHours(0,0,0,0),a}function V_(t,r,a){const[s,o]=I_(a==null?void 0:a.in,t,r),c=C0(s),f=C0(o),d=+c-T0(c),m=+f-T0(f);return Math.round((d-m)/q_)}function Y_(t,r){const a=VE(t,r),s=ha(t,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),Xc(s)}function G_(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function F_(t){return!(!G_(t)&&typeof t!="number"||isNaN(+Sn(t)))}function Q_(t,r){const a=Sn(t,r==null?void 0:r.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const X_={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"}},K_=(t,r,a)=>{let s;const o=X_[t];return typeof o=="string"?s=o:r===1?s=o.one:s=o.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+s:s+" ago":s};function ch(t){return(r={})=>{const a=r.width?String(r.width):t.defaultWidth;return t.formats[a]||t.formats[t.defaultWidth]}}const W_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Z_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},J_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},eL={date:ch({formats:W_,defaultWidth:"full"}),time:ch({formats:Z_,defaultWidth:"full"}),dateTime:ch({formats:J_,defaultWidth:"full"})},tL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nL=(t,r,a,s)=>tL[t];function Ml(t){return(r,a)=>{const s=a!=null&&a.context?String(a.context):"standalone";let o;if(s==="formatting"&&t.formattingValues){const f=t.defaultFormattingWidth||t.defaultWidth,d=a!=null&&a.width?String(a.width):f;o=t.formattingValues[d]||t.formattingValues[f]}else{const f=t.defaultWidth,d=a!=null&&a.width?String(a.width):t.defaultWidth;o=t.values[d]||t.values[f]}const c=t.argumentCallback?t.argumentCallback(r):r;return o[c]}}const rL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iL={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"]},sL={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"]},lL={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"}},oL={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"}},cL=(t,r)=>{const a=Number(t),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},uL={ordinalNumber:cL,era:Ml({values:rL,defaultWidth:"wide"}),quarter:Ml({values:aL,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ml({values:iL,defaultWidth:"wide"}),day:Ml({values:sL,defaultWidth:"wide"}),dayPeriod:Ml({values:lL,defaultWidth:"wide",formattingValues:oL,defaultFormattingWidth:"wide"})};function jl(t){return(r,a={})=>{const s=a.width,o=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],c=r.match(o);if(!c)return null;const f=c[0],d=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(d)?dL(d,b=>b.test(f)):fL(d,b=>b.test(f));let p;p=t.valueCallback?t.valueCallback(m):m,p=a.valueCallback?a.valueCallback(p):p;const g=r.slice(f.length);return{value:p,rest:g}}}function fL(t,r){for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r(t[a]))return a}function dL(t,r){for(let a=0;a<t.length;a++)if(r(t[a]))return a}function hL(t){return(r,a={})=>{const s=r.match(t.matchPattern);if(!s)return null;const o=s[0],c=r.match(t.parsePattern);if(!c)return null;let f=t.valueCallback?t.valueCallback(c[0]):c[0];f=a.valueCallback?a.valueCallback(f):f;const d=r.slice(o.length);return{value:f,rest:d}}}const mL=/^(\d+)(th|st|nd|rd)?/i,pL=/\d+/i,gL={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},vL={any:[/^b/i,/^(a|c)/i]},yL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bL={any:[/1/i,/2/i,/3/i,/4/i]},xL={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},SL={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]},wL={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},EL={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]},RL={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},TL={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}},CL={ordinalNumber:hL({matchPattern:mL,parsePattern:pL,valueCallback:t=>parseInt(t,10)}),era:jl({matchPatterns:gL,defaultMatchWidth:"wide",parsePatterns:vL,defaultParseWidth:"any"}),quarter:jl({matchPatterns:yL,defaultMatchWidth:"wide",parsePatterns:bL,defaultParseWidth:"any",valueCallback:t=>t+1}),month:jl({matchPatterns:xL,defaultMatchWidth:"wide",parsePatterns:SL,defaultParseWidth:"any"}),day:jl({matchPatterns:wL,defaultMatchWidth:"wide",parsePatterns:EL,defaultParseWidth:"any"}),dayPeriod:jl({matchPatterns:RL,defaultMatchWidth:"any",parsePatterns:TL,defaultParseWidth:"any"})},AL={code:"en-US",formatDistance:K_,formatLong:eL,formatRelative:nL,localize:uL,match:CL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function NL(t,r){const a=Sn(t,r==null?void 0:r.in);return V_(a,Q_(a))+1}function OL(t,r){const a=Sn(t,r==null?void 0:r.in),s=+Xc(a)-+Y_(a);return Math.round(s/IE)+1}function YE(t,r){var g,b,x,E;const a=Sn(t,r==null?void 0:r.in),s=a.getFullYear(),o=vu(),c=(r==null?void 0:r.firstWeekContainsDate)??((b=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??o.firstWeekContainsDate??((E=(x=o.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,f=ha((r==null?void 0:r.in)||t,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const d=ql(f,r),m=ha((r==null?void 0:r.in)||t,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const p=ql(m,r);return+a>=+d?s+1:+a>=+p?s:s-1}function ML(t,r){var d,m,p,g;const a=vu(),s=(r==null?void 0:r.firstWeekContainsDate)??((m=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((g=(p=a.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,o=YE(t,r),c=ha((r==null?void 0:r.in)||t,0);return c.setFullYear(o,0,s),c.setHours(0,0,0,0),ql(c,r)}function jL(t,r){const a=Sn(t,r==null?void 0:r.in),s=+ql(a,r)-+ML(a,r);return Math.round(s/IE)+1}function $e(t,r){const a=t<0?"-":"",s=Math.abs(t).toString().padStart(r,"0");return a+s}const Zr={y(t,r){const a=t.getFullYear(),s=a>0?a:1-a;return $e(r==="yy"?s%100:s,r.length)},M(t,r){const a=t.getMonth();return r==="M"?String(a+1):$e(a+1,2)},d(t,r){return $e(t.getDate(),r.length)},a(t,r){const a=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(t,r){return $e(t.getHours()%12||12,r.length)},H(t,r){return $e(t.getHours(),r.length)},m(t,r){return $e(t.getMinutes(),r.length)},s(t,r){return $e(t.getSeconds(),r.length)},S(t,r){const a=r.length,s=t.getMilliseconds(),o=Math.trunc(s*Math.pow(10,a-3));return $e(o,r.length)}},Yi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A0={G:function(t,r,a){const s=t.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return a.era(s,{width:"abbreviated"});case"GGGGG":return a.era(s,{width:"narrow"});case"GGGG":default:return a.era(s,{width:"wide"})}},y:function(t,r,a){if(r==="yo"){const s=t.getFullYear(),o=s>0?s:1-s;return a.ordinalNumber(o,{unit:"year"})}return Zr.y(t,r)},Y:function(t,r,a,s){const o=YE(t,s),c=o>0?o:1-o;if(r==="YY"){const f=c%100;return $e(f,2)}return r==="Yo"?a.ordinalNumber(c,{unit:"year"}):$e(c,r.length)},R:function(t,r){const a=VE(t);return $e(a,r.length)},u:function(t,r){const a=t.getFullYear();return $e(a,r.length)},Q:function(t,r,a){const s=Math.ceil((t.getMonth()+1)/3);switch(r){case"Q":return String(s);case"QQ":return $e(s,2);case"Qo":return a.ordinalNumber(s,{unit:"quarter"});case"QQQ":return a.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,r,a){const s=Math.ceil((t.getMonth()+1)/3);switch(r){case"q":return String(s);case"qq":return $e(s,2);case"qo":return a.ordinalNumber(s,{unit:"quarter"});case"qqq":return a.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,r,a){const s=t.getMonth();switch(r){case"M":case"MM":return Zr.M(t,r);case"Mo":return a.ordinalNumber(s+1,{unit:"month"});case"MMM":return a.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(s,{width:"wide",context:"formatting"})}},L:function(t,r,a){const s=t.getMonth();switch(r){case"L":return String(s+1);case"LL":return $e(s+1,2);case"Lo":return a.ordinalNumber(s+1,{unit:"month"});case"LLL":return a.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(s,{width:"wide",context:"standalone"})}},w:function(t,r,a,s){const o=jL(t,s);return r==="wo"?a.ordinalNumber(o,{unit:"week"}):$e(o,r.length)},I:function(t,r,a){const s=OL(t);return r==="Io"?a.ordinalNumber(s,{unit:"week"}):$e(s,r.length)},d:function(t,r,a){return r==="do"?a.ordinalNumber(t.getDate(),{unit:"date"}):Zr.d(t,r)},D:function(t,r,a){const s=NL(t);return r==="Do"?a.ordinalNumber(s,{unit:"dayOfYear"}):$e(s,r.length)},E:function(t,r,a){const s=t.getDay();switch(r){case"E":case"EE":case"EEE":return a.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(s,{width:"short",context:"formatting"});case"EEEE":default:return a.day(s,{width:"wide",context:"formatting"})}},e:function(t,r,a,s){const o=t.getDay(),c=(o-s.weekStartsOn+8)%7||7;switch(r){case"e":return String(c);case"ee":return $e(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,a,s){const o=t.getDay(),c=(o-s.weekStartsOn+8)%7||7;switch(r){case"c":return String(c);case"cc":return $e(c,r.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,a){const s=t.getDay(),o=s===0?7:s;switch(r){case"i":return String(o);case"ii":return $e(o,r.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(s,{width:"short",context:"formatting"});case"iiii":default:return a.day(s,{width:"wide",context:"formatting"})}},a:function(t,r,a){const o=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,a){const s=t.getHours();let o;switch(s===12?o=Yi.noon:s===0?o=Yi.midnight:o=s/12>=1?"pm":"am",r){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,a){const s=t.getHours();let o;switch(s>=17?o=Yi.evening:s>=12?o=Yi.afternoon:s>=4?o=Yi.morning:o=Yi.night,r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,a){if(r==="ho"){let s=t.getHours()%12;return s===0&&(s=12),a.ordinalNumber(s,{unit:"hour"})}return Zr.h(t,r)},H:function(t,r,a){return r==="Ho"?a.ordinalNumber(t.getHours(),{unit:"hour"}):Zr.H(t,r)},K:function(t,r,a){const s=t.getHours()%12;return r==="Ko"?a.ordinalNumber(s,{unit:"hour"}):$e(s,r.length)},k:function(t,r,a){let s=t.getHours();return s===0&&(s=24),r==="ko"?a.ordinalNumber(s,{unit:"hour"}):$e(s,r.length)},m:function(t,r,a){return r==="mo"?a.ordinalNumber(t.getMinutes(),{unit:"minute"}):Zr.m(t,r)},s:function(t,r,a){return r==="so"?a.ordinalNumber(t.getSeconds(),{unit:"second"}):Zr.s(t,r)},S:function(t,r){return Zr.S(t,r)},X:function(t,r,a){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return O0(s);case"XXXX":case"XX":return Ba(s);case"XXXXX":case"XXX":default:return Ba(s,":")}},x:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"x":return O0(s);case"xxxx":case"xx":return Ba(s);case"xxxxx":case"xxx":default:return Ba(s,":")}},O:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+N0(s,":");case"OOOO":default:return"GMT"+Ba(s,":")}},z:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+N0(s,":");case"zzzz":default:return"GMT"+Ba(s,":")}},t:function(t,r,a){const s=Math.trunc(+t/1e3);return $e(s,r.length)},T:function(t,r,a){return $e(+t,r.length)}};function N0(t,r=""){const a=t>0?"-":"+",s=Math.abs(t),o=Math.trunc(s/60),c=s%60;return c===0?a+String(o):a+String(o)+r+$e(c,2)}function O0(t,r){return t%60===0?(t>0?"-":"+")+$e(Math.abs(t)/60,2):Ba(t,r)}function Ba(t,r=""){const a=t>0?"-":"+",s=Math.abs(t),o=$e(Math.trunc(s/60),2),c=$e(s%60,2);return a+o+r+c}const M0=(t,r)=>{switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},GE=(t,r)=>{switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},DL=(t,r)=>{const a=t.match(/(P+)(p+)?/)||[],s=a[1],o=a[2];if(!o)return M0(t,r);let c;switch(s){case"P":c=r.dateTime({width:"short"});break;case"PP":c=r.dateTime({width:"medium"});break;case"PPP":c=r.dateTime({width:"long"});break;case"PPPP":default:c=r.dateTime({width:"full"});break}return c.replace("{{date}}",M0(s,r)).replace("{{time}}",GE(o,r))},_L={p:GE,P:DL},LL=/^D+$/,zL=/^Y+$/,PL=["D","DD","YY","YYYY"];function UL(t){return LL.test(t)}function kL(t){return zL.test(t)}function $L(t,r,a){const s=HL(t,r,a);if(console.warn(s),PL.includes(t))throw new RangeError(s)}function HL(t,r,a){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${r}\`) for formatting ${s} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,BL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IL=/^'([^]*?)'?$/,VL=/''/g,YL=/[a-zA-Z]/;function GL(t,r,a){var g,b,x,E;const s=vu(),o=s.locale??AL,c=s.firstWeekContainsDate??((b=(g=s.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,f=s.weekStartsOn??((E=(x=s.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,d=Sn(t,a==null?void 0:a.in);if(!F_(d))throw new RangeError("Invalid time value");let m=r.match(BL).map(T=>{const S=T[0];if(S==="p"||S==="P"){const w=_L[S];return w(T,o.formatLong)}return T}).join("").match(qL).map(T=>{if(T==="''")return{isToken:!1,value:"'"};const S=T[0];if(S==="'")return{isToken:!1,value:FL(T)};if(A0[S])return{isToken:!0,value:T};if(S.match(YL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:T}});o.localize.preprocessor&&(m=o.localize.preprocessor(d,m));const p={firstWeekContainsDate:c,weekStartsOn:f,locale:o};return m.map(T=>{if(!T.isToken)return T.value;const S=T.value;(kL(S)||UL(S))&&$L(S,r,String(t));const w=A0[S[0]];return w(d,S,o.localize,p)}).join("")}function FL(t){const r=t.match(IL);return r?r[1].replace(VL,"'"):t}function FE({title:t,subtitle:r}){return v.jsxs("div",{className:"space-y-0.5",children:[v.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:t}),r?v.jsx("p",{className:"text-muted-foreground",children:r}):null]})}function Mm(t,[r,a]){return Math.min(a,Math.max(r,t))}function QL(t,r){return y.useReducer((a,s)=>r[a][s]??a,t)}var Sp="ScrollArea",[QE,gz]=qn(Sp),[XL,on]=QE(Sp),XE=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,type:s="hover",dir:o,scrollHideDelay:c=600,...f}=t,[d,m]=y.useState(null),[p,g]=y.useState(null),[b,x]=y.useState(null),[E,T]=y.useState(null),[S,w]=y.useState(null),[C,N]=y.useState(0),[O,_]=y.useState(0),[L,k]=y.useState(!1),[V,$]=y.useState(!1),U=Ue(r,te=>m(te)),K=pu(o);return v.jsx(XL,{scope:a,type:s,dir:K,scrollHideDelay:c,scrollArea:d,viewport:p,onViewportChange:g,content:b,onContentChange:x,scrollbarX:E,onScrollbarXChange:T,scrollbarXEnabled:L,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:V,onScrollbarYEnabledChange:$,onCornerWidthChange:N,onCornerHeightChange:_,children:v.jsx(we.div,{dir:K,...f,ref:U,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":O+"px",...t.style}})})});XE.displayName=Sp;var KE="ScrollAreaViewport",WE=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,children:s,nonce:o,...c}=t,f=on(KE,a),d=y.useRef(null),m=Ue(r,d,f.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),v.jsx(we.div,{"data-radix-scroll-area-viewport":"",...c,ref:m,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...t.style},children:v.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});WE.displayName=KE;var Gn="ScrollAreaScrollbar",wp=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:f}=o,d=t.orientation==="horizontal";return y.useEffect(()=>(d?c(!0):f(!0),()=>{d?c(!1):f(!1)}),[d,c,f]),o.type==="hover"?v.jsx(KL,{...s,ref:r,forceMount:a}):o.type==="scroll"?v.jsx(WL,{...s,ref:r,forceMount:a}):o.type==="auto"?v.jsx(ZE,{...s,ref:r,forceMount:a}):o.type==="always"?v.jsx(Ep,{...s,ref:r}):null});wp.displayName=Gn;var KL=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),[c,f]=y.useState(!1);return y.useEffect(()=>{const d=o.scrollArea;let m=0;if(d){const p=()=>{window.clearTimeout(m),f(!0)},g=()=>{m=window.setTimeout(()=>f(!1),o.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",g),()=>{window.clearTimeout(m),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",g)}}},[o.scrollArea,o.scrollHideDelay]),v.jsx(ln,{present:a||c,children:v.jsx(ZE,{"data-state":c?"visible":"hidden",...s,ref:r})})}),WL=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),c=t.orientation==="horizontal",f=bu(()=>m("SCROLL_END"),100),[d,m]=QL("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>m("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,o.scrollHideDelay,m]),y.useEffect(()=>{const p=o.viewport,g=c?"scrollLeft":"scrollTop";if(p){let b=p[g];const x=()=>{const E=p[g];b!==E&&(m("SCROLL"),f()),b=E};return p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[o.viewport,c,m,f]),v.jsx(ln,{present:a||d!=="hidden",children:v.jsx(Ep,{"data-state":d==="hidden"?"hidden":"visible",...s,ref:r,onPointerEnter:ve(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:ve(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),ZE=y.forwardRef((t,r)=>{const a=on(Gn,t.__scopeScrollArea),{forceMount:s,...o}=t,[c,f]=y.useState(!1),d=t.orientation==="horizontal",m=bu(()=>{if(a.viewport){const p=a.viewport.offsetWidth<a.viewport.scrollWidth,g=a.viewport.offsetHeight<a.viewport.scrollHeight;f(d?p:g)}},10);return ps(a.viewport,m),ps(a.content,m),v.jsx(ln,{present:s||c,children:v.jsx(Ep,{"data-state":c?"visible":"hidden",...o,ref:r})})}),Ep=y.forwardRef((t,r)=>{const{orientation:a="vertical",...s}=t,o=on(Gn,t.__scopeScrollArea),c=y.useRef(null),f=y.useRef(0),[d,m]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=r1(d.viewport,d.content),g={...s,sizes:d,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:x=>c.current=x,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:x=>f.current=x};function b(x,E){return r4(x,f.current,d,E)}return a==="horizontal"?v.jsx(ZL,{...g,ref:r,onThumbPositionChange:()=>{if(o.viewport&&c.current){const x=o.viewport.scrollLeft,E=j0(x,d,o.dir);c.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollLeft=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollLeft=b(x,o.dir))}}):a==="vertical"?v.jsx(JL,{...g,ref:r,onThumbPositionChange:()=>{if(o.viewport&&c.current){const x=o.viewport.scrollTop,E=j0(x,d);c.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollTop=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollTop=b(x))}}):null}),ZL=y.forwardRef((t,r)=>{const{sizes:a,onSizesChange:s,...o}=t,c=on(Gn,t.__scopeScrollArea),[f,d]=y.useState(),m=y.useRef(null),p=Ue(r,m,c.onScrollbarXChange);return y.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),v.jsx(e1,{"data-orientation":"horizontal",...o,ref:p,sizes:a,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yu(a)+"px",...t.style},onThumbPointerDown:g=>t.onThumbPointerDown(g.x),onDragScroll:g=>t.onDragScroll(g.x),onWheelScroll:(g,b)=>{if(c.viewport){const x=c.viewport.scrollLeft+g.deltaX;t.onWheelScroll(x),i1(x,b)&&g.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&s({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Wc(f.paddingLeft),paddingEnd:Wc(f.paddingRight)}})}})}),JL=y.forwardRef((t,r)=>{const{sizes:a,onSizesChange:s,...o}=t,c=on(Gn,t.__scopeScrollArea),[f,d]=y.useState(),m=y.useRef(null),p=Ue(r,m,c.onScrollbarYChange);return y.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),v.jsx(e1,{"data-orientation":"vertical",...o,ref:p,sizes:a,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yu(a)+"px",...t.style},onThumbPointerDown:g=>t.onThumbPointerDown(g.y),onDragScroll:g=>t.onDragScroll(g.y),onWheelScroll:(g,b)=>{if(c.viewport){const x=c.viewport.scrollTop+g.deltaY;t.onWheelScroll(x),i1(x,b)&&g.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&s({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Wc(f.paddingTop),paddingEnd:Wc(f.paddingBottom)}})}})}),[e4,JE]=QE(Gn),e1=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,sizes:s,hasThumb:o,onThumbChange:c,onThumbPointerUp:f,onThumbPointerDown:d,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:g,onResize:b,...x}=t,E=on(Gn,a),[T,S]=y.useState(null),w=Ue(r,U=>S(U)),C=y.useRef(null),N=y.useRef(""),O=E.viewport,_=s.content-s.viewport,L=nt(g),k=nt(m),V=bu(b,10);function $(U){if(C.current){const K=U.clientX-C.current.left,te=U.clientY-C.current.top;p({x:K,y:te})}}return y.useEffect(()=>{const U=K=>{const te=K.target;(T==null?void 0:T.contains(te))&&L(K,_)};return document.addEventListener("wheel",U,{passive:!1}),()=>document.removeEventListener("wheel",U,{passive:!1})},[O,T,_,L]),y.useEffect(k,[s,k]),ps(T,V),ps(E.content,V),v.jsx(e4,{scope:a,scrollbar:T,hasThumb:o,onThumbChange:nt(c),onThumbPointerUp:nt(f),onThumbPositionChange:k,onThumbPointerDown:nt(d),children:v.jsx(we.div,{...x,ref:w,style:{position:"absolute",...x.style},onPointerDown:ve(t.onPointerDown,U=>{U.button===0&&(U.target.setPointerCapture(U.pointerId),C.current=T.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),$(U))}),onPointerMove:ve(t.onPointerMove,$),onPointerUp:ve(t.onPointerUp,U=>{const K=U.target;K.hasPointerCapture(U.pointerId)&&K.releasePointerCapture(U.pointerId),document.body.style.webkitUserSelect=N.current,E.viewport&&(E.viewport.style.scrollBehavior=""),C.current=null})})})}),Kc="ScrollAreaThumb",t1=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=JE(Kc,t.__scopeScrollArea);return v.jsx(ln,{present:a||o.hasThumb,children:v.jsx(t4,{ref:r,...s})})}),t4=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,style:s,...o}=t,c=on(Kc,a),f=JE(Kc,a),{onThumbPositionChange:d}=f,m=Ue(r,b=>f.onThumbChange(b)),p=y.useRef(void 0),g=bu(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const b=c.viewport;if(b){const x=()=>{if(g(),!p.current){const E=a4(b,d);p.current=E,d()}};return d(),b.addEventListener("scroll",x),()=>b.removeEventListener("scroll",x)}},[c.viewport,g,d]),v.jsx(we.div,{"data-state":f.hasThumb?"visible":"hidden",...o,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:ve(t.onPointerDownCapture,b=>{const E=b.target.getBoundingClientRect(),T=b.clientX-E.left,S=b.clientY-E.top;f.onThumbPointerDown({x:T,y:S})}),onPointerUp:ve(t.onPointerUp,f.onThumbPointerUp)})});t1.displayName=Kc;var Rp="ScrollAreaCorner",n1=y.forwardRef((t,r)=>{const a=on(Rp,t.__scopeScrollArea),s=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&s?v.jsx(n4,{...t,ref:r}):null});n1.displayName=Rp;var n4=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,...s}=t,o=on(Rp,a),[c,f]=y.useState(0),[d,m]=y.useState(0),p=!!(c&&d);return ps(o.scrollbarX,()=>{var b;const g=((b=o.scrollbarX)==null?void 0:b.offsetHeight)||0;o.onCornerHeightChange(g),m(g)}),ps(o.scrollbarY,()=>{var b;const g=((b=o.scrollbarY)==null?void 0:b.offsetWidth)||0;o.onCornerWidthChange(g),f(g)}),p?v.jsx(we.div,{...s,ref:r,style:{width:c,height:d,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Wc(t){return t?parseInt(t,10):0}function r1(t,r){const a=t/r;return isNaN(a)?0:a}function yu(t){const r=r1(t.viewport,t.content),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=(t.scrollbar.size-a)*r;return Math.max(s,18)}function r4(t,r,a,s="ltr"){const o=yu(a),c=o/2,f=r||c,d=o-f,m=a.scrollbar.paddingStart+f,p=a.scrollbar.size-a.scrollbar.paddingEnd-d,g=a.content-a.viewport,b=s==="ltr"?[0,g]:[g*-1,0];return a1([m,p],b)(t)}function j0(t,r,a="ltr"){const s=yu(r),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,c=r.scrollbar.size-o,f=r.content-r.viewport,d=c-s,m=a==="ltr"?[0,f]:[f*-1,0],p=Mm(t,m);return a1([0,f],[0,d])(p)}function a1(t,r){return a=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(t[1]-t[0]);return r[0]+s*(a-t[0])}}function i1(t,r){return t>0&&t<r}var a4=(t,r=()=>{})=>{let a={left:t.scrollLeft,top:t.scrollTop},s=0;return function o(){const c={left:t.scrollLeft,top:t.scrollTop},f=a.left!==c.left,d=a.top!==c.top;(f||d)&&r(),a=c,s=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(s)};function bu(t,r){const a=nt(t),s=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),y.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(a,r)},[a,r])}function ps(t,r){const a=nt(r);ft(()=>{let s=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(a)});return o.observe(t),()=>{window.cancelAnimationFrame(s),o.unobserve(t)}}},[t,a])}var s1=XE,i4=WE,s4=n1;const l1=y.forwardRef(({className:t,children:r,...a},s)=>v.jsxs(s1,{ref:s,className:le("relative overflow-hidden",t),...a,children:[v.jsx(i4,{className:"h-full w-full rounded-[inherit]",children:r}),v.jsx(o1,{}),v.jsx(s4,{})]}));l1.displayName=s1.displayName;const o1=y.forwardRef(({className:t,orientation:r="vertical",...a},s)=>v.jsx(wp,{ref:s,orientation:r,className:le("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:v.jsx(t1,{className:"relative flex-1 rounded-full bg-border"})}));o1.displayName=wp.displayName;function l4(t){const r=y.useRef({value:t,previous:t});return y.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var o4=[" ","Enter","ArrowUp","ArrowDown"],c4=[" ","Enter"],ro="Select",[xu,Su,u4]=vp(ro),[Cs,vz]=qn(ro,[u4,lu]),wu=lu(),[f4,ga]=Cs(ro),[d4,h4]=Cs(ro),c1=t=>{const{__scopeSelect:r,children:a,open:s,defaultOpen:o,onOpenChange:c,value:f,defaultValue:d,onValueChange:m,dir:p,name:g,autoComplete:b,disabled:x,required:E,form:T}=t,S=wu(r),[w,C]=y.useState(null),[N,O]=y.useState(null),[_,L]=y.useState(!1),k=pu(p),[V=!1,$]=ei({prop:s,defaultProp:o,onChange:c}),[U,K]=ei({prop:f,defaultProp:d,onChange:m}),te=y.useRef(null),se=w?T||!!w.closest("form"):!0,[de,q]=y.useState(new Set),H=Array.from(de).map(j=>j.props.value).join(";");return v.jsx(sw,{...S,children:v.jsxs(f4,{required:E,scope:r,trigger:w,onTriggerChange:C,valueNode:N,onValueNodeChange:O,valueNodeHasChildren:_,onValueNodeHasChildrenChange:L,contentId:yr(),value:U,onValueChange:K,open:V,onOpenChange:$,dir:k,triggerPointerDownPosRef:te,disabled:x,children:[v.jsx(xu.Provider,{scope:r,children:v.jsx(d4,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(j=>{q(B=>new Set(B).add(j))},[]),onNativeOptionRemove:y.useCallback(j=>{q(B=>{const z=new Set(B);return z.delete(j),z})},[]),children:a})}),se?v.jsxs(L1,{"aria-hidden":!0,required:E,tabIndex:-1,name:g,autoComplete:b,value:U,onChange:j=>K(j.target.value),disabled:x,form:T,children:[U===void 0?v.jsx("option",{value:""}):null,Array.from(de)]},H):null]})})};c1.displayName=ro;var u1="SelectTrigger",f1=y.forwardRef((t,r)=>{const{__scopeSelect:a,disabled:s=!1,...o}=t,c=wu(a),f=ga(u1,a),d=f.disabled||s,m=Ue(r,f.onTriggerChange),p=Su(a),g=y.useRef("touch"),[b,x,E]=z1(S=>{const w=p().filter(O=>!O.disabled),C=w.find(O=>O.value===f.value),N=P1(w,S,C);N!==void 0&&f.onValueChange(N.value)}),T=S=>{d||(f.onOpenChange(!0),E()),S&&(f.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return v.jsx(lw,{asChild:!0,...c,children:v.jsx(we.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":_1(f.value)?"":void 0,...o,ref:m,onClick:ve(o.onClick,S=>{S.currentTarget.focus(),g.current!=="mouse"&&T(S)}),onPointerDown:ve(o.onPointerDown,S=>{g.current=S.pointerType;const w=S.target;w.hasPointerCapture(S.pointerId)&&w.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(T(S),S.preventDefault())}),onKeyDown:ve(o.onKeyDown,S=>{const w=b.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(w&&S.key===" ")&&o4.includes(S.key)&&(T(),S.preventDefault())})})})});f1.displayName=u1;var d1="SelectValue",h1=y.forwardRef((t,r)=>{const{__scopeSelect:a,className:s,style:o,children:c,placeholder:f="",...d}=t,m=ga(d1,a),{onValueNodeHasChildrenChange:p}=m,g=c!==void 0,b=Ue(r,m.onValueNodeChange);return ft(()=>{p(g)},[p,g]),v.jsx(we.span,{...d,ref:b,style:{pointerEvents:"none"},children:_1(m.value)?v.jsx(v.Fragment,{children:f}):c})});h1.displayName=d1;var m4="SelectIcon",m1=y.forwardRef((t,r)=>{const{__scopeSelect:a,children:s,...o}=t;return v.jsx(we.span,{"aria-hidden":!0,...o,ref:r,children:s||"▼"})});m1.displayName=m4;var p4="SelectPortal",p1=t=>v.jsx(Ql,{asChild:!0,...t});p1.displayName=p4;var ii="SelectContent",g1=y.forwardRef((t,r)=>{const a=ga(ii,t.__scopeSelect),[s,o]=y.useState();if(ft(()=>{o(new DocumentFragment)},[]),!a.open){const c=s;return c?ys.createPortal(v.jsx(v1,{scope:t.__scopeSelect,children:v.jsx(xu.Slot,{scope:t.__scopeSelect,children:v.jsx("div",{children:t.children})})}),c):null}return v.jsx(y1,{...t,ref:r})});g1.displayName=ii;var hn=10,[v1,va]=Cs(ii),g4="SelectContentImpl",y1=y.forwardRef((t,r)=>{const{__scopeSelect:a,position:s="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:c,onPointerDownOutside:f,side:d,sideOffset:m,align:p,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:w,...C}=t,N=ga(ii,a),[O,_]=y.useState(null),[L,k]=y.useState(null),V=Ue(r,ue=>_(ue)),[$,U]=y.useState(null),[K,te]=y.useState(null),se=Su(a),[de,q]=y.useState(!1),H=y.useRef(!1);y.useEffect(()=>{if(O)return hS(O)},[O]),aS();const j=y.useCallback(ue=>{const[me,...Ee]=se().map(Ae=>Ae.ref.current),[fe]=Ee.slice(-1),Se=document.activeElement;for(const Ae of ue)if(Ae===Se||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===me&&L&&(L.scrollTop=0),Ae===fe&&L&&(L.scrollTop=L.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Se))return},[se,L]),B=y.useCallback(()=>j([$,O]),[j,$,O]);y.useEffect(()=>{de&&B()},[de,B]);const{onOpenChange:z,triggerPointerDownPosRef:Q}=N;y.useEffect(()=>{if(O){let ue={x:0,y:0};const me=fe=>{var Se,Ae;ue={x:Math.abs(Math.round(fe.pageX)-(((Se=Q.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((Ae=Q.current)==null?void 0:Ae.y)??0))}},Ee=fe=>{ue.x<=10&&ue.y<=10?fe.preventDefault():O.contains(fe.target)||z(!1),document.removeEventListener("pointermove",me),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[O,z,Q]),y.useEffect(()=>{const ue=()=>z(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[z]);const[M,G]=z1(ue=>{const me=se().filter(Se=>!Se.disabled),Ee=me.find(Se=>Se.ref.current===document.activeElement),fe=P1(me,ue,Ee);fe&&setTimeout(()=>fe.ref.current.focus())}),ee=y.useCallback((ue,me,Ee)=>{const fe=!H.current&&!Ee;(N.value!==void 0&&N.value===me||fe)&&(U(ue),fe&&(H.current=!0))},[N.value]),ae=y.useCallback(()=>O==null?void 0:O.focus(),[O]),re=y.useCallback((ue,me,Ee)=>{const fe=!H.current&&!Ee;(N.value!==void 0&&N.value===me||fe)&&te(ue)},[N.value]),oe=s==="popper"?jm:b1,pe=oe===jm?{side:d,sideOffset:m,align:p,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:w}:{};return v.jsx(v1,{scope:a,content:O,viewport:L,onViewportChange:k,itemRefCallback:ee,selectedItem:$,onItemLeave:ae,itemTextRefCallback:re,focusSelectedItem:B,selectedItemText:K,position:s,isPositioned:de,searchRef:M,children:v.jsx(Vm,{as:sn,allowPinchZoom:!0,children:v.jsx(Im,{asChild:!0,trapped:N.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:ve(o,ue=>{var me;(me=N.trigger)==null||me.focus({preventScroll:!0}),ue.preventDefault()}),children:v.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:v.jsx(oe,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ue=>ue.preventDefault(),...C,...pe,onPlaced:()=>q(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ve(C.onKeyDown,ue=>{const me=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!me&&ue.key.length===1&&G(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let fe=se().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Se=ue.target,Ae=fe.indexOf(Se);fe=fe.slice(Ae+1)}setTimeout(()=>j(fe)),ue.preventDefault()}})})})})})})});y1.displayName=g4;var v4="SelectItemAlignedPosition",b1=y.forwardRef((t,r)=>{const{__scopeSelect:a,onPlaced:s,...o}=t,c=ga(ii,a),f=va(ii,a),[d,m]=y.useState(null),[p,g]=y.useState(null),b=Ue(r,V=>g(V)),x=Su(a),E=y.useRef(!1),T=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:C,focusSelectedItem:N}=f,O=y.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&p&&S&&w&&C){const V=c.trigger.getBoundingClientRect(),$=p.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),K=C.getBoundingClientRect();if(c.dir!=="rtl"){const Se=K.left-$.left,Ae=U.left-Se,Ie=V.left-Ae,Et=V.width+Ie,Rn=Math.max(Et,$.width),Vt=window.innerWidth-hn,Fn=Mm(Ae,[hn,Math.max(hn,Vt-Rn)]);d.style.minWidth=Et+"px",d.style.left=Fn+"px"}else{const Se=$.right-K.right,Ae=window.innerWidth-U.right-Se,Ie=window.innerWidth-V.right-Ae,Et=V.width+Ie,Rn=Math.max(Et,$.width),Vt=window.innerWidth-hn,Fn=Mm(Ae,[hn,Math.max(hn,Vt-Rn)]);d.style.minWidth=Et+"px",d.style.right=Fn+"px"}const te=x(),se=window.innerHeight-hn*2,de=S.scrollHeight,q=window.getComputedStyle(p),H=parseInt(q.borderTopWidth,10),j=parseInt(q.paddingTop,10),B=parseInt(q.borderBottomWidth,10),z=parseInt(q.paddingBottom,10),Q=H+j+de+z+B,M=Math.min(w.offsetHeight*5,Q),G=window.getComputedStyle(S),ee=parseInt(G.paddingTop,10),ae=parseInt(G.paddingBottom,10),re=V.top+V.height/2-hn,oe=se-re,pe=w.offsetHeight/2,ue=w.offsetTop+pe,me=H+j+ue,Ee=Q-me;if(me<=re){const Se=te.length>0&&w===te[te.length-1].ref.current;d.style.bottom="0px";const Ae=p.clientHeight-S.offsetTop-S.offsetHeight,Ie=Math.max(oe,pe+(Se?ae:0)+Ae+B),Et=me+Ie;d.style.height=Et+"px"}else{const Se=te.length>0&&w===te[0].ref.current;d.style.top="0px";const Ie=Math.max(re,H+S.offsetTop+(Se?ee:0)+pe)+Ee;d.style.height=Ie+"px",S.scrollTop=me-re+S.offsetTop}d.style.margin=`${hn}px 0`,d.style.minHeight=M+"px",d.style.maxHeight=se+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[x,c.trigger,c.valueNode,d,p,S,w,C,c.dir,s]);ft(()=>O(),[O]);const[_,L]=y.useState();ft(()=>{p&&L(window.getComputedStyle(p).zIndex)},[p]);const k=y.useCallback(V=>{V&&T.current===!0&&(O(),N==null||N(),T.current=!1)},[O,N]);return v.jsx(b4,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:E,onScrollButtonChange:k,children:v.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:v.jsx(we.div,{...o,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});b1.displayName=v4;var y4="SelectPopperPosition",jm=y.forwardRef((t,r)=>{const{__scopeSelect:a,align:s="start",collisionPadding:o=hn,...c}=t,f=wu(a);return v.jsx(ow,{...f,...c,ref:r,align:s,collisionPadding:o,style:{boxSizing:"border-box",...c.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)"}})});jm.displayName=y4;var[b4,Tp]=Cs(ii,{}),Dm="SelectViewport",x1=y.forwardRef((t,r)=>{const{__scopeSelect:a,nonce:s,...o}=t,c=va(Dm,a),f=Tp(Dm,a),d=Ue(r,c.onViewportChange),m=y.useRef(0);return v.jsxs(v.Fragment,{children:[v.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:s}),v.jsx(xu.Slot,{scope:a,children:v.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ve(o.onScroll,p=>{const g=p.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:x}=f;if(x!=null&&x.current&&b){const E=Math.abs(m.current-g.scrollTop);if(E>0){const T=window.innerHeight-hn*2,S=parseFloat(b.style.minHeight),w=parseFloat(b.style.height),C=Math.max(S,w);if(C<T){const N=C+E,O=Math.min(T,N),_=N-O;b.style.height=O+"px",b.style.bottom==="0px"&&(g.scrollTop=_>0?_:0,b.style.justifyContent="flex-end")}}}m.current=g.scrollTop})})})]})});x1.displayName=Dm;var S1="SelectGroup",[x4,S4]=Cs(S1),w4=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=yr();return v.jsx(x4,{scope:a,id:o,children:v.jsx(we.div,{role:"group","aria-labelledby":o,...s,ref:r})})});w4.displayName=S1;var w1="SelectLabel",E1=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=S4(w1,a);return v.jsx(we.div,{id:o.id,...s,ref:r})});E1.displayName=w1;var Zc="SelectItem",[E4,R1]=Cs(Zc),T1=y.forwardRef((t,r)=>{const{__scopeSelect:a,value:s,disabled:o=!1,textValue:c,...f}=t,d=ga(Zc,a),m=va(Zc,a),p=d.value===s,[g,b]=y.useState(c??""),[x,E]=y.useState(!1),T=Ue(r,N=>{var O;return(O=m.itemRefCallback)==null?void 0:O.call(m,N,s,o)}),S=yr(),w=y.useRef("touch"),C=()=>{o||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(E4,{scope:a,value:s,disabled:o,textId:S,isSelected:p,onItemTextChange:y.useCallback(N=>{b(O=>O||((N==null?void 0:N.textContent)??"").trim())},[]),children:v.jsx(xu.ItemSlot,{scope:a,value:s,disabled:o,textValue:g,children:v.jsx(we.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":p&&x,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...f,ref:T,onFocus:ve(f.onFocus,()=>E(!0)),onBlur:ve(f.onBlur,()=>E(!1)),onClick:ve(f.onClick,()=>{w.current!=="mouse"&&C()}),onPointerUp:ve(f.onPointerUp,()=>{w.current==="mouse"&&C()}),onPointerDown:ve(f.onPointerDown,N=>{w.current=N.pointerType}),onPointerMove:ve(f.onPointerMove,N=>{var O;w.current=N.pointerType,o?(O=m.onItemLeave)==null||O.call(m):w.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ve(f.onPointerLeave,N=>{var O;N.currentTarget===document.activeElement&&((O=m.onItemLeave)==null||O.call(m))}),onKeyDown:ve(f.onKeyDown,N=>{var _;((_=m.searchRef)==null?void 0:_.current)!==""&&N.key===" "||(c4.includes(N.key)&&C(),N.key===" "&&N.preventDefault())})})})})});T1.displayName=Zc;var zl="SelectItemText",C1=y.forwardRef((t,r)=>{const{__scopeSelect:a,className:s,style:o,...c}=t,f=ga(zl,a),d=va(zl,a),m=R1(zl,a),p=h4(zl,a),[g,b]=y.useState(null),x=Ue(r,C=>b(C),m.onItemTextChange,C=>{var N;return(N=d.itemTextRefCallback)==null?void 0:N.call(d,C,m.value,m.disabled)}),E=g==null?void 0:g.textContent,T=y.useMemo(()=>v.jsx("option",{value:m.value,disabled:m.disabled,children:E},m.value),[m.disabled,m.value,E]),{onNativeOptionAdd:S,onNativeOptionRemove:w}=p;return ft(()=>(S(T),()=>w(T)),[S,w,T]),v.jsxs(v.Fragment,{children:[v.jsx(we.span,{id:m.textId,...c,ref:x}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren?ys.createPortal(c.children,f.valueNode):null]})});C1.displayName=zl;var A1="SelectItemIndicator",N1=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t;return R1(A1,a).isSelected?v.jsx(we.span,{"aria-hidden":!0,...s,ref:r}):null});N1.displayName=A1;var _m="SelectScrollUpButton",O1=y.forwardRef((t,r)=>{const a=va(_m,t.__scopeSelect),s=Tp(_m,t.__scopeSelect),[o,c]=y.useState(!1),f=Ue(r,s.onScrollButtonChange);return ft(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=m.scrollTop>0;c(p)};const m=a.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),o?v.jsx(j1,{...t,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=a;d&&m&&(d.scrollTop=d.scrollTop-m.offsetHeight)}}):null});O1.displayName=_m;var Lm="SelectScrollDownButton",M1=y.forwardRef((t,r)=>{const a=va(Lm,t.__scopeSelect),s=Tp(Lm,t.__scopeSelect),[o,c]=y.useState(!1),f=Ue(r,s.onScrollButtonChange);return ft(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=m.scrollHeight-m.clientHeight,g=Math.ceil(m.scrollTop)<p;c(g)};const m=a.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),o?v.jsx(j1,{...t,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=a;d&&m&&(d.scrollTop=d.scrollTop+m.offsetHeight)}}):null});M1.displayName=Lm;var j1=y.forwardRef((t,r)=>{const{__scopeSelect:a,onAutoScroll:s,...o}=t,c=va("SelectScrollButton",a),f=y.useRef(null),d=Su(a),m=y.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return y.useEffect(()=>()=>m(),[m]),ft(()=>{var g;const p=d().find(b=>b.ref.current===document.activeElement);(g=p==null?void 0:p.ref.current)==null||g.scrollIntoView({block:"nearest"})},[d]),v.jsx(we.div,{"aria-hidden":!0,...o,ref:r,style:{flexShrink:0,...o.style},onPointerDown:ve(o.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(s,50))}),onPointerMove:ve(o.onPointerMove,()=>{var p;(p=c.onItemLeave)==null||p.call(c),f.current===null&&(f.current=window.setInterval(s,50))}),onPointerLeave:ve(o.onPointerLeave,()=>{m()})})}),R4="SelectSeparator",D1=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t;return v.jsx(we.div,{"aria-hidden":!0,...s,ref:r})});D1.displayName=R4;var zm="SelectArrow",T4=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=wu(a),c=ga(zm,a),f=va(zm,a);return c.open&&f.position==="popper"?v.jsx(cw,{...o,...s,ref:r}):null});T4.displayName=zm;function _1(t){return t===""||t===void 0}var L1=y.forwardRef((t,r)=>{const{value:a,...s}=t,o=y.useRef(null),c=Ue(r,o),f=l4(a);return y.useEffect(()=>{const d=o.current,m=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(m,"value").set;if(f!==a&&g){const b=new Event("change",{bubbles:!0});g.call(d,a),d.dispatchEvent(b)}},[f,a]),v.jsx(Kl,{asChild:!0,children:v.jsx("select",{...s,ref:c,defaultValue:a})})});L1.displayName="BubbleSelect";function z1(t){const r=nt(t),a=y.useRef(""),s=y.useRef(0),o=y.useCallback(f=>{const d=a.current+f;r(d),function m(p){a.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>m(""),1e3))}(d)},[r]),c=y.useCallback(()=>{a.current="",window.clearTimeout(s.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),[a,o,c]}function P1(t,r,a){const o=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=a?t.indexOf(a):-1;let f=C4(t,Math.max(c,0));o.length===1&&(f=f.filter(p=>p!==a));const m=f.find(p=>p.textValue.toLowerCase().startsWith(o.toLowerCase()));return m!==a?m:void 0}function C4(t,r){return t.map((a,s)=>t[(r+s)%t.length])}var A4=c1,U1=f1,N4=h1,O4=m1,M4=p1,k1=g1,j4=x1,$1=E1,H1=T1,D4=C1,_4=N1,q1=O1,B1=M1,I1=D1;const L4=A4,z4=N4,V1=y.forwardRef(({className:t,children:r,...a},s)=>v.jsxs(U1,{ref:s,className:le("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[r,v.jsx(O4,{asChild:!0,children:v.jsx(LS,{className:"h-4 w-4 opacity-50"})})]}));V1.displayName=U1.displayName;const Y1=y.forwardRef(({className:t,...r},a)=>v.jsx(q1,{ref:a,className:le("flex cursor-default items-center justify-center py-1",t),...r,children:v.jsx(qO,{className:"h-4 w-4"})}));Y1.displayName=q1.displayName;const G1=y.forwardRef(({className:t,...r},a)=>v.jsx(B1,{ref:a,className:le("flex cursor-default items-center justify-center py-1",t),...r,children:v.jsx(LS,{className:"h-4 w-4"})}));G1.displayName=B1.displayName;const F1=y.forwardRef(({className:t,children:r,position:a="popper",...s},o)=>v.jsx(M4,{children:v.jsxs(k1,{ref:o,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...s,children:[v.jsx(Y1,{}),v.jsx(j4,{className:le("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),v.jsx(G1,{})]})}));F1.displayName=k1.displayName;const P4=y.forwardRef(({className:t,...r},a)=>v.jsx($1,{ref:a,className:le("px-2 py-1.5 text-sm font-semibold",t),...r}));P4.displayName=$1.displayName;const Pm=y.forwardRef(({className:t,children:r,...a},s)=>v.jsxs(H1,{ref:s,className:le("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",t),...a,children:[v.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(_4,{children:v.jsx(Xm,{className:"h-4 w-4"})})}),v.jsx(D4,{children:r})]}));Pm.displayName=H1.displayName;const U4=y.forwardRef(({className:t,...r},a)=>v.jsx(I1,{ref:a,className:le("-mx-1 my-1 h-px bg-muted",t),...r}));U4.displayName=I1.displayName;const k4={10:"TRACE",20:"DEBUG",27:"SUCCESS",28:"PROGRESS",29:"LOG",30:"INFO",40:"WARN",50:"ERROR",60:"FATAL"},$4={10:"text-gray-400",20:"text-blue-400",27:"text-green-600",28:"text-purple-400",29:"text-gray-300",30:"text-emerald-400",40:"text-yellow-400",50:"text-red-400",60:"text-red-600"};function H4(){const[t,r]=y.useState("all"),[a,s]=y.useState(!0),o=y.useRef(null),c=y.useRef(!1),f=y.useRef(""),{data:d,error:m,isLoading:p}=Es({queryKey:["logs",t],queryFn:()=>Lt.getLogs(t==="all"?"":t),refetchInterval:1e3,staleTime:1e3}),g=()=>{if(!o.current)return;const w=o.current,C=w.scrollHeight,N=w.clientHeight;w.scrollTo({top:C-N,behavior:"instant"})};y.useEffect(()=>{var N;if(!((N=d==null?void 0:d.logs)!=null&&N.length))return;const w=d.logs[d.logs.length-1],C=`${w.time}-${w.msg}`;a&&C!==f.current&&(setTimeout(g,0),f.current=C)},[d==null?void 0:d.logs,a]);const b=w=>{if(c.current)return;const{scrollTop:C,scrollHeight:N,clientHeight:O}=w.currentTarget,L=N-(C+O)<100;s(L),c.current=!0,setTimeout(()=>{c.current=!1},150)},x=()=>{s(!0),g()};y.useEffect(()=>{setTimeout(g,100)},[d==null?void 0:d.logs]);const E=w=>k4[w]||"UNKNOWN",T=w=>$4[w]||"text-gray-400",S=w=>{const C=GL(w.time,"yyyy-MM-dd HH:mm:ss"),N=E(w.level),O=Object.entries(w).filter(([L])=>!Number.isNaN(Number(L))).sort((L,k)=>Number(L[0])-Number(k[0])),_=O.length>0?`
265
+ ${O.map(([L,k])=>k).join(`
266
+ `)}`:"";return v.jsxs("div",{className:"whitespace-pre-wrap font-mono",children:[v.jsxs("span",{className:"text-gray-500",children:["[",C,"]"]})," ",v.jsxs("span",{className:T(w.level),children:[N,":"]})," ",v.jsx("span",{className:"text-white",children:w.msg}),v.jsx("span",{className:"text-gray-300",children:_})]},`${w.time}-${w.msg}`)};return v.jsxs("div",{className:"p-4",children:[v.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[v.jsx(FE,{title:"System Logs"}),v.jsxs("div",{className:"flex items-center gap-4",children:[!a&&v.jsx("button",{type:"button",onClick:x,className:"text-xs text-gray-400 hover:text-white transition-colors",children:"Resume auto-scroll"}),v.jsxs(L4,{value:t,onValueChange:r,children:[v.jsx(V1,{className:"w-32",children:v.jsx(z4,{placeholder:"Select level"})}),v.jsxs(F1,{children:[v.jsx(Pm,{value:"all",children:"ALL"}),d==null?void 0:d.levels.map(w=>v.jsx(Pm,{value:w,children:w.toUpperCase()},w))]})]})]})]}),p?v.jsx("div",{className:"font-mono p-4",children:"Loading logs..."}):m?v.jsx("div",{className:"text-red-500 font-mono p-4",children:m instanceof Error?m.message:"Failed to fetch logs"}):v.jsx(l1,{className:"h-[600px] rounded-md border bg-black",children:v.jsx("div",{ref:o,onScroll:b,className:"p-4 text-sm space-y-1 h-full overflow-auto",children:(d==null?void 0:d.logs.length)===0?v.jsxs("div",{className:"text-gray-500 font-mono",children:["No ",t==="all"?"":t.toUpperCase()," ","logs found"]}):d==null?void 0:d.logs.map(w=>S(w))})})]})}var Cp="ToastProvider",[Ap,q4,B4]=vp("Toast"),[Q1,yz]=qn("Toast",[B4]),[I4,Eu]=Q1(Cp),X1=t=>{const{__scopeToast:r,label:a="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:c=50,children:f}=t,[d,m]=y.useState(null),[p,g]=y.useState(0),b=y.useRef(!1),x=y.useRef(!1);return a.trim()||console.error(`Invalid prop \`label\` supplied to \`${Cp}\`. Expected non-empty \`string\`.`),v.jsx(Ap.Provider,{scope:r,children:v.jsx(I4,{scope:r,label:a,duration:s,swipeDirection:o,swipeThreshold:c,toastCount:p,viewport:d,onViewportChange:m,onToastAdd:y.useCallback(()=>g(E=>E+1),[]),onToastRemove:y.useCallback(()=>g(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:x,children:f})})};X1.displayName=Cp;var K1="ToastViewport",V4=["F8"],Um="toast.viewportPause",km="toast.viewportResume",W1=y.forwardRef((t,r)=>{const{__scopeToast:a,hotkey:s=V4,label:o="Notifications ({hotkey})",...c}=t,f=Eu(K1,a),d=q4(a),m=y.useRef(null),p=y.useRef(null),g=y.useRef(null),b=y.useRef(null),x=Ue(r,b,f.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=f.toastCount>0;y.useEffect(()=>{const w=C=>{var O;s.length!==0&&s.every(_=>C[_]||C.code===_)&&((O=b.current)==null||O.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[s]),y.useEffect(()=>{const w=m.current,C=b.current;if(T&&w&&C){const N=()=>{if(!f.isClosePausedRef.current){const k=new CustomEvent(Um);C.dispatchEvent(k),f.isClosePausedRef.current=!0}},O=()=>{if(f.isClosePausedRef.current){const k=new CustomEvent(km);C.dispatchEvent(k),f.isClosePausedRef.current=!1}},_=k=>{!w.contains(k.relatedTarget)&&O()},L=()=>{w.contains(document.activeElement)||O()};return w.addEventListener("focusin",N),w.addEventListener("focusout",_),w.addEventListener("pointermove",N),w.addEventListener("pointerleave",L),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{w.removeEventListener("focusin",N),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",N),w.removeEventListener("pointerleave",L),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[T,f.isClosePausedRef]);const S=y.useCallback(({tabbingDirection:w})=>{const N=d().map(O=>{const _=O.ref.current,L=[_,...r3(_)];return w==="forwards"?L:L.reverse()});return(w==="forwards"?N.reverse():N).flat()},[d]);return y.useEffect(()=>{const w=b.current;if(w){const C=N=>{var L,k,V;const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const $=document.activeElement,U=N.shiftKey;if(N.target===w&&U){(L=p.current)==null||L.focus();return}const se=S({tabbingDirection:U?"backwards":"forwards"}),de=se.findIndex(q=>q===$);uh(se.slice(de+1))?N.preventDefault():U?(k=p.current)==null||k.focus():(V=g.current)==null||V.focus()}};return w.addEventListener("keydown",C),()=>w.removeEventListener("keydown",C)}},[d,S]),v.jsxs(ON,{ref:m,role:"region","aria-label":o.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:T?void 0:"none"},children:[T&&v.jsx($m,{ref:p,onFocusFromOutsideViewport:()=>{const w=S({tabbingDirection:"forwards"});uh(w)}}),v.jsx(Ap.Slot,{scope:a,children:v.jsx(we.ol,{tabIndex:-1,...c,ref:x})}),T&&v.jsx($m,{ref:g,onFocusFromOutsideViewport:()=>{const w=S({tabbingDirection:"backwards"});uh(w)}})]})});W1.displayName=K1;var Z1="ToastFocusProxy",$m=y.forwardRef((t,r)=>{const{__scopeToast:a,onFocusFromOutsideViewport:s,...o}=t,c=Eu(Z1,a);return v.jsx(Kl,{"aria-hidden":!0,tabIndex:0,...o,ref:r,style:{position:"fixed"},onFocus:f=>{var p;const d=f.relatedTarget;!((p=c.viewport)!=null&&p.contains(d))&&s()}})});$m.displayName=Z1;var Ru="Toast",Y4="toast.swipeStart",G4="toast.swipeMove",F4="toast.swipeCancel",Q4="toast.swipeEnd",J1=y.forwardRef((t,r)=>{const{forceMount:a,open:s,defaultOpen:o,onOpenChange:c,...f}=t,[d=!0,m]=ei({prop:s,defaultProp:o,onChange:c});return v.jsx(ln,{present:a||d,children:v.jsx(W4,{open:d,...f,ref:r,onClose:()=>m(!1),onPause:nt(t.onPause),onResume:nt(t.onResume),onSwipeStart:ve(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ve(t.onSwipeMove,p=>{const{x:g,y:b}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${b}px`)}),onSwipeCancel:ve(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ve(t.onSwipeEnd,p=>{const{x:g,y:b}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${b}px`),m(!1)})})})});J1.displayName=Ru;var[X4,K4]=Q1(Ru,{onClose(){}}),W4=y.forwardRef((t,r)=>{const{__scopeToast:a,type:s="foreground",duration:o,open:c,onClose:f,onEscapeKeyDown:d,onPause:m,onResume:p,onSwipeStart:g,onSwipeMove:b,onSwipeCancel:x,onSwipeEnd:E,...T}=t,S=Eu(Ru,a),[w,C]=y.useState(null),N=Ue(r,q=>C(q)),O=y.useRef(null),_=y.useRef(null),L=o||S.duration,k=y.useRef(0),V=y.useRef(L),$=y.useRef(0),{onToastAdd:U,onToastRemove:K}=S,te=nt(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=S.viewport)==null||H.focus()),f()}),se=y.useCallback(q=>{!q||q===1/0||(window.clearTimeout($.current),k.current=new Date().getTime(),$.current=window.setTimeout(te,q))},[te]);y.useEffect(()=>{const q=S.viewport;if(q){const H=()=>{se(V.current),p==null||p()},j=()=>{const B=new Date().getTime()-k.current;V.current=V.current-B,window.clearTimeout($.current),m==null||m()};return q.addEventListener(Um,j),q.addEventListener(km,H),()=>{q.removeEventListener(Um,j),q.removeEventListener(km,H)}}},[S.viewport,L,m,p,se]),y.useEffect(()=>{c&&!S.isClosePausedRef.current&&se(L)},[c,L,S.isClosePausedRef,se]),y.useEffect(()=>(U(),()=>K()),[U,K]);const de=y.useMemo(()=>w?sR(w):null,[w]);return S.viewport?v.jsxs(v.Fragment,{children:[de&&v.jsx(Z4,{__scopeToast:a,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:de}),v.jsx(X4,{scope:a,onClose:te,children:ys.createPortal(v.jsx(Ap.ItemSlot,{scope:a,children:v.jsx(NN,{asChild:!0,onEscapeKeyDown:ve(d,()=>{S.isFocusedToastEscapeKeyDownRef.current||te(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":S.swipeDirection,...T,ref:N,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ve(t.onKeyDown,q=>{q.key==="Escape"&&(d==null||d(q.nativeEvent),q.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,te()))}),onPointerDown:ve(t.onPointerDown,q=>{q.button===0&&(O.current={x:q.clientX,y:q.clientY})}),onPointerMove:ve(t.onPointerMove,q=>{if(!O.current)return;const H=q.clientX-O.current.x,j=q.clientY-O.current.y,B=!!_.current,z=["left","right"].includes(S.swipeDirection),Q=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,M=z?Q(0,H):0,G=z?0:Q(0,j),ee=q.pointerType==="touch"?10:2,ae={x:M,y:G},re={originalEvent:q,delta:ae};B?(_.current=ae,Cc(G4,b,re,{discrete:!1})):D0(ae,S.swipeDirection,ee)?(_.current=ae,Cc(Y4,g,re,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(H)>ee||Math.abs(j)>ee)&&(O.current=null)}),onPointerUp:ve(t.onPointerUp,q=>{const H=_.current,j=q.target;if(j.hasPointerCapture(q.pointerId)&&j.releasePointerCapture(q.pointerId),_.current=null,O.current=null,H){const B=q.currentTarget,z={originalEvent:q,delta:H};D0(H,S.swipeDirection,S.swipeThreshold)?Cc(Q4,E,z,{discrete:!0}):Cc(F4,x,z,{discrete:!0}),B.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),Z4=t=>{const{__scopeToast:r,children:a,...s}=t,o=Eu(Ru,r),[c,f]=y.useState(!1),[d,m]=y.useState(!1);return t3(()=>f(!0)),y.useEffect(()=>{const p=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:v.jsx(Ql,{asChild:!0,children:v.jsx(Kl,{...s,children:c&&v.jsxs(v.Fragment,{children:[o.label," ",a]})})})},J4="ToastTitle",eR=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t;return v.jsx(we.div,{...s,ref:r})});eR.displayName=J4;var e3="ToastDescription",tR=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t;return v.jsx(we.div,{...s,ref:r})});tR.displayName=e3;var nR="ToastAction",rR=y.forwardRef((t,r)=>{const{altText:a,...s}=t;return a.trim()?v.jsx(iR,{altText:a,asChild:!0,children:v.jsx(Np,{...s,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${nR}\`. Expected non-empty \`string\`.`),null)});rR.displayName=nR;var aR="ToastClose",Np=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t,o=K4(aR,a);return v.jsx(iR,{asChild:!0,children:v.jsx(we.button,{type:"button",...s,ref:r,onClick:ve(t.onClick,o.onClose)})})});Np.displayName=aR;var iR=y.forwardRef((t,r)=>{const{__scopeToast:a,altText:s,...o}=t;return v.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:r})});function sR(t){const r=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&r.push(s.textContent),n3(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",c=s.dataset.radixToastAnnounceExclude==="";if(!o)if(c){const f=s.dataset.radixToastAnnounceAlt;f&&r.push(f)}else r.push(...sR(s))}}),r}function Cc(t,r,a,{discrete:s}){const o=a.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:a});r&&o.addEventListener(t,r,{once:!0}),s?Kx(o,c):o.dispatchEvent(c)}var D0=(t,r,a=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),c=s>o;return r==="left"||r==="right"?c&&s>a:!c&&o>a};function t3(t=()=>{}){const r=nt(t);ft(()=>{let a=0,s=0;return a=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(a),window.cancelAnimationFrame(s)}},[r])}function n3(t){return t.nodeType===t.ELEMENT_NODE}function r3(t){const r=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function uh(t){const r=document.activeElement;return t.some(a=>a===r?!0:(a.focus(),document.activeElement!==r))}var a3=X1,lR=W1,oR=J1,cR=eR,uR=tR,fR=rR,dR=Np;const i3=a3,hR=y.forwardRef(({className:t,...r},a)=>v.jsx(lR,{ref:a,className:le("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));hR.displayName=lR.displayName;const s3=ma("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),mR=y.forwardRef(({className:t,variant:r,...a},s)=>v.jsx(oR,{ref:s,className:le(s3({variant:r}),t),...a}));mR.displayName=oR.displayName;const pR=y.forwardRef(({className:t,...r},a)=>v.jsx(fR,{ref:a,className:le("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...r}));pR.displayName=fR.displayName;const gR=y.forwardRef(({className:t,...r},a)=>v.jsx(dR,{ref:a,className:le("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...r,children:v.jsx(bs,{className:"h-4 w-4"})}));gR.displayName=dR.displayName;const vR=y.forwardRef(({className:t,...r},a)=>v.jsx(cR,{ref:a,className:le("text-sm font-semibold [&+div]:text-xs",t),...r}));vR.displayName=cR.displayName;const yR=y.forwardRef(({className:t,...r},a)=>v.jsx(uR,{ref:a,className:le("text-sm opacity-90",t),...r}));yR.displayName=uR.displayName;function l3(){const{toasts:t}=xn();return v.jsxs(i3,{children:[t.map(({id:r,title:a,description:s,action:o,...c})=>v.jsxs(mR,{...c,children:[v.jsxs("div",{className:"grid gap-1",children:[a&&v.jsx(vR,{children:a}),s&&v.jsx(yR,{children:s})]}),o,v.jsx(gR,{})]},r)),v.jsx(hR,{})]})}var Ac={exports:{}},fh,_0;function Tu(){if(_0)return fh;_0=1;const t="2.0.0",r=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,o=r-6;return fh={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},fh}var dh,L0;function Cu(){if(L0)return dh;L0=1;var t={};return dh=typeof process=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...a)=>console.error("SEMVER",...a):()=>{},dh}var z0;function ao(){return z0||(z0=1,function(t,r){const{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:o}=Tu(),c=Cu();r=t.exports={};const f=r.re=[],d=r.safeRe=[],m=r.src=[],p=r.safeSrc=[],g=r.t={};let b=0;const x="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",o],[x,s]],T=w=>{for(const[C,N]of E)w=w.split(`${C}*`).join(`${C}{0,${N}}`).split(`${C}+`).join(`${C}{1,${N}}`);return w},S=(w,C,N)=>{const O=T(C),_=b++;c(w,_,C),g[w]=_,m[_]=C,p[_]=O,f[_]=new RegExp(C,N?"g":void 0),d[_]=new RegExp(O,N?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*"),S("NUMERICIDENTIFIERLOOSE","\\d+"),S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${x}*`),S("MAINVERSION",`(${m[g.NUMERICIDENTIFIER]})\\.(${m[g.NUMERICIDENTIFIER]})\\.(${m[g.NUMERICIDENTIFIER]})`),S("MAINVERSIONLOOSE",`(${m[g.NUMERICIDENTIFIERLOOSE]})\\.(${m[g.NUMERICIDENTIFIERLOOSE]})\\.(${m[g.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASEIDENTIFIER",`(?:${m[g.NUMERICIDENTIFIER]}|${m[g.NONNUMERICIDENTIFIER]})`),S("PRERELEASEIDENTIFIERLOOSE",`(?:${m[g.NUMERICIDENTIFIERLOOSE]}|${m[g.NONNUMERICIDENTIFIER]})`),S("PRERELEASE",`(?:-(${m[g.PRERELEASEIDENTIFIER]}(?:\\.${m[g.PRERELEASEIDENTIFIER]})*))`),S("PRERELEASELOOSE",`(?:-?(${m[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[g.PRERELEASEIDENTIFIERLOOSE]})*))`),S("BUILDIDENTIFIER",`${x}+`),S("BUILD",`(?:\\+(${m[g.BUILDIDENTIFIER]}(?:\\.${m[g.BUILDIDENTIFIER]})*))`),S("FULLPLAIN",`v?${m[g.MAINVERSION]}${m[g.PRERELEASE]}?${m[g.BUILD]}?`),S("FULL",`^${m[g.FULLPLAIN]}$`),S("LOOSEPLAIN",`[v=\\s]*${m[g.MAINVERSIONLOOSE]}${m[g.PRERELEASELOOSE]}?${m[g.BUILD]}?`),S("LOOSE",`^${m[g.LOOSEPLAIN]}$`),S("GTLT","((?:<|>)?=?)"),S("XRANGEIDENTIFIERLOOSE",`${m[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),S("XRANGEIDENTIFIER",`${m[g.NUMERICIDENTIFIER]}|x|X|\\*`),S("XRANGEPLAIN",`[v=\\s]*(${m[g.XRANGEIDENTIFIER]})(?:\\.(${m[g.XRANGEIDENTIFIER]})(?:\\.(${m[g.XRANGEIDENTIFIER]})(?:${m[g.PRERELEASE]})?${m[g.BUILD]}?)?)?`),S("XRANGEPLAINLOOSE",`[v=\\s]*(${m[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[g.XRANGEIDENTIFIERLOOSE]})(?:${m[g.PRERELEASELOOSE]})?${m[g.BUILD]}?)?)?`),S("XRANGE",`^${m[g.GTLT]}\\s*${m[g.XRANGEPLAIN]}$`),S("XRANGELOOSE",`^${m[g.GTLT]}\\s*${m[g.XRANGEPLAINLOOSE]}$`),S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),S("COERCE",`${m[g.COERCEPLAIN]}(?:$|[^\\d])`),S("COERCEFULL",m[g.COERCEPLAIN]+`(?:${m[g.PRERELEASE]})?(?:${m[g.BUILD]})?(?:$|[^\\d])`),S("COERCERTL",m[g.COERCE],!0),S("COERCERTLFULL",m[g.COERCEFULL],!0),S("LONETILDE","(?:~>?)"),S("TILDETRIM",`(\\s*)${m[g.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",S("TILDE",`^${m[g.LONETILDE]}${m[g.XRANGEPLAIN]}$`),S("TILDELOOSE",`^${m[g.LONETILDE]}${m[g.XRANGEPLAINLOOSE]}$`),S("LONECARET","(?:\\^)"),S("CARETTRIM",`(\\s*)${m[g.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",S("CARET",`^${m[g.LONECARET]}${m[g.XRANGEPLAIN]}$`),S("CARETLOOSE",`^${m[g.LONECARET]}${m[g.XRANGEPLAINLOOSE]}$`),S("COMPARATORLOOSE",`^${m[g.GTLT]}\\s*(${m[g.LOOSEPLAIN]})$|^$`),S("COMPARATOR",`^${m[g.GTLT]}\\s*(${m[g.FULLPLAIN]})$|^$`),S("COMPARATORTRIM",`(\\s*)${m[g.GTLT]}\\s*(${m[g.LOOSEPLAIN]}|${m[g.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",S("HYPHENRANGE",`^\\s*(${m[g.XRANGEPLAIN]})\\s+-\\s+(${m[g.XRANGEPLAIN]})\\s*$`),S("HYPHENRANGELOOSE",`^\\s*(${m[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[g.XRANGEPLAINLOOSE]})\\s*$`),S("STAR","(<|>)?=?\\s*\\*"),S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ac,Ac.exports)),Ac.exports}var hh,P0;function Op(){if(P0)return hh;P0=1;const t=Object.freeze({loose:!0}),r=Object.freeze({});return hh=s=>s?typeof s!="object"?t:s:r,hh}var mh,U0;function bR(){if(U0)return mh;U0=1;const t=/^[0-9]+$/,r=(s,o)=>{const c=t.test(s),f=t.test(o);return c&&f&&(s=+s,o=+o),s===o?0:c&&!f?-1:f&&!c?1:s<o?-1:1};return mh={compareIdentifiers:r,rcompareIdentifiers:(s,o)=>r(o,s)},mh}var ph,k0;function Nt(){if(k0)return ph;k0=1;const t=Cu(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:a}=Tu(),{safeRe:s,safeSrc:o,t:c}=ao(),f=Op(),{compareIdentifiers:d}=bR();class m{constructor(g,b){if(b=f(b),g instanceof m){if(g.loose===!!b.loose&&g.includePrerelease===!!b.includePrerelease)return g;g=g.version}else if(typeof g!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof g}".`);if(g.length>r)throw new TypeError(`version is longer than ${r} characters`);t("SemVer",g,b),this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease;const x=g.trim().match(b.loose?s[c.LOOSE]:s[c.FULL]);if(!x)throw new TypeError(`Invalid Version: ${g}`);if(this.raw=g,this.major=+x[1],this.minor=+x[2],this.patch=+x[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");x[4]?this.prerelease=x[4].split(".").map(E=>{if(/^[0-9]+$/.test(E)){const T=+E;if(T>=0&&T<a)return T}return E}):this.prerelease=[],this.build=x[5]?x[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(g){if(t("SemVer.compare",this.version,this.options,g),!(g instanceof m)){if(typeof g=="string"&&g===this.version)return 0;g=new m(g,this.options)}return g.version===this.version?0:this.compareMain(g)||this.comparePre(g)}compareMain(g){return g instanceof m||(g=new m(g,this.options)),d(this.major,g.major)||d(this.minor,g.minor)||d(this.patch,g.patch)}comparePre(g){if(g instanceof m||(g=new m(g,this.options)),this.prerelease.length&&!g.prerelease.length)return-1;if(!this.prerelease.length&&g.prerelease.length)return 1;if(!this.prerelease.length&&!g.prerelease.length)return 0;let b=0;do{const x=this.prerelease[b],E=g.prerelease[b];if(t("prerelease compare",b,x,E),x===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(x===void 0)return-1;if(x===E)continue;return d(x,E)}while(++b)}compareBuild(g){g instanceof m||(g=new m(g,this.options));let b=0;do{const x=this.build[b],E=g.build[b];if(t("build compare",b,x,E),x===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(x===void 0)return-1;if(x===E)continue;return d(x,E)}while(++b)}inc(g,b,x){if(g.startsWith("pre")){if(!b&&x===!1)throw new Error("invalid increment argument: identifier is empty");if(b){const E=new RegExp(`^${this.options.loose?o[c.PRERELEASELOOSE]:o[c.PRERELEASE]}$`),T=`-${b}`.match(E);if(!T||T[1]!==b)throw new Error(`invalid identifier: ${b}`)}}switch(g){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",b,x);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",b,x);break;case"prepatch":this.prerelease.length=0,this.inc("patch",b,x),this.inc("pre",b,x);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",b,x),this.inc("pre",b,x);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const E=Number(x)?1:0;if(this.prerelease.length===0)this.prerelease=[E];else{let T=this.prerelease.length;for(;--T>=0;)typeof this.prerelease[T]=="number"&&(this.prerelease[T]++,T=-2);if(T===-1){if(b===this.prerelease.join(".")&&x===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(E)}}if(b){let T=[b,E];x===!1&&(T=[b]),d(this.prerelease[0],b)===0?isNaN(this.prerelease[1])&&(this.prerelease=T):this.prerelease=T}break}default:throw new Error(`invalid increment argument: ${g}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ph=m,ph}var gh,$0;function As(){if($0)return gh;$0=1;const t=Nt();return gh=(a,s,o=!1)=>{if(a instanceof t)return a;try{return new t(a,s)}catch(c){if(!o)return null;throw c}},gh}var vh,H0;function o3(){if(H0)return vh;H0=1;const t=As();return vh=(a,s)=>{const o=t(a,s);return o?o.version:null},vh}var yh,q0;function c3(){if(q0)return yh;q0=1;const t=As();return yh=(a,s)=>{const o=t(a.trim().replace(/^[=v]+/,""),s);return o?o.version:null},yh}var bh,B0;function u3(){if(B0)return bh;B0=1;const t=Nt();return bh=(a,s,o,c,f)=>{typeof o=="string"&&(f=c,c=o,o=void 0);try{return new t(a instanceof t?a.version:a,o).inc(s,c,f).version}catch{return null}},bh}var xh,I0;function f3(){if(I0)return xh;I0=1;const t=As();return xh=(a,s)=>{const o=t(a,null,!0),c=t(s,null,!0),f=o.compare(c);if(f===0)return null;const d=f>0,m=d?o:c,p=d?c:o,g=!!m.prerelease.length;if(!!p.prerelease.length&&!g){if(!p.patch&&!p.minor)return"major";if(p.compareMain(m)===0)return p.minor&&!p.patch?"minor":"patch"}const x=g?"pre":"";return o.major!==c.major?x+"major":o.minor!==c.minor?x+"minor":o.patch!==c.patch?x+"patch":"prerelease"},xh}var Sh,V0;function d3(){if(V0)return Sh;V0=1;const t=Nt();return Sh=(a,s)=>new t(a,s).major,Sh}var wh,Y0;function h3(){if(Y0)return wh;Y0=1;const t=Nt();return wh=(a,s)=>new t(a,s).minor,wh}var Eh,G0;function m3(){if(G0)return Eh;G0=1;const t=Nt();return Eh=(a,s)=>new t(a,s).patch,Eh}var Rh,F0;function p3(){if(F0)return Rh;F0=1;const t=As();return Rh=(a,s)=>{const o=t(a,s);return o&&o.prerelease.length?o.prerelease:null},Rh}var Th,Q0;function wn(){if(Q0)return Th;Q0=1;const t=Nt();return Th=(a,s,o)=>new t(a,o).compare(new t(s,o)),Th}var Ch,X0;function g3(){if(X0)return Ch;X0=1;const t=wn();return Ch=(a,s,o)=>t(s,a,o),Ch}var Ah,K0;function v3(){if(K0)return Ah;K0=1;const t=wn();return Ah=(a,s)=>t(a,s,!0),Ah}var Nh,W0;function Mp(){if(W0)return Nh;W0=1;const t=Nt();return Nh=(a,s,o)=>{const c=new t(a,o),f=new t(s,o);return c.compare(f)||c.compareBuild(f)},Nh}var Oh,Z0;function y3(){if(Z0)return Oh;Z0=1;const t=Mp();return Oh=(a,s)=>a.sort((o,c)=>t(o,c,s)),Oh}var Mh,J0;function b3(){if(J0)return Mh;J0=1;const t=Mp();return Mh=(a,s)=>a.sort((o,c)=>t(c,o,s)),Mh}var jh,ex;function Au(){if(ex)return jh;ex=1;const t=wn();return jh=(a,s,o)=>t(a,s,o)>0,jh}var Dh,tx;function jp(){if(tx)return Dh;tx=1;const t=wn();return Dh=(a,s,o)=>t(a,s,o)<0,Dh}var _h,nx;function xR(){if(nx)return _h;nx=1;const t=wn();return _h=(a,s,o)=>t(a,s,o)===0,_h}var Lh,rx;function SR(){if(rx)return Lh;rx=1;const t=wn();return Lh=(a,s,o)=>t(a,s,o)!==0,Lh}var zh,ax;function Dp(){if(ax)return zh;ax=1;const t=wn();return zh=(a,s,o)=>t(a,s,o)>=0,zh}var Ph,ix;function _p(){if(ix)return Ph;ix=1;const t=wn();return Ph=(a,s,o)=>t(a,s,o)<=0,Ph}var Uh,sx;function wR(){if(sx)return Uh;sx=1;const t=xR(),r=SR(),a=Au(),s=Dp(),o=jp(),c=_p();return Uh=(d,m,p,g)=>{switch(m){case"===":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d===p;case"!==":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d!==p;case"":case"=":case"==":return t(d,p,g);case"!=":return r(d,p,g);case">":return a(d,p,g);case">=":return s(d,p,g);case"<":return o(d,p,g);case"<=":return c(d,p,g);default:throw new TypeError(`Invalid operator: ${m}`)}},Uh}var kh,lx;function x3(){if(lx)return kh;lx=1;const t=Nt(),r=As(),{safeRe:a,t:s}=ao();return kh=(c,f)=>{if(c instanceof t)return c;if(typeof c=="number"&&(c=String(c)),typeof c!="string")return null;f=f||{};let d=null;if(!f.rtl)d=c.match(f.includePrerelease?a[s.COERCEFULL]:a[s.COERCE]);else{const E=f.includePrerelease?a[s.COERCERTLFULL]:a[s.COERCERTL];let T;for(;(T=E.exec(c))&&(!d||d.index+d[0].length!==c.length);)(!d||T.index+T[0].length!==d.index+d[0].length)&&(d=T),E.lastIndex=T.index+T[1].length+T[2].length;E.lastIndex=-1}if(d===null)return null;const m=d[2],p=d[3]||"0",g=d[4]||"0",b=f.includePrerelease&&d[5]?`-${d[5]}`:"",x=f.includePrerelease&&d[6]?`+${d[6]}`:"";return r(`${m}.${p}.${g}${b}${x}`,f)},kh}var $h,ox;function S3(){if(ox)return $h;ox=1;class t{constructor(){this.max=1e3,this.map=new Map}get(a){const s=this.map.get(a);if(s!==void 0)return this.map.delete(a),this.map.set(a,s),s}delete(a){return this.map.delete(a)}set(a,s){if(!this.delete(a)&&s!==void 0){if(this.map.size>=this.max){const c=this.map.keys().next().value;this.delete(c)}this.map.set(a,s)}return this}}return $h=t,$h}var Hh,cx;function En(){if(cx)return Hh;cx=1;const t=/\s+/g;class r{constructor(H,j){if(j=o(j),H instanceof r)return H.loose===!!j.loose&&H.includePrerelease===!!j.includePrerelease?H:new r(H.raw,j);if(H instanceof c)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=H.trim().replace(t," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(z=>!S(z[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const z of this.set)if(z.length===1&&w(z[0])){this.set=[z];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const j=this.set[H];for(let B=0;B<j.length;B++)B>0&&(this.formatted+=" "),this.formatted+=j[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){const B=((this.options.includePrerelease&&E)|(this.options.loose&&T))+":"+H,z=s.get(B);if(z)return z;const Q=this.options.loose,M=Q?m[p.HYPHENRANGELOOSE]:m[p.HYPHENRANGE];H=H.replace(M,se(this.options.includePrerelease)),f("hyphen replace",H),H=H.replace(m[p.COMPARATORTRIM],g),f("comparator trim",H),H=H.replace(m[p.TILDETRIM],b),f("tilde trim",H),H=H.replace(m[p.CARETTRIM],x),f("caret trim",H);let G=H.split(" ").map(oe=>N(oe,this.options)).join(" ").split(/\s+/).map(oe=>te(oe,this.options));Q&&(G=G.filter(oe=>(f("loose invalid filter",oe,this.options),!!oe.match(m[p.COMPARATORLOOSE])))),f("range list",G);const ee=new Map,ae=G.map(oe=>new c(oe,this.options));for(const oe of ae){if(S(oe))return[oe];ee.set(oe.value,oe)}ee.size>1&&ee.has("")&&ee.delete("");const re=[...ee.values()];return s.set(B,re),re}intersects(H,j){if(!(H instanceof r))throw new TypeError("a Range is required");return this.set.some(B=>C(B,j)&&H.set.some(z=>C(z,j)&&B.every(Q=>z.every(M=>Q.intersects(M,j)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new d(H,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(de(this.set[j],H,this.options))return!0;return!1}}Hh=r;const a=S3(),s=new a,o=Op(),c=Nu(),f=Cu(),d=Nt(),{safeRe:m,t:p,comparatorTrimReplace:g,tildeTrimReplace:b,caretTrimReplace:x}=ao(),{FLAG_INCLUDE_PRERELEASE:E,FLAG_LOOSE:T}=Tu(),S=q=>q.value==="<0.0.0-0",w=q=>q.value==="",C=(q,H)=>{let j=!0;const B=q.slice();let z=B.pop();for(;j&&B.length;)j=B.every(Q=>z.intersects(Q,H)),z=B.pop();return j},N=(q,H)=>(f("comp",q,H),q=k(q,H),f("caret",q),q=_(q,H),f("tildes",q),q=$(q,H),f("xrange",q),q=K(q,H),f("stars",q),q),O=q=>!q||q.toLowerCase()==="x"||q==="*",_=(q,H)=>q.trim().split(/\s+/).map(j=>L(j,H)).join(" "),L=(q,H)=>{const j=H.loose?m[p.TILDELOOSE]:m[p.TILDE];return q.replace(j,(B,z,Q,M,G)=>{f("tilde",q,B,z,Q,M,G);let ee;return O(z)?ee="":O(Q)?ee=`>=${z}.0.0 <${+z+1}.0.0-0`:O(M)?ee=`>=${z}.${Q}.0 <${z}.${+Q+1}.0-0`:G?(f("replaceTilde pr",G),ee=`>=${z}.${Q}.${M}-${G} <${z}.${+Q+1}.0-0`):ee=`>=${z}.${Q}.${M} <${z}.${+Q+1}.0-0`,f("tilde return",ee),ee})},k=(q,H)=>q.trim().split(/\s+/).map(j=>V(j,H)).join(" "),V=(q,H)=>{f("caret",q,H);const j=H.loose?m[p.CARETLOOSE]:m[p.CARET],B=H.includePrerelease?"-0":"";return q.replace(j,(z,Q,M,G,ee)=>{f("caret",q,z,Q,M,G,ee);let ae;return O(Q)?ae="":O(M)?ae=`>=${Q}.0.0${B} <${+Q+1}.0.0-0`:O(G)?Q==="0"?ae=`>=${Q}.${M}.0${B} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.0${B} <${+Q+1}.0.0-0`:ee?(f("replaceCaret pr",ee),Q==="0"?M==="0"?ae=`>=${Q}.${M}.${G}-${ee} <${Q}.${M}.${+G+1}-0`:ae=`>=${Q}.${M}.${G}-${ee} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.${G}-${ee} <${+Q+1}.0.0-0`):(f("no pr"),Q==="0"?M==="0"?ae=`>=${Q}.${M}.${G}${B} <${Q}.${M}.${+G+1}-0`:ae=`>=${Q}.${M}.${G}${B} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.${G} <${+Q+1}.0.0-0`),f("caret return",ae),ae})},$=(q,H)=>(f("replaceXRanges",q,H),q.split(/\s+/).map(j=>U(j,H)).join(" ")),U=(q,H)=>{q=q.trim();const j=H.loose?m[p.XRANGELOOSE]:m[p.XRANGE];return q.replace(j,(B,z,Q,M,G,ee)=>{f("xRange",q,B,z,Q,M,G,ee);const ae=O(Q),re=ae||O(M),oe=re||O(G),pe=oe;return z==="="&&pe&&(z=""),ee=H.includePrerelease?"-0":"",ae?z===">"||z==="<"?B="<0.0.0-0":B="*":z&&pe?(re&&(M=0),G=0,z===">"?(z=">=",re?(Q=+Q+1,M=0,G=0):(M=+M+1,G=0)):z==="<="&&(z="<",re?Q=+Q+1:M=+M+1),z==="<"&&(ee="-0"),B=`${z+Q}.${M}.${G}${ee}`):re?B=`>=${Q}.0.0${ee} <${+Q+1}.0.0-0`:oe&&(B=`>=${Q}.${M}.0${ee} <${Q}.${+M+1}.0-0`),f("xRange return",B),B})},K=(q,H)=>(f("replaceStars",q,H),q.trim().replace(m[p.STAR],"")),te=(q,H)=>(f("replaceGTE0",q,H),q.trim().replace(m[H.includePrerelease?p.GTE0PRE:p.GTE0],"")),se=q=>(H,j,B,z,Q,M,G,ee,ae,re,oe,pe)=>(O(B)?j="":O(z)?j=`>=${B}.0.0${q?"-0":""}`:O(Q)?j=`>=${B}.${z}.0${q?"-0":""}`:M?j=`>=${j}`:j=`>=${j}${q?"-0":""}`,O(ae)?ee="":O(re)?ee=`<${+ae+1}.0.0-0`:O(oe)?ee=`<${ae}.${+re+1}.0-0`:pe?ee=`<=${ae}.${re}.${oe}-${pe}`:q?ee=`<${ae}.${re}.${+oe+1}-0`:ee=`<=${ee}`,`${j} ${ee}`.trim()),de=(q,H,j)=>{for(let B=0;B<q.length;B++)if(!q[B].test(H))return!1;if(H.prerelease.length&&!j.includePrerelease){for(let B=0;B<q.length;B++)if(f(q[B].semver),q[B].semver!==c.ANY&&q[B].semver.prerelease.length>0){const z=q[B].semver;if(z.major===H.major&&z.minor===H.minor&&z.patch===H.patch)return!0}return!1}return!0};return Hh}var qh,ux;function Nu(){if(ux)return qh;ux=1;const t=Symbol("SemVer ANY");class r{static get ANY(){return t}constructor(g,b){if(b=a(b),g instanceof r){if(g.loose===!!b.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),f("comparator",g,b),this.options=b,this.loose=!!b.loose,this.parse(g),this.semver===t?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(g){const b=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],x=g.match(b);if(!x)throw new TypeError(`Invalid comparator: ${g}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new d(x[2],this.options.loose):this.semver=t}toString(){return this.value}test(g){if(f("Comparator.test",g,this.options.loose),this.semver===t||g===t)return!0;if(typeof g=="string")try{g=new d(g,this.options)}catch{return!1}return c(g,this.operator,this.semver,this.options)}intersects(g,b){if(!(g instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new m(g.value,b).test(this.value):g.operator===""?g.value===""?!0:new m(this.value,b).test(g.semver):(b=a(b),b.includePrerelease&&(this.value==="<0.0.0-0"||g.value==="<0.0.0-0")||!b.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&g.operator.startsWith(">")||this.operator.startsWith("<")&&g.operator.startsWith("<")||this.semver.version===g.semver.version&&this.operator.includes("=")&&g.operator.includes("=")||c(this.semver,"<",g.semver,b)&&this.operator.startsWith(">")&&g.operator.startsWith("<")||c(this.semver,">",g.semver,b)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}qh=r;const a=Op(),{safeRe:s,t:o}=ao(),c=wR(),f=Cu(),d=Nt(),m=En();return qh}var Bh,fx;function Ou(){if(fx)return Bh;fx=1;const t=En();return Bh=(a,s,o)=>{try{s=new t(s,o)}catch{return!1}return s.test(a)},Bh}var Ih,dx;function w3(){if(dx)return Ih;dx=1;const t=En();return Ih=(a,s)=>new t(a,s).set.map(o=>o.map(c=>c.value).join(" ").trim().split(" ")),Ih}var Vh,hx;function E3(){if(hx)return Vh;hx=1;const t=Nt(),r=En();return Vh=(s,o,c)=>{let f=null,d=null,m=null;try{m=new r(o,c)}catch{return null}return s.forEach(p=>{m.test(p)&&(!f||d.compare(p)===-1)&&(f=p,d=new t(f,c))}),f},Vh}var Yh,mx;function R3(){if(mx)return Yh;mx=1;const t=Nt(),r=En();return Yh=(s,o,c)=>{let f=null,d=null,m=null;try{m=new r(o,c)}catch{return null}return s.forEach(p=>{m.test(p)&&(!f||d.compare(p)===1)&&(f=p,d=new t(f,c))}),f},Yh}var Gh,px;function T3(){if(px)return Gh;px=1;const t=Nt(),r=En(),a=Au();return Gh=(o,c)=>{o=new r(o,c);let f=new t("0.0.0");if(o.test(f)||(f=new t("0.0.0-0"),o.test(f)))return f;f=null;for(let d=0;d<o.set.length;++d){const m=o.set[d];let p=null;m.forEach(g=>{const b=new t(g.semver.version);switch(g.operator){case">":b.prerelease.length===0?b.patch++:b.prerelease.push(0),b.raw=b.format();case"":case">=":(!p||a(b,p))&&(p=b);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${g.operator}`)}}),p&&(!f||a(f,p))&&(f=p)}return f&&o.test(f)?f:null},Gh}var Fh,gx;function C3(){if(gx)return Fh;gx=1;const t=En();return Fh=(a,s)=>{try{return new t(a,s).range||"*"}catch{return null}},Fh}var Qh,vx;function Lp(){if(vx)return Qh;vx=1;const t=Nt(),r=Nu(),{ANY:a}=r,s=En(),o=Ou(),c=Au(),f=jp(),d=_p(),m=Dp();return Qh=(g,b,x,E)=>{g=new t(g,E),b=new s(b,E);let T,S,w,C,N;switch(x){case">":T=c,S=d,w=f,C=">",N=">=";break;case"<":T=f,S=m,w=c,C="<",N="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(g,b,E))return!1;for(let O=0;O<b.set.length;++O){const _=b.set[O];let L=null,k=null;if(_.forEach(V=>{V.semver===a&&(V=new r(">=0.0.0")),L=L||V,k=k||V,T(V.semver,L.semver,E)?L=V:w(V.semver,k.semver,E)&&(k=V)}),L.operator===C||L.operator===N||(!k.operator||k.operator===C)&&S(g,k.semver))return!1;if(k.operator===N&&w(g,k.semver))return!1}return!0},Qh}var Xh,yx;function A3(){if(yx)return Xh;yx=1;const t=Lp();return Xh=(a,s,o)=>t(a,s,">",o),Xh}var Kh,bx;function N3(){if(bx)return Kh;bx=1;const t=Lp();return Kh=(a,s,o)=>t(a,s,"<",o),Kh}var Wh,xx;function O3(){if(xx)return Wh;xx=1;const t=En();return Wh=(a,s,o)=>(a=new t(a,o),s=new t(s,o),a.intersects(s,o)),Wh}var Zh,Sx;function M3(){if(Sx)return Zh;Sx=1;const t=Ou(),r=wn();return Zh=(a,s,o)=>{const c=[];let f=null,d=null;const m=a.sort((x,E)=>r(x,E,o));for(const x of m)t(x,s,o)?(d=x,f||(f=x)):(d&&c.push([f,d]),d=null,f=null);f&&c.push([f,null]);const p=[];for(const[x,E]of c)x===E?p.push(x):!E&&x===m[0]?p.push("*"):E?x===m[0]?p.push(`<=${E}`):p.push(`${x} - ${E}`):p.push(`>=${x}`);const g=p.join(" || "),b=typeof s.raw=="string"?s.raw:String(s);return g.length<b.length?g:s},Zh}var Jh,wx;function j3(){if(wx)return Jh;wx=1;const t=En(),r=Nu(),{ANY:a}=r,s=Ou(),o=wn(),c=(b,x,E={})=>{if(b===x)return!0;b=new t(b,E),x=new t(x,E);let T=!1;e:for(const S of b.set){for(const w of x.set){const C=m(S,w,E);if(T=T||C!==null,C)continue e}if(T)return!1}return!0},f=[new r(">=0.0.0-0")],d=[new r(">=0.0.0")],m=(b,x,E)=>{if(b===x)return!0;if(b.length===1&&b[0].semver===a){if(x.length===1&&x[0].semver===a)return!0;E.includePrerelease?b=f:b=d}if(x.length===1&&x[0].semver===a){if(E.includePrerelease)return!0;x=d}const T=new Set;let S,w;for(const $ of b)$.operator===">"||$.operator===">="?S=p(S,$,E):$.operator==="<"||$.operator==="<="?w=g(w,$,E):T.add($.semver);if(T.size>1)return null;let C;if(S&&w){if(C=o(S.semver,w.semver,E),C>0)return null;if(C===0&&(S.operator!==">="||w.operator!=="<="))return null}for(const $ of T){if(S&&!s($,String(S),E)||w&&!s($,String(w),E))return null;for(const U of x)if(!s($,String(U),E))return!1;return!0}let N,O,_,L,k=w&&!E.includePrerelease&&w.semver.prerelease.length?w.semver:!1,V=S&&!E.includePrerelease&&S.semver.prerelease.length?S.semver:!1;k&&k.prerelease.length===1&&w.operator==="<"&&k.prerelease[0]===0&&(k=!1);for(const $ of x){if(L=L||$.operator===">"||$.operator===">=",_=_||$.operator==="<"||$.operator==="<=",S){if(V&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===V.major&&$.semver.minor===V.minor&&$.semver.patch===V.patch&&(V=!1),$.operator===">"||$.operator===">="){if(N=p(S,$,E),N===$&&N!==S)return!1}else if(S.operator===">="&&!s(S.semver,String($),E))return!1}if(w){if(k&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===k.major&&$.semver.minor===k.minor&&$.semver.patch===k.patch&&(k=!1),$.operator==="<"||$.operator==="<="){if(O=g(w,$,E),O===$&&O!==w)return!1}else if(w.operator==="<="&&!s(w.semver,String($),E))return!1}if(!$.operator&&(w||S)&&C!==0)return!1}return!(S&&_&&!w&&C!==0||w&&L&&!S&&C!==0||V||k)},p=(b,x,E)=>{if(!b)return x;const T=o(b.semver,x.semver,E);return T>0?b:T<0||x.operator===">"&&b.operator===">="?x:b},g=(b,x,E)=>{if(!b)return x;const T=o(b.semver,x.semver,E);return T<0?b:T>0||x.operator==="<"&&b.operator==="<="?x:b};return Jh=c,Jh}var em,Ex;function D3(){if(Ex)return em;Ex=1;const t=ao(),r=Tu(),a=Nt(),s=bR(),o=As(),c=o3(),f=c3(),d=u3(),m=f3(),p=d3(),g=h3(),b=m3(),x=p3(),E=wn(),T=g3(),S=v3(),w=Mp(),C=y3(),N=b3(),O=Au(),_=jp(),L=xR(),k=SR(),V=Dp(),$=_p(),U=wR(),K=x3(),te=Nu(),se=En(),de=Ou(),q=w3(),H=E3(),j=R3(),B=T3(),z=C3(),Q=Lp(),M=A3(),G=N3(),ee=O3(),ae=M3(),re=j3();return em={parse:o,valid:c,clean:f,inc:d,diff:m,major:p,minor:g,patch:b,prerelease:x,compare:E,rcompare:T,compareLoose:S,compareBuild:w,sort:C,rsort:N,gt:O,lt:_,eq:L,neq:k,gte:V,lte:$,cmp:U,coerce:K,Comparator:te,Range:se,satisfies:de,toComparators:q,maxSatisfying:H,minSatisfying:j,minVersion:B,validRange:z,outside:Q,gtr:M,ltr:G,intersects:ee,simplifyRange:ae,subset:re,SemVer:a,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},em}var _3=D3();const L3=gs(_3);function z3(){const{toast:t}=xn();async function r(s){const o=`https://api.github.com/repos/${s}/releases/latest`;try{const c=await fetch(o,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"fetch-latest-release"}});if(!c.ok)throw new Error(`Failed to fetch latest release: ${c.status} ${c.statusText}`);return(await c.json()).tag_name}catch{}}const a=async()=>{try{const s=await r("elizaos/eliza"),o=Ji==null?void 0:Ji.version;s&&o&&L3.gt(s.replace("v",""),o.replace("v",""))&&t({variant:"default",title:`New version ${s} is available.`,description:"Visit GitHub for more information.",action:v.jsx(Va,{to:"https://github.com/elizaos/eliza/releases",target:"_blank",children:v.jsx(pR,{altText:"Update",children:"Update"})})})}catch(s){console.error(`Unable to retrieve latest version from GitHub: ${s}`)}};return y.useEffect(()=>{a()},[a]),null}var zp="Avatar",[P3,bz]=qn(zp),[U3,ER]=P3(zp),RR=y.forwardRef((t,r)=>{const{__scopeAvatar:a,...s}=t,[o,c]=y.useState("idle");return v.jsx(U3,{scope:a,imageLoadingStatus:o,onImageLoadingStatusChange:c,children:v.jsx(we.span,{...s,ref:r})})});RR.displayName=zp;var TR="AvatarImage",CR=y.forwardRef((t,r)=>{const{__scopeAvatar:a,src:s,onLoadingStatusChange:o=()=>{},...c}=t,f=ER(TR,a),d=k3(s,c.referrerPolicy),m=nt(p=>{o(p),f.onImageLoadingStatusChange(p)});return ft(()=>{d!=="idle"&&m(d)},[d,m]),d==="loaded"?v.jsx(we.img,{...c,ref:r,src:s}):null});CR.displayName=TR;var AR="AvatarFallback",NR=y.forwardRef((t,r)=>{const{__scopeAvatar:a,delayMs:s,...o}=t,c=ER(AR,a),[f,d]=y.useState(s===void 0);return y.useEffect(()=>{if(s!==void 0){const m=window.setTimeout(()=>d(!0),s);return()=>window.clearTimeout(m)}},[s]),f&&c.imageLoadingStatus!=="loaded"?v.jsx(we.span,{...o,ref:r}):null});NR.displayName=AR;function k3(t,r){const[a,s]=y.useState("idle");return ft(()=>{if(!t){s("error");return}let o=!0;const c=new window.Image,f=d=>()=>{o&&s(d)};return s("loading"),c.onload=f("loaded"),c.onerror=f("error"),c.src=t,r&&(c.referrerPolicy=r),()=>{o=!1}},[t,r]),a}var OR=RR,MR=CR,jR=NR;const Hm=y.forwardRef(({className:t,...r},a)=>v.jsx(OR,{ref:a,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-md",t),...r}));Hm.displayName=OR.displayName;const qm=y.forwardRef(({className:t,...r},a)=>v.jsx(MR,{ref:a,className:le("aspect-square h-full w-full",t),...r}));qm.displayName=MR.displayName;const DR=y.forwardRef(({className:t,...r},a)=>v.jsx(jR,{ref:a,className:le("flex h-full w-full items-center justify-center rounded-md bg-muted",t),...r}));DR.displayName=jR.displayName;function $3(){return v.jsxs("svg",{role:"img","aria-label":"Loading animation",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[v.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:v.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),v.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:v.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),v.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:v.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const H3=ma("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),_R=y.forwardRef(({className:t,variant:r,layout:a,children:s,...o},c)=>v.jsx("div",{className:le(H3({variant:r,layout:a,className:t}),"relative group"),ref:c,...o,children:y.Children.map(s,f=>y.isValidElement(f)&&typeof f.type!="string"&&f.type!==y.Fragment?y.cloneElement(f,{variant:r,layout:a}):f)}));_R.displayName="ChatBubble";const q3=ma("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-lg rounded-bl-none",sent:"bg-primary text-primary-foreground rounded-lg rounded-br-none"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),LR=y.forwardRef(({className:t,variant:r,layout:a,isLoading:s=!1,children:o,...c},f)=>v.jsx("div",{className:le(q3({variant:r,layout:a,className:t}),"break-words max-w-full whitespace-pre-wrap"),ref:f,...c,children:s?v.jsx("div",{className:"flex items-center space-x-2",children:v.jsx($3,{})}):o}));LR.displayName="ChatBubbleMessage";const B3=({timestamp:t,className:r,...a})=>v.jsx("div",{className:le("text-xs text-right select-none",r),...a,children:t}),I3=y.forwardRef(({variant:t,className:r,children:a,...s},o)=>v.jsx("div",{ref:o,className:le("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",t==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",r),...s,children:a}));I3.displayName="ChatBubbleActionWrapper";const zR=y.forwardRef(({className:t,...r},a)=>v.jsx(xp,{autoComplete:"off",ref:a,name:"message",className:le("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",t),...r}));zR.displayName="ChatInput";const PR=y.forwardRef(({className:t,children:r,scrollRef:a,isAtBottom:s,scrollToBottom:o,disableAutoScroll:c,...f},d)=>v.jsxs("div",{className:"relative w-full h-full",children:[v.jsx("div",{className:`flex flex-col w-full h-full p-4 overflow-y-auto ${t}`,ref:a,onWheel:c,onTouchMove:c,...f,children:v.jsx("div",{className:"flex flex-col gap-6",children:r})}),!s&&v.jsx(Qe,{onClick:()=>{o()},size:"icon",variant:"outline",className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 inline-flex rounded-full shadow-md",children:v.jsx($O,{className:"h-4 w-4"})})]}));PR.displayName="ChatMessageList";var Gi={},Fi={},Qi={},Rx;function V3(){if(Rx)return Qi;Rx=1;var t=Qi&&Qi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Qi,"__esModule",{value:!0});var r=t(Gl()),a=function(s,o){var c=r.default.useRef(null),f=r.default.useRef(s);return r.default.useEffect(function(){f.current=s},[s]),r.default.useEffect(function(){var d=function(){return f.current()};if(typeof o=="number")return c.current=window.setInterval(d,o),function(){return window.clearInterval(c.current)}},[o]),c};return Qi.default=a,Qi}var Ha={},Tx;function Y3(){if(Tx)return Ha;Tx=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.getCurrentNodeOverflow=Ha.getStringPosition=void 0;var t=function(a,s,o){return a.split(s,o).join(" ").length};Ha.getStringPosition=t;var r=function(a,s){for(var o=0,c=0,f=0;f<a.length&&!(o+a[f]>s);f++)c++,o=o+a[f];return[c,s-o]};return Ha.getCurrentNodeOverflow=r,Ha}var Cx;function G3(){if(Cx)return Fi;Cx=1;var t=Fi&&Fi.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Fi,"__esModule",{value:!0});var r=t(Gl()),a=t(V3()),s=Y3(),o=r.default.memo(function(c){var f=c.children,d=c.delay,m=d===void 0?25:d,p=c.onEnd,g=p===void 0?function(){}:p,b=r.default.useState(0),x=b[0],E=b[1],T=r.default.useMemo(function(){var C=[],N=function(O){var _,L=(_=O==null?void 0:O.props)===null||_===void 0?void 0:_.children;return Array.isArray(O)&&O.forEach(function(k){typeof k=="object"?N(k):typeof k=="string"&&C.push(k.split(" ").length)}),L===void 0&&typeof O=="string"&&C.push(O.split(" ").length),typeof L=="object"&&N(L),typeof L=="string"&&C.push(L.split(" ").length),C};return N(f)},[f]),S=r.default.useMemo(function(){return T.reduce(function(C,N){return C+N},0)},[T]),w=r.default.useMemo(function(){var C=0,N=0,O=function(_){var L;if(C>x)return null;var k=(L=_==null?void 0:_.props)===null||L===void 0?void 0:L.children;if(Array.isArray(_)){var V=[];return _.forEach(function(se){if(typeof se=="object")V.push(O(se));else if(typeof se=="string"){C+=se.split(" ").length,N++;var de=(0,s.getCurrentNodeOverflow)(T,x),q=de[0],H=de[1];q<N&&V.push(se.slice(0,(0,s.getStringPosition)(se," ",H))),V.push(se)}}),V}if(k===void 0&&typeof _=="string"){C+=_.split(" ").length,N++;var $=(0,s.getCurrentNodeOverflow)(T,x),U=$[0],K=$[1];return U<N?_.slice(0,(0,s.getStringPosition)(_," ",K)):_}if(typeof k=="object")return r.default.createElement(_.type,_==null?void 0:_.props,O(k));if(typeof k=="string"){C+=k.split(" ").length,N++;var te=(0,s.getCurrentNodeOverflow)(T,x),U=te[0],K=te[1];return U<N?r.default.createElement(_.type,_==null?void 0:_.props,k.slice(0,(0,s.getStringPosition)(k," ",K))):_}};return O(f)},[f,x,T]);return(0,a.default)(function(){E(function(C){return C+1>=S&&g(),C+1})},S>x?m:null),r.default.useEffect(function(){console.log("hmmm"),E(0)},[f]),w});return o.displayName="AIWriter",Fi.default=o,Fi}var Ax;function F3(){if(Ax)return Gi;Ax=1;var t=Gi&&Gi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Gi,"__esModule",{value:!0});var r=t(G3());return Gi.default=r.default,Gi}var Q3=F3();const X3=gs(Q3);let Dl,_l=[],Nc;const Nx=(t,r)=>String(t).padStart(r,"0"),K3=({className:t,timerClassName:r,agentId:a,onChange:s})=>{const{toast:o}=xn(),[c,f]=y.useState(!1),[d,m]=y.useState(!1),[p,g]=y.useState(0),[b,x]=y.useState({id:-1,name:"",file:null}),E=Math.floor(p%3600/60),T=p%60,[S,w]=y.useMemo(()=>Nx(E,2).split(""),[E]),[C,N]=y.useMemo(()=>Nx(T,2).split(""),[T]),O=y.useRef({stream:null,analyser:null,mediaRecorder:null,audioContext:null}),_=Zl({mutationKey:["whisper"],mutationFn:U=>Lt.whisper(a,U),onSuccess:U=>{var K;(K=U==null?void 0:U.data)!=null&&K.text&&s(U.data.text)},onError:U=>{o({variant:"destructive",title:"Unable to start recording",description:U.message}),console.log(U)}});function L(){var U;(U=navigator.mediaDevices)!=null&&U.getUserMedia&&navigator.mediaDevices.getUserMedia({audio:!0}).then(K=>{f(!0);const te=window.AudioContext,se=new te,de=se.createAnalyser();se.createMediaStreamSource(K).connect(de),O.current={stream:K,analyser:de,mediaRecorder:null,audioContext:se};const j={mimeType:MediaRecorder.isTypeSupported("audio/mpeg")?"audio/mpeg":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"audio/wav"};O.current.mediaRecorder=new MediaRecorder(K,j),O.current.mediaRecorder.start(),_l=[],Dl=new MediaRecorder(K),Dl.start(),Dl.ondataavailable=B=>{_l.push(B.data)}}).catch(K=>{o({variant:"destructive",title:"Unable to start recording",description:K.message}),console.log(K)})}function k(){Dl.onstop=()=>{const U=new Blob(_l,{type:"audio/wav"});_.mutate(U),x({...b,file:window.URL.createObjectURL(U)}),_l=[]},Dl.stop(),f(!1),m(!0),g(0),clearTimeout(Nc)}function V(){const{mediaRecorder:U,stream:K,analyser:te,audioContext:se}=O.current;if(U&&(U.onstop=()=>{_l=[]},U.stop()),te&&te.disconnect(),K)for(const de of K.getTracks())de.stop();se&&se.close(),f(!1),m(!0),g(0),clearTimeout(Nc)}const $=()=>{k()};return y.useEffect(()=>(c&&(Nc=setTimeout(()=>{g(p+1)},1e3)),()=>clearTimeout(Nc)),[c,p]),_!=null&&_.isPending?v.jsx(Qe,{variant:"ghost",disabled:!0,size:"icon",children:v.jsx(PS,{className:"size-4"})}):v.jsxs("div",{className:le("flex items-center justify-center gap-2 border-l border-l-transparent border-opacity-0 transition-all duration-300",{"border-opacity-100 border-l-border pl-2":c},t),children:[c?v.jsxs("div",{className:"flex gap-1 items-center",children:[v.jsx("div",{className:"bg-red-500 rounded-full h-2.5 w-2.5 animate-pulse"}),v.jsx(UR,{minuteLeft:S,minuteRight:w,secondLeft:C,secondRight:N,timerClassName:r})]}):null,v.jsxs("div",{className:"flex items-center",children:[c?v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx(Qe,{onClick:V,size:"icon",variant:"ghost",children:v.jsx(n2,{className:"size-4"})})}),v.jsx(Un,{className:"m-2",children:v.jsx("span",{children:" Reset recording"})})]}):null,v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:c?v.jsx(Qe,{onClick:$,variant:"ghost",size:"icon",children:v.jsx(US,{className:"size-4"})}):v.jsxs(Qe,{variant:"ghost",size:"icon",onClick:()=>L(),children:[v.jsx(QO,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Use Microphone"})]})}),v.jsx(Un,{side:"right",children:v.jsxs("span",{children:[c?"Send":"Start"," "]})})]})]})]})},UR=hr.memo(({minuteLeft:t,minuteRight:r,secondLeft:a,secondRight:s,timerClassName:o})=>v.jsx("div",{className:le("text-sm animate-in duration-1000 fade-in-0 select-none",o),children:v.jsxs("p",{children:[t,r,":",a,s]})}));UR.displayName="Timer";const W3=({text:t})=>{const[r,a]=y.useState(!1),s=()=>{navigator.clipboard.writeText(t).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})};return v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx(Qe,{onClick:s,variant:"ghost",size:"icon",className:"flex items-center space-x-2 text-muted-foreground",children:r?v.jsx(Xm,{className:"size-4"}):v.jsx(IO,{className:"size-4"})})}),v.jsx(Un,{side:"bottom",children:v.jsx("p",{children:"Copy"})})]})};function Z3({agentId:t,text:r}){const{toast:a}=xn(),[s,o]=y.useState(!1),[c,f]=y.useState(null),d=y.useRef(null),m=Zl({mutationKey:["tts",r],mutationFn:()=>Lt.tts(t,r),onSuccess:E=>{f(E),p()},onError:E=>{a({variant:"destructive",title:"Unable to read message aloud",description:E.message})}}),p=()=>{d.current&&d.current.play().catch(E=>{console.error("Error playing audio:",E)}),o(!0)},g=()=>{d.current&&(d.current.pause(),d.current.currentTime=0),o(!1)},b=()=>{if(!(m!=null&&m.isPending)){if(s){g();return}if(c){p();return}}},x="text-muted-foreground size-4";return v.jsxs("div",{children:[c?v.jsxs("audio",{crossOrigin:"anonymous",playsInline:!0,ref:d,onEnded:()=>{o(!1)},autoPlay:!0,children:[v.jsx("source",{src:URL.createObjectURL(c),type:"audio/mpeg"}),v.jsx("track",{kind:"captions",src:"",label:"English captions"}),"Your browser does not support the audio element."]}):null,v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx(Qe,{size:"icon",variant:"ghost",type:"button",onClick:()=>b(),disabled:m==null?void 0:m.isPending,children:m!=null&&m.isPending?v.jsx(PS,{className:x}):s?v.jsx(BO,{className:x}):v.jsx(r2,{className:x})})}),v.jsx(Un,{side:"bottom",children:v.jsx("p",{children:s?"Stop":"Read aloud"})})]})]})}function J3(t={}){const{offset:r=20,smooth:a=!1}=t,s=y.useRef(null),o=y.useRef(0),c=y.useRef(!1),[f,d]=y.useState({isAtBottom:!0,autoScrollEnabled:!0}),m=y.useCallback(x=>{const{scrollTop:E,scrollHeight:T,clientHeight:S}=x;return Math.abs(T-E-S)<=r},[r]),p=y.useCallback(x=>{if(!s.current)return;const E=s.current.scrollHeight-s.current.clientHeight;x?s.current.scrollTop=E:s.current.scrollTo({top:E,behavior:a?"smooth":"auto"}),d({isAtBottom:!0,autoScrollEnabled:!0}),c.current=!1},[a]),g=y.useCallback(()=>{if(!s.current)return;const x=m(s.current);d(E=>({isAtBottom:x,autoScrollEnabled:x?!0:E.autoScrollEnabled}))},[m]);y.useEffect(()=>{const x=s.current;if(x)return x.addEventListener("scroll",g,{passive:!0}),()=>x.removeEventListener("scroll",g)},[g]),y.useEffect(()=>{const x=s.current;if(!x)return;const E=x.scrollHeight;E!==o.current&&(f.autoScrollEnabled&&requestAnimationFrame(()=>{p(o.current===0)}),o.current=E)},[f.autoScrollEnabled,p]),y.useEffect(()=>{const x=s.current;if(!x)return;const E=new ResizeObserver(()=>{f.autoScrollEnabled&&p(!0)});return E.observe(x),()=>E.disconnect()},[f.autoScrollEnabled,p]);const b=y.useCallback(()=>{(s.current?m(s.current):!1)||(c.current=!0,d(E=>({...E,autoScrollEnabled:!1})))},[m]);return{scrollRef:s,isAtBottom:f.isAtBottom,autoScrollEnabled:f.autoScrollEnabled,scrollToBottom:()=>p(!1),disableAutoScroll:b}}function ez({message:t,agentId:r}){var a;return v.jsxs("div",{className:"flex flex-col",children:[v.jsxs(LR,{isLoading:t.isLoading,...t.name==="Anon"?{variant:"sent"}:{},children:[t.name==="Anon"?t.text:v.jsx(X3,{children:t.text}),v.jsx("div",{children:(a=t.attachments)==null?void 0:a.map(s=>v.jsxs("div",{className:"flex flex-col gap-1 mt-2",children:[v.jsx("img",{alt:"attachment",src:s.url,width:"100%",height:"100%",className:"w-64 rounded-md"}),v.jsxs("div",{className:"flex items-center justify-between gap-4",children:[v.jsx("span",{}),v.jsx("span",{})]})]},`${s.url}-${s.title}`))})]}),v.jsxs("div",{className:"flex items-center gap-4 justify-between w-full mt-1",children:[t.text&&!t.isLoading?v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(W3,{text:t.text}),v.jsx(Z3,{agentId:r,text:t.text})]}):null,v.jsxs("div",{className:le([t.isLoading?"mt-2":"","flex items-center justify-between gap-4 select-none"]),children:[t.source?v.jsx(Cm,{variant:"outline",children:t.source}):null,t.actions?v.jsx(Cm,{variant:"outline",children:t.actions.join(", ")}):null,t.createdAt?v.jsx(B3,{timestamp:oN(t.createdAt).format("LT")}):null]})]})]})}function tz({agentId:t}){var k,V;const{toast:r}=xn(),[a,s]=y.useState(null),[o,c]=y.useState(""),f=y.useRef(null),d=y.useRef(null),m=y.useRef(null),p=In(),g=Ya.getWorldId(),{messages:b}=U_(t),x=(V=(k=L_(t))==null?void 0:k.data)==null?void 0:V.data,E=$=>$!=="user"?"received":"sent",{scrollRef:T,isAtBottom:S,scrollToBottom:w,disableAutoScroll:C}=J3({smooth:!0});y.useEffect(()=>{w()},[p.getQueryData(["messages",t,g])]),y.useEffect(()=>{w()},[]);const N=$=>{if($.key==="Enter"&&!$.shiftKey){if($.preventDefault(),$.nativeEvent.isComposing)return;O($)}},O=$=>{var te;if($.preventDefault(),!o)return;const U=a?[{url:URL.createObjectURL(a),contentType:a.type,title:a.name}]:void 0,K=[{text:o,name:"Anon",createdAt:Date.now(),attachments:U,worldId:g},{text:o,name:"system",isLoading:!0,createdAt:Date.now(),worldId:g}];p.setQueryData(["messages",t,g],(se=[])=>[...se,...K]),_.mutate({message:o,selectedFile:a||null}),s(null),c(""),(te=m.current)==null||te.reset()};y.useEffect(()=>{f.current&&f.current.focus()},[]);const _=Zl({mutationKey:["send_message",t],mutationFn:({message:$,selectedFile:U})=>Lt.sendMessage(t,$,U),onSuccess:$=>{$?p.setQueryData(["messages",t,g],(U=[])=>[...U.filter(K=>!K.isLoading),{...$.data.message,createdAt:Date.now()}]):p.setQueryData(["messages",t,g],(U=[])=>[...U.filter(K=>!K.isLoading)])},onError:$=>{r({variant:"destructive",title:"Unable to send message",description:$.message})}}),L=$=>{var K;const U=(K=$.target.files)==null?void 0:K[0];U!=null&&U.type.startsWith("image/")&&s(U)};return v.jsxs("div",{className:"flex flex-col w-full h-[calc(100dvh)] p-4",children:[v.jsx("div",{className:"flex items-center justify-between mb-4 p-3 bg-card rounded-lg border",children:v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Hm,{className:"size-10 border rounded-full",children:v.jsx(qm,{src:"/elizaos-icon.png"})}),v.jsxs("div",{className:"flex flex-col",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("h2",{className:"font-semibold text-lg",children:(x==null?void 0:x.name)||"Agent"}),x!=null&&x.enabled?v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx("div",{className:"size-2.5 rounded-full bg-green-500 ring-2 ring-green-500/20 animate-pulse"})}),v.jsx(Un,{side:"right",children:v.jsx("p",{children:"Agent is active"})})]}):v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsx("div",{className:"size-2.5 rounded-full bg-gray-300 ring-2 ring-gray-300/20"})}),v.jsx(Un,{side:"right",children:v.jsx("p",{children:"Agent is inactive"})})]})]}),(x==null?void 0:x.bio)&&v.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:Array.isArray(x.bio)?x.bio[0]:x.bio})]})]})}),v.jsx(PR,{scrollRef:T,isAtBottom:S,scrollToBottom:w,disableAutoScroll:C,children:b.map($=>{const U=$.name==="Anon";return v.jsx("div",{className:`flex flex-column gap-1 p-1 ${U?"justify-end":""}`,children:v.jsxs(_R,{variant:E($.name),className:`flex flex-row items-center gap-2 ${U?"flex-row-reverse":""}`,children:[v.jsxs(Hm,{className:"size-8 p-1 border rounded-full select-none",children:[v.jsx(qm,{src:U?"/user-icon.png":"/elizaos-icon.png"}),U&&v.jsx(DR,{children:"U"})]}),v.jsx(ez,{message:$,agentId:t})]})},$.name+$.createdAt)})}),v.jsx("div",{className:"px-4 pb-4",children:v.jsxs("form",{ref:m,onSubmit:O,className:"relative rounded-md border bg-card",children:[a?v.jsx("div",{className:"p-3 flex",children:v.jsxs("div",{className:"relative rounded-md border p-2",children:[v.jsx(Qe,{onClick:()=>s(null),className:"absolute -right-2 -top-2 size-[22px] ring-2 ring-background",variant:"outline",size:"icon",children:v.jsx(bs,{})}),v.jsx("img",{alt:"Selected file",src:URL.createObjectURL(a),height:"100%",width:"100%",className:"aspect-square object-contain w-16"})]})}):null,v.jsx(zR,{ref:f,onKeyDown:N,value:o,onChange:({target:$})=>c($.value),placeholder:"Type your message here...",className:"min-h-12 resize-none rounded-md bg-card border-0 p-3 shadow-none focus-visible:ring-0"}),v.jsxs("div",{className:"flex items-center p-3 pt-0",children:[v.jsxs(br,{children:[v.jsx(xr,{asChild:!0,children:v.jsxs("div",{children:[v.jsxs(Qe,{variant:"ghost",size:"icon",onClick:()=>{d.current&&d.current.click()},children:[v.jsx(KO,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Attach file"})]}),v.jsx("input",{type:"file",ref:d,onChange:L,accept:"image/*",className:"hidden"})]})}),v.jsx(Un,{side:"left",children:v.jsx("p",{children:"Attach file"})})]}),v.jsx(K3,{agentId:t,onChange:$=>c($)}),v.jsxs(Qe,{disabled:!o||(_==null?void 0:_.isPending),type:"submit",size:"sm",className:"ml-auto gap-1.5 h-[30px]",children:[_!=null&&_.isPending?"...":"Send Message",v.jsx(US,{className:"size-3.5"})]})]})]})})]})}function nz(){const{agentId:t}=Jw();return t?v.jsx(tz,{agentId:t}):v.jsx("div",{children:"No data."})}function rz(){return v.jsx(HE,{})}function az({title:t,content:r,buttons:a}){return v.jsxs(mu,{className:"h-full",children:[v.jsx(uE,{className:"pb-2 pt-3",children:v.jsx(fE,{className:"text-base",children:t})}),v.jsx(gp,{className:"p-3",children:v.jsx("div",{className:"rounded-md bg-muted w-full mb-3",style:{aspectRatio:"1 / 1"},children:v.jsx("div",{className:"flex items-center justify-center h-full",children:v.jsx("div",{className:"text-4xl font-bold uppercase",children:r})})})}),v.jsx(dE,{className:"p-3 pb-4",children:v.jsx("div",{className:"flex items-center gap-2 w-full",children:a.map(({label:s,icon:o,action:c,className:f,variant:d,size:m,disabled:p},g)=>v.jsxs(Qe,{variant:d,className:f,onClick:c,size:m,disabled:p,children:[o,s&&v.jsx("span",{children:s})]},g))})})]})}function iz(){const t=to(),r=In(),{toast:a}=xn(),s=z_(),o=P_(),[c,f]=y.useState([]),[d,m]=y.useState([]);return{startAgent:async E=>{if(!E.id){a({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const T=E.id;if(!c.includes(T))try{f(S=>[...S,T]),await s.mutateAsync(T),r.invalidateQueries({queryKey:["active-agents"]}),t(`/chat/${T}`)}catch(S){console.error("Failed to start agent:",S),a({title:"Error Starting Agent",description:S instanceof Error?S.message:"Failed to start agent",variant:"destructive"})}finally{f(S=>S.filter(w=>w!==T))}},stopAgent:async E=>{if(!E.id){a({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const T=E.id;if(!d.includes(T))try{m(S=>[...S,T]),await o.mutateAsync(T),r.invalidateQueries({queryKey:["active-agents"]}),a({title:"Agent Stopped",description:`${E.name} has been stopped`})}catch(S){console.error("Failed to stop agent:",S),a({title:"Error Stopping Agent",description:S instanceof Error?S.message:"Failed to stop agent",variant:"destructive"})}finally{m(S=>S.filter(w=>w!==T))}},isAgentStarting:E=>E?c.includes(E):!1,isAgentStopping:E=>E?d.includes(E):!1,startingAgents:c,stoppingAgents:d}}function sz(){const{data:{data:t}={},isLoading:r,isError:a,error:s}=BE(),o=to(),{startAgent:c,stopAgent:f,isAgentStarting:d,isAgentStopping:m}=iz(),p=(t==null?void 0:t.agents)||[];return v.jsxs("div",{className:"flex flex-col gap-4 h-full p-4",children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsx(FE,{title:"Agents"})}),r&&v.jsx("div",{className:"text-center py-8",children:"Loading agents..."}),a&&v.jsxs("div",{className:"text-center py-8 text-destructive",children:["Error loading agents:"," ",s instanceof Error?s.message:"Unknown error"]}),p.length===0&&!r&&v.jsx("div",{className:"text-center py-8 flex flex-col items-center gap-4",children:v.jsx("p",{className:"text-muted-foreground",children:"No agents currently running. Start a character to begin."})}),!r&&!a&&v.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[p==null?void 0:p.sort((g,b)=>Number(b==null?void 0:b.enabled)-Number(g==null?void 0:g.enabled)).map(g=>{const b=g.status==="active",x=d(g.id),E=m(g.id),T=x||E;let S="Start",w=v.jsx(WO,{});return x?(S="Starting...",w=v.jsx(Xb,{className:"animate-spin"})):E?(S="Stopping...",w=v.jsx(Xb,{className:"animate-spin"})):b&&(S="Stop",w=v.jsx(t2,{fill:"#EF4444",size:16})),v.jsx(az,{title:g.name,content:cN(g.name),buttons:[{label:S,icon:w,action:()=>{T||(b?f(g):c(g))},className:`w-full grow ${b?"text-red-500":""} ${T?"opacity-80 cursor-not-allowed":""}`,variant:b?"secondary":"default",disabled:T},{icon:v.jsx(FO,{style:{height:14,width:14}}),className:"w-10 h-10 rounded-full",action:()=>o(`/chat/${g.id}`),variant:"outline",disabled:!b},{icon:v.jsx(zS,{style:{height:16,width:16}}),className:"w-10 h-10 rounded-full",action:()=>o(`/settings/${g.id}`),variant:"outline"}]},g.id)}),v.jsx(mu,{className:"flex flex-col items-center justify-center h-full cursor-pointer hover:bg-accent/50 transition-colors",onClick:()=>o("/create"),children:v.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[v.jsx(ZO,{size:40,className:"text-muted-foreground"}),v.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:"Create New Agent"})]})})]})]})}function lz({agent:t,agentId:r}){const{toast:a}=xn(),s=to(),o=In(),[c,f]=y.useState(t),d=async p=>{try{if(!r)throw new Error("Agent ID is missing");const g={...p,plugins:c.plugins};await Lt.updateAgent(r,g),o.invalidateQueries({queryKey:["agent",r]}),o.invalidateQueries({queryKey:["agents"]}),s("/"),a({title:"Success",description:"Agent updated and restarted successfully"})}catch(g){throw a({title:"Error",description:g instanceof Error?g.message:"Failed to update agent",variant:"destructive"}),g}},m=async p=>{try{await Lt.deleteAgent(p.id),o.invalidateQueries({queryKey:["agents"]}),s("/")}catch(g){console.error("Error deleting agent:",g)}};return v.jsx(_E,{characterValue:c,setCharacterValue:f,title:"Character Settings",description:"Configure your AI character's behavior and capabilities",onSubmit:d,onReset:()=>f(t),onDelete:()=>m(t),isAgent:!0,customComponents:[{name:"Plugins",component:v.jsx(kE,{characterValue:c,setCharacterValue:f})},{name:"Secret",component:v.jsx($E,{characterValue:c,setCharacterValue:f})}]})}function oz(){var s;const{agentId:t}=Jw(),r=Es({queryKey:["agent",t],queryFn:()=>Lt.getAgent(t??""),staleTime:kn.FREQUENT,refetchInterval:5e3,enabled:!!t});if(!t)return v.jsx("div",{children:"No data."});const a=(s=r==null?void 0:r.data)==null?void 0:s.data;return a?v.jsx(lz,{agent:a,agentId:t}):null}const kR=new mj({defaultOptions:{queries:{staleTime:kn.STANDARD,refetchInterval:!1,retry:3,retryDelay:t=>Math.min(1e3*2**t,3e4),refetchOnWindowFocus:!0,refetchOnReconnect:!0},mutations:{retry:3,retryDelay:t=>Math.min(1e3*2**t,3e4)}}}),$R=async()=>{try{await kR.prefetchQuery({queryKey:["agents"],queryFn:()=>Lt.getAgents(),staleTime:kn.FREQUENT})}catch(t){console.error("Error prefetching initial data:",t)}};$R();function cz(){return z3(),y.useEffect(()=>{$R()},[]),v.jsx(bj,{client:kR,children:v.jsx("div",{className:"dark antialiased",style:{colorScheme:"dark"},children:v.jsx(ID,{children:v.jsxs(bw,{delayDuration:0,children:[v.jsxs(Sw,{children:[v.jsx(H_,{}),v.jsx(Ew,{children:v.jsx("div",{className:"flex flex-1 flex-col gap-4 size-full container",children:v.jsxs(xD,{children:[v.jsx(qa,{path:"/",element:v.jsx(sz,{})}),v.jsx(qa,{path:"chat/:agentId",element:v.jsx(nz,{})}),v.jsx(qa,{path:"settings/:agentId",element:v.jsx(oz,{})}),v.jsx(qa,{path:"agents/new",element:v.jsx(rz,{})}),v.jsx(qa,{path:"/create",element:v.jsx(HE,{})}),v.jsx(qa,{path:"/logs",element:v.jsx(H4,{})})]})})})]}),v.jsx(l3,{})]})})})})}const HR=document.getElementById("root");if(!HR)throw new Error("Root element not found");bA.createRoot(HR).render(v.jsx(y.StrictMode,{children:v.jsx(cz,{})}));