@goondocks/myco 0.6.4 → 0.6.5

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 (88) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/dist/{chunk-YIQLYIHW.js → chunk-4B5RO2YV.js} +4 -4
  4. package/dist/{chunk-7WHF2OIZ.js → chunk-4DYD4HHG.js} +25 -7
  5. package/dist/chunk-4DYD4HHG.js.map +1 -0
  6. package/dist/{chunk-NLUE6CYG.js → chunk-54WVLTKD.js} +3 -3
  7. package/dist/{chunk-NL6WQO56.js → chunk-5LMRZDH3.js} +2 -2
  8. package/dist/{chunk-O6PERU7U.js → chunk-AHZN4Z34.js} +2 -2
  9. package/dist/{chunk-J4D4CROB.js → chunk-DYDBF5W6.js} +5 -1
  10. package/dist/chunk-DYDBF5W6.js.map +1 -0
  11. package/dist/{chunk-Z74SDEKE.js → chunk-F7GAYVWF.js} +2 -2
  12. package/dist/{chunk-H7PRCVGQ.js → chunk-F7PGDD2X.js} +2 -2
  13. package/dist/{chunk-2ZIBCEYO.js → chunk-LEK6DEAE.js} +3 -3
  14. package/dist/{chunk-QLUE3BUL.js → chunk-O6TBHGVO.js} +9 -2
  15. package/dist/chunk-O6TBHGVO.js.map +1 -0
  16. package/dist/{chunk-FPRXMJLT.js → chunk-OEGZ5YTJ.js} +2 -2
  17. package/dist/{chunk-4XVKZ3WA.js → chunk-TK7A4RX7.js} +10 -3
  18. package/dist/chunk-TK7A4RX7.js.map +1 -0
  19. package/dist/{chunk-UP4P4OAA.js → chunk-V6BJVYNH.js} +2 -2
  20. package/dist/{chunk-QN4W3JUA.js → chunk-XH34FX4C.js} +2 -2
  21. package/dist/{chunk-YTFXA4RX.js → chunk-YRIIBPJD.js} +3 -3
  22. package/dist/{cli-IHILSS6N.js → cli-OJYHLO4Y.js} +20 -20
  23. package/dist/{client-AGFNR2S4.js → client-SS3C5MF6.js} +5 -5
  24. package/dist/{curate-3D4GHKJH.js → curate-4CKEMOPV.js} +6 -6
  25. package/dist/{detect-providers-XEP4QA3R.js → detect-providers-LFIVJYQO.js} +3 -3
  26. package/dist/{digest-7HLJXL77.js → digest-ZLARHLLY.js} +8 -8
  27. package/dist/{init-ARQ53JOR.js → init-3LVKVQ4L.js} +5 -5
  28. package/dist/{logs-IENORIYR.js → logs-6CWVP574.js} +3 -3
  29. package/dist/{main-6AGPIMH2.js → main-RB727YRP.js} +149 -28
  30. package/dist/main-RB727YRP.js.map +1 -0
  31. package/dist/{rebuild-Q2ACEB6F.js → rebuild-QWVVCBCZ.js} +6 -6
  32. package/dist/{reprocess-CDEFGQOV.js → reprocess-YG3WLUI2.js} +8 -8
  33. package/dist/{restart-XCMILOL5.js → restart-UIP7US4U.js} +6 -6
  34. package/dist/{search-7W25SKCB.js → search-BQLBW5CS.js} +4 -4
  35. package/dist/{server-6UDN35QN.js → server-43KSJ65Q.js} +77 -29
  36. package/dist/{server-6UDN35QN.js.map → server-43KSJ65Q.js.map} +1 -1
  37. package/dist/{session-start-K6IGAC7H.js → session-start-6SHGT2AW.js} +6 -6
  38. package/dist/{setup-digest-X5PN27F4.js → setup-digest-X735EZSD.js} +5 -5
  39. package/dist/{setup-llm-S5OHQJXK.js → setup-llm-QBSTQO7N.js} +5 -5
  40. package/dist/src/cli.js +4 -4
  41. package/dist/src/daemon/main.js +4 -4
  42. package/dist/src/hooks/post-tool-use.js +5 -5
  43. package/dist/src/hooks/session-end.js +5 -5
  44. package/dist/src/hooks/session-start.js +4 -4
  45. package/dist/src/hooks/stop.js +5 -5
  46. package/dist/src/hooks/user-prompt-submit.js +5 -5
  47. package/dist/src/mcp/server.js +4 -4
  48. package/dist/{stats-TTSDXGJV.js → stats-QBLIEFWL.js} +6 -6
  49. package/dist/ui/assets/index-CjWGVHhF.css +1 -0
  50. package/dist/ui/assets/{index-CMSMi4Jb.js → index-Cq-H7wgE.js} +20 -20
  51. package/dist/ui/index.html +2 -2
  52. package/dist/{verify-TOWQHPBX.js → verify-X272WGBD.js} +4 -4
  53. package/dist/{version-36RVCQA6.js → version-XE4GYTBV.js} +4 -4
  54. package/package.json +1 -1
  55. package/dist/chunk-4XVKZ3WA.js.map +0 -1
  56. package/dist/chunk-7WHF2OIZ.js.map +0 -1
  57. package/dist/chunk-J4D4CROB.js.map +0 -1
  58. package/dist/chunk-QLUE3BUL.js.map +0 -1
  59. package/dist/main-6AGPIMH2.js.map +0 -1
  60. package/dist/ui/assets/index-08wKT7wS.css +0 -1
  61. /package/dist/{chunk-YIQLYIHW.js.map → chunk-4B5RO2YV.js.map} +0 -0
  62. /package/dist/{chunk-NLUE6CYG.js.map → chunk-54WVLTKD.js.map} +0 -0
  63. /package/dist/{chunk-NL6WQO56.js.map → chunk-5LMRZDH3.js.map} +0 -0
  64. /package/dist/{chunk-O6PERU7U.js.map → chunk-AHZN4Z34.js.map} +0 -0
  65. /package/dist/{chunk-Z74SDEKE.js.map → chunk-F7GAYVWF.js.map} +0 -0
  66. /package/dist/{chunk-H7PRCVGQ.js.map → chunk-F7PGDD2X.js.map} +0 -0
  67. /package/dist/{chunk-2ZIBCEYO.js.map → chunk-LEK6DEAE.js.map} +0 -0
  68. /package/dist/{chunk-FPRXMJLT.js.map → chunk-OEGZ5YTJ.js.map} +0 -0
  69. /package/dist/{chunk-UP4P4OAA.js.map → chunk-V6BJVYNH.js.map} +0 -0
  70. /package/dist/{chunk-QN4W3JUA.js.map → chunk-XH34FX4C.js.map} +0 -0
  71. /package/dist/{chunk-YTFXA4RX.js.map → chunk-YRIIBPJD.js.map} +0 -0
  72. /package/dist/{cli-IHILSS6N.js.map → cli-OJYHLO4Y.js.map} +0 -0
  73. /package/dist/{client-AGFNR2S4.js.map → client-SS3C5MF6.js.map} +0 -0
  74. /package/dist/{curate-3D4GHKJH.js.map → curate-4CKEMOPV.js.map} +0 -0
  75. /package/dist/{detect-providers-XEP4QA3R.js.map → detect-providers-LFIVJYQO.js.map} +0 -0
  76. /package/dist/{digest-7HLJXL77.js.map → digest-ZLARHLLY.js.map} +0 -0
  77. /package/dist/{init-ARQ53JOR.js.map → init-3LVKVQ4L.js.map} +0 -0
  78. /package/dist/{logs-IENORIYR.js.map → logs-6CWVP574.js.map} +0 -0
  79. /package/dist/{rebuild-Q2ACEB6F.js.map → rebuild-QWVVCBCZ.js.map} +0 -0
  80. /package/dist/{reprocess-CDEFGQOV.js.map → reprocess-YG3WLUI2.js.map} +0 -0
  81. /package/dist/{restart-XCMILOL5.js.map → restart-UIP7US4U.js.map} +0 -0
  82. /package/dist/{search-7W25SKCB.js.map → search-BQLBW5CS.js.map} +0 -0
  83. /package/dist/{session-start-K6IGAC7H.js.map → session-start-6SHGT2AW.js.map} +0 -0
  84. /package/dist/{setup-digest-X5PN27F4.js.map → setup-digest-X735EZSD.js.map} +0 -0
  85. /package/dist/{setup-llm-S5OHQJXK.js.map → setup-llm-QBSTQO7N.js.map} +0 -0
  86. /package/dist/{stats-TTSDXGJV.js.map → stats-QBLIEFWL.js.map} +0 -0
  87. /package/dist/{verify-TOWQHPBX.js.map → verify-X272WGBD.js.map} +0 -0
  88. /package/dist/{version-36RVCQA6.js.map → version-XE4GYTBV.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(n,l,i)=>(ud(n,l,"read from private field"),i?i.call(n):l.get(n)),ue=(n,l,i)=>l.has(n)?Jy("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,i),ae=(n,l,i,s)=>(ud(n,l,"write to private field"),s?s.call(n,i):l.set(n,i),i),Ee=(n,l,i)=>(ud(n,l,"access private method"),i);var oc=(n,l,i,s)=>({set _(c){ae(n,l,c,i)},get _(){return _(n,l,s)}});function X2(n,l){for(var i=0;i<l.length;i++){const s=l[i];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const d=Object.getOwnPropertyDescriptor(s,c);d&&Object.defineProperty(n,c,d.get?d:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function hh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fd={exports:{}},us={};/**
1
+ var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(n,l,i)=>(ud(n,l,"read from private field"),i?i.call(n):l.get(n)),ue=(n,l,i)=>l.has(n)?Jy("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,i),le=(n,l,i,s)=>(ud(n,l,"write to private field"),s?s.call(n,i):l.set(n,i),i),Ee=(n,l,i)=>(ud(n,l,"access private method"),i);var oc=(n,l,i,s)=>({set _(c){le(n,l,c,i)},get _(){return _(n,l,s)}});function X2(n,l){for(var i=0;i<l.length;i++){const s=l[i];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const d=Object.getOwnPropertyDescriptor(s,c);d&&Object.defineProperty(n,c,d.get?d:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function hh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fd={exports:{}},us={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -14,7 +14,7 @@ var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var tv;function Z2(){if(tv)return xe;tv=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),E=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=E&&A[E]||A["@@iterator"],typeof A=="function"?A:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,j={};function N(A,P,F){this.props=A,this.context=P,this.refs=j,this.updater=F||T}N.prototype.isReactComponent={},N.prototype.setState=function(A,P){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,P,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=N.prototype;function D(A,P,F){this.props=A,this.context=P,this.refs=j,this.updater=F||T}var z=D.prototype=new O;z.constructor=D,w(z,N.prototype),z.isPureReactComponent=!0;var k=Array.isArray;function Q(){}var G={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function te(A,P,F){var I=F.ref;return{$$typeof:n,type:A,key:P,ref:I!==void 0?I:null,props:F}}function le(A,P){return te(A.type,P,A.props)}function oe(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ee(A){var P={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(F){return P[F]})}var ge=/\/+/g;function ce(A,P){return typeof A=="object"&&A!==null&&A.key!=null?ee(""+A.key):P.toString(36)}function de(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(Q,Q):(A.status="pending",A.then(function(P){A.status==="pending"&&(A.status="fulfilled",A.value=P)},function(P){A.status==="pending"&&(A.status="rejected",A.reason=P)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function U(A,P,F,I,$){var he=typeof A;(he==="undefined"||he==="boolean")&&(A=null);var ne=!1;if(A===null)ne=!0;else switch(he){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(A.$$typeof){case n:case l:ne=!0;break;case b:return ne=A._init,U(ne(A._payload),P,F,I,$)}}if(ne)return $=$(A),ne=I===""?"."+ce(A,0):I,k($)?(F="",ne!=null&&(F=ne.replace(ge,"$&/")+"/"),U($,P,F,"",function(Le){return Le})):$!=null&&(oe($)&&($=le($,F+($.key==null||A&&A.key===$.key?"":(""+$.key).replace(ge,"$&/")+"/")+ne)),P.push($)),1;ne=0;var Se=I===""?".":I+":";if(k(A))for(var Ne=0;Ne<A.length;Ne++)I=A[Ne],he=Se+ce(I,Ne),ne+=U(I,P,F,he,$);else if(Ne=C(A),typeof Ne=="function")for(A=Ne.call(A),Ne=0;!(I=A.next()).done;)I=I.value,he=Se+ce(I,Ne++),ne+=U(I,P,F,he,$);else if(he==="object"){if(typeof A.then=="function")return U(de(A),P,F,I,$);throw P=String(A),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ne}function Z(A,P,F){if(A==null)return A;var I=[],$=0;return U(A,I,"","",function(he){return P.call(F,he,$++)}),I}function J(A){if(A._status===-1){var P=A._result;P=P(),P.then(function(F){(A._status===0||A._status===-1)&&(A._status=1,A._result=F)},function(F){(A._status===0||A._status===-1)&&(A._status=2,A._result=F)}),A._status===-1&&(A._status=0,A._result=P)}if(A._status===1)return A._result.default;throw A._result}var ie=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},ye={map:Z,forEach:function(A,P,F){Z(A,function(){P.apply(this,arguments)},F)},count:function(A){var P=0;return Z(A,function(){P++}),P},toArray:function(A){return Z(A,function(P){return P})||[]},only:function(A){if(!oe(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return xe.Activity=x,xe.Children=ye,xe.Component=N,xe.Fragment=i,xe.Profiler=c,xe.PureComponent=D,xe.StrictMode=s,xe.Suspense=y,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,xe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return G.H.useMemoCache(A)}},xe.cache=function(A){return function(){return A.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(A,P,F){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var I=w({},A.props),$=A.key;if(P!=null)for(he in P.key!==void 0&&($=""+P.key),P)!W.call(P,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&P.ref===void 0||(I[he]=P[he]);var he=arguments.length-2;if(he===1)I.children=F;else if(1<he){for(var ne=Array(he),Se=0;Se<he;Se++)ne[Se]=arguments[Se+2];I.children=ne}return te(A.type,$,I)},xe.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},xe.createElement=function(A,P,F){var I,$={},he=null;if(P!=null)for(I in P.key!==void 0&&(he=""+P.key),P)W.call(P,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&($[I]=P[I]);var ne=arguments.length-2;if(ne===1)$.children=F;else if(1<ne){for(var Se=Array(ne),Ne=0;Ne<ne;Ne++)Se[Ne]=arguments[Ne+2];$.children=Se}if(A&&A.defaultProps)for(I in ne=A.defaultProps,ne)$[I]===void 0&&($[I]=ne[I]);return te(A,he,$)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(A){return{$$typeof:m,render:A}},xe.isValidElement=oe,xe.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:J}},xe.memo=function(A,P){return{$$typeof:p,type:A,compare:P===void 0?null:P}},xe.startTransition=function(A){var P=G.T,F={};G.T=F;try{var I=A(),$=G.S;$!==null&&$(F,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(Q,ie)}catch(he){ie(he)}finally{P!==null&&F.types!==null&&(P.types=F.types),G.T=P}},xe.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},xe.use=function(A){return G.H.use(A)},xe.useActionState=function(A,P,F){return G.H.useActionState(A,P,F)},xe.useCallback=function(A,P){return G.H.useCallback(A,P)},xe.useContext=function(A){return G.H.useContext(A)},xe.useDebugValue=function(){},xe.useDeferredValue=function(A,P){return G.H.useDeferredValue(A,P)},xe.useEffect=function(A,P){return G.H.useEffect(A,P)},xe.useEffectEvent=function(A){return G.H.useEffectEvent(A)},xe.useId=function(){return G.H.useId()},xe.useImperativeHandle=function(A,P,F){return G.H.useImperativeHandle(A,P,F)},xe.useInsertionEffect=function(A,P){return G.H.useInsertionEffect(A,P)},xe.useLayoutEffect=function(A,P){return G.H.useLayoutEffect(A,P)},xe.useMemo=function(A,P){return G.H.useMemo(A,P)},xe.useOptimistic=function(A,P){return G.H.useOptimistic(A,P)},xe.useReducer=function(A,P,F){return G.H.useReducer(A,P,F)},xe.useRef=function(A){return G.H.useRef(A)},xe.useState=function(A){return G.H.useState(A)},xe.useSyncExternalStore=function(A,P,F){return G.H.useSyncExternalStore(A,P,F)},xe.useTransition=function(){return G.H.useTransition()},xe.version="19.2.4",xe}var nv;function mh(){return nv||(nv=1,dd.exports=Z2()),dd.exports}var v=mh();const ma=hh(v),jx=X2({__proto__:null,default:ma},[v]);var hd={exports:{}},fs={},md={exports:{}},pd={};/**
17
+ */var tv;function Z2(){if(tv)return xe;tv=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=E&&A[E]||A["@@iterator"],typeof A=="function"?A:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,j={};function N(A,P,Z){this.props=A,this.context=P,this.refs=j,this.updater=Z||T}N.prototype.isReactComponent={},N.prototype.setState=function(A,P){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,P,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=N.prototype;function M(A,P,Z){this.props=A,this.context=P,this.refs=j,this.updater=Z||T}var z=M.prototype=new O;z.constructor=M,w(z,N.prototype),z.isPureReactComponent=!0;var q=Array.isArray;function X(){}var G={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function ee(A,P,Z){var $=Z.ref;return{$$typeof:n,type:A,key:P,ref:$!==void 0?$:null,props:Z}}function ne(A,P){return ee(A.type,P,A.props)}function ie(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function te(A){var P={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(Z){return P[Z]})}var ge=/\/+/g;function ce(A,P){return typeof A=="object"&&A!==null&&A.key!=null?te(""+A.key):P.toString(36)}function de(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(X,X):(A.status="pending",A.then(function(P){A.status==="pending"&&(A.status="fulfilled",A.value=P)},function(P){A.status==="pending"&&(A.status="rejected",A.reason=P)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function U(A,P,Z,$,J){var he=typeof A;(he==="undefined"||he==="boolean")&&(A=null);var ae=!1;if(A===null)ae=!0;else switch(he){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(A.$$typeof){case n:case l:ae=!0;break;case x:return ae=A._init,U(ae(A._payload),P,Z,$,J)}}if(ae)return J=J(A),ae=$===""?"."+ce(A,0):$,q(J)?(Z="",ae!=null&&(Z=ae.replace(ge,"$&/")+"/"),U(J,P,Z,"",function(Le){return Le})):J!=null&&(ie(J)&&(J=ne(J,Z+(J.key==null||A&&A.key===J.key?"":(""+J.key).replace(ge,"$&/")+"/")+ae)),P.push(J)),1;ae=0;var Se=$===""?".":$+":";if(q(A))for(var Ne=0;Ne<A.length;Ne++)$=A[Ne],he=Se+ce($,Ne),ae+=U($,P,Z,he,J);else if(Ne=C(A),typeof Ne=="function")for(A=Ne.call(A),Ne=0;!($=A.next()).done;)$=$.value,he=Se+ce($,Ne++),ae+=U($,P,Z,he,J);else if(he==="object"){if(typeof A.then=="function")return U(de(A),P,Z,$,J);throw P=String(A),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ae}function I(A,P,Z){if(A==null)return A;var $=[],J=0;return U(A,$,"","",function(he){return P.call(Z,he,J++)}),$}function W(A){if(A._status===-1){var P=A._result;P=P(),P.then(function(Z){(A._status===0||A._status===-1)&&(A._status=1,A._result=Z)},function(Z){(A._status===0||A._status===-1)&&(A._status=2,A._result=Z)}),A._status===-1&&(A._status=0,A._result=P)}if(A._status===1)return A._result.default;throw A._result}var se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},ye={map:I,forEach:function(A,P,Z){I(A,function(){P.apply(this,arguments)},Z)},count:function(A){var P=0;return I(A,function(){P++}),P},toArray:function(A){return I(A,function(P){return P})||[]},only:function(A){if(!ie(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return xe.Activity=b,xe.Children=ye,xe.Component=N,xe.Fragment=i,xe.Profiler=c,xe.PureComponent=M,xe.StrictMode=s,xe.Suspense=v,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,xe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return G.H.useMemoCache(A)}},xe.cache=function(A){return function(){return A.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(A,P,Z){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var $=w({},A.props),J=A.key;if(P!=null)for(he in P.key!==void 0&&(J=""+P.key),P)!Q.call(P,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&P.ref===void 0||($[he]=P[he]);var he=arguments.length-2;if(he===1)$.children=Z;else if(1<he){for(var ae=Array(he),Se=0;Se<he;Se++)ae[Se]=arguments[Se+2];$.children=ae}return ee(A.type,J,$)},xe.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},xe.createElement=function(A,P,Z){var $,J={},he=null;if(P!=null)for($ in P.key!==void 0&&(he=""+P.key),P)Q.call(P,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(J[$]=P[$]);var ae=arguments.length-2;if(ae===1)J.children=Z;else if(1<ae){for(var Se=Array(ae),Ne=0;Ne<ae;Ne++)Se[Ne]=arguments[Ne+2];J.children=Se}if(A&&A.defaultProps)for($ in ae=A.defaultProps,ae)J[$]===void 0&&(J[$]=ae[$]);return ee(A,he,J)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(A){return{$$typeof:m,render:A}},xe.isValidElement=ie,xe.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:W}},xe.memo=function(A,P){return{$$typeof:g,type:A,compare:P===void 0?null:P}},xe.startTransition=function(A){var P=G.T,Z={};G.T=Z;try{var $=A(),J=G.S;J!==null&&J(Z,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(X,se)}catch(he){se(he)}finally{P!==null&&Z.types!==null&&(P.types=Z.types),G.T=P}},xe.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},xe.use=function(A){return G.H.use(A)},xe.useActionState=function(A,P,Z){return G.H.useActionState(A,P,Z)},xe.useCallback=function(A,P){return G.H.useCallback(A,P)},xe.useContext=function(A){return G.H.useContext(A)},xe.useDebugValue=function(){},xe.useDeferredValue=function(A,P){return G.H.useDeferredValue(A,P)},xe.useEffect=function(A,P){return G.H.useEffect(A,P)},xe.useEffectEvent=function(A){return G.H.useEffectEvent(A)},xe.useId=function(){return G.H.useId()},xe.useImperativeHandle=function(A,P,Z){return G.H.useImperativeHandle(A,P,Z)},xe.useInsertionEffect=function(A,P){return G.H.useInsertionEffect(A,P)},xe.useLayoutEffect=function(A,P){return G.H.useLayoutEffect(A,P)},xe.useMemo=function(A,P){return G.H.useMemo(A,P)},xe.useOptimistic=function(A,P){return G.H.useOptimistic(A,P)},xe.useReducer=function(A,P,Z){return G.H.useReducer(A,P,Z)},xe.useRef=function(A){return G.H.useRef(A)},xe.useState=function(A){return G.H.useState(A)},xe.useSyncExternalStore=function(A,P,Z){return G.H.useSyncExternalStore(A,P,Z)},xe.useTransition=function(){return G.H.useTransition()},xe.version="19.2.4",xe}var nv;function mh(){return nv||(nv=1,dd.exports=Z2()),dd.exports}var y=mh();const ma=hh(y),jx=X2({__proto__:null,default:ma},[y]);var hd={exports:{}},fs={},md={exports:{}},pd={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var av;function I2(){return av||(av=1,(function(n){function l(U,Z){var J=U.length;U.push(Z);e:for(;0<J;){var ie=J-1>>>1,ye=U[ie];if(0<c(ye,Z))U[ie]=Z,U[J]=ye,J=ie;else break e}}function i(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var Z=U[0],J=U.pop();if(J!==Z){U[0]=J;e:for(var ie=0,ye=U.length,A=ye>>>1;ie<A;){var P=2*(ie+1)-1,F=U[P],I=P+1,$=U[I];if(0>c(F,J))I<ye&&0>c($,F)?(U[ie]=$,U[I]=J,ie=I):(U[ie]=F,U[P]=J,ie=P);else if(I<ye&&0>c($,J))U[ie]=$,U[I]=J,ie=I;else break e}}return Z}function c(U,Z){var J=U.sortIndex-Z.sortIndex;return J!==0?J:U.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var y=[],p=[],b=1,x=null,E=3,C=!1,T=!1,w=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function z(U){for(var Z=i(p);Z!==null;){if(Z.callback===null)s(p);else if(Z.startTime<=U)s(p),Z.sortIndex=Z.expirationTime,l(y,Z);else break;Z=i(p)}}function k(U){if(w=!1,z(U),!T)if(i(y)!==null)T=!0,Q||(Q=!0,ee());else{var Z=i(p);Z!==null&&de(k,Z.startTime-U)}}var Q=!1,G=-1,W=5,te=-1;function le(){return j?!0:!(n.unstable_now()-te<W)}function oe(){if(j=!1,Q){var U=n.unstable_now();te=U;var Z=!0;try{e:{T=!1,w&&(w=!1,O(G),G=-1),C=!0;var J=E;try{t:{for(z(U),x=i(y);x!==null&&!(x.expirationTime>U&&le());){var ie=x.callback;if(typeof ie=="function"){x.callback=null,E=x.priorityLevel;var ye=ie(x.expirationTime<=U);if(U=n.unstable_now(),typeof ye=="function"){x.callback=ye,z(U),Z=!0;break t}x===i(y)&&s(y),z(U)}else s(y);x=i(y)}if(x!==null)Z=!0;else{var A=i(p);A!==null&&de(k,A.startTime-U),Z=!1}}break e}finally{x=null,E=J,C=!1}Z=void 0}}finally{Z?ee():Q=!1}}}var ee;if(typeof D=="function")ee=function(){D(oe)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ce=ge.port2;ge.port1.onmessage=oe,ee=function(){ce.postMessage(null)}}else ee=function(){N(oe,0)};function de(U,Z){G=N(function(){U(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(U){switch(E){case 1:case 2:case 3:var Z=3;break;default:Z=E}var J=E;E=Z;try{return U()}finally{E=J}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var J=E;E=U;try{return Z()}finally{E=J}},n.unstable_scheduleCallback=function(U,Z,J){var ie=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?ie+J:ie):J=ie,U){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=J+ye,U={id:b++,callback:Z,priorityLevel:U,startTime:J,expirationTime:ye,sortIndex:-1},J>ie?(U.sortIndex=J,l(p,U),i(y)===null&&U===i(p)&&(w?(O(G),G=-1):w=!0,de(k,J-ie))):(U.sortIndex=ye,l(y,U),T||C||(T=!0,Q||(Q=!0,ee()))),U},n.unstable_shouldYield=le,n.unstable_wrapCallback=function(U){var Z=E;return function(){var J=E;E=Z;try{return U.apply(this,arguments)}finally{E=J}}}})(pd)),pd}var lv;function $2(){return lv||(lv=1,md.exports=I2()),md.exports}var gd={exports:{}},jt={};/**
25
+ */var av;function I2(){return av||(av=1,(function(n){function l(U,I){var W=U.length;U.push(I);e:for(;0<W;){var se=W-1>>>1,ye=U[se];if(0<c(ye,I))U[se]=I,U[W]=ye,W=se;else break e}}function i(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var I=U[0],W=U.pop();if(W!==I){U[0]=W;e:for(var se=0,ye=U.length,A=ye>>>1;se<A;){var P=2*(se+1)-1,Z=U[P],$=P+1,J=U[$];if(0>c(Z,W))$<ye&&0>c(J,Z)?(U[se]=J,U[$]=W,se=$):(U[se]=Z,U[P]=W,se=P);else if($<ye&&0>c(J,W))U[se]=J,U[$]=W,se=$;else break e}}return I}function c(U,I){var W=U.sortIndex-I.sortIndex;return W!==0?W:U.id-I.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var v=[],g=[],x=1,b=null,E=3,C=!1,T=!1,w=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function z(U){for(var I=i(g);I!==null;){if(I.callback===null)s(g);else if(I.startTime<=U)s(g),I.sortIndex=I.expirationTime,l(v,I);else break;I=i(g)}}function q(U){if(w=!1,z(U),!T)if(i(v)!==null)T=!0,X||(X=!0,te());else{var I=i(g);I!==null&&de(q,I.startTime-U)}}var X=!1,G=-1,Q=5,ee=-1;function ne(){return j?!0:!(n.unstable_now()-ee<Q)}function ie(){if(j=!1,X){var U=n.unstable_now();ee=U;var I=!0;try{e:{T=!1,w&&(w=!1,O(G),G=-1),C=!0;var W=E;try{t:{for(z(U),b=i(v);b!==null&&!(b.expirationTime>U&&ne());){var se=b.callback;if(typeof se=="function"){b.callback=null,E=b.priorityLevel;var ye=se(b.expirationTime<=U);if(U=n.unstable_now(),typeof ye=="function"){b.callback=ye,z(U),I=!0;break t}b===i(v)&&s(v),z(U)}else s(v);b=i(v)}if(b!==null)I=!0;else{var A=i(g);A!==null&&de(q,A.startTime-U),I=!1}}break e}finally{b=null,E=W,C=!1}I=void 0}}finally{I?te():X=!1}}}var te;if(typeof M=="function")te=function(){M(ie)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ce=ge.port2;ge.port1.onmessage=ie,te=function(){ce.postMessage(null)}}else te=function(){N(ie,0)};function de(U,I){G=N(function(){U(n.unstable_now())},I)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(U){switch(E){case 1:case 2:case 3:var I=3;break;default:I=E}var W=E;E=I;try{return U()}finally{E=W}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(U,I){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var W=E;E=U;try{return I()}finally{E=W}},n.unstable_scheduleCallback=function(U,I,W){var se=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?se+W:se):W=se,U){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=W+ye,U={id:x++,callback:I,priorityLevel:U,startTime:W,expirationTime:ye,sortIndex:-1},W>se?(U.sortIndex=W,l(g,U),i(v)===null&&U===i(g)&&(w?(O(G),G=-1):w=!0,de(q,W-se))):(U.sortIndex=ye,l(v,U),T||C||(T=!0,X||(X=!0,te()))),U},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(U){var I=E;return function(){var W=E;E=I;try{return U.apply(this,arguments)}finally{E=W}}}})(pd)),pd}var lv;function $2(){return lv||(lv=1,md.exports=I2()),md.exports}var gd={exports:{}},jt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var rv;function J2(){if(rv)return jt;rv=1;var n=mh();function l(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(y,p,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:x==null?null:""+x,children:y,containerInfo:p,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,jt.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return d(y,p,null,b)},jt.flushSync=function(y){var p=h.T,b=s.p;try{if(h.T=null,s.p=2,y)return y()}finally{h.T=p,s.p=b,s.d.f()}},jt.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},jt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},jt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,x=m(b,p.crossOrigin),E=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:C}):b==="script"&&s.d.X(y,{crossOrigin:x,integrity:E,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},jt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(y)},jt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,x=m(b,p.crossOrigin);s.d.L(y,b,{crossOrigin:x,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})}},jt.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=m(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(y)},jt.requestFormReset=function(y){s.d.r(y)},jt.unstable_batchedUpdates=function(y,p){return y(p)},jt.useFormState=function(y,p,b){return h.H.useFormState(y,p,b)},jt.useFormStatus=function(){return h.H.useHostTransitionStatus()},jt.version="19.2.4",jt}var iv;function Nx(){if(iv)return gd.exports;iv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),gd.exports=J2(),gd.exports}/**
33
+ */var rv;function J2(){if(rv)return jt;rv=1;var n=mh();function l(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(v,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:v,containerInfo:g,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,jt.createPortal=function(v,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return d(v,g,null,x)},jt.flushSync=function(v){var g=h.T,x=s.p;try{if(h.T=null,s.p=2,v)return v()}finally{h.T=g,s.p=x,s.d.f()}},jt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(v,g))},jt.prefetchDNS=function(v){typeof v=="string"&&s.d.D(v)},jt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin),E=typeof g.integrity=="string"?g.integrity:void 0,C=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?s.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:C}):x==="script"&&s.d.X(v,{crossOrigin:b,integrity:E,fetchPriority:C,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},jt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);s.d.M(v,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&s.d.M(v)},jt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin);s.d.L(v,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},jt.preloadModule=function(v,g){if(typeof v=="string")if(g){var x=m(g.as,g.crossOrigin);s.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else s.d.m(v)},jt.requestFormReset=function(v){s.d.r(v)},jt.unstable_batchedUpdates=function(v,g){return v(g)},jt.useFormState=function(v,g,x){return h.H.useFormState(v,g,x)},jt.useFormStatus=function(){return h.H.useHostTransitionStatus()},jt.version="19.2.4",jt}var iv;function Nx(){if(iv)return gd.exports;iv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),gd.exports=J2(),gd.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@ var Jy=n=>{throw TypeError(n)};var ud=(n,l,i)=>l.has(n)||Jy("Cannot "+i);var _=(
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var sv;function W2(){if(sv)return fs;sv=1;var n=$2(),l=mh(),i=Nx();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return y(o),e;if(f===r)return y(o),t;f=f.sibling}throw Error(s(188))}if(a.return!==r.return)a=o,r=f;else{for(var g=!1,S=o.child;S;){if(S===a){g=!0,a=o,r=f;break}if(S===r){g=!0,r=o,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,r=o;break}if(S===r){g=!0,r=f,a=o;break}S=S.sibling}if(!g)throw Error(s(189))}}if(a.alternate!==r)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),D=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case j:return"StrictMode";case k:return"Suspense";case Q:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case D:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var de=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ie=[],ye=-1;function A(e){return{current:e}}function P(e){0>ye||(e.current=ie[ye],ie[ye]=null,ye--)}function F(e,t){ye++,ie[ye]=e.current,e.current=t}var I=A(null),$=A(null),he=A(null),ne=A(null);function Se(e,t){switch(F(he,t),F($,e),F(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sy(t),e=wy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(I),F(I,e)}function Ne(){P(I),P($),P(he)}function Le(e){e.memoizedState!==null&&F(ne,e);var t=I.current,a=wy(t,e.type);t!==a&&(F($,e),F(I,a))}function De(e){$.current===e&&(P(I),P($)),ne.current===e&&(P(ne),is._currentValue=J)}var Ue,Ct;function pt(e){if(Ue===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ue=t&&t[1]||"",Ct=-1<a.stack.indexOf(`
41
+ */var sv;function W2(){if(sv)return fs;sv=1;var n=$2(),l=mh(),i=Nx();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(d(e)!==e)throw Error(s(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return v(o),e;if(f===r)return v(o),t;f=f.sibling}throw Error(s(188))}if(a.return!==r.return)a=o,r=f;else{for(var p=!1,S=o.child;S;){if(S===a){p=!0,a=o,r=f;break}if(S===r){p=!0,r=o,a=f;break}S=S.sibling}if(!p){for(S=f.child;S;){if(S===a){p=!0,a=f,r=o;break}if(S===r){p=!0,r=f,a=o;break}S=S.sibling}if(!p)throw Error(s(189))}}if(a.alternate!==r)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),M=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case j:return"StrictMode";case q:return"Suspense";case X:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case M:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var de=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},se=[],ye=-1;function A(e){return{current:e}}function P(e){0>ye||(e.current=se[ye],se[ye]=null,ye--)}function Z(e,t){ye++,se[ye]=e.current,e.current=t}var $=A(null),J=A(null),he=A(null),ae=A(null);function Se(e,t){switch(Z(he,t),Z(J,e),Z($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sy(t),e=wy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P($),Z($,e)}function Ne(){P($),P(J),P(he)}function Le(e){e.memoizedState!==null&&Z(ae,e);var t=$.current,a=wy(t,e.type);t!==a&&(Z(J,e),Z($,a))}function De(e){J.current===e&&(P($),P(J)),ae.current===e&&(P(ae),is._currentValue=W)}var Ue,Ct;function pt(e){if(Ue===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ue=t&&t[1]||"",Ct=-1<a.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ue+e+Ct}var Xn=!1;function Kn(e,t){if(!e||Xn)return"";Xn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(V){var q=V}Reflect.construct(e,[],K)}else{try{K.call()}catch(V){q=V}e.call(K.prototype)}}else{try{throw Error()}catch(V){q=V}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(V){if(V&&q&&typeof V.stack=="string")return[V.stack,q.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var R=g.split(`
44
- `),B=S.split(`
45
- `);for(o=r=0;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;for(;o<B.length&&!B[o].includes("DetermineComponentFrameRoot");)o++;if(r===R.length||o===B.length)for(r=R.length-1,o=B.length-1;1<=r&&0<=o&&R[r]!==B[o];)o--;for(;1<=r&&0<=o;r--,o--)if(R[r]!==B[o]){if(r!==1||o!==1)do if(r--,o--,0>o||R[r]!==B[o]){var Y=`
43
+ `+Ue+e+Ct}var Xn=!1;function Kn(e,t){if(!e||Xn)return"";Xn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(V){var B=V}Reflect.construct(e,[],F)}else{try{F.call()}catch(V){B=V}e.call(F.prototype)}}else{try{throw Error()}catch(V){B=V}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),p=f[0],S=f[1];if(p&&S){var R=p.split(`
44
+ `),H=S.split(`
45
+ `);for(o=r=0;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(r===R.length||o===H.length)for(r=R.length-1,o=H.length-1;1<=r&&0<=o&&R[r]!==H[o];)o--;for(;1<=r&&0<=o;r--,o--)if(R[r]!==H[o]){if(r!==1||o!==1)do if(r--,o--,0>o||R[r]!==H[o]){var Y=`
46
46
  `+R[r].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=r&&0<=o);break}}}finally{Xn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?pt(a):""}function vl(e,t){switch(e.tag){case 26:case 27:case 5:return pt(e.type);case 16:return pt("Lazy");case 13:return e.child!==t&&t!==null?pt("Suspense Fallback"):pt("Suspense");case 19:return pt("SuspenseList");case 0:case 15:return Kn(e.type,!1);case 11:return Kn(e.type.render,!1);case 1:return Kn(e.type,!0);case 31:return pt("Activity");default:return""}}function Ys(e){try{var t="",a=null;do t+=vl(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
47
47
  Error generating stack: `+r.message+`
48
- `+r.stack}}var ja=Object.prototype.hasOwnProperty,Zc=n.unstable_scheduleCallback,Ic=n.unstable_cancelCallback,C1=n.unstable_shouldYield,j1=n.unstable_requestPaint,Kt=n.unstable_now,N1=n.unstable_getCurrentPriorityLevel,Wh=n.unstable_ImmediatePriority,em=n.unstable_UserBlockingPriority,Qs=n.unstable_NormalPriority,T1=n.unstable_LowPriority,tm=n.unstable_IdlePriority,R1=n.log,_1=n.unstable_setDisableYieldValue,vi=null,Ft=null;function Na(e){if(typeof R1=="function"&&_1(e),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(vi,e)}catch{}}var Zt=Math.clz32?Math.clz32:M1,A1=Math.log,O1=Math.LN2;function M1(e){return e>>>=0,e===0?32:31-(A1(e)/O1|0)|0}var Ps=256,Xs=262144,Ks=4194304;function xl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fs(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var o=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?o=xl(r):(g&=S,g!==0?o=xl(g):a||(a=S&~e,a!==0&&(o=xl(a))))):(S=r&~f,S!==0?o=xl(S):g!==0?o=xl(g):a||(a=r&~e,a!==0&&(o=xl(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function xi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nm(){var e=Ks;return Ks<<=1,(Ks&62914560)===0&&(Ks=4194304),e}function $c(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function z1(e,t,a,r,o,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,R=e.expirationTimes,B=e.hiddenUpdates;for(a=g&~a;0<a;){var Y=31-Zt(a),K=1<<Y;S[Y]=0,R[Y]=-1;var q=B[Y];if(q!==null)for(B[Y]=null,Y=0;Y<q.length;Y++){var V=q[Y];V!==null&&(V.lane&=-536870913)}a&=~K}r!==0&&am(e,r,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function am(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Zt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function lm(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Zt(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}function rm(e,t){var a=t&-t;return a=(a&42)!==0?1:Jc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Jc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function im(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Py(e.type))}function sm(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var Ta=Math.random().toString(36).slice(2),xt="__reactFiber$"+Ta,Ht="__reactProps$"+Ta,nr="__reactContainer$"+Ta,eu="__reactEvents$"+Ta,L1="__reactListeners$"+Ta,U1="__reactHandles$"+Ta,om="__reactResources$"+Ta,Si="__reactMarker$"+Ta;function tu(e){delete e[xt],delete e[Ht],delete e[eu],delete e[L1],delete e[U1]}function ar(e){var t=e[xt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[nr]||a[xt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_y(e);e!==null;){if(a=e[xt])return a;e=_y(e)}return t}e=a,a=e.parentNode}return null}function lr(e){if(e=e[xt]||e[nr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function rr(e){var t=e[om];return t||(t=e[om]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[Si]=!0}var cm=new Set,um={};function bl(e,t){ir(e,t),ir(e+"Capture",t)}function ir(e,t){for(um[e]=t,e=0;e<t.length;e++)cm.add(t[e])}var k1=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]*$"),fm={},dm={};function H1(e){return ja.call(dm,e)?!0:ja.call(fm,e)?!1:k1.test(e)?dm[e]=!0:(fm[e]=!0,!1)}function Zs(e,t,a){if(H1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Is(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Fn(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function on(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nu(e){if(!e._valueTracker){var t=hm(e)?"checked":"value";e._valueTracker=B1(e,t,""+e[t])}}function mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=hm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function $s(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 q1=/[\n"\\]/g;function cn(e){return e.replace(q1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function au(e,t,a,r,o,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+on(t)):e.value!==""+on(t)&&(e.value=""+on(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?lu(e,g,on(t)):a!=null?lu(e,g,on(a)):r!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+on(S):e.removeAttribute("name")}function pm(e,t,a,r,o,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){nu(e);return}a=a!=null?""+on(a):"",t=t!=null?""+on(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),nu(e)}function lu(e,t,a){t==="number"&&$s(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function sr(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+on(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function gm(e,t,a){if(t!=null&&(t=""+on(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+on(a):""}function ym(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(s(92));if(de(r)){if(1<r.length)throw Error(s(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=on(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),nu(e)}function or(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var V1=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 vm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||V1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function xm(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&a[o]!==r&&vm(e,o,r)}else for(var f in t)t.hasOwnProperty(f)&&vm(e,f,t[f])}function ru(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 G1=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"]]),Y1=/^[\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 Js(e){return Y1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var iu=null;function su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cr=null,ur=null;function bm(e){var t=lr(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(au(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+cn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=r[Ht]||null;if(!o)throw Error(s(90));au(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&mm(r)}break e;case"textarea":gm(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&sr(e,!!a.multiple,t,!1)}}}var ou=!1;function Sm(e,t,a){if(ou)return e(t,a);ou=!0;try{var r=e(t);return r}finally{if(ou=!1,(cr!==null||ur!==null)&&(qo(),cr&&(t=cr,e=ur,ur=cr=null,bm(t),e)))for(t=0;t<e.length;t++)bm(e[t])}}function Ei(e,t){var a=e.stateNode;if(a===null)return null;var r=a[Ht]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=!1;if(In)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){cu=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{cu=!1}var Ra=null,uu=null,Ws=null;function wm(){if(Ws)return Ws;var e,t=uu,a=t.length,r,o="value"in Ra?Ra.value:Ra.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(r=1;r<=g&&t[a-r]===o[f-r];r++);return Ws=o.slice(e,1<r?1-r:void 0)}function eo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function to(){return!0}function Em(){return!1}function Bt(e){function t(a,r,o,f,g){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?to:Em,this.isPropagationStopped=Em,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=to)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=to)},persist:function(){},isPersistent:to}),t}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},no=Bt(Sl),ji=x({},Sl,{view:0,detail:0}),Q1=Bt(ji),fu,du,Ni,ao=x({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mu,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!==Ni&&(Ni&&e.type==="mousemove"?(fu=e.screenX-Ni.screenX,du=e.screenY-Ni.screenY):du=fu=0,Ni=e),fu)},movementY:function(e){return"movementY"in e?e.movementY:du}}),Cm=Bt(ao),P1=x({},ao,{dataTransfer:0}),X1=Bt(P1),K1=x({},ji,{relatedTarget:0}),hu=Bt(K1),F1=x({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Z1=Bt(F1),I1=x({},Sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$1=Bt(I1),J1=x({},Sl,{data:0}),jm=Bt(J1),W1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eS={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"},tS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tS[e])?!!t[e]:!1}function mu(){return nS}var aS=x({},ji,{key:function(e){if(e.key){var t=W1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=eo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mu,charCode:function(e){return e.type==="keypress"?eo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?eo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lS=Bt(aS),rS=x({},ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nm=Bt(rS),iS=x({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mu}),sS=Bt(iS),oS=x({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),cS=Bt(oS),uS=x({},ao,{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}),fS=Bt(uS),dS=x({},Sl,{newState:0,oldState:0}),hS=Bt(dS),mS=[9,13,27,32],pu=In&&"CompositionEvent"in window,Ti=null;In&&"documentMode"in document&&(Ti=document.documentMode);var pS=In&&"TextEvent"in window&&!Ti,Tm=In&&(!pu||Ti&&8<Ti&&11>=Ti),Rm=" ",_m=!1;function Am(e,t){switch(e){case"keyup":return mS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fr=!1;function gS(e,t){switch(e){case"compositionend":return Om(t);case"keypress":return t.which!==32?null:(_m=!0,Rm);case"textInput":return e=t.data,e===Rm&&_m?null:e;default:return null}}function yS(e,t){if(fr)return e==="compositionend"||!pu&&Am(e,t)?(e=wm(),Ws=uu=Ra=null,fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tm&&t.locale!=="ko"?null:t.data;default:return null}}var vS={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 Mm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vS[e.type]:t==="textarea"}function Dm(e,t,a,r){cr?ur?ur.push(r):ur=[r]:cr=r,t=Ko(t,"onChange"),0<t.length&&(a=new no("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Ri=null,_i=null;function xS(e){py(e,0)}function lo(e){var t=wi(e);if(mm(t))return e}function zm(e,t){if(e==="change")return t}var Lm=!1;if(In){var gu;if(In){var yu="oninput"in document;if(!yu){var Um=document.createElement("div");Um.setAttribute("oninput","return;"),yu=typeof Um.oninput=="function"}gu=yu}else gu=!1;Lm=gu&&(!document.documentMode||9<document.documentMode)}function km(){Ri&&(Ri.detachEvent("onpropertychange",Hm),_i=Ri=null)}function Hm(e){if(e.propertyName==="value"&&lo(_i)){var t=[];Dm(t,_i,e,su(e)),Sm(xS,t)}}function bS(e,t,a){e==="focusin"?(km(),Ri=t,_i=a,Ri.attachEvent("onpropertychange",Hm)):e==="focusout"&&km()}function SS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(_i)}function wS(e,t){if(e==="click")return lo(t)}function ES(e,t){if(e==="input"||e==="change")return lo(t)}function CS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:CS;function Ai(e,t){if(It(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!ja.call(t,o)||!It(e[o],t[o]))return!1}return!0}function Bm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qm(e,t){var a=Bm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bm(a)}}function Vm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$s(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=$s(e.document)}return t}function vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jS=In&&"documentMode"in document&&11>=document.documentMode,dr=null,xu=null,Oi=null,bu=!1;function Ym(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bu||dr==null||dr!==$s(r)||(r=dr,"selectionStart"in r&&vu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Oi&&Ai(Oi,r)||(Oi=r,r=Ko(xu,"onSelect"),0<r.length&&(t=new no("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=dr)))}function wl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hr={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionrun:wl("Transition","TransitionRun"),transitionstart:wl("Transition","TransitionStart"),transitioncancel:wl("Transition","TransitionCancel"),transitionend:wl("Transition","TransitionEnd")},Su={},Qm={};In&&(Qm=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);function El(e){if(Su[e])return Su[e];if(!hr[e])return e;var t=hr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Qm)return Su[e]=t[a];return e}var Pm=El("animationend"),Xm=El("animationiteration"),Km=El("animationstart"),NS=El("transitionrun"),TS=El("transitionstart"),RS=El("transitioncancel"),Fm=El("transitionend"),Zm=new Map,wu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wu.push("scrollEnd");function wn(e,t){Zm.set(e,t),bl(t,[e])}var ro=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},un=[],mr=0,Eu=0;function io(){for(var e=mr,t=Eu=mr=0;t<e;){var a=un[t];un[t++]=null;var r=un[t];un[t++]=null;var o=un[t];un[t++]=null;var f=un[t];if(un[t++]=null,r!==null&&o!==null){var g=r.pending;g===null?o.next=o:(o.next=g.next,g.next=o),r.pending=o}f!==0&&Im(a,o,f)}}function so(e,t,a,r){un[mr++]=e,un[mr++]=t,un[mr++]=a,un[mr++]=r,Eu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Cu(e,t,a,r){return so(e,t,a,r),oo(e)}function Cl(e,t){return so(e,null,null,t),oo(e)}function Im(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-Zt(a),e=f.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=a|536870912),f):null}function oo(e){if(50<Wi)throw Wi=0,zf=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pr={};function _S(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,a,r){return new _S(e,t,a,r)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $n(e,t){var a=e.alternate;return a===null?(a=$t(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function $m(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function co(e,t,a,r,o,f){var g=0;if(r=e,typeof e=="function")ju(e)&&(g=1);else if(typeof e=="string")g=z2(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=$t(31,a,t,o),e.elementType=te,e.lanes=f,e;case w:return jl(a.children,o,f,t);case j:g=8,o|=24;break;case N:return e=$t(12,a,t,o|2),e.elementType=N,e.lanes=f,e;case k:return e=$t(13,a,t,o),e.elementType=k,e.lanes=f,e;case Q:return e=$t(19,a,t,o),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:g=10;break e;case O:g=9;break e;case z:g=11;break e;case G:g=14;break e;case W:g=16,r=null;break e}g=29,a=Error(s(130,e===null?"null":typeof e,"")),r=null}return t=$t(g,a,t,o),t.elementType=e,t.type=r,t.lanes=f,t}function jl(e,t,a,r){return e=$t(7,e,r,t),e.lanes=a,e}function Nu(e,t,a){return e=$t(6,e,null,t),e.lanes=a,e}function Jm(e){var t=$t(18,null,null,0);return t.stateNode=e,t}function Tu(e,t,a){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wm=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var a=Wm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ys(t)},Wm.set(e,t),t)}return{value:e,source:t,stack:Ys(t)}}var gr=[],yr=0,uo=null,Mi=0,dn=[],hn=0,_a=null,On=1,Mn="";function Jn(e,t){gr[yr++]=Mi,gr[yr++]=uo,uo=e,Mi=t}function ep(e,t,a){dn[hn++]=On,dn[hn++]=Mn,dn[hn++]=_a,_a=e;var r=On;e=Mn;var o=32-Zt(r)-1;r&=~(1<<o),a+=1;var f=32-Zt(t)+o;if(30<f){var g=o-o%5;f=(r&(1<<g)-1).toString(32),r>>=g,o-=g,On=1<<32-Zt(t)+o|a<<o|r,Mn=f+e}else On=1<<f|a<<o|r,Mn=e}function Ru(e){e.return!==null&&(Jn(e,1),ep(e,1,0))}function _u(e){for(;e===uo;)uo=gr[--yr],gr[yr]=null,Mi=gr[--yr],gr[yr]=null;for(;e===_a;)_a=dn[--hn],dn[hn]=null,Mn=dn[--hn],dn[hn]=null,On=dn[--hn],dn[hn]=null}function tp(e,t){dn[hn++]=On,dn[hn++]=Mn,dn[hn++]=_a,On=t.id,Mn=t.overflow,_a=e}var bt=null,Fe=null,Oe=!1,Aa=null,mn=!1,Au=Error(s(519));function Oa(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Di(fn(t,e)),Au}function np(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[xt]=e,t[Ht]=r,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<ts.length;a++)Re(ts[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),pm(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),ym(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||xy(t.textContent,a)?(r.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),r.onScroll!=null&&Re("scroll",t),r.onScrollEnd!=null&&Re("scrollend",t),r.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||Oa(e,!0)}function ap(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:bt=bt.return}}function vr(e){if(e!==bt)return!1;if(!Oe)return ap(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zf(e.type,e.memoizedProps)),a=!a),a&&Fe&&Oa(e),ap(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Fe=Ry(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Fe=Ry(e)}else t===27?(t=Fe,Pa(e.type)?(e=ed,ed=null,Fe=e):Fe=t):Fe=bt?gn(e.stateNode.nextSibling):null;return!0}function Nl(){Fe=bt=null,Oe=!1}function Ou(){var e=Aa;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Aa=null),e}function Di(e){Aa===null?Aa=[e]:Aa.push(e)}var Mu=A(null),Tl=null,Wn=null;function Ma(e,t,a){F(Mu,t._currentValue),t._currentValue=a}function ea(e){e._currentValue=Mu.current,P(Mu)}function Du(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function zu(e,t,a,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var g=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var R=0;R<t.length;R++)if(S.context===t[R]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Du(f.return,a,e),r||(g=null);break e}f=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(s(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),Du(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function xr(e,t,a,r){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(s(387));if(g=g.memoizedProps,g!==null){var S=o.type;It(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===ne.current){if(g=o.alternate,g===null)throw Error(s(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(is):e=[is])}o=o.return}e!==null&&zu(t,e,a,r),t.flags|=262144}function fo(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rl(e){Tl=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return lp(Tl,e)}function ho(e,t){return Tl===null&&Rl(e),lp(e,t)}function lp(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wn===null){if(e===null)throw Error(s(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return a}var AS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},OS=n.unstable_scheduleCallback,MS=n.unstable_NormalPriority,st={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lu(){return{controller:new AS,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&OS(MS,function(){e.controller.abort()})}var Li=null,Uu=0,br=0,Sr=null;function DS(e,t){if(Li===null){var a=Li=[];Uu=0,br=qf(),Sr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Uu++,t.then(rp,rp),t}function rp(){if(--Uu===0&&Li!==null){Sr!==null&&(Sr.status="fulfilled");var e=Li;Li=null,br=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function zS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),r}var ip=U.S;U.S=function(e,t){Yg=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DS(e,t),ip!==null&&ip(e,t)};var _l=A(null);function ku(){var e=_l.current;return e!==null?e:Xe.pooledCache}function mo(e,t){t===null?F(_l,_l.current):F(_l,t.pool)}function sp(){var e=ku();return e===null?null:{parent:st._currentValue,pool:e}}var wr=Error(s(460)),Hu=Error(s(474)),po=Error(s(542)),go={then:function(){}};function op(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cp(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zn,Zn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fp(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fp(e),e}throw Ol=t,wr}}function Al(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ol=a,wr):a}}var Ol=null;function up(){if(Ol===null)throw Error(s(459));var e=Ol;return Ol=null,e}function fp(e){if(e===wr||e===po)throw Error(s(483))}var Er=null,Ui=0;function yo(e){var t=Ui;return Ui+=1,Er===null&&(Er=[]),cp(Er,e,t)}function ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vo(e,t){throw t.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dp(e){function t(L,M){if(e){var H=L.deletions;H===null?(L.deletions=[M],L.flags|=16):H.push(M)}}function a(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function r(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function o(L,M){return L=$n(L,M),L.index=0,L.sibling=null,L}function f(L,M,H){return L.index=H,e?(H=L.alternate,H!==null?(H=H.index,H<M?(L.flags|=67108866,M):H):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function g(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function S(L,M,H,X){return M===null||M.tag!==6?(M=Nu(H,L.mode,X),M.return=L,M):(M=o(M,H),M.return=L,M)}function R(L,M,H,X){var fe=H.type;return fe===w?Y(L,M,H.props.children,X,H.key):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===W&&Al(fe)===M.type)?(M=o(M,H.props),ki(M,H),M.return=L,M):(M=co(H.type,H.key,H.props,null,L.mode,X),ki(M,H),M.return=L,M)}function B(L,M,H,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=Tu(H,L.mode,X),M.return=L,M):(M=o(M,H.children||[]),M.return=L,M)}function Y(L,M,H,X,fe){return M===null||M.tag!==7?(M=jl(H,L.mode,X,fe),M.return=L,M):(M=o(M,H),M.return=L,M)}function K(L,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Nu(""+M,L.mode,H),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case C:return H=co(M.type,M.key,M.props,null,L.mode,H),ki(H,M),H.return=L,H;case T:return M=Tu(M,L.mode,H),M.return=L,M;case W:return M=Al(M),K(L,M,H)}if(de(M)||ee(M))return M=jl(M,L.mode,H,null),M.return=L,M;if(typeof M.then=="function")return K(L,yo(M),H);if(M.$$typeof===D)return K(L,ho(L,M),H);vo(L,M)}return null}function q(L,M,H,X){var fe=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return fe!==null?null:S(L,M,""+H,X);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case C:return H.key===fe?R(L,M,H,X):null;case T:return H.key===fe?B(L,M,H,X):null;case W:return H=Al(H),q(L,M,H,X)}if(de(H)||ee(H))return fe!==null?null:Y(L,M,H,X,null);if(typeof H.then=="function")return q(L,M,yo(H),X);if(H.$$typeof===D)return q(L,M,ho(L,H),X);vo(L,H)}return null}function V(L,M,H,X,fe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return L=L.get(H)||null,S(M,L,""+X,fe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case C:return L=L.get(X.key===null?H:X.key)||null,R(M,L,X,fe);case T:return L=L.get(X.key===null?H:X.key)||null,B(M,L,X,fe);case W:return X=Al(X),V(L,M,H,X,fe)}if(de(X)||ee(X))return L=L.get(H)||null,Y(M,L,X,fe,null);if(typeof X.then=="function")return V(L,M,H,yo(X),fe);if(X.$$typeof===D)return V(L,M,H,ho(M,X),fe);vo(M,X)}return null}function re(L,M,H,X){for(var fe=null,ke=null,se=M,we=M=0,Ae=null;se!==null&&we<H.length;we++){se.index>we?(Ae=se,se=null):Ae=se.sibling;var He=q(L,se,H[we],X);if(He===null){se===null&&(se=Ae);break}e&&se&&He.alternate===null&&t(L,se),M=f(He,M,we),ke===null?fe=He:ke.sibling=He,ke=He,se=Ae}if(we===H.length)return a(L,se),Oe&&Jn(L,we),fe;if(se===null){for(;we<H.length;we++)se=K(L,H[we],X),se!==null&&(M=f(se,M,we),ke===null?fe=se:ke.sibling=se,ke=se);return Oe&&Jn(L,we),fe}for(se=r(se);we<H.length;we++)Ae=V(se,L,we,H[we],X),Ae!==null&&(e&&Ae.alternate!==null&&se.delete(Ae.key===null?we:Ae.key),M=f(Ae,M,we),ke===null?fe=Ae:ke.sibling=Ae,ke=Ae);return e&&se.forEach(function(Ia){return t(L,Ia)}),Oe&&Jn(L,we),fe}function me(L,M,H,X){if(H==null)throw Error(s(151));for(var fe=null,ke=null,se=M,we=M=0,Ae=null,He=H.next();se!==null&&!He.done;we++,He=H.next()){se.index>we?(Ae=se,se=null):Ae=se.sibling;var Ia=q(L,se,He.value,X);if(Ia===null){se===null&&(se=Ae);break}e&&se&&Ia.alternate===null&&t(L,se),M=f(Ia,M,we),ke===null?fe=Ia:ke.sibling=Ia,ke=Ia,se=Ae}if(He.done)return a(L,se),Oe&&Jn(L,we),fe;if(se===null){for(;!He.done;we++,He=H.next())He=K(L,He.value,X),He!==null&&(M=f(He,M,we),ke===null?fe=He:ke.sibling=He,ke=He);return Oe&&Jn(L,we),fe}for(se=r(se);!He.done;we++,He=H.next())He=V(se,L,we,He.value,X),He!==null&&(e&&He.alternate!==null&&se.delete(He.key===null?we:He.key),M=f(He,M,we),ke===null?fe=He:ke.sibling=He,ke=He);return e&&se.forEach(function(P2){return t(L,P2)}),Oe&&Jn(L,we),fe}function Pe(L,M,H,X){if(typeof H=="object"&&H!==null&&H.type===w&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case C:e:{for(var fe=H.key;M!==null;){if(M.key===fe){if(fe=H.type,fe===w){if(M.tag===7){a(L,M.sibling),X=o(M,H.props.children),X.return=L,L=X;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===W&&Al(fe)===M.type){a(L,M.sibling),X=o(M,H.props),ki(X,H),X.return=L,L=X;break e}a(L,M);break}else t(L,M);M=M.sibling}H.type===w?(X=jl(H.props.children,L.mode,X,H.key),X.return=L,L=X):(X=co(H.type,H.key,H.props,null,L.mode,X),ki(X,H),X.return=L,L=X)}return g(L);case T:e:{for(fe=H.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){a(L,M.sibling),X=o(M,H.children||[]),X.return=L,L=X;break e}else{a(L,M);break}else t(L,M);M=M.sibling}X=Tu(H,L.mode,X),X.return=L,L=X}return g(L);case W:return H=Al(H),Pe(L,M,H,X)}if(de(H))return re(L,M,H,X);if(ee(H)){if(fe=ee(H),typeof fe!="function")throw Error(s(150));return H=fe.call(H),me(L,M,H,X)}if(typeof H.then=="function")return Pe(L,M,yo(H),X);if(H.$$typeof===D)return Pe(L,M,ho(L,H),X);vo(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(a(L,M.sibling),X=o(M,H),X.return=L,L=X):(a(L,M),X=Nu(H,L.mode,X),X.return=L,L=X),g(L)):a(L,M)}return function(L,M,H,X){try{Ui=0;var fe=Pe(L,M,H,X);return Er=null,fe}catch(se){if(se===wr||se===po)throw se;var ke=$t(29,se,null,L.mode);return ke.lanes=X,ke.return=L,ke}finally{}}}var Ml=dp(!0),hp=dp(!1),Da=!1;function Bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Be&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=oo(e),Im(e,null,a),t}return so(e,r,t,a),oo(e)}function Hi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,lm(e,a)}}function Vu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Gu=!1;function Bi(){if(Gu){var e=Sr;if(e!==null)throw e}}function qi(e,t,a,r){Gu=!1;var o=e.updateQueue;Da=!1;var f=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var R=S,B=R.next;R.next=null,g===null?f=B:g.next=B,g=R;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==g&&(S===null?Y.firstBaseUpdate=B:S.next=B,Y.lastBaseUpdate=R))}if(f!==null){var K=o.baseState;g=0,Y=B=R=null,S=f;do{var q=S.lane&-536870913,V=q!==S.lane;if(V?(_e&q)===q:(r&q)===q){q!==0&&q===br&&(Gu=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var re=e,me=S;q=t;var Pe=a;switch(me.tag){case 1:if(re=me.payload,typeof re=="function"){K=re.call(Pe,K,q);break e}K=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=me.payload,q=typeof re=="function"?re.call(Pe,K,q):re,q==null)break e;K=x({},K,q);break e;case 2:Da=!0}}q=S.callback,q!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[q]:V.push(q))}else V={lane:q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(B=Y=V,R=K):Y=Y.next=V,g|=q;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;V=S,S=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);Y===null&&(R=K),o.baseState=R,o.firstBaseUpdate=B,o.lastBaseUpdate=Y,f===null&&(o.shared.lanes=0),qa|=g,e.lanes=g,e.memoizedState=K}}function mp(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function pp(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mp(a[e],t)}var Cr=A(null),xo=A(0);function gp(e,t){e=ca,F(xo,e),F(Cr,t),ca=e|t.baseLanes}function Yu(){F(xo,ca),F(Cr,Cr.current)}function Qu(){ca=xo.current,P(Cr),P(xo)}var Jt=A(null),pn=null;function Ua(e){var t=e.alternate;F(lt,lt.current&1),F(Jt,e),pn===null&&(t===null||Cr.current!==null||t.memoizedState!==null)&&(pn=e)}function Pu(e){F(lt,lt.current),F(Jt,e),pn===null&&(pn=e)}function yp(e){e.tag===22?(F(lt,lt.current),F(Jt,e),pn===null&&(pn=e)):ka()}function ka(){F(lt,lt.current),F(Jt,Jt.current)}function Wt(e){P(Jt),pn===e&&(pn=null),P(lt)}var lt=A(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Jf(a)||Wf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=0,be=null,Ye=null,ot=null,So=!1,jr=!1,Dl=!1,wo=0,Vi=0,Nr=null,LS=0;function tt(){throw Error(s(321))}function Xu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!It(e[a],t[a]))return!1;return!0}function Ku(e,t,a,r,o,f){return ta=f,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?eg:cf,Dl=!1,f=a(r,o),Dl=!1,jr&&(f=xp(t,a,r,o)),vp(e),f}function vp(e){U.H=Qi;var t=Ye!==null&&Ye.next!==null;if(ta=0,ot=Ye=be=null,So=!1,Vi=0,Nr=null,t)throw Error(s(300));e===null||ct||(e=e.dependencies,e!==null&&fo(e)&&(ct=!0))}function xp(e,t,a,r){be=e;var o=0;do{if(jr&&(Nr=null),Vi=0,jr=!1,25<=o)throw Error(s(301));if(o+=1,ot=Ye=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=tg,f=t(a,r)}while(jr);return f}function US(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Gi(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(be.flags|=1024),t}function Fu(){var e=wo!==0;return wo=0,e}function Zu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Iu(e){if(So){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}So=!1}ta=0,ot=Ye=be=null,jr=!1,Vi=wo=0,Nr=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?be.memoizedState=ot=e:ot=ot.next=e,ot}function rt(){if(Ye===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=ot===null?be.memoizedState:ot.next;if(t!==null)ot=t,Ye=e;else{if(e===null)throw be.alternate===null?Error(s(467)):Error(s(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},ot===null?be.memoizedState=ot=e:ot=ot.next=e}return ot}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(e){var t=Vi;return Vi+=1,Nr===null&&(Nr=[]),e=cp(Nr,e,t),t=be,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?eg:cf),e}function Co(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gi(e);if(e.$$typeof===D)return St(e)}throw Error(s(438,String(e)))}function $u(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=be.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=le;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function jo(e){var t=rt();return Ju(t,Ye,e)}function Ju(e,t,a){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=a;var o=e.baseQueue,f=r.pending;if(f!==null){if(o!==null){var g=o.next;o.next=f.next,f.next=g}t.baseQueue=o=f,r.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=g=null,R=null,B=t,Y=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(_e&K)===K:(ta&K)===K){var q=B.revertLane;if(q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===br&&(Y=!0);else if((ta&q)===q){B=B.next,q===br&&(Y=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},R===null?(S=R=K,g=f):R=R.next=K,be.lanes|=q,qa|=q;K=B.action,Dl&&a(f,K),f=B.hasEagerState?B.eagerState:a(f,K)}else q={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},R===null?(S=R=q,g=f):R=R.next=q,be.lanes|=K,qa|=K;B=B.next}while(B!==null&&B!==t);if(R===null?g=f:R.next=S,!It(f,e.memoizedState)&&(ct=!0,Y&&(a=Sr,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=R,r.lastRenderedState=f}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wu(e){var t=rt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do f=e(f,g.action),g=g.next;while(g!==o);It(f,t.memoizedState)||(ct=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function bp(e,t,a){var r=be,o=rt(),f=Oe;if(f){if(a===void 0)throw Error(s(407));a=a()}else a=t();var g=!It((Ye||o).memoizedState,a);if(g&&(o.memoizedState=a,ct=!0),o=o.queue,nf(Ep.bind(null,r,o,e),[e]),o.getSnapshot!==t||g||ot!==null&&ot.memoizedState.tag&1){if(r.flags|=2048,Tr(9,{destroy:void 0},wp.bind(null,r,o,a,t),null),Xe===null)throw Error(s(349));f||(ta&127)!==0||Sp(r,t,a)}return a}function Sp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Eo(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function wp(e,t,a,r){t.value=a,t.getSnapshot=r,Cp(t)&&jp(e)}function Ep(e,t,a){return a(function(){Cp(t)&&jp(e)})}function Cp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!It(e,a)}catch{return!0}}function jp(e){var t=Cl(e,2);t!==null&&Qt(t,e,2)}function ef(e){var t=zt();if(typeof e=="function"){var a=e;if(e=a(),Dl){Na(!0);try{a()}finally{Na(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Np(e,t,a,r){return e.baseState=a,Ju(e,Ye,typeof r=="function"?r:na)}function kS(e,t,a,r,o){if(Ro(e))throw Error(s(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};U.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Tp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Tp(e,t){var a=t.action,r=t.payload,o=e.state;if(t.isTransition){var f=U.T,g={};U.T=g;try{var S=a(o,r),R=U.S;R!==null&&R(g,S),Rp(e,t,S)}catch(B){tf(e,t,B)}finally{f!==null&&g.types!==null&&(f.types=g.types),U.T=f}}else try{f=a(o,r),Rp(e,t,f)}catch(B){tf(e,t,B)}}function Rp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){_p(e,t,r)},function(r){return tf(e,t,r)}):_p(e,t,a)}function _p(e,t,a){t.status="fulfilled",t.value=a,Ap(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tp(e,a)))}function tf(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Ap(t),t=t.next;while(t!==r)}e.action=null}function Ap(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Op(e,t){return t}function Mp(e,t){if(Oe){var a=Xe.formState;if(a!==null){e:{var r=be;if(Oe){if(Fe){t:{for(var o=Fe,f=mn;o.nodeType!==8;){if(!f){o=null;break t}if(o=gn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Fe=gn(o.nextSibling),r=o.data==="F!";break e}}Oa(r)}r=!1}r&&(t=a[0])}}return a=zt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Op,lastRenderedState:t},a.queue=r,a=$p.bind(null,be,r),r.dispatch=a,r=ef(!1),f=of.bind(null,be,!1,r.queue),r=zt(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,a=kS.bind(null,be,o,f,a),o.dispatch=a,r.memoizedState=e,[t,a,!1]}function Dp(e){var t=rt();return zp(t,Ye,e)}function zp(e,t,a){if(t=Ju(e,t,Op)[0],e=jo(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Gi(t)}catch(g){throw g===wr?po:g}else r=t;t=rt();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,Tr(9,{destroy:void 0},HS.bind(null,o,a),null)),[r,f,e]}function HS(e,t){e.action=t}function Lp(e){var t=rt(),a=Ye;if(a!==null)return zp(t,a,e);rt(),t=t.memoizedState,a=rt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function Tr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=be.updateQueue,t===null&&(t=Eo(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Up(){return rt().memoizedState}function No(e,t,a,r){var o=zt();be.flags|=e,o.memoizedState=Tr(1|t,{destroy:void 0},a,r===void 0?null:r)}function To(e,t,a,r){var o=rt();r=r===void 0?null:r;var f=o.memoizedState.inst;Ye!==null&&r!==null&&Xu(r,Ye.memoizedState.deps)?o.memoizedState=Tr(t,f,a,r):(be.flags|=e,o.memoizedState=Tr(1|t,f,a,r))}function kp(e,t){No(8390656,8,e,t)}function nf(e,t){To(2048,8,e,t)}function BS(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Eo(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hp(e){var t=rt().memoizedState;return BS({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Bp(e,t){return To(4,2,e,t)}function qp(e,t){return To(4,4,e,t)}function Vp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gp(e,t,a){a=a!=null?a.concat([e]):null,To(4,4,Vp.bind(null,t,e),a)}function af(){}function Yp(e,t){var a=rt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&Xu(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function Qp(e,t){var a=rt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&Xu(t,r[1]))return r[0];if(r=e(),Dl){Na(!0);try{e()}finally{Na(!1)}}return a.memoizedState=[r,t],r}function lf(e,t,a){return a===void 0||(ta&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Pg(),be.lanes|=e,qa|=e,a)}function Pp(e,t,a,r){return It(a,t)?a:Cr.current!==null?(e=lf(e,a,r),It(e,t)||(ct=!0),e):(ta&42)===0||(ta&1073741824)!==0&&(_e&261930)===0?(ct=!0,e.memoizedState=a):(e=Pg(),be.lanes|=e,qa|=e,t)}function Xp(e,t,a,r,o){var f=Z.p;Z.p=f!==0&&8>f?f:8;var g=U.T,S={};U.T=S,of(e,!1,t,a);try{var R=o(),B=U.S;if(B!==null&&B(S,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var Y=zS(R,r);Yi(e,t,Y,nn(e))}else Yi(e,t,r,nn(e))}catch(K){Yi(e,t,{then:function(){},status:"rejected",reason:K},nn())}finally{Z.p=f,g!==null&&S.types!==null&&(g.types=S.types),U.T=g}}function qS(){}function rf(e,t,a,r){if(e.tag!==5)throw Error(s(476));var o=Kp(e).queue;Xp(e,o,t,J,a===null?qS:function(){return Fp(e),a(r)})}function Kp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fp(e){var t=Kp(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},nn())}function sf(){return St(is)}function Zp(){return rt().memoizedState}function Ip(){return rt().memoizedState}function VS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=nn();e=za(a);var r=La(t,e,a);r!==null&&(Qt(r,t,a),Hi(r,t,a)),t={cache:Lu()},e.payload=t;return}t=t.return}}function GS(e,t,a){var r=nn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ro(e)?Jp(t,a):(a=Cu(e,t,a,r),a!==null&&(Qt(a,e,r),Wp(a,t,r)))}function $p(e,t,a){var r=nn();Yi(e,t,a,r)}function Yi(e,t,a,r){var o={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ro(e))Jp(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,S=f(g,a);if(o.hasEagerState=!0,o.eagerState=S,It(S,g))return so(e,t,o,0),Xe===null&&io(),!1}catch{}finally{}if(a=Cu(e,t,o,r),a!==null)return Qt(a,e,r),Wp(a,t,r),!0}return!1}function of(e,t,a,r){if(r={lane:2,revertLane:qf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ro(e)){if(t)throw Error(s(479))}else t=Cu(e,a,r,2),t!==null&&Qt(t,e,2)}function Ro(e){var t=e.alternate;return e===be||t!==null&&t===be}function Jp(e,t){jr=So=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,lm(e,a)}}var Qi={readContext:St,use:Co,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Qi.useEffectEvent=tt;var eg={readContext:St,use:Co,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:kp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,No(4194308,4,Vp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var a=zt();t=t===void 0?null:t;var r=e();if(Dl){Na(!0);try{e()}finally{Na(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=zt();if(a!==void 0){var o=a(t);if(Dl){Na(!0);try{a(t)}finally{Na(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=GS.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=ef(e);var t=e.queue,a=$p.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,t){var a=zt();return lf(a,e,t)},useTransition:function(){var e=ef(!1);return e=Xp.bind(null,be,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=be,o=zt();if(Oe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Xe===null)throw Error(s(349));(_e&127)!==0||Sp(r,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,kp(Ep.bind(null,r,f,e),[e]),r.flags|=2048,Tr(9,{destroy:void 0},wp.bind(null,r,f,a,t),null),a},useId:function(){var e=zt(),t=Xe.identifierPrefix;if(Oe){var a=Mn,r=On;a=(r&~(1<<32-Zt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=wo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=LS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sf,useFormState:Mp,useActionState:Mp,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=of.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:$u,useCacheRefresh:function(){return zt().memoizedState=VS.bind(null,be)},useEffectEvent:function(e){var t=zt(),a={impl:e};return t.memoizedState=a,function(){if((Be&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},cf={readContext:St,use:Co,useCallback:Yp,useContext:St,useEffect:nf,useImperativeHandle:Gp,useInsertionEffect:Bp,useLayoutEffect:qp,useMemo:Qp,useReducer:jo,useRef:Up,useState:function(){return jo(na)},useDebugValue:af,useDeferredValue:function(e,t){var a=rt();return Pp(a,Ye.memoizedState,e,t)},useTransition:function(){var e=jo(na)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:bp,useId:Zp,useHostTransitionStatus:sf,useFormState:Dp,useActionState:Dp,useOptimistic:function(e,t){var a=rt();return Np(a,Ye,e,t)},useMemoCache:$u,useCacheRefresh:Ip};cf.useEffectEvent=Hp;var tg={readContext:St,use:Co,useCallback:Yp,useContext:St,useEffect:nf,useImperativeHandle:Gp,useInsertionEffect:Bp,useLayoutEffect:qp,useMemo:Qp,useReducer:Wu,useRef:Up,useState:function(){return Wu(na)},useDebugValue:af,useDeferredValue:function(e,t){var a=rt();return Ye===null?lf(a,e,t):Pp(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Wu(na)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:bp,useId:Zp,useHostTransitionStatus:sf,useFormState:Lp,useActionState:Lp,useOptimistic:function(e,t){var a=rt();return Ye!==null?Np(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$u,useCacheRefresh:Ip};tg.useEffectEvent=Hp;function uf(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ff={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=nn(),o=za(r);o.payload=t,a!=null&&(o.callback=a),t=La(e,o,r),t!==null&&(Qt(t,e,r),Hi(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=nn(),o=za(r);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=La(e,o,r),t!==null&&(Qt(t,e,r),Hi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=nn(),r=za(a);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,a),t!==null&&(Qt(t,e,a),Hi(t,e,a))}};function ng(e,t,a,r,o,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,g):t.prototype&&t.prototype.isPureReactComponent?!Ai(a,r)||!Ai(o,f):!0}function ag(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&ff.enqueueReplaceState(t,t.state,null)}function zl(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function lg(e){ro(e)}function rg(e){console.error(e)}function ig(e){ro(e)}function _o(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function sg(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function df(e,t,a){return a=za(a),a.tag=3,a.payload={element:null},a.callback=function(){_o(e,t)},a}function og(e){return e=za(e),e.tag=3,e}function cg(e,t,a,r){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=r.value;e.payload=function(){return o(f)},e.callback=function(){sg(t,a,r)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){sg(t,a,r),typeof o!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function YS(e,t,a,r,o){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&xr(t,a,o,!0),a=Jt.current,a!==null){switch(a.tag){case 31:case 13:return pn===null?Vo():a.alternate===null&&nt===0&&(nt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,r===go?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),kf(e,r,o)),!1;case 22:return a.flags|=65536,r===go?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),kf(e,r,o)),!1}throw Error(s(435,a.tag))}return kf(e,r,o),Vo(),!1}if(Oe)return t=Jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==Au&&(e=Error(s(422),{cause:r}),Di(fn(e,a)))):(r!==Au&&(t=Error(s(423),{cause:r}),Di(fn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=fn(r,a),o=df(e.stateNode,r,o),Vu(e,o),nt!==4&&(nt=2)),!1;var f=Error(s(520),{cause:r});if(f=fn(f,a),Ji===null?Ji=[f]:Ji.push(f),nt!==4&&(nt=2),t===null)return!0;r=fn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=df(a.stateNode,r,e),Vu(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Va===null||!Va.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=og(o),cg(o,e,a,r),Vu(a,o),!1}a=a.return}while(a!==null);return!1}var hf=Error(s(461)),ct=!1;function wt(e,t,a,r){t.child=e===null?hp(t,null,a,r):Ml(t,e.child,a,r)}function ug(e,t,a,r,o){a=a.render;var f=t.ref;if("ref"in r){var g={};for(var S in r)S!=="ref"&&(g[S]=r[S])}else g=r;return Rl(t),r=Ku(e,t,a,g,f,o),S=Fu(),e!==null&&!ct?(Zu(e,t,o),aa(e,t,o)):(Oe&&S&&Ru(t),t.flags|=1,wt(e,t,r,o),t.child)}function fg(e,t,a,r,o){if(e===null){var f=a.type;return typeof f=="function"&&!ju(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,dg(e,t,f,r,o)):(e=co(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Sf(e,o)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ai,a(g,r)&&e.ref===t.ref)return aa(e,t,o)}return t.flags|=1,e=$n(f,r),e.ref=t.ref,e.return=t,t.child=e}function dg(e,t,a,r,o){if(e!==null){var f=e.memoizedProps;if(Ai(f,r)&&e.ref===t.ref)if(ct=!1,t.pendingProps=r=f,Sf(e,o))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,aa(e,t,o)}return mf(e,t,a,r,o)}function hg(e,t,a,r){var o=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~f}else r=0,t.child=null;return mg(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mo(t,f!==null?f.cachePool:null),f!==null?gp(t,f):Yu(),yp(t);else return r=t.lanes=536870912,mg(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(mo(t,f.cachePool),gp(t,f),ka(),t.memoizedState=null):(e!==null&&mo(t,null),Yu(),ka());return wt(e,t,o,a),t.child}function Pi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mg(e,t,a,r,o){var f=ku();return f=f===null?null:{parent:st._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&mo(t,null),Yu(),yp(t),e!==null&&xr(e,t,r,!0),t.childLanes=o,null}function Ao(e,t){return t=Mo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pg(e,t,a){return Ml(t,e.child,null,a),e=Ao(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function QS(e,t,a){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(r.mode==="hidden")return e=Ao(t,r),t.lanes=536870912,Pi(null,e);if(Pu(t),(e=Fe)?(e=Ty(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:On,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},a=Jm(e),a.return=t,t.child=a,bt=t,Fe=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return Ao(t,r)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Pu(t),o)if(t.flags&256)t.flags&=-257,t=pg(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ct||xr(e,t,a,!1),o=(a&e.childLanes)!==0,ct||o){if(r=Xe,r!==null&&(g=rm(r,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,Cl(e,g),Qt(r,e,g),hf;Vo(),t=pg(e,t,a)}else e=f.treeContext,Fe=gn(g.nextSibling),bt=t,Oe=!0,Aa=null,mn=!1,e!==null&&tp(t,e),t=Ao(t,r),t.flags|=4096;return t}return e=$n(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mf(e,t,a,r,o){return Rl(t),a=Ku(e,t,a,r,void 0,o),r=Fu(),e!==null&&!ct?(Zu(e,t,o),aa(e,t,o)):(Oe&&r&&Ru(t),t.flags|=1,wt(e,t,a,o),t.child)}function gg(e,t,a,r,o,f){return Rl(t),t.updateQueue=null,a=xp(t,r,a,o),vp(e),r=Fu(),e!==null&&!ct?(Zu(e,t,f),aa(e,t,f)):(Oe&&r&&Ru(t),t.flags|=1,wt(e,t,a,f),t.child)}function yg(e,t,a,r,o){if(Rl(t),t.stateNode===null){var f=pr,g=a.contextType;typeof g=="object"&&g!==null&&(f=St(g)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ff,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},Bu(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?St(g):pr,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(uf(t,a,g,r),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&ff.enqueueReplaceState(f,f.state,null),qi(t,r,f,o),Bi(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,R=zl(a,S);f.props=R;var B=f.context,Y=a.contextType;g=pr,typeof Y=="object"&&Y!==null&&(g=St(Y));var K=a.getDerivedStateFromProps;Y=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||B!==g)&&ag(t,f,r,g),Da=!1;var q=t.memoizedState;f.state=q,qi(t,r,f,o),Bi(),B=t.memoizedState,S||q!==B||Da?(typeof K=="function"&&(uf(t,a,K,r),B=t.memoizedState),(R=Da||ng(t,a,R,r,q,B,g))?(Y||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=B),f.props=r,f.state=B,f.context=g,r=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,qu(e,t),g=t.memoizedProps,Y=zl(a,g),f.props=Y,K=t.pendingProps,q=f.context,B=a.contextType,R=pr,typeof B=="object"&&B!==null&&(R=St(B)),S=a.getDerivedStateFromProps,(B=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==K||q!==R)&&ag(t,f,r,R),Da=!1,q=t.memoizedState,f.state=q,qi(t,r,f,o),Bi();var V=t.memoizedState;g!==K||q!==V||Da||e!==null&&e.dependencies!==null&&fo(e.dependencies)?(typeof S=="function"&&(uf(t,a,S,r),V=t.memoizedState),(Y=Da||ng(t,a,Y,r,q,V,R)||e!==null&&e.dependencies!==null&&fo(e.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,V,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,V,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=V),f.props=r,f.state=V,f.context=R,r=Y):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Oo(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Ml(t,e.child,null,o),t.child=Ml(t,null,a,o)):wt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=aa(e,t,o),e}function vg(e,t,a,r){return Nl(),t.flags|=256,wt(e,t,a,r),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gf(e){return{baseLanes:e,cachePool:sp()}}function yf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=tn),e}function xg(e,t,a){var r=t.pendingProps,o=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(o?Ua(t):ka(),(e=Fe)?(e=Ty(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:On,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},a=Jm(e),a.return=t,t.child=a,bt=t,Fe=null)):e=null,e===null)throw Oa(t);return Wf(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,o?(ka(),o=t.mode,S=Mo({mode:"hidden",children:S},o),r=jl(r,o,a,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=gf(a),r.childLanes=yf(e,g,a),t.memoizedState=pf,Pi(null,r)):(Ua(t),vf(t,S))}var R=e.memoizedState;if(R!==null&&(S=R.dehydrated,S!==null)){if(f)t.flags&256?(Ua(t),t.flags&=-257,t=xf(e,t,a)):t.memoizedState!==null?(ka(),t.child=e.child,t.flags|=128,t=null):(ka(),S=r.fallback,o=t.mode,r=Mo({mode:"visible",children:r.children},o),S=jl(S,o,a,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Ml(t,e.child,null,a),r=t.child,r.memoizedState=gf(a),r.childLanes=yf(e,g,a),t.memoizedState=pf,t=Pi(null,r));else if(Ua(t),Wf(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var B=g.dgst;g=B,r=Error(s(419)),r.stack="",r.digest=g,Di({value:r,source:null,stack:null}),t=xf(e,t,a)}else if(ct||xr(e,t,a,!1),g=(a&e.childLanes)!==0,ct||g){if(g=Xe,g!==null&&(r=rm(g,a),r!==0&&r!==R.retryLane))throw R.retryLane=r,Cl(e,r),Qt(g,e,r),hf;Jf(S)||Vo(),t=xf(e,t,a)}else Jf(S)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Fe=gn(S.nextSibling),bt=t,Oe=!0,Aa=null,mn=!1,e!==null&&tp(t,e),t=vf(t,r.children),t.flags|=4096);return t}return o?(ka(),S=r.fallback,o=t.mode,R=e.child,B=R.sibling,r=$n(R,{mode:"hidden",children:r.children}),r.subtreeFlags=R.subtreeFlags&65011712,B!==null?S=$n(B,S):(S=jl(S,o,a,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,Pi(null,r),r=t.child,S=e.child.memoizedState,S===null?S=gf(a):(o=S.cachePool,o!==null?(R=st._currentValue,o=o.parent!==R?{parent:R,pool:R}:o):o=sp(),S={baseLanes:S.baseLanes|a,cachePool:o}),r.memoizedState=S,r.childLanes=yf(e,g,a),t.memoizedState=pf,Pi(e.child,r)):(Ua(t),a=e.child,e=a.sibling,a=$n(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function vf(e,t){return t=Mo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mo(e,t){return e=$t(22,e,null,t),e.lanes=0,e}function xf(e,t,a){return Ml(t,e.child,null,a),e=vf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bg(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Du(e.return,t,a)}function bf(e,t,a,r,o,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=r,g.tail=a,g.tailMode=o,g.treeForkCount=f)}function Sg(e,t,a){var r=t.pendingProps,o=r.revealOrder,f=r.tail;r=r.children;var g=lt.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,F(lt,g),wt(e,t,r,a),r=Oe?Mi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bg(e,a,t);else if(e.tag===19)bg(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&bo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),bf(t,!1,o,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&bo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}bf(t,!0,a,null,f,r);break;case"together":bf(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(xr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=$n(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$n(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Sf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fo(e)))}function PS(e,t,a){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),Ma(t,st,e.memoizedState.cache),Nl();break;case 27:case 5:Le(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Pu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ua(t),t.flags|=128,null):(a&t.child.childLanes)!==0?xg(e,t,a):(Ua(t),e=aa(e,t,a),e!==null?e.sibling:null);Ua(t);break;case 19:var o=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(xr(e,t,a,!1),r=(a&t.childLanes)!==0),o){if(r)return Sg(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),F(lt,lt.current),r)break;return null;case 22:return t.lanes=0,hg(e,t,a,t.pendingProps);case 24:Ma(t,st,e.memoizedState.cache)}return aa(e,t,a)}function wg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Sf(e,a)&&(t.flags&128)===0)return ct=!1,PS(e,t,a);ct=(e.flags&131072)!==0}else ct=!1,Oe&&(t.flags&1048576)!==0&&ep(t,Mi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Al(t.elementType),t.type=e,typeof e=="function")ju(e)?(r=zl(e,r),t.tag=1,t=yg(null,t,e,r,a)):(t.tag=0,t=mf(null,t,e,r,a));else{if(e!=null){var o=e.$$typeof;if(o===z){t.tag=11,t=ug(null,t,e,r,a);break e}else if(o===G){t.tag=14,t=fg(null,t,e,r,a);break e}}throw t=ce(e)||e,Error(s(306,t,""))}}return t;case 0:return mf(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,o=zl(r,t.pendingProps),yg(e,t,r,o,a);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var f=t.memoizedState;o=f.element,qu(e,t),qi(t,r,null,a);var g=t.memoizedState;if(r=g.cache,Ma(t,st,r),r!==f.cache&&zu(t,[st],a,!0),Bi(),r=g.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=vg(e,t,r,a);break e}else if(r!==o){o=fn(Error(s(424)),t),Di(o),t=vg(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=gn(e.firstChild),bt=t,Oe=!0,Aa=null,mn=!0,a=hp(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Nl(),r===o){t=aa(e,t,a);break e}wt(e,t,r,a)}t=t.child}return t;case 26:return Oo(e,t),e===null?(a=Dy(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,r=Fo(he.current).createElement(a),r[xt]=t,r[Ht]=e,Et(r,a,e),gt(r),t.stateNode=r):t.memoizedState=Dy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Le(t),e===null&&Oe&&(r=t.stateNode=Ay(t.type,t.pendingProps,he.current),bt=t,mn=!0,o=Fe,Pa(t.type)?(ed=o,Fe=gn(r.firstChild)):Fe=o),wt(e,t,t.pendingProps.children,a),Oo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((o=r=Fe)&&(r=S2(r,t.type,t.pendingProps,mn),r!==null?(t.stateNode=r,bt=t,Fe=gn(r.firstChild),mn=!1,o=!0):o=!1),o||Oa(t)),Le(t),o=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,r=f.children,Zf(o,f)?r=null:g!==null&&Zf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Ku(e,t,US,null,null,a),is._currentValue=o),Oo(e,t),wt(e,t,r,a),t.child;case 6:return e===null&&Oe&&((e=a=Fe)&&(a=w2(a,t.pendingProps,mn),a!==null?(t.stateNode=a,bt=t,Fe=null,e=!0):e=!1),e||Oa(t)),null;case 13:return xg(e,t,a);case 4:return Se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ml(t,null,r,a):wt(e,t,r,a),t.child;case 11:return ug(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Ma(t,t.type,r.value),wt(e,t,r.children,a),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Rl(t),o=St(o),r=r(o),t.flags|=1,wt(e,t,r,a),t.child;case 14:return fg(e,t,t.type,t.pendingProps,a);case 15:return dg(e,t,t.type,t.pendingProps,a);case 19:return Sg(e,t,a);case 31:return QS(e,t,a);case 22:return hg(e,t,a,t.pendingProps);case 24:return Rl(t),r=St(st),e===null?(o=ku(),o===null&&(o=Xe,f=Lu(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:r,cache:o},Bu(t),Ma(t,st,o)):((e.lanes&a)!==0&&(qu(e,t),qi(t,null,null,a),Bi()),o=e.memoizedState,f=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ma(t,st,r)):(r=f.cache,Ma(t,st,r),r!==o.cache&&zu(t,[st],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function la(e){e.flags|=4}function wf(e,t,a,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Zg())e.flags|=8192;else throw Ol=go,Hu}else e.flags&=-16777217}function Eg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hy(t))if(Zg())e.flags|=8192;else throw Ol=go,Hu}function Do(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nm():536870912,e.lanes|=t,Or|=t)}function Xi(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function XS(e,t,a){var r=t.pendingProps;switch(_u(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(st),Ne(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vr(t)?la(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ou())),Ze(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(la(t),f!==null?(Ze(t),Eg(t,f)):(Ze(t),wf(t,o,null,r,a))):f?f!==e.memoizedState?(la(t),Ze(t),Eg(t,f)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&la(t),Ze(t),wf(t,o,e,r,a)),null;case 27:if(De(t),a=he.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ze(t),null}e=I.current,vr(t)?np(t):(e=Ay(o,r,a),t.stateNode=e,la(t))}return Ze(t),null;case 5:if(De(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ze(t),null}if(f=I.current,vr(t))np(t);else{var g=Fo(he.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?g.createElement("select",{is:r.is}):g.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?g.createElement(o,{is:r.is}):g.createElement(o)}}f[xt]=t,f[Ht]=r;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(Et(f,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&la(t)}}return Ze(t),wf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(e=he.current,vr(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,o=bt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[xt]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||xy(e.nodeValue,a)),e||Oa(t,!0)}else e=Fo(e).createTextNode(r),e[xt]=t,t.stateNode=e}return Ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=vr(t),a!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[xt]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else a=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return Ze(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=vr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[xt]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==o&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Do(t,t.updateQueue),Ze(t),null);case 4:return Ne(),e===null&&Qf(t.stateNode.containerInfo),Ze(t),null;case 10:return ea(t.type),Ze(t),null;case 19:if(P(lt),r=t.memoizedState,r===null)return Ze(t),null;if(o=(t.flags&128)!==0,f=r.rendering,f===null)if(o)Xi(r,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=bo(e),f!==null){for(t.flags|=128,Xi(r,!1),e=f.updateQueue,t.updateQueue=e,Do(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)$m(a,e),a=a.sibling;return F(lt,lt.current&1|2),Oe&&Jn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Kt()>Ho&&(t.flags|=128,o=!0,Xi(r,!1),t.lanes=4194304)}else{if(!o)if(e=bo(f),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Do(t,e),Xi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Oe)return Ze(t),null}else 2*Kt()-r.renderingStartTime>Ho&&a!==536870912&&(t.flags|=128,o=!0,Xi(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Kt(),e.sibling=null,a=lt.current,F(lt,o?a&1|2:a&1),Oe&&Jn(t,r.treeForkCount),e):(Ze(t),null);case 22:case 23:return Wt(t),Qu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&Do(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&P(_l),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ea(st),Ze(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function KS(e,t){switch(_u(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(st),Ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(s(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(lt),null;case 4:return Ne(),null;case 10:return ea(t.type),null;case 22:case 23:return Wt(t),Qu(),e!==null&&P(_l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(st),null;case 25:return null;default:return null}}function Cg(e,t){switch(_u(t),t.tag){case 3:ea(st),Ne();break;case 26:case 27:case 5:De(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:P(lt);break;case 10:ea(t.type);break;case 22:case 23:Wt(t),Qu(),e!==null&&P(_l);break;case 24:ea(st)}}function Ki(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var o=r.next;a=o;do{if((a.tag&e)===e){r=void 0;var f=a.create,g=a.inst;r=f(),g.destroy=r}a=a.next}while(a!==o)}}catch(S){Ge(t,t.return,S)}}function Ha(e,t,a){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&e)===e){var g=r.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var R=a,B=S;try{B()}catch(Y){Ge(o,R,Y)}}}r=r.next}while(r!==f)}}catch(Y){Ge(t,t.return,Y)}}function jg(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pp(t,a)}catch(r){Ge(e,e.return,r)}}}function Ng(e,t,a){a.props=zl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){Ge(e,t,r)}}function Fi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(o){Ge(e,t,o)}}function Dn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function Tg(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function Ef(e,t,a){try{var r=e.stateNode;p2(r,e.type,a,t),r[Ht]=t}catch(o){Ge(e,e.return,o)}}function Rg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pa(e.type)||e.tag===4}function Cf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pa(e.type)||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 jf(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(r!==4&&(r===27&&Pa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jf(e,t,a),e=e.sibling;e!==null;)jf(e,t,a),e=e.sibling}function zo(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&Pa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(zo(e,t,a),e=e.sibling;e!==null;)zo(e,t,a),e=e.sibling}function _g(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Et(t,r,a),t[xt]=e,t[Ht]=a}catch(f){Ge(e,e.return,f)}}var ra=!1,ut=!1,Nf=!1,Ag=typeof WeakSet=="function"?WeakSet:Set,yt=null;function FS(e,t){if(e=e.containerInfo,Kf=tc,e=Gm(e),vu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,R=-1,B=0,Y=0,K=e,q=null;t:for(;;){for(var V;K!==a||o!==0&&K.nodeType!==3||(S=g+o),K!==f||r!==0&&K.nodeType!==3||(R=g+r),K.nodeType===3&&(g+=K.nodeValue.length),(V=K.firstChild)!==null;)q=K,K=V;for(;;){if(K===e)break t;if(q===a&&++B===o&&(S=g),q===f&&++Y===r&&(R=g),(V=K.nextSibling)!==null)break;K=q,q=K.parentNode}K=V}a=S===-1||R===-1?null:{start:S,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ff={focusedElem:e,selectionRange:a},tc=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var re=zl(a.type,o);e=r.getSnapshotBeforeUpdate(re,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(me){Ge(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)$f(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$f(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=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}}function Og(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:sa(e,a),r&4&&Ki(5,a);break;case 1:if(sa(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Ge(a,a.return,g)}else{var o=zl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ge(a,a.return,g)}}r&64&&jg(a),r&512&&Fi(a,a.return);break;case 3:if(sa(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pp(e,t)}catch(g){Ge(a,a.return,g)}}break;case 27:t===null&&r&4&&_g(a);case 26:case 5:sa(e,a),t===null&&r&4&&Tg(a),r&512&&Fi(a,a.return);break;case 12:sa(e,a);break;case 31:sa(e,a),r&4&&zg(e,a);break;case 13:sa(e,a),r&4&&Lg(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=a2.bind(null,a),E2(e,a))));break;case 22:if(r=a.memoizedState!==null||ra,!r){t=t!==null&&t.memoizedState!==null||ut,o=ra;var f=ut;ra=r,(ut=t)&&!f?oa(e,a,(a.subtreeFlags&8772)!==0):sa(e,a),ra=o,ut=f}break;case 30:break;default:sa(e,a)}}function Mg(e){var t=e.alternate;t!==null&&(e.alternate=null,Mg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var We=null,qt=!1;function ia(e,t,a){for(a=a.child;a!==null;)Dg(e,t,a),a=a.sibling}function Dg(e,t,a){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(vi,a)}catch{}switch(a.tag){case 26:ut||Dn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ut||Dn(a,t);var r=We,o=qt;Pa(a.type)&&(We=a.stateNode,qt=!1),ia(e,t,a),as(a.stateNode),We=r,qt=o;break;case 5:ut||Dn(a,t);case 6:if(r=We,o=qt,We=null,ia(e,t,a),We=r,qt=o,We!==null)if(qt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(a.stateNode)}catch(f){Ge(a,t,f)}else try{We.removeChild(a.stateNode)}catch(f){Ge(a,t,f)}break;case 18:We!==null&&(qt?(e=We,jy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Br(e)):jy(We,a.stateNode));break;case 4:r=We,o=qt,We=a.stateNode.containerInfo,qt=!0,ia(e,t,a),We=r,qt=o;break;case 0:case 11:case 14:case 15:Ha(2,a,t),ut||Ha(4,a,t),ia(e,t,a);break;case 1:ut||(Dn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Ng(a,t,r)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:ut=(r=ut)||a.memoizedState!==null,ia(e,t,a),ut=r;break;default:ia(e,t,a)}}function zg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Br(e)}catch(a){Ge(t,t.return,a)}}}function Lg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Br(e)}catch(a){Ge(t,t.return,a)}}function ZS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ag),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ag),t;default:throw Error(s(435,e.tag))}}function Lo(e,t){var a=ZS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var o=l2.bind(null,e,r);r.then(o,o)}})}function Vt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Pa(S.type)){We=S.stateNode,qt=!1;break e}break;case 5:We=S.stateNode,qt=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,qt=!0;break e}S=S.return}if(We===null)throw Error(s(160));Dg(f,g,o),We=null,qt=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ug(t,e),t=t.sibling}var En=null;function Ug(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Gt(e),r&4&&(Ha(3,e,e.return),Ki(3,e),Ha(5,e,e.return));break;case 1:Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),r&64&&ra&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var o=En;if(Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":f=o.getElementsByTagName("title")[0],(!f||f[Si]||f[xt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(r),o.head.insertBefore(f,o.querySelector("head > title"))),Et(f,r,a),f[xt]=e,gt(f),r=f;break e;case"link":var g=Uy("link","href",o).get(r+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(f=g[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(S,1);break t}}f=o.createElement(r),Et(f,r,a),o.head.appendChild(f);break;case"meta":if(g=Uy("meta","content",o).get(r+(a.content||""))){for(S=0;S<g.length;S++)if(f=g[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(S,1);break t}}f=o.createElement(r),Et(f,r,a),o.head.appendChild(f);break;default:throw Error(s(468,r))}f[xt]=e,gt(f),r=f}e.stateNode=r}else ky(o,e.type,e.stateNode);else e.stateNode=Ly(o,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?ky(o,e.type,e.stateNode):Ly(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Ef(e,e.memoizedProps,a.memoizedProps)}break;case 27:Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),a!==null&&r&4&&Ef(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),e.flags&32){o=e.stateNode;try{or(o,"")}catch(re){Ge(e,e.return,re)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,Ef(e,o,a!==null?a.memoizedProps:o)),r&1024&&(Nf=!0);break;case 6:if(Vt(t,e),Gt(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(re){Ge(e,e.return,re)}}break;case 3:if($o=null,o=En,En=Zo(t.containerInfo),Vt(t,e),En=o,Gt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Br(t.containerInfo)}catch(re){Ge(e,e.return,re)}Nf&&(Nf=!1,kg(e));break;case 4:r=En,En=Zo(e.stateNode.containerInfo),Vt(t,e),Gt(e),En=r;break;case 12:Vt(t,e),Gt(e);break;case 31:Vt(t,e),Gt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 13:Vt(t,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ko=Kt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 22:o=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,B=ra,Y=ut;if(ra=B||o,ut=Y||R,Vt(t,e),ut=Y,ra=B,Gt(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||R||ra||ut||Ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(f=R.stateNode,o)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=R.stateNode;var K=R.memoizedProps.style,q=K!=null&&K.hasOwnProperty("display")?K.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(re){Ge(R,R.return,re)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=o?"":R.memoizedProps}catch(re){Ge(R,R.return,re)}}}else if(t.tag===18){if(a===null){R=t;try{var V=R.stateNode;o?Ny(V,!0):Ny(R.stateNode,!1)}catch(re){Ge(R,R.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Lo(e,a))));break;case 19:Vt(t,e),Gt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 30:break;case 21:break;default:Vt(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Rg(r)){a=r;break}r=r.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,f=Cf(e);zo(e,f,o);break;case 5:var g=a.stateNode;a.flags&32&&(or(g,""),a.flags&=-33);var S=Cf(e);zo(e,S,g);break;case 3:case 4:var R=a.stateNode.containerInfo,B=Cf(e);jf(e,B,R);break;default:throw Error(s(161))}}catch(Y){Ge(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Og(e,t.alternate,t),t=t.sibling}function Ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ha(4,t,t.return),Ll(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ng(t,t.return,a),Ll(t);break;case 27:as(t.stateNode);case 26:case 5:Dn(t,t.return),Ll(t);break;case 22:t.memoizedState===null&&Ll(t);break;case 30:Ll(t);break;default:Ll(t)}e=e.sibling}}function oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:oa(o,f,a),Ki(4,f);break;case 1:if(oa(o,f,a),r=f,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(B){Ge(r,r.return,B)}if(r=f,o=r.updateQueue,o!==null){var S=r.stateNode;try{var R=o.shared.hiddenCallbacks;if(R!==null)for(o.shared.hiddenCallbacks=null,o=0;o<R.length;o++)mp(R[o],S)}catch(B){Ge(r,r.return,B)}}a&&g&64&&jg(f),Fi(f,f.return);break;case 27:_g(f);case 26:case 5:oa(o,f,a),a&&r===null&&g&4&&Tg(f),Fi(f,f.return);break;case 12:oa(o,f,a);break;case 31:oa(o,f,a),a&&g&4&&zg(o,f);break;case 13:oa(o,f,a),a&&g&4&&Lg(o,f);break;case 22:f.memoizedState===null&&oa(o,f,a),Fi(f,f.return);break;case 30:break;default:oa(o,f,a)}t=t.sibling}}function Tf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&zi(a))}function Rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e))}function Cn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hg(e,t,a,r),t=t.sibling}function Hg(e,t,a,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,a,r),o&2048&&Ki(9,t);break;case 1:Cn(e,t,a,r);break;case 3:Cn(e,t,a,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e)));break;case 12:if(o&2048){Cn(e,t,a,r),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,S=f.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Ge(t,t.return,R)}}else Cn(e,t,a,r);break;case 31:Cn(e,t,a,r);break;case 13:Cn(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Cn(e,t,a,r):Zi(e,t):f._visibility&2?Cn(e,t,a,r):(f._visibility|=2,Rr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Tf(g,t);break;case 24:Cn(e,t,a,r),o&2048&&Rf(t.alternate,t);break;default:Cn(e,t,a,r)}}function Rr(e,t,a,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,S=a,R=r,B=g.flags;switch(g.tag){case 0:case 11:case 15:Rr(f,g,S,R,o),Ki(8,g);break;case 23:break;case 22:var Y=g.stateNode;g.memoizedState!==null?Y._visibility&2?Rr(f,g,S,R,o):Zi(f,g):(Y._visibility|=2,Rr(f,g,S,R,o)),o&&B&2048&&Tf(g.alternate,g);break;case 24:Rr(f,g,S,R,o),o&&B&2048&&Rf(g.alternate,g);break;default:Rr(f,g,S,R,o)}t=t.sibling}}function Zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,o=r.flags;switch(r.tag){case 22:Zi(a,r),o&2048&&Tf(r.alternate,r);break;case 24:Zi(a,r),o&2048&&Rf(r.alternate,r);break;default:Zi(a,r)}t=t.sibling}}var Ii=8192;function _r(e,t,a){if(e.subtreeFlags&Ii)for(e=e.child;e!==null;)Bg(e,t,a),e=e.sibling}function Bg(e,t,a){switch(e.tag){case 26:_r(e,t,a),e.flags&Ii&&e.memoizedState!==null&&L2(a,En,e.memoizedState,e.memoizedProps);break;case 5:_r(e,t,a);break;case 3:case 4:var r=En;En=Zo(e.stateNode.containerInfo),_r(e,t,a),En=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ii,Ii=16777216,_r(e,t,a),Ii=r):_r(e,t,a));break;default:_r(e,t,a)}}function qg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function $i(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];yt=r,Gg(r,e)}qg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vg(e),e=e.sibling}function Vg(e){switch(e.tag){case 0:case 11:case 15:$i(e),e.flags&2048&&Ha(9,e,e.return);break;case 3:$i(e);break;case 12:$i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uo(e)):$i(e);break;default:$i(e)}}function Uo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];yt=r,Gg(r,e)}qg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ha(8,t,t.return),Uo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Uo(t));break;default:Uo(t)}e=e.sibling}}function Gg(e,t){for(;yt!==null;){var a=yt;switch(a.tag){case 0:case 11:case 15:Ha(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:zi(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,yt=r;else e:for(a=e;yt!==null;){r=yt;var o=r.sibling,f=r.return;if(Mg(r),r===a){yt=null;break e}if(o!==null){o.return=f,yt=o;break e}yt=f}}}var IS={getCacheForType:function(e){var t=St(st),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return St(st).controller.signal}},$S=typeof WeakMap=="function"?WeakMap:Map,Be=0,Xe=null,Te=null,_e=0,Ve=0,en=null,Ba=!1,Ar=!1,_f=!1,ca=0,nt=0,qa=0,Ul=0,Af=0,tn=0,Or=0,Ji=null,Yt=null,Of=!1,ko=0,Yg=0,Ho=1/0,Bo=null,Va=null,ht=0,Ga=null,Mr=null,ua=0,Mf=0,Df=null,Qg=null,Wi=0,zf=null;function nn(){return(Be&2)!==0&&_e!==0?_e&-_e:U.T!==null?qf():im()}function Pg(){if(tn===0)if((_e&536870912)===0||Oe){var e=Xs;Xs<<=1,(Xs&3932160)===0&&(Xs=262144),tn=e}else tn=536870912;return e=Jt.current,e!==null&&(e.flags|=32),tn}function Qt(e,t,a){(e===Xe&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Dr(e,0),Ya(e,_e,tn,!1)),bi(e,a),((Be&2)===0||e!==Xe)&&(e===Xe&&((Be&2)===0&&(Ul|=a),nt===4&&Ya(e,_e,tn,!1)),zn(e))}function Xg(e,t,a){if((Be&6)!==0)throw Error(s(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||xi(e,t),o=r?e2(e,t):Uf(e,t,!0),f=r;do{if(o===0){Ar&&!r&&Ya(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!JS(a)){o=Uf(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=Ji;var R=S.current.memoizedState.isDehydrated;if(R&&(Dr(S,g).flags|=256),g=Uf(S,g,!1),g!==2){if(_f&&!R){S.errorRecoveryDisabledLanes|=f,Ul|=f,o=4;break e}f=Yt,Yt=o,f!==null&&(Yt===null?Yt=f:Yt.push.apply(Yt,f))}o=g}if(f=!1,o!==2)continue}}if(o===1){Dr(e,0),Ya(e,t,0,!0);break}e:{switch(r=e,f=o,f){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ya(r,t,tn,!Ba);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=ko+300-Kt(),10<o)){if(Ya(r,t,tn,!Ba),Fs(r,0,!0)!==0)break e;ua=t,r.timeoutHandle=Ey(Kg.bind(null,r,a,Yt,Bo,Of,t,tn,Ul,Or,Ba,f,"Throttled",-0,0),o);break e}Kg(r,a,Yt,Bo,Of,t,tn,Ul,Or,Ba,f,null,-0,0)}}break}while(!0);zn(e)}function Kg(e,t,a,r,o,f,g,S,R,B,Y,K,q,V){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Bg(t,f,K);var re=(f&62914560)===f?ko-Kt():(f&4194048)===f?Yg-Kt():0;if(re=U2(K,re),re!==null){ua=f,e.cancelPendingCommit=re(ty.bind(null,e,t,f,a,r,o,g,S,R,Y,K,null,q,V)),Ya(e,f,g,!B);return}}ty(e,t,f,a,r,o,g,S,R)}function JS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var o=a[r],f=o.getSnapshot;o=o.value;try{if(!It(f(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ya(e,t,a,r){t&=~Af,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var f=31-Zt(o),g=1<<f;r[f]=-1,o&=~g}a!==0&&am(e,a,t)}function qo(){return(Be&6)===0?(es(0),!1):!0}function Lf(){if(Te!==null){if(Ve===0)var e=Te.return;else e=Te,Wn=Tl=null,Iu(e),Er=null,Ui=0,e=Te;for(;e!==null;)Cg(e.alternate,e),e=e.return;Te=null}}function Dr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,v2(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ua=0,Lf(),Xe=e,Te=a=$n(e.current,null),_e=t,Ve=0,en=null,Ba=!1,Ar=xi(e,t),_f=!1,Or=tn=Af=Ul=qa=nt=0,Yt=Ji=null,Of=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-Zt(r),f=1<<o;t|=e[o],r&=~f}return ca=t,io(),a}function Fg(e,t){be=null,U.H=Qi,t===wr||t===po?(t=up(),Ve=3):t===Hu?(t=up(),Ve=4):Ve=t===hf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,en=t,Te===null&&(nt=1,_o(e,fn(t,e.current)))}function Zg(){var e=Jt.current;return e===null?!0:(_e&4194048)===_e?pn===null:(_e&62914560)===_e||(_e&536870912)!==0?e===pn:!1}function Ig(){var e=U.H;return U.H=Qi,e===null?Qi:e}function $g(){var e=U.A;return U.A=IS,e}function Vo(){nt=4,Ba||(_e&4194048)!==_e&&Jt.current!==null||(Ar=!0),(qa&134217727)===0&&(Ul&134217727)===0||Xe===null||Ya(Xe,_e,tn,!1)}function Uf(e,t,a){var r=Be;Be|=2;var o=Ig(),f=$g();(Xe!==e||_e!==t)&&(Bo=null,Dr(e,t)),t=!1;var g=nt;e:do try{if(Ve!==0&&Te!==null){var S=Te,R=en;switch(Ve){case 8:Lf(),g=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var B=Ve;if(Ve=0,en=null,zr(e,S,R,B),a&&Ar){g=0;break e}break;default:B=Ve,Ve=0,en=null,zr(e,S,R,B)}}WS(),g=nt;break}catch(Y){Fg(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Wn=Tl=null,Be=r,U.H=o,U.A=f,Te===null&&(Xe=null,_e=0,io()),g}function WS(){for(;Te!==null;)Jg(Te)}function e2(e,t){var a=Be;Be|=2;var r=Ig(),o=$g();Xe!==e||_e!==t?(Bo=null,Ho=Kt()+500,Dr(e,t)):Ar=xi(e,t);e:do try{if(Ve!==0&&Te!==null){t=Te;var f=en;t:switch(Ve){case 1:Ve=0,en=null,zr(e,t,f,1);break;case 2:case 9:if(op(f)){Ve=0,en=null,Wg(t);break}t=function(){Ve!==2&&Ve!==9||Xe!==e||(Ve=7),zn(e)},f.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:op(f)?(Ve=0,en=null,Wg(t)):(Ve=0,en=null,zr(e,t,f,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?Hy(g):S.stateNode.complete){Ve=0,en=null;var R=S.sibling;if(R!==null)Te=R;else{var B=S.return;B!==null?(Te=B,Go(B)):Te=null}break t}}Ve=0,en=null,zr(e,t,f,5);break;case 6:Ve=0,en=null,zr(e,t,f,6);break;case 8:Lf(),nt=6;break e;default:throw Error(s(462))}}t2();break}catch(Y){Fg(e,Y)}while(!0);return Wn=Tl=null,U.H=r,U.A=o,Be=a,Te!==null?0:(Xe=null,_e=0,io(),nt)}function t2(){for(;Te!==null&&!C1();)Jg(Te)}function Jg(e){var t=wg(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?Go(e):Te=t}function Wg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=gg(a,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=gg(a,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Iu(t);default:Cg(a,t),t=Te=$m(t,ca),t=wg(a,t,ca)}e.memoizedProps=e.pendingProps,t===null?Go(e):Te=t}function zr(e,t,a,r){Wn=Tl=null,Iu(t),Er=null,Ui=0;var o=t.return;try{if(YS(e,o,t,a,_e)){nt=1,_o(e,fn(a,e.current)),Te=null;return}}catch(f){if(o!==null)throw Te=o,f;nt=1,_o(e,fn(a,e.current)),Te=null;return}t.flags&32768?(Oe||r===1?e=!0:Ar||(_e&536870912)!==0?e=!1:(Ba=e=!0,(r===2||r===9||r===3||r===6)&&(r=Jt.current,r!==null&&r.tag===13&&(r.flags|=16384))),ey(t,e)):Go(t)}function Go(e){var t=e;do{if((t.flags&32768)!==0){ey(t,Ba);return}e=t.return;var a=XS(t.alternate,t,ca);if(a!==null){Te=a;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);nt===0&&(nt=5)}function ey(e,t){do{var a=KS(e.alternate,e);if(a!==null){a.flags&=32767,Te=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=a}while(e!==null);nt=6,Te=null}function ty(e,t,a,r,o,f,g,S,R){e.cancelPendingCommit=null;do Yo();while(ht!==0);if((Be&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(f=t.lanes|t.childLanes,f|=Eu,z1(e,a,f,g,S,R),e===Xe&&(Te=Xe=null,_e=0),Mr=t,Ga=e,ua=a,Mf=f,Df=o,Qg=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,r2(Qs,function(){return iy(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,o=Z.p,Z.p=2,g=Be,Be|=4;try{FS(e,t,a)}finally{Be=g,Z.p=o,U.T=r}}ht=1,ny(),ay(),ly()}}function ny(){if(ht===1){ht=0;var e=Ga,t=Mr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var r=Z.p;Z.p=2;var o=Be;Be|=4;try{Ug(t,e);var f=Ff,g=Gm(e.containerInfo),S=f.focusedElem,R=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&Vm(S.ownerDocument.documentElement,S)){if(R!==null&&vu(S)){var B=R.start,Y=R.end;if(Y===void 0&&(Y=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Y,S.value.length);else{var K=S.ownerDocument||document,q=K&&K.defaultView||window;if(q.getSelection){var V=q.getSelection(),re=S.textContent.length,me=Math.min(R.start,re),Pe=R.end===void 0?me:Math.min(R.end,re);!V.extend&&me>Pe&&(g=Pe,Pe=me,me=g);var L=qm(S,me),M=qm(S,Pe);if(L&&M&&(V.rangeCount!==1||V.anchorNode!==L.node||V.anchorOffset!==L.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var H=K.createRange();H.setStart(L.node,L.offset),V.removeAllRanges(),me>Pe?(V.addRange(H),V.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),V.addRange(H))}}}}for(K=[],V=S;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var X=K[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}tc=!!Kf,Ff=Kf=null}finally{Be=o,Z.p=r,U.T=a}}e.current=t,ht=2}}function ay(){if(ht===2){ht=0;var e=Ga,t=Mr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var r=Z.p;Z.p=2;var o=Be;Be|=4;try{Og(e,t.alternate,t)}finally{Be=o,Z.p=r,U.T=a}}ht=3}}function ly(){if(ht===4||ht===3){ht=0,j1();var e=Ga,t=Mr,a=ua,r=Qg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Mr=Ga=null,ry(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Va=null),Wc(a),t=t.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(vi,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=U.T,o=Z.p,Z.p=2,U.T=null;try{for(var f=e.onRecoverableError,g=0;g<r.length;g++){var S=r[g];f(S.value,{componentStack:S.stack})}}finally{U.T=t,Z.p=o}}(ua&3)!==0&&Yo(),zn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===zf?Wi++:(Wi=0,zf=e):Wi=0,es(0)}}function ry(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zi(t)))}function Yo(){return ny(),ay(),ly(),iy()}function iy(){if(ht!==5)return!1;var e=Ga,t=Mf;Mf=0;var a=Wc(ua),r=U.T,o=Z.p;try{Z.p=32>a?32:a,U.T=null,a=Df,Df=null;var f=Ga,g=ua;if(ht=0,Mr=Ga=null,ua=0,(Be&6)!==0)throw Error(s(331));var S=Be;if(Be|=4,Vg(f.current),Hg(f,f.current,g,a),Be=S,es(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(vi,f)}catch{}return!0}finally{Z.p=o,U.T=r,ry(e,t)}}function sy(e,t,a){t=fn(a,t),t=df(e.stateNode,t,2),e=La(e,t,2),e!==null&&(bi(e,2),zn(e))}function Ge(e,t,a){if(e.tag===3)sy(e,e,a);else for(;t!==null;){if(t.tag===3){sy(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Va===null||!Va.has(r))){e=fn(a,e),a=og(2),r=La(t,a,2),r!==null&&(cg(a,r,t,e),bi(r,2),zn(r));break}}t=t.return}}function kf(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new $S;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(_f=!0,o.add(a),e=n2.bind(null,e,t,a),t.then(e,e))}function n2(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(_e&a)===a&&(nt===4||nt===3&&(_e&62914560)===_e&&300>Kt()-ko?(Be&2)===0&&Dr(e,0):Af|=a,Or===_e&&(Or=0)),zn(e)}function oy(e,t){t===0&&(t=nm()),e=Cl(e,t),e!==null&&(bi(e,t),zn(e))}function a2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),oy(e,a)}function l2(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),oy(e,a)}function r2(e,t){return Zc(e,t)}var Qo=null,Lr=null,Hf=!1,Po=!1,Bf=!1,Qa=0;function zn(e){e!==Lr&&e.next===null&&(Lr===null?Qo=Lr=e:Lr=Lr.next=e),Po=!0,Hf||(Hf=!0,s2())}function es(e,t){if(!Bf&&Po){Bf=!0;do for(var a=!1,r=Qo;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var f=0;else{var g=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-Zt(42|e)+1)-1,f&=o&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,dy(r,f))}else f=_e,f=Fs(r,r===Xe?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||xi(r,f)||(a=!0,dy(r,f));r=r.next}while(a);Bf=!1}}function i2(){cy()}function cy(){Po=Hf=!1;var e=0;Qa!==0&&y2()&&(e=Qa);for(var t=Kt(),a=null,r=Qo;r!==null;){var o=r.next,f=uy(r,t);f===0?(r.next=null,a===null?Qo=o:a.next=o,o===null&&(Lr=a)):(a=r,(e!==0||(f&3)!==0)&&(Po=!0)),r=o}ht!==0&&ht!==5||es(e),Qa!==0&&(Qa=0)}function uy(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-Zt(f),S=1<<g,R=o[g];R===-1?((S&a)===0||(S&r)!==0)&&(o[g]=D1(S,t)):R<=t&&(e.expiredLanes|=S),f&=~S}if(t=Xe,a=_e,a=Fs(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ic(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||xi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Ic(r),Wc(a)){case 2:case 8:a=em;break;case 32:a=Qs;break;case 268435456:a=tm;break;default:a=Qs}return r=fy.bind(null,e),a=Zc(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Ic(r),e.callbackPriority=2,e.callbackNode=null,2}function fy(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Yo()&&e.callbackNode!==a)return null;var r=_e;return r=Fs(e,e===Xe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Xg(e,r,t),uy(e,Kt()),e.callbackNode!=null&&e.callbackNode===a?fy.bind(null,e):null)}function dy(e,t){if(Yo())return null;Xg(e,t,!0)}function s2(){x2(function(){(Be&6)!==0?Zc(Wh,i2):cy()})}function qf(){if(Qa===0){var e=br;e===0&&(e=Ps,Ps<<=1,(Ps&261888)===0&&(Ps=256)),Qa=e}return Qa}function hy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Js(""+e)}function my(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function o2(e,t,a,r,o){if(t==="submit"&&a&&a.stateNode===o){var f=hy((o[Ht]||null).action),g=r.submitter;g&&(t=(t=g[Ht]||null)?hy(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new no("action","action",null,r,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Qa!==0){var R=g?my(o,g):new FormData(o);rf(a,{pending:!0,data:R,method:o.method,action:f},null,R)}}else typeof f=="function"&&(S.preventDefault(),R=g?my(o,g):new FormData(o),rf(a,{pending:!0,data:R,method:o.method,action:f},f,R))},currentTarget:o}]})}}for(var Vf=0;Vf<wu.length;Vf++){var Gf=wu[Vf],c2=Gf.toLowerCase(),u2=Gf[0].toUpperCase()+Gf.slice(1);wn(c2,"on"+u2)}wn(Pm,"onAnimationEnd"),wn(Xm,"onAnimationIteration"),wn(Km,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(NS,"onTransitionRun"),wn(TS,"onTransitionStart"),wn(RS,"onTransitionCancel"),wn(Fm,"onTransitionEnd"),ir("onMouseEnter",["mouseout","mouseover"]),ir("onMouseLeave",["mouseout","mouseover"]),ir("onPointerEnter",["pointerout","pointerover"]),ir("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),f2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function py(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var g=r.length-1;0<=g;g--){var S=r[g],R=S.instance,B=S.currentTarget;if(S=S.listener,R!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=B;try{f(o)}catch(Y){ro(Y)}o.currentTarget=null,f=R}else for(g=0;g<r.length;g++){if(S=r[g],R=S.instance,B=S.currentTarget,S=S.listener,R!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=B;try{f(o)}catch(Y){ro(Y)}o.currentTarget=null,f=R}}}}function Re(e,t){var a=t[eu];a===void 0&&(a=t[eu]=new Set);var r=e+"__bubble";a.has(r)||(gy(t,e,2,!1),a.add(r))}function Yf(e,t,a){var r=0;t&&(r|=4),gy(a,e,r,t)}var Xo="_reactListening"+Math.random().toString(36).slice(2);function Qf(e){if(!e[Xo]){e[Xo]=!0,cm.forEach(function(a){a!=="selectionchange"&&(f2.has(a)||Yf(a,!1,e),Yf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xo]||(t[Xo]=!0,Yf("selectionchange",!1,t))}}function gy(e,t,a,r){switch(Py(t)){case 2:var o=B2;break;case 8:o=q2;break;default:o=rd}a=o.bind(null,t,a,e),o=void 0,!cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Pf(e,t,a,r,o){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var g=r.tag;if(g===3||g===4){var S=r.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=r.return;g!==null;){var R=g.tag;if((R===3||R===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=ar(S),g===null)return;if(R=g.tag,R===5||R===6||R===26||R===27){r=f=g;continue e}S=S.parentNode}}r=r.return}Sm(function(){var B=f,Y=su(a),K=[];e:{var q=Zm.get(e);if(q!==void 0){var V=no,re=e;switch(e){case"keypress":if(eo(a)===0)break e;case"keydown":case"keyup":V=lS;break;case"focusin":re="focus",V=hu;break;case"focusout":re="blur",V=hu;break;case"beforeblur":case"afterblur":V=hu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Cm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=sS;break;case Pm:case Xm:case Km:V=Z1;break;case Fm:V=cS;break;case"scroll":case"scrollend":V=Q1;break;case"wheel":V=fS;break;case"copy":case"cut":case"paste":V=$1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Nm;break;case"toggle":case"beforetoggle":V=hS}var me=(t&4)!==0,Pe=!me&&(e==="scroll"||e==="scrollend"),L=me?q!==null?q+"Capture":null:q;me=[];for(var M=B,H;M!==null;){var X=M;if(H=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||H===null||L===null||(X=Ei(M,L),X!=null&&me.push(ns(M,X,H))),Pe)break;M=M.return}0<me.length&&(q=new V(q,re,null,a,Y),K.push({event:q,listeners:me}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",q&&a!==iu&&(re=a.relatedTarget||a.fromElement)&&(ar(re)||re[nr]))break e;if((V||q)&&(q=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,V?(re=a.relatedTarget||a.toElement,V=B,re=re?ar(re):null,re!==null&&(Pe=d(re),me=re.tag,re!==Pe||me!==5&&me!==27&&me!==6)&&(re=null)):(V=null,re=B),V!==re)){if(me=Cm,X="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(me=Nm,X="onPointerLeave",L="onPointerEnter",M="pointer"),Pe=V==null?q:wi(V),H=re==null?q:wi(re),q=new me(X,M+"leave",V,a,Y),q.target=Pe,q.relatedTarget=H,X=null,ar(Y)===B&&(me=new me(L,M+"enter",re,a,Y),me.target=H,me.relatedTarget=Pe,X=me),Pe=X,V&&re)t:{for(me=d2,L=V,M=re,H=0,X=L;X;X=me(X))H++;X=0;for(var fe=M;fe;fe=me(fe))X++;for(;0<H-X;)L=me(L),H--;for(;0<X-H;)M=me(M),X--;for(;H--;){if(L===M||M!==null&&L===M.alternate){me=L;break t}L=me(L),M=me(M)}me=null}else me=null;V!==null&&yy(K,q,V,me,!1),re!==null&&Pe!==null&&yy(K,Pe,re,me,!0)}}e:{if(q=B?wi(B):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var ke=zm;else if(Mm(q))if(Lm)ke=ES;else{ke=SS;var se=bS}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?B&&ru(B.elementType)&&(ke=zm):ke=wS;if(ke&&(ke=ke(e,B))){Dm(K,ke,a,Y);break e}se&&se(e,q,B),e==="focusout"&&B&&q.type==="number"&&B.memoizedProps.value!=null&&lu(q,"number",q.value)}switch(se=B?wi(B):window,e){case"focusin":(Mm(se)||se.contentEditable==="true")&&(dr=se,xu=B,Oi=null);break;case"focusout":Oi=xu=dr=null;break;case"mousedown":bu=!0;break;case"contextmenu":case"mouseup":case"dragend":bu=!1,Ym(K,a,Y);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":Ym(K,a,Y)}var we;if(pu)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else fr?Am(e,a)&&(Ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ae="onCompositionStart");Ae&&(Tm&&a.locale!=="ko"&&(fr||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&fr&&(we=wm()):(Ra=Y,uu="value"in Ra?Ra.value:Ra.textContent,fr=!0)),se=Ko(B,Ae),0<se.length&&(Ae=new jm(Ae,e,null,a,Y),K.push({event:Ae,listeners:se}),we?Ae.data=we:(we=Om(a),we!==null&&(Ae.data=we)))),(we=pS?gS(e,a):yS(e,a))&&(Ae=Ko(B,"onBeforeInput"),0<Ae.length&&(se=new jm("onBeforeInput","beforeinput",null,a,Y),K.push({event:se,listeners:Ae}),se.data=we)),o2(K,e,B,a,Y)}py(K,t)})}function ns(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ko(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=Ei(e,a),o!=null&&r.unshift(ns(e,o,f)),o=Ei(e,t),o!=null&&r.push(ns(e,o,f))),e.tag===3)return r;e=e.return}return[]}function d2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yy(e,t,a,r,o){for(var f=t._reactName,g=[];a!==null&&a!==r;){var S=a,R=S.alternate,B=S.stateNode;if(S=S.tag,R!==null&&R===r)break;S!==5&&S!==26&&S!==27||B===null||(R=B,o?(B=Ei(a,f),B!=null&&g.unshift(ns(a,B,R))):o||(B=Ei(a,f),B!=null&&g.push(ns(a,B,R)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var h2=/\r\n?/g,m2=/\u0000|\uFFFD/g;function vy(e){return(typeof e=="string"?e:""+e).replace(h2,`
49
- `).replace(m2,"")}function xy(e,t){return t=vy(t),vy(e)===t}function Qe(e,t,a,r,o,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||or(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&or(e,""+r);break;case"className":Is(e,"class",r);break;case"tabIndex":Is(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Is(e,a,r);break;case"style":xm(e,r,f);break;case"data":if(t!=="object"){Is(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Js(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(t!=="input"&&Qe(e,t,"name",o.name,o,null),Qe(e,t,"formEncType",o.formEncType,o,null),Qe(e,t,"formMethod",o.formMethod,o,null),Qe(e,t,"formTarget",o.formTarget,o,null)):(Qe(e,t,"encType",o.encType,o,null),Qe(e,t,"method",o.method,o,null),Qe(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Js(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"onScroll":r!=null&&Re("scroll",e);break;case"onScrollEnd":r!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=Js(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Zs(e,"popover",r);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Zs(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=G1.get(a)||a,Zs(e,a,r))}}function Xf(e,t,a,r,o,f){switch(a){case"style":xm(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof r=="string"?or(e,r):(typeof r=="number"||typeof r=="bigint")&&or(e,""+r);break;case"onScroll":r!=null&&Re("scroll",e);break;case"onScrollEnd":r!=null&&Re("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!um.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[Ht]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,o);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):Zs(e,a,r)}}}function Et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var r=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,f,g,a,null)}}o&&Qe(e,t,"srcSet",a.srcSet,a,null),r&&Qe(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var S=f=g=o=null,R=null,B=null;for(r in a)if(a.hasOwnProperty(r)){var Y=a[r];if(Y!=null)switch(r){case"name":o=Y;break;case"type":g=Y;break;case"checked":R=Y;break;case"defaultChecked":B=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:Qe(e,t,r,Y,a,null)}}pm(e,f,S,R,B,g,o,!1);return;case"select":Re("invalid",e),r=g=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":g=S;break;case"multiple":r=S;default:Qe(e,t,o,S,a,null)}t=f,a=g,e.multiple=!!r,t!=null?sr(e,!!r,t,!1):a!=null&&sr(e,!!r,a,!0);return;case"textarea":Re("invalid",e),f=o=r=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":r=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:Qe(e,t,g,S,a,null)}ym(e,r,o,f);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(r=a[R],r!=null))switch(R){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(e,t,R,r,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(r=0;r<ts.length;r++)Re(ts[r],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(B in a)if(a.hasOwnProperty(B)&&(r=a[B],r!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,B,r,a,null)}return;default:if(ru(t)){for(Y in a)a.hasOwnProperty(Y)&&(r=a[Y],r!==void 0&&Xf(e,t,Y,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&Qe(e,t,S,r,a,null))}function p2(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,g=null,S=null,R=null,B=null,Y=null;for(V in a){var K=a[V];if(a.hasOwnProperty(V)&&K!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":R=K;default:r.hasOwnProperty(V)||Qe(e,t,V,null,r,K)}}for(var q in r){var V=r[q];if(K=a[q],r.hasOwnProperty(q)&&(V!=null||K!=null))switch(q){case"type":f=V;break;case"name":o=V;break;case"checked":B=V;break;case"defaultChecked":Y=V;break;case"value":g=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:V!==K&&Qe(e,t,q,V,r,K)}}au(e,g,S,R,B,Y,f,o);return;case"select":V=g=S=q=null;for(f in a)if(R=a[f],a.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":V=R;default:r.hasOwnProperty(f)||Qe(e,t,f,null,r,R)}for(o in r)if(f=r[o],R=a[o],r.hasOwnProperty(o)&&(f!=null||R!=null))switch(o){case"value":q=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==R&&Qe(e,t,o,f,r,R)}t=S,a=g,r=V,q!=null?sr(e,!!a,q,!1):!!r!=!!a&&(t!=null?sr(e,!!a,t,!0):sr(e,!!a,a?[]:"",!1));return;case"textarea":V=q=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Qe(e,t,S,null,r,o)}for(g in r)if(o=r[g],f=a[g],r.hasOwnProperty(g)&&(o!=null||f!=null))switch(g){case"value":q=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==f&&Qe(e,t,g,o,r,f)}gm(e,q,V);return;case"option":for(var re in a)if(q=a[re],a.hasOwnProperty(re)&&q!=null&&!r.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:Qe(e,t,re,null,r,q)}for(R in r)if(q=r[R],V=a[R],r.hasOwnProperty(R)&&q!==V&&(q!=null||V!=null))switch(R){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:Qe(e,t,R,q,r,V)}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 me in a)q=a[me],a.hasOwnProperty(me)&&q!=null&&!r.hasOwnProperty(me)&&Qe(e,t,me,null,r,q);for(B in r)if(q=r[B],V=a[B],r.hasOwnProperty(B)&&q!==V&&(q!=null||V!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:Qe(e,t,B,q,r,V)}return;default:if(ru(t)){for(var Pe in a)q=a[Pe],a.hasOwnProperty(Pe)&&q!==void 0&&!r.hasOwnProperty(Pe)&&Xf(e,t,Pe,void 0,r,q);for(Y in r)q=r[Y],V=a[Y],!r.hasOwnProperty(Y)||q===V||q===void 0&&V===void 0||Xf(e,t,Y,q,r,V);return}}for(var L in a)q=a[L],a.hasOwnProperty(L)&&q!=null&&!r.hasOwnProperty(L)&&Qe(e,t,L,null,r,q);for(K in r)q=r[K],V=a[K],!r.hasOwnProperty(K)||q===V||q==null&&V==null||Qe(e,t,K,q,r,V)}function by(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var o=a[r],f=o.transferSize,g=o.initiatorType,S=o.duration;if(f&&S&&by(g)){for(g=0,S=o.responseEnd,r+=1;r<a.length;r++){var R=a[r],B=R.startTime;if(B>S)break;var Y=R.transferSize,K=R.initiatorType;Y&&by(K)&&(R=R.responseEnd,g+=Y*(R<S?1:(S-B)/(R-B)))}if(--r,t+=8*(f+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Kf=null,Ff=null;function Fo(e){return e.nodeType===9?e:e.ownerDocument}function Sy(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 wy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var If=null;function y2(){var e=window.event;return e&&e.type==="popstate"?e===If?!1:(If=e,!0):(If=null,!1)}var Ey=typeof setTimeout=="function"?setTimeout:void 0,v2=typeof clearTimeout=="function"?clearTimeout:void 0,Cy=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof Cy<"u"?function(e){return Cy.resolve(null).then(e).catch(b2)}:Ey;function b2(e){setTimeout(function(){throw e})}function Pa(e){return e==="head"}function jy(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(o),Br(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")as(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,as(a);for(var f=a.firstChild;f;){var g=f.nextSibling,S=f.nodeName;f[Si]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&as(e.ownerDocument.body);a=o}while(a);Br(t)}function Ny(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function $f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":$f(a),tu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function S2(e,t,a,r){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Si])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function w2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=gn(e.nextSibling),e===null))return null;return e}function Ty(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gn(e.nextSibling),e===null))return null;return e}function Jf(e){return e.data==="$?"||e.data==="$~"}function Wf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function E2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ed=null;function Ry(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return gn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function _y(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Ay(e,t,a){switch(t=Fo(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function as(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tu(e)}var yn=new Map,Oy=new Set;function Zo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=Z.d;Z.d={f:C2,r:j2,D:N2,C:T2,L:R2,m:_2,X:O2,S:A2,M:M2};function C2(){var e=fa.f(),t=qo();return e||t}function j2(e){var t=lr(e);t!==null&&t.tag===5&&t.type==="form"?Fp(t):fa.r(e)}var Ur=typeof document>"u"?null:document;function My(e,t,a){var r=Ur;if(r&&typeof t=="string"&&t){var o=cn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Oy.has(o)||(Oy.add(o),e={rel:e,crossOrigin:a,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),Et(t,"link",e),gt(t),r.head.appendChild(t)))}}function N2(e){fa.D(e),My("dns-prefetch",e,null)}function T2(e,t){fa.C(e,t),My("preconnect",e,t)}function R2(e,t,a){fa.L(e,t,a);var r=Ur;if(r&&e&&t){var o='link[rel="preload"][as="'+cn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+cn(a.imageSizes)+'"]')):o+='[href="'+cn(e)+'"]';var f=o;switch(t){case"style":f=kr(e);break;case"script":f=Hr(e)}yn.has(f)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),yn.set(f,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(ls(f))||t==="script"&&r.querySelector(rs(f))||(t=r.createElement("link"),Et(t,"link",e),gt(t),r.head.appendChild(t)))}}function _2(e,t){fa.m(e,t);var a=Ur;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+cn(r)+'"][href="'+cn(e)+'"]',f=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Hr(e)}if(!yn.has(f)&&(e=x({rel:"modulepreload",href:e},t),yn.set(f,e),a.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(rs(f)))return}r=a.createElement("link"),Et(r,"link",e),gt(r),a.head.appendChild(r)}}}function A2(e,t,a){fa.S(e,t,a);var r=Ur;if(r&&e){var o=rr(r).hoistableStyles,f=kr(e);t=t||"default";var g=o.get(f);if(!g){var S={loading:0,preload:null};if(g=r.querySelector(ls(f)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=yn.get(f))&&td(e,a);var R=g=r.createElement("link");gt(R),Et(R,"link",e),R._p=new Promise(function(B,Y){R.onload=B,R.onerror=Y}),R.addEventListener("load",function(){S.loading|=1}),R.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Io(g,t,r)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(f,g)}}}function O2(e,t){fa.X(e,t);var a=Ur;if(a&&e){var r=rr(a).hoistableScripts,o=Hr(e),f=r.get(o);f||(f=a.querySelector(rs(o)),f||(e=x({src:e,async:!0},t),(t=yn.get(o))&&nd(e,t),f=a.createElement("script"),gt(f),Et(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function M2(e,t){fa.M(e,t);var a=Ur;if(a&&e){var r=rr(a).hoistableScripts,o=Hr(e),f=r.get(o);f||(f=a.querySelector(rs(o)),f||(e=x({src:e,async:!0,type:"module"},t),(t=yn.get(o))&&nd(e,t),f=a.createElement("script"),gt(f),Et(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function Dy(e,t,a,r){var o=(o=he.current)?Zo(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=kr(a.href),a=rr(o).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=kr(a.href);var f=rr(o).hoistableStyles,g=f.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=o.querySelector(ls(e)))&&!f._p&&(g.instance=f,g.state.loading=5),yn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},yn.set(e,a),f||D2(o,e,a,g.state))),t&&r===null)throw Error(s(528,""));return g}if(t&&r!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hr(a),a=rr(o).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function kr(e){return'href="'+cn(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function zy(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function D2(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Et(t,"link",a),gt(t),e.head.appendChild(t))}function Hr(e){return'[src="'+cn(e)+'"]'}function rs(e){return"script[async]"+e}function Ly(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(r)return t.instance=r,gt(r),r;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),gt(r),Et(r,"style",o),Io(r,a.precedence,e),t.instance=r;case"stylesheet":o=kr(a.href);var f=e.querySelector(ls(o));if(f)return t.state.loading|=4,t.instance=f,gt(f),f;r=zy(a),(o=yn.get(o))&&td(r,o),f=(e.ownerDocument||e).createElement("link"),gt(f);var g=f;return g._p=new Promise(function(S,R){g.onload=S,g.onerror=R}),Et(f,"link",r),t.state.loading|=4,Io(f,a.precedence,e),t.instance=f;case"script":return f=Hr(a.src),(o=e.querySelector(rs(f)))?(t.instance=o,gt(o),o):(r=a,(o=yn.get(f))&&(r=x({},a),nd(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),gt(o),Et(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Io(r,a.precedence,e));return t.instance}function Io(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,f=o,g=0;g<r.length;g++){var S=r[g];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function td(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function Uy(e,t,a){if($o===null){var r=new Map,o=$o=new Map;o.set(a,r)}else o=$o,r=o.get(a),r||(r=new Map,o.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[Si]||f[xt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var S=r.get(g);S?S.push(f):r.set(g,[f])}}return r}function ky(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function z2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Hy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function L2(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=kr(r.href),f=t.querySelector(ls(o));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,gt(f);return}f=t.ownerDocument||t,r=zy(r),(o=yn.get(o))&&td(r,o),f=f.createElement("link"),gt(f);var g=f;g._p=new Promise(function(S,R){g.onload=S,g.onerror=R}),Et(f,"link",r),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Jo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ad=0;function U2(e,t){return e.stylesheets&&e.count===0&&ec(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&ec(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&ad===0&&(ad=62500*g2());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ec(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>ad?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function Jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ec(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wo=null;function ec(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wo=new Map,t.forEach(k2,e),Wo=null,Jo.call(e))}function k2(e,t){if(!(t.state.loading&4)){var a=Wo.get(e);if(a)var r=a.get(null);else{a=new Map,Wo.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var g=o[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),r=g)}r&&a.set(null,r)}o=t.instance,g=o.getAttribute("data-precedence"),f=a.get(g)||r,f===r&&a.set(null,o),a.set(g,o),this.count++,r=Jo.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var is={$$typeof:D,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function H2(e,t,a,r,o,f,g,S,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$c(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$c(0),this.hiddenUpdates=$c(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function By(e,t,a,r,o,f,g,S,R,B,Y,K){return e=new H2(e,t,a,g,R,B,Y,K,S),t=1,f===!0&&(t|=24),f=$t(3,null,null,t),e.current=f,f.stateNode=e,t=Lu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},Bu(f),e}function qy(e){return e?(e=pr,e):pr}function Vy(e,t,a,r,o,f){o=qy(o),r.context===null?r.context=o:r.pendingContext=o,r=za(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=La(e,r,t),a!==null&&(Qt(a,e,t),Hi(a,e,t))}function Gy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ld(e,t){Gy(e,t),(e=e.alternate)&&Gy(e,t)}function Yy(e){if(e.tag===13||e.tag===31){var t=Cl(e,67108864);t!==null&&Qt(t,e,67108864),ld(e,67108864)}}function Qy(e){if(e.tag===13||e.tag===31){var t=nn();t=Jc(t);var a=Cl(e,t);a!==null&&Qt(a,e,t),ld(e,t)}}var tc=!0;function B2(e,t,a,r){var o=U.T;U.T=null;var f=Z.p;try{Z.p=2,rd(e,t,a,r)}finally{Z.p=f,U.T=o}}function q2(e,t,a,r){var o=U.T;U.T=null;var f=Z.p;try{Z.p=8,rd(e,t,a,r)}finally{Z.p=f,U.T=o}}function rd(e,t,a,r){if(tc){var o=id(r);if(o===null)Pf(e,t,r,nc,a),Xy(e,r);else if(G2(o,e,t,a,r))r.stopPropagation();else if(Xy(e,r),t&4&&-1<V2.indexOf(e)){for(;o!==null;){var f=lr(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=xl(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var R=1<<31-Zt(g);S.entanglements[1]|=R,g&=~R}zn(f),(Be&6)===0&&(Ho=Kt()+500,es(0))}}break;case 31:case 13:S=Cl(f,2),S!==null&&Qt(S,f,2),qo(),ld(f,2)}if(f=id(r),f===null&&Pf(e,t,r,nc,a),f===o)break;o=f}o!==null&&r.stopPropagation()}else Pf(e,t,r,null,a)}}function id(e){return e=su(e),sd(e)}var nc=null;function sd(e){if(nc=null,e=ar(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return nc=e,null}function Py(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(N1()){case Wh:return 2;case em:return 8;case Qs:case T1:return 32;case tm:return 268435456;default:return 32}default:return 32}}var od=!1,Xa=null,Ka=null,Fa=null,ss=new Map,os=new Map,Za=[],V2="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 Xy(e,t){switch(e){case"focusin":case"focusout":Xa=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":ss.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":os.delete(t.pointerId)}}function cs(e,t,a,r,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[o]},t!==null&&(t=lr(t),t!==null&&Yy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function G2(e,t,a,r,o){switch(t){case"focusin":return Xa=cs(Xa,e,t,a,r,o),!0;case"dragenter":return Ka=cs(Ka,e,t,a,r,o),!0;case"mouseover":return Fa=cs(Fa,e,t,a,r,o),!0;case"pointerover":var f=o.pointerId;return ss.set(f,cs(ss.get(f)||null,e,t,a,r,o)),!0;case"gotpointercapture":return f=o.pointerId,os.set(f,cs(os.get(f)||null,e,t,a,r,o)),!0}return!1}function Ky(e){var t=ar(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,sm(e.priority,function(){Qy(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,sm(e.priority,function(){Qy(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=id(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);iu=r,a.target.dispatchEvent(r),iu=null}else return t=lr(a),t!==null&&Yy(t),e.blockedOn=a,!1;t.shift()}return!0}function Fy(e,t,a){ac(e)&&a.delete(t)}function Y2(){od=!1,Xa!==null&&ac(Xa)&&(Xa=null),Ka!==null&&ac(Ka)&&(Ka=null),Fa!==null&&ac(Fa)&&(Fa=null),ss.forEach(Fy),os.forEach(Fy)}function lc(e,t){e.blockedOn===t&&(e.blockedOn=null,od||(od=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Y2)))}var rc=null;function Zy(e){rc!==e&&(rc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){rc===e&&(rc=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(sd(r||a)===null)continue;break}var f=lr(a);f!==null&&(e.splice(t,3),t-=3,rf(f,{pending:!0,data:o,method:a.method,action:r},r,o))}}))}function Br(e){function t(R){return lc(R,e)}Xa!==null&&lc(Xa,e),Ka!==null&&lc(Ka,e),Fa!==null&&lc(Fa,e),ss.forEach(t),os.forEach(t);for(var a=0;a<Za.length;a++){var r=Za[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Za.length&&(a=Za[0],a.blockedOn===null);)Ky(a),a.blockedOn===null&&Za.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var o=a[r],f=a[r+1],g=o[Ht]||null;if(typeof f=="function")g||Zy(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,g=f[Ht]||null)S=g.formAction;else if(sd(o)!==null)continue}else S=g.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),Zy(a)}}}function Iy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function cd(e){this._internalRoot=e}ic.prototype.render=cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,r=nn();Vy(a,r,e,t,null,null)},ic.prototype.unmount=cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vy(e.current,2,null,e,null,null),qo(),t[nr]=null}};function ic(e){this._internalRoot=e}ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=im();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Za.length&&t!==0&&t<Za[a].priority;a++);Za.splice(a,0,e),a===0&&Ky(e)}};var $y=l.version;if($y!=="19.2.4")throw Error(s(527,$y,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Q2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{vi=sc.inject(Q2),Ft=sc}catch{}}return fs.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,r="",o=lg,f=rg,g=ig;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=By(e,1,!1,null,null,a,r,null,o,f,g,Iy),e[nr]=t.current,Qf(e),new cd(t)},fs.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var r=!1,o="",f=lg,g=rg,S=ig,R=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=By(e,1,!0,t,a??null,r,o,R,f,g,S,Iy),t.context=qy(null),a=t.current,r=nn(),r=Jc(r),o=za(r),o.callback=null,La(a,o,r),a=r,t.current.lanes=a,bi(t,a),zn(t),e[nr]=t.current,Qf(e),new ic(t)},fs.version="19.2.4",fs}var ov;function ew(){if(ov)return hd.exports;ov=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),hd.exports=W2(),hd.exports}var tw=ew();const nw=hh(tw);var ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bl,al,$r,mx,aw=(mx=class extends ui{constructor(){super();ue(this,Bl);ue(this,al);ue(this,$r);ae(this,$r,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,al)||this.setEventListener(_(this,$r))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,al))==null||l.call(this),ae(this,al,void 0))}setEventListener(l){var i;ae(this,$r,l),(i=_(this,al))==null||i.call(this),ae(this,al,l(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(l){_(this,Bl)!==l&&(ae(this,Bl,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof _(this,Bl)=="boolean"?_(this,Bl):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},Bl=new WeakMap,al=new WeakMap,$r=new WeakMap,mx),ph=new aw,lw={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},ll,dh,px,rw=(px=class{constructor(){ue(this,ll,lw);ue(this,dh,!1)}setTimeoutProvider(n){ae(this,ll,n)}setTimeout(n,l){return _(this,ll).setTimeout(n,l)}clearTimeout(n){_(this,ll).clearTimeout(n)}setInterval(n,l){return _(this,ll).setInterval(n,l)}clearInterval(n){_(this,ll).clearInterval(n)}},ll=new WeakMap,dh=new WeakMap,px),Hl=new rw;function iw(n){setTimeout(n,0)}var sw=typeof window>"u"||"Deno"in globalThis;function Ut(){}function ow(n,l){return typeof n=="function"?n(l):n}function Ld(n){return typeof n=="number"&&n>=0&&n!==1/0}function Tx(n,l){return Math.max(n+(l||0)-Date.now(),0)}function dl(n,l){return typeof n=="function"?n(l):n}function xn(n,l){return typeof n=="function"?n(l):n}function cv(n,l){const{type:i="all",exact:s,fetchStatus:c,predicate:d,queryKey:h,stale:m}=n;if(h){if(s){if(l.queryHash!==gh(h,l.options))return!1}else if(!js(l.queryKey,h))return!1}if(i!=="all"){const y=l.isActive();if(i==="active"&&!y||i==="inactive"&&y)return!1}return!(typeof m=="boolean"&&l.isStale()!==m||c&&c!==l.state.fetchStatus||d&&!d(l))}function uv(n,l){const{exact:i,status:s,predicate:c,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(i){if(Fl(l.options.mutationKey)!==Fl(d))return!1}else if(!js(l.options.mutationKey,d))return!1}return!(s&&l.state.status!==s||c&&!c(l))}function gh(n,l){return((l==null?void 0:l.queryKeyHashFn)||Fl)(n)}function Fl(n){return JSON.stringify(n,(l,i)=>Ud(i)?Object.keys(i).sort().reduce((s,c)=>(s[c]=i[c],s),{}):i)}function js(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>js(n[i],l[i])):!1}var cw=Object.prototype.hasOwnProperty;function Rx(n,l,i=0){if(n===l)return n;if(i>500)return l;const s=fv(n)&&fv(l);if(!s&&!(Ud(n)&&Ud(l)))return l;const d=(s?n:Object.keys(n)).length,h=s?l:Object.keys(l),m=h.length,y=s?new Array(m):{};let p=0;for(let b=0;b<m;b++){const x=s?b:h[b],E=n[x],C=l[x];if(E===C){y[x]=E,(s?b<d:cw.call(n,x))&&p++;continue}if(E===null||C===null||typeof E!="object"||typeof C!="object"){y[x]=C;continue}const T=Rx(E,C,i+1);y[x]=T,T===E&&p++}return d===m&&p===d?n:y}function jc(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function fv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!dv(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!dv(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dv(n){return Object.prototype.toString.call(n)==="[object Object]"}function uw(n){return new Promise(l=>{Hl.setTimeout(l,n)})}function kd(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?Rx(n,l):l}function fw(n,l,i=0){const s=[...n,l];return i&&s.length>i?s.slice(1):s}function dw(n,l,i=0){const s=[l,...n];return i&&s.length>i?s.slice(0,-1):s}var yh=Symbol();function _x(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===yh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function vh(n,l){return typeof n=="function"?n(...l):!!n}function hw(n,l,i){let s=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=l()),s||(s=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Ns=(()=>{let n=()=>sw;return{isServer(){return n()},setIsServer(l){n=l}}})();function Hd(){let n,l;const i=new Promise((c,d)=>{n=c,l=d});i.status="pending",i.catch(()=>{});function s(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{s({status:"fulfilled",value:c}),n(c)},i.reject=c=>{s({status:"rejected",reason:c}),l(c)},i}var mw=iw;function pw(){let n=[],l=0,i=m=>{m()},s=m=>{m()},c=mw;const d=m=>{l?n.push(m):c(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&c(()=>{s(()=>{m.forEach(y=>{i(y)})})})};return{batch:m=>{let y;l++;try{y=m()}finally{l--,l||h()}return y},batchCalls:m=>(...y)=>{d(()=>{m(...y)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{s=m},setScheduler:m=>{c=m}}}var mt=pw(),Jr,rl,Wr,gx,gw=(gx=class extends ui{constructor(){super();ue(this,Jr,!0);ue(this,rl);ue(this,Wr);ae(this,Wr,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),s=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){_(this,rl)||this.setEventListener(_(this,Wr))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,rl))==null||l.call(this),ae(this,rl,void 0))}setEventListener(l){var i;ae(this,Wr,l),(i=_(this,rl))==null||i.call(this),ae(this,rl,l(this.setOnline.bind(this)))}setOnline(l){_(this,Jr)!==l&&(ae(this,Jr,l),this.listeners.forEach(s=>{s(l)}))}isOnline(){return _(this,Jr)}},Jr=new WeakMap,rl=new WeakMap,Wr=new WeakMap,gx),Nc=new gw;function yw(n){return Math.min(1e3*2**n,3e4)}function Ax(n){return(n??"online")==="online"?Nc.isOnline():!0}var Bd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Ox(n){let l=!1,i=0,s;const c=Hd(),d=()=>c.status!=="pending",h=w=>{var j;if(!d()){const N=new Bd(w);E(N),(j=n.onCancel)==null||j.call(n,N)}},m=()=>{l=!0},y=()=>{l=!1},p=()=>ph.isFocused()&&(n.networkMode==="always"||Nc.isOnline())&&n.canRun(),b=()=>Ax(n.networkMode)&&n.canRun(),x=w=>{d()||(s==null||s(),c.resolve(w))},E=w=>{d()||(s==null||s(),c.reject(w))},C=()=>new Promise(w=>{var j;s=N=>{(d()||p())&&w(N)},(j=n.onPause)==null||j.call(n)}).then(()=>{var w;s=void 0,d()||(w=n.onContinue)==null||w.call(n)}),T=()=>{if(d())return;let w;const j=i===0?n.initialPromise:void 0;try{w=j??n.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(x).catch(N=>{var Q;if(d())return;const O=n.retry??(Ns.isServer()?0:3),D=n.retryDelay??yw,z=typeof D=="function"?D(i,N):D,k=O===!0||typeof O=="number"&&i<O||typeof O=="function"&&O(i,N);if(l||!k){E(N);return}i++,(Q=n.onFail)==null||Q.call(n,i,N),uw(z).then(()=>p()?void 0:C()).then(()=>{l?E(N):T()})})};return{promise:c,status:()=>c.status,cancel:h,continue:()=>(s==null||s(),c),cancelRetry:m,continueRetry:y,canStart:b,start:()=>(b()?T():C().then(T),c)}}var ql,yx,Mx=(yx=class{constructor(){ue(this,ql)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ld(this.gcTime)&&ae(this,ql,Hl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ns.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,ql)&&(Hl.clearTimeout(_(this,ql)),ae(this,ql,void 0))}},ql=new WeakMap,yx),Vl,ei,vn,Gl,vt,As,Yl,an,Dx,ha,vx,vw=(vx=class extends Mx{constructor(l){super();ue(this,an);ue(this,Vl);ue(this,ei);ue(this,vn);ue(this,Gl);ue(this,vt);ue(this,As);ue(this,Yl);ae(this,Yl,!1),ae(this,As,l.defaultOptions),this.setOptions(l.options),this.observers=[],ae(this,Gl,l.client),ae(this,vn,_(this,Gl).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,ae(this,Vl,mv(this.options)),this.state=l.state??_(this,Vl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=_(this,vt))==null?void 0:l.promise}setOptions(l){if(this.options={..._(this,As),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=mv(this.options);i.data!==void 0&&(this.setState(hv(i.data,i.dataUpdatedAt)),ae(this,Vl,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,vn).remove(this)}setData(l,i){const s=kd(this.state.data,l,this.options);return Ee(this,an,ha).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(l,i){Ee(this,an,ha).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var s,c;const i=(s=_(this,vt))==null?void 0:s.promise;return(c=_(this,vt))==null||c.cancel(l),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Vl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>xn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>dl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!Tx(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(s=>s.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,vt))==null||i.continue()}onOnline(){var i;const l=this.observers.find(s=>s.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,vt))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),_(this,vn).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(_(this,vt)&&(_(this,Yl)||Ee(this,an,Dx).call(this)?_(this,vt).cancel({revert:!0}):_(this,vt).cancelRetry()),this.scheduleGc()),_(this,vn).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,an,ha).call(this,{type:"invalidate"})}async fetch(l,i){var y,p,b,x,E,C,T,w,j,N,O,D;if(this.state.fetchStatus!=="idle"&&((y=_(this,vt))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,vt))return _(this,vt).continueRetry(),_(this,vt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const z=this.observers.find(k=>k.options.queryFn);z&&this.setOptions(z.options)}const s=new AbortController,c=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(ae(this,Yl,!0),s.signal)})},d=()=>{const z=_x(this.options,i),Q=(()=>{const G={client:_(this,Gl),queryKey:this.queryKey,meta:this.meta};return c(G),G})();return ae(this,Yl,!1),this.options.persister?this.options.persister(z,Q,this):z(Q)},m=(()=>{const z={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,Gl),state:this.state,fetchFn:d};return c(z),z})();(p=this.options.behavior)==null||p.onFetch(m,this),ae(this,ei,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=m.fetchOptions)==null?void 0:b.meta))&&Ee(this,an,ha).call(this,{type:"fetch",meta:(x=m.fetchOptions)==null?void 0:x.meta}),ae(this,vt,Ox({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:z=>{z instanceof Bd&&z.revert&&this.setState({..._(this,ei),fetchStatus:"idle"}),s.abort()},onFail:(z,k)=>{Ee(this,an,ha).call(this,{type:"failed",failureCount:z,error:k})},onPause:()=>{Ee(this,an,ha).call(this,{type:"pause"})},onContinue:()=>{Ee(this,an,ha).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const z=await _(this,vt).start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(C=(E=_(this,vn).config).onSuccess)==null||C.call(E,z,this),(w=(T=_(this,vn).config).onSettled)==null||w.call(T,z,this.state.error,this),z}catch(z){if(z instanceof Bd){if(z.silent)return _(this,vt).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Ee(this,an,ha).call(this,{type:"error",error:z}),(N=(j=_(this,vn).config).onError)==null||N.call(j,z,this),(D=(O=_(this,vn).config).onSettled)==null||D.call(O,this.state.data,z,this),z}finally{this.scheduleGc()}}},Vl=new WeakMap,ei=new WeakMap,vn=new WeakMap,Gl=new WeakMap,vt=new WeakMap,As=new WeakMap,Yl=new WeakMap,an=new WeakSet,Dx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ha=function(l){const i=s=>{switch(l.type){case"failed":return{...s,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...zx(s.data,this.options),fetchMeta:l.meta??null};case"success":const c={...s,...hv(l.data,l.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ae(this,ei,l.manual?c:void 0),c;case"error":const d=l.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...l.state}}};this.state=i(this.state),mt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),_(this,vn).notify({query:this,type:"updated",action:l})})},vx);function zx(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ax(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hv(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mv(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,s=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Pt,Me,Os,Lt,Ql,ti,ga,il,Ms,ni,ai,Pl,Xl,sl,li,qe,xs,qd,Vd,Gd,Yd,Qd,Pd,Xd,Lx,xx,xw=(xx=class extends ui{constructor(l,i){super();ue(this,qe);ue(this,Pt);ue(this,Me);ue(this,Os);ue(this,Lt);ue(this,Ql);ue(this,ti);ue(this,ga);ue(this,il);ue(this,Ms);ue(this,ni);ue(this,ai);ue(this,Pl);ue(this,Xl);ue(this,sl);ue(this,li,new Set);this.options=i,ae(this,Pt,l),ae(this,il,null),ae(this,ga,Hd()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Me).addObserver(this),pv(_(this,Me),this.options)?Ee(this,qe,xs).call(this):this.updateResult(),Ee(this,qe,Yd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kd(_(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kd(_(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,qe,Qd).call(this),Ee(this,qe,Pd).call(this),_(this,Me).removeObserver(this)}setOptions(l){const i=this.options,s=_(this,Me);if(this.options=_(this,Pt).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xn(this.options.enabled,_(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,qe,Xd).call(this),_(this,Me).setOptions(this.options),i._defaulted&&!jc(this.options,i)&&_(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Me),observer:this});const c=this.hasListeners();c&&gv(_(this,Me),s,this.options,i)&&Ee(this,qe,xs).call(this),this.updateResult(),c&&(_(this,Me)!==s||xn(this.options.enabled,_(this,Me))!==xn(i.enabled,_(this,Me))||dl(this.options.staleTime,_(this,Me))!==dl(i.staleTime,_(this,Me)))&&Ee(this,qe,qd).call(this);const d=Ee(this,qe,Vd).call(this);c&&(_(this,Me)!==s||xn(this.options.enabled,_(this,Me))!==xn(i.enabled,_(this,Me))||d!==_(this,sl))&&Ee(this,qe,Gd).call(this,d)}getOptimisticResult(l){const i=_(this,Pt).getQueryCache().build(_(this,Pt),l),s=this.createResult(i,l);return Sw(this,s)&&(ae(this,Lt,s),ae(this,ti,this.options),ae(this,Ql,_(this,Me).state)),s}getCurrentResult(){return _(this,Lt)}trackResult(l,i){return new Proxy(l,{get:(s,c)=>(this.trackProp(c),i==null||i(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,ga).status==="pending"&&_(this,ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,c))})}trackProp(l){_(this,li).add(l)}getCurrentQuery(){return _(this,Me)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=_(this,Pt).defaultQueryOptions(l),s=_(this,Pt).getQueryCache().build(_(this,Pt),i);return s.fetch().then(()=>this.createResult(s,i))}fetch(l){return Ee(this,qe,xs).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Lt)))}createResult(l,i){var te;const s=_(this,Me),c=this.options,d=_(this,Lt),h=_(this,Ql),m=_(this,ti),p=l!==s?l.state:_(this,Os),{state:b}=l;let x={...b},E=!1,C;if(i._optimisticResults){const le=this.hasListeners(),oe=!le&&pv(l,i),ee=le&&gv(l,s,i,c);(oe||ee)&&(x={...x,...zx(b.data,l.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:T,errorUpdatedAt:w,status:j}=x;C=x.data;let N=!1;if(i.placeholderData!==void 0&&C===void 0&&j==="pending"){let le;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(le=d.data,N=!0):le=typeof i.placeholderData=="function"?i.placeholderData((te=_(this,ai))==null?void 0:te.state.data,_(this,ai)):i.placeholderData,le!==void 0&&(j="success",C=kd(d==null?void 0:d.data,le,i),E=!0)}if(i.select&&C!==void 0&&!N)if(d&&C===(h==null?void 0:h.data)&&i.select===_(this,Ms))C=_(this,ni);else try{ae(this,Ms,i.select),C=i.select(C),C=kd(d==null?void 0:d.data,C,i),ae(this,ni,C),ae(this,il,null)}catch(le){ae(this,il,le)}_(this,il)&&(T=_(this,il),C=_(this,ni),w=Date.now(),j="error");const O=x.fetchStatus==="fetching",D=j==="pending",z=j==="error",k=D&&O,Q=C!==void 0,W={status:j,fetchStatus:x.fetchStatus,isPending:D,isSuccess:j==="success",isError:z,isInitialLoading:k,isLoading:k,data:C,dataUpdatedAt:x.dataUpdatedAt,error:T,errorUpdatedAt:w,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:O,isRefetching:O&&!D,isLoadingError:z&&!Q,isPaused:x.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:z&&Q,isStale:xh(l,i),refetch:this.refetch,promise:_(this,ga),isEnabled:xn(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const le=W.data!==void 0,oe=W.status==="error"&&!le,ee=de=>{oe?de.reject(W.error):le&&de.resolve(W.data)},ge=()=>{const de=ae(this,ga,W.promise=Hd());ee(de)},ce=_(this,ga);switch(ce.status){case"pending":l.queryHash===s.queryHash&&ee(ce);break;case"fulfilled":(oe||W.data!==ce.value)&&ge();break;case"rejected":(!oe||W.error!==ce.reason)&&ge();break}}return W}updateResult(){const l=_(this,Lt),i=this.createResult(_(this,Me),this.options);if(ae(this,Ql,_(this,Me).state),ae(this,ti,this.options),_(this,Ql).data!==void 0&&ae(this,ai,_(this,Me)),jc(i,l))return;ae(this,Lt,i);const s=()=>{if(!l)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!_(this,li).size)return!0;const h=new Set(d??_(this,li));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,Lt)).some(m=>{const y=m;return _(this,Lt)[y]!==l[y]&&h.has(y)})};Ee(this,qe,Lx).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,qe,Yd).call(this)}},Pt=new WeakMap,Me=new WeakMap,Os=new WeakMap,Lt=new WeakMap,Ql=new WeakMap,ti=new WeakMap,ga=new WeakMap,il=new WeakMap,Ms=new WeakMap,ni=new WeakMap,ai=new WeakMap,Pl=new WeakMap,Xl=new WeakMap,sl=new WeakMap,li=new WeakMap,qe=new WeakSet,xs=function(l){Ee(this,qe,Xd).call(this);let i=_(this,Me).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(Ut)),i},qd=function(){Ee(this,qe,Qd).call(this);const l=dl(this.options.staleTime,_(this,Me));if(Ns.isServer()||_(this,Lt).isStale||!Ld(l))return;const s=Tx(_(this,Lt).dataUpdatedAt,l)+1;ae(this,Pl,Hl.setTimeout(()=>{_(this,Lt).isStale||this.updateResult()},s))},Vd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Me)):this.options.refetchInterval)??!1},Gd=function(l){Ee(this,qe,Pd).call(this),ae(this,sl,l),!(Ns.isServer()||xn(this.options.enabled,_(this,Me))===!1||!Ld(_(this,sl))||_(this,sl)===0)&&ae(this,Xl,Hl.setInterval(()=>{(this.options.refetchIntervalInBackground||ph.isFocused())&&Ee(this,qe,xs).call(this)},_(this,sl)))},Yd=function(){Ee(this,qe,qd).call(this),Ee(this,qe,Gd).call(this,Ee(this,qe,Vd).call(this))},Qd=function(){_(this,Pl)&&(Hl.clearTimeout(_(this,Pl)),ae(this,Pl,void 0))},Pd=function(){_(this,Xl)&&(Hl.clearInterval(_(this,Xl)),ae(this,Xl,void 0))},Xd=function(){const l=_(this,Pt).getQueryCache().build(_(this,Pt),this.options);if(l===_(this,Me))return;const i=_(this,Me);ae(this,Me,l),ae(this,Os,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},Lx=function(l){mt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(_(this,Lt))}),_(this,Pt).getQueryCache().notify({query:_(this,Me),type:"observerResultsUpdated"})})},xx);function bw(n,l){return xn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function pv(n,l){return bw(n,l)||n.state.data!==void 0&&Kd(n,l,l.refetchOnMount)}function Kd(n,l,i){if(xn(l.enabled,n)!==!1&&dl(l.staleTime,n)!=="static"){const s=typeof i=="function"?i(n):i;return s==="always"||s!==!1&&xh(n,l)}return!1}function gv(n,l,i,s){return(n!==l||xn(s.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&xh(n,i)}function xh(n,l){return xn(l.enabled,n)!==!1&&n.isStaleByTime(dl(l.staleTime,n))}function Sw(n,l){return!jc(n.getCurrentResult(),l)}function yv(n){return{onFetch:(l,i)=>{var b,x,E,C,T;const s=l.options,c=(E=(x=(b=l.fetchOptions)==null?void 0:b.meta)==null?void 0:x.fetchMore)==null?void 0:E.direction,d=((C=l.state.data)==null?void 0:C.pages)||[],h=((T=l.state.data)==null?void 0:T.pageParams)||[];let m={pages:[],pageParams:[]},y=0;const p=async()=>{let w=!1;const j=D=>{hw(D,()=>l.signal,()=>w=!0)},N=_x(l.options,l.fetchOptions),O=async(D,z,k)=>{if(w)return Promise.reject();if(z==null&&D.pages.length)return Promise.resolve(D);const G=(()=>{const oe={client:l.client,queryKey:l.queryKey,pageParam:z,direction:k?"backward":"forward",meta:l.options.meta};return j(oe),oe})(),W=await N(G),{maxPages:te}=l.options,le=k?dw:fw;return{pages:le(D.pages,W,te),pageParams:le(D.pageParams,z,te)}};if(c&&d.length){const D=c==="backward",z=D?ww:vv,k={pages:d,pageParams:h},Q=z(s,k);m=await O(k,Q,D)}else{const D=n??d.length;do{const z=y===0?h[0]??s.initialPageParam:vv(s,m);if(y>0&&z==null)break;m=await O(m,z),y++}while(y<D)}return m};l.options.persister?l.fetchFn=()=>{var w,j;return(j=(w=l.options).persister)==null?void 0:j.call(w,p,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=p}}}function vv(n,{pages:l,pageParams:i}){const s=l.length-1;return l.length>0?n.getNextPageParam(l[s],l,i[s],i):void 0}function ww(n,{pages:l,pageParams:i}){var s;return l.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,l[0],l,i[0],i):void 0}var Ds,Ln,Tt,Kl,Un,el,bx,Ew=(bx=class extends Mx{constructor(l){super();ue(this,Un);ue(this,Ds);ue(this,Ln);ue(this,Tt);ue(this,Kl);ae(this,Ds,l.client),this.mutationId=l.mutationId,ae(this,Tt,l.mutationCache),ae(this,Ln,[]),this.state=l.state||Ux(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){_(this,Ln).includes(l)||(_(this,Ln).push(l),this.clearGcTimeout(),_(this,Tt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){ae(this,Ln,_(this,Ln).filter(i=>i!==l)),this.scheduleGc(),_(this,Tt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){_(this,Ln).length||(this.state.status==="pending"?this.scheduleGc():_(this,Tt).remove(this))}continue(){var l;return((l=_(this,Kl))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,m,y,p,b,x,E,C,T,w,j,N,O,D,z,k,Q,G;const i=()=>{Ee(this,Un,el).call(this,{type:"continue"})},s={client:_(this,Ds),meta:this.options.meta,mutationKey:this.options.mutationKey};ae(this,Kl,Ox({fn:()=>this.options.mutationFn?this.options.mutationFn(l,s):Promise.reject(new Error("No mutationFn found")),onFail:(W,te)=>{Ee(this,Un,el).call(this,{type:"failed",failureCount:W,error:te})},onPause:()=>{Ee(this,Un,el).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,Tt).canRun(this)}));const c=this.state.status==="pending",d=!_(this,Kl).canStart();try{if(c)i();else{Ee(this,Un,el).call(this,{type:"pending",variables:l,isPaused:d}),_(this,Tt).config.onMutate&&await _(this,Tt).config.onMutate(l,this,s);const te=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,l,s));te!==this.state.context&&Ee(this,Un,el).call(this,{type:"pending",context:te,variables:l,isPaused:d})}const W=await _(this,Kl).start();return await((p=(y=_(this,Tt).config).onSuccess)==null?void 0:p.call(y,W,l,this.state.context,this,s)),await((x=(b=this.options).onSuccess)==null?void 0:x.call(b,W,l,this.state.context,s)),await((C=(E=_(this,Tt).config).onSettled)==null?void 0:C.call(E,W,null,this.state.variables,this.state.context,this,s)),await((w=(T=this.options).onSettled)==null?void 0:w.call(T,W,null,l,this.state.context,s)),Ee(this,Un,el).call(this,{type:"success",data:W}),W}catch(W){try{await((N=(j=_(this,Tt).config).onError)==null?void 0:N.call(j,W,l,this.state.context,this,s))}catch(te){Promise.reject(te)}try{await((D=(O=this.options).onError)==null?void 0:D.call(O,W,l,this.state.context,s))}catch(te){Promise.reject(te)}try{await((k=(z=_(this,Tt).config).onSettled)==null?void 0:k.call(z,void 0,W,this.state.variables,this.state.context,this,s))}catch(te){Promise.reject(te)}try{await((G=(Q=this.options).onSettled)==null?void 0:G.call(Q,void 0,W,l,this.state.context,s))}catch(te){Promise.reject(te)}throw Ee(this,Un,el).call(this,{type:"error",error:W}),W}finally{_(this,Tt).runNext(this)}}},Ds=new WeakMap,Ln=new WeakMap,Tt=new WeakMap,Kl=new WeakMap,Un=new WeakSet,el=function(l){const i=s=>{switch(l.type){case"failed":return{...s,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...s,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:l.error,failureCount:s.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),mt.batch(()=>{_(this,Ln).forEach(s=>{s.onMutationUpdate(l)}),_(this,Tt).notify({mutation:this,type:"updated",action:l})})},bx);function Ux(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ya,Nn,zs,Sx,Cw=(Sx=class extends ui{constructor(l={}){super();ue(this,ya);ue(this,Nn);ue(this,zs);this.config=l,ae(this,ya,new Set),ae(this,Nn,new Map),ae(this,zs,0)}build(l,i,s){const c=new Ew({client:l,mutationCache:this,mutationId:++oc(this,zs)._,options:l.defaultMutationOptions(i),state:s});return this.add(c),c}add(l){_(this,ya).add(l);const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i);s?s.push(l):_(this,Nn).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(_(this,ya).delete(l)){const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i);if(s)if(s.length>1){const c=s.indexOf(l);c!==-1&&s.splice(c,1)}else s[0]===l&&_(this,Nn).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i),c=s==null?void 0:s.find(d=>d.state.status==="pending");return!c||c===l}else return!0}runNext(l){var s;const i=cc(l);if(typeof i=="string"){const c=(s=_(this,Nn).get(i))==null?void 0:s.find(d=>d!==l&&d.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{_(this,ya).forEach(l=>{this.notify({type:"removed",mutation:l})}),_(this,ya).clear(),_(this,Nn).clear()})}getAll(){return Array.from(_(this,ya))}find(l){const i={exact:!0,...l};return this.getAll().find(s=>uv(i,s))}findAll(l={}){return this.getAll().filter(i=>uv(l,i))}notify(l){mt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return mt.batch(()=>Promise.all(l.map(i=>i.continue().catch(Ut))))}},ya=new WeakMap,Nn=new WeakMap,zs=new WeakMap,Sx);function cc(n){var l;return(l=n.options.scope)==null?void 0:l.id}var va,ol,Xt,xa,ba,vc,Fd,wx,jw=(wx=class extends ui{constructor(i,s){super();ue(this,ba);ue(this,va);ue(this,ol);ue(this,Xt);ue(this,xa);ae(this,va,i),this.setOptions(s),this.bindMethods(),Ee(this,ba,vc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var c;const s=this.options;this.options=_(this,va).defaultMutationOptions(i),jc(this.options,s)||_(this,va).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Xt),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Fl(s.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((c=_(this,Xt))==null?void 0:c.state.status)==="pending"&&_(this,Xt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,Xt))==null||i.removeObserver(this)}onMutationUpdate(i){Ee(this,ba,vc).call(this),Ee(this,ba,Fd).call(this,i)}getCurrentResult(){return _(this,ol)}reset(){var i;(i=_(this,Xt))==null||i.removeObserver(this),ae(this,Xt,void 0),Ee(this,ba,vc).call(this),Ee(this,ba,Fd).call(this)}mutate(i,s){var c;return ae(this,xa,s),(c=_(this,Xt))==null||c.removeObserver(this),ae(this,Xt,_(this,va).getMutationCache().build(_(this,va),this.options)),_(this,Xt).addObserver(this),_(this,Xt).execute(i)}},va=new WeakMap,ol=new WeakMap,Xt=new WeakMap,xa=new WeakMap,ba=new WeakSet,vc=function(){var s;const i=((s=_(this,Xt))==null?void 0:s.state)??Ux();ae(this,ol,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Fd=function(i){mt.batch(()=>{var s,c,d,h,m,y,p,b;if(_(this,xa)&&this.hasListeners()){const x=_(this,ol).variables,E=_(this,ol).context,C={client:_(this,va),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(c=(s=_(this,xa)).onSuccess)==null||c.call(s,i.data,x,E,C)}catch(T){Promise.reject(T)}try{(h=(d=_(this,xa)).onSettled)==null||h.call(d,i.data,null,x,E,C)}catch(T){Promise.reject(T)}}else if((i==null?void 0:i.type)==="error"){try{(y=(m=_(this,xa)).onError)==null||y.call(m,i.error,x,E,C)}catch(T){Promise.reject(T)}try{(b=(p=_(this,xa)).onSettled)==null||b.call(p,void 0,i.error,x,E,C)}catch(T){Promise.reject(T)}}}this.listeners.forEach(x=>{x(_(this,ol))})})},wx),kn,Ex,Nw=(Ex=class extends ui{constructor(l={}){super();ue(this,kn);this.config=l,ae(this,kn,new Map)}build(l,i,s){const c=i.queryKey,d=i.queryHash??gh(c,i);let h=this.get(d);return h||(h=new vw({client:l,queryKey:c,queryHash:d,options:l.defaultQueryOptions(i),state:s,defaultOptions:l.getQueryDefaults(c)}),this.add(h)),h}add(l){_(this,kn).has(l.queryHash)||(_(this,kn).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=_(this,kn).get(l.queryHash);i&&(l.destroy(),i===l&&_(this,kn).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){mt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return _(this,kn).get(l)}getAll(){return[..._(this,kn).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(s=>cv(i,s))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(s=>cv(l,s)):i}notify(l){mt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},kn=new WeakMap,Ex),at,cl,ul,ri,ii,fl,si,oi,Cx,Tw=(Cx=class{constructor(n={}){ue(this,at);ue(this,cl);ue(this,ul);ue(this,ri);ue(this,ii);ue(this,fl);ue(this,si);ue(this,oi);ae(this,at,n.queryCache||new Nw),ae(this,cl,n.mutationCache||new Cw),ae(this,ul,n.defaultOptions||{}),ae(this,ri,new Map),ae(this,ii,new Map),ae(this,fl,0)}mount(){oc(this,fl)._++,_(this,fl)===1&&(ae(this,si,ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,at).onFocus())})),ae(this,oi,Nc.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,at).onOnline())})))}unmount(){var n,l;oc(this,fl)._--,_(this,fl)===0&&((n=_(this,si))==null||n.call(this),ae(this,si,void 0),(l=_(this,oi))==null||l.call(this),ae(this,oi,void 0))}isFetching(n){return _(this,at).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,cl).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,at).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=_(this,at).build(this,l),s=i.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(dl(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(s))}getQueriesData(n){return _(this,at).findAll(n).map(({queryKey:l,state:i})=>{const s=i.data;return[l,s]})}setQueryData(n,l,i){const s=this.defaultQueryOptions({queryKey:n}),c=_(this,at).get(s.queryHash),d=c==null?void 0:c.state.data,h=ow(l,d);if(h!==void 0)return _(this,at).build(this,s).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return mt.batch(()=>_(this,at).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,at).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=_(this,at);mt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=_(this,at);return mt.batch(()=>(i.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},s=mt.batch(()=>_(this,at).findAll(n).map(c=>c.cancel(i)));return Promise.all(s).then(Ut).catch(Ut)}invalidateQueries(n,l={}){return mt.batch(()=>(_(this,at).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},s=mt.batch(()=>_(this,at).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(Ut)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(s).then(Ut)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=_(this,at).build(this,l);return i.isStaleByTime(dl(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ut).catch(Ut)}fetchInfiniteQuery(n){return n.behavior=yv(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ut).catch(Ut)}ensureInfiniteQueryData(n){return n.behavior=yv(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Nc.isOnline()?_(this,cl).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,at)}getMutationCache(){return _(this,cl)}getDefaultOptions(){return _(this,ul)}setDefaultOptions(n){ae(this,ul,n)}setQueryDefaults(n,l){_(this,ri).set(Fl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[..._(this,ri).values()],i={};return l.forEach(s=>{js(n,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(n,l){_(this,ii).set(Fl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[..._(this,ii).values()],i={};return l.forEach(s=>{js(n,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={..._(this,ul).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=gh(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===yh&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,ul).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,at).clear(),_(this,cl).clear()}},at=new WeakMap,cl=new WeakMap,ul=new WeakMap,ri=new WeakMap,ii=new WeakMap,fl=new WeakMap,si=new WeakMap,oi=new WeakMap,Cx),kx=v.createContext(void 0),bh=n=>{const l=v.useContext(kx);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},Rw=({client:n,children:l})=>(v.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(kx.Provider,{value:n,children:l})),Hx=v.createContext(!1),_w=()=>v.useContext(Hx);Hx.Provider;function Aw(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ow=v.createContext(Aw()),Mw=()=>v.useContext(Ow),Dw=(n,l,i)=>{const s=i!=null&&i.state.error&&typeof n.throwOnError=="function"?vh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||s)&&(l.isReset()||(n.retryOnMount=!1))},zw=n=>{v.useEffect(()=>{n.clearReset()},[n])},Lw=({result:n,errorResetBoundary:l,throwOnError:i,query:s,suspense:c})=>n.isError&&!l.isReset()&&!n.isFetching&&s&&(c&&n.data===void 0||vh(i,[n.error,s])),Uw=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),s=n.staleTime;n.staleTime=typeof s=="function"?(...c)=>i(s(...c)):i(s),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kw=(n,l)=>n.isLoading&&n.isFetching&&!l,Hw=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,xv=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Bw(n,l,i){var E,C,T,w;const s=_w(),c=Mw(),d=bh(),h=d.defaultQueryOptions(n);(C=(E=d.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||C.call(E,h);const m=d.getQueryCache().get(h.queryHash);h._optimisticResults=s?"isRestoring":"optimistic",Uw(h),Dw(h,c,m),zw(c);const y=!d.getQueryCache().get(h.queryHash),[p]=v.useState(()=>new l(d,h)),b=p.getOptimisticResult(h),x=!s&&n.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(j=>{const N=x?p.subscribe(mt.batchCalls(j)):Ut;return p.updateResult(),N},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(h)},[h,p]),Hw(h,b))throw xv(h,p,c);if(Lw({result:b,errorResetBoundary:c,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw b.error;if((w=(T=d.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||w.call(T,h,b),h.experimental_prefetchInRender&&!Ns.isServer()&&kw(b,s)){const j=y?xv(h,p,c):m==null?void 0:m.promise;j==null||j.catch(Ut).finally(()=>{p.updateResult()})}return h.notifyOnChangeProps?b:p.trackResult(b)}function er(n,l){return Bw(n,xw)}function qw(n,l){const i=bh(),[s]=v.useState(()=>new jw(i,n));v.useEffect(()=>{s.setOptions(n)},[s,n]);const c=v.useSyncExternalStore(v.useCallback(h=>s.subscribe(mt.batchCalls(h)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=v.useCallback((h,m)=>{s.mutate(h,m).catch(Ut)},[s]);if(c.error&&vh(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}/**
48
+ `+r.stack}}var ja=Object.prototype.hasOwnProperty,Zc=n.unstable_scheduleCallback,Ic=n.unstable_cancelCallback,C1=n.unstable_shouldYield,j1=n.unstable_requestPaint,Kt=n.unstable_now,N1=n.unstable_getCurrentPriorityLevel,Wh=n.unstable_ImmediatePriority,em=n.unstable_UserBlockingPriority,Qs=n.unstable_NormalPriority,T1=n.unstable_LowPriority,tm=n.unstable_IdlePriority,R1=n.log,_1=n.unstable_setDisableYieldValue,vi=null,Ft=null;function Na(e){if(typeof R1=="function"&&_1(e),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(vi,e)}catch{}}var Zt=Math.clz32?Math.clz32:M1,A1=Math.log,O1=Math.LN2;function M1(e){return e>>>=0,e===0?32:31-(A1(e)/O1|0)|0}var Ps=256,Xs=262144,Ks=4194304;function xl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fs(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var o=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?o=xl(r):(p&=S,p!==0?o=xl(p):a||(a=S&~e,a!==0&&(o=xl(a))))):(S=r&~f,S!==0?o=xl(S):p!==0?o=xl(p):a||(a=r&~e,a!==0&&(o=xl(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function xi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nm(){var e=Ks;return Ks<<=1,(Ks&62914560)===0&&(Ks=4194304),e}function $c(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function z1(e,t,a,r,o,f){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,R=e.expirationTimes,H=e.hiddenUpdates;for(a=p&~a;0<a;){var Y=31-Zt(a),F=1<<Y;S[Y]=0,R[Y]=-1;var B=H[Y];if(B!==null)for(H[Y]=null,Y=0;Y<B.length;Y++){var V=B[Y];V!==null&&(V.lane&=-536870913)}a&=~F}r!==0&&am(e,r,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function am(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Zt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function lm(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Zt(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}function rm(e,t){var a=t&-t;return a=(a&42)!==0?1:Jc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Jc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function im(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Py(e.type))}function sm(e,t){var a=I.p;try{return I.p=e,t()}finally{I.p=a}}var Ta=Math.random().toString(36).slice(2),xt="__reactFiber$"+Ta,Ht="__reactProps$"+Ta,nr="__reactContainer$"+Ta,eu="__reactEvents$"+Ta,L1="__reactListeners$"+Ta,U1="__reactHandles$"+Ta,om="__reactResources$"+Ta,Si="__reactMarker$"+Ta;function tu(e){delete e[xt],delete e[Ht],delete e[eu],delete e[L1],delete e[U1]}function ar(e){var t=e[xt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[nr]||a[xt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_y(e);e!==null;){if(a=e[xt])return a;e=_y(e)}return t}e=a,a=e.parentNode}return null}function lr(e){if(e=e[xt]||e[nr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function rr(e){var t=e[om];return t||(t=e[om]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[Si]=!0}var cm=new Set,um={};function bl(e,t){ir(e,t),ir(e+"Capture",t)}function ir(e,t){for(um[e]=t,e=0;e<t.length;e++)cm.add(t[e])}var k1=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]*$"),fm={},dm={};function H1(e){return ja.call(dm,e)?!0:ja.call(fm,e)?!1:k1.test(e)?dm[e]=!0:(fm[e]=!0,!1)}function Zs(e,t,a){if(H1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Is(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Fn(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function on(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){a=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nu(e){if(!e._valueTracker){var t=hm(e)?"checked":"value";e._valueTracker=B1(e,t,""+e[t])}}function mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=hm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function $s(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 q1=/[\n"\\]/g;function cn(e){return e.replace(q1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function au(e,t,a,r,o,f,p,S){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+on(t)):e.value!==""+on(t)&&(e.value=""+on(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?lu(e,p,on(t)):a!=null?lu(e,p,on(a)):r!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+on(S):e.removeAttribute("name")}function pm(e,t,a,r,o,f,p,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){nu(e);return}a=a!=null?""+on(a):"",t=t!=null?""+on(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),nu(e)}function lu(e,t,a){t==="number"&&$s(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function sr(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+on(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function gm(e,t,a){if(t!=null&&(t=""+on(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+on(a):""}function ym(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(s(92));if(de(r)){if(1<r.length)throw Error(s(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=on(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),nu(e)}function or(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var V1=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 vm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||V1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function xm(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&a[o]!==r&&vm(e,o,r)}else for(var f in t)t.hasOwnProperty(f)&&vm(e,f,t[f])}function ru(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 G1=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"]]),Y1=/^[\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 Js(e){return Y1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var iu=null;function su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cr=null,ur=null;function bm(e){var t=lr(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(au(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+cn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=r[Ht]||null;if(!o)throw Error(s(90));au(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&mm(r)}break e;case"textarea":gm(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&sr(e,!!a.multiple,t,!1)}}}var ou=!1;function Sm(e,t,a){if(ou)return e(t,a);ou=!0;try{var r=e(t);return r}finally{if(ou=!1,(cr!==null||ur!==null)&&(qo(),cr&&(t=cr,e=ur,ur=cr=null,bm(t),e)))for(t=0;t<e.length;t++)bm(e[t])}}function Ei(e,t){var a=e.stateNode;if(a===null)return null;var r=a[Ht]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=!1;if(In)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){cu=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{cu=!1}var Ra=null,uu=null,Ws=null;function wm(){if(Ws)return Ws;var e,t=uu,a=t.length,r,o="value"in Ra?Ra.value:Ra.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var p=a-e;for(r=1;r<=p&&t[a-r]===o[f-r];r++);return Ws=o.slice(e,1<r?1-r:void 0)}function eo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function to(){return!0}function Em(){return!1}function Bt(e){function t(a,r,o,f,p){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?to:Em,this.isPropagationStopped=Em,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=to)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=to)},persist:function(){},isPersistent:to}),t}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},no=Bt(Sl),ji=b({},Sl,{view:0,detail:0}),Q1=Bt(ji),fu,du,Ni,ao=b({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mu,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!==Ni&&(Ni&&e.type==="mousemove"?(fu=e.screenX-Ni.screenX,du=e.screenY-Ni.screenY):du=fu=0,Ni=e),fu)},movementY:function(e){return"movementY"in e?e.movementY:du}}),Cm=Bt(ao),P1=b({},ao,{dataTransfer:0}),X1=Bt(P1),K1=b({},ji,{relatedTarget:0}),hu=Bt(K1),F1=b({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Z1=Bt(F1),I1=b({},Sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$1=Bt(I1),J1=b({},Sl,{data:0}),jm=Bt(J1),W1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eS={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"},tS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tS[e])?!!t[e]:!1}function mu(){return nS}var aS=b({},ji,{key:function(e){if(e.key){var t=W1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=eo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mu,charCode:function(e){return e.type==="keypress"?eo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?eo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lS=Bt(aS),rS=b({},ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nm=Bt(rS),iS=b({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mu}),sS=Bt(iS),oS=b({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),cS=Bt(oS),uS=b({},ao,{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}),fS=Bt(uS),dS=b({},Sl,{newState:0,oldState:0}),hS=Bt(dS),mS=[9,13,27,32],pu=In&&"CompositionEvent"in window,Ti=null;In&&"documentMode"in document&&(Ti=document.documentMode);var pS=In&&"TextEvent"in window&&!Ti,Tm=In&&(!pu||Ti&&8<Ti&&11>=Ti),Rm=" ",_m=!1;function Am(e,t){switch(e){case"keyup":return mS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fr=!1;function gS(e,t){switch(e){case"compositionend":return Om(t);case"keypress":return t.which!==32?null:(_m=!0,Rm);case"textInput":return e=t.data,e===Rm&&_m?null:e;default:return null}}function yS(e,t){if(fr)return e==="compositionend"||!pu&&Am(e,t)?(e=wm(),Ws=uu=Ra=null,fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tm&&t.locale!=="ko"?null:t.data;default:return null}}var vS={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 Mm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vS[e.type]:t==="textarea"}function Dm(e,t,a,r){cr?ur?ur.push(r):ur=[r]:cr=r,t=Ko(t,"onChange"),0<t.length&&(a=new no("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Ri=null,_i=null;function xS(e){py(e,0)}function lo(e){var t=wi(e);if(mm(t))return e}function zm(e,t){if(e==="change")return t}var Lm=!1;if(In){var gu;if(In){var yu="oninput"in document;if(!yu){var Um=document.createElement("div");Um.setAttribute("oninput","return;"),yu=typeof Um.oninput=="function"}gu=yu}else gu=!1;Lm=gu&&(!document.documentMode||9<document.documentMode)}function km(){Ri&&(Ri.detachEvent("onpropertychange",Hm),_i=Ri=null)}function Hm(e){if(e.propertyName==="value"&&lo(_i)){var t=[];Dm(t,_i,e,su(e)),Sm(xS,t)}}function bS(e,t,a){e==="focusin"?(km(),Ri=t,_i=a,Ri.attachEvent("onpropertychange",Hm)):e==="focusout"&&km()}function SS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(_i)}function wS(e,t){if(e==="click")return lo(t)}function ES(e,t){if(e==="input"||e==="change")return lo(t)}function CS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:CS;function Ai(e,t){if(It(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!ja.call(t,o)||!It(e[o],t[o]))return!1}return!0}function Bm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qm(e,t){var a=Bm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bm(a)}}function Vm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$s(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=$s(e.document)}return t}function vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jS=In&&"documentMode"in document&&11>=document.documentMode,dr=null,xu=null,Oi=null,bu=!1;function Ym(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;bu||dr==null||dr!==$s(r)||(r=dr,"selectionStart"in r&&vu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Oi&&Ai(Oi,r)||(Oi=r,r=Ko(xu,"onSelect"),0<r.length&&(t=new no("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=dr)))}function wl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hr={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionrun:wl("Transition","TransitionRun"),transitionstart:wl("Transition","TransitionStart"),transitioncancel:wl("Transition","TransitionCancel"),transitionend:wl("Transition","TransitionEnd")},Su={},Qm={};In&&(Qm=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);function El(e){if(Su[e])return Su[e];if(!hr[e])return e;var t=hr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Qm)return Su[e]=t[a];return e}var Pm=El("animationend"),Xm=El("animationiteration"),Km=El("animationstart"),NS=El("transitionrun"),TS=El("transitionstart"),RS=El("transitioncancel"),Fm=El("transitionend"),Zm=new Map,wu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wu.push("scrollEnd");function wn(e,t){Zm.set(e,t),bl(t,[e])}var ro=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},un=[],mr=0,Eu=0;function io(){for(var e=mr,t=Eu=mr=0;t<e;){var a=un[t];un[t++]=null;var r=un[t];un[t++]=null;var o=un[t];un[t++]=null;var f=un[t];if(un[t++]=null,r!==null&&o!==null){var p=r.pending;p===null?o.next=o:(o.next=p.next,p.next=o),r.pending=o}f!==0&&Im(a,o,f)}}function so(e,t,a,r){un[mr++]=e,un[mr++]=t,un[mr++]=a,un[mr++]=r,Eu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Cu(e,t,a,r){return so(e,t,a,r),oo(e)}function Cl(e,t){return so(e,null,null,t),oo(e)}function Im(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-Zt(a),e=f.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=a|536870912),f):null}function oo(e){if(50<Wi)throw Wi=0,zf=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pr={};function _S(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,a,r){return new _S(e,t,a,r)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $n(e,t){var a=e.alternate;return a===null?(a=$t(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function $m(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function co(e,t,a,r,o,f){var p=0;if(r=e,typeof e=="function")ju(e)&&(p=1);else if(typeof e=="string")p=z2(e,a,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=$t(31,a,t,o),e.elementType=ee,e.lanes=f,e;case w:return jl(a.children,o,f,t);case j:p=8,o|=24;break;case N:return e=$t(12,a,t,o|2),e.elementType=N,e.lanes=f,e;case q:return e=$t(13,a,t,o),e.elementType=q,e.lanes=f,e;case X:return e=$t(19,a,t,o),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:p=10;break e;case O:p=9;break e;case z:p=11;break e;case G:p=14;break e;case Q:p=16,r=null;break e}p=29,a=Error(s(130,e===null?"null":typeof e,"")),r=null}return t=$t(p,a,t,o),t.elementType=e,t.type=r,t.lanes=f,t}function jl(e,t,a,r){return e=$t(7,e,r,t),e.lanes=a,e}function Nu(e,t,a){return e=$t(6,e,null,t),e.lanes=a,e}function Jm(e){var t=$t(18,null,null,0);return t.stateNode=e,t}function Tu(e,t,a){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wm=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var a=Wm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ys(t)},Wm.set(e,t),t)}return{value:e,source:t,stack:Ys(t)}}var gr=[],yr=0,uo=null,Mi=0,dn=[],hn=0,_a=null,On=1,Mn="";function Jn(e,t){gr[yr++]=Mi,gr[yr++]=uo,uo=e,Mi=t}function ep(e,t,a){dn[hn++]=On,dn[hn++]=Mn,dn[hn++]=_a,_a=e;var r=On;e=Mn;var o=32-Zt(r)-1;r&=~(1<<o),a+=1;var f=32-Zt(t)+o;if(30<f){var p=o-o%5;f=(r&(1<<p)-1).toString(32),r>>=p,o-=p,On=1<<32-Zt(t)+o|a<<o|r,Mn=f+e}else On=1<<f|a<<o|r,Mn=e}function Ru(e){e.return!==null&&(Jn(e,1),ep(e,1,0))}function _u(e){for(;e===uo;)uo=gr[--yr],gr[yr]=null,Mi=gr[--yr],gr[yr]=null;for(;e===_a;)_a=dn[--hn],dn[hn]=null,Mn=dn[--hn],dn[hn]=null,On=dn[--hn],dn[hn]=null}function tp(e,t){dn[hn++]=On,dn[hn++]=Mn,dn[hn++]=_a,On=t.id,Mn=t.overflow,_a=e}var bt=null,Ze=null,Oe=!1,Aa=null,mn=!1,Au=Error(s(519));function Oa(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Di(fn(t,e)),Au}function np(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[xt]=e,t[Ht]=r,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<ts.length;a++)Re(ts[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),pm(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),ym(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||xy(t.textContent,a)?(r.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),r.onScroll!=null&&Re("scroll",t),r.onScrollEnd!=null&&Re("scrollend",t),r.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||Oa(e,!0)}function ap(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:bt=bt.return}}function vr(e){if(e!==bt)return!1;if(!Oe)return ap(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zf(e.type,e.memoizedProps)),a=!a),a&&Ze&&Oa(e),ap(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ze=Ry(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ze=Ry(e)}else t===27?(t=Ze,Pa(e.type)?(e=ed,ed=null,Ze=e):Ze=t):Ze=bt?gn(e.stateNode.nextSibling):null;return!0}function Nl(){Ze=bt=null,Oe=!1}function Ou(){var e=Aa;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Aa=null),e}function Di(e){Aa===null?Aa=[e]:Aa.push(e)}var Mu=A(null),Tl=null,Wn=null;function Ma(e,t,a){Z(Mu,t._currentValue),t._currentValue=a}function ea(e){e._currentValue=Mu.current,P(Mu)}function Du(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function zu(e,t,a,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var p=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var R=0;R<t.length;R++)if(S.context===t[R]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Du(f.return,a,e),r||(p=null);break e}f=S.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(s(341));p.lanes|=a,f=p.alternate,f!==null&&(f.lanes|=a),Du(p,a,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function xr(e,t,a,r){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(s(387));if(p=p.memoizedProps,p!==null){var S=o.type;It(o.pendingProps.value,p.value)||(e!==null?e.push(S):e=[S])}}else if(o===ae.current){if(p=o.alternate,p===null)throw Error(s(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(is):e=[is])}o=o.return}e!==null&&zu(t,e,a,r),t.flags|=262144}function fo(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rl(e){Tl=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return lp(Tl,e)}function ho(e,t){return Tl===null&&Rl(e),lp(e,t)}function lp(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wn===null){if(e===null)throw Error(s(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return a}var AS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},OS=n.unstable_scheduleCallback,MS=n.unstable_NormalPriority,st={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lu(){return{controller:new AS,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&OS(MS,function(){e.controller.abort()})}var Li=null,Uu=0,br=0,Sr=null;function DS(e,t){if(Li===null){var a=Li=[];Uu=0,br=qf(),Sr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Uu++,t.then(rp,rp),t}function rp(){if(--Uu===0&&Li!==null){Sr!==null&&(Sr.status="fulfilled");var e=Li;Li=null,br=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function zS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),r}var ip=U.S;U.S=function(e,t){Yg=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DS(e,t),ip!==null&&ip(e,t)};var _l=A(null);function ku(){var e=_l.current;return e!==null?e:Xe.pooledCache}function mo(e,t){t===null?Z(_l,_l.current):Z(_l,t.pool)}function sp(){var e=ku();return e===null?null:{parent:st._currentValue,pool:e}}var wr=Error(s(460)),Hu=Error(s(474)),po=Error(s(542)),go={then:function(){}};function op(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cp(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zn,Zn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fp(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fp(e),e}throw Ol=t,wr}}function Al(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ol=a,wr):a}}var Ol=null;function up(){if(Ol===null)throw Error(s(459));var e=Ol;return Ol=null,e}function fp(e){if(e===wr||e===po)throw Error(s(483))}var Er=null,Ui=0;function yo(e){var t=Ui;return Ui+=1,Er===null&&(Er=[]),cp(Er,e,t)}function ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vo(e,t){throw t.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dp(e){function t(L,D){if(e){var k=L.deletions;k===null?(L.deletions=[D],L.flags|=16):k.push(D)}}function a(L,D){if(!e)return null;for(;D!==null;)t(L,D),D=D.sibling;return null}function r(L){for(var D=new Map;L!==null;)L.key!==null?D.set(L.key,L):D.set(L.index,L),L=L.sibling;return D}function o(L,D){return L=$n(L,D),L.index=0,L.sibling=null,L}function f(L,D,k){return L.index=k,e?(k=L.alternate,k!==null?(k=k.index,k<D?(L.flags|=67108866,D):k):(L.flags|=67108866,D)):(L.flags|=1048576,D)}function p(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function S(L,D,k,K){return D===null||D.tag!==6?(D=Nu(k,L.mode,K),D.return=L,D):(D=o(D,k),D.return=L,D)}function R(L,D,k,K){var fe=k.type;return fe===w?Y(L,D,k.props.children,K,k.key):D!==null&&(D.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Q&&Al(fe)===D.type)?(D=o(D,k.props),ki(D,k),D.return=L,D):(D=co(k.type,k.key,k.props,null,L.mode,K),ki(D,k),D.return=L,D)}function H(L,D,k,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==k.containerInfo||D.stateNode.implementation!==k.implementation?(D=Tu(k,L.mode,K),D.return=L,D):(D=o(D,k.children||[]),D.return=L,D)}function Y(L,D,k,K,fe){return D===null||D.tag!==7?(D=jl(k,L.mode,K,fe),D.return=L,D):(D=o(D,k),D.return=L,D)}function F(L,D,k){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Nu(""+D,L.mode,k),D.return=L,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case C:return k=co(D.type,D.key,D.props,null,L.mode,k),ki(k,D),k.return=L,k;case T:return D=Tu(D,L.mode,k),D.return=L,D;case Q:return D=Al(D),F(L,D,k)}if(de(D)||te(D))return D=jl(D,L.mode,k,null),D.return=L,D;if(typeof D.then=="function")return F(L,yo(D),k);if(D.$$typeof===M)return F(L,ho(L,D),k);vo(L,D)}return null}function B(L,D,k,K){var fe=D!==null?D.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return fe!==null?null:S(L,D,""+k,K);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case C:return k.key===fe?R(L,D,k,K):null;case T:return k.key===fe?H(L,D,k,K):null;case Q:return k=Al(k),B(L,D,k,K)}if(de(k)||te(k))return fe!==null?null:Y(L,D,k,K,null);if(typeof k.then=="function")return B(L,D,yo(k),K);if(k.$$typeof===M)return B(L,D,ho(L,k),K);vo(L,k)}return null}function V(L,D,k,K,fe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return L=L.get(k)||null,S(D,L,""+K,fe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case C:return L=L.get(K.key===null?k:K.key)||null,R(D,L,K,fe);case T:return L=L.get(K.key===null?k:K.key)||null,H(D,L,K,fe);case Q:return K=Al(K),V(L,D,k,K,fe)}if(de(K)||te(K))return L=L.get(k)||null,Y(D,L,K,fe,null);if(typeof K.then=="function")return V(L,D,k,yo(K),fe);if(K.$$typeof===M)return V(L,D,k,ho(D,K),fe);vo(D,K)}return null}function re(L,D,k,K){for(var fe=null,ke=null,oe=D,we=D=0,Ae=null;oe!==null&&we<k.length;we++){oe.index>we?(Ae=oe,oe=null):Ae=oe.sibling;var He=B(L,oe,k[we],K);if(He===null){oe===null&&(oe=Ae);break}e&&oe&&He.alternate===null&&t(L,oe),D=f(He,D,we),ke===null?fe=He:ke.sibling=He,ke=He,oe=Ae}if(we===k.length)return a(L,oe),Oe&&Jn(L,we),fe;if(oe===null){for(;we<k.length;we++)oe=F(L,k[we],K),oe!==null&&(D=f(oe,D,we),ke===null?fe=oe:ke.sibling=oe,ke=oe);return Oe&&Jn(L,we),fe}for(oe=r(oe);we<k.length;we++)Ae=V(oe,L,we,k[we],K),Ae!==null&&(e&&Ae.alternate!==null&&oe.delete(Ae.key===null?we:Ae.key),D=f(Ae,D,we),ke===null?fe=Ae:ke.sibling=Ae,ke=Ae);return e&&oe.forEach(function(Ia){return t(L,Ia)}),Oe&&Jn(L,we),fe}function me(L,D,k,K){if(k==null)throw Error(s(151));for(var fe=null,ke=null,oe=D,we=D=0,Ae=null,He=k.next();oe!==null&&!He.done;we++,He=k.next()){oe.index>we?(Ae=oe,oe=null):Ae=oe.sibling;var Ia=B(L,oe,He.value,K);if(Ia===null){oe===null&&(oe=Ae);break}e&&oe&&Ia.alternate===null&&t(L,oe),D=f(Ia,D,we),ke===null?fe=Ia:ke.sibling=Ia,ke=Ia,oe=Ae}if(He.done)return a(L,oe),Oe&&Jn(L,we),fe;if(oe===null){for(;!He.done;we++,He=k.next())He=F(L,He.value,K),He!==null&&(D=f(He,D,we),ke===null?fe=He:ke.sibling=He,ke=He);return Oe&&Jn(L,we),fe}for(oe=r(oe);!He.done;we++,He=k.next())He=V(oe,L,we,He.value,K),He!==null&&(e&&He.alternate!==null&&oe.delete(He.key===null?we:He.key),D=f(He,D,we),ke===null?fe=He:ke.sibling=He,ke=He);return e&&oe.forEach(function(P2){return t(L,P2)}),Oe&&Jn(L,we),fe}function Pe(L,D,k,K){if(typeof k=="object"&&k!==null&&k.type===w&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case C:e:{for(var fe=k.key;D!==null;){if(D.key===fe){if(fe=k.type,fe===w){if(D.tag===7){a(L,D.sibling),K=o(D,k.props.children),K.return=L,L=K;break e}}else if(D.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Q&&Al(fe)===D.type){a(L,D.sibling),K=o(D,k.props),ki(K,k),K.return=L,L=K;break e}a(L,D);break}else t(L,D);D=D.sibling}k.type===w?(K=jl(k.props.children,L.mode,K,k.key),K.return=L,L=K):(K=co(k.type,k.key,k.props,null,L.mode,K),ki(K,k),K.return=L,L=K)}return p(L);case T:e:{for(fe=k.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===k.containerInfo&&D.stateNode.implementation===k.implementation){a(L,D.sibling),K=o(D,k.children||[]),K.return=L,L=K;break e}else{a(L,D);break}else t(L,D);D=D.sibling}K=Tu(k,L.mode,K),K.return=L,L=K}return p(L);case Q:return k=Al(k),Pe(L,D,k,K)}if(de(k))return re(L,D,k,K);if(te(k)){if(fe=te(k),typeof fe!="function")throw Error(s(150));return k=fe.call(k),me(L,D,k,K)}if(typeof k.then=="function")return Pe(L,D,yo(k),K);if(k.$$typeof===M)return Pe(L,D,ho(L,k),K);vo(L,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,D!==null&&D.tag===6?(a(L,D.sibling),K=o(D,k),K.return=L,L=K):(a(L,D),K=Nu(k,L.mode,K),K.return=L,L=K),p(L)):a(L,D)}return function(L,D,k,K){try{Ui=0;var fe=Pe(L,D,k,K);return Er=null,fe}catch(oe){if(oe===wr||oe===po)throw oe;var ke=$t(29,oe,null,L.mode);return ke.lanes=K,ke.return=L,ke}finally{}}}var Ml=dp(!0),hp=dp(!1),Da=!1;function Bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Be&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=oo(e),Im(e,null,a),t}return so(e,r,t,a),oo(e)}function Hi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,lm(e,a)}}function Vu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=p:f=f.next=p,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Gu=!1;function Bi(){if(Gu){var e=Sr;if(e!==null)throw e}}function qi(e,t,a,r){Gu=!1;var o=e.updateQueue;Da=!1;var f=o.firstBaseUpdate,p=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var R=S,H=R.next;R.next=null,p===null?f=H:p.next=H,p=R;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==p&&(S===null?Y.firstBaseUpdate=H:S.next=H,Y.lastBaseUpdate=R))}if(f!==null){var F=o.baseState;p=0,Y=H=R=null,S=f;do{var B=S.lane&-536870913,V=B!==S.lane;if(V?(_e&B)===B:(r&B)===B){B!==0&&B===br&&(Gu=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var re=e,me=S;B=t;var Pe=a;switch(me.tag){case 1:if(re=me.payload,typeof re=="function"){F=re.call(Pe,F,B);break e}F=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=me.payload,B=typeof re=="function"?re.call(Pe,F,B):re,B==null)break e;F=b({},F,B);break e;case 2:Da=!0}}B=S.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[B]:V.push(B))}else V={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(H=Y=V,R=F):Y=Y.next=V,p|=B;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;V=S,S=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);Y===null&&(R=F),o.baseState=R,o.firstBaseUpdate=H,o.lastBaseUpdate=Y,f===null&&(o.shared.lanes=0),qa|=p,e.lanes=p,e.memoizedState=F}}function mp(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function pp(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mp(a[e],t)}var Cr=A(null),xo=A(0);function gp(e,t){e=ca,Z(xo,e),Z(Cr,t),ca=e|t.baseLanes}function Yu(){Z(xo,ca),Z(Cr,Cr.current)}function Qu(){ca=xo.current,P(Cr),P(xo)}var Jt=A(null),pn=null;function Ua(e){var t=e.alternate;Z(lt,lt.current&1),Z(Jt,e),pn===null&&(t===null||Cr.current!==null||t.memoizedState!==null)&&(pn=e)}function Pu(e){Z(lt,lt.current),Z(Jt,e),pn===null&&(pn=e)}function yp(e){e.tag===22?(Z(lt,lt.current),Z(Jt,e),pn===null&&(pn=e)):ka()}function ka(){Z(lt,lt.current),Z(Jt,Jt.current)}function Wt(e){P(Jt),pn===e&&(pn=null),P(lt)}var lt=A(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Jf(a)||Wf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=0,be=null,Ye=null,ot=null,So=!1,jr=!1,Dl=!1,wo=0,Vi=0,Nr=null,LS=0;function tt(){throw Error(s(321))}function Xu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!It(e[a],t[a]))return!1;return!0}function Ku(e,t,a,r,o,f){return ta=f,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?eg:cf,Dl=!1,f=a(r,o),Dl=!1,jr&&(f=xp(t,a,r,o)),vp(e),f}function vp(e){U.H=Qi;var t=Ye!==null&&Ye.next!==null;if(ta=0,ot=Ye=be=null,So=!1,Vi=0,Nr=null,t)throw Error(s(300));e===null||ct||(e=e.dependencies,e!==null&&fo(e)&&(ct=!0))}function xp(e,t,a,r){be=e;var o=0;do{if(jr&&(Nr=null),Vi=0,jr=!1,25<=o)throw Error(s(301));if(o+=1,ot=Ye=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=tg,f=t(a,r)}while(jr);return f}function US(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Gi(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(be.flags|=1024),t}function Fu(){var e=wo!==0;return wo=0,e}function Zu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Iu(e){if(So){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}So=!1}ta=0,ot=Ye=be=null,jr=!1,Vi=wo=0,Nr=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?be.memoizedState=ot=e:ot=ot.next=e,ot}function rt(){if(Ye===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=ot===null?be.memoizedState:ot.next;if(t!==null)ot=t,Ye=e;else{if(e===null)throw be.alternate===null?Error(s(467)):Error(s(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},ot===null?be.memoizedState=ot=e:ot=ot.next=e}return ot}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(e){var t=Vi;return Vi+=1,Nr===null&&(Nr=[]),e=cp(Nr,e,t),t=be,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?eg:cf),e}function Co(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gi(e);if(e.$$typeof===M)return St(e)}throw Error(s(438,String(e)))}function $u(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=be.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=ne;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function jo(e){var t=rt();return Ju(t,Ye,e)}function Ju(e,t,a){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=a;var o=e.baseQueue,f=r.pending;if(f!==null){if(o!==null){var p=o.next;o.next=f.next,f.next=p}t.baseQueue=o=f,r.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=p=null,R=null,H=t,Y=!1;do{var F=H.lane&-536870913;if(F!==H.lane?(_e&F)===F:(ta&F)===F){var B=H.revertLane;if(B===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),F===br&&(Y=!0);else if((ta&B)===B){H=H.next,B===br&&(Y=!0);continue}else F={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(S=R=F,p=f):R=R.next=F,be.lanes|=B,qa|=B;F=H.action,Dl&&a(f,F),f=H.hasEagerState?H.eagerState:a(f,F)}else B={lane:F,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(S=R=B,p=f):R=R.next=B,be.lanes|=F,qa|=F;H=H.next}while(H!==null&&H!==t);if(R===null?p=f:R.next=S,!It(f,e.memoizedState)&&(ct=!0,Y&&(a=Sr,a!==null)))throw a;e.memoizedState=f,e.baseState=p,e.baseQueue=R,r.lastRenderedState=f}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wu(e){var t=rt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var p=o=o.next;do f=e(f,p.action),p=p.next;while(p!==o);It(f,t.memoizedState)||(ct=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function bp(e,t,a){var r=be,o=rt(),f=Oe;if(f){if(a===void 0)throw Error(s(407));a=a()}else a=t();var p=!It((Ye||o).memoizedState,a);if(p&&(o.memoizedState=a,ct=!0),o=o.queue,nf(Ep.bind(null,r,o,e),[e]),o.getSnapshot!==t||p||ot!==null&&ot.memoizedState.tag&1){if(r.flags|=2048,Tr(9,{destroy:void 0},wp.bind(null,r,o,a,t),null),Xe===null)throw Error(s(349));f||(ta&127)!==0||Sp(r,t,a)}return a}function Sp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Eo(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function wp(e,t,a,r){t.value=a,t.getSnapshot=r,Cp(t)&&jp(e)}function Ep(e,t,a){return a(function(){Cp(t)&&jp(e)})}function Cp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!It(e,a)}catch{return!0}}function jp(e){var t=Cl(e,2);t!==null&&Qt(t,e,2)}function ef(e){var t=zt();if(typeof e=="function"){var a=e;if(e=a(),Dl){Na(!0);try{a()}finally{Na(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Np(e,t,a,r){return e.baseState=a,Ju(e,Ye,typeof r=="function"?r:na)}function kS(e,t,a,r,o){if(Ro(e))throw Error(s(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};U.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Tp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Tp(e,t){var a=t.action,r=t.payload,o=e.state;if(t.isTransition){var f=U.T,p={};U.T=p;try{var S=a(o,r),R=U.S;R!==null&&R(p,S),Rp(e,t,S)}catch(H){tf(e,t,H)}finally{f!==null&&p.types!==null&&(f.types=p.types),U.T=f}}else try{f=a(o,r),Rp(e,t,f)}catch(H){tf(e,t,H)}}function Rp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){_p(e,t,r)},function(r){return tf(e,t,r)}):_p(e,t,a)}function _p(e,t,a){t.status="fulfilled",t.value=a,Ap(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tp(e,a)))}function tf(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Ap(t),t=t.next;while(t!==r)}e.action=null}function Ap(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Op(e,t){return t}function Mp(e,t){if(Oe){var a=Xe.formState;if(a!==null){e:{var r=be;if(Oe){if(Ze){t:{for(var o=Ze,f=mn;o.nodeType!==8;){if(!f){o=null;break t}if(o=gn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Ze=gn(o.nextSibling),r=o.data==="F!";break e}}Oa(r)}r=!1}r&&(t=a[0])}}return a=zt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Op,lastRenderedState:t},a.queue=r,a=$p.bind(null,be,r),r.dispatch=a,r=ef(!1),f=of.bind(null,be,!1,r.queue),r=zt(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,a=kS.bind(null,be,o,f,a),o.dispatch=a,r.memoizedState=e,[t,a,!1]}function Dp(e){var t=rt();return zp(t,Ye,e)}function zp(e,t,a){if(t=Ju(e,t,Op)[0],e=jo(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Gi(t)}catch(p){throw p===wr?po:p}else r=t;t=rt();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,Tr(9,{destroy:void 0},HS.bind(null,o,a),null)),[r,f,e]}function HS(e,t){e.action=t}function Lp(e){var t=rt(),a=Ye;if(a!==null)return zp(t,a,e);rt(),t=t.memoizedState,a=rt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function Tr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=be.updateQueue,t===null&&(t=Eo(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Up(){return rt().memoizedState}function No(e,t,a,r){var o=zt();be.flags|=e,o.memoizedState=Tr(1|t,{destroy:void 0},a,r===void 0?null:r)}function To(e,t,a,r){var o=rt();r=r===void 0?null:r;var f=o.memoizedState.inst;Ye!==null&&r!==null&&Xu(r,Ye.memoizedState.deps)?o.memoizedState=Tr(t,f,a,r):(be.flags|=e,o.memoizedState=Tr(1|t,f,a,r))}function kp(e,t){No(8390656,8,e,t)}function nf(e,t){To(2048,8,e,t)}function BS(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Eo(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hp(e){var t=rt().memoizedState;return BS({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Bp(e,t){return To(4,2,e,t)}function qp(e,t){return To(4,4,e,t)}function Vp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gp(e,t,a){a=a!=null?a.concat([e]):null,To(4,4,Vp.bind(null,t,e),a)}function af(){}function Yp(e,t){var a=rt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&Xu(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function Qp(e,t){var a=rt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&Xu(t,r[1]))return r[0];if(r=e(),Dl){Na(!0);try{e()}finally{Na(!1)}}return a.memoizedState=[r,t],r}function lf(e,t,a){return a===void 0||(ta&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Pg(),be.lanes|=e,qa|=e,a)}function Pp(e,t,a,r){return It(a,t)?a:Cr.current!==null?(e=lf(e,a,r),It(e,t)||(ct=!0),e):(ta&42)===0||(ta&1073741824)!==0&&(_e&261930)===0?(ct=!0,e.memoizedState=a):(e=Pg(),be.lanes|=e,qa|=e,t)}function Xp(e,t,a,r,o){var f=I.p;I.p=f!==0&&8>f?f:8;var p=U.T,S={};U.T=S,of(e,!1,t,a);try{var R=o(),H=U.S;if(H!==null&&H(S,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var Y=zS(R,r);Yi(e,t,Y,nn(e))}else Yi(e,t,r,nn(e))}catch(F){Yi(e,t,{then:function(){},status:"rejected",reason:F},nn())}finally{I.p=f,p!==null&&S.types!==null&&(p.types=S.types),U.T=p}}function qS(){}function rf(e,t,a,r){if(e.tag!==5)throw Error(s(476));var o=Kp(e).queue;Xp(e,o,t,W,a===null?qS:function(){return Fp(e),a(r)})}function Kp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fp(e){var t=Kp(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},nn())}function sf(){return St(is)}function Zp(){return rt().memoizedState}function Ip(){return rt().memoizedState}function VS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=nn();e=za(a);var r=La(t,e,a);r!==null&&(Qt(r,t,a),Hi(r,t,a)),t={cache:Lu()},e.payload=t;return}t=t.return}}function GS(e,t,a){var r=nn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ro(e)?Jp(t,a):(a=Cu(e,t,a,r),a!==null&&(Qt(a,e,r),Wp(a,t,r)))}function $p(e,t,a){var r=nn();Yi(e,t,a,r)}function Yi(e,t,a,r){var o={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ro(e))Jp(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,S=f(p,a);if(o.hasEagerState=!0,o.eagerState=S,It(S,p))return so(e,t,o,0),Xe===null&&io(),!1}catch{}finally{}if(a=Cu(e,t,o,r),a!==null)return Qt(a,e,r),Wp(a,t,r),!0}return!1}function of(e,t,a,r){if(r={lane:2,revertLane:qf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ro(e)){if(t)throw Error(s(479))}else t=Cu(e,a,r,2),t!==null&&Qt(t,e,2)}function Ro(e){var t=e.alternate;return e===be||t!==null&&t===be}function Jp(e,t){jr=So=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,lm(e,a)}}var Qi={readContext:St,use:Co,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Qi.useEffectEvent=tt;var eg={readContext:St,use:Co,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:kp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,No(4194308,4,Vp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var a=zt();t=t===void 0?null:t;var r=e();if(Dl){Na(!0);try{e()}finally{Na(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=zt();if(a!==void 0){var o=a(t);if(Dl){Na(!0);try{a(t)}finally{Na(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=GS.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=ef(e);var t=e.queue,a=$p.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:af,useDeferredValue:function(e,t){var a=zt();return lf(a,e,t)},useTransition:function(){var e=ef(!1);return e=Xp.bind(null,be,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=be,o=zt();if(Oe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Xe===null)throw Error(s(349));(_e&127)!==0||Sp(r,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,kp(Ep.bind(null,r,f,e),[e]),r.flags|=2048,Tr(9,{destroy:void 0},wp.bind(null,r,f,a,t),null),a},useId:function(){var e=zt(),t=Xe.identifierPrefix;if(Oe){var a=Mn,r=On;a=(r&~(1<<32-Zt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=wo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=LS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sf,useFormState:Mp,useActionState:Mp,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=of.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:$u,useCacheRefresh:function(){return zt().memoizedState=VS.bind(null,be)},useEffectEvent:function(e){var t=zt(),a={impl:e};return t.memoizedState=a,function(){if((Be&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},cf={readContext:St,use:Co,useCallback:Yp,useContext:St,useEffect:nf,useImperativeHandle:Gp,useInsertionEffect:Bp,useLayoutEffect:qp,useMemo:Qp,useReducer:jo,useRef:Up,useState:function(){return jo(na)},useDebugValue:af,useDeferredValue:function(e,t){var a=rt();return Pp(a,Ye.memoizedState,e,t)},useTransition:function(){var e=jo(na)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:bp,useId:Zp,useHostTransitionStatus:sf,useFormState:Dp,useActionState:Dp,useOptimistic:function(e,t){var a=rt();return Np(a,Ye,e,t)},useMemoCache:$u,useCacheRefresh:Ip};cf.useEffectEvent=Hp;var tg={readContext:St,use:Co,useCallback:Yp,useContext:St,useEffect:nf,useImperativeHandle:Gp,useInsertionEffect:Bp,useLayoutEffect:qp,useMemo:Qp,useReducer:Wu,useRef:Up,useState:function(){return Wu(na)},useDebugValue:af,useDeferredValue:function(e,t){var a=rt();return Ye===null?lf(a,e,t):Pp(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Wu(na)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:bp,useId:Zp,useHostTransitionStatus:sf,useFormState:Lp,useActionState:Lp,useOptimistic:function(e,t){var a=rt();return Ye!==null?Np(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$u,useCacheRefresh:Ip};tg.useEffectEvent=Hp;function uf(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ff={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=nn(),o=za(r);o.payload=t,a!=null&&(o.callback=a),t=La(e,o,r),t!==null&&(Qt(t,e,r),Hi(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=nn(),o=za(r);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=La(e,o,r),t!==null&&(Qt(t,e,r),Hi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=nn(),r=za(a);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,a),t!==null&&(Qt(t,e,a),Hi(t,e,a))}};function ng(e,t,a,r,o,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,p):t.prototype&&t.prototype.isPureReactComponent?!Ai(a,r)||!Ai(o,f):!0}function ag(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&ff.enqueueReplaceState(t,t.state,null)}function zl(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function lg(e){ro(e)}function rg(e){console.error(e)}function ig(e){ro(e)}function _o(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function sg(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function df(e,t,a){return a=za(a),a.tag=3,a.payload={element:null},a.callback=function(){_o(e,t)},a}function og(e){return e=za(e),e.tag=3,e}function cg(e,t,a,r){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=r.value;e.payload=function(){return o(f)},e.callback=function(){sg(t,a,r)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){sg(t,a,r),typeof o!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function YS(e,t,a,r,o){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&xr(t,a,o,!0),a=Jt.current,a!==null){switch(a.tag){case 31:case 13:return pn===null?Vo():a.alternate===null&&nt===0&&(nt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,r===go?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),kf(e,r,o)),!1;case 22:return a.flags|=65536,r===go?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),kf(e,r,o)),!1}throw Error(s(435,a.tag))}return kf(e,r,o),Vo(),!1}if(Oe)return t=Jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==Au&&(e=Error(s(422),{cause:r}),Di(fn(e,a)))):(r!==Au&&(t=Error(s(423),{cause:r}),Di(fn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=fn(r,a),o=df(e.stateNode,r,o),Vu(e,o),nt!==4&&(nt=2)),!1;var f=Error(s(520),{cause:r});if(f=fn(f,a),Ji===null?Ji=[f]:Ji.push(f),nt!==4&&(nt=2),t===null)return!0;r=fn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=df(a.stateNode,r,e),Vu(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Va===null||!Va.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=og(o),cg(o,e,a,r),Vu(a,o),!1}a=a.return}while(a!==null);return!1}var hf=Error(s(461)),ct=!1;function wt(e,t,a,r){t.child=e===null?hp(t,null,a,r):Ml(t,e.child,a,r)}function ug(e,t,a,r,o){a=a.render;var f=t.ref;if("ref"in r){var p={};for(var S in r)S!=="ref"&&(p[S]=r[S])}else p=r;return Rl(t),r=Ku(e,t,a,p,f,o),S=Fu(),e!==null&&!ct?(Zu(e,t,o),aa(e,t,o)):(Oe&&S&&Ru(t),t.flags|=1,wt(e,t,r,o),t.child)}function fg(e,t,a,r,o){if(e===null){var f=a.type;return typeof f=="function"&&!ju(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,dg(e,t,f,r,o)):(e=co(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Sf(e,o)){var p=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ai,a(p,r)&&e.ref===t.ref)return aa(e,t,o)}return t.flags|=1,e=$n(f,r),e.ref=t.ref,e.return=t,t.child=e}function dg(e,t,a,r,o){if(e!==null){var f=e.memoizedProps;if(Ai(f,r)&&e.ref===t.ref)if(ct=!1,t.pendingProps=r=f,Sf(e,o))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,aa(e,t,o)}return mf(e,t,a,r,o)}function hg(e,t,a,r){var o=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~f}else r=0,t.child=null;return mg(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mo(t,f!==null?f.cachePool:null),f!==null?gp(t,f):Yu(),yp(t);else return r=t.lanes=536870912,mg(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(mo(t,f.cachePool),gp(t,f),ka(),t.memoizedState=null):(e!==null&&mo(t,null),Yu(),ka());return wt(e,t,o,a),t.child}function Pi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mg(e,t,a,r,o){var f=ku();return f=f===null?null:{parent:st._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&mo(t,null),Yu(),yp(t),e!==null&&xr(e,t,r,!0),t.childLanes=o,null}function Ao(e,t){return t=Mo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pg(e,t,a){return Ml(t,e.child,null,a),e=Ao(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function QS(e,t,a){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(r.mode==="hidden")return e=Ao(t,r),t.lanes=536870912,Pi(null,e);if(Pu(t),(e=Ze)?(e=Ty(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:On,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},a=Jm(e),a.return=t,t.child=a,bt=t,Ze=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return Ao(t,r)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(Pu(t),o)if(t.flags&256)t.flags&=-257,t=pg(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ct||xr(e,t,a,!1),o=(a&e.childLanes)!==0,ct||o){if(r=Xe,r!==null&&(p=rm(r,a),p!==0&&p!==f.retryLane))throw f.retryLane=p,Cl(e,p),Qt(r,e,p),hf;Vo(),t=pg(e,t,a)}else e=f.treeContext,Ze=gn(p.nextSibling),bt=t,Oe=!0,Aa=null,mn=!1,e!==null&&tp(t,e),t=Ao(t,r),t.flags|=4096;return t}return e=$n(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mf(e,t,a,r,o){return Rl(t),a=Ku(e,t,a,r,void 0,o),r=Fu(),e!==null&&!ct?(Zu(e,t,o),aa(e,t,o)):(Oe&&r&&Ru(t),t.flags|=1,wt(e,t,a,o),t.child)}function gg(e,t,a,r,o,f){return Rl(t),t.updateQueue=null,a=xp(t,r,a,o),vp(e),r=Fu(),e!==null&&!ct?(Zu(e,t,f),aa(e,t,f)):(Oe&&r&&Ru(t),t.flags|=1,wt(e,t,a,f),t.child)}function yg(e,t,a,r,o){if(Rl(t),t.stateNode===null){var f=pr,p=a.contextType;typeof p=="object"&&p!==null&&(f=St(p)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ff,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},Bu(t),p=a.contextType,f.context=typeof p=="object"&&p!==null?St(p):pr,f.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(uf(t,a,p,r),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&ff.enqueueReplaceState(f,f.state,null),qi(t,r,f,o),Bi(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,R=zl(a,S);f.props=R;var H=f.context,Y=a.contextType;p=pr,typeof Y=="object"&&Y!==null&&(p=St(Y));var F=a.getDerivedStateFromProps;Y=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||H!==p)&&ag(t,f,r,p),Da=!1;var B=t.memoizedState;f.state=B,qi(t,r,f,o),Bi(),H=t.memoizedState,S||B!==H||Da?(typeof F=="function"&&(uf(t,a,F,r),H=t.memoizedState),(R=Da||ng(t,a,R,r,B,H,p))?(Y||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=H),f.props=r,f.state=H,f.context=p,r=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,qu(e,t),p=t.memoizedProps,Y=zl(a,p),f.props=Y,F=t.pendingProps,B=f.context,H=a.contextType,R=pr,typeof H=="object"&&H!==null&&(R=St(H)),S=a.getDerivedStateFromProps,(H=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==F||B!==R)&&ag(t,f,r,R),Da=!1,B=t.memoizedState,f.state=B,qi(t,r,f,o),Bi();var V=t.memoizedState;p!==F||B!==V||Da||e!==null&&e.dependencies!==null&&fo(e.dependencies)?(typeof S=="function"&&(uf(t,a,S,r),V=t.memoizedState),(Y=Da||ng(t,a,Y,r,B,V,R)||e!==null&&e.dependencies!==null&&fo(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,V,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,V,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=V),f.props=r,f.state=V,f.context=R,r=Y):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Oo(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Ml(t,e.child,null,o),t.child=Ml(t,null,a,o)):wt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=aa(e,t,o),e}function vg(e,t,a,r){return Nl(),t.flags|=256,wt(e,t,a,r),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gf(e){return{baseLanes:e,cachePool:sp()}}function yf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=tn),e}function xg(e,t,a){var r=t.pendingProps,o=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(o?Ua(t):ka(),(e=Ze)?(e=Ty(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_a!==null?{id:On,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},a=Jm(e),a.return=t,t.child=a,bt=t,Ze=null)):e=null,e===null)throw Oa(t);return Wf(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,o?(ka(),o=t.mode,S=Mo({mode:"hidden",children:S},o),r=jl(r,o,a,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=gf(a),r.childLanes=yf(e,p,a),t.memoizedState=pf,Pi(null,r)):(Ua(t),vf(t,S))}var R=e.memoizedState;if(R!==null&&(S=R.dehydrated,S!==null)){if(f)t.flags&256?(Ua(t),t.flags&=-257,t=xf(e,t,a)):t.memoizedState!==null?(ka(),t.child=e.child,t.flags|=128,t=null):(ka(),S=r.fallback,o=t.mode,r=Mo({mode:"visible",children:r.children},o),S=jl(S,o,a,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Ml(t,e.child,null,a),r=t.child,r.memoizedState=gf(a),r.childLanes=yf(e,p,a),t.memoizedState=pf,t=Pi(null,r));else if(Ua(t),Wf(S)){if(p=S.nextSibling&&S.nextSibling.dataset,p)var H=p.dgst;p=H,r=Error(s(419)),r.stack="",r.digest=p,Di({value:r,source:null,stack:null}),t=xf(e,t,a)}else if(ct||xr(e,t,a,!1),p=(a&e.childLanes)!==0,ct||p){if(p=Xe,p!==null&&(r=rm(p,a),r!==0&&r!==R.retryLane))throw R.retryLane=r,Cl(e,r),Qt(p,e,r),hf;Jf(S)||Vo(),t=xf(e,t,a)}else Jf(S)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Ze=gn(S.nextSibling),bt=t,Oe=!0,Aa=null,mn=!1,e!==null&&tp(t,e),t=vf(t,r.children),t.flags|=4096);return t}return o?(ka(),S=r.fallback,o=t.mode,R=e.child,H=R.sibling,r=$n(R,{mode:"hidden",children:r.children}),r.subtreeFlags=R.subtreeFlags&65011712,H!==null?S=$n(H,S):(S=jl(S,o,a,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,Pi(null,r),r=t.child,S=e.child.memoizedState,S===null?S=gf(a):(o=S.cachePool,o!==null?(R=st._currentValue,o=o.parent!==R?{parent:R,pool:R}:o):o=sp(),S={baseLanes:S.baseLanes|a,cachePool:o}),r.memoizedState=S,r.childLanes=yf(e,p,a),t.memoizedState=pf,Pi(e.child,r)):(Ua(t),a=e.child,e=a.sibling,a=$n(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function vf(e,t){return t=Mo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mo(e,t){return e=$t(22,e,null,t),e.lanes=0,e}function xf(e,t,a){return Ml(t,e.child,null,a),e=vf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bg(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Du(e.return,t,a)}function bf(e,t,a,r,o,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=r,p.tail=a,p.tailMode=o,p.treeForkCount=f)}function Sg(e,t,a){var r=t.pendingProps,o=r.revealOrder,f=r.tail;r=r.children;var p=lt.current,S=(p&2)!==0;if(S?(p=p&1|2,t.flags|=128):p&=1,Z(lt,p),wt(e,t,r,a),r=Oe?Mi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bg(e,a,t);else if(e.tag===19)bg(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&bo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),bf(t,!1,o,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&bo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}bf(t,!0,a,null,f,r);break;case"together":bf(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(xr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=$n(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$n(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Sf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fo(e)))}function PS(e,t,a){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),Ma(t,st,e.memoizedState.cache),Nl();break;case 27:case 5:Le(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Pu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ua(t),t.flags|=128,null):(a&t.child.childLanes)!==0?xg(e,t,a):(Ua(t),e=aa(e,t,a),e!==null?e.sibling:null);Ua(t);break;case 19:var o=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(xr(e,t,a,!1),r=(a&t.childLanes)!==0),o){if(r)return Sg(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Z(lt,lt.current),r)break;return null;case 22:return t.lanes=0,hg(e,t,a,t.pendingProps);case 24:Ma(t,st,e.memoizedState.cache)}return aa(e,t,a)}function wg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Sf(e,a)&&(t.flags&128)===0)return ct=!1,PS(e,t,a);ct=(e.flags&131072)!==0}else ct=!1,Oe&&(t.flags&1048576)!==0&&ep(t,Mi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Al(t.elementType),t.type=e,typeof e=="function")ju(e)?(r=zl(e,r),t.tag=1,t=yg(null,t,e,r,a)):(t.tag=0,t=mf(null,t,e,r,a));else{if(e!=null){var o=e.$$typeof;if(o===z){t.tag=11,t=ug(null,t,e,r,a);break e}else if(o===G){t.tag=14,t=fg(null,t,e,r,a);break e}}throw t=ce(e)||e,Error(s(306,t,""))}}return t;case 0:return mf(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,o=zl(r,t.pendingProps),yg(e,t,r,o,a);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var f=t.memoizedState;o=f.element,qu(e,t),qi(t,r,null,a);var p=t.memoizedState;if(r=p.cache,Ma(t,st,r),r!==f.cache&&zu(t,[st],a,!0),Bi(),r=p.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=vg(e,t,r,a);break e}else if(r!==o){o=fn(Error(s(424)),t),Di(o),t=vg(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ze=gn(e.firstChild),bt=t,Oe=!0,Aa=null,mn=!0,a=hp(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Nl(),r===o){t=aa(e,t,a);break e}wt(e,t,r,a)}t=t.child}return t;case 26:return Oo(e,t),e===null?(a=Dy(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,r=Fo(he.current).createElement(a),r[xt]=t,r[Ht]=e,Et(r,a,e),gt(r),t.stateNode=r):t.memoizedState=Dy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Le(t),e===null&&Oe&&(r=t.stateNode=Ay(t.type,t.pendingProps,he.current),bt=t,mn=!0,o=Ze,Pa(t.type)?(ed=o,Ze=gn(r.firstChild)):Ze=o),wt(e,t,t.pendingProps.children,a),Oo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((o=r=Ze)&&(r=S2(r,t.type,t.pendingProps,mn),r!==null?(t.stateNode=r,bt=t,Ze=gn(r.firstChild),mn=!1,o=!0):o=!1),o||Oa(t)),Le(t),o=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,r=f.children,Zf(o,f)?r=null:p!==null&&Zf(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=Ku(e,t,US,null,null,a),is._currentValue=o),Oo(e,t),wt(e,t,r,a),t.child;case 6:return e===null&&Oe&&((e=a=Ze)&&(a=w2(a,t.pendingProps,mn),a!==null?(t.stateNode=a,bt=t,Ze=null,e=!0):e=!1),e||Oa(t)),null;case 13:return xg(e,t,a);case 4:return Se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ml(t,null,r,a):wt(e,t,r,a),t.child;case 11:return ug(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Ma(t,t.type,r.value),wt(e,t,r.children,a),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Rl(t),o=St(o),r=r(o),t.flags|=1,wt(e,t,r,a),t.child;case 14:return fg(e,t,t.type,t.pendingProps,a);case 15:return dg(e,t,t.type,t.pendingProps,a);case 19:return Sg(e,t,a);case 31:return QS(e,t,a);case 22:return hg(e,t,a,t.pendingProps);case 24:return Rl(t),r=St(st),e===null?(o=ku(),o===null&&(o=Xe,f=Lu(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:r,cache:o},Bu(t),Ma(t,st,o)):((e.lanes&a)!==0&&(qu(e,t),qi(t,null,null,a),Bi()),o=e.memoizedState,f=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ma(t,st,r)):(r=f.cache,Ma(t,st,r),r!==o.cache&&zu(t,[st],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function la(e){e.flags|=4}function wf(e,t,a,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Zg())e.flags|=8192;else throw Ol=go,Hu}else e.flags&=-16777217}function Eg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hy(t))if(Zg())e.flags|=8192;else throw Ol=go,Hu}function Do(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nm():536870912,e.lanes|=t,Or|=t)}function Xi(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function XS(e,t,a){var r=t.pendingProps;switch(_u(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(st),Ne(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vr(t)?la(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ou())),Ie(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(la(t),f!==null?(Ie(t),Eg(t,f)):(Ie(t),wf(t,o,null,r,a))):f?f!==e.memoizedState?(la(t),Ie(t),Eg(t,f)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&la(t),Ie(t),wf(t,o,e,r,a)),null;case 27:if(De(t),a=he.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ie(t),null}e=$.current,vr(t)?np(t):(e=Ay(o,r,a),t.stateNode=e,la(t))}return Ie(t),null;case 5:if(De(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ie(t),null}if(f=$.current,vr(t))np(t);else{var p=Fo(he.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?p.createElement("select",{is:r.is}):p.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?p.createElement(o,{is:r.is}):p.createElement(o)}}f[xt]=t,f[Ht]=r;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(Et(f,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&la(t)}}return Ie(t),wf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&la(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(e=he.current,vr(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,o=bt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[xt]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||xy(e.nodeValue,a)),e||Oa(t,!0)}else e=Fo(e).createTextNode(r),e[xt]=t,t.stateNode=e}return Ie(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=vr(t),a!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[xt]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else a=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return Ie(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=vr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[xt]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),o=!1}else o=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==o&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Do(t,t.updateQueue),Ie(t),null);case 4:return Ne(),e===null&&Qf(t.stateNode.containerInfo),Ie(t),null;case 10:return ea(t.type),Ie(t),null;case 19:if(P(lt),r=t.memoizedState,r===null)return Ie(t),null;if(o=(t.flags&128)!==0,f=r.rendering,f===null)if(o)Xi(r,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=bo(e),f!==null){for(t.flags|=128,Xi(r,!1),e=f.updateQueue,t.updateQueue=e,Do(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)$m(a,e),a=a.sibling;return Z(lt,lt.current&1|2),Oe&&Jn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Kt()>Ho&&(t.flags|=128,o=!0,Xi(r,!1),t.lanes=4194304)}else{if(!o)if(e=bo(f),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Do(t,e),Xi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Oe)return Ie(t),null}else 2*Kt()-r.renderingStartTime>Ho&&a!==536870912&&(t.flags|=128,o=!0,Xi(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Kt(),e.sibling=null,a=lt.current,Z(lt,o?a&1|2:a&1),Oe&&Jn(t,r.treeForkCount),e):(Ie(t),null);case 22:case 23:return Wt(t),Qu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),a=t.updateQueue,a!==null&&Do(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&P(_l),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ea(st),Ie(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function KS(e,t){switch(_u(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(st),Ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(s(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(lt),null;case 4:return Ne(),null;case 10:return ea(t.type),null;case 22:case 23:return Wt(t),Qu(),e!==null&&P(_l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(st),null;case 25:return null;default:return null}}function Cg(e,t){switch(_u(t),t.tag){case 3:ea(st),Ne();break;case 26:case 27:case 5:De(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:P(lt);break;case 10:ea(t.type);break;case 22:case 23:Wt(t),Qu(),e!==null&&P(_l);break;case 24:ea(st)}}function Ki(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var o=r.next;a=o;do{if((a.tag&e)===e){r=void 0;var f=a.create,p=a.inst;r=f(),p.destroy=r}a=a.next}while(a!==o)}}catch(S){Ge(t,t.return,S)}}function Ha(e,t,a){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&e)===e){var p=r.inst,S=p.destroy;if(S!==void 0){p.destroy=void 0,o=t;var R=a,H=S;try{H()}catch(Y){Ge(o,R,Y)}}}r=r.next}while(r!==f)}}catch(Y){Ge(t,t.return,Y)}}function jg(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pp(t,a)}catch(r){Ge(e,e.return,r)}}}function Ng(e,t,a){a.props=zl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){Ge(e,t,r)}}function Fi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(o){Ge(e,t,o)}}function Dn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function Tg(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function Ef(e,t,a){try{var r=e.stateNode;p2(r,e.type,a,t),r[Ht]=t}catch(o){Ge(e,e.return,o)}}function Rg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pa(e.type)||e.tag===4}function Cf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pa(e.type)||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 jf(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(r!==4&&(r===27&&Pa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jf(e,t,a),e=e.sibling;e!==null;)jf(e,t,a),e=e.sibling}function zo(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&Pa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(zo(e,t,a),e=e.sibling;e!==null;)zo(e,t,a),e=e.sibling}function _g(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Et(t,r,a),t[xt]=e,t[Ht]=a}catch(f){Ge(e,e.return,f)}}var ra=!1,ut=!1,Nf=!1,Ag=typeof WeakSet=="function"?WeakSet:Set,yt=null;function FS(e,t){if(e=e.containerInfo,Kf=tc,e=Gm(e),vu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var p=0,S=-1,R=-1,H=0,Y=0,F=e,B=null;t:for(;;){for(var V;F!==a||o!==0&&F.nodeType!==3||(S=p+o),F!==f||r!==0&&F.nodeType!==3||(R=p+r),F.nodeType===3&&(p+=F.nodeValue.length),(V=F.firstChild)!==null;)B=F,F=V;for(;;){if(F===e)break t;if(B===a&&++H===o&&(S=p),B===f&&++Y===r&&(R=p),(V=F.nextSibling)!==null)break;F=B,B=F.parentNode}F=V}a=S===-1||R===-1?null:{start:S,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ff={focusedElem:e,selectionRange:a},tc=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var re=zl(a.type,o);e=r.getSnapshotBeforeUpdate(re,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(me){Ge(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)$f(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$f(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=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}}function Og(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:sa(e,a),r&4&&Ki(5,a);break;case 1:if(sa(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Ge(a,a.return,p)}else{var o=zl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Ge(a,a.return,p)}}r&64&&jg(a),r&512&&Fi(a,a.return);break;case 3:if(sa(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pp(e,t)}catch(p){Ge(a,a.return,p)}}break;case 27:t===null&&r&4&&_g(a);case 26:case 5:sa(e,a),t===null&&r&4&&Tg(a),r&512&&Fi(a,a.return);break;case 12:sa(e,a);break;case 31:sa(e,a),r&4&&zg(e,a);break;case 13:sa(e,a),r&4&&Lg(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=a2.bind(null,a),E2(e,a))));break;case 22:if(r=a.memoizedState!==null||ra,!r){t=t!==null&&t.memoizedState!==null||ut,o=ra;var f=ut;ra=r,(ut=t)&&!f?oa(e,a,(a.subtreeFlags&8772)!==0):sa(e,a),ra=o,ut=f}break;case 30:break;default:sa(e,a)}}function Mg(e){var t=e.alternate;t!==null&&(e.alternate=null,Mg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var We=null,qt=!1;function ia(e,t,a){for(a=a.child;a!==null;)Dg(e,t,a),a=a.sibling}function Dg(e,t,a){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(vi,a)}catch{}switch(a.tag){case 26:ut||Dn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ut||Dn(a,t);var r=We,o=qt;Pa(a.type)&&(We=a.stateNode,qt=!1),ia(e,t,a),as(a.stateNode),We=r,qt=o;break;case 5:ut||Dn(a,t);case 6:if(r=We,o=qt,We=null,ia(e,t,a),We=r,qt=o,We!==null)if(qt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(a.stateNode)}catch(f){Ge(a,t,f)}else try{We.removeChild(a.stateNode)}catch(f){Ge(a,t,f)}break;case 18:We!==null&&(qt?(e=We,jy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Br(e)):jy(We,a.stateNode));break;case 4:r=We,o=qt,We=a.stateNode.containerInfo,qt=!0,ia(e,t,a),We=r,qt=o;break;case 0:case 11:case 14:case 15:Ha(2,a,t),ut||Ha(4,a,t),ia(e,t,a);break;case 1:ut||(Dn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Ng(a,t,r)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:ut=(r=ut)||a.memoizedState!==null,ia(e,t,a),ut=r;break;default:ia(e,t,a)}}function zg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Br(e)}catch(a){Ge(t,t.return,a)}}}function Lg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Br(e)}catch(a){Ge(t,t.return,a)}}function ZS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ag),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ag),t;default:throw Error(s(435,e.tag))}}function Lo(e,t){var a=ZS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var o=l2.bind(null,e,r);r.then(o,o)}})}function Vt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r],f=e,p=t,S=p;e:for(;S!==null;){switch(S.tag){case 27:if(Pa(S.type)){We=S.stateNode,qt=!1;break e}break;case 5:We=S.stateNode,qt=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,qt=!0;break e}S=S.return}if(We===null)throw Error(s(160));Dg(f,p,o),We=null,qt=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ug(t,e),t=t.sibling}var En=null;function Ug(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Gt(e),r&4&&(Ha(3,e,e.return),Ki(3,e),Ha(5,e,e.return));break;case 1:Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),r&64&&ra&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var o=En;if(Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":f=o.getElementsByTagName("title")[0],(!f||f[Si]||f[xt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(r),o.head.insertBefore(f,o.querySelector("head > title"))),Et(f,r,a),f[xt]=e,gt(f),r=f;break e;case"link":var p=Uy("link","href",o).get(r+(a.href||""));if(p){for(var S=0;S<p.length;S++)if(f=p[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(S,1);break t}}f=o.createElement(r),Et(f,r,a),o.head.appendChild(f);break;case"meta":if(p=Uy("meta","content",o).get(r+(a.content||""))){for(S=0;S<p.length;S++)if(f=p[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(S,1);break t}}f=o.createElement(r),Et(f,r,a),o.head.appendChild(f);break;default:throw Error(s(468,r))}f[xt]=e,gt(f),r=f}e.stateNode=r}else ky(o,e.type,e.stateNode);else e.stateNode=Ly(o,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?ky(o,e.type,e.stateNode):Ly(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Ef(e,e.memoizedProps,a.memoizedProps)}break;case 27:Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),a!==null&&r&4&&Ef(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Vt(t,e),Gt(e),r&512&&(ut||a===null||Dn(a,a.return)),e.flags&32){o=e.stateNode;try{or(o,"")}catch(re){Ge(e,e.return,re)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,Ef(e,o,a!==null?a.memoizedProps:o)),r&1024&&(Nf=!0);break;case 6:if(Vt(t,e),Gt(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(re){Ge(e,e.return,re)}}break;case 3:if($o=null,o=En,En=Zo(t.containerInfo),Vt(t,e),En=o,Gt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Br(t.containerInfo)}catch(re){Ge(e,e.return,re)}Nf&&(Nf=!1,kg(e));break;case 4:r=En,En=Zo(e.stateNode.containerInfo),Vt(t,e),Gt(e),En=r;break;case 12:Vt(t,e),Gt(e);break;case 31:Vt(t,e),Gt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 13:Vt(t,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ko=Kt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 22:o=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,H=ra,Y=ut;if(ra=H||o,ut=Y||R,Vt(t,e),ut=Y,ra=H,Gt(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||R||ra||ut||Ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(f=R.stateNode,o)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{S=R.stateNode;var F=R.memoizedProps.style,B=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(re){Ge(R,R.return,re)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=o?"":R.memoizedProps}catch(re){Ge(R,R.return,re)}}}else if(t.tag===18){if(a===null){R=t;try{var V=R.stateNode;o?Ny(V,!0):Ny(R.stateNode,!1)}catch(re){Ge(R,R.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Lo(e,a))));break;case 19:Vt(t,e),Gt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lo(e,r)));break;case 30:break;case 21:break;default:Vt(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Rg(r)){a=r;break}r=r.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,f=Cf(e);zo(e,f,o);break;case 5:var p=a.stateNode;a.flags&32&&(or(p,""),a.flags&=-33);var S=Cf(e);zo(e,S,p);break;case 3:case 4:var R=a.stateNode.containerInfo,H=Cf(e);jf(e,H,R);break;default:throw Error(s(161))}}catch(Y){Ge(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Og(e,t.alternate,t),t=t.sibling}function Ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ha(4,t,t.return),Ll(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ng(t,t.return,a),Ll(t);break;case 27:as(t.stateNode);case 26:case 5:Dn(t,t.return),Ll(t);break;case 22:t.memoizedState===null&&Ll(t);break;case 30:Ll(t);break;default:Ll(t)}e=e.sibling}}function oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:oa(o,f,a),Ki(4,f);break;case 1:if(oa(o,f,a),r=f,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){Ge(r,r.return,H)}if(r=f,o=r.updateQueue,o!==null){var S=r.stateNode;try{var R=o.shared.hiddenCallbacks;if(R!==null)for(o.shared.hiddenCallbacks=null,o=0;o<R.length;o++)mp(R[o],S)}catch(H){Ge(r,r.return,H)}}a&&p&64&&jg(f),Fi(f,f.return);break;case 27:_g(f);case 26:case 5:oa(o,f,a),a&&r===null&&p&4&&Tg(f),Fi(f,f.return);break;case 12:oa(o,f,a);break;case 31:oa(o,f,a),a&&p&4&&zg(o,f);break;case 13:oa(o,f,a),a&&p&4&&Lg(o,f);break;case 22:f.memoizedState===null&&oa(o,f,a),Fi(f,f.return);break;case 30:break;default:oa(o,f,a)}t=t.sibling}}function Tf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&zi(a))}function Rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e))}function Cn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hg(e,t,a,r),t=t.sibling}function Hg(e,t,a,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,a,r),o&2048&&Ki(9,t);break;case 1:Cn(e,t,a,r);break;case 3:Cn(e,t,a,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e)));break;case 12:if(o&2048){Cn(e,t,a,r),e=t.stateNode;try{var f=t.memoizedProps,p=f.id,S=f.onPostCommit;typeof S=="function"&&S(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Ge(t,t.return,R)}}else Cn(e,t,a,r);break;case 31:Cn(e,t,a,r);break;case 13:Cn(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,p=t.alternate,t.memoizedState!==null?f._visibility&2?Cn(e,t,a,r):Zi(e,t):f._visibility&2?Cn(e,t,a,r):(f._visibility|=2,Rr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Tf(p,t);break;case 24:Cn(e,t,a,r),o&2048&&Rf(t.alternate,t);break;default:Cn(e,t,a,r)}}function Rr(e,t,a,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,S=a,R=r,H=p.flags;switch(p.tag){case 0:case 11:case 15:Rr(f,p,S,R,o),Ki(8,p);break;case 23:break;case 22:var Y=p.stateNode;p.memoizedState!==null?Y._visibility&2?Rr(f,p,S,R,o):Zi(f,p):(Y._visibility|=2,Rr(f,p,S,R,o)),o&&H&2048&&Tf(p.alternate,p);break;case 24:Rr(f,p,S,R,o),o&&H&2048&&Rf(p.alternate,p);break;default:Rr(f,p,S,R,o)}t=t.sibling}}function Zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,o=r.flags;switch(r.tag){case 22:Zi(a,r),o&2048&&Tf(r.alternate,r);break;case 24:Zi(a,r),o&2048&&Rf(r.alternate,r);break;default:Zi(a,r)}t=t.sibling}}var Ii=8192;function _r(e,t,a){if(e.subtreeFlags&Ii)for(e=e.child;e!==null;)Bg(e,t,a),e=e.sibling}function Bg(e,t,a){switch(e.tag){case 26:_r(e,t,a),e.flags&Ii&&e.memoizedState!==null&&L2(a,En,e.memoizedState,e.memoizedProps);break;case 5:_r(e,t,a);break;case 3:case 4:var r=En;En=Zo(e.stateNode.containerInfo),_r(e,t,a),En=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ii,Ii=16777216,_r(e,t,a),Ii=r):_r(e,t,a));break;default:_r(e,t,a)}}function qg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function $i(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];yt=r,Gg(r,e)}qg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vg(e),e=e.sibling}function Vg(e){switch(e.tag){case 0:case 11:case 15:$i(e),e.flags&2048&&Ha(9,e,e.return);break;case 3:$i(e);break;case 12:$i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uo(e)):$i(e);break;default:$i(e)}}function Uo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];yt=r,Gg(r,e)}qg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ha(8,t,t.return),Uo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Uo(t));break;default:Uo(t)}e=e.sibling}}function Gg(e,t){for(;yt!==null;){var a=yt;switch(a.tag){case 0:case 11:case 15:Ha(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:zi(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,yt=r;else e:for(a=e;yt!==null;){r=yt;var o=r.sibling,f=r.return;if(Mg(r),r===a){yt=null;break e}if(o!==null){o.return=f,yt=o;break e}yt=f}}}var IS={getCacheForType:function(e){var t=St(st),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return St(st).controller.signal}},$S=typeof WeakMap=="function"?WeakMap:Map,Be=0,Xe=null,Te=null,_e=0,Ve=0,en=null,Ba=!1,Ar=!1,_f=!1,ca=0,nt=0,qa=0,Ul=0,Af=0,tn=0,Or=0,Ji=null,Yt=null,Of=!1,ko=0,Yg=0,Ho=1/0,Bo=null,Va=null,ht=0,Ga=null,Mr=null,ua=0,Mf=0,Df=null,Qg=null,Wi=0,zf=null;function nn(){return(Be&2)!==0&&_e!==0?_e&-_e:U.T!==null?qf():im()}function Pg(){if(tn===0)if((_e&536870912)===0||Oe){var e=Xs;Xs<<=1,(Xs&3932160)===0&&(Xs=262144),tn=e}else tn=536870912;return e=Jt.current,e!==null&&(e.flags|=32),tn}function Qt(e,t,a){(e===Xe&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Dr(e,0),Ya(e,_e,tn,!1)),bi(e,a),((Be&2)===0||e!==Xe)&&(e===Xe&&((Be&2)===0&&(Ul|=a),nt===4&&Ya(e,_e,tn,!1)),zn(e))}function Xg(e,t,a){if((Be&6)!==0)throw Error(s(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||xi(e,t),o=r?e2(e,t):Uf(e,t,!0),f=r;do{if(o===0){Ar&&!r&&Ya(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!JS(a)){o=Uf(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var S=e;o=Ji;var R=S.current.memoizedState.isDehydrated;if(R&&(Dr(S,p).flags|=256),p=Uf(S,p,!1),p!==2){if(_f&&!R){S.errorRecoveryDisabledLanes|=f,Ul|=f,o=4;break e}f=Yt,Yt=o,f!==null&&(Yt===null?Yt=f:Yt.push.apply(Yt,f))}o=p}if(f=!1,o!==2)continue}}if(o===1){Dr(e,0),Ya(e,t,0,!0);break}e:{switch(r=e,f=o,f){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ya(r,t,tn,!Ba);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=ko+300-Kt(),10<o)){if(Ya(r,t,tn,!Ba),Fs(r,0,!0)!==0)break e;ua=t,r.timeoutHandle=Ey(Kg.bind(null,r,a,Yt,Bo,Of,t,tn,Ul,Or,Ba,f,"Throttled",-0,0),o);break e}Kg(r,a,Yt,Bo,Of,t,tn,Ul,Or,Ba,f,null,-0,0)}}break}while(!0);zn(e)}function Kg(e,t,a,r,o,f,p,S,R,H,Y,F,B,V){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Bg(t,f,F);var re=(f&62914560)===f?ko-Kt():(f&4194048)===f?Yg-Kt():0;if(re=U2(F,re),re!==null){ua=f,e.cancelPendingCommit=re(ty.bind(null,e,t,f,a,r,o,p,S,R,Y,F,null,B,V)),Ya(e,f,p,!H);return}}ty(e,t,f,a,r,o,p,S,R)}function JS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var o=a[r],f=o.getSnapshot;o=o.value;try{if(!It(f(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ya(e,t,a,r){t&=~Af,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var f=31-Zt(o),p=1<<f;r[f]=-1,o&=~p}a!==0&&am(e,a,t)}function qo(){return(Be&6)===0?(es(0),!1):!0}function Lf(){if(Te!==null){if(Ve===0)var e=Te.return;else e=Te,Wn=Tl=null,Iu(e),Er=null,Ui=0,e=Te;for(;e!==null;)Cg(e.alternate,e),e=e.return;Te=null}}function Dr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,v2(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ua=0,Lf(),Xe=e,Te=a=$n(e.current,null),_e=t,Ve=0,en=null,Ba=!1,Ar=xi(e,t),_f=!1,Or=tn=Af=Ul=qa=nt=0,Yt=Ji=null,Of=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-Zt(r),f=1<<o;t|=e[o],r&=~f}return ca=t,io(),a}function Fg(e,t){be=null,U.H=Qi,t===wr||t===po?(t=up(),Ve=3):t===Hu?(t=up(),Ve=4):Ve=t===hf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,en=t,Te===null&&(nt=1,_o(e,fn(t,e.current)))}function Zg(){var e=Jt.current;return e===null?!0:(_e&4194048)===_e?pn===null:(_e&62914560)===_e||(_e&536870912)!==0?e===pn:!1}function Ig(){var e=U.H;return U.H=Qi,e===null?Qi:e}function $g(){var e=U.A;return U.A=IS,e}function Vo(){nt=4,Ba||(_e&4194048)!==_e&&Jt.current!==null||(Ar=!0),(qa&134217727)===0&&(Ul&134217727)===0||Xe===null||Ya(Xe,_e,tn,!1)}function Uf(e,t,a){var r=Be;Be|=2;var o=Ig(),f=$g();(Xe!==e||_e!==t)&&(Bo=null,Dr(e,t)),t=!1;var p=nt;e:do try{if(Ve!==0&&Te!==null){var S=Te,R=en;switch(Ve){case 8:Lf(),p=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var H=Ve;if(Ve=0,en=null,zr(e,S,R,H),a&&Ar){p=0;break e}break;default:H=Ve,Ve=0,en=null,zr(e,S,R,H)}}WS(),p=nt;break}catch(Y){Fg(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Wn=Tl=null,Be=r,U.H=o,U.A=f,Te===null&&(Xe=null,_e=0,io()),p}function WS(){for(;Te!==null;)Jg(Te)}function e2(e,t){var a=Be;Be|=2;var r=Ig(),o=$g();Xe!==e||_e!==t?(Bo=null,Ho=Kt()+500,Dr(e,t)):Ar=xi(e,t);e:do try{if(Ve!==0&&Te!==null){t=Te;var f=en;t:switch(Ve){case 1:Ve=0,en=null,zr(e,t,f,1);break;case 2:case 9:if(op(f)){Ve=0,en=null,Wg(t);break}t=function(){Ve!==2&&Ve!==9||Xe!==e||(Ve=7),zn(e)},f.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:op(f)?(Ve=0,en=null,Wg(t)):(Ve=0,en=null,zr(e,t,f,7));break;case 5:var p=null;switch(Te.tag){case 26:p=Te.memoizedState;case 5:case 27:var S=Te;if(p?Hy(p):S.stateNode.complete){Ve=0,en=null;var R=S.sibling;if(R!==null)Te=R;else{var H=S.return;H!==null?(Te=H,Go(H)):Te=null}break t}}Ve=0,en=null,zr(e,t,f,5);break;case 6:Ve=0,en=null,zr(e,t,f,6);break;case 8:Lf(),nt=6;break e;default:throw Error(s(462))}}t2();break}catch(Y){Fg(e,Y)}while(!0);return Wn=Tl=null,U.H=r,U.A=o,Be=a,Te!==null?0:(Xe=null,_e=0,io(),nt)}function t2(){for(;Te!==null&&!C1();)Jg(Te)}function Jg(e){var t=wg(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?Go(e):Te=t}function Wg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=gg(a,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=gg(a,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Iu(t);default:Cg(a,t),t=Te=$m(t,ca),t=wg(a,t,ca)}e.memoizedProps=e.pendingProps,t===null?Go(e):Te=t}function zr(e,t,a,r){Wn=Tl=null,Iu(t),Er=null,Ui=0;var o=t.return;try{if(YS(e,o,t,a,_e)){nt=1,_o(e,fn(a,e.current)),Te=null;return}}catch(f){if(o!==null)throw Te=o,f;nt=1,_o(e,fn(a,e.current)),Te=null;return}t.flags&32768?(Oe||r===1?e=!0:Ar||(_e&536870912)!==0?e=!1:(Ba=e=!0,(r===2||r===9||r===3||r===6)&&(r=Jt.current,r!==null&&r.tag===13&&(r.flags|=16384))),ey(t,e)):Go(t)}function Go(e){var t=e;do{if((t.flags&32768)!==0){ey(t,Ba);return}e=t.return;var a=XS(t.alternate,t,ca);if(a!==null){Te=a;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);nt===0&&(nt=5)}function ey(e,t){do{var a=KS(e.alternate,e);if(a!==null){a.flags&=32767,Te=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=a}while(e!==null);nt=6,Te=null}function ty(e,t,a,r,o,f,p,S,R){e.cancelPendingCommit=null;do Yo();while(ht!==0);if((Be&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(f=t.lanes|t.childLanes,f|=Eu,z1(e,a,f,p,S,R),e===Xe&&(Te=Xe=null,_e=0),Mr=t,Ga=e,ua=a,Mf=f,Df=o,Qg=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,r2(Qs,function(){return iy(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,o=I.p,I.p=2,p=Be,Be|=4;try{FS(e,t,a)}finally{Be=p,I.p=o,U.T=r}}ht=1,ny(),ay(),ly()}}function ny(){if(ht===1){ht=0;var e=Ga,t=Mr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var r=I.p;I.p=2;var o=Be;Be|=4;try{Ug(t,e);var f=Ff,p=Gm(e.containerInfo),S=f.focusedElem,R=f.selectionRange;if(p!==S&&S&&S.ownerDocument&&Vm(S.ownerDocument.documentElement,S)){if(R!==null&&vu(S)){var H=R.start,Y=R.end;if(Y===void 0&&(Y=H),"selectionStart"in S)S.selectionStart=H,S.selectionEnd=Math.min(Y,S.value.length);else{var F=S.ownerDocument||document,B=F&&F.defaultView||window;if(B.getSelection){var V=B.getSelection(),re=S.textContent.length,me=Math.min(R.start,re),Pe=R.end===void 0?me:Math.min(R.end,re);!V.extend&&me>Pe&&(p=Pe,Pe=me,me=p);var L=qm(S,me),D=qm(S,Pe);if(L&&D&&(V.rangeCount!==1||V.anchorNode!==L.node||V.anchorOffset!==L.offset||V.focusNode!==D.node||V.focusOffset!==D.offset)){var k=F.createRange();k.setStart(L.node,L.offset),V.removeAllRanges(),me>Pe?(V.addRange(k),V.extend(D.node,D.offset)):(k.setEnd(D.node,D.offset),V.addRange(k))}}}}for(F=[],V=S;V=V.parentNode;)V.nodeType===1&&F.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var K=F[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}tc=!!Kf,Ff=Kf=null}finally{Be=o,I.p=r,U.T=a}}e.current=t,ht=2}}function ay(){if(ht===2){ht=0;var e=Ga,t=Mr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var r=I.p;I.p=2;var o=Be;Be|=4;try{Og(e,t.alternate,t)}finally{Be=o,I.p=r,U.T=a}}ht=3}}function ly(){if(ht===4||ht===3){ht=0,j1();var e=Ga,t=Mr,a=ua,r=Qg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Mr=Ga=null,ry(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Va=null),Wc(a),t=t.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(vi,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=U.T,o=I.p,I.p=2,U.T=null;try{for(var f=e.onRecoverableError,p=0;p<r.length;p++){var S=r[p];f(S.value,{componentStack:S.stack})}}finally{U.T=t,I.p=o}}(ua&3)!==0&&Yo(),zn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===zf?Wi++:(Wi=0,zf=e):Wi=0,es(0)}}function ry(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zi(t)))}function Yo(){return ny(),ay(),ly(),iy()}function iy(){if(ht!==5)return!1;var e=Ga,t=Mf;Mf=0;var a=Wc(ua),r=U.T,o=I.p;try{I.p=32>a?32:a,U.T=null,a=Df,Df=null;var f=Ga,p=ua;if(ht=0,Mr=Ga=null,ua=0,(Be&6)!==0)throw Error(s(331));var S=Be;if(Be|=4,Vg(f.current),Hg(f,f.current,p,a),Be=S,es(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(vi,f)}catch{}return!0}finally{I.p=o,U.T=r,ry(e,t)}}function sy(e,t,a){t=fn(a,t),t=df(e.stateNode,t,2),e=La(e,t,2),e!==null&&(bi(e,2),zn(e))}function Ge(e,t,a){if(e.tag===3)sy(e,e,a);else for(;t!==null;){if(t.tag===3){sy(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Va===null||!Va.has(r))){e=fn(a,e),a=og(2),r=La(t,a,2),r!==null&&(cg(a,r,t,e),bi(r,2),zn(r));break}}t=t.return}}function kf(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new $S;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(_f=!0,o.add(a),e=n2.bind(null,e,t,a),t.then(e,e))}function n2(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(_e&a)===a&&(nt===4||nt===3&&(_e&62914560)===_e&&300>Kt()-ko?(Be&2)===0&&Dr(e,0):Af|=a,Or===_e&&(Or=0)),zn(e)}function oy(e,t){t===0&&(t=nm()),e=Cl(e,t),e!==null&&(bi(e,t),zn(e))}function a2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),oy(e,a)}function l2(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),oy(e,a)}function r2(e,t){return Zc(e,t)}var Qo=null,Lr=null,Hf=!1,Po=!1,Bf=!1,Qa=0;function zn(e){e!==Lr&&e.next===null&&(Lr===null?Qo=Lr=e:Lr=Lr.next=e),Po=!0,Hf||(Hf=!0,s2())}function es(e,t){if(!Bf&&Po){Bf=!0;do for(var a=!1,r=Qo;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var f=0;else{var p=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-Zt(42|e)+1)-1,f&=o&~(p&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,dy(r,f))}else f=_e,f=Fs(r,r===Xe?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||xi(r,f)||(a=!0,dy(r,f));r=r.next}while(a);Bf=!1}}function i2(){cy()}function cy(){Po=Hf=!1;var e=0;Qa!==0&&y2()&&(e=Qa);for(var t=Kt(),a=null,r=Qo;r!==null;){var o=r.next,f=uy(r,t);f===0?(r.next=null,a===null?Qo=o:a.next=o,o===null&&(Lr=a)):(a=r,(e!==0||(f&3)!==0)&&(Po=!0)),r=o}ht!==0&&ht!==5||es(e),Qa!==0&&(Qa=0)}function uy(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Zt(f),S=1<<p,R=o[p];R===-1?((S&a)===0||(S&r)!==0)&&(o[p]=D1(S,t)):R<=t&&(e.expiredLanes|=S),f&=~S}if(t=Xe,a=_e,a=Fs(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ic(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||xi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Ic(r),Wc(a)){case 2:case 8:a=em;break;case 32:a=Qs;break;case 268435456:a=tm;break;default:a=Qs}return r=fy.bind(null,e),a=Zc(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Ic(r),e.callbackPriority=2,e.callbackNode=null,2}function fy(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Yo()&&e.callbackNode!==a)return null;var r=_e;return r=Fs(e,e===Xe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Xg(e,r,t),uy(e,Kt()),e.callbackNode!=null&&e.callbackNode===a?fy.bind(null,e):null)}function dy(e,t){if(Yo())return null;Xg(e,t,!0)}function s2(){x2(function(){(Be&6)!==0?Zc(Wh,i2):cy()})}function qf(){if(Qa===0){var e=br;e===0&&(e=Ps,Ps<<=1,(Ps&261888)===0&&(Ps=256)),Qa=e}return Qa}function hy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Js(""+e)}function my(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function o2(e,t,a,r,o){if(t==="submit"&&a&&a.stateNode===o){var f=hy((o[Ht]||null).action),p=r.submitter;p&&(t=(t=p[Ht]||null)?hy(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var S=new no("action","action",null,r,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Qa!==0){var R=p?my(o,p):new FormData(o);rf(a,{pending:!0,data:R,method:o.method,action:f},null,R)}}else typeof f=="function"&&(S.preventDefault(),R=p?my(o,p):new FormData(o),rf(a,{pending:!0,data:R,method:o.method,action:f},f,R))},currentTarget:o}]})}}for(var Vf=0;Vf<wu.length;Vf++){var Gf=wu[Vf],c2=Gf.toLowerCase(),u2=Gf[0].toUpperCase()+Gf.slice(1);wn(c2,"on"+u2)}wn(Pm,"onAnimationEnd"),wn(Xm,"onAnimationIteration"),wn(Km,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(NS,"onTransitionRun"),wn(TS,"onTransitionStart"),wn(RS,"onTransitionCancel"),wn(Fm,"onTransitionEnd"),ir("onMouseEnter",["mouseout","mouseover"]),ir("onMouseLeave",["mouseout","mouseover"]),ir("onPointerEnter",["pointerout","pointerover"]),ir("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),f2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function py(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var p=r.length-1;0<=p;p--){var S=r[p],R=S.instance,H=S.currentTarget;if(S=S.listener,R!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=H;try{f(o)}catch(Y){ro(Y)}o.currentTarget=null,f=R}else for(p=0;p<r.length;p++){if(S=r[p],R=S.instance,H=S.currentTarget,S=S.listener,R!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=H;try{f(o)}catch(Y){ro(Y)}o.currentTarget=null,f=R}}}}function Re(e,t){var a=t[eu];a===void 0&&(a=t[eu]=new Set);var r=e+"__bubble";a.has(r)||(gy(t,e,2,!1),a.add(r))}function Yf(e,t,a){var r=0;t&&(r|=4),gy(a,e,r,t)}var Xo="_reactListening"+Math.random().toString(36).slice(2);function Qf(e){if(!e[Xo]){e[Xo]=!0,cm.forEach(function(a){a!=="selectionchange"&&(f2.has(a)||Yf(a,!1,e),Yf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xo]||(t[Xo]=!0,Yf("selectionchange",!1,t))}}function gy(e,t,a,r){switch(Py(t)){case 2:var o=B2;break;case 8:o=q2;break;default:o=rd}a=o.bind(null,t,a,e),o=void 0,!cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Pf(e,t,a,r,o){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var S=r.stateNode.containerInfo;if(S===o)break;if(p===4)for(p=r.return;p!==null;){var R=p.tag;if((R===3||R===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;S!==null;){if(p=ar(S),p===null)return;if(R=p.tag,R===5||R===6||R===26||R===27){r=f=p;continue e}S=S.parentNode}}r=r.return}Sm(function(){var H=f,Y=su(a),F=[];e:{var B=Zm.get(e);if(B!==void 0){var V=no,re=e;switch(e){case"keypress":if(eo(a)===0)break e;case"keydown":case"keyup":V=lS;break;case"focusin":re="focus",V=hu;break;case"focusout":re="blur",V=hu;break;case"beforeblur":case"afterblur":V=hu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Cm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=sS;break;case Pm:case Xm:case Km:V=Z1;break;case Fm:V=cS;break;case"scroll":case"scrollend":V=Q1;break;case"wheel":V=fS;break;case"copy":case"cut":case"paste":V=$1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Nm;break;case"toggle":case"beforetoggle":V=hS}var me=(t&4)!==0,Pe=!me&&(e==="scroll"||e==="scrollend"),L=me?B!==null?B+"Capture":null:B;me=[];for(var D=H,k;D!==null;){var K=D;if(k=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||k===null||L===null||(K=Ei(D,L),K!=null&&me.push(ns(D,K,k))),Pe)break;D=D.return}0<me.length&&(B=new V(B,re,null,a,Y),F.push({event:B,listeners:me}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&a!==iu&&(re=a.relatedTarget||a.fromElement)&&(ar(re)||re[nr]))break e;if((V||B)&&(B=Y.window===Y?Y:(B=Y.ownerDocument)?B.defaultView||B.parentWindow:window,V?(re=a.relatedTarget||a.toElement,V=H,re=re?ar(re):null,re!==null&&(Pe=d(re),me=re.tag,re!==Pe||me!==5&&me!==27&&me!==6)&&(re=null)):(V=null,re=H),V!==re)){if(me=Cm,K="onMouseLeave",L="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(me=Nm,K="onPointerLeave",L="onPointerEnter",D="pointer"),Pe=V==null?B:wi(V),k=re==null?B:wi(re),B=new me(K,D+"leave",V,a,Y),B.target=Pe,B.relatedTarget=k,K=null,ar(Y)===H&&(me=new me(L,D+"enter",re,a,Y),me.target=k,me.relatedTarget=Pe,K=me),Pe=K,V&&re)t:{for(me=d2,L=V,D=re,k=0,K=L;K;K=me(K))k++;K=0;for(var fe=D;fe;fe=me(fe))K++;for(;0<k-K;)L=me(L),k--;for(;0<K-k;)D=me(D),K--;for(;k--;){if(L===D||D!==null&&L===D.alternate){me=L;break t}L=me(L),D=me(D)}me=null}else me=null;V!==null&&yy(F,B,V,me,!1),re!==null&&Pe!==null&&yy(F,Pe,re,me,!0)}}e:{if(B=H?wi(H):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var ke=zm;else if(Mm(B))if(Lm)ke=ES;else{ke=SS;var oe=bS}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?H&&ru(H.elementType)&&(ke=zm):ke=wS;if(ke&&(ke=ke(e,H))){Dm(F,ke,a,Y);break e}oe&&oe(e,B,H),e==="focusout"&&H&&B.type==="number"&&H.memoizedProps.value!=null&&lu(B,"number",B.value)}switch(oe=H?wi(H):window,e){case"focusin":(Mm(oe)||oe.contentEditable==="true")&&(dr=oe,xu=H,Oi=null);break;case"focusout":Oi=xu=dr=null;break;case"mousedown":bu=!0;break;case"contextmenu":case"mouseup":case"dragend":bu=!1,Ym(F,a,Y);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":Ym(F,a,Y)}var we;if(pu)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else fr?Am(e,a)&&(Ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ae="onCompositionStart");Ae&&(Tm&&a.locale!=="ko"&&(fr||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&fr&&(we=wm()):(Ra=Y,uu="value"in Ra?Ra.value:Ra.textContent,fr=!0)),oe=Ko(H,Ae),0<oe.length&&(Ae=new jm(Ae,e,null,a,Y),F.push({event:Ae,listeners:oe}),we?Ae.data=we:(we=Om(a),we!==null&&(Ae.data=we)))),(we=pS?gS(e,a):yS(e,a))&&(Ae=Ko(H,"onBeforeInput"),0<Ae.length&&(oe=new jm("onBeforeInput","beforeinput",null,a,Y),F.push({event:oe,listeners:Ae}),oe.data=we)),o2(F,e,H,a,Y)}py(F,t)})}function ns(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ko(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=Ei(e,a),o!=null&&r.unshift(ns(e,o,f)),o=Ei(e,t),o!=null&&r.push(ns(e,o,f))),e.tag===3)return r;e=e.return}return[]}function d2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yy(e,t,a,r,o){for(var f=t._reactName,p=[];a!==null&&a!==r;){var S=a,R=S.alternate,H=S.stateNode;if(S=S.tag,R!==null&&R===r)break;S!==5&&S!==26&&S!==27||H===null||(R=H,o?(H=Ei(a,f),H!=null&&p.unshift(ns(a,H,R))):o||(H=Ei(a,f),H!=null&&p.push(ns(a,H,R)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var h2=/\r\n?/g,m2=/\u0000|\uFFFD/g;function vy(e){return(typeof e=="string"?e:""+e).replace(h2,`
49
+ `).replace(m2,"")}function xy(e,t){return t=vy(t),vy(e)===t}function Qe(e,t,a,r,o,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||or(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&or(e,""+r);break;case"className":Is(e,"class",r);break;case"tabIndex":Is(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Is(e,a,r);break;case"style":xm(e,r,f);break;case"data":if(t!=="object"){Is(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Js(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(t!=="input"&&Qe(e,t,"name",o.name,o,null),Qe(e,t,"formEncType",o.formEncType,o,null),Qe(e,t,"formMethod",o.formMethod,o,null),Qe(e,t,"formTarget",o.formTarget,o,null)):(Qe(e,t,"encType",o.encType,o,null),Qe(e,t,"method",o.method,o,null),Qe(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Js(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"onScroll":r!=null&&Re("scroll",e);break;case"onScrollEnd":r!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=Js(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Zs(e,"popover",r);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Zs(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=G1.get(a)||a,Zs(e,a,r))}}function Xf(e,t,a,r,o,f){switch(a){case"style":xm(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof r=="string"?or(e,r):(typeof r=="number"||typeof r=="bigint")&&or(e,""+r);break;case"onScroll":r!=null&&Re("scroll",e);break;case"onScrollEnd":r!=null&&Re("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!um.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[Ht]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,o);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):Zs(e,a,r)}}}function Et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var r=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var p=a[f];if(p!=null)switch(f){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,f,p,a,null)}}o&&Qe(e,t,"srcSet",a.srcSet,a,null),r&&Qe(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var S=f=p=o=null,R=null,H=null;for(r in a)if(a.hasOwnProperty(r)){var Y=a[r];if(Y!=null)switch(r){case"name":o=Y;break;case"type":p=Y;break;case"checked":R=Y;break;case"defaultChecked":H=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:Qe(e,t,r,Y,a,null)}}pm(e,f,S,R,H,p,o,!1);return;case"select":Re("invalid",e),r=p=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":p=S;break;case"multiple":r=S;default:Qe(e,t,o,S,a,null)}t=f,a=p,e.multiple=!!r,t!=null?sr(e,!!r,t,!1):a!=null&&sr(e,!!r,a,!0);return;case"textarea":Re("invalid",e),f=o=r=null;for(p in a)if(a.hasOwnProperty(p)&&(S=a[p],S!=null))switch(p){case"value":r=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:Qe(e,t,p,S,a,null)}ym(e,r,o,f);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(r=a[R],r!=null))switch(R){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(e,t,R,r,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(r=0;r<ts.length;r++)Re(ts[r],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(H in a)if(a.hasOwnProperty(H)&&(r=a[H],r!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,H,r,a,null)}return;default:if(ru(t)){for(Y in a)a.hasOwnProperty(Y)&&(r=a[Y],r!==void 0&&Xf(e,t,Y,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&Qe(e,t,S,r,a,null))}function p2(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,p=null,S=null,R=null,H=null,Y=null;for(V in a){var F=a[V];if(a.hasOwnProperty(V)&&F!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":R=F;default:r.hasOwnProperty(V)||Qe(e,t,V,null,r,F)}}for(var B in r){var V=r[B];if(F=a[B],r.hasOwnProperty(B)&&(V!=null||F!=null))switch(B){case"type":f=V;break;case"name":o=V;break;case"checked":H=V;break;case"defaultChecked":Y=V;break;case"value":p=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:V!==F&&Qe(e,t,B,V,r,F)}}au(e,p,S,R,H,Y,f,o);return;case"select":V=p=S=B=null;for(f in a)if(R=a[f],a.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":V=R;default:r.hasOwnProperty(f)||Qe(e,t,f,null,r,R)}for(o in r)if(f=r[o],R=a[o],r.hasOwnProperty(o)&&(f!=null||R!=null))switch(o){case"value":B=f;break;case"defaultValue":S=f;break;case"multiple":p=f;default:f!==R&&Qe(e,t,o,f,r,R)}t=S,a=p,r=V,B!=null?sr(e,!!a,B,!1):!!r!=!!a&&(t!=null?sr(e,!!a,t,!0):sr(e,!!a,a?[]:"",!1));return;case"textarea":V=B=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Qe(e,t,S,null,r,o)}for(p in r)if(o=r[p],f=a[p],r.hasOwnProperty(p)&&(o!=null||f!=null))switch(p){case"value":B=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==f&&Qe(e,t,p,o,r,f)}gm(e,B,V);return;case"option":for(var re in a)if(B=a[re],a.hasOwnProperty(re)&&B!=null&&!r.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:Qe(e,t,re,null,r,B)}for(R in r)if(B=r[R],V=a[R],r.hasOwnProperty(R)&&B!==V&&(B!=null||V!=null))switch(R){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Qe(e,t,R,B,r,V)}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 me in a)B=a[me],a.hasOwnProperty(me)&&B!=null&&!r.hasOwnProperty(me)&&Qe(e,t,me,null,r,B);for(H in r)if(B=r[H],V=a[H],r.hasOwnProperty(H)&&B!==V&&(B!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Qe(e,t,H,B,r,V)}return;default:if(ru(t)){for(var Pe in a)B=a[Pe],a.hasOwnProperty(Pe)&&B!==void 0&&!r.hasOwnProperty(Pe)&&Xf(e,t,Pe,void 0,r,B);for(Y in r)B=r[Y],V=a[Y],!r.hasOwnProperty(Y)||B===V||B===void 0&&V===void 0||Xf(e,t,Y,B,r,V);return}}for(var L in a)B=a[L],a.hasOwnProperty(L)&&B!=null&&!r.hasOwnProperty(L)&&Qe(e,t,L,null,r,B);for(F in r)B=r[F],V=a[F],!r.hasOwnProperty(F)||B===V||B==null&&V==null||Qe(e,t,F,B,r,V)}function by(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var o=a[r],f=o.transferSize,p=o.initiatorType,S=o.duration;if(f&&S&&by(p)){for(p=0,S=o.responseEnd,r+=1;r<a.length;r++){var R=a[r],H=R.startTime;if(H>S)break;var Y=R.transferSize,F=R.initiatorType;Y&&by(F)&&(R=R.responseEnd,p+=Y*(R<S?1:(S-H)/(R-H)))}if(--r,t+=8*(f+p)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Kf=null,Ff=null;function Fo(e){return e.nodeType===9?e:e.ownerDocument}function Sy(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 wy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var If=null;function y2(){var e=window.event;return e&&e.type==="popstate"?e===If?!1:(If=e,!0):(If=null,!1)}var Ey=typeof setTimeout=="function"?setTimeout:void 0,v2=typeof clearTimeout=="function"?clearTimeout:void 0,Cy=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof Cy<"u"?function(e){return Cy.resolve(null).then(e).catch(b2)}:Ey;function b2(e){setTimeout(function(){throw e})}function Pa(e){return e==="head"}function jy(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(o),Br(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")as(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,as(a);for(var f=a.firstChild;f;){var p=f.nextSibling,S=f.nodeName;f[Si]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=p}}else a==="body"&&as(e.ownerDocument.body);a=o}while(a);Br(t)}function Ny(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function $f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":$f(a),tu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function S2(e,t,a,r){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Si])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function w2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=gn(e.nextSibling),e===null))return null;return e}function Ty(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gn(e.nextSibling),e===null))return null;return e}function Jf(e){return e.data==="$?"||e.data==="$~"}function Wf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function E2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ed=null;function Ry(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return gn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function _y(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Ay(e,t,a){switch(t=Fo(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function as(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tu(e)}var yn=new Map,Oy=new Set;function Zo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=I.d;I.d={f:C2,r:j2,D:N2,C:T2,L:R2,m:_2,X:O2,S:A2,M:M2};function C2(){var e=fa.f(),t=qo();return e||t}function j2(e){var t=lr(e);t!==null&&t.tag===5&&t.type==="form"?Fp(t):fa.r(e)}var Ur=typeof document>"u"?null:document;function My(e,t,a){var r=Ur;if(r&&typeof t=="string"&&t){var o=cn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Oy.has(o)||(Oy.add(o),e={rel:e,crossOrigin:a,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),Et(t,"link",e),gt(t),r.head.appendChild(t)))}}function N2(e){fa.D(e),My("dns-prefetch",e,null)}function T2(e,t){fa.C(e,t),My("preconnect",e,t)}function R2(e,t,a){fa.L(e,t,a);var r=Ur;if(r&&e&&t){var o='link[rel="preload"][as="'+cn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+cn(a.imageSizes)+'"]')):o+='[href="'+cn(e)+'"]';var f=o;switch(t){case"style":f=kr(e);break;case"script":f=Hr(e)}yn.has(f)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),yn.set(f,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(ls(f))||t==="script"&&r.querySelector(rs(f))||(t=r.createElement("link"),Et(t,"link",e),gt(t),r.head.appendChild(t)))}}function _2(e,t){fa.m(e,t);var a=Ur;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+cn(r)+'"][href="'+cn(e)+'"]',f=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Hr(e)}if(!yn.has(f)&&(e=b({rel:"modulepreload",href:e},t),yn.set(f,e),a.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(rs(f)))return}r=a.createElement("link"),Et(r,"link",e),gt(r),a.head.appendChild(r)}}}function A2(e,t,a){fa.S(e,t,a);var r=Ur;if(r&&e){var o=rr(r).hoistableStyles,f=kr(e);t=t||"default";var p=o.get(f);if(!p){var S={loading:0,preload:null};if(p=r.querySelector(ls(f)))S.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=yn.get(f))&&td(e,a);var R=p=r.createElement("link");gt(R),Et(R,"link",e),R._p=new Promise(function(H,Y){R.onload=H,R.onerror=Y}),R.addEventListener("load",function(){S.loading|=1}),R.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Io(p,t,r)}p={type:"stylesheet",instance:p,count:1,state:S},o.set(f,p)}}}function O2(e,t){fa.X(e,t);var a=Ur;if(a&&e){var r=rr(a).hoistableScripts,o=Hr(e),f=r.get(o);f||(f=a.querySelector(rs(o)),f||(e=b({src:e,async:!0},t),(t=yn.get(o))&&nd(e,t),f=a.createElement("script"),gt(f),Et(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function M2(e,t){fa.M(e,t);var a=Ur;if(a&&e){var r=rr(a).hoistableScripts,o=Hr(e),f=r.get(o);f||(f=a.querySelector(rs(o)),f||(e=b({src:e,async:!0,type:"module"},t),(t=yn.get(o))&&nd(e,t),f=a.createElement("script"),gt(f),Et(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function Dy(e,t,a,r){var o=(o=he.current)?Zo(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=kr(a.href),a=rr(o).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=kr(a.href);var f=rr(o).hoistableStyles,p=f.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=o.querySelector(ls(e)))&&!f._p&&(p.instance=f,p.state.loading=5),yn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},yn.set(e,a),f||D2(o,e,a,p.state))),t&&r===null)throw Error(s(528,""));return p}if(t&&r!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hr(a),a=rr(o).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function kr(e){return'href="'+cn(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function zy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function D2(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Et(t,"link",a),gt(t),e.head.appendChild(t))}function Hr(e){return'[src="'+cn(e)+'"]'}function rs(e){return"script[async]"+e}function Ly(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+cn(a.href)+'"]');if(r)return t.instance=r,gt(r),r;var o=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),gt(r),Et(r,"style",o),Io(r,a.precedence,e),t.instance=r;case"stylesheet":o=kr(a.href);var f=e.querySelector(ls(o));if(f)return t.state.loading|=4,t.instance=f,gt(f),f;r=zy(a),(o=yn.get(o))&&td(r,o),f=(e.ownerDocument||e).createElement("link"),gt(f);var p=f;return p._p=new Promise(function(S,R){p.onload=S,p.onerror=R}),Et(f,"link",r),t.state.loading|=4,Io(f,a.precedence,e),t.instance=f;case"script":return f=Hr(a.src),(o=e.querySelector(rs(f)))?(t.instance=o,gt(o),o):(r=a,(o=yn.get(f))&&(r=b({},a),nd(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),gt(o),Et(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Io(r,a.precedence,e));return t.instance}function Io(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,f=o,p=0;p<r.length;p++){var S=r[p];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function td(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function Uy(e,t,a){if($o===null){var r=new Map,o=$o=new Map;o.set(a,r)}else o=$o,r=o.get(a),r||(r=new Map,o.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[Si]||f[xt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var S=r.get(p);S?S.push(f):r.set(p,[f])}}return r}function ky(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function z2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Hy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function L2(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=kr(r.href),f=t.querySelector(ls(o));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,gt(f);return}f=t.ownerDocument||t,r=zy(r),(o=yn.get(o))&&td(r,o),f=f.createElement("link"),gt(f);var p=f;p._p=new Promise(function(S,R){p.onload=S,p.onerror=R}),Et(f,"link",r),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Jo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ad=0;function U2(e,t){return e.stylesheets&&e.count===0&&ec(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&ec(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&ad===0&&(ad=62500*g2());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ec(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>ad?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function Jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ec(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wo=null;function ec(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wo=new Map,t.forEach(k2,e),Wo=null,Jo.call(e))}function k2(e,t){if(!(t.state.loading&4)){var a=Wo.get(e);if(a)var r=a.get(null);else{a=new Map,Wo.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var p=o[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),r=p)}r&&a.set(null,r)}o=t.instance,p=o.getAttribute("data-precedence"),f=a.get(p)||r,f===r&&a.set(null,o),a.set(p,o),this.count++,r=Jo.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var is={$$typeof:M,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function H2(e,t,a,r,o,f,p,S,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$c(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$c(0),this.hiddenUpdates=$c(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function By(e,t,a,r,o,f,p,S,R,H,Y,F){return e=new H2(e,t,a,p,R,H,Y,F,S),t=1,f===!0&&(t|=24),f=$t(3,null,null,t),e.current=f,f.stateNode=e,t=Lu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},Bu(f),e}function qy(e){return e?(e=pr,e):pr}function Vy(e,t,a,r,o,f){o=qy(o),r.context===null?r.context=o:r.pendingContext=o,r=za(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=La(e,r,t),a!==null&&(Qt(a,e,t),Hi(a,e,t))}function Gy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ld(e,t){Gy(e,t),(e=e.alternate)&&Gy(e,t)}function Yy(e){if(e.tag===13||e.tag===31){var t=Cl(e,67108864);t!==null&&Qt(t,e,67108864),ld(e,67108864)}}function Qy(e){if(e.tag===13||e.tag===31){var t=nn();t=Jc(t);var a=Cl(e,t);a!==null&&Qt(a,e,t),ld(e,t)}}var tc=!0;function B2(e,t,a,r){var o=U.T;U.T=null;var f=I.p;try{I.p=2,rd(e,t,a,r)}finally{I.p=f,U.T=o}}function q2(e,t,a,r){var o=U.T;U.T=null;var f=I.p;try{I.p=8,rd(e,t,a,r)}finally{I.p=f,U.T=o}}function rd(e,t,a,r){if(tc){var o=id(r);if(o===null)Pf(e,t,r,nc,a),Xy(e,r);else if(G2(o,e,t,a,r))r.stopPropagation();else if(Xy(e,r),t&4&&-1<V2.indexOf(e)){for(;o!==null;){var f=lr(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=xl(f.pendingLanes);if(p!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;p;){var R=1<<31-Zt(p);S.entanglements[1]|=R,p&=~R}zn(f),(Be&6)===0&&(Ho=Kt()+500,es(0))}}break;case 31:case 13:S=Cl(f,2),S!==null&&Qt(S,f,2),qo(),ld(f,2)}if(f=id(r),f===null&&Pf(e,t,r,nc,a),f===o)break;o=f}o!==null&&r.stopPropagation()}else Pf(e,t,r,null,a)}}function id(e){return e=su(e),sd(e)}var nc=null;function sd(e){if(nc=null,e=ar(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return nc=e,null}function Py(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(N1()){case Wh:return 2;case em:return 8;case Qs:case T1:return 32;case tm:return 268435456;default:return 32}default:return 32}}var od=!1,Xa=null,Ka=null,Fa=null,ss=new Map,os=new Map,Za=[],V2="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 Xy(e,t){switch(e){case"focusin":case"focusout":Xa=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":ss.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":os.delete(t.pointerId)}}function cs(e,t,a,r,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[o]},t!==null&&(t=lr(t),t!==null&&Yy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function G2(e,t,a,r,o){switch(t){case"focusin":return Xa=cs(Xa,e,t,a,r,o),!0;case"dragenter":return Ka=cs(Ka,e,t,a,r,o),!0;case"mouseover":return Fa=cs(Fa,e,t,a,r,o),!0;case"pointerover":var f=o.pointerId;return ss.set(f,cs(ss.get(f)||null,e,t,a,r,o)),!0;case"gotpointercapture":return f=o.pointerId,os.set(f,cs(os.get(f)||null,e,t,a,r,o)),!0}return!1}function Ky(e){var t=ar(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,sm(e.priority,function(){Qy(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,sm(e.priority,function(){Qy(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=id(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);iu=r,a.target.dispatchEvent(r),iu=null}else return t=lr(a),t!==null&&Yy(t),e.blockedOn=a,!1;t.shift()}return!0}function Fy(e,t,a){ac(e)&&a.delete(t)}function Y2(){od=!1,Xa!==null&&ac(Xa)&&(Xa=null),Ka!==null&&ac(Ka)&&(Ka=null),Fa!==null&&ac(Fa)&&(Fa=null),ss.forEach(Fy),os.forEach(Fy)}function lc(e,t){e.blockedOn===t&&(e.blockedOn=null,od||(od=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Y2)))}var rc=null;function Zy(e){rc!==e&&(rc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){rc===e&&(rc=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(sd(r||a)===null)continue;break}var f=lr(a);f!==null&&(e.splice(t,3),t-=3,rf(f,{pending:!0,data:o,method:a.method,action:r},r,o))}}))}function Br(e){function t(R){return lc(R,e)}Xa!==null&&lc(Xa,e),Ka!==null&&lc(Ka,e),Fa!==null&&lc(Fa,e),ss.forEach(t),os.forEach(t);for(var a=0;a<Za.length;a++){var r=Za[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Za.length&&(a=Za[0],a.blockedOn===null);)Ky(a),a.blockedOn===null&&Za.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var o=a[r],f=a[r+1],p=o[Ht]||null;if(typeof f=="function")p||Zy(a);else if(p){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,p=f[Ht]||null)S=p.formAction;else if(sd(o)!==null)continue}else S=p.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),Zy(a)}}}function Iy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return o=p})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function cd(e){this._internalRoot=e}ic.prototype.render=cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,r=nn();Vy(a,r,e,t,null,null)},ic.prototype.unmount=cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vy(e.current,2,null,e,null,null),qo(),t[nr]=null}};function ic(e){this._internalRoot=e}ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=im();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Za.length&&t!==0&&t<Za[a].priority;a++);Za.splice(a,0,e),a===0&&Ky(e)}};var $y=l.version;if($y!=="19.2.4")throw Error(s(527,$y,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var Q2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{vi=sc.inject(Q2),Ft=sc}catch{}}return fs.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,r="",o=lg,f=rg,p=ig;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=By(e,1,!1,null,null,a,r,null,o,f,p,Iy),e[nr]=t.current,Qf(e),new cd(t)},fs.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var r=!1,o="",f=lg,p=rg,S=ig,R=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=By(e,1,!0,t,a??null,r,o,R,f,p,S,Iy),t.context=qy(null),a=t.current,r=nn(),r=Jc(r),o=za(r),o.callback=null,La(a,o,r),a=r,t.current.lanes=a,bi(t,a),zn(t),e[nr]=t.current,Qf(e),new ic(t)},fs.version="19.2.4",fs}var ov;function ew(){if(ov)return hd.exports;ov=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),hd.exports=W2(),hd.exports}var tw=ew();const nw=hh(tw);var ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bl,al,$r,mx,aw=(mx=class extends ui{constructor(){super();ue(this,Bl);ue(this,al);ue(this,$r);le(this,$r,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,al)||this.setEventListener(_(this,$r))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,al))==null||l.call(this),le(this,al,void 0))}setEventListener(l){var i;le(this,$r,l),(i=_(this,al))==null||i.call(this),le(this,al,l(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(l){_(this,Bl)!==l&&(le(this,Bl,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof _(this,Bl)=="boolean"?_(this,Bl):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},Bl=new WeakMap,al=new WeakMap,$r=new WeakMap,mx),ph=new aw,lw={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},ll,dh,px,rw=(px=class{constructor(){ue(this,ll,lw);ue(this,dh,!1)}setTimeoutProvider(n){le(this,ll,n)}setTimeout(n,l){return _(this,ll).setTimeout(n,l)}clearTimeout(n){_(this,ll).clearTimeout(n)}setInterval(n,l){return _(this,ll).setInterval(n,l)}clearInterval(n){_(this,ll).clearInterval(n)}},ll=new WeakMap,dh=new WeakMap,px),Hl=new rw;function iw(n){setTimeout(n,0)}var sw=typeof window>"u"||"Deno"in globalThis;function Ut(){}function ow(n,l){return typeof n=="function"?n(l):n}function Ld(n){return typeof n=="number"&&n>=0&&n!==1/0}function Tx(n,l){return Math.max(n+(l||0)-Date.now(),0)}function dl(n,l){return typeof n=="function"?n(l):n}function xn(n,l){return typeof n=="function"?n(l):n}function cv(n,l){const{type:i="all",exact:s,fetchStatus:c,predicate:d,queryKey:h,stale:m}=n;if(h){if(s){if(l.queryHash!==gh(h,l.options))return!1}else if(!js(l.queryKey,h))return!1}if(i!=="all"){const v=l.isActive();if(i==="active"&&!v||i==="inactive"&&v)return!1}return!(typeof m=="boolean"&&l.isStale()!==m||c&&c!==l.state.fetchStatus||d&&!d(l))}function uv(n,l){const{exact:i,status:s,predicate:c,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(i){if(Fl(l.options.mutationKey)!==Fl(d))return!1}else if(!js(l.options.mutationKey,d))return!1}return!(s&&l.state.status!==s||c&&!c(l))}function gh(n,l){return((l==null?void 0:l.queryKeyHashFn)||Fl)(n)}function Fl(n){return JSON.stringify(n,(l,i)=>Ud(i)?Object.keys(i).sort().reduce((s,c)=>(s[c]=i[c],s),{}):i)}function js(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>js(n[i],l[i])):!1}var cw=Object.prototype.hasOwnProperty;function Rx(n,l,i=0){if(n===l)return n;if(i>500)return l;const s=fv(n)&&fv(l);if(!s&&!(Ud(n)&&Ud(l)))return l;const d=(s?n:Object.keys(n)).length,h=s?l:Object.keys(l),m=h.length,v=s?new Array(m):{};let g=0;for(let x=0;x<m;x++){const b=s?x:h[x],E=n[b],C=l[b];if(E===C){v[b]=E,(s?x<d:cw.call(n,b))&&g++;continue}if(E===null||C===null||typeof E!="object"||typeof C!="object"){v[b]=C;continue}const T=Rx(E,C,i+1);v[b]=T,T===E&&g++}return d===m&&g===d?n:v}function jc(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function fv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!dv(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!dv(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dv(n){return Object.prototype.toString.call(n)==="[object Object]"}function uw(n){return new Promise(l=>{Hl.setTimeout(l,n)})}function kd(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?Rx(n,l):l}function fw(n,l,i=0){const s=[...n,l];return i&&s.length>i?s.slice(1):s}function dw(n,l,i=0){const s=[l,...n];return i&&s.length>i?s.slice(0,-1):s}var yh=Symbol();function _x(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===yh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function vh(n,l){return typeof n=="function"?n(...l):!!n}function hw(n,l,i){let s=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=l()),s||(s=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Ns=(()=>{let n=()=>sw;return{isServer(){return n()},setIsServer(l){n=l}}})();function Hd(){let n,l;const i=new Promise((c,d)=>{n=c,l=d});i.status="pending",i.catch(()=>{});function s(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{s({status:"fulfilled",value:c}),n(c)},i.reject=c=>{s({status:"rejected",reason:c}),l(c)},i}var mw=iw;function pw(){let n=[],l=0,i=m=>{m()},s=m=>{m()},c=mw;const d=m=>{l?n.push(m):c(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&c(()=>{s(()=>{m.forEach(v=>{i(v)})})})};return{batch:m=>{let v;l++;try{v=m()}finally{l--,l||h()}return v},batchCalls:m=>(...v)=>{d(()=>{m(...v)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{s=m},setScheduler:m=>{c=m}}}var mt=pw(),Jr,rl,Wr,gx,gw=(gx=class extends ui{constructor(){super();ue(this,Jr,!0);ue(this,rl);ue(this,Wr);le(this,Wr,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),s=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){_(this,rl)||this.setEventListener(_(this,Wr))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,rl))==null||l.call(this),le(this,rl,void 0))}setEventListener(l){var i;le(this,Wr,l),(i=_(this,rl))==null||i.call(this),le(this,rl,l(this.setOnline.bind(this)))}setOnline(l){_(this,Jr)!==l&&(le(this,Jr,l),this.listeners.forEach(s=>{s(l)}))}isOnline(){return _(this,Jr)}},Jr=new WeakMap,rl=new WeakMap,Wr=new WeakMap,gx),Nc=new gw;function yw(n){return Math.min(1e3*2**n,3e4)}function Ax(n){return(n??"online")==="online"?Nc.isOnline():!0}var Bd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Ox(n){let l=!1,i=0,s;const c=Hd(),d=()=>c.status!=="pending",h=w=>{var j;if(!d()){const N=new Bd(w);E(N),(j=n.onCancel)==null||j.call(n,N)}},m=()=>{l=!0},v=()=>{l=!1},g=()=>ph.isFocused()&&(n.networkMode==="always"||Nc.isOnline())&&n.canRun(),x=()=>Ax(n.networkMode)&&n.canRun(),b=w=>{d()||(s==null||s(),c.resolve(w))},E=w=>{d()||(s==null||s(),c.reject(w))},C=()=>new Promise(w=>{var j;s=N=>{(d()||g())&&w(N)},(j=n.onPause)==null||j.call(n)}).then(()=>{var w;s=void 0,d()||(w=n.onContinue)==null||w.call(n)}),T=()=>{if(d())return;let w;const j=i===0?n.initialPromise:void 0;try{w=j??n.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(b).catch(N=>{var X;if(d())return;const O=n.retry??(Ns.isServer()?0:3),M=n.retryDelay??yw,z=typeof M=="function"?M(i,N):M,q=O===!0||typeof O=="number"&&i<O||typeof O=="function"&&O(i,N);if(l||!q){E(N);return}i++,(X=n.onFail)==null||X.call(n,i,N),uw(z).then(()=>g()?void 0:C()).then(()=>{l?E(N):T()})})};return{promise:c,status:()=>c.status,cancel:h,continue:()=>(s==null||s(),c),cancelRetry:m,continueRetry:v,canStart:x,start:()=>(x()?T():C().then(T),c)}}var ql,yx,Mx=(yx=class{constructor(){ue(this,ql)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ld(this.gcTime)&&le(this,ql,Hl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ns.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,ql)&&(Hl.clearTimeout(_(this,ql)),le(this,ql,void 0))}},ql=new WeakMap,yx),Vl,ei,vn,Gl,vt,As,Yl,an,Dx,ha,vx,vw=(vx=class extends Mx{constructor(l){super();ue(this,an);ue(this,Vl);ue(this,ei);ue(this,vn);ue(this,Gl);ue(this,vt);ue(this,As);ue(this,Yl);le(this,Yl,!1),le(this,As,l.defaultOptions),this.setOptions(l.options),this.observers=[],le(this,Gl,l.client),le(this,vn,_(this,Gl).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,le(this,Vl,mv(this.options)),this.state=l.state??_(this,Vl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=_(this,vt))==null?void 0:l.promise}setOptions(l){if(this.options={..._(this,As),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=mv(this.options);i.data!==void 0&&(this.setState(hv(i.data,i.dataUpdatedAt)),le(this,Vl,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,vn).remove(this)}setData(l,i){const s=kd(this.state.data,l,this.options);return Ee(this,an,ha).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(l,i){Ee(this,an,ha).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var s,c;const i=(s=_(this,vt))==null?void 0:s.promise;return(c=_(this,vt))==null||c.cancel(l),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Vl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>xn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>dl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!Tx(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(s=>s.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,vt))==null||i.continue()}onOnline(){var i;const l=this.observers.find(s=>s.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,vt))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),_(this,vn).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(_(this,vt)&&(_(this,Yl)||Ee(this,an,Dx).call(this)?_(this,vt).cancel({revert:!0}):_(this,vt).cancelRetry()),this.scheduleGc()),_(this,vn).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,an,ha).call(this,{type:"invalidate"})}async fetch(l,i){var v,g,x,b,E,C,T,w,j,N,O,M;if(this.state.fetchStatus!=="idle"&&((v=_(this,vt))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,vt))return _(this,vt).continueRetry(),_(this,vt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const z=this.observers.find(q=>q.options.queryFn);z&&this.setOptions(z.options)}const s=new AbortController,c=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(le(this,Yl,!0),s.signal)})},d=()=>{const z=_x(this.options,i),X=(()=>{const G={client:_(this,Gl),queryKey:this.queryKey,meta:this.meta};return c(G),G})();return le(this,Yl,!1),this.options.persister?this.options.persister(z,X,this):z(X)},m=(()=>{const z={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,Gl),state:this.state,fetchFn:d};return c(z),z})();(g=this.options.behavior)==null||g.onFetch(m,this),le(this,ei,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=m.fetchOptions)==null?void 0:x.meta))&&Ee(this,an,ha).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta}),le(this,vt,Ox({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:z=>{z instanceof Bd&&z.revert&&this.setState({..._(this,ei),fetchStatus:"idle"}),s.abort()},onFail:(z,q)=>{Ee(this,an,ha).call(this,{type:"failed",failureCount:z,error:q})},onPause:()=>{Ee(this,an,ha).call(this,{type:"pause"})},onContinue:()=>{Ee(this,an,ha).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const z=await _(this,vt).start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(C=(E=_(this,vn).config).onSuccess)==null||C.call(E,z,this),(w=(T=_(this,vn).config).onSettled)==null||w.call(T,z,this.state.error,this),z}catch(z){if(z instanceof Bd){if(z.silent)return _(this,vt).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Ee(this,an,ha).call(this,{type:"error",error:z}),(N=(j=_(this,vn).config).onError)==null||N.call(j,z,this),(M=(O=_(this,vn).config).onSettled)==null||M.call(O,this.state.data,z,this),z}finally{this.scheduleGc()}}},Vl=new WeakMap,ei=new WeakMap,vn=new WeakMap,Gl=new WeakMap,vt=new WeakMap,As=new WeakMap,Yl=new WeakMap,an=new WeakSet,Dx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ha=function(l){const i=s=>{switch(l.type){case"failed":return{...s,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...zx(s.data,this.options),fetchMeta:l.meta??null};case"success":const c={...s,...hv(l.data,l.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,ei,l.manual?c:void 0),c;case"error":const d=l.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...l.state}}};this.state=i(this.state),mt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),_(this,vn).notify({query:this,type:"updated",action:l})})},vx);function zx(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ax(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hv(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mv(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,s=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Pt,Me,Os,Lt,Ql,ti,ga,il,Ms,ni,ai,Pl,Xl,sl,li,qe,xs,qd,Vd,Gd,Yd,Qd,Pd,Xd,Lx,xx,xw=(xx=class extends ui{constructor(l,i){super();ue(this,qe);ue(this,Pt);ue(this,Me);ue(this,Os);ue(this,Lt);ue(this,Ql);ue(this,ti);ue(this,ga);ue(this,il);ue(this,Ms);ue(this,ni);ue(this,ai);ue(this,Pl);ue(this,Xl);ue(this,sl);ue(this,li,new Set);this.options=i,le(this,Pt,l),le(this,il,null),le(this,ga,Hd()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Me).addObserver(this),pv(_(this,Me),this.options)?Ee(this,qe,xs).call(this):this.updateResult(),Ee(this,qe,Yd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kd(_(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kd(_(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,qe,Qd).call(this),Ee(this,qe,Pd).call(this),_(this,Me).removeObserver(this)}setOptions(l){const i=this.options,s=_(this,Me);if(this.options=_(this,Pt).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xn(this.options.enabled,_(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,qe,Xd).call(this),_(this,Me).setOptions(this.options),i._defaulted&&!jc(this.options,i)&&_(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Me),observer:this});const c=this.hasListeners();c&&gv(_(this,Me),s,this.options,i)&&Ee(this,qe,xs).call(this),this.updateResult(),c&&(_(this,Me)!==s||xn(this.options.enabled,_(this,Me))!==xn(i.enabled,_(this,Me))||dl(this.options.staleTime,_(this,Me))!==dl(i.staleTime,_(this,Me)))&&Ee(this,qe,qd).call(this);const d=Ee(this,qe,Vd).call(this);c&&(_(this,Me)!==s||xn(this.options.enabled,_(this,Me))!==xn(i.enabled,_(this,Me))||d!==_(this,sl))&&Ee(this,qe,Gd).call(this,d)}getOptimisticResult(l){const i=_(this,Pt).getQueryCache().build(_(this,Pt),l),s=this.createResult(i,l);return Sw(this,s)&&(le(this,Lt,s),le(this,ti,this.options),le(this,Ql,_(this,Me).state)),s}getCurrentResult(){return _(this,Lt)}trackResult(l,i){return new Proxy(l,{get:(s,c)=>(this.trackProp(c),i==null||i(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,ga).status==="pending"&&_(this,ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,c))})}trackProp(l){_(this,li).add(l)}getCurrentQuery(){return _(this,Me)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=_(this,Pt).defaultQueryOptions(l),s=_(this,Pt).getQueryCache().build(_(this,Pt),i);return s.fetch().then(()=>this.createResult(s,i))}fetch(l){return Ee(this,qe,xs).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Lt)))}createResult(l,i){var ee;const s=_(this,Me),c=this.options,d=_(this,Lt),h=_(this,Ql),m=_(this,ti),g=l!==s?l.state:_(this,Os),{state:x}=l;let b={...x},E=!1,C;if(i._optimisticResults){const ne=this.hasListeners(),ie=!ne&&pv(l,i),te=ne&&gv(l,s,i,c);(ie||te)&&(b={...b,...zx(x.data,l.options)}),i._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:T,errorUpdatedAt:w,status:j}=b;C=b.data;let N=!1;if(i.placeholderData!==void 0&&C===void 0&&j==="pending"){let ne;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(ne=d.data,N=!0):ne=typeof i.placeholderData=="function"?i.placeholderData((ee=_(this,ai))==null?void 0:ee.state.data,_(this,ai)):i.placeholderData,ne!==void 0&&(j="success",C=kd(d==null?void 0:d.data,ne,i),E=!0)}if(i.select&&C!==void 0&&!N)if(d&&C===(h==null?void 0:h.data)&&i.select===_(this,Ms))C=_(this,ni);else try{le(this,Ms,i.select),C=i.select(C),C=kd(d==null?void 0:d.data,C,i),le(this,ni,C),le(this,il,null)}catch(ne){le(this,il,ne)}_(this,il)&&(T=_(this,il),C=_(this,ni),w=Date.now(),j="error");const O=b.fetchStatus==="fetching",M=j==="pending",z=j==="error",q=M&&O,X=C!==void 0,Q={status:j,fetchStatus:b.fetchStatus,isPending:M,isSuccess:j==="success",isError:z,isInitialLoading:q,isLoading:q,data:C,dataUpdatedAt:b.dataUpdatedAt,error:T,errorUpdatedAt:w,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:b.dataUpdateCount>g.dataUpdateCount||b.errorUpdateCount>g.errorUpdateCount,isFetching:O,isRefetching:O&&!M,isLoadingError:z&&!X,isPaused:b.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:z&&X,isStale:xh(l,i),refetch:this.refetch,promise:_(this,ga),isEnabled:xn(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const ne=Q.data!==void 0,ie=Q.status==="error"&&!ne,te=de=>{ie?de.reject(Q.error):ne&&de.resolve(Q.data)},ge=()=>{const de=le(this,ga,Q.promise=Hd());te(de)},ce=_(this,ga);switch(ce.status){case"pending":l.queryHash===s.queryHash&&te(ce);break;case"fulfilled":(ie||Q.data!==ce.value)&&ge();break;case"rejected":(!ie||Q.error!==ce.reason)&&ge();break}}return Q}updateResult(){const l=_(this,Lt),i=this.createResult(_(this,Me),this.options);if(le(this,Ql,_(this,Me).state),le(this,ti,this.options),_(this,Ql).data!==void 0&&le(this,ai,_(this,Me)),jc(i,l))return;le(this,Lt,i);const s=()=>{if(!l)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!_(this,li).size)return!0;const h=new Set(d??_(this,li));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,Lt)).some(m=>{const v=m;return _(this,Lt)[v]!==l[v]&&h.has(v)})};Ee(this,qe,Lx).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,qe,Yd).call(this)}},Pt=new WeakMap,Me=new WeakMap,Os=new WeakMap,Lt=new WeakMap,Ql=new WeakMap,ti=new WeakMap,ga=new WeakMap,il=new WeakMap,Ms=new WeakMap,ni=new WeakMap,ai=new WeakMap,Pl=new WeakMap,Xl=new WeakMap,sl=new WeakMap,li=new WeakMap,qe=new WeakSet,xs=function(l){Ee(this,qe,Xd).call(this);let i=_(this,Me).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(Ut)),i},qd=function(){Ee(this,qe,Qd).call(this);const l=dl(this.options.staleTime,_(this,Me));if(Ns.isServer()||_(this,Lt).isStale||!Ld(l))return;const s=Tx(_(this,Lt).dataUpdatedAt,l)+1;le(this,Pl,Hl.setTimeout(()=>{_(this,Lt).isStale||this.updateResult()},s))},Vd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Me)):this.options.refetchInterval)??!1},Gd=function(l){Ee(this,qe,Pd).call(this),le(this,sl,l),!(Ns.isServer()||xn(this.options.enabled,_(this,Me))===!1||!Ld(_(this,sl))||_(this,sl)===0)&&le(this,Xl,Hl.setInterval(()=>{(this.options.refetchIntervalInBackground||ph.isFocused())&&Ee(this,qe,xs).call(this)},_(this,sl)))},Yd=function(){Ee(this,qe,qd).call(this),Ee(this,qe,Gd).call(this,Ee(this,qe,Vd).call(this))},Qd=function(){_(this,Pl)&&(Hl.clearTimeout(_(this,Pl)),le(this,Pl,void 0))},Pd=function(){_(this,Xl)&&(Hl.clearInterval(_(this,Xl)),le(this,Xl,void 0))},Xd=function(){const l=_(this,Pt).getQueryCache().build(_(this,Pt),this.options);if(l===_(this,Me))return;const i=_(this,Me);le(this,Me,l),le(this,Os,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},Lx=function(l){mt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(_(this,Lt))}),_(this,Pt).getQueryCache().notify({query:_(this,Me),type:"observerResultsUpdated"})})},xx);function bw(n,l){return xn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function pv(n,l){return bw(n,l)||n.state.data!==void 0&&Kd(n,l,l.refetchOnMount)}function Kd(n,l,i){if(xn(l.enabled,n)!==!1&&dl(l.staleTime,n)!=="static"){const s=typeof i=="function"?i(n):i;return s==="always"||s!==!1&&xh(n,l)}return!1}function gv(n,l,i,s){return(n!==l||xn(s.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&xh(n,i)}function xh(n,l){return xn(l.enabled,n)!==!1&&n.isStaleByTime(dl(l.staleTime,n))}function Sw(n,l){return!jc(n.getCurrentResult(),l)}function yv(n){return{onFetch:(l,i)=>{var x,b,E,C,T;const s=l.options,c=(E=(b=(x=l.fetchOptions)==null?void 0:x.meta)==null?void 0:b.fetchMore)==null?void 0:E.direction,d=((C=l.state.data)==null?void 0:C.pages)||[],h=((T=l.state.data)==null?void 0:T.pageParams)||[];let m={pages:[],pageParams:[]},v=0;const g=async()=>{let w=!1;const j=M=>{hw(M,()=>l.signal,()=>w=!0)},N=_x(l.options,l.fetchOptions),O=async(M,z,q)=>{if(w)return Promise.reject();if(z==null&&M.pages.length)return Promise.resolve(M);const G=(()=>{const ie={client:l.client,queryKey:l.queryKey,pageParam:z,direction:q?"backward":"forward",meta:l.options.meta};return j(ie),ie})(),Q=await N(G),{maxPages:ee}=l.options,ne=q?dw:fw;return{pages:ne(M.pages,Q,ee),pageParams:ne(M.pageParams,z,ee)}};if(c&&d.length){const M=c==="backward",z=M?ww:vv,q={pages:d,pageParams:h},X=z(s,q);m=await O(q,X,M)}else{const M=n??d.length;do{const z=v===0?h[0]??s.initialPageParam:vv(s,m);if(v>0&&z==null)break;m=await O(m,z),v++}while(v<M)}return m};l.options.persister?l.fetchFn=()=>{var w,j;return(j=(w=l.options).persister)==null?void 0:j.call(w,g,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=g}}}function vv(n,{pages:l,pageParams:i}){const s=l.length-1;return l.length>0?n.getNextPageParam(l[s],l,i[s],i):void 0}function ww(n,{pages:l,pageParams:i}){var s;return l.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,l[0],l,i[0],i):void 0}var Ds,Ln,Tt,Kl,Un,el,bx,Ew=(bx=class extends Mx{constructor(l){super();ue(this,Un);ue(this,Ds);ue(this,Ln);ue(this,Tt);ue(this,Kl);le(this,Ds,l.client),this.mutationId=l.mutationId,le(this,Tt,l.mutationCache),le(this,Ln,[]),this.state=l.state||Ux(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){_(this,Ln).includes(l)||(_(this,Ln).push(l),this.clearGcTimeout(),_(this,Tt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){le(this,Ln,_(this,Ln).filter(i=>i!==l)),this.scheduleGc(),_(this,Tt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){_(this,Ln).length||(this.state.status==="pending"?this.scheduleGc():_(this,Tt).remove(this))}continue(){var l;return((l=_(this,Kl))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,m,v,g,x,b,E,C,T,w,j,N,O,M,z,q,X,G;const i=()=>{Ee(this,Un,el).call(this,{type:"continue"})},s={client:_(this,Ds),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,Kl,Ox({fn:()=>this.options.mutationFn?this.options.mutationFn(l,s):Promise.reject(new Error("No mutationFn found")),onFail:(Q,ee)=>{Ee(this,Un,el).call(this,{type:"failed",failureCount:Q,error:ee})},onPause:()=>{Ee(this,Un,el).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,Tt).canRun(this)}));const c=this.state.status==="pending",d=!_(this,Kl).canStart();try{if(c)i();else{Ee(this,Un,el).call(this,{type:"pending",variables:l,isPaused:d}),_(this,Tt).config.onMutate&&await _(this,Tt).config.onMutate(l,this,s);const ee=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,l,s));ee!==this.state.context&&Ee(this,Un,el).call(this,{type:"pending",context:ee,variables:l,isPaused:d})}const Q=await _(this,Kl).start();return await((g=(v=_(this,Tt).config).onSuccess)==null?void 0:g.call(v,Q,l,this.state.context,this,s)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,Q,l,this.state.context,s)),await((C=(E=_(this,Tt).config).onSettled)==null?void 0:C.call(E,Q,null,this.state.variables,this.state.context,this,s)),await((w=(T=this.options).onSettled)==null?void 0:w.call(T,Q,null,l,this.state.context,s)),Ee(this,Un,el).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((N=(j=_(this,Tt).config).onError)==null?void 0:N.call(j,Q,l,this.state.context,this,s))}catch(ee){Promise.reject(ee)}try{await((M=(O=this.options).onError)==null?void 0:M.call(O,Q,l,this.state.context,s))}catch(ee){Promise.reject(ee)}try{await((q=(z=_(this,Tt).config).onSettled)==null?void 0:q.call(z,void 0,Q,this.state.variables,this.state.context,this,s))}catch(ee){Promise.reject(ee)}try{await((G=(X=this.options).onSettled)==null?void 0:G.call(X,void 0,Q,l,this.state.context,s))}catch(ee){Promise.reject(ee)}throw Ee(this,Un,el).call(this,{type:"error",error:Q}),Q}finally{_(this,Tt).runNext(this)}}},Ds=new WeakMap,Ln=new WeakMap,Tt=new WeakMap,Kl=new WeakMap,Un=new WeakSet,el=function(l){const i=s=>{switch(l.type){case"failed":return{...s,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...s,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:l.error,failureCount:s.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),mt.batch(()=>{_(this,Ln).forEach(s=>{s.onMutationUpdate(l)}),_(this,Tt).notify({mutation:this,type:"updated",action:l})})},bx);function Ux(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ya,Nn,zs,Sx,Cw=(Sx=class extends ui{constructor(l={}){super();ue(this,ya);ue(this,Nn);ue(this,zs);this.config=l,le(this,ya,new Set),le(this,Nn,new Map),le(this,zs,0)}build(l,i,s){const c=new Ew({client:l,mutationCache:this,mutationId:++oc(this,zs)._,options:l.defaultMutationOptions(i),state:s});return this.add(c),c}add(l){_(this,ya).add(l);const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i);s?s.push(l):_(this,Nn).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(_(this,ya).delete(l)){const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i);if(s)if(s.length>1){const c=s.indexOf(l);c!==-1&&s.splice(c,1)}else s[0]===l&&_(this,Nn).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=cc(l);if(typeof i=="string"){const s=_(this,Nn).get(i),c=s==null?void 0:s.find(d=>d.state.status==="pending");return!c||c===l}else return!0}runNext(l){var s;const i=cc(l);if(typeof i=="string"){const c=(s=_(this,Nn).get(i))==null?void 0:s.find(d=>d!==l&&d.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{_(this,ya).forEach(l=>{this.notify({type:"removed",mutation:l})}),_(this,ya).clear(),_(this,Nn).clear()})}getAll(){return Array.from(_(this,ya))}find(l){const i={exact:!0,...l};return this.getAll().find(s=>uv(i,s))}findAll(l={}){return this.getAll().filter(i=>uv(l,i))}notify(l){mt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return mt.batch(()=>Promise.all(l.map(i=>i.continue().catch(Ut))))}},ya=new WeakMap,Nn=new WeakMap,zs=new WeakMap,Sx);function cc(n){var l;return(l=n.options.scope)==null?void 0:l.id}var va,ol,Xt,xa,ba,vc,Fd,wx,jw=(wx=class extends ui{constructor(i,s){super();ue(this,ba);ue(this,va);ue(this,ol);ue(this,Xt);ue(this,xa);le(this,va,i),this.setOptions(s),this.bindMethods(),Ee(this,ba,vc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var c;const s=this.options;this.options=_(this,va).defaultMutationOptions(i),jc(this.options,s)||_(this,va).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Xt),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Fl(s.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((c=_(this,Xt))==null?void 0:c.state.status)==="pending"&&_(this,Xt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,Xt))==null||i.removeObserver(this)}onMutationUpdate(i){Ee(this,ba,vc).call(this),Ee(this,ba,Fd).call(this,i)}getCurrentResult(){return _(this,ol)}reset(){var i;(i=_(this,Xt))==null||i.removeObserver(this),le(this,Xt,void 0),Ee(this,ba,vc).call(this),Ee(this,ba,Fd).call(this)}mutate(i,s){var c;return le(this,xa,s),(c=_(this,Xt))==null||c.removeObserver(this),le(this,Xt,_(this,va).getMutationCache().build(_(this,va),this.options)),_(this,Xt).addObserver(this),_(this,Xt).execute(i)}},va=new WeakMap,ol=new WeakMap,Xt=new WeakMap,xa=new WeakMap,ba=new WeakSet,vc=function(){var s;const i=((s=_(this,Xt))==null?void 0:s.state)??Ux();le(this,ol,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Fd=function(i){mt.batch(()=>{var s,c,d,h,m,v,g,x;if(_(this,xa)&&this.hasListeners()){const b=_(this,ol).variables,E=_(this,ol).context,C={client:_(this,va),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(c=(s=_(this,xa)).onSuccess)==null||c.call(s,i.data,b,E,C)}catch(T){Promise.reject(T)}try{(h=(d=_(this,xa)).onSettled)==null||h.call(d,i.data,null,b,E,C)}catch(T){Promise.reject(T)}}else if((i==null?void 0:i.type)==="error"){try{(v=(m=_(this,xa)).onError)==null||v.call(m,i.error,b,E,C)}catch(T){Promise.reject(T)}try{(x=(g=_(this,xa)).onSettled)==null||x.call(g,void 0,i.error,b,E,C)}catch(T){Promise.reject(T)}}}this.listeners.forEach(b=>{b(_(this,ol))})})},wx),kn,Ex,Nw=(Ex=class extends ui{constructor(l={}){super();ue(this,kn);this.config=l,le(this,kn,new Map)}build(l,i,s){const c=i.queryKey,d=i.queryHash??gh(c,i);let h=this.get(d);return h||(h=new vw({client:l,queryKey:c,queryHash:d,options:l.defaultQueryOptions(i),state:s,defaultOptions:l.getQueryDefaults(c)}),this.add(h)),h}add(l){_(this,kn).has(l.queryHash)||(_(this,kn).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=_(this,kn).get(l.queryHash);i&&(l.destroy(),i===l&&_(this,kn).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){mt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return _(this,kn).get(l)}getAll(){return[..._(this,kn).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(s=>cv(i,s))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(s=>cv(l,s)):i}notify(l){mt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},kn=new WeakMap,Ex),at,cl,ul,ri,ii,fl,si,oi,Cx,Tw=(Cx=class{constructor(n={}){ue(this,at);ue(this,cl);ue(this,ul);ue(this,ri);ue(this,ii);ue(this,fl);ue(this,si);ue(this,oi);le(this,at,n.queryCache||new Nw),le(this,cl,n.mutationCache||new Cw),le(this,ul,n.defaultOptions||{}),le(this,ri,new Map),le(this,ii,new Map),le(this,fl,0)}mount(){oc(this,fl)._++,_(this,fl)===1&&(le(this,si,ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,at).onFocus())})),le(this,oi,Nc.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,at).onOnline())})))}unmount(){var n,l;oc(this,fl)._--,_(this,fl)===0&&((n=_(this,si))==null||n.call(this),le(this,si,void 0),(l=_(this,oi))==null||l.call(this),le(this,oi,void 0))}isFetching(n){return _(this,at).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,cl).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,at).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=_(this,at).build(this,l),s=i.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(dl(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(s))}getQueriesData(n){return _(this,at).findAll(n).map(({queryKey:l,state:i})=>{const s=i.data;return[l,s]})}setQueryData(n,l,i){const s=this.defaultQueryOptions({queryKey:n}),c=_(this,at).get(s.queryHash),d=c==null?void 0:c.state.data,h=ow(l,d);if(h!==void 0)return _(this,at).build(this,s).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return mt.batch(()=>_(this,at).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,at).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=_(this,at);mt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=_(this,at);return mt.batch(()=>(i.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},s=mt.batch(()=>_(this,at).findAll(n).map(c=>c.cancel(i)));return Promise.all(s).then(Ut).catch(Ut)}invalidateQueries(n,l={}){return mt.batch(()=>(_(this,at).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},s=mt.batch(()=>_(this,at).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(Ut)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(s).then(Ut)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=_(this,at).build(this,l);return i.isStaleByTime(dl(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ut).catch(Ut)}fetchInfiniteQuery(n){return n.behavior=yv(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ut).catch(Ut)}ensureInfiniteQueryData(n){return n.behavior=yv(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Nc.isOnline()?_(this,cl).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,at)}getMutationCache(){return _(this,cl)}getDefaultOptions(){return _(this,ul)}setDefaultOptions(n){le(this,ul,n)}setQueryDefaults(n,l){_(this,ri).set(Fl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[..._(this,ri).values()],i={};return l.forEach(s=>{js(n,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(n,l){_(this,ii).set(Fl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[..._(this,ii).values()],i={};return l.forEach(s=>{js(n,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={..._(this,ul).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=gh(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===yh&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,ul).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,at).clear(),_(this,cl).clear()}},at=new WeakMap,cl=new WeakMap,ul=new WeakMap,ri=new WeakMap,ii=new WeakMap,fl=new WeakMap,si=new WeakMap,oi=new WeakMap,Cx),kx=y.createContext(void 0),bh=n=>{const l=y.useContext(kx);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},Rw=({client:n,children:l})=>(y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(kx.Provider,{value:n,children:l})),Hx=y.createContext(!1),_w=()=>y.useContext(Hx);Hx.Provider;function Aw(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ow=y.createContext(Aw()),Mw=()=>y.useContext(Ow),Dw=(n,l,i)=>{const s=i!=null&&i.state.error&&typeof n.throwOnError=="function"?vh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||s)&&(l.isReset()||(n.retryOnMount=!1))},zw=n=>{y.useEffect(()=>{n.clearReset()},[n])},Lw=({result:n,errorResetBoundary:l,throwOnError:i,query:s,suspense:c})=>n.isError&&!l.isReset()&&!n.isFetching&&s&&(c&&n.data===void 0||vh(i,[n.error,s])),Uw=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),s=n.staleTime;n.staleTime=typeof s=="function"?(...c)=>i(s(...c)):i(s),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kw=(n,l)=>n.isLoading&&n.isFetching&&!l,Hw=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,xv=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Bw(n,l,i){var E,C,T,w;const s=_w(),c=Mw(),d=bh(),h=d.defaultQueryOptions(n);(C=(E=d.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||C.call(E,h);const m=d.getQueryCache().get(h.queryHash);h._optimisticResults=s?"isRestoring":"optimistic",Uw(h),Dw(h,c,m),zw(c);const v=!d.getQueryCache().get(h.queryHash),[g]=y.useState(()=>new l(d,h)),x=g.getOptimisticResult(h),b=!s&&n.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(j=>{const N=b?g.subscribe(mt.batchCalls(j)):Ut;return g.updateResult(),N},[g,b]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),y.useEffect(()=>{g.setOptions(h)},[h,g]),Hw(h,x))throw xv(h,g,c);if(Lw({result:x,errorResetBoundary:c,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;if((w=(T=d.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||w.call(T,h,x),h.experimental_prefetchInRender&&!Ns.isServer()&&kw(x,s)){const j=v?xv(h,g,c):m==null?void 0:m.promise;j==null||j.catch(Ut).finally(()=>{g.updateResult()})}return h.notifyOnChangeProps?x:g.trackResult(x)}function er(n,l){return Bw(n,xw)}function qw(n,l){const i=bh(),[s]=y.useState(()=>new jw(i,n));y.useEffect(()=>{s.setOptions(n)},[s,n]);const c=y.useSyncExternalStore(y.useCallback(h=>s.subscribe(mt.batchCalls(h)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=y.useCallback((h,m)=>{s.mutate(h,m).catch(Ut)},[s]);if(c.error&&vh(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}/**
50
50
  * react-router v7.13.1
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,9 +55,9 @@ Error generating stack: `+r.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */var bv="popstate";function Sv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Vw(n={}){function l(s,c){var p;let d=(p=c.state)==null?void 0:p.masked,{pathname:h,search:m,hash:y}=d||s.location;return Zd("",{pathname:h,search:m,hash:y},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function i(s,c){return typeof c=="string"?c:Ts(c)}return Yw(l,i,null,n)}function et(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Tn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Gw(){return Math.random().toString(36).substring(2,10)}function wv(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Zd(n,l,i=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?fi(l):l,state:i,key:l&&l.key||s||Gw(),unstable_mask:c}}function Ts({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function fi(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let s=n.indexOf("?");s>=0&&(l.search=n.substring(s),n=n.substring(0,s)),n&&(l.pathname=n)}return l}function Yw(n,l,i,s={}){let{window:c=document.defaultView,v5Compat:d=!1}=s,h=c.history,m="POP",y=null,p=b();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function b(){return(h.state||{idx:null}).idx}function x(){m="POP";let j=b(),N=j==null?null:j-p;p=j,y&&y({action:m,location:w.location,delta:N})}function E(j,N){m="PUSH";let O=Sv(j)?j:Zd(w.location,j,N);p=b()+1;let D=wv(O,p),z=w.createHref(O.unstable_mask||O);try{h.pushState(D,"",z)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;c.location.assign(z)}d&&y&&y({action:m,location:w.location,delta:1})}function C(j,N){m="REPLACE";let O=Sv(j)?j:Zd(w.location,j,N);p=b();let D=wv(O,p),z=w.createHref(O.unstable_mask||O);h.replaceState(D,"",z),d&&y&&y({action:m,location:w.location,delta:0})}function T(j){return Qw(j)}let w={get action(){return m},get location(){return n(c,h)},listen(j){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(bv,x),y=j,()=>{c.removeEventListener(bv,x),y=null}},createHref(j){return l(c,j)},createURL:T,encodeLocation(j){let N=T(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:E,replace:C,go(j){return h.go(j)}};return w}function Qw(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),et(i,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Ts(n);return s=s.replace(/ $/,"%20"),!l&&s.startsWith("//")&&(s=i+s),new URL(s,i)}function Bx(n,l,i="/"){return Pw(n,l,i,!1)}function Pw(n,l,i,s){let c=typeof l=="string"?fi(l):l,d=Sa(c.pathname||"/",i);if(d==null)return null;let h=qx(n);Xw(h);let m=null;for(let y=0;m==null&&y<h.length;++y){let p=aE(d);m=tE(h[y],p,s)}return m}function qx(n,l=[],i=[],s="",c=!1){let d=(h,m,y=c,p)=>{let b={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&y)return;et(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let x=Vn([s,b.relativePath]),E=i.concat(b);h.children&&h.children.length>0&&(et(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),qx(h.children,l,E,x,y)),!(h.path==null&&!h.index)&&l.push({path:x,score:Ww(x,h.index),routesMeta:E})};return n.forEach((h,m)=>{var y;if(h.path===""||!((y=h.path)!=null&&y.includes("?")))d(h,m);else for(let p of Vx(h.path))d(h,m,!0,p)}),l}function Vx(n){let l=n.split("/");if(l.length===0)return[];let[i,...s]=l,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let h=Vx(s.join("/")),m=[];return m.push(...h.map(y=>y===""?d:[d,y].join("/"))),c&&m.push(...h),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function Xw(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:eE(l.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var Kw=/^:[\w-]+$/,Fw=3,Zw=2,Iw=1,$w=10,Jw=-2,Ev=n=>n==="*";function Ww(n,l){let i=n.split("/"),s=i.length;return i.some(Ev)&&(s+=Jw),l&&(s+=Zw),i.filter(c=>!Ev(c)).reduce((c,d)=>c+(Kw.test(d)?Fw:d===""?Iw:$w),s)}function eE(n,l){return n.length===l.length&&n.slice(0,-1).every((s,c)=>s===l[c])?n[n.length-1]-l[l.length-1]:0}function tE(n,l,i=!1){let{routesMeta:s}=n,c={},d="/",h=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,b=d==="/"?l:l.slice(d.length)||"/",x=Tc({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},b),E=y.route;if(!x&&p&&i&&!s[s.length-1].route.index&&(x=Tc({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:Vn([d,x.pathname]),pathnameBase:sE(Vn([d,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(d=Vn([d,x.pathnameBase]))}return h}function Tc(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,s]=nE(n.path,n.caseSensitive,n.end),c=l.match(i);if(!c)return null;let d=c[0],h=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:s.reduce((p,{paramName:b,isOptional:x},E)=>{if(b==="*"){let T=m[E]||"";h=d.slice(0,d.length-T.length).replace(/(.)\/+$/,"$1")}const C=m[E];return x&&!C?p[b]=void 0:p[b]=(C||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:h,pattern:n}}function nE(n,l=!1,i=!0){Tn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,y,p,b)=>{if(s.push({paramName:m,isOptional:y!=null}),y){let x=b.charAt(p+h.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,l?void 0:"i"),s]}function aE(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Tn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Sa(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,s=n.charAt(i);return s&&s!=="/"?null:n.slice(i)||"/"}var lE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rE(n,l="/"){let{pathname:i,search:s="",hash:c=""}=typeof n=="string"?fi(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=Cv(i.substring(1),"/"):d=Cv(i,l)):d=l,{pathname:d,search:oE(s),hash:cE(c)}}function Cv(n,l){let i=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function yd(n,l,i,s){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iE(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function Gx(n){let l=iE(n);return l.map((i,s)=>s===l.length-1?i.pathname:i.pathnameBase)}function Sh(n,l,i,s=!1){let c;typeof n=="string"?c=fi(n):(c={...n},et(!c.pathname||!c.pathname.includes("?"),yd("?","pathname","search",c)),et(!c.pathname||!c.pathname.includes("#"),yd("#","pathname","hash",c)),et(!c.search||!c.search.includes("#"),yd("#","search","hash",c)));let d=n===""||c.pathname==="",h=d?"/":c.pathname,m;if(h==null)m=i;else{let x=l.length-1;if(!s&&h.startsWith("..")){let E=h.split("/");for(;E[0]==="..";)E.shift(),x-=1;c.pathname=E.join("/")}m=x>=0?l[x]:"/"}let y=rE(c,m),p=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&i.endsWith("/");return!y.pathname.endsWith("/")&&(p||b)&&(y.pathname+="/"),y}var Vn=n=>n.join("/").replace(/\/\/+/g,"/"),sE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),oE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,cE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,uE=class{constructor(n,l,i,s=!1){this.status=n,this.statusText=l||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function fE(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function dE(n){return n.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qx(n,l){let i=n;if(typeof i!="string"||!lE.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,c=!1;if(Yx)try{let d=new URL(window.location.href),h=i.startsWith("//")?new URL(d.protocol+i):new URL(i),m=Sa(h.pathname,l);h.origin===d.origin&&m!=null?i=m+h.search+h.hash:c=!0}catch{Tn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Px=["POST","PUT","PATCH","DELETE"];new Set(Px);var hE=["GET",...Px];new Set(hE);var di=v.createContext(null);di.displayName="DataRouter";var zc=v.createContext(null);zc.displayName="DataRouterState";var mE=v.createContext(!1),Xx=v.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var pE=v.createContext(new Map);pE.displayName="Fetchers";var gE=v.createContext(null);gE.displayName="Await";var Sn=v.createContext(null);Sn.displayName="Navigation";var Ls=v.createContext(null);Ls.displayName="Location";var Yn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName="Route";var wh=v.createContext(null);wh.displayName="RouteError";var Kx="REACT_ROUTER_ERROR",yE="REDIRECT",vE="ROUTE_ERROR_RESPONSE";function xE(n){if(n.startsWith(`${Kx}:${yE}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function bE(n){if(n.startsWith(`${Kx}:${vE}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new uE(l.status,l.statusText,l.data)}catch{}}function SE(n,{relative:l}={}){et(Us(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=v.useContext(Sn),{hash:c,pathname:d,search:h}=ks(n,{relative:l}),m=d;return i!=="/"&&(m=d==="/"?i:Vn([i,d])),s.createHref({pathname:m,search:h,hash:c})}function Us(){return v.useContext(Ls)!=null}function Qn(){return et(Us(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Ls).location}var Fx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zx(n){v.useContext(Sn).static||v.useLayoutEffect(n)}function Eh(){let{isDataRoute:n}=v.useContext(Yn);return n?UE():wE()}function wE(){et(Us(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(di),{basename:l,navigator:i}=v.useContext(Sn),{matches:s}=v.useContext(Yn),{pathname:c}=Qn(),d=JSON.stringify(Gx(s)),h=v.useRef(!1);return Zx(()=>{h.current=!0}),v.useCallback((y,p={})=>{if(Tn(h.current,Fx),!h.current)return;if(typeof y=="number"){i.go(y);return}let b=Sh(y,JSON.parse(d),c,p.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Vn([l,b.pathname])),(p.replace?i.replace:i.push)(b,p.state,p)},[l,i,d,c,n])}var EE=v.createContext(null);function CE(n){let l=v.useContext(Yn).outlet;return v.useMemo(()=>l&&v.createElement(EE.Provider,{value:n},l),[l,n])}function ks(n,{relative:l}={}){let{matches:i}=v.useContext(Yn),{pathname:s}=Qn(),c=JSON.stringify(Gx(i));return v.useMemo(()=>Sh(n,JSON.parse(c),s,l==="path"),[n,c,s,l])}function jE(n,l){return Ix(n,l)}function Ix(n,l,i){var j;et(Us(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(Sn),{matches:c}=v.useContext(Yn),d=c[c.length-1],h=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",p=d&&d.route;{let N=p&&p.path||"";Jx(m,!p||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${N}">) 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.
58
+ */var bv="popstate";function Sv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Vw(n={}){function l(s,c){var g;let d=(g=c.state)==null?void 0:g.masked,{pathname:h,search:m,hash:v}=d||s.location;return Zd("",{pathname:h,search:m,hash:v},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function i(s,c){return typeof c=="string"?c:Ts(c)}return Yw(l,i,null,n)}function et(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Tn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Gw(){return Math.random().toString(36).substring(2,10)}function wv(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Zd(n,l,i=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?fi(l):l,state:i,key:l&&l.key||s||Gw(),unstable_mask:c}}function Ts({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function fi(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let s=n.indexOf("?");s>=0&&(l.search=n.substring(s),n=n.substring(0,s)),n&&(l.pathname=n)}return l}function Yw(n,l,i,s={}){let{window:c=document.defaultView,v5Compat:d=!1}=s,h=c.history,m="POP",v=null,g=x();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function x(){return(h.state||{idx:null}).idx}function b(){m="POP";let j=x(),N=j==null?null:j-g;g=j,v&&v({action:m,location:w.location,delta:N})}function E(j,N){m="PUSH";let O=Sv(j)?j:Zd(w.location,j,N);g=x()+1;let M=wv(O,g),z=w.createHref(O.unstable_mask||O);try{h.pushState(M,"",z)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;c.location.assign(z)}d&&v&&v({action:m,location:w.location,delta:1})}function C(j,N){m="REPLACE";let O=Sv(j)?j:Zd(w.location,j,N);g=x();let M=wv(O,g),z=w.createHref(O.unstable_mask||O);h.replaceState(M,"",z),d&&v&&v({action:m,location:w.location,delta:0})}function T(j){return Qw(j)}let w={get action(){return m},get location(){return n(c,h)},listen(j){if(v)throw new Error("A history only accepts one active listener");return c.addEventListener(bv,b),v=j,()=>{c.removeEventListener(bv,b),v=null}},createHref(j){return l(c,j)},createURL:T,encodeLocation(j){let N=T(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:E,replace:C,go(j){return h.go(j)}};return w}function Qw(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),et(i,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Ts(n);return s=s.replace(/ $/,"%20"),!l&&s.startsWith("//")&&(s=i+s),new URL(s,i)}function Bx(n,l,i="/"){return Pw(n,l,i,!1)}function Pw(n,l,i,s){let c=typeof l=="string"?fi(l):l,d=Sa(c.pathname||"/",i);if(d==null)return null;let h=qx(n);Xw(h);let m=null;for(let v=0;m==null&&v<h.length;++v){let g=aE(d);m=tE(h[v],g,s)}return m}function qx(n,l=[],i=[],s="",c=!1){let d=(h,m,v=c,g)=>{let x={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(s)&&v)return;et(x.relativePath.startsWith(s),`Absolute route path "${x.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(s.length)}let b=Vn([s,x.relativePath]),E=i.concat(x);h.children&&h.children.length>0&&(et(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),qx(h.children,l,E,b,v)),!(h.path==null&&!h.index)&&l.push({path:b,score:Ww(b,h.index),routesMeta:E})};return n.forEach((h,m)=>{var v;if(h.path===""||!((v=h.path)!=null&&v.includes("?")))d(h,m);else for(let g of Vx(h.path))d(h,m,!0,g)}),l}function Vx(n){let l=n.split("/");if(l.length===0)return[];let[i,...s]=l,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let h=Vx(s.join("/")),m=[];return m.push(...h.map(v=>v===""?d:[d,v].join("/"))),c&&m.push(...h),m.map(v=>n.startsWith("/")&&v===""?"/":v)}function Xw(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:eE(l.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var Kw=/^:[\w-]+$/,Fw=3,Zw=2,Iw=1,$w=10,Jw=-2,Ev=n=>n==="*";function Ww(n,l){let i=n.split("/"),s=i.length;return i.some(Ev)&&(s+=Jw),l&&(s+=Zw),i.filter(c=>!Ev(c)).reduce((c,d)=>c+(Kw.test(d)?Fw:d===""?Iw:$w),s)}function eE(n,l){return n.length===l.length&&n.slice(0,-1).every((s,c)=>s===l[c])?n[n.length-1]-l[l.length-1]:0}function tE(n,l,i=!1){let{routesMeta:s}=n,c={},d="/",h=[];for(let m=0;m<s.length;++m){let v=s[m],g=m===s.length-1,x=d==="/"?l:l.slice(d.length)||"/",b=Tc({path:v.relativePath,caseSensitive:v.caseSensitive,end:g},x),E=v.route;if(!b&&g&&i&&!s[s.length-1].route.index&&(b=Tc({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},x)),!b)return null;Object.assign(c,b.params),h.push({params:c,pathname:Vn([d,b.pathname]),pathnameBase:sE(Vn([d,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(d=Vn([d,b.pathnameBase]))}return h}function Tc(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,s]=nE(n.path,n.caseSensitive,n.end),c=l.match(i);if(!c)return null;let d=c[0],h=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:s.reduce((g,{paramName:x,isOptional:b},E)=>{if(x==="*"){let T=m[E]||"";h=d.slice(0,d.length-T.length).replace(/(.)\/+$/,"$1")}const C=m[E];return b&&!C?g[x]=void 0:g[x]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:h,pattern:n}}function nE(n,l=!1,i=!0){Tn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,v,g,x)=>{if(s.push({paramName:m,isOptional:v!=null}),v){let b=x.charAt(g+h.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,l?void 0:"i"),s]}function aE(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Tn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Sa(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,s=n.charAt(i);return s&&s!=="/"?null:n.slice(i)||"/"}var lE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rE(n,l="/"){let{pathname:i,search:s="",hash:c=""}=typeof n=="string"?fi(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=Cv(i.substring(1),"/"):d=Cv(i,l)):d=l,{pathname:d,search:oE(s),hash:cE(c)}}function Cv(n,l){let i=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function yd(n,l,i,s){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iE(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function Gx(n){let l=iE(n);return l.map((i,s)=>s===l.length-1?i.pathname:i.pathnameBase)}function Sh(n,l,i,s=!1){let c;typeof n=="string"?c=fi(n):(c={...n},et(!c.pathname||!c.pathname.includes("?"),yd("?","pathname","search",c)),et(!c.pathname||!c.pathname.includes("#"),yd("#","pathname","hash",c)),et(!c.search||!c.search.includes("#"),yd("#","search","hash",c)));let d=n===""||c.pathname==="",h=d?"/":c.pathname,m;if(h==null)m=i;else{let b=l.length-1;if(!s&&h.startsWith("..")){let E=h.split("/");for(;E[0]==="..";)E.shift(),b-=1;c.pathname=E.join("/")}m=b>=0?l[b]:"/"}let v=rE(c,m),g=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!v.pathname.endsWith("/")&&(g||x)&&(v.pathname+="/"),v}var Vn=n=>n.join("/").replace(/\/\/+/g,"/"),sE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),oE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,cE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,uE=class{constructor(n,l,i,s=!1){this.status=n,this.statusText=l||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function fE(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function dE(n){return n.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qx(n,l){let i=n;if(typeof i!="string"||!lE.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,c=!1;if(Yx)try{let d=new URL(window.location.href),h=i.startsWith("//")?new URL(d.protocol+i):new URL(i),m=Sa(h.pathname,l);h.origin===d.origin&&m!=null?i=m+h.search+h.hash:c=!0}catch{Tn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Px=["POST","PUT","PATCH","DELETE"];new Set(Px);var hE=["GET",...Px];new Set(hE);var di=y.createContext(null);di.displayName="DataRouter";var zc=y.createContext(null);zc.displayName="DataRouterState";var mE=y.createContext(!1),Xx=y.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var pE=y.createContext(new Map);pE.displayName="Fetchers";var gE=y.createContext(null);gE.displayName="Await";var Sn=y.createContext(null);Sn.displayName="Navigation";var Ls=y.createContext(null);Ls.displayName="Location";var Yn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName="Route";var wh=y.createContext(null);wh.displayName="RouteError";var Kx="REACT_ROUTER_ERROR",yE="REDIRECT",vE="ROUTE_ERROR_RESPONSE";function xE(n){if(n.startsWith(`${Kx}:${yE}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function bE(n){if(n.startsWith(`${Kx}:${vE}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new uE(l.status,l.statusText,l.data)}catch{}}function SE(n,{relative:l}={}){et(Us(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=y.useContext(Sn),{hash:c,pathname:d,search:h}=ks(n,{relative:l}),m=d;return i!=="/"&&(m=d==="/"?i:Vn([i,d])),s.createHref({pathname:m,search:h,hash:c})}function Us(){return y.useContext(Ls)!=null}function Qn(){return et(Us(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Ls).location}var Fx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zx(n){y.useContext(Sn).static||y.useLayoutEffect(n)}function Eh(){let{isDataRoute:n}=y.useContext(Yn);return n?UE():wE()}function wE(){et(Us(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(di),{basename:l,navigator:i}=y.useContext(Sn),{matches:s}=y.useContext(Yn),{pathname:c}=Qn(),d=JSON.stringify(Gx(s)),h=y.useRef(!1);return Zx(()=>{h.current=!0}),y.useCallback((v,g={})=>{if(Tn(h.current,Fx),!h.current)return;if(typeof v=="number"){i.go(v);return}let x=Sh(v,JSON.parse(d),c,g.relative==="path");n==null&&l!=="/"&&(x.pathname=x.pathname==="/"?l:Vn([l,x.pathname])),(g.replace?i.replace:i.push)(x,g.state,g)},[l,i,d,c,n])}var EE=y.createContext(null);function CE(n){let l=y.useContext(Yn).outlet;return y.useMemo(()=>l&&y.createElement(EE.Provider,{value:n},l),[l,n])}function ks(n,{relative:l}={}){let{matches:i}=y.useContext(Yn),{pathname:s}=Qn(),c=JSON.stringify(Gx(i));return y.useMemo(()=>Sh(n,JSON.parse(c),s,l==="path"),[n,c,s,l])}function jE(n,l){return Ix(n,l)}function Ix(n,l,i){var j;et(Us(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Sn),{matches:c}=y.useContext(Yn),d=c[c.length-1],h=d?d.params:{},m=d?d.pathname:"/",v=d?d.pathnameBase:"/",g=d&&d.route;{let N=g&&g.path||"";Jx(m,!g||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${N}">) 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.
59
59
 
60
- Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=Qn(),x;if(l){let N=typeof l=="string"?fi(l):l;et(y==="/"||((j=N.pathname)==null?void 0:j.startsWith(y)),`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 "${y}" but pathname "${N.pathname}" was given in the \`location\` prop.`),x=N}else x=b;let E=x.pathname||"/",C=E;if(y!=="/"){let N=y.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(N.length).join("/")}let T=Bx(n,{pathname:C});Tn(p||T!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Tn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 w=AE(T&&T.map(N=>Object.assign({},N,{params:Object.assign({},h,N.params),pathname:Vn([y,s.encodeLocation?s.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?y:Vn([y,s.encodeLocation?s.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,i);return l&&w?v.createElement(Ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},w):w}function NE(){let n=LE(),l=fE(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:d},"ErrorBoundary")," or"," ",v.createElement("code",{style:d},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},l),i?v.createElement("pre",{style:c},i):null,h)}var TE=v.createElement(NE,null),$x=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=bE(n.digest);i&&(n=i)}let l=n!==void 0?v.createElement(Yn.Provider,{value:this.props.routeContext},v.createElement(wh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(RE,{error:n},l):l}};$x.contextType=mE;var vd=new WeakMap;function RE({children:n,error:l}){let{basename:i}=v.useContext(Sn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let s=xE(l.digest);if(s){let c=vd.get(l);if(c)throw c;let d=Qx(s.location,i);if(Yx&&!vd.get(l))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw vd.set(l,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function _E({routeContext:n,match:l,children:i}){let s=v.useContext(di);return s&&s.static&&s.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=l.route.id),v.createElement(Yn.Provider,{value:n},i)}function AE(n,l=[],i){let s=i==null?void 0:i.state;if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(l.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,d=s==null?void 0:s.errors;if(d!=null){let b=c.findIndex(x=>x.route.id&&(d==null?void 0:d[x.route.id])!==void 0);et(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let h=!1,m=-1;if(i&&s){h=s.renderFallback;for(let b=0;b<c.length;b++){let x=c[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(m=b),x.route.id){let{loaderData:E,errors:C}=s,T=x.route.loader&&!E.hasOwnProperty(x.route.id)&&(!C||C[x.route.id]===void 0);if(x.route.lazy||T){i.isStatic&&(h=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let y=i==null?void 0:i.onError,p=s&&y?(b,x)=>{var E,C;y(b,{location:s.location,params:((C=(E=s.matches)==null?void 0:E[0])==null?void 0:C.params)??{},unstable_pattern:dE(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,E)=>{let C,T=!1,w=null,j=null;s&&(C=d&&x.route.id?d[x.route.id]:void 0,w=x.route.errorElement||TE,h&&(m<0&&E===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,j=null):m===E&&(T=!0,j=x.route.hydrateFallbackElement||null)));let N=l.concat(c.slice(0,E+1)),O=()=>{let D;return C?D=w:T?D=j:x.route.Component?D=v.createElement(x.route.Component,null):x.route.element?D=x.route.element:D=b,v.createElement(_E,{match:x,routeContext:{outlet:b,matches:N,isDataRoute:s!=null},children:D})};return s&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?v.createElement($x,{location:s.location,revalidation:s.revalidation,component:w,error:C,children:O(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:p}):O()},null)}function Ch(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function OE(n){let l=v.useContext(di);return et(l,Ch(n)),l}function ME(n){let l=v.useContext(zc);return et(l,Ch(n)),l}function DE(n){let l=v.useContext(Yn);return et(l,Ch(n)),l}function jh(n){let l=DE(n),i=l.matches[l.matches.length-1];return et(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function zE(){return jh("useRouteId")}function LE(){var s;let n=v.useContext(wh),l=ME("useRouteError"),i=jh("useRouteError");return n!==void 0?n:(s=l.errors)==null?void 0:s[i]}function UE(){let{router:n}=OE("useNavigate"),l=jh("useNavigate"),i=v.useRef(!1);return Zx(()=>{i.current=!0}),v.useCallback(async(c,d={})=>{Tn(i.current,Fx),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:l,...d}))},[n,l])}var jv={};function Jx(n,l,i){!l&&!jv[n]&&(jv[n]=!0,Tn(!1,i))}v.memo(kE);function kE({routes:n,future:l,state:i,isStatic:s,onError:c}){return Ix(n,void 0,{state:i,isStatic:s,onError:c})}function HE(n){return CE(n.context)}function Yr(n){et(!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 BE({basename:n="/",children:l=null,location:i,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){et(!Us(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:h,future:{}}),[m,c,d,h]);typeof i=="string"&&(i=fi(i));let{pathname:p="/",search:b="",hash:x="",state:E=null,key:C="default",unstable_mask:T}=i,w=v.useMemo(()=>{let j=Sa(p,m);return j==null?null:{location:{pathname:j,search:b,hash:x,state:E,key:C,unstable_mask:T},navigationType:s}},[m,p,b,x,E,C,s,T]);return Tn(w!=null,`<Router basename="${m}"> is not able to match the URL "${p}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(Sn.Provider,{value:y},v.createElement(Ls.Provider,{children:l,value:w}))}function qE({children:n,location:l}){return jE(Id(n),l)}function Id(n,l=[]){let i=[];return v.Children.forEach(n,(s,c)=>{if(!v.isValidElement(s))return;let d=[...l,c];if(s.type===v.Fragment){i.push.apply(i,Id(s.props.children,d));return}et(s.type===Yr,`[${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>`),et(!s.props.index||!s.props.children,"An index route cannot have child routes.");let h={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,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&&(h.children=Id(s.props.children,d)),i.push(h)}),i}var xc="get",bc="application/x-www-form-urlencoded";function Lc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function VE(n){return Lc(n)&&n.tagName.toLowerCase()==="button"}function GE(n){return Lc(n)&&n.tagName.toLowerCase()==="form"}function YE(n){return Lc(n)&&n.tagName.toLowerCase()==="input"}function QE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function PE(n,l){return n.button===0&&(!l||l==="_self")&&!QE(n)}function $d(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,i)=>{let s=n[i];return l.concat(Array.isArray(s)?s.map(c=>[i,c]):[[i,s]])},[]))}function XE(n,l){let i=$d(n);return l&&l.forEach((s,c)=>{i.has(c)||l.getAll(c).forEach(d=>{i.append(c,d)})}),i}var uc=null;function KE(){if(uc===null)try{new FormData(document.createElement("form"),0),uc=!1}catch{uc=!0}return uc}var FE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xd(n){return n!=null&&!FE.has(n)?(Tn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bc}"`),null):n}function ZE(n,l){let i,s,c,d,h;if(GE(n)){let m=n.getAttribute("action");s=m?Sa(m,l):null,i=n.getAttribute("method")||xc,c=xd(n.getAttribute("enctype"))||bc,d=new FormData(n)}else if(VE(n)||YE(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||m.getAttribute("action");if(s=y?Sa(y,l):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||xc,c=xd(n.getAttribute("formenctype"))||xd(m.getAttribute("enctype"))||bc,d=new FormData(m,n),!KE()){let{name:p,type:b,value:x}=n;if(b==="image"){let E=p?`${p}.`:"";d.append(`${E}x`,"0"),d.append(`${E}y`,"0")}else p&&d.append(p,x)}}else{if(Lc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=xc,s=null,c=bc,h=n}return d&&c==="text/plain"&&(h=d,d=void 0),{action:s,method:i.toLowerCase(),encType:c,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nh(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function IE(n,l,i,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:l&&Sa(c.pathname,l)==="/"?c.pathname=`${l.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function $E(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function JE(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function WE(n,l,i){let s=await Promise.all(n.map(async c=>{let d=l.routes[c.route.id];if(d){let h=await $E(d,i);return h.links?h.links():[]}return[]}));return aC(s.flat(1).filter(JE).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Nv(n,l,i,s,c,d){let h=(y,p)=>i[p]?y.route.id!==i[p].route.id:!0,m=(y,p)=>{var b;return i[p].pathname!==y.pathname||((b=i[p].route.path)==null?void 0:b.endsWith("*"))&&i[p].params["*"]!==y.params["*"]};return d==="assets"?l.filter((y,p)=>h(y,p)||m(y,p)):d==="data"?l.filter((y,p)=>{var x;let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(h(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let E=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((x=i[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function eC(n,l,{includeHydrateFallback:i}={}){return tC(n.map(s=>{let c=l.routes[s.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function tC(n){return[...new Set(n)]}function nC(n){let l={},i=Object.keys(n).sort();for(let s of i)l[s]=n[s];return l}function aC(n,l){let i=new Set;return new Set(l),n.reduce((s,c)=>{let d=JSON.stringify(nC(c));return i.has(d)||(i.add(d),s.push({key:d,link:c})),s},[])}function Wx(){let n=v.useContext(di);return Nh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function lC(){let n=v.useContext(zc);return Nh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Th=v.createContext(void 0);Th.displayName="FrameworkContext";function e0(){let n=v.useContext(Th);return Nh(n,"You must render this element inside a <HydratedRouter> element"),n}function rC(n,l){let i=v.useContext(Th),[s,c]=v.useState(!1),[d,h]=v.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:b,onTouchStart:x}=l,E=v.useRef(null);v.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let w=N=>{N.forEach(O=>{h(O.isIntersecting)})},j=new IntersectionObserver(w,{threshold:.5});return E.current&&j.observe(E.current),()=>{j.disconnect()}}},[n]),v.useEffect(()=>{if(s){let w=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(w)}}},[s]);let C=()=>{c(!0)},T=()=>{c(!1),h(!1)};return i?n!=="intent"?[d,E,{}]:[d,E,{onFocus:ds(m,C),onBlur:ds(y,T),onMouseEnter:ds(p,C),onMouseLeave:ds(b,T),onTouchStart:ds(x,C)}]:[!1,E,{}]}function ds(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function iC({page:n,...l}){let{router:i}=Wx(),s=v.useMemo(()=>Bx(i.routes,n,i.basename),[i.routes,n,i.basename]);return s?v.createElement(oC,{page:n,matches:s,...l}):null}function sC(n){let{manifest:l,routeModules:i}=e0(),[s,c]=v.useState([]);return v.useEffect(()=>{let d=!1;return WE(n,l,i).then(h=>{d||c(h)}),()=>{d=!0}},[n,l,i]),s}function oC({page:n,matches:l,...i}){let s=Qn(),{future:c,manifest:d,routeModules:h}=e0(),{basename:m}=Wx(),{loaderData:y,matches:p}=lC(),b=v.useMemo(()=>Nv(n,l,p,d,s,"data"),[n,l,p,d,s]),x=v.useMemo(()=>Nv(n,l,p,d,s,"assets"),[n,l,p,d,s]),E=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let w=new Set,j=!1;if(l.forEach(O=>{var z;let D=d.routes[O.route.id];!D||!D.hasLoader||(!b.some(k=>k.route.id===O.route.id)&&O.route.id in y&&((z=h[O.route.id])!=null&&z.shouldRevalidate)||D.hasClientLoader?j=!0:w.add(O.route.id))}),w.size===0)return[];let N=IE(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return j&&w.size>0&&N.searchParams.set("_routes",l.filter(O=>w.has(O.route.id)).map(O=>O.route.id).join(",")),[N.pathname+N.search]},[m,c.unstable_trailingSlashAwareDataRequests,y,s,d,b,l,n,h]),C=v.useMemo(()=>eC(x,d),[x,d]),T=sC(x);return v.createElement(v.Fragment,null,E.map(w=>v.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),C.map(w=>v.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),T.map(({key:w,link:j})=>v.createElement("link",{key:w,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function cC(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var uC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{uC&&(window.__reactRouterVersion="7.13.1")}catch{}function fC({basename:n,children:l,unstable_useTransitions:i,window:s}){let c=v.useRef();c.current==null&&(c.current=Vw({window:s,v5Compat:!0}));let d=c.current,[h,m]=v.useState({action:d.action,location:d.location}),y=v.useCallback(p=>{i===!1?m(p):v.startTransition(()=>m(p))},[i]);return v.useLayoutEffect(()=>d.listen(y),[d,y]),v.createElement(BE,{basename:n,children:l,location:h.location,navigationType:h.action,navigator:d,unstable_useTransitions:i})}var t0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,n0=v.forwardRef(function({onClick:l,discover:i="render",prefetch:s="none",relative:c,reloadDocument:d,replace:h,unstable_mask:m,state:y,target:p,to:b,preventScrollReset:x,viewTransition:E,unstable_defaultShouldRevalidate:C,...T},w){let{basename:j,navigator:N,unstable_useTransitions:O}=v.useContext(Sn),D=typeof b=="string"&&t0.test(b),z=Qx(b,j);b=z.to;let k=SE(b,{relative:c}),Q=Qn(),G=null;if(m){let de=Sh(m,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);j!=="/"&&(de.pathname=de.pathname==="/"?j:Vn([j,de.pathname])),G=N.createHref(de)}let[W,te,le]=rC(s,T),oe=mC(b,{replace:h,unstable_mask:m,state:y,target:p,preventScrollReset:x,relative:c,viewTransition:E,unstable_defaultShouldRevalidate:C,unstable_useTransitions:O});function ee(de){l&&l(de),de.defaultPrevented||oe(de)}let ge=!(z.isExternal||d),ce=v.createElement("a",{...T,...le,href:(ge?G:void 0)||z.absoluteURL||k,onClick:ge?ee:l,ref:cC(w,te),target:p,"data-discover":!D&&i==="render"?"true":void 0});return W&&!D?v.createElement(v.Fragment,null,ce,v.createElement(iC,{page:k})):ce});n0.displayName="Link";var a0=v.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:s="",end:c=!1,style:d,to:h,viewTransition:m,children:y,...p},b){let x=ks(h,{relative:p.relative}),E=Qn(),C=v.useContext(zc),{navigator:T,basename:w}=v.useContext(Sn),j=C!=null&&bC(x)&&m===!0,N=T.encodeLocation?T.encodeLocation(x).pathname:x.pathname,O=E.pathname,D=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(O=O.toLowerCase(),D=D?D.toLowerCase():null,N=N.toLowerCase()),D&&w&&(D=Sa(D,w)||D);const z=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let k=O===N||!c&&O.startsWith(N)&&O.charAt(z)==="/",Q=D!=null&&(D===N||!c&&D.startsWith(N)&&D.charAt(N.length)==="/"),G={isActive:k,isPending:Q,isTransitioning:j},W=k?l:void 0,te;typeof s=="function"?te=s(G):te=[s,k?"active":null,Q?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let le=typeof d=="function"?d(G):d;return v.createElement(n0,{...p,"aria-current":W,className:te,ref:b,style:le,to:h,viewTransition:m},typeof y=="function"?y(G):y)});a0.displayName="NavLink";var dC=v.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:s,replace:c,state:d,method:h=xc,action:m,onSubmit:y,relative:p,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:E,...C},T)=>{let{unstable_useTransitions:w}=v.useContext(Sn),j=vC(),N=xC(m,{relative:p}),O=h.toLowerCase()==="get"?"get":"post",D=typeof m=="string"&&t0.test(m),z=k=>{if(y&&y(k),k.defaultPrevented)return;k.preventDefault();let Q=k.nativeEvent.submitter,G=(Q==null?void 0:Q.getAttribute("formmethod"))||h,W=()=>j(Q||k.currentTarget,{fetcherKey:l,method:G,navigate:i,replace:c,state:d,relative:p,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:E});w&&i!==!1?v.startTransition(()=>W()):W()};return v.createElement("form",{ref:T,method:O,action:N,onSubmit:s?y:z,...C,"data-discover":!D&&n==="render"?"true":void 0})});dC.displayName="Form";function hC(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l0(n){let l=v.useContext(di);return et(l,hC(n)),l}function mC(n,{target:l,replace:i,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let b=Eh(),x=Qn(),E=ks(n,{relative:h});return v.useCallback(C=>{if(PE(C,l)){C.preventDefault();let T=i!==void 0?i:Ts(x)===Ts(E),w=()=>b(n,{replace:T,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:y});p?v.startTransition(()=>w()):w()}},[x,b,E,i,s,c,l,n,d,h,m,y,p])}function pC(n){Tn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=v.useRef($d(n)),i=v.useRef(!1),s=Qn(),c=v.useMemo(()=>XE(s.search,i.current?null:l.current),[s.search]),d=Eh(),h=v.useCallback((m,y)=>{const p=$d(typeof m=="function"?m(new URLSearchParams(c)):m);i.current=!0,d("?"+p,y)},[d,c]);return[c,h]}var gC=0,yC=()=>`__${String(++gC)}__`;function vC(){let{router:n}=l0("useSubmit"),{basename:l}=v.useContext(Sn),i=zE(),s=n.fetch,c=n.navigate;return v.useCallback(async(d,h={})=>{let{action:m,method:y,encType:p,formData:b,body:x}=ZE(d,l);if(h.navigate===!1){let E=h.fetcherKey||yC();await s(E,i,h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||y,formEncType:h.encType||p,flushSync:h.flushSync})}else await c(h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||y,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:i,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,c,l,i])}function xC(n,{relative:l}={}){let{basename:i}=v.useContext(Sn),s=v.useContext(Yn);et(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),d={...ks(n||".",{relative:l})},h=Qn();if(n==null){d.search=h.search;let m=new URLSearchParams(d.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(x=>x).forEach(x=>m.append("index",x));let b=m.toString();d.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Vn([i,d.pathname])),Ts(d)}function bC(n,{relative:l}={}){let i=v.useContext(Xx);et(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=l0("useViewTransitionState"),c=ks(n,{relative:l});if(!i.isTransitioning)return!1;let d=Sa(i.currentLocation.pathname,s)||i.currentLocation.pathname,h=Sa(i.nextLocation.pathname,s)||i.nextLocation.pathname;return Tc(c.pathname,h)!=null||Tc(c.pathname,d)!=null}var Hs=Nx();const SC=hh(Hs),r0="myco-ui-theme",wC="system",Tv="dark",i0="(prefers-color-scheme: dark)",s0=v.createContext(void 0);function EC(){const n=localStorage.getItem(r0);return n==="light"||n==="dark"||n==="system"?n:wC}function Rv(n){const l=document.documentElement;n==="dark"||n==="system"&&window.matchMedia(i0).matches?l.classList.add(Tv):l.classList.remove(Tv)}function CC({children:n}){const[l,i]=v.useState(EC),s=c=>{localStorage.setItem(r0,c),i(c)};return v.useEffect(()=>{Rv(l)},[l]),v.useEffect(()=>{if(l!=="system")return;const c=window.matchMedia(i0),d=()=>Rv("system");return c.addEventListener("change",d),()=>c.removeEventListener("change",d)},[l]),u.jsx(s0.Provider,{value:{theme:l,setTheme:s},children:n})}function jC(){const n=v.useContext(s0);if(!n)throw new Error("useTheme must be used within a ThemeProvider");return n}const o0="myco-ui-font",NC="geist-mono",TC="--font-ui",c0={"geist-mono":"'Geist Mono', 'SF Mono', 'Fira Code', monospace",system:"ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace","sf-mono":"'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace","fira-code":"'Fira Code', 'Fira Mono', ui-monospace, monospace","jetbrains-mono":"'JetBrains Mono', ui-monospace, monospace"},RC=new Set(Object.keys(c0)),u0=v.createContext(void 0);function _C(){const n=localStorage.getItem(o0);return n&&RC.has(n)?n:NC}function AC(n){document.documentElement.style.setProperty(TC,c0[n])}function OC({children:n}){const[l,i]=v.useState(_C),s=c=>{localStorage.setItem(o0,c),i(c)};return v.useEffect(()=>{AC(l)},[l]),u.jsx(u0.Provider,{value:{font:l,setFont:s},children:n})}function MC(){const n=v.useContext(u0);if(!n)throw new Error("useFont must be used within a FontProvider");return n}const _v=6e4,DC=3e5,zC=200,Av={active:1,idle:2,deep_sleep:5,hidden:10},Ov=["mousemove","mousedown","keydown","scroll","touchstart"],f0=v.createContext(void 0);function LC({children:n}){const[l,i]=v.useState("active"),s=v.useRef(null),c=v.useRef(null),d=v.useRef(Date.now()),h=v.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),c.current&&(clearTimeout(c.current),c.current=null)},[]),m=v.useCallback(()=>{h(),s.current=setTimeout(()=>{i("idle"),c.current=setTimeout(()=>{i("deep_sleep")},DC-_v)},_v)},[h]),y=v.useCallback(()=>{const b=Date.now();b-d.current<zC||(d.current=b,i("active"),m())},[m]),p=v.useCallback(()=>{document.hidden?(h(),i("hidden")):(i("active"),d.current=Date.now(),m())},[h,m]);return v.useEffect(()=>{m();for(const b of Ov)document.addEventListener(b,y,{passive:!0});return document.addEventListener("visibilitychange",p),()=>{h();for(const b of Ov)document.removeEventListener(b,y);document.removeEventListener("visibilitychange",p)}},[y,p,m,h]),u.jsx(f0.Provider,{value:{powerState:l},children:n})}function UC(){const n=v.useContext(f0);if(!n)throw new Error("usePowerState must be used within a PowerProvider");return n.powerState}/**
60
+ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let x=Qn(),b;if(l){let N=typeof l=="string"?fi(l):l;et(v==="/"||((j=N.pathname)==null?void 0:j.startsWith(v)),`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 "${v}" but pathname "${N.pathname}" was given in the \`location\` prop.`),b=N}else b=x;let E=b.pathname||"/",C=E;if(v!=="/"){let N=v.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(N.length).join("/")}let T=Bx(n,{pathname:C});Tn(g||T!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Tn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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 w=AE(T&&T.map(N=>Object.assign({},N,{params:Object.assign({},h,N.params),pathname:Vn([v,s.encodeLocation?s.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?v:Vn([v,s.encodeLocation?s.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,i);return l&&w?y.createElement(Ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},w):w}function NE(){let n=LE(),l=fE(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=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:d},"ErrorBoundary")," or"," ",y.createElement("code",{style:d},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},l),i?y.createElement("pre",{style:c},i):null,h)}var TE=y.createElement(NE,null),$x=class extends y.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=bE(n.digest);i&&(n=i)}let l=n!==void 0?y.createElement(Yn.Provider,{value:this.props.routeContext},y.createElement(wh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?y.createElement(RE,{error:n},l):l}};$x.contextType=mE;var vd=new WeakMap;function RE({children:n,error:l}){let{basename:i}=y.useContext(Sn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let s=xE(l.digest);if(s){let c=vd.get(l);if(c)throw c;let d=Qx(s.location,i);if(Yx&&!vd.get(l))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw vd.set(l,h),h}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function _E({routeContext:n,match:l,children:i}){let s=y.useContext(di);return s&&s.static&&s.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=l.route.id),y.createElement(Yn.Provider,{value:n},i)}function AE(n,l=[],i){let s=i==null?void 0:i.state;if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(l.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,d=s==null?void 0:s.errors;if(d!=null){let x=c.findIndex(b=>b.route.id&&(d==null?void 0:d[b.route.id])!==void 0);et(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,m=-1;if(i&&s){h=s.renderFallback;for(let x=0;x<c.length;x++){let b=c[x];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=x),b.route.id){let{loaderData:E,errors:C}=s,T=b.route.loader&&!E.hasOwnProperty(b.route.id)&&(!C||C[b.route.id]===void 0);if(b.route.lazy||T){i.isStatic&&(h=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let v=i==null?void 0:i.onError,g=s&&v?(x,b)=>{var E,C;v(x,{location:s.location,params:((C=(E=s.matches)==null?void 0:E[0])==null?void 0:C.params)??{},unstable_pattern:dE(s.matches),errorInfo:b})}:void 0;return c.reduceRight((x,b,E)=>{let C,T=!1,w=null,j=null;s&&(C=d&&b.route.id?d[b.route.id]:void 0,w=b.route.errorElement||TE,h&&(m<0&&E===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,j=null):m===E&&(T=!0,j=b.route.hydrateFallbackElement||null)));let N=l.concat(c.slice(0,E+1)),O=()=>{let M;return C?M=w:T?M=j:b.route.Component?M=y.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=x,y.createElement(_E,{match:b,routeContext:{outlet:x,matches:N,isDataRoute:s!=null},children:M})};return s&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?y.createElement($x,{location:s.location,revalidation:s.revalidation,component:w,error:C,children:O(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:g}):O()},null)}function Ch(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function OE(n){let l=y.useContext(di);return et(l,Ch(n)),l}function ME(n){let l=y.useContext(zc);return et(l,Ch(n)),l}function DE(n){let l=y.useContext(Yn);return et(l,Ch(n)),l}function jh(n){let l=DE(n),i=l.matches[l.matches.length-1];return et(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function zE(){return jh("useRouteId")}function LE(){var s;let n=y.useContext(wh),l=ME("useRouteError"),i=jh("useRouteError");return n!==void 0?n:(s=l.errors)==null?void 0:s[i]}function UE(){let{router:n}=OE("useNavigate"),l=jh("useNavigate"),i=y.useRef(!1);return Zx(()=>{i.current=!0}),y.useCallback(async(c,d={})=>{Tn(i.current,Fx),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:l,...d}))},[n,l])}var jv={};function Jx(n,l,i){!l&&!jv[n]&&(jv[n]=!0,Tn(!1,i))}y.memo(kE);function kE({routes:n,future:l,state:i,isStatic:s,onError:c}){return Ix(n,void 0,{state:i,isStatic:s,onError:c})}function HE(n){return CE(n.context)}function Yr(n){et(!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 BE({basename:n="/",children:l=null,location:i,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){et(!Us(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),v=y.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:h,future:{}}),[m,c,d,h]);typeof i=="string"&&(i=fi(i));let{pathname:g="/",search:x="",hash:b="",state:E=null,key:C="default",unstable_mask:T}=i,w=y.useMemo(()=>{let j=Sa(g,m);return j==null?null:{location:{pathname:j,search:x,hash:b,state:E,key:C,unstable_mask:T},navigationType:s}},[m,g,x,b,E,C,s,T]);return Tn(w!=null,`<Router basename="${m}"> is not able to match the URL "${g}${x}${b}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:y.createElement(Sn.Provider,{value:v},y.createElement(Ls.Provider,{children:l,value:w}))}function qE({children:n,location:l}){return jE(Id(n),l)}function Id(n,l=[]){let i=[];return y.Children.forEach(n,(s,c)=>{if(!y.isValidElement(s))return;let d=[...l,c];if(s.type===y.Fragment){i.push.apply(i,Id(s.props.children,d));return}et(s.type===Yr,`[${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>`),et(!s.props.index||!s.props.children,"An index route cannot have child routes.");let h={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,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&&(h.children=Id(s.props.children,d)),i.push(h)}),i}var xc="get",bc="application/x-www-form-urlencoded";function Lc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function VE(n){return Lc(n)&&n.tagName.toLowerCase()==="button"}function GE(n){return Lc(n)&&n.tagName.toLowerCase()==="form"}function YE(n){return Lc(n)&&n.tagName.toLowerCase()==="input"}function QE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function PE(n,l){return n.button===0&&(!l||l==="_self")&&!QE(n)}function $d(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,i)=>{let s=n[i];return l.concat(Array.isArray(s)?s.map(c=>[i,c]):[[i,s]])},[]))}function XE(n,l){let i=$d(n);return l&&l.forEach((s,c)=>{i.has(c)||l.getAll(c).forEach(d=>{i.append(c,d)})}),i}var uc=null;function KE(){if(uc===null)try{new FormData(document.createElement("form"),0),uc=!1}catch{uc=!0}return uc}var FE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xd(n){return n!=null&&!FE.has(n)?(Tn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bc}"`),null):n}function ZE(n,l){let i,s,c,d,h;if(GE(n)){let m=n.getAttribute("action");s=m?Sa(m,l):null,i=n.getAttribute("method")||xc,c=xd(n.getAttribute("enctype"))||bc,d=new FormData(n)}else if(VE(n)||YE(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||m.getAttribute("action");if(s=v?Sa(v,l):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||xc,c=xd(n.getAttribute("formenctype"))||xd(m.getAttribute("enctype"))||bc,d=new FormData(m,n),!KE()){let{name:g,type:x,value:b}=n;if(x==="image"){let E=g?`${g}.`:"";d.append(`${E}x`,"0"),d.append(`${E}y`,"0")}else g&&d.append(g,b)}}else{if(Lc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=xc,s=null,c=bc,h=n}return d&&c==="text/plain"&&(h=d,d=void 0),{action:s,method:i.toLowerCase(),encType:c,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nh(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function IE(n,l,i,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:l&&Sa(c.pathname,l)==="/"?c.pathname=`${l.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function $E(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function JE(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function WE(n,l,i){let s=await Promise.all(n.map(async c=>{let d=l.routes[c.route.id];if(d){let h=await $E(d,i);return h.links?h.links():[]}return[]}));return aC(s.flat(1).filter(JE).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Nv(n,l,i,s,c,d){let h=(v,g)=>i[g]?v.route.id!==i[g].route.id:!0,m=(v,g)=>{var x;return i[g].pathname!==v.pathname||((x=i[g].route.path)==null?void 0:x.endsWith("*"))&&i[g].params["*"]!==v.params["*"]};return d==="assets"?l.filter((v,g)=>h(v,g)||m(v,g)):d==="data"?l.filter((v,g)=>{var b;let x=s.routes[v.route.id];if(!x||!x.hasLoader)return!1;if(h(v,g)||m(v,g))return!0;if(v.route.shouldRevalidate){let E=v.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((b=i[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function eC(n,l,{includeHydrateFallback:i}={}){return tC(n.map(s=>{let c=l.routes[s.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function tC(n){return[...new Set(n)]}function nC(n){let l={},i=Object.keys(n).sort();for(let s of i)l[s]=n[s];return l}function aC(n,l){let i=new Set;return new Set(l),n.reduce((s,c)=>{let d=JSON.stringify(nC(c));return i.has(d)||(i.add(d),s.push({key:d,link:c})),s},[])}function Wx(){let n=y.useContext(di);return Nh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function lC(){let n=y.useContext(zc);return Nh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Th=y.createContext(void 0);Th.displayName="FrameworkContext";function e0(){let n=y.useContext(Th);return Nh(n,"You must render this element inside a <HydratedRouter> element"),n}function rC(n,l){let i=y.useContext(Th),[s,c]=y.useState(!1),[d,h]=y.useState(!1),{onFocus:m,onBlur:v,onMouseEnter:g,onMouseLeave:x,onTouchStart:b}=l,E=y.useRef(null);y.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let w=N=>{N.forEach(O=>{h(O.isIntersecting)})},j=new IntersectionObserver(w,{threshold:.5});return E.current&&j.observe(E.current),()=>{j.disconnect()}}},[n]),y.useEffect(()=>{if(s){let w=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(w)}}},[s]);let C=()=>{c(!0)},T=()=>{c(!1),h(!1)};return i?n!=="intent"?[d,E,{}]:[d,E,{onFocus:ds(m,C),onBlur:ds(v,T),onMouseEnter:ds(g,C),onMouseLeave:ds(x,T),onTouchStart:ds(b,C)}]:[!1,E,{}]}function ds(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function iC({page:n,...l}){let{router:i}=Wx(),s=y.useMemo(()=>Bx(i.routes,n,i.basename),[i.routes,n,i.basename]);return s?y.createElement(oC,{page:n,matches:s,...l}):null}function sC(n){let{manifest:l,routeModules:i}=e0(),[s,c]=y.useState([]);return y.useEffect(()=>{let d=!1;return WE(n,l,i).then(h=>{d||c(h)}),()=>{d=!0}},[n,l,i]),s}function oC({page:n,matches:l,...i}){let s=Qn(),{future:c,manifest:d,routeModules:h}=e0(),{basename:m}=Wx(),{loaderData:v,matches:g}=lC(),x=y.useMemo(()=>Nv(n,l,g,d,s,"data"),[n,l,g,d,s]),b=y.useMemo(()=>Nv(n,l,g,d,s,"assets"),[n,l,g,d,s]),E=y.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let w=new Set,j=!1;if(l.forEach(O=>{var z;let M=d.routes[O.route.id];!M||!M.hasLoader||(!x.some(q=>q.route.id===O.route.id)&&O.route.id in v&&((z=h[O.route.id])!=null&&z.shouldRevalidate)||M.hasClientLoader?j=!0:w.add(O.route.id))}),w.size===0)return[];let N=IE(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return j&&w.size>0&&N.searchParams.set("_routes",l.filter(O=>w.has(O.route.id)).map(O=>O.route.id).join(",")),[N.pathname+N.search]},[m,c.unstable_trailingSlashAwareDataRequests,v,s,d,x,l,n,h]),C=y.useMemo(()=>eC(b,d),[b,d]),T=sC(b);return y.createElement(y.Fragment,null,E.map(w=>y.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),C.map(w=>y.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),T.map(({key:w,link:j})=>y.createElement("link",{key:w,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function cC(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var uC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{uC&&(window.__reactRouterVersion="7.13.1")}catch{}function fC({basename:n,children:l,unstable_useTransitions:i,window:s}){let c=y.useRef();c.current==null&&(c.current=Vw({window:s,v5Compat:!0}));let d=c.current,[h,m]=y.useState({action:d.action,location:d.location}),v=y.useCallback(g=>{i===!1?m(g):y.startTransition(()=>m(g))},[i]);return y.useLayoutEffect(()=>d.listen(v),[d,v]),y.createElement(BE,{basename:n,children:l,location:h.location,navigationType:h.action,navigator:d,unstable_useTransitions:i})}var t0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,n0=y.forwardRef(function({onClick:l,discover:i="render",prefetch:s="none",relative:c,reloadDocument:d,replace:h,unstable_mask:m,state:v,target:g,to:x,preventScrollReset:b,viewTransition:E,unstable_defaultShouldRevalidate:C,...T},w){let{basename:j,navigator:N,unstable_useTransitions:O}=y.useContext(Sn),M=typeof x=="string"&&t0.test(x),z=Qx(x,j);x=z.to;let q=SE(x,{relative:c}),X=Qn(),G=null;if(m){let de=Sh(m,[],X.unstable_mask?X.unstable_mask.pathname:"/",!0);j!=="/"&&(de.pathname=de.pathname==="/"?j:Vn([j,de.pathname])),G=N.createHref(de)}let[Q,ee,ne]=rC(s,T),ie=mC(x,{replace:h,unstable_mask:m,state:v,target:g,preventScrollReset:b,relative:c,viewTransition:E,unstable_defaultShouldRevalidate:C,unstable_useTransitions:O});function te(de){l&&l(de),de.defaultPrevented||ie(de)}let ge=!(z.isExternal||d),ce=y.createElement("a",{...T,...ne,href:(ge?G:void 0)||z.absoluteURL||q,onClick:ge?te:l,ref:cC(w,ee),target:g,"data-discover":!M&&i==="render"?"true":void 0});return Q&&!M?y.createElement(y.Fragment,null,ce,y.createElement(iC,{page:q})):ce});n0.displayName="Link";var a0=y.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:s="",end:c=!1,style:d,to:h,viewTransition:m,children:v,...g},x){let b=ks(h,{relative:g.relative}),E=Qn(),C=y.useContext(zc),{navigator:T,basename:w}=y.useContext(Sn),j=C!=null&&bC(b)&&m===!0,N=T.encodeLocation?T.encodeLocation(b).pathname:b.pathname,O=E.pathname,M=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(O=O.toLowerCase(),M=M?M.toLowerCase():null,N=N.toLowerCase()),M&&w&&(M=Sa(M,w)||M);const z=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let q=O===N||!c&&O.startsWith(N)&&O.charAt(z)==="/",X=M!=null&&(M===N||!c&&M.startsWith(N)&&M.charAt(N.length)==="/"),G={isActive:q,isPending:X,isTransitioning:j},Q=q?l:void 0,ee;typeof s=="function"?ee=s(G):ee=[s,q?"active":null,X?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ne=typeof d=="function"?d(G):d;return y.createElement(n0,{...g,"aria-current":Q,className:ee,ref:x,style:ne,to:h,viewTransition:m},typeof v=="function"?v(G):v)});a0.displayName="NavLink";var dC=y.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:s,replace:c,state:d,method:h=xc,action:m,onSubmit:v,relative:g,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:E,...C},T)=>{let{unstable_useTransitions:w}=y.useContext(Sn),j=vC(),N=xC(m,{relative:g}),O=h.toLowerCase()==="get"?"get":"post",M=typeof m=="string"&&t0.test(m),z=q=>{if(v&&v(q),q.defaultPrevented)return;q.preventDefault();let X=q.nativeEvent.submitter,G=(X==null?void 0:X.getAttribute("formmethod"))||h,Q=()=>j(X||q.currentTarget,{fetcherKey:l,method:G,navigate:i,replace:c,state:d,relative:g,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:E});w&&i!==!1?y.startTransition(()=>Q()):Q()};return y.createElement("form",{ref:T,method:O,action:N,onSubmit:s?v:z,...C,"data-discover":!M&&n==="render"?"true":void 0})});dC.displayName="Form";function hC(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l0(n){let l=y.useContext(di);return et(l,hC(n)),l}function mC(n,{target:l,replace:i,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let x=Eh(),b=Qn(),E=ks(n,{relative:h});return y.useCallback(C=>{if(PE(C,l)){C.preventDefault();let T=i!==void 0?i:Ts(b)===Ts(E),w=()=>x(n,{replace:T,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:v});g?y.startTransition(()=>w()):w()}},[b,x,E,i,s,c,l,n,d,h,m,v,g])}function pC(n){Tn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=y.useRef($d(n)),i=y.useRef(!1),s=Qn(),c=y.useMemo(()=>XE(s.search,i.current?null:l.current),[s.search]),d=Eh(),h=y.useCallback((m,v)=>{const g=$d(typeof m=="function"?m(new URLSearchParams(c)):m);i.current=!0,d("?"+g,v)},[d,c]);return[c,h]}var gC=0,yC=()=>`__${String(++gC)}__`;function vC(){let{router:n}=l0("useSubmit"),{basename:l}=y.useContext(Sn),i=zE(),s=n.fetch,c=n.navigate;return y.useCallback(async(d,h={})=>{let{action:m,method:v,encType:g,formData:x,body:b}=ZE(d,l);if(h.navigate===!1){let E=h.fetcherKey||yC();await s(E,i,h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:b,formMethod:h.method||v,formEncType:h.encType||g,flushSync:h.flushSync})}else await c(h.action||m,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:b,formMethod:h.method||v,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:i,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,c,l,i])}function xC(n,{relative:l}={}){let{basename:i}=y.useContext(Sn),s=y.useContext(Yn);et(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),d={...ks(n||".",{relative:l})},h=Qn();if(n==null){d.search=h.search;let m=new URLSearchParams(d.search),v=m.getAll("index");if(v.some(x=>x==="")){m.delete("index"),v.filter(b=>b).forEach(b=>m.append("index",b));let x=m.toString();d.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Vn([i,d.pathname])),Ts(d)}function bC(n,{relative:l}={}){let i=y.useContext(Xx);et(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=l0("useViewTransitionState"),c=ks(n,{relative:l});if(!i.isTransitioning)return!1;let d=Sa(i.currentLocation.pathname,s)||i.currentLocation.pathname,h=Sa(i.nextLocation.pathname,s)||i.nextLocation.pathname;return Tc(c.pathname,h)!=null||Tc(c.pathname,d)!=null}var Hs=Nx();const SC=hh(Hs),r0="myco-ui-theme",wC="system",Tv="dark",i0="(prefers-color-scheme: dark)",s0=y.createContext(void 0);function EC(){const n=localStorage.getItem(r0);return n==="light"||n==="dark"||n==="system"?n:wC}function Rv(n){const l=document.documentElement;n==="dark"||n==="system"&&window.matchMedia(i0).matches?l.classList.add(Tv):l.classList.remove(Tv)}function CC({children:n}){const[l,i]=y.useState(EC),s=c=>{localStorage.setItem(r0,c),i(c)};return y.useEffect(()=>{Rv(l)},[l]),y.useEffect(()=>{if(l!=="system")return;const c=window.matchMedia(i0),d=()=>Rv("system");return c.addEventListener("change",d),()=>c.removeEventListener("change",d)},[l]),u.jsx(s0.Provider,{value:{theme:l,setTheme:s},children:n})}function jC(){const n=y.useContext(s0);if(!n)throw new Error("useTheme must be used within a ThemeProvider");return n}const o0="myco-ui-font",NC="geist-mono",TC="--font-ui",c0={"geist-mono":"'Geist Mono', 'SF Mono', 'Fira Code', monospace",system:"ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace","sf-mono":"'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace","fira-code":"'Fira Code', 'Fira Mono', ui-monospace, monospace","jetbrains-mono":"'JetBrains Mono', ui-monospace, monospace"},RC=new Set(Object.keys(c0)),u0=y.createContext(void 0);function _C(){const n=localStorage.getItem(o0);return n&&RC.has(n)?n:NC}function AC(n){document.documentElement.style.setProperty(TC,c0[n])}function OC({children:n}){const[l,i]=y.useState(_C),s=c=>{localStorage.setItem(o0,c),i(c)};return y.useEffect(()=>{AC(l)},[l]),u.jsx(u0.Provider,{value:{font:l,setFont:s},children:n})}function MC(){const n=y.useContext(u0);if(!n)throw new Error("useFont must be used within a FontProvider");return n}const _v=6e4,DC=3e5,zC=200,Av={active:1,idle:2,deep_sleep:5,hidden:10},Ov=["mousemove","mousedown","keydown","scroll","touchstart"],f0=y.createContext(void 0);function LC({children:n}){const[l,i]=y.useState("active"),s=y.useRef(null),c=y.useRef(null),d=y.useRef(Date.now()),h=y.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),c.current&&(clearTimeout(c.current),c.current=null)},[]),m=y.useCallback(()=>{h(),s.current=setTimeout(()=>{i("idle"),c.current=setTimeout(()=>{i("deep_sleep")},DC-_v)},_v)},[h]),v=y.useCallback(()=>{const x=Date.now();x-d.current<zC||(d.current=x,i("active"),m())},[m]),g=y.useCallback(()=>{document.hidden?(h(),i("hidden")):(i("active"),d.current=Date.now(),m())},[h,m]);return y.useEffect(()=>{m();for(const x of Ov)document.addEventListener(x,v,{passive:!0});return document.addEventListener("visibilitychange",g),()=>{h();for(const x of Ov)document.removeEventListener(x,v);document.removeEventListener("visibilitychange",g)}},[v,g,m,h]),u.jsx(f0.Provider,{value:{powerState:l},children:n})}function UC(){const n=y.useContext(f0);if(!n)throw new Error("usePowerState must be used within a PowerProvider");return n.powerState}/**
61
61
  * @license lucide-react v0.460.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
@@ -72,12 +72,12 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const BC=v.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:h,...m},y)=>v.createElement("svg",{ref:y,...HC,width:l,height:l,stroke:n,strokeWidth:s?Number(i)*24/Number(l):i,className:d0("lucide",c),...m},[...h.map(([p,b])=>v.createElement(p,b)),...Array.isArray(d)?d:[d]]));/**
75
+ */const BC=y.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:h,...m},v)=>y.createElement("svg",{ref:v,...HC,width:l,height:l,stroke:n,strokeWidth:s?Number(i)*24/Number(l):i,className:d0("lucide",c),...m},[...h.map(([g,x])=>y.createElement(g,x)),...Array.isArray(d)?d:[d]]));/**
76
76
  * @license lucide-react v0.460.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const pe=(n,l)=>{const i=v.forwardRef(({className:s,...c},d)=>v.createElement(BC,{ref:d,iconNode:l,className:d0(`lucide-${kC(n)}`,s),...c}));return i.displayName=`${n}`,i};/**
80
+ */const pe=(n,l)=>{const i=y.forwardRef(({className:s,...c},d)=>y.createElement(BC,{ref:d,iconNode:l,className:d0(`lucide-${kC(n)}`,s),...c}));return i.displayName=`${n}`,i};/**
81
81
  * @license lucide-react v0.460.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
@@ -322,8 +322,8 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
322
322
  *
323
323
  * This source code is licensed under the ISC license.
324
324
  * See the LICENSE file in the root directory of this source tree.
325
- */const dj=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),hj=6e4,mj=3e4;function pj(n,l,i){if(l==="heartbeat"){const s=n*Av[i];return i==="hidden"?Math.min(s,hj):i==="deep_sleep"?Math.min(s,mj):s}return i==="deep_sleep"||i==="hidden"?!1:n*Av[i]}function qs(n){const l=UC(),{pollCategory:i,refetchInterval:s,...c}=n,d=pj(s,i,l);return er({...c,refetchInterval:d})}const gj="/api";async function sn(n,l){var h;const i=(h=l==null?void 0:l.method)==null?void 0:h.toUpperCase(),c=i==="POST"||i==="PUT"?{"Content-Type":"application/json",...l==null?void 0:l.headers}:l==null?void 0:l.headers,d=await fetch(`${gj}${n}`,{...l,headers:c});if(!d.ok){const m=await d.json().catch(()=>({}));throw new vj(d.status,m)}return d.json()}async function bn(n,l){return sn(n,{method:"POST",body:l?JSON.stringify(l):void 0})}async function yj(n,l){return sn(n,{method:"PUT",body:JSON.stringify(l)})}class vj extends Error{constructor(l,i){super(`API error ${l}`),this.status=l,this.body=i}}const zh=["capture","extraction","embedding","consolidation","digest"],hi={STATS:1e4,LOGS:3e3,PROGRESS:1e3},xj=1e4,bj=3e4;function Vs(){return qs({queryKey:["daemon-stats"],queryFn:({signal:n})=>sn("/stats",{signal:n}),refetchInterval:hi.STATS,pollCategory:"standard"})}const bd=500,Sj=3e4;function E0(){const[n,l]=v.useState(!1),i=v.useRef(null);return{restart:v.useCallback(async(c=!1)=>{l(!0);try{const d=await bn("/restart",{force:c});if(d.status==="busy")return l(!1),d;const h=Date.now()+Sj;i.current=new AbortController,await new Promise((m,y)=>{const p=async()=>{if(Date.now()>h){y(new Error("Restart timeout"));return}try{if((await fetch("/health",{signal:i.current.signal})).ok){m();return}setTimeout(p,bd)}catch{setTimeout(p,bd)}};setTimeout(p,bd)}),window.location.reload()}catch(d){throw l(!1),d}},[]),isRestarting:n}}function C0(n){var l,i,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(l=0;l<c;l++)n[l]&&(i=C0(n[l]))&&(s&&(s+=" "),s+=i)}else for(i in n)n[i]&&(s&&(s+=" "),s+=i);return s}function j0(){for(var n,l,i=0,s="",c=arguments.length;i<c;i++)(n=arguments[i])&&(l=C0(n))&&(s&&(s+=" "),s+=l);return s}const Dv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,zv=j0,N0=(n,l)=>i=>{var s;if((l==null?void 0:l.variants)==null)return zv(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:d}=l,h=Object.keys(c).map(p=>{const b=i==null?void 0:i[p],x=d==null?void 0:d[p];if(b===null)return null;const E=Dv(b)||Dv(x);return c[p][E]}),m=i&&Object.entries(i).reduce((p,b)=>{let[x,E]=b;return E===void 0||(p[x]=E),p},{}),y=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((p,b)=>{let{class:x,className:E,...C}=b;return Object.entries(C).every(T=>{let[w,j]=T;return Array.isArray(j)?j.includes({...d,...m}[w]):{...d,...m}[w]===j})?[...p,x,E]:p},[]);return zv(n,h,y,i==null?void 0:i.class,i==null?void 0:i.className)},Lh="-",wj=n=>{const l=Cj(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:h=>{const m=h.split(Lh);return m[0]===""&&m.length!==1&&m.shift(),T0(m,l)||Ej(h)},getConflictingClassGroupIds:(h,m)=>{const y=i[h]||[];return m&&s[h]?[...y,...s[h]]:y}}},T0=(n,l)=>{var h;if(n.length===0)return l.classGroupId;const i=n[0],s=l.nextPart.get(i),c=s?T0(n.slice(1),s):void 0;if(c)return c;if(l.validators.length===0)return;const d=n.join(Lh);return(h=l.validators.find(({validator:m})=>m(d)))==null?void 0:h.classGroupId},Lv=/^\[(.+)\]$/,Ej=n=>{if(Lv.test(n)){const l=Lv.exec(n)[1],i=l==null?void 0:l.substring(0,l.indexOf(":"));if(i)return"arbitrary.."+i}},Cj=n=>{const{theme:l,prefix:i}=n,s={nextPart:new Map,validators:[]};return Nj(Object.entries(n.classGroups),i).forEach(([d,h])=>{Jd(h,s,d,l)}),s},Jd=(n,l,i,s)=>{n.forEach(c=>{if(typeof c=="string"){const d=c===""?l:Uv(l,c);d.classGroupId=i;return}if(typeof c=="function"){if(jj(c)){Jd(c(s),l,i,s);return}l.validators.push({validator:c,classGroupId:i});return}Object.entries(c).forEach(([d,h])=>{Jd(h,Uv(l,d),i,s)})})},Uv=(n,l)=>{let i=n;return l.split(Lh).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},jj=n=>n.isThemeGetter,Nj=(n,l)=>l?n.map(([i,s])=>{const c=s.map(d=>typeof d=="string"?l+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([h,m])=>[l+h,m])):d);return[i,c]}):n,Tj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=new Map,s=new Map;const c=(d,h)=>{i.set(d,h),l++,l>n&&(l=0,s=i,i=new Map)};return{get(d){let h=i.get(d);if(h!==void 0)return h;if((h=s.get(d))!==void 0)return c(d,h),h},set(d,h){i.has(d)?i.set(d,h):c(d,h)}}},R0="!",Rj=n=>{const{separator:l,experimentalParseClassName:i}=n,s=l.length===1,c=l[0],d=l.length,h=m=>{const y=[];let p=0,b=0,x;for(let j=0;j<m.length;j++){let N=m[j];if(p===0){if(N===c&&(s||m.slice(j,j+d)===l)){y.push(m.slice(b,j)),b=j+d;continue}if(N==="/"){x=j;continue}}N==="["?p++:N==="]"&&p--}const E=y.length===0?m:m.substring(b),C=E.startsWith(R0),T=C?E.substring(1):E,w=x&&x>b?x-b:void 0;return{modifiers:y,hasImportantModifier:C,baseClassName:T,maybePostfixModifierPosition:w}};return i?m=>i({className:m,parseClassName:h}):h},_j=n=>{if(n.length<=1)return n;const l=[];let i=[];return n.forEach(s=>{s[0]==="["?(l.push(...i.sort(),s),i=[]):i.push(s)}),l.push(...i.sort()),l},Aj=n=>({cache:Tj(n.cacheSize),parseClassName:Rj(n),...wj(n)}),Oj=/\s+/,Mj=(n,l)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:c}=l,d=[],h=n.trim().split(Oj);let m="";for(let y=h.length-1;y>=0;y-=1){const p=h[y],{modifiers:b,hasImportantModifier:x,baseClassName:E,maybePostfixModifierPosition:C}=i(p);let T=!!C,w=s(T?E.substring(0,C):E);if(!w){if(!T){m=p+(m.length>0?" "+m:m);continue}if(w=s(E),!w){m=p+(m.length>0?" "+m:m);continue}T=!1}const j=_j(b).join(":"),N=x?j+R0:j,O=N+w;if(d.includes(O))continue;d.push(O);const D=c(w,T);for(let z=0;z<D.length;++z){const k=D[z];d.push(N+k)}m=p+(m.length>0?" "+m:m)}return m};function Dj(){let n=0,l,i,s="";for(;n<arguments.length;)(l=arguments[n++])&&(i=_0(l))&&(s&&(s+=" "),s+=i);return s}const _0=n=>{if(typeof n=="string")return n;let l,i="";for(let s=0;s<n.length;s++)n[s]&&(l=_0(n[s]))&&(i&&(i+=" "),i+=l);return i};function zj(n,...l){let i,s,c,d=h;function h(y){const p=l.reduce((b,x)=>x(b),n());return i=Aj(p),s=i.cache.get,c=i.cache.set,d=m,m(y)}function m(y){const p=s(y);if(p)return p;const b=Mj(y,i);return c(y,b),b}return function(){return d(Dj.apply(null,arguments))}}const Ie=n=>{const l=i=>i[n]||[];return l.isThemeGetter=!0,l},A0=/^\[(?:([a-z-]+):)?(.+)\]$/i,Lj=/^\d+\/\d+$/,Uj=new Set(["px","full","screen"]),kj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hj=/\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$/,Bj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,da=n=>Pr(n)||Uj.has(n)||Lj.test(n),$a=n=>mi(n,"length",Zj),Pr=n=>!!n&&!Number.isNaN(Number(n)),Sd=n=>mi(n,"number",Pr),hs=n=>!!n&&Number.isInteger(Number(n)),Gj=n=>n.endsWith("%")&&Pr(n.slice(0,-1)),Ce=n=>A0.test(n),Ja=n=>kj.test(n),Yj=new Set(["length","size","percentage"]),Qj=n=>mi(n,Yj,O0),Pj=n=>mi(n,"position",O0),Xj=new Set(["image","url"]),Kj=n=>mi(n,Xj,$j),Fj=n=>mi(n,"",Ij),ms=()=>!0,mi=(n,l,i)=>{const s=A0.exec(n);return s?s[1]?typeof l=="string"?s[1]===l:l.has(s[1]):i(s[2]):!1},Zj=n=>Hj.test(n)&&!Bj.test(n),O0=()=>!1,Ij=n=>qj.test(n),$j=n=>Vj.test(n),Jj=()=>{const n=Ie("colors"),l=Ie("spacing"),i=Ie("blur"),s=Ie("brightness"),c=Ie("borderColor"),d=Ie("borderRadius"),h=Ie("borderSpacing"),m=Ie("borderWidth"),y=Ie("contrast"),p=Ie("grayscale"),b=Ie("hueRotate"),x=Ie("invert"),E=Ie("gap"),C=Ie("gradientColorStops"),T=Ie("gradientColorStopPositions"),w=Ie("inset"),j=Ie("margin"),N=Ie("opacity"),O=Ie("padding"),D=Ie("saturate"),z=Ie("scale"),k=Ie("sepia"),Q=Ie("skew"),G=Ie("space"),W=Ie("translate"),te=()=>["auto","contain","none"],le=()=>["auto","hidden","clip","visible","scroll"],oe=()=>["auto",Ce,l],ee=()=>[Ce,l],ge=()=>["",da,$a],ce=()=>["auto",Pr,Ce],de=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",Ce],ye=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[Pr,Ce];return{cacheSize:500,separator:":",theme:{colors:[ms],spacing:[da,$a],blur:["none","",Ja,Ce],brightness:A(),borderColor:[n],borderRadius:["none","","full",Ja,Ce],borderSpacing:ee(),borderWidth:ge(),contrast:A(),grayscale:ie(),hueRotate:A(),invert:ie(),gap:ee(),gradientColorStops:[n],gradientColorStopPositions:[Gj,$a],inset:oe(),margin:oe(),opacity:A(),padding:ee(),saturate:A(),scale:A(),sepia:ie(),skew:A(),space:ee(),translate:ee()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Ja]}],"break-after":[{"break-after":ye()}],"break-before":[{"break-before":ye()}],"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:[...de(),Ce]}],overflow:[{overflow:le()}],"overflow-x":[{"overflow-x":le()}],"overflow-y":[{"overflow-y":le()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hs,Ce]}],basis:[{basis:oe()}],"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:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",hs,Ce]}],"grid-cols":[{"grid-cols":[ms]}],"col-start-end":[{col:["auto",{span:["full",hs,Ce]},Ce]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[ms]}],"row-start-end":[{row:["auto",{span:[hs,Ce]},Ce]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"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:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,l]}],"min-w":[{"min-w":[Ce,l,"min","max","fit"]}],"max-w":[{"max-w":[Ce,l,"none","full","min","max","fit","prose",{screen:[Ja]},Ja]}],h:[{h:[Ce,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,l,"auto","min","max","fit"]}],"font-size":[{text:["base",Ja,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sd]}],"font-family":[{font:[ms]}],"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",Pr,Sd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",da,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",da,$a]}],"underline-offset":[{"underline-offset":["auto",da,Ce]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ee()}],"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":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...de(),Pj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kj]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:U()}],"border-color":[{border:[c]}],"border-color-x":[{"border-x":[c]}],"border-color-y":[{"border-y":[c]}],"border-color-s":[{"border-s":[c]}],"border-color-e":[{"border-e":[c]}],"border-color-t":[{"border-t":[c]}],"border-color-r":[{"border-r":[c]}],"border-color-b":[{"border-b":[c]}],"border-color-l":[{"border-l":[c]}],"divide-color":[{divide:[c]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[da,Ce]}],"outline-w":[{outline:[da,$a]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[da,$a]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Ja,Fj]}],"shadow-color":[{shadow:[ms]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[y]}],"drop-shadow":[{"drop-shadow":["","none",Ja,Ce]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[x]}],saturate:[{saturate:[D]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[y]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[hs,Ce]}],"translate-x":[{"translate-x":[W]}],"translate-y":[{"translate-y":[W]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],accent:[{accent:["auto",n]}],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:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ee()}],"scroll-mx":[{"scroll-mx":ee()}],"scroll-my":[{"scroll-my":ee()}],"scroll-ms":[{"scroll-ms":ee()}],"scroll-me":[{"scroll-me":ee()}],"scroll-mt":[{"scroll-mt":ee()}],"scroll-mr":[{"scroll-mr":ee()}],"scroll-mb":[{"scroll-mb":ee()}],"scroll-ml":[{"scroll-ml":ee()}],"scroll-p":[{"scroll-p":ee()}],"scroll-px":[{"scroll-px":ee()}],"scroll-py":[{"scroll-py":ee()}],"scroll-ps":[{"scroll-ps":ee()}],"scroll-pe":[{"scroll-pe":ee()}],"scroll-pt":[{"scroll-pt":ee()}],"scroll-pr":[{"scroll-pr":ee()}],"scroll-pb":[{"scroll-pb":ee()}],"scroll-pl":[{"scroll-pl":ee()}],"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:[n,"none"]}],"stroke-w":[{stroke:[da,$a,Sd]}],stroke:[{stroke:[n,"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"]}}},Wj=zj(Jj);function je(...n){return Wj(j0(n))}const eN=N0("inline-flex items-center justify-center 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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-primary-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:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Je=v.forwardRef(({className:n,variant:l,size:i,...s},c)=>u.jsx("button",{className:je(eN({variant:l,size:i,className:n})),ref:c,...s}));Je.displayName="Button";const tN=[{to:"/",label:"Dashboard",icon:IC},{to:"/configuration",label:"Configuration",icon:x0},{to:"/mycelium",label:"Mycelium",icon:g0},{to:"/logs",label:"Logs",icon:v0}],nN=[{value:"obsidian",label:"Obsidian"},{value:"vscode",label:"VS Code"},{value:"finder",label:"Finder"}],aN=[{value:"geist-mono",label:"Geist Mono"},{value:"system",label:"System"},{value:"sf-mono",label:"SF Mono"},{value:"fira-code",label:"Fira Code"},{value:"jetbrains-mono",label:"JetBrains"}],M0={compact:.85,normal:1,comfy:1.15},lN={compact:"Compact",normal:"Normal",comfy:"Comfy"},ps=["compact","normal","comfy"],kv="myco-ui-sidebar-collapsed",D0="myco-ui-density",rN="--density",iN="normal";function sN(){const n=localStorage.getItem(D0);return n&&n in M0?n:iN}function oN(n){const l=M0[n];document.documentElement.style.setProperty(rN,String(l)),document.documentElement.style.fontSize=`calc(14px * ${l})`}function cN(){const[n,l]=v.useState(sN),i=v.useCallback(s=>{localStorage.setItem(D0,s),l(s)},[]);return v.useEffect(()=>{oN(n)},[n]),{density:n,setDensity:i}}function uN(){const[n,l]=v.useState(()=>localStorage.getItem(kv)==="true"),i=v.useCallback(()=>{l(s=>{const c=!s;return localStorage.setItem(kv,String(c)),c})},[]);return{collapsed:n,toggle:i}}function fN(){const{theme:n,setTheme:l}=jC(),i=()=>{l(n==="dark"?"light":"dark")},s=n==="dark"||n==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches;return u.jsxs(Je,{variant:"ghost",size:"sm",onClick:i,className:"w-full justify-start gap-2 text-muted-foreground hover:text-foreground",children:[s?u.jsx(oj,{className:"h-4 w-4"}):u.jsx(WC,{className:"h-4 w-4"}),u.jsx("span",{children:s?"Light mode":"Dark mode"})]})}function dN(){const{restart:n,isRestarting:l}=E0();return u.jsxs(Je,{variant:"ghost",size:"sm",onClick:()=>n(),disabled:l,className:"w-full justify-start gap-2 text-muted-foreground hover:text-foreground",children:[u.jsx(Bs,{className:je("h-4 w-4",l&&"animate-spin")}),u.jsx("span",{children:l?"Restarting...":"Restart Daemon"})]})}function hN(){const{data:n}=Vs(),l=i=>{if(!n)return;let s;i==="obsidian"?s=`obsidian://open?vault=${encodeURIComponent(n.vault.name)}`:i==="vscode"?s=`vscode://file${n.vault.path}`:s=`file://${n.vault.path}`,window.location.href=s};return u.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[u.jsx(KC,{className:"h-4 w-4 shrink-0"}),u.jsxs("select",{value:"",onChange:i=>{i.target.value&&l(i.target.value),i.target.value=""},disabled:!n,className:"w-full bg-transparent border-none outline-none cursor-pointer text-sm appearance-none disabled:opacity-50",children:[u.jsx("option",{value:"",disabled:!0,children:"Open Vault"}),nN.map(i=>u.jsx("option",{value:i.value,children:i.label},i.value))]})]})}function mN(){const{font:n,setFont:l}=MC();return u.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[u.jsx(uj,{className:"h-4 w-4 shrink-0"}),u.jsx("select",{value:n,onChange:i=>l(i.target.value),className:"w-full bg-transparent border-none outline-none cursor-pointer text-sm appearance-none",children:aN.map(i=>u.jsx("option",{value:i.value,children:i.label},i.value))})]})}function pN(){const{density:n,setDensity:l}=cN(),i=ps.indexOf(n),s=()=>{i>0&&l(ps[i-1])},c=()=>{i<ps.length-1&&l(ps[i+1])};return u.jsxs("div",{className:"flex items-center gap-1 px-3 py-1",children:[u.jsx("button",{onClick:s,disabled:i===0,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Decrease density",children:u.jsx(JC,{className:"h-3 w-3"})}),u.jsx("div",{className:"flex flex-1 justify-center",children:u.jsx("span",{className:"text-xs text-muted-foreground select-none",children:lN[n]})}),u.jsx("button",{onClick:c,disabled:i===ps.length-1,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Increase density",children:u.jsx(nj,{className:"h-3 w-3"})})]})}function gN(){const{collapsed:n,toggle:l}=uN(),{data:i}=Vs(),s=i==null?void 0:i.vault.name;return u.jsxs("div",{className:"flex h-screen bg-background",children:[u.jsxs("aside",{className:je("flex flex-col border-r border-border bg-card transition-[width] duration-200",n?"w-14":"w-56"),children:[u.jsx("div",{className:je("px-4 py-5",n&&"px-2 py-4 flex justify-center"),children:n?u.jsxs("div",{className:"relative flex items-center",children:[u.jsx("span",{className:"text-base font-bold tracking-tight text-primary",children:"m"}),u.jsx("span",{className:"ml-1 h-2 w-2 rounded-full bg-muted-foreground/40"})]}):u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("span",{className:"text-sm font-medium tracking-tight text-muted-foreground",children:"myco"}),u.jsx("span",{className:"ml-2 h-2 w-2 rounded-full bg-muted-foreground/40"})]}),s&&u.jsx("span",{className:"text-lg font-bold tracking-tight text-primary",children:s})]})}),u.jsx("nav",{className:"flex-1 space-y-1 px-2 py-2",children:tN.map(c=>u.jsxs(a0,{to:c.to,end:c.to==="/",title:n?c.label:void 0,className:({isActive:d})=>je("flex items-center rounded-md text-sm font-medium transition-colors",n?"justify-center px-2 py-2":"gap-3 px-3 py-2",d?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[u.jsx(c.icon,{className:"h-4 w-4 shrink-0"}),!n&&c.label]},c.to))}),!n&&u.jsxs("div",{className:"border-t border-border px-2 py-3 space-y-1",children:[u.jsx(dN,{}),u.jsx(hN,{}),u.jsx(mN,{}),u.jsx(pN,{}),u.jsx(fN,{})]}),u.jsx("div",{className:je("border-t border-border px-2 py-2",n&&"flex justify-center"),children:u.jsxs(Je,{variant:"ghost",size:"sm",onClick:l,className:je("text-muted-foreground hover:text-foreground",n?"w-8 p-0 justify-center":"w-full justify-start gap-2"),title:n?"Expand sidebar":"Collapse sidebar",children:[n?u.jsx(_h,{className:"h-4 w-4"}):u.jsx(m0,{className:"h-4 w-4"}),!n&&u.jsx("span",{children:"Collapse"})]})})]}),u.jsx("main",{className:"flex-1 overflow-auto",children:u.jsx(HE,{})})]})}function yN(){return qs({queryKey:["pipeline-health"],queryFn:({signal:n})=>sn("/pipeline/health",{signal:n}),refetchInterval:hi.STATS,pollCategory:"standard"})}const vN=N0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-primary-foreground shadow",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function dt({className:n,variant:l,...i}){return u.jsx("div",{className:je(vN({variant:l}),n),...i})}const xN={capture:"Capture",extraction:"Extraction",embedding:"Embedding",consolidation:"Consolidation",digest:"Digest"},bN={capture:void 0,extraction:"llm",embedding:"embedding",consolidation:"digest-llm",digest:"digest-llm"},SN={healthy:"border-emerald-500/50",active:"border-amber-400/50",degraded:"border-red-500/50",empty:"border-border"},wN={healthy:"bg-emerald-500/5",active:"bg-amber-400/5",degraded:"bg-red-500/5",empty:"bg-card"};function EN(n){if(!n)return"empty";const l=(n.failed??0)+(n.blocked??0)+(n.poisoned??0),i=(n.pending??0)+(n.processing??0);return l>0?"degraded":i>0?"active":n.succeeded&&n.succeeded>0?"healthy":"empty"}function CN(n,l){return l?n.some(i=>i.provider_role===l&&i.state==="open"):!1}function jN({stage:n,counts:l,circuitOpen:i,onClick:s}){const c=EN(l),d=(l==null?void 0:l.succeeded)??0,h=(l==null?void 0:l.pending)??0,m=(l==null?void 0:l.processing)??0,y=(l==null?void 0:l.failed)??0,p=(l==null?void 0:l.blocked)??0,b=(l==null?void 0:l.poisoned)??0,x=h+m,E=y+p+b;return u.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s==null?void 0:s(n),onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(s==null||s(n))},className:je("relative flex flex-col items-center gap-1 rounded-lg border-2 px-4 py-3 transition-colors min-w-[120px] cursor-pointer hover:opacity-80",SN[c],wN[c]),children:[i&&u.jsx("div",{className:"absolute -top-2 -right-2",title:"Circuit breaker open",children:u.jsx(Mh,{className:"h-4 w-4 text-red-500"})}),u.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:xN[n]??n}),u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[d>0&&u.jsxs("span",{className:"font-mono text-emerald-600 dark:text-emerald-400",children:[d," ",n==="digest"?"digested":"done"]}),m>0&&u.jsxs("span",{className:"font-mono text-amber-600 dark:text-amber-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"processing")},children:[m," active"]}),h>0&&u.jsxs("span",{className:"font-mono text-amber-600 dark:text-amber-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"pending")},children:[h," ",n==="digest"?"new substrate":"pending"]}),y>0&&u.jsxs("span",{className:"font-mono text-red-600 dark:text-red-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"failed")},children:[y," failed"]}),b>0&&u.jsxs("span",{className:"font-mono text-red-600/70 dark:text-red-400/70 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"poisoned")},children:[b," poisoned"]}),p>0&&u.jsxs("span",{className:"font-mono text-red-600/70 dark:text-red-400/70 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"blocked")},children:[p," blocked"]}),d===0&&x===0&&E===0&&u.jsx("span",{className:"font-mono text-muted-foreground",children:"--"})]})]})}function NN(){return u.jsx(VC,{className:"h-4 w-4 shrink-0 text-muted-foreground/50"})}function TN({circuits:n}){const[l,i]=v.useState(null),s=n.filter(d=>d.state==="open");if(s.length===0)return null;const c=async d=>{i(d);try{await bn(`/pipeline/circuit/${encodeURIComponent(d)}/reset`,{})}finally{i(null)}};return u.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Dh,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),u.jsxs("div",{className:"flex-1 space-y-2",children:[u.jsx("p",{className:"text-sm font-medium text-destructive",children:"Circuit Breakers Open"}),s.map(d=>u.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-md bg-destructive/5 px-3 py-2",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("span",{className:"text-sm font-medium text-foreground",children:d.provider_role}),u.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[d.failure_count," failures"]}),d.last_error&&u.jsx("p",{className:"mt-0.5 truncate text-xs text-destructive/70",children:d.last_error})]}),u.jsxs(Je,{variant:"outline",size:"sm",className:"shrink-0 gap-1.5 border-destructive/30 text-destructive hover:bg-destructive/10",disabled:l===d.provider_role,onClick:()=>c(d.provider_role),children:[l===d.provider_role?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Reset"]})]},d.provider_role))]})]})})}function RN({totals:n}){const l=n.pending+n.processing,i=Object.values(n).reduce((d,h)=>d+h,0),s=100;if(i===0)return null;const c=i>0?Math.min(l/i*s,s):0;return u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-xs text-muted-foreground",children:"Backlog"}),u.jsx("div",{className:"h-2 flex-1 rounded-full bg-muted overflow-hidden",children:u.jsx("div",{className:je("h-full rounded-full transition-all duration-300",l>0?"bg-amber-400":"bg-emerald-500"),style:{width:`${s-c}%`}})}),u.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&u.jsxs(dt,{variant:"secondary",className:"font-mono text-xs",children:[l," pending"]}),u.jsxs(dt,{variant:"secondary",className:"font-mono text-xs",children:[i," total"]})]})]})}function z0(){const{data:n,isLoading:l,isError:i}=yN(),s=Eh(),c=Qn();if(l)return u.jsxs("div",{className:"flex items-center gap-2 py-8 justify-center text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading pipeline health..."]});if(i||!n)return u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Pipeline health unavailable"});const d=(h,m)=>{var b;const y=new URLSearchParams({stage:h});m&&y.set("status",m);const p=y.toString();c.pathname==="/mycelium"?(s(`/mycelium?${p}`,{replace:!0}),(b=document.getElementById("work-items"))==null||b.scrollIntoView({behavior:"smooth"})):s(`/mycelium?${p}`)};return u.jsxs("div",{className:"space-y-4",children:[u.jsx(TN,{circuits:n.circuits}),u.jsx("div",{className:"flex items-center justify-center gap-2 overflow-x-auto py-2",children:zh.map((h,m)=>u.jsxs("div",{className:"flex items-center gap-2",children:[m>0&&u.jsx(NN,{}),u.jsx(jN,{stage:h,counts:n.stages[h],circuitOpen:CN(n.circuits,bN[h]),onClick:d})]},h))}),u.jsx(RN,{totals:n.totals})]})}const Rt=v.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("rounded-lg border border-border bg-card text-card-foreground shadow-sm",n),...l}));Rt.displayName="Card";const _t=v.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("flex flex-col space-y-1.5 p-6",n),...l}));_t.displayName="CardHeader";const At=v.forwardRef(({className:n,...l},i)=>u.jsx("h3",{ref:i,className:je("font-semibold leading-none tracking-tight",n),...l}));At.displayName="CardTitle";const pa=v.forwardRef(({className:n,...l},i)=>u.jsx("p",{ref:i,className:je("text-sm text-muted-foreground",n),...l}));pa.displayName="CardDescription";const Ot=v.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("p-6 pt-0",n),...l}));Ot.displayName="CardContent";const _N=v.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("flex items-center p-6 pt-0",n),...l}));_N.displayName="CardFooter";function Uh({isLoading:n,error:l,loadingText:i="Loading...",children:s}){return n?u.jsxs("div",{className:"flex h-64 items-center justify-center gap-2 text-muted-foreground",children:[u.jsx(Mt,{className:"h-5 w-5 animate-spin"}),u.jsx("span",{children:i})]}):l?u.jsxs("div",{className:"flex h-64 flex-col items-center justify-center gap-2 text-destructive",children:[u.jsx(QC,{className:"h-5 w-5"}),u.jsx("span",{children:"Failed to connect to daemon"}),u.jsx("span",{className:"text-xs text-muted-foreground",children:l.message})]}):u.jsx(u.Fragment,{children:s})}function AN(n){return Object.values(n).reduce((l,i)=>l+i,0)}const Ss=60,Qr=3600,ws=86400;function ON(n){if(n<Ss)return`${Math.floor(n)}s`;if(n<Qr)return`${Math.floor(n/Ss)}m`;if(n<ws){const s=Math.floor(n/Qr),c=Math.floor(n%Qr/Ss);return`${s}h ${c}m`}const l=Math.floor(n/ws),i=Math.floor(n%ws/Qr);return`${l}d ${i}h`}function L0(n){const l=(Date.now()-new Date(n).getTime())/1e3;return l<Ss?"just now":l<Qr?`${Math.floor(l/Ss)}m ago`:l<ws?`${Math.floor(l/Qr)}h ago`:`${Math.floor(l/ws)}d ago`}const MN=6;function DN(n){return Object.entries(n).sort((l,i)=>i[1]-l[1]).slice(0,MN)}function kt({label:n,value:l,badge:i,badgeVariant:s}){return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:n}),i?u.jsx(dt,{variant:s??"secondary",className:"text-xs",children:l}):u.jsx("span",{className:"font-mono text-foreground",children:l})]})}function wd({label:n,info:l}){return u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:n}),l?u.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:`${l.provider}/${l.model}`,children:l.model}):u.jsx("span",{className:"text-xs text-muted-foreground/60",children:"none"})]})}function zN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Rh,{className:"h-4 w-4 text-primary"}),"Daemon"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"Uptime",value:ON(n.daemon.uptime_seconds)}),u.jsx(kt,{label:"Version",value:`v${n.daemon.version}`}),u.jsx(kt,{label:"Port",value:String(n.daemon.port)}),u.jsx(kt,{label:"PID",value:String(n.daemon.pid)})]})]})}function LN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(ZC,{className:"h-4 w-4 text-primary"}),"Vault"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"Sessions",value:String(n.vault.session_count)}),u.jsx(kt,{label:"Spores",value:String(AN(n.vault.spore_counts))}),u.jsx(kt,{label:"Plans & Artifacts",value:String(n.vault.plan_count+n.vault.artifact_count)}),u.jsx(kt,{label:"Name",value:n.vault.name})]})]})}function UN({stats:n}){const l=DN(n.vault.spore_counts);return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(S0,{className:"h-4 w-4 text-primary"}),"Spores by Type"]})}),u.jsx(Ot,{children:l.length===0?u.jsx("p",{className:"text-sm text-muted-foreground",children:"No spores yet"}):u.jsx("div",{className:"space-y-1.5",children:l.map(([i,s])=>u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:i}),u.jsx(dt,{variant:"secondary",className:"text-xs font-mono",children:s})]},i))})})]})}function kN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(lj,{className:"h-4 w-4 text-primary"}),"Index"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"FTS entries",value:String(n.index.fts_entries)}),u.jsx(kt,{label:"Vectors",value:String(n.index.vector_count)})]})]})}function HN({stats:n}){const l=n.digest;return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(w0,{className:"h-4 w-4 text-primary"}),"Digest"]})}),u.jsx(Ot,{className:"space-y-2 text-sm",children:l?u.jsxs(u.Fragment,{children:[u.jsx(kt,{label:"Metabolism",value:l.metabolism_state??"dormant",badge:!0,badgeVariant:l.metabolism_state==="active"?"default":"secondary"}),u.jsx(kt,{label:"Queue",value:String(l.substrate_queue)}),l.last_cycle?u.jsxs(u.Fragment,{children:[u.jsx(kt,{label:"Last cycle",value:L0(l.last_cycle.timestamp)}),u.jsx(kt,{label:"Tier",value:`T${l.last_cycle.tier}`}),u.jsx(kt,{label:"Substrate",value:String(l.last_cycle.substrate_count)})]}):u.jsx("p",{className:"text-xs text-muted-foreground",children:"No cycles yet"})]}):u.jsx("p",{className:"text-muted-foreground",children:"Disabled"})})]})}function BN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(h0,{className:"h-4 w-4 text-primary"}),"Intelligence"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(wd,{label:"Processor",info:n.intelligence.processor}),u.jsx(wd,{label:"Digest",info:n.intelligence.digest}),u.jsx(wd,{label:"Embedding",info:n.intelligence.embedding})]})]})}function qN(){const{data:n,isLoading:l,isError:i,error:s}=Vs();return u.jsx(Uh,{isLoading:l,error:i?s instanceof Error?s:new Error("Unable to reach daemon"):null,loadingText:"Connecting to daemon...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Rh,{className:"h-4 w-4 text-primary"}),"Pipeline Health"]})}),u.jsx(Ot,{children:u.jsx(z0,{})})]}),u.jsxs("section",{children:[u.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"System Status"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[u.jsx(zN,{stats:n}),u.jsx(LN,{stats:n}),u.jsx(UN,{stats:n}),u.jsx(kN,{stats:n}),u.jsx(HN,{stats:n}),u.jsx(BN,{stats:n})]})]})]})})}function VN(){const n=bh(),l=er({queryKey:["config"],queryFn:({signal:s})=>sn("/config",{signal:s})}),i=qw({mutationFn:s=>yj("/config",s),onSuccess:()=>n.invalidateQueries({queryKey:["config"]})});return{config:l.data,isLoading:l.isLoading,error:l.error,saveConfig:i.mutateAsync,isSaving:i.isPending,saveError:i.error}}function $e(n,l,{checkForDefaultPrevented:i=!0}={}){return function(c){if(n==null||n(c),i===!1||!c.defaultPrevented)return l==null?void 0:l(c)}}function Hv(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function U0(...n){return l=>{let i=!1;const s=n.map(c=>{const d=Hv(c,l);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let c=0;c<s.length;c++){const d=s[c];typeof d=="function"?d():Hv(n[c],null)}}}}function it(...n){return v.useCallback(U0(...n),n)}function GN(n,l){const i=v.createContext(l),s=d=>{const{children:h,...m}=d,y=v.useMemo(()=>m,Object.values(m));return u.jsx(i.Provider,{value:y,children:h})};s.displayName=n+"Provider";function c(d){const h=v.useContext(i);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[s,c]}function Hc(n,l=[]){let i=[];function s(d,h){const m=v.createContext(h),y=i.length;i=[...i,h];const p=x=>{var N;const{scope:E,children:C,...T}=x,w=((N=E==null?void 0:E[n])==null?void 0:N[y])||m,j=v.useMemo(()=>T,Object.values(T));return u.jsx(w.Provider,{value:j,children:C})};p.displayName=d+"Provider";function b(x,E){var w;const C=((w=E==null?void 0:E[n])==null?void 0:w[y])||m,T=v.useContext(C);if(T)return T;if(h!==void 0)return h;throw new Error(`\`${x}\` must be used within \`${d}\``)}return[p,b]}const c=()=>{const d=i.map(h=>v.createContext(h));return function(m){const y=(m==null?void 0:m[n])||d;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:y}}),[m,y])}};return c.scopeName=n,[s,YN(c,...l)]}function YN(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const s=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const h=s.reduce((m,{useScope:y,scopeName:p})=>{const x=y(d)[`__scope${p}`];return{...m,...x}},{});return v.useMemo(()=>({[`__scope${l.scopeName}`]:h}),[h])}};return i.scopeName=l.scopeName,i}var Dt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},QN=jx[" useId ".trim().toString()]||(()=>{}),PN=0;function Xr(n){const[l,i]=v.useState(QN());return Dt(()=>{i(s=>s??String(PN++))},[n]),l?`radix-${l}`:""}var XN=jx[" useInsertionEffect ".trim().toString()]||Dt;function Wd({prop:n,defaultProp:l,onChange:i=()=>{},caller:s}){const[c,d,h]=KN({defaultProp:l,onChange:i}),m=n!==void 0,y=m?n:c;{const b=v.useRef(n!==void 0);v.useEffect(()=>{const x=b.current;x!==m&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=m},[m,s])}const p=v.useCallback(b=>{var x;if(m){const E=FN(b)?b(n):b;E!==n&&((x=h.current)==null||x.call(h,E))}else d(b)},[m,n,d,h]);return[y,p]}function KN({defaultProp:n,onChange:l}){const[i,s]=v.useState(n),c=v.useRef(i),d=v.useRef(l);return XN(()=>{d.current=l},[l]),v.useEffect(()=>{var h;c.current!==i&&((h=d.current)==null||h.call(d,i),c.current=i)},[i,c]),[i,s,d]}function FN(n){return typeof n=="function"}function Rs(n){const l=ZN(n),i=v.forwardRef((s,c)=>{const{children:d,...h}=s,m=v.Children.toArray(d),y=m.find($N);if(y){const p=y.props.children,b=m.map(x=>x===y?v.Children.count(p)>1?v.Children.only(null):v.isValidElement(p)?p.props.children:null:x);return u.jsx(l,{...h,ref:c,children:v.isValidElement(p)?v.cloneElement(p,void 0,b):null})}return u.jsx(l,{...h,ref:c,children:d})});return i.displayName=`${n}.Slot`,i}function ZN(n){const l=v.forwardRef((i,s)=>{const{children:c,...d}=i;if(v.isValidElement(c)){const h=WN(c),m=JN(d,c.props);return c.type!==v.Fragment&&(m.ref=s?U0(s,h):h),v.cloneElement(c,m)}return v.Children.count(c)>1?v.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var IN=Symbol("radix.slottable");function $N(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===IN}function JN(n,l){const i={...l};for(const s in l){const c=n[s],d=l[s];/^on[A-Z]/.test(s)?c&&d?i[s]=(...m)=>{const y=d(...m);return c(...m),y}:c&&(i[s]=c):s==="style"?i[s]={...c,...d}:s==="className"&&(i[s]=[c,d].filter(Boolean).join(" "))}return{...n,...i}}function WN(n){var s,c;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var eT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ke=eT.reduce((n,l)=>{const i=Rs(`Primitive.${l}`),s=v.forwardRef((c,d)=>{const{asChild:h,...m}=c,y=h?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(y,{...m,ref:d})});return s.displayName=`Primitive.${l}`,{...n,[l]:s}},{});function tT(n,l){n&&Hs.flushSync(()=>n.dispatchEvent(l))}function Zl(n){const l=v.useRef(n);return v.useEffect(()=>{l.current=n}),v.useMemo(()=>(...i)=>{var s;return(s=l.current)==null?void 0:s.call(l,...i)},[])}function nT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n);v.useEffect(()=>{const s=c=>{c.key==="Escape"&&i(c)};return l.addEventListener("keydown",s,{capture:!0}),()=>l.removeEventListener("keydown",s,{capture:!0})},[i,l])}var aT="DismissableLayer",eh="dismissableLayer.update",lT="dismissableLayer.pointerDownOutside",rT="dismissableLayer.focusOutside",Bv,k0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=v.forwardRef((n,l)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...y}=n,p=v.useContext(k0),[b,x]=v.useState(null),E=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=v.useState({}),T=it(l,G=>x(G)),w=Array.from(p.layers),[j]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),N=w.indexOf(j),O=b?w.indexOf(b):-1,D=p.layersWithOutsidePointerEventsDisabled.size>0,z=O>=N,k=oT(G=>{const W=G.target,te=[...p.branches].some(le=>le.contains(W));!z||te||(c==null||c(G),h==null||h(G),G.defaultPrevented||m==null||m())},E),Q=cT(G=>{const W=G.target;[...p.branches].some(le=>le.contains(W))||(d==null||d(G),h==null||h(G),G.defaultPrevented||m==null||m())},E);return nT(G=>{O===p.layers.size-1&&(s==null||s(G),!G.defaultPrevented&&m&&(G.preventDefault(),m()))},E),v.useEffect(()=>{if(b)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Bv=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),qv(),()=>{i&&p.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=Bv)}},[b,E,i,p]),v.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),qv())},[b,p]),v.useEffect(()=>{const G=()=>C({});return document.addEventListener(eh,G),()=>document.removeEventListener(eh,G)},[]),u.jsx(Ke.div,{...y,ref:T,style:{pointerEvents:D?z?"auto":"none":void 0,...n.style},onFocusCapture:$e(n.onFocusCapture,Q.onFocusCapture),onBlurCapture:$e(n.onBlurCapture,Q.onBlurCapture),onPointerDownCapture:$e(n.onPointerDownCapture,k.onPointerDownCapture)})});kh.displayName=aT;var iT="DismissableLayerBranch",sT=v.forwardRef((n,l)=>{const i=v.useContext(k0),s=v.useRef(null),c=it(l,s);return v.useEffect(()=>{const d=s.current;if(d)return i.branches.add(d),()=>{i.branches.delete(d)}},[i.branches]),u.jsx(Ke.div,{...n,ref:c})});sT.displayName=iT;function oT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n),s=v.useRef(!1),c=v.useRef(()=>{});return v.useEffect(()=>{const d=m=>{if(m.target&&!s.current){let y=function(){H0(lT,i,p,{discrete:!0})};const p={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=y,l.addEventListener("click",c.current,{once:!0})):y()}else l.removeEventListener("click",c.current);s.current=!1},h=window.setTimeout(()=>{l.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(h),l.removeEventListener("pointerdown",d),l.removeEventListener("click",c.current)}},[l,i]),{onPointerDownCapture:()=>s.current=!0}}function cT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n),s=v.useRef(!1);return v.useEffect(()=>{const c=d=>{d.target&&!s.current&&H0(rT,i,{originalEvent:d},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,i]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function qv(){const n=new CustomEvent(eh);document.dispatchEvent(n)}function H0(n,l,i,{discrete:s}){const c=i.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:i});l&&c.addEventListener(n,l,{once:!0}),s?tT(c,d):c.dispatchEvent(d)}var Ed="focusScope.autoFocusOnMount",Cd="focusScope.autoFocusOnUnmount",Vv={bubbles:!1,cancelable:!0},uT="FocusScope",Hh=v.forwardRef((n,l)=>{const{loop:i=!1,trapped:s=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...h}=n,[m,y]=v.useState(null),p=Zl(c),b=Zl(d),x=v.useRef(null),E=it(l,w=>y(w)),C=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(s){let w=function(D){if(C.paused||!m)return;const z=D.target;m.contains(z)?x.current=z:tl(x.current,{select:!0})},j=function(D){if(C.paused||!m)return;const z=D.relatedTarget;z!==null&&(m.contains(z)||tl(x.current,{select:!0}))},N=function(D){if(document.activeElement===document.body)for(const k of D)k.removedNodes.length>0&&tl(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",j);const O=new MutationObserver(N);return m&&O.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",j),O.disconnect()}}},[s,m,C.paused]),v.useEffect(()=>{if(m){Yv.add(C);const w=document.activeElement;if(!m.contains(w)){const N=new CustomEvent(Ed,Vv);m.addEventListener(Ed,p),m.dispatchEvent(N),N.defaultPrevented||(fT(gT(B0(m)),{select:!0}),document.activeElement===w&&tl(m))}return()=>{m.removeEventListener(Ed,p),setTimeout(()=>{const N=new CustomEvent(Cd,Vv);m.addEventListener(Cd,b),m.dispatchEvent(N),N.defaultPrevented||tl(w??document.body,{select:!0}),m.removeEventListener(Cd,b),Yv.remove(C)},0)}}},[m,p,b,C]);const T=v.useCallback(w=>{if(!i&&!s||C.paused)return;const j=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,N=document.activeElement;if(j&&N){const O=w.currentTarget,[D,z]=dT(O);D&&z?!w.shiftKey&&N===z?(w.preventDefault(),i&&tl(D,{select:!0})):w.shiftKey&&N===D&&(w.preventDefault(),i&&tl(z,{select:!0})):N===O&&w.preventDefault()}},[i,s,C.paused]);return u.jsx(Ke.div,{tabIndex:-1,...h,ref:E,onKeyDown:T})});Hh.displayName=uT;function fT(n,{select:l=!1}={}){const i=document.activeElement;for(const s of n)if(tl(s,{select:l}),document.activeElement!==i)return}function dT(n){const l=B0(n),i=Gv(l,n),s=Gv(l.reverse(),n);return[i,s]}function B0(n){const l=[],i=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const c=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||c?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)l.push(i.currentNode);return l}function Gv(n,l){for(const i of n)if(!hT(i,{upTo:l}))return i}function hT(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function mT(n){return n instanceof HTMLInputElement&&"select"in n}function tl(n,{select:l=!1}={}){if(n&&n.focus){const i=document.activeElement;n.focus({preventScroll:!0}),n!==i&&mT(n)&&l&&n.select()}}var Yv=pT();function pT(){let n=[];return{add(l){const i=n[0];l!==i&&(i==null||i.pause()),n=Qv(n,l),n.unshift(l)},remove(l){var i;n=Qv(n,l),(i=n[0])==null||i.resume()}}}function Qv(n,l){const i=[...n],s=i.indexOf(l);return s!==-1&&i.splice(s,1),i}function gT(n){return n.filter(l=>l.tagName!=="A")}var yT="Portal",Bh=v.forwardRef((n,l)=>{var m;const{container:i,...s}=n,[c,d]=v.useState(!1);Dt(()=>d(!0),[]);const h=i||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return h?SC.createPortal(u.jsx(Ke.div,{...s,ref:l}),h):null});Bh.displayName=yT;function vT(n,l){return v.useReducer((i,s)=>l[i][s]??i,n)}var Bc=n=>{const{present:l,children:i}=n,s=xT(l),c=typeof i=="function"?i({present:s.isPresent}):v.Children.only(i),d=it(s.ref,bT(c));return typeof i=="function"||s.isPresent?v.cloneElement(c,{ref:d}):null};Bc.displayName="Presence";function xT(n){const[l,i]=v.useState(),s=v.useRef(null),c=v.useRef(n),d=v.useRef("none"),h=n?"mounted":"unmounted",[m,y]=vT(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const p=fc(s.current);d.current=m==="mounted"?p:"none"},[m]),Dt(()=>{const p=s.current,b=c.current;if(b!==n){const E=d.current,C=fc(p);n?y("MOUNT"):C==="none"||(p==null?void 0:p.display)==="none"?y("UNMOUNT"):y(b&&E!==C?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,y]),Dt(()=>{if(l){let p;const b=l.ownerDocument.defaultView??window,x=C=>{const w=fc(s.current).includes(CSS.escape(C.animationName));if(C.target===l&&w&&(y("ANIMATION_END"),!c.current)){const j=l.style.animationFillMode;l.style.animationFillMode="forwards",p=b.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=j)})}},E=C=>{C.target===l&&(d.current=fc(s.current))};return l.addEventListener("animationstart",E),l.addEventListener("animationcancel",x),l.addEventListener("animationend",x),()=>{b.clearTimeout(p),l.removeEventListener("animationstart",E),l.removeEventListener("animationcancel",x),l.removeEventListener("animationend",x)}}else y("ANIMATION_END")},[l,y]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(p=>{s.current=p?getComputedStyle(p):null,i(p)},[])}}function fc(n){return(n==null?void 0:n.animationName)||"none"}function bT(n){var s,c;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var jd=0;function q0(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Pv()),document.body.insertAdjacentElement("beforeend",n[1]??Pv()),jd++,()=>{jd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),jd--}},[])}function Pv(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Bn=function(){return Bn=Object.assign||function(l){for(var i,s=1,c=arguments.length;s<c;s++){i=arguments[s];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(l[d]=i[d])}return l},Bn.apply(this,arguments)};function V0(n,l){var i={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(i[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(n);c<s.length;c++)l.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(n,s[c])&&(i[s[c]]=n[s[c]]);return i}function ST(n,l,i){if(i||arguments.length===2)for(var s=0,c=l.length,d;s<c;s++)(d||!(s in l))&&(d||(d=Array.prototype.slice.call(l,0,s)),d[s]=l[s]);return n.concat(d||Array.prototype.slice.call(l))}var Sc="right-scroll-bar-position",wc="width-before-scroll-bar",wT="with-scroll-bars-hidden",ET="--removed-body-scroll-bar-size";function Nd(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function CT(n,l){var i=v.useState(function(){return{value:n,callback:l,facade:{get current(){return i.value},set current(s){var c=i.value;c!==s&&(i.value=s,i.callback(s,c))}}}})[0];return i.callback=l,i.facade}var jT=typeof window<"u"?v.useLayoutEffect:v.useEffect,Xv=new WeakMap;function NT(n,l){var i=CT(null,function(s){return n.forEach(function(c){return Nd(c,s)})});return jT(function(){var s=Xv.get(i);if(s){var c=new Set(s),d=new Set(n),h=i.current;c.forEach(function(m){d.has(m)||Nd(m,null)}),d.forEach(function(m){c.has(m)||Nd(m,h)})}Xv.set(i,n)},[n]),i}function TT(n){return n}function RT(n,l){l===void 0&&(l=TT);var i=[],s=!1,c={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:n},useMedium:function(d){var h=l(d,s);return i.push(h),function(){i=i.filter(function(m){return m!==h})}},assignSyncMedium:function(d){for(s=!0;i.length;){var h=i;i=[],h.forEach(d)}i={push:function(m){return d(m)},filter:function(){return i}}},assignMedium:function(d){s=!0;var h=[];if(i.length){var m=i;i=[],m.forEach(d),h=i}var y=function(){var b=h;h=[],b.forEach(d)},p=function(){return Promise.resolve().then(y)};p(),i={push:function(b){h.push(b),p()},filter:function(b){return h=h.filter(b),i}}}};return c}function _T(n){n===void 0&&(n={});var l=RT(null);return l.options=Bn({async:!0,ssr:!1},n),l}var G0=function(n){var l=n.sideCar,i=V0(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=l.read();if(!s)throw new Error("Sidecar medium not found");return v.createElement(s,Bn({},i))};G0.isSideCarExport=!0;function AT(n,l){return n.useMedium(l),G0}var Y0=_T(),Td=function(){},qc=v.forwardRef(function(n,l){var i=v.useRef(null),s=v.useState({onScrollCapture:Td,onWheelCapture:Td,onTouchMoveCapture:Td}),c=s[0],d=s[1],h=n.forwardProps,m=n.children,y=n.className,p=n.removeScrollBar,b=n.enabled,x=n.shards,E=n.sideCar,C=n.noRelative,T=n.noIsolation,w=n.inert,j=n.allowPinchZoom,N=n.as,O=N===void 0?"div":N,D=n.gapMode,z=V0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=E,Q=NT([i,l]),G=Bn(Bn({},z),c);return v.createElement(v.Fragment,null,b&&v.createElement(k,{sideCar:Y0,removeScrollBar:p,shards:x,noRelative:C,noIsolation:T,inert:w,setCallbacks:d,allowPinchZoom:!!j,lockRef:i,gapMode:D}),h?v.cloneElement(v.Children.only(m),Bn(Bn({},G),{ref:Q})):v.createElement(O,Bn({},G,{className:y,ref:Q}),m))});qc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qc.classNames={fullWidth:wc,zeroRight:Sc};var OT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MT(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=OT();return l&&n.setAttribute("nonce",l),n}function DT(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function zT(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var LT=function(){var n=0,l=null;return{add:function(i){n==0&&(l=MT())&&(DT(l,i),zT(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},UT=function(){var n=LT();return function(l,i){v.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&i])}},Q0=function(){var n=UT(),l=function(i){var s=i.styles,c=i.dynamic;return n(s,c),null};return l},kT={left:0,top:0,right:0,gap:0},Rd=function(n){return parseInt(n||"",10)||0},HT=function(n){var l=window.getComputedStyle(document.body),i=l[n==="padding"?"paddingLeft":"marginLeft"],s=l[n==="padding"?"paddingTop":"marginTop"],c=l[n==="padding"?"paddingRight":"marginRight"];return[Rd(i),Rd(s),Rd(c)]},BT=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return kT;var l=HT(n),i=document.documentElement.clientWidth,s=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,s-i+l[2]-l[0])}},qT=Q0(),Kr="data-scroll-locked",VT=function(n,l,i,s){var c=n.left,d=n.top,h=n.right,m=n.gap;return i===void 0&&(i="margin"),`
326
- .`.concat(wT,` {
325
+ */const dj=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),hj=6e4,mj=3e4;function pj(n,l,i){if(l==="heartbeat"){const s=n*Av[i];return i==="hidden"?Math.min(s,hj):i==="deep_sleep"?Math.min(s,mj):s}return i==="deep_sleep"||i==="hidden"?!1:n*Av[i]}function qs(n){const l=UC(),{pollCategory:i,refetchInterval:s,...c}=n,d=pj(s,i,l);return er({...c,refetchInterval:d})}const gj="/api";async function sn(n,l){var h;const i=(h=l==null?void 0:l.method)==null?void 0:h.toUpperCase(),c=i==="POST"||i==="PUT"?{"Content-Type":"application/json",...l==null?void 0:l.headers}:l==null?void 0:l.headers,d=await fetch(`${gj}${n}`,{...l,headers:c});if(!d.ok){const m=await d.json().catch(()=>({}));throw new vj(d.status,m)}return d.json()}async function bn(n,l){return sn(n,{method:"POST",body:l?JSON.stringify(l):void 0})}async function yj(n,l){return sn(n,{method:"PUT",body:JSON.stringify(l)})}class vj extends Error{constructor(l,i){super(`API error ${l}`),this.status=l,this.body=i}}const zh=["capture","extraction","embedding","consolidation","digest"],hi={STATS:1e4,LOGS:3e3,PROGRESS:1e3},xj=1e4,bj=3e4,Sj=["debug","info","warn","error"],Dv={debug:0,info:1,warn:2,error:3};function Vs(){return qs({queryKey:["daemon-stats"],queryFn:({signal:n})=>sn("/stats",{signal:n}),refetchInterval:hi.STATS,pollCategory:"standard"})}const bd=500,wj=3e4;function E0(){const[n,l]=y.useState(!1),i=y.useRef(null);return{restart:y.useCallback(async(c=!1)=>{l(!0);try{const d=await bn("/restart",{force:c});if(d.status==="busy")return l(!1),d;const h=Date.now()+wj;i.current=new AbortController,await new Promise((m,v)=>{const g=async()=>{if(Date.now()>h){v(new Error("Restart timeout"));return}try{if((await fetch("/health",{signal:i.current.signal})).ok){m();return}setTimeout(g,bd)}catch{setTimeout(g,bd)}};setTimeout(g,bd)}),window.location.reload()}catch(d){throw l(!1),d}},[]),isRestarting:n}}function C0(n){var l,i,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(l=0;l<c;l++)n[l]&&(i=C0(n[l]))&&(s&&(s+=" "),s+=i)}else for(i in n)n[i]&&(s&&(s+=" "),s+=i);return s}function j0(){for(var n,l,i=0,s="",c=arguments.length;i<c;i++)(n=arguments[i])&&(l=C0(n))&&(s&&(s+=" "),s+=l);return s}const zv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Lv=j0,N0=(n,l)=>i=>{var s;if((l==null?void 0:l.variants)==null)return Lv(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:d}=l,h=Object.keys(c).map(g=>{const x=i==null?void 0:i[g],b=d==null?void 0:d[g];if(x===null)return null;const E=zv(x)||zv(b);return c[g][E]}),m=i&&Object.entries(i).reduce((g,x)=>{let[b,E]=x;return E===void 0||(g[b]=E),g},{}),v=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((g,x)=>{let{class:b,className:E,...C}=x;return Object.entries(C).every(T=>{let[w,j]=T;return Array.isArray(j)?j.includes({...d,...m}[w]):{...d,...m}[w]===j})?[...g,b,E]:g},[]);return Lv(n,h,v,i==null?void 0:i.class,i==null?void 0:i.className)},Lh="-",Ej=n=>{const l=jj(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:h=>{const m=h.split(Lh);return m[0]===""&&m.length!==1&&m.shift(),T0(m,l)||Cj(h)},getConflictingClassGroupIds:(h,m)=>{const v=i[h]||[];return m&&s[h]?[...v,...s[h]]:v}}},T0=(n,l)=>{var h;if(n.length===0)return l.classGroupId;const i=n[0],s=l.nextPart.get(i),c=s?T0(n.slice(1),s):void 0;if(c)return c;if(l.validators.length===0)return;const d=n.join(Lh);return(h=l.validators.find(({validator:m})=>m(d)))==null?void 0:h.classGroupId},Uv=/^\[(.+)\]$/,Cj=n=>{if(Uv.test(n)){const l=Uv.exec(n)[1],i=l==null?void 0:l.substring(0,l.indexOf(":"));if(i)return"arbitrary.."+i}},jj=n=>{const{theme:l,prefix:i}=n,s={nextPart:new Map,validators:[]};return Tj(Object.entries(n.classGroups),i).forEach(([d,h])=>{Jd(h,s,d,l)}),s},Jd=(n,l,i,s)=>{n.forEach(c=>{if(typeof c=="string"){const d=c===""?l:kv(l,c);d.classGroupId=i;return}if(typeof c=="function"){if(Nj(c)){Jd(c(s),l,i,s);return}l.validators.push({validator:c,classGroupId:i});return}Object.entries(c).forEach(([d,h])=>{Jd(h,kv(l,d),i,s)})})},kv=(n,l)=>{let i=n;return l.split(Lh).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},Nj=n=>n.isThemeGetter,Tj=(n,l)=>l?n.map(([i,s])=>{const c=s.map(d=>typeof d=="string"?l+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([h,m])=>[l+h,m])):d);return[i,c]}):n,Rj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=new Map,s=new Map;const c=(d,h)=>{i.set(d,h),l++,l>n&&(l=0,s=i,i=new Map)};return{get(d){let h=i.get(d);if(h!==void 0)return h;if((h=s.get(d))!==void 0)return c(d,h),h},set(d,h){i.has(d)?i.set(d,h):c(d,h)}}},R0="!",_j=n=>{const{separator:l,experimentalParseClassName:i}=n,s=l.length===1,c=l[0],d=l.length,h=m=>{const v=[];let g=0,x=0,b;for(let j=0;j<m.length;j++){let N=m[j];if(g===0){if(N===c&&(s||m.slice(j,j+d)===l)){v.push(m.slice(x,j)),x=j+d;continue}if(N==="/"){b=j;continue}}N==="["?g++:N==="]"&&g--}const E=v.length===0?m:m.substring(x),C=E.startsWith(R0),T=C?E.substring(1):E,w=b&&b>x?b-x:void 0;return{modifiers:v,hasImportantModifier:C,baseClassName:T,maybePostfixModifierPosition:w}};return i?m=>i({className:m,parseClassName:h}):h},Aj=n=>{if(n.length<=1)return n;const l=[];let i=[];return n.forEach(s=>{s[0]==="["?(l.push(...i.sort(),s),i=[]):i.push(s)}),l.push(...i.sort()),l},Oj=n=>({cache:Rj(n.cacheSize),parseClassName:_j(n),...Ej(n)}),Mj=/\s+/,Dj=(n,l)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:c}=l,d=[],h=n.trim().split(Mj);let m="";for(let v=h.length-1;v>=0;v-=1){const g=h[v],{modifiers:x,hasImportantModifier:b,baseClassName:E,maybePostfixModifierPosition:C}=i(g);let T=!!C,w=s(T?E.substring(0,C):E);if(!w){if(!T){m=g+(m.length>0?" "+m:m);continue}if(w=s(E),!w){m=g+(m.length>0?" "+m:m);continue}T=!1}const j=Aj(x).join(":"),N=b?j+R0:j,O=N+w;if(d.includes(O))continue;d.push(O);const M=c(w,T);for(let z=0;z<M.length;++z){const q=M[z];d.push(N+q)}m=g+(m.length>0?" "+m:m)}return m};function zj(){let n=0,l,i,s="";for(;n<arguments.length;)(l=arguments[n++])&&(i=_0(l))&&(s&&(s+=" "),s+=i);return s}const _0=n=>{if(typeof n=="string")return n;let l,i="";for(let s=0;s<n.length;s++)n[s]&&(l=_0(n[s]))&&(i&&(i+=" "),i+=l);return i};function Lj(n,...l){let i,s,c,d=h;function h(v){const g=l.reduce((x,b)=>b(x),n());return i=Oj(g),s=i.cache.get,c=i.cache.set,d=m,m(v)}function m(v){const g=s(v);if(g)return g;const x=Dj(v,i);return c(v,x),x}return function(){return d(zj.apply(null,arguments))}}const $e=n=>{const l=i=>i[n]||[];return l.isThemeGetter=!0,l},A0=/^\[(?:([a-z-]+):)?(.+)\]$/i,Uj=/^\d+\/\d+$/,kj=new Set(["px","full","screen"]),Hj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bj=/\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$/,qj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,da=n=>Pr(n)||kj.has(n)||Uj.test(n),$a=n=>mi(n,"length",Ij),Pr=n=>!!n&&!Number.isNaN(Number(n)),Sd=n=>mi(n,"number",Pr),hs=n=>!!n&&Number.isInteger(Number(n)),Yj=n=>n.endsWith("%")&&Pr(n.slice(0,-1)),Ce=n=>A0.test(n),Ja=n=>Hj.test(n),Qj=new Set(["length","size","percentage"]),Pj=n=>mi(n,Qj,O0),Xj=n=>mi(n,"position",O0),Kj=new Set(["image","url"]),Fj=n=>mi(n,Kj,Jj),Zj=n=>mi(n,"",$j),ms=()=>!0,mi=(n,l,i)=>{const s=A0.exec(n);return s?s[1]?typeof l=="string"?s[1]===l:l.has(s[1]):i(s[2]):!1},Ij=n=>Bj.test(n)&&!qj.test(n),O0=()=>!1,$j=n=>Vj.test(n),Jj=n=>Gj.test(n),Wj=()=>{const n=$e("colors"),l=$e("spacing"),i=$e("blur"),s=$e("brightness"),c=$e("borderColor"),d=$e("borderRadius"),h=$e("borderSpacing"),m=$e("borderWidth"),v=$e("contrast"),g=$e("grayscale"),x=$e("hueRotate"),b=$e("invert"),E=$e("gap"),C=$e("gradientColorStops"),T=$e("gradientColorStopPositions"),w=$e("inset"),j=$e("margin"),N=$e("opacity"),O=$e("padding"),M=$e("saturate"),z=$e("scale"),q=$e("sepia"),X=$e("skew"),G=$e("space"),Q=$e("translate"),ee=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",Ce,l],te=()=>[Ce,l],ge=()=>["",da,$a],ce=()=>["auto",Pr,Ce],de=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",Ce],ye=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[Pr,Ce];return{cacheSize:500,separator:":",theme:{colors:[ms],spacing:[da,$a],blur:["none","",Ja,Ce],brightness:A(),borderColor:[n],borderRadius:["none","","full",Ja,Ce],borderSpacing:te(),borderWidth:ge(),contrast:A(),grayscale:se(),hueRotate:A(),invert:se(),gap:te(),gradientColorStops:[n],gradientColorStopPositions:[Yj,$a],inset:ie(),margin:ie(),opacity:A(),padding:te(),saturate:A(),scale:A(),sepia:se(),skew:A(),space:te(),translate:te()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Ja]}],"break-after":[{"break-after":ye()}],"break-before":[{"break-before":ye()}],"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:[...de(),Ce]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hs,Ce]}],basis:[{basis:ie()}],"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:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",hs,Ce]}],"grid-cols":[{"grid-cols":[ms]}],"col-start-end":[{col:["auto",{span:["full",hs,Ce]},Ce]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[ms]}],"row-start-end":[{row:["auto",{span:[hs,Ce]},Ce]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"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:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,l]}],"min-w":[{"min-w":[Ce,l,"min","max","fit"]}],"max-w":[{"max-w":[Ce,l,"none","full","min","max","fit","prose",{screen:[Ja]},Ja]}],h:[{h:[Ce,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,l,"auto","min","max","fit"]}],"font-size":[{text:["base",Ja,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sd]}],"font-family":[{font:[ms]}],"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",Pr,Sd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",da,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",da,$a]}],"underline-offset":[{"underline-offset":["auto",da,Ce]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"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":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...de(),Xj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Fj]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:U()}],"border-color":[{border:[c]}],"border-color-x":[{"border-x":[c]}],"border-color-y":[{"border-y":[c]}],"border-color-s":[{"border-s":[c]}],"border-color-e":[{"border-e":[c]}],"border-color-t":[{"border-t":[c]}],"border-color-r":[{"border-r":[c]}],"border-color-b":[{"border-b":[c]}],"border-color-l":[{"border-l":[c]}],"divide-color":[{divide:[c]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[da,Ce]}],"outline-w":[{outline:[da,$a]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[da,$a]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Ja,Zj]}],"shadow-color":[{shadow:[ms]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Ja,Ce]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[b]}],saturate:[{saturate:[M]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[hs,Ce]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[X]}],"skew-y":[{"skew-y":[X]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],accent:[{accent:["auto",n]}],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:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"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:[n,"none"]}],"stroke-w":[{stroke:[da,$a,Sd]}],stroke:[{stroke:[n,"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"]}}},eN=Lj(Wj);function je(...n){return eN(j0(n))}const tN=N0("inline-flex items-center justify-center 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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-primary-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:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ke=y.forwardRef(({className:n,variant:l,size:i,...s},c)=>u.jsx("button",{className:je(tN({variant:l,size:i,className:n})),ref:c,...s}));Ke.displayName="Button";const nN=[{to:"/",label:"Dashboard",icon:IC},{to:"/configuration",label:"Configuration",icon:x0},{to:"/mycelium",label:"Mycelium",icon:g0},{to:"/logs",label:"Logs",icon:v0}],aN=[{value:"obsidian",label:"Obsidian"},{value:"vscode",label:"VS Code"},{value:"finder",label:"Finder"}],lN=[{value:"geist-mono",label:"Geist Mono"},{value:"system",label:"System"},{value:"sf-mono",label:"SF Mono"},{value:"fira-code",label:"Fira Code"},{value:"jetbrains-mono",label:"JetBrains"}],M0={compact:.85,normal:1,comfy:1.15},rN={compact:"Compact",normal:"Normal",comfy:"Comfy"},ps=["compact","normal","comfy"],Hv="myco-ui-sidebar-collapsed",D0="myco-ui-density",iN="--density",sN="normal";function oN(){const n=localStorage.getItem(D0);return n&&n in M0?n:sN}function cN(n){const l=M0[n];document.documentElement.style.setProperty(iN,String(l)),document.documentElement.style.fontSize=`calc(14px * ${l})`}function uN(){const[n,l]=y.useState(oN),i=y.useCallback(s=>{localStorage.setItem(D0,s),l(s)},[]);return y.useEffect(()=>{cN(n)},[n]),{density:n,setDensity:i}}function fN(){const[n,l]=y.useState(()=>localStorage.getItem(Hv)==="true"),i=y.useCallback(()=>{l(s=>{const c=!s;return localStorage.setItem(Hv,String(c)),c})},[]);return{collapsed:n,toggle:i}}function dN(){const{theme:n,setTheme:l}=jC(),i=()=>{l(n==="dark"?"light":"dark")},s=n==="dark"||n==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches;return u.jsxs(Ke,{variant:"ghost",size:"sm",onClick:i,className:"w-full justify-start gap-2 text-muted-foreground hover:text-foreground",children:[s?u.jsx(oj,{className:"h-4 w-4"}):u.jsx(WC,{className:"h-4 w-4"}),u.jsx("span",{children:s?"Light mode":"Dark mode"})]})}function hN(){const{restart:n,isRestarting:l}=E0();return u.jsxs(Ke,{variant:"ghost",size:"sm",onClick:()=>n(),disabled:l,className:"w-full justify-start gap-2 text-muted-foreground hover:text-foreground",children:[u.jsx(Bs,{className:je("h-4 w-4",l&&"animate-spin")}),u.jsx("span",{children:l?"Restarting...":"Restart Daemon"})]})}function mN(){const{data:n}=Vs(),l=i=>{if(!n)return;let s;i==="obsidian"?s=`obsidian://open?vault=${encodeURIComponent(n.vault.name)}`:i==="vscode"?s=`vscode://file${n.vault.path}`:s=`file://${n.vault.path}`,window.location.href=s};return u.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[u.jsx(KC,{className:"h-4 w-4 shrink-0"}),u.jsxs("select",{value:"",onChange:i=>{i.target.value&&l(i.target.value),i.target.value=""},disabled:!n,className:"w-full bg-transparent border-none outline-none cursor-pointer text-sm appearance-none disabled:opacity-50",children:[u.jsx("option",{value:"",disabled:!0,children:"Open Vault"}),aN.map(i=>u.jsx("option",{value:i.value,children:i.label},i.value))]})]})}function pN(){const{font:n,setFont:l}=MC();return u.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[u.jsx(uj,{className:"h-4 w-4 shrink-0"}),u.jsx("select",{value:n,onChange:i=>l(i.target.value),className:"w-full bg-transparent border-none outline-none cursor-pointer text-sm appearance-none",children:lN.map(i=>u.jsx("option",{value:i.value,children:i.label},i.value))})]})}function gN(){const{density:n,setDensity:l}=uN(),i=ps.indexOf(n),s=()=>{i>0&&l(ps[i-1])},c=()=>{i<ps.length-1&&l(ps[i+1])};return u.jsxs("div",{className:"flex items-center gap-1 px-3 py-1",children:[u.jsx("button",{onClick:s,disabled:i===0,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Decrease density",children:u.jsx(JC,{className:"h-3 w-3"})}),u.jsx("div",{className:"flex flex-1 justify-center",children:u.jsx("span",{className:"text-xs text-muted-foreground select-none",children:rN[n]})}),u.jsx("button",{onClick:c,disabled:i===ps.length-1,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Increase density",children:u.jsx(nj,{className:"h-3 w-3"})})]})}function yN(){const{collapsed:n,toggle:l}=fN(),{data:i}=Vs(),s=i==null?void 0:i.vault.name;return u.jsxs("div",{className:"flex h-screen bg-background",children:[u.jsxs("aside",{className:je("flex flex-col border-r border-border bg-card transition-[width] duration-200",n?"w-14":"w-56"),children:[u.jsx("div",{className:je("px-4 py-5",n&&"px-2 py-4 flex justify-center"),children:n?u.jsxs("div",{className:"relative flex items-center",children:[u.jsx("span",{className:"text-base font-bold tracking-tight text-primary",children:"m"}),u.jsx("span",{className:"ml-1 h-2 w-2 rounded-full bg-muted-foreground/40"})]}):u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("span",{className:"text-sm font-medium tracking-tight text-muted-foreground",children:"myco"}),u.jsx("span",{className:"ml-2 h-2 w-2 rounded-full bg-muted-foreground/40"})]}),s&&u.jsx("span",{className:"text-lg font-bold tracking-tight text-primary",children:s})]})}),u.jsx("nav",{className:"flex-1 space-y-1 px-2 py-2",children:nN.map(c=>u.jsxs(a0,{to:c.to,end:c.to==="/",title:n?c.label:void 0,className:({isActive:d})=>je("flex items-center rounded-md text-sm font-medium transition-colors",n?"justify-center px-2 py-2":"gap-3 px-3 py-2",d?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[u.jsx(c.icon,{className:"h-4 w-4 shrink-0"}),!n&&c.label]},c.to))}),!n&&u.jsxs("div",{className:"border-t border-border px-2 py-3 space-y-1",children:[u.jsx(hN,{}),u.jsx(mN,{}),u.jsx(pN,{}),u.jsx(gN,{}),u.jsx(dN,{})]}),u.jsx("div",{className:je("border-t border-border px-2 py-2",n&&"flex justify-center"),children:u.jsxs(Ke,{variant:"ghost",size:"sm",onClick:l,className:je("text-muted-foreground hover:text-foreground",n?"w-8 p-0 justify-center":"w-full justify-start gap-2"),title:n?"Expand sidebar":"Collapse sidebar",children:[n?u.jsx(_h,{className:"h-4 w-4"}):u.jsx(m0,{className:"h-4 w-4"}),!n&&u.jsx("span",{children:"Collapse"})]})})]}),u.jsx("main",{className:"flex-1 overflow-auto",children:u.jsx(HE,{})})]})}function vN(){return qs({queryKey:["pipeline-health"],queryFn:({signal:n})=>sn("/pipeline/health",{signal:n}),refetchInterval:hi.STATS,pollCategory:"standard"})}const xN=N0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-primary-foreground shadow",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function dt({className:n,variant:l,...i}){return u.jsx("div",{className:je(xN({variant:l}),n),...i})}const bN={capture:"Capture",extraction:"Extraction",embedding:"Embedding",consolidation:"Consolidation",digest:"Digest"},SN={capture:void 0,extraction:"llm",embedding:"embedding",consolidation:"digest-llm",digest:"digest-llm"},wN={healthy:"border-emerald-500/50",active:"border-amber-400/50",degraded:"border-red-500/50",empty:"border-border"},EN={healthy:"bg-emerald-500/5",active:"bg-amber-400/5",degraded:"bg-red-500/5",empty:"bg-card"};function CN(n){if(!n)return"empty";const l=(n.failed??0)+(n.blocked??0)+(n.poisoned??0),i=(n.pending??0)+(n.processing??0);return l>0?"degraded":i>0?"active":n.succeeded&&n.succeeded>0?"healthy":"empty"}function jN(n,l){return l?n.some(i=>i.provider_role===l&&i.state==="open"):!1}function NN({stage:n,counts:l,circuitOpen:i,onClick:s}){const c=CN(l),d=(l==null?void 0:l.succeeded)??0,h=(l==null?void 0:l.pending)??0,m=(l==null?void 0:l.processing)??0,v=(l==null?void 0:l.failed)??0,g=(l==null?void 0:l.blocked)??0,x=(l==null?void 0:l.poisoned)??0,b=h+m,E=v+g+x;return u.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s==null?void 0:s(n),onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(s==null||s(n))},className:je("relative flex flex-col items-center gap-1 rounded-lg border-2 px-4 py-3 transition-colors min-w-[120px] cursor-pointer hover:opacity-80",wN[c],EN[c]),children:[i&&u.jsx("div",{className:"absolute -top-2 -right-2",title:"Circuit breaker open",children:u.jsx(Mh,{className:"h-4 w-4 text-red-500"})}),u.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:bN[n]??n}),u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[d>0&&u.jsxs("span",{className:"font-mono text-emerald-600 dark:text-emerald-400",children:[d," ",n==="digest"?"digested":"done"]}),m>0&&u.jsxs("span",{className:"font-mono text-amber-600 dark:text-amber-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"processing")},children:[m," active"]}),h>0&&u.jsxs("span",{className:"font-mono text-amber-600 dark:text-amber-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"pending")},children:[h," ",n==="digest"?"new substrate":"pending"]}),v>0&&u.jsxs("span",{className:"font-mono text-red-600 dark:text-red-400 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"failed")},children:[v," failed"]}),x>0&&u.jsxs("span",{className:"font-mono text-red-600/70 dark:text-red-400/70 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"poisoned")},children:[x," poisoned"]}),g>0&&u.jsxs("span",{className:"font-mono text-red-600/70 dark:text-red-400/70 underline decoration-dotted cursor-pointer",onClick:C=>{C.stopPropagation(),s==null||s(n,"blocked")},children:[g," blocked"]}),d===0&&b===0&&E===0&&u.jsx("span",{className:"font-mono text-muted-foreground",children:"--"})]})]})}function TN(){return u.jsx(VC,{className:"h-4 w-4 shrink-0 text-muted-foreground/50"})}function RN({circuits:n}){const[l,i]=y.useState(null),s=n.filter(d=>d.state==="open");if(s.length===0)return null;const c=async d=>{i(d);try{await bn(`/pipeline/circuit/${encodeURIComponent(d)}/reset`,{})}finally{i(null)}};return u.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(Dh,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),u.jsxs("div",{className:"flex-1 space-y-2",children:[u.jsx("p",{className:"text-sm font-medium text-destructive",children:"Circuit Breakers Open"}),s.map(d=>u.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-md bg-destructive/5 px-3 py-2",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("span",{className:"text-sm font-medium text-foreground",children:d.provider_role}),u.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[d.failure_count," failures"]}),d.last_error&&u.jsx("p",{className:"mt-0.5 truncate text-xs text-destructive/70",children:d.last_error})]}),u.jsxs(Ke,{variant:"outline",size:"sm",className:"shrink-0 gap-1.5 border-destructive/30 text-destructive hover:bg-destructive/10",disabled:l===d.provider_role,onClick:()=>c(d.provider_role),children:[l===d.provider_role?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Reset"]})]},d.provider_role))]})]})})}function _N({totals:n}){const l=n.pending+n.processing,i=Object.values(n).reduce((d,h)=>d+h,0),s=100;if(i===0)return null;const c=i>0?Math.min(l/i*s,s):0;return u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-xs text-muted-foreground",children:"Backlog"}),u.jsx("div",{className:"h-2 flex-1 rounded-full bg-muted overflow-hidden",children:u.jsx("div",{className:je("h-full rounded-full transition-all duration-300",l>0?"bg-amber-400":"bg-emerald-500"),style:{width:`${s-c}%`}})}),u.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&u.jsxs(dt,{variant:"secondary",className:"font-mono text-xs",children:[l," pending"]}),u.jsxs(dt,{variant:"secondary",className:"font-mono text-xs",children:[i," total"]})]})]})}function z0(){const{data:n,isLoading:l,isError:i}=vN(),s=Eh(),c=Qn();if(l)return u.jsxs("div",{className:"flex items-center gap-2 py-8 justify-center text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading pipeline health..."]});if(i||!n)return u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Pipeline health unavailable"});const d=(h,m)=>{var x;const v=new URLSearchParams({stage:h});m&&v.set("status",m);const g=v.toString();c.pathname==="/mycelium"?(s(`/mycelium?${g}`,{replace:!0}),(x=document.getElementById("work-items"))==null||x.scrollIntoView({behavior:"smooth"})):s(`/mycelium?${g}`)};return u.jsxs("div",{className:"space-y-4",children:[u.jsx(RN,{circuits:n.circuits}),u.jsx("div",{className:"flex items-center justify-center gap-2 overflow-x-auto py-2",children:zh.map((h,m)=>u.jsxs("div",{className:"flex items-center gap-2",children:[m>0&&u.jsx(TN,{}),u.jsx(NN,{stage:h,counts:n.stages[h],circuitOpen:jN(n.circuits,SN[h]),onClick:d})]},h))}),u.jsx(_N,{totals:n.totals})]})}const Rt=y.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("rounded-lg border border-border bg-card text-card-foreground shadow-sm",n),...l}));Rt.displayName="Card";const _t=y.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("flex flex-col space-y-1.5 p-6",n),...l}));_t.displayName="CardHeader";const At=y.forwardRef(({className:n,...l},i)=>u.jsx("h3",{ref:i,className:je("font-semibold leading-none tracking-tight",n),...l}));At.displayName="CardTitle";const pa=y.forwardRef(({className:n,...l},i)=>u.jsx("p",{ref:i,className:je("text-sm text-muted-foreground",n),...l}));pa.displayName="CardDescription";const Ot=y.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("p-6 pt-0",n),...l}));Ot.displayName="CardContent";const AN=y.forwardRef(({className:n,...l},i)=>u.jsx("div",{ref:i,className:je("flex items-center p-6 pt-0",n),...l}));AN.displayName="CardFooter";function Uh({isLoading:n,error:l,loadingText:i="Loading...",children:s}){return n?u.jsxs("div",{className:"flex h-64 items-center justify-center gap-2 text-muted-foreground",children:[u.jsx(Mt,{className:"h-5 w-5 animate-spin"}),u.jsx("span",{children:i})]}):l?u.jsxs("div",{className:"flex h-64 flex-col items-center justify-center gap-2 text-destructive",children:[u.jsx(QC,{className:"h-5 w-5"}),u.jsx("span",{children:"Failed to connect to daemon"}),u.jsx("span",{className:"text-xs text-muted-foreground",children:l.message})]}):u.jsx(u.Fragment,{children:s})}function ON(n){return Object.values(n).reduce((l,i)=>l+i,0)}const Ss=60,Qr=3600,ws=86400;function MN(n){if(n<Ss)return`${Math.floor(n)}s`;if(n<Qr)return`${Math.floor(n/Ss)}m`;if(n<ws){const s=Math.floor(n/Qr),c=Math.floor(n%Qr/Ss);return`${s}h ${c}m`}const l=Math.floor(n/ws),i=Math.floor(n%ws/Qr);return`${l}d ${i}h`}function L0(n){const l=(Date.now()-new Date(n).getTime())/1e3;return l<Ss?"just now":l<Qr?`${Math.floor(l/Ss)}m ago`:l<ws?`${Math.floor(l/Qr)}h ago`:`${Math.floor(l/ws)}d ago`}const DN=6;function zN(n){return Object.entries(n).sort((l,i)=>i[1]-l[1]).slice(0,DN)}function kt({label:n,value:l,badge:i,badgeVariant:s}){return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:n}),i?u.jsx(dt,{variant:s??"secondary",className:"text-xs",children:l}):u.jsx("span",{className:"font-mono text-foreground",children:l})]})}function wd({label:n,info:l}){return u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:n}),l?u.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:`${l.provider}/${l.model}`,children:l.model}):u.jsx("span",{className:"text-xs text-muted-foreground/60",children:"none"})]})}function LN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Rh,{className:"h-4 w-4 text-primary"}),"Daemon"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"Uptime",value:MN(n.daemon.uptime_seconds)}),u.jsx(kt,{label:"Version",value:`v${n.daemon.version}`}),u.jsx(kt,{label:"Port",value:String(n.daemon.port)}),u.jsx(kt,{label:"PID",value:String(n.daemon.pid)})]})]})}function UN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(ZC,{className:"h-4 w-4 text-primary"}),"Vault"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"Sessions",value:String(n.vault.session_count)}),u.jsx(kt,{label:"Spores",value:String(ON(n.vault.spore_counts))}),u.jsx(kt,{label:"Plans & Artifacts",value:String(n.vault.plan_count+n.vault.artifact_count)}),u.jsx(kt,{label:"Name",value:n.vault.name})]})]})}function kN({stats:n}){const l=zN(n.vault.spore_counts);return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(S0,{className:"h-4 w-4 text-primary"}),"Spores by Type"]})}),u.jsx(Ot,{children:l.length===0?u.jsx("p",{className:"text-sm text-muted-foreground",children:"No spores yet"}):u.jsx("div",{className:"space-y-1.5",children:l.map(([i,s])=>u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:i}),u.jsx(dt,{variant:"secondary",className:"text-xs font-mono",children:s})]},i))})})]})}function HN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(lj,{className:"h-4 w-4 text-primary"}),"Index"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(kt,{label:"FTS entries",value:String(n.index.fts_entries)}),u.jsx(kt,{label:"Vectors",value:String(n.index.vector_count)})]})]})}function BN({stats:n}){const l=n.digest;return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(w0,{className:"h-4 w-4 text-primary"}),"Digest"]})}),u.jsx(Ot,{className:"space-y-2 text-sm",children:l?u.jsxs(u.Fragment,{children:[u.jsx(kt,{label:"Metabolism",value:l.metabolism_state??"dormant",badge:!0,badgeVariant:l.metabolism_state==="active"?"default":"secondary"}),u.jsx(kt,{label:"Queue",value:String(l.substrate_queue)}),l.last_cycle?u.jsxs(u.Fragment,{children:[u.jsx(kt,{label:"Last cycle",value:L0(l.last_cycle.timestamp)}),u.jsx(kt,{label:"Tier",value:`T${l.last_cycle.tier}`}),u.jsx(kt,{label:"Substrate",value:String(l.last_cycle.substrate_count)})]}):u.jsx("p",{className:"text-xs text-muted-foreground",children:"No cycles yet"})]}):u.jsx("p",{className:"text-muted-foreground",children:"Disabled"})})]})}function qN({stats:n}){return u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(h0,{className:"h-4 w-4 text-primary"}),"Intelligence"]})}),u.jsxs(Ot,{className:"space-y-2 text-sm",children:[u.jsx(wd,{label:"Processor",info:n.intelligence.processor}),u.jsx(wd,{label:"Digest",info:n.intelligence.digest}),u.jsx(wd,{label:"Embedding",info:n.intelligence.embedding})]})]})}function VN(){const{data:n,isLoading:l,isError:i,error:s}=Vs();return u.jsx(Uh,{isLoading:l,error:i?s instanceof Error?s:new Error("Unable to reach daemon"):null,loadingText:"Connecting to daemon...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs(Rt,{children:[u.jsx(_t,{className:"pb-3",children:u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Rh,{className:"h-4 w-4 text-primary"}),"Pipeline Health"]})}),u.jsx(Ot,{children:u.jsx(z0,{})})]}),u.jsxs("section",{children:[u.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"System Status"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[u.jsx(LN,{stats:n}),u.jsx(UN,{stats:n}),u.jsx(kN,{stats:n}),u.jsx(HN,{stats:n}),u.jsx(BN,{stats:n}),u.jsx(qN,{stats:n})]})]})]})})}function GN(){const n=bh(),l=er({queryKey:["config"],queryFn:({signal:s})=>sn("/config",{signal:s})}),i=qw({mutationFn:s=>yj("/config",s),onSuccess:()=>n.invalidateQueries({queryKey:["config"]})});return{config:l.data,isLoading:l.isLoading,error:l.error,saveConfig:i.mutateAsync,isSaving:i.isPending,saveError:i.error}}function Je(n,l,{checkForDefaultPrevented:i=!0}={}){return function(c){if(n==null||n(c),i===!1||!c.defaultPrevented)return l==null?void 0:l(c)}}function Bv(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function U0(...n){return l=>{let i=!1;const s=n.map(c=>{const d=Bv(c,l);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let c=0;c<s.length;c++){const d=s[c];typeof d=="function"?d():Bv(n[c],null)}}}}function it(...n){return y.useCallback(U0(...n),n)}function YN(n,l){const i=y.createContext(l),s=d=>{const{children:h,...m}=d,v=y.useMemo(()=>m,Object.values(m));return u.jsx(i.Provider,{value:v,children:h})};s.displayName=n+"Provider";function c(d){const h=y.useContext(i);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[s,c]}function Hc(n,l=[]){let i=[];function s(d,h){const m=y.createContext(h),v=i.length;i=[...i,h];const g=b=>{var N;const{scope:E,children:C,...T}=b,w=((N=E==null?void 0:E[n])==null?void 0:N[v])||m,j=y.useMemo(()=>T,Object.values(T));return u.jsx(w.Provider,{value:j,children:C})};g.displayName=d+"Provider";function x(b,E){var w;const C=((w=E==null?void 0:E[n])==null?void 0:w[v])||m,T=y.useContext(C);if(T)return T;if(h!==void 0)return h;throw new Error(`\`${b}\` must be used within \`${d}\``)}return[g,x]}const c=()=>{const d=i.map(h=>y.createContext(h));return function(m){const v=(m==null?void 0:m[n])||d;return y.useMemo(()=>({[`__scope${n}`]:{...m,[n]:v}}),[m,v])}};return c.scopeName=n,[s,QN(c,...l)]}function QN(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const s=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const h=s.reduce((m,{useScope:v,scopeName:g})=>{const b=v(d)[`__scope${g}`];return{...m,...b}},{});return y.useMemo(()=>({[`__scope${l.scopeName}`]:h}),[h])}};return i.scopeName=l.scopeName,i}var Dt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},PN=jx[" useId ".trim().toString()]||(()=>{}),XN=0;function Xr(n){const[l,i]=y.useState(PN());return Dt(()=>{i(s=>s??String(XN++))},[n]),l?`radix-${l}`:""}var KN=jx[" useInsertionEffect ".trim().toString()]||Dt;function Wd({prop:n,defaultProp:l,onChange:i=()=>{},caller:s}){const[c,d,h]=FN({defaultProp:l,onChange:i}),m=n!==void 0,v=m?n:c;{const x=y.useRef(n!==void 0);y.useEffect(()=>{const b=x.current;b!==m&&console.warn(`${s} is changing from ${b?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=m},[m,s])}const g=y.useCallback(x=>{var b;if(m){const E=ZN(x)?x(n):x;E!==n&&((b=h.current)==null||b.call(h,E))}else d(x)},[m,n,d,h]);return[v,g]}function FN({defaultProp:n,onChange:l}){const[i,s]=y.useState(n),c=y.useRef(i),d=y.useRef(l);return KN(()=>{d.current=l},[l]),y.useEffect(()=>{var h;c.current!==i&&((h=d.current)==null||h.call(d,i),c.current=i)},[i,c]),[i,s,d]}function ZN(n){return typeof n=="function"}function Rs(n){const l=IN(n),i=y.forwardRef((s,c)=>{const{children:d,...h}=s,m=y.Children.toArray(d),v=m.find(JN);if(v){const g=v.props.children,x=m.map(b=>b===v?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:b);return u.jsx(l,{...h,ref:c,children:y.isValidElement(g)?y.cloneElement(g,void 0,x):null})}return u.jsx(l,{...h,ref:c,children:d})});return i.displayName=`${n}.Slot`,i}function IN(n){const l=y.forwardRef((i,s)=>{const{children:c,...d}=i;if(y.isValidElement(c)){const h=eT(c),m=WN(d,c.props);return c.type!==y.Fragment&&(m.ref=s?U0(s,h):h),y.cloneElement(c,m)}return y.Children.count(c)>1?y.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var $N=Symbol("radix.slottable");function JN(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===$N}function WN(n,l){const i={...l};for(const s in l){const c=n[s],d=l[s];/^on[A-Z]/.test(s)?c&&d?i[s]=(...m)=>{const v=d(...m);return c(...m),v}:c&&(i[s]=c):s==="style"?i[s]={...c,...d}:s==="className"&&(i[s]=[c,d].filter(Boolean).join(" "))}return{...n,...i}}function eT(n){var s,c;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var tT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=tT.reduce((n,l)=>{const i=Rs(`Primitive.${l}`),s=y.forwardRef((c,d)=>{const{asChild:h,...m}=c,v=h?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(v,{...m,ref:d})});return s.displayName=`Primitive.${l}`,{...n,[l]:s}},{});function nT(n,l){n&&Hs.flushSync(()=>n.dispatchEvent(l))}function Zl(n){const l=y.useRef(n);return y.useEffect(()=>{l.current=n}),y.useMemo(()=>(...i)=>{var s;return(s=l.current)==null?void 0:s.call(l,...i)},[])}function aT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n);y.useEffect(()=>{const s=c=>{c.key==="Escape"&&i(c)};return l.addEventListener("keydown",s,{capture:!0}),()=>l.removeEventListener("keydown",s,{capture:!0})},[i,l])}var lT="DismissableLayer",eh="dismissableLayer.update",rT="dismissableLayer.pointerDownOutside",iT="dismissableLayer.focusOutside",qv,k0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=y.forwardRef((n,l)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...v}=n,g=y.useContext(k0),[x,b]=y.useState(null),E=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=y.useState({}),T=it(l,G=>b(G)),w=Array.from(g.layers),[j]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),N=w.indexOf(j),O=x?w.indexOf(x):-1,M=g.layersWithOutsidePointerEventsDisabled.size>0,z=O>=N,q=cT(G=>{const Q=G.target,ee=[...g.branches].some(ne=>ne.contains(Q));!z||ee||(c==null||c(G),h==null||h(G),G.defaultPrevented||m==null||m())},E),X=uT(G=>{const Q=G.target;[...g.branches].some(ne=>ne.contains(Q))||(d==null||d(G),h==null||h(G),G.defaultPrevented||m==null||m())},E);return aT(G=>{O===g.layers.size-1&&(s==null||s(G),!G.defaultPrevented&&m&&(G.preventDefault(),m()))},E),y.useEffect(()=>{if(x)return i&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(qv=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),Vv(),()=>{i&&g.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=qv)}},[x,E,i,g]),y.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),Vv())},[x,g]),y.useEffect(()=>{const G=()=>C({});return document.addEventListener(eh,G),()=>document.removeEventListener(eh,G)},[]),u.jsx(Fe.div,{...v,ref:T,style:{pointerEvents:M?z?"auto":"none":void 0,...n.style},onFocusCapture:Je(n.onFocusCapture,X.onFocusCapture),onBlurCapture:Je(n.onBlurCapture,X.onBlurCapture),onPointerDownCapture:Je(n.onPointerDownCapture,q.onPointerDownCapture)})});kh.displayName=lT;var sT="DismissableLayerBranch",oT=y.forwardRef((n,l)=>{const i=y.useContext(k0),s=y.useRef(null),c=it(l,s);return y.useEffect(()=>{const d=s.current;if(d)return i.branches.add(d),()=>{i.branches.delete(d)}},[i.branches]),u.jsx(Fe.div,{...n,ref:c})});oT.displayName=sT;function cT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n),s=y.useRef(!1),c=y.useRef(()=>{});return y.useEffect(()=>{const d=m=>{if(m.target&&!s.current){let v=function(){H0(rT,i,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=v,l.addEventListener("click",c.current,{once:!0})):v()}else l.removeEventListener("click",c.current);s.current=!1},h=window.setTimeout(()=>{l.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(h),l.removeEventListener("pointerdown",d),l.removeEventListener("click",c.current)}},[l,i]),{onPointerDownCapture:()=>s.current=!0}}function uT(n,l=globalThis==null?void 0:globalThis.document){const i=Zl(n),s=y.useRef(!1);return y.useEffect(()=>{const c=d=>{d.target&&!s.current&&H0(iT,i,{originalEvent:d},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,i]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Vv(){const n=new CustomEvent(eh);document.dispatchEvent(n)}function H0(n,l,i,{discrete:s}){const c=i.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:i});l&&c.addEventListener(n,l,{once:!0}),s?nT(c,d):c.dispatchEvent(d)}var Ed="focusScope.autoFocusOnMount",Cd="focusScope.autoFocusOnUnmount",Gv={bubbles:!1,cancelable:!0},fT="FocusScope",Hh=y.forwardRef((n,l)=>{const{loop:i=!1,trapped:s=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...h}=n,[m,v]=y.useState(null),g=Zl(c),x=Zl(d),b=y.useRef(null),E=it(l,w=>v(w)),C=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(s){let w=function(M){if(C.paused||!m)return;const z=M.target;m.contains(z)?b.current=z:tl(b.current,{select:!0})},j=function(M){if(C.paused||!m)return;const z=M.relatedTarget;z!==null&&(m.contains(z)||tl(b.current,{select:!0}))},N=function(M){if(document.activeElement===document.body)for(const q of M)q.removedNodes.length>0&&tl(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",j);const O=new MutationObserver(N);return m&&O.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",j),O.disconnect()}}},[s,m,C.paused]),y.useEffect(()=>{if(m){Qv.add(C);const w=document.activeElement;if(!m.contains(w)){const N=new CustomEvent(Ed,Gv);m.addEventListener(Ed,g),m.dispatchEvent(N),N.defaultPrevented||(dT(yT(B0(m)),{select:!0}),document.activeElement===w&&tl(m))}return()=>{m.removeEventListener(Ed,g),setTimeout(()=>{const N=new CustomEvent(Cd,Gv);m.addEventListener(Cd,x),m.dispatchEvent(N),N.defaultPrevented||tl(w??document.body,{select:!0}),m.removeEventListener(Cd,x),Qv.remove(C)},0)}}},[m,g,x,C]);const T=y.useCallback(w=>{if(!i&&!s||C.paused)return;const j=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,N=document.activeElement;if(j&&N){const O=w.currentTarget,[M,z]=hT(O);M&&z?!w.shiftKey&&N===z?(w.preventDefault(),i&&tl(M,{select:!0})):w.shiftKey&&N===M&&(w.preventDefault(),i&&tl(z,{select:!0})):N===O&&w.preventDefault()}},[i,s,C.paused]);return u.jsx(Fe.div,{tabIndex:-1,...h,ref:E,onKeyDown:T})});Hh.displayName=fT;function dT(n,{select:l=!1}={}){const i=document.activeElement;for(const s of n)if(tl(s,{select:l}),document.activeElement!==i)return}function hT(n){const l=B0(n),i=Yv(l,n),s=Yv(l.reverse(),n);return[i,s]}function B0(n){const l=[],i=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const c=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||c?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)l.push(i.currentNode);return l}function Yv(n,l){for(const i of n)if(!mT(i,{upTo:l}))return i}function mT(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function pT(n){return n instanceof HTMLInputElement&&"select"in n}function tl(n,{select:l=!1}={}){if(n&&n.focus){const i=document.activeElement;n.focus({preventScroll:!0}),n!==i&&pT(n)&&l&&n.select()}}var Qv=gT();function gT(){let n=[];return{add(l){const i=n[0];l!==i&&(i==null||i.pause()),n=Pv(n,l),n.unshift(l)},remove(l){var i;n=Pv(n,l),(i=n[0])==null||i.resume()}}}function Pv(n,l){const i=[...n],s=i.indexOf(l);return s!==-1&&i.splice(s,1),i}function yT(n){return n.filter(l=>l.tagName!=="A")}var vT="Portal",Bh=y.forwardRef((n,l)=>{var m;const{container:i,...s}=n,[c,d]=y.useState(!1);Dt(()=>d(!0),[]);const h=i||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return h?SC.createPortal(u.jsx(Fe.div,{...s,ref:l}),h):null});Bh.displayName=vT;function xT(n,l){return y.useReducer((i,s)=>l[i][s]??i,n)}var Bc=n=>{const{present:l,children:i}=n,s=bT(l),c=typeof i=="function"?i({present:s.isPresent}):y.Children.only(i),d=it(s.ref,ST(c));return typeof i=="function"||s.isPresent?y.cloneElement(c,{ref:d}):null};Bc.displayName="Presence";function bT(n){const[l,i]=y.useState(),s=y.useRef(null),c=y.useRef(n),d=y.useRef("none"),h=n?"mounted":"unmounted",[m,v]=xT(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const g=fc(s.current);d.current=m==="mounted"?g:"none"},[m]),Dt(()=>{const g=s.current,x=c.current;if(x!==n){const E=d.current,C=fc(g);n?v("MOUNT"):C==="none"||(g==null?void 0:g.display)==="none"?v("UNMOUNT"):v(x&&E!==C?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,v]),Dt(()=>{if(l){let g;const x=l.ownerDocument.defaultView??window,b=C=>{const w=fc(s.current).includes(CSS.escape(C.animationName));if(C.target===l&&w&&(v("ANIMATION_END"),!c.current)){const j=l.style.animationFillMode;l.style.animationFillMode="forwards",g=x.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=j)})}},E=C=>{C.target===l&&(d.current=fc(s.current))};return l.addEventListener("animationstart",E),l.addEventListener("animationcancel",b),l.addEventListener("animationend",b),()=>{x.clearTimeout(g),l.removeEventListener("animationstart",E),l.removeEventListener("animationcancel",b),l.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[l,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:y.useCallback(g=>{s.current=g?getComputedStyle(g):null,i(g)},[])}}function fc(n){return(n==null?void 0:n.animationName)||"none"}function ST(n){var s,c;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var jd=0;function q0(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Xv()),document.body.insertAdjacentElement("beforeend",n[1]??Xv()),jd++,()=>{jd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),jd--}},[])}function Xv(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Bn=function(){return Bn=Object.assign||function(l){for(var i,s=1,c=arguments.length;s<c;s++){i=arguments[s];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(l[d]=i[d])}return l},Bn.apply(this,arguments)};function V0(n,l){var i={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(i[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(n);c<s.length;c++)l.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(n,s[c])&&(i[s[c]]=n[s[c]]);return i}function wT(n,l,i){if(i||arguments.length===2)for(var s=0,c=l.length,d;s<c;s++)(d||!(s in l))&&(d||(d=Array.prototype.slice.call(l,0,s)),d[s]=l[s]);return n.concat(d||Array.prototype.slice.call(l))}var Sc="right-scroll-bar-position",wc="width-before-scroll-bar",ET="with-scroll-bars-hidden",CT="--removed-body-scroll-bar-size";function Nd(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function jT(n,l){var i=y.useState(function(){return{value:n,callback:l,facade:{get current(){return i.value},set current(s){var c=i.value;c!==s&&(i.value=s,i.callback(s,c))}}}})[0];return i.callback=l,i.facade}var NT=typeof window<"u"?y.useLayoutEffect:y.useEffect,Kv=new WeakMap;function TT(n,l){var i=jT(null,function(s){return n.forEach(function(c){return Nd(c,s)})});return NT(function(){var s=Kv.get(i);if(s){var c=new Set(s),d=new Set(n),h=i.current;c.forEach(function(m){d.has(m)||Nd(m,null)}),d.forEach(function(m){c.has(m)||Nd(m,h)})}Kv.set(i,n)},[n]),i}function RT(n){return n}function _T(n,l){l===void 0&&(l=RT);var i=[],s=!1,c={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:n},useMedium:function(d){var h=l(d,s);return i.push(h),function(){i=i.filter(function(m){return m!==h})}},assignSyncMedium:function(d){for(s=!0;i.length;){var h=i;i=[],h.forEach(d)}i={push:function(m){return d(m)},filter:function(){return i}}},assignMedium:function(d){s=!0;var h=[];if(i.length){var m=i;i=[],m.forEach(d),h=i}var v=function(){var x=h;h=[],x.forEach(d)},g=function(){return Promise.resolve().then(v)};g(),i={push:function(x){h.push(x),g()},filter:function(x){return h=h.filter(x),i}}}};return c}function AT(n){n===void 0&&(n={});var l=_T(null);return l.options=Bn({async:!0,ssr:!1},n),l}var G0=function(n){var l=n.sideCar,i=V0(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=l.read();if(!s)throw new Error("Sidecar medium not found");return y.createElement(s,Bn({},i))};G0.isSideCarExport=!0;function OT(n,l){return n.useMedium(l),G0}var Y0=AT(),Td=function(){},qc=y.forwardRef(function(n,l){var i=y.useRef(null),s=y.useState({onScrollCapture:Td,onWheelCapture:Td,onTouchMoveCapture:Td}),c=s[0],d=s[1],h=n.forwardProps,m=n.children,v=n.className,g=n.removeScrollBar,x=n.enabled,b=n.shards,E=n.sideCar,C=n.noRelative,T=n.noIsolation,w=n.inert,j=n.allowPinchZoom,N=n.as,O=N===void 0?"div":N,M=n.gapMode,z=V0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),q=E,X=TT([i,l]),G=Bn(Bn({},z),c);return y.createElement(y.Fragment,null,x&&y.createElement(q,{sideCar:Y0,removeScrollBar:g,shards:b,noRelative:C,noIsolation:T,inert:w,setCallbacks:d,allowPinchZoom:!!j,lockRef:i,gapMode:M}),h?y.cloneElement(y.Children.only(m),Bn(Bn({},G),{ref:X})):y.createElement(O,Bn({},G,{className:v,ref:X}),m))});qc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qc.classNames={fullWidth:wc,zeroRight:Sc};var MT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DT(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=MT();return l&&n.setAttribute("nonce",l),n}function zT(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function LT(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var UT=function(){var n=0,l=null;return{add:function(i){n==0&&(l=DT())&&(zT(l,i),LT(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},kT=function(){var n=UT();return function(l,i){y.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&i])}},Q0=function(){var n=kT(),l=function(i){var s=i.styles,c=i.dynamic;return n(s,c),null};return l},HT={left:0,top:0,right:0,gap:0},Rd=function(n){return parseInt(n||"",10)||0},BT=function(n){var l=window.getComputedStyle(document.body),i=l[n==="padding"?"paddingLeft":"marginLeft"],s=l[n==="padding"?"paddingTop":"marginTop"],c=l[n==="padding"?"paddingRight":"marginRight"];return[Rd(i),Rd(s),Rd(c)]},qT=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return HT;var l=BT(n),i=document.documentElement.clientWidth,s=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,s-i+l[2]-l[0])}},VT=Q0(),Kr="data-scroll-locked",GT=function(n,l,i,s){var c=n.left,d=n.top,h=n.right,m=n.gap;return i===void 0&&(i="margin"),`
326
+ .`.concat(ET,` {
327
327
  overflow: hidden `).concat(s,`;
328
328
  padding-right: `).concat(m,"px ").concat(s,`;
329
329
  }
@@ -357,13 +357,13 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
357
357
  }
358
358
 
359
359
  body[`).concat(Kr,`] {
360
- `).concat(ET,": ").concat(m,`px;
360
+ `).concat(CT,": ").concat(m,`px;
361
361
  }
362
- `)},Kv=function(){var n=parseInt(document.body.getAttribute(Kr)||"0",10);return isFinite(n)?n:0},GT=function(){v.useEffect(function(){return document.body.setAttribute(Kr,(Kv()+1).toString()),function(){var n=Kv()-1;n<=0?document.body.removeAttribute(Kr):document.body.setAttribute(Kr,n.toString())}},[])},YT=function(n){var l=n.noRelative,i=n.noImportant,s=n.gapMode,c=s===void 0?"margin":s;GT();var d=v.useMemo(function(){return BT(c)},[c]);return v.createElement(qT,{styles:VT(d,!l,c,i?"":"!important")})},th=!1;if(typeof window<"u")try{var dc=Object.defineProperty({},"passive",{get:function(){return th=!0,!0}});window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{th=!1}var qr=th?{passive:!1}:!1,QT=function(n){return n.tagName==="TEXTAREA"},P0=function(n,l){if(!(n instanceof Element))return!1;var i=window.getComputedStyle(n);return i[l]!=="hidden"&&!(i.overflowY===i.overflowX&&!QT(n)&&i[l]==="visible")},PT=function(n){return P0(n,"overflowY")},XT=function(n){return P0(n,"overflowX")},Fv=function(n,l){var i=l.ownerDocument,s=l;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var c=X0(n,s);if(c){var d=K0(n,s),h=d[1],m=d[2];if(h>m)return!0}s=s.parentNode}while(s&&s!==i.body);return!1},KT=function(n){var l=n.scrollTop,i=n.scrollHeight,s=n.clientHeight;return[l,i,s]},FT=function(n){var l=n.scrollLeft,i=n.scrollWidth,s=n.clientWidth;return[l,i,s]},X0=function(n,l){return n==="v"?PT(l):XT(l)},K0=function(n,l){return n==="v"?KT(l):FT(l)},ZT=function(n,l){return n==="h"&&l==="rtl"?-1:1},IT=function(n,l,i,s,c){var d=ZT(n,window.getComputedStyle(l).direction),h=d*s,m=i.target,y=l.contains(m),p=!1,b=h>0,x=0,E=0;do{if(!m)break;var C=K0(n,m),T=C[0],w=C[1],j=C[2],N=w-j-d*T;(T||N)&&X0(n,m)&&(x+=N,E+=T);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!y&&m!==document.body||y&&(l.contains(m)||l===m));return(b&&Math.abs(x)<1||!b&&Math.abs(E)<1)&&(p=!0),p},hc=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Zv=function(n){return[n.deltaX,n.deltaY]},Iv=function(n){return n&&"current"in n?n.current:n},$T=function(n,l){return n[0]===l[0]&&n[1]===l[1]},JT=function(n){return`
362
+ `)},Fv=function(){var n=parseInt(document.body.getAttribute(Kr)||"0",10);return isFinite(n)?n:0},YT=function(){y.useEffect(function(){return document.body.setAttribute(Kr,(Fv()+1).toString()),function(){var n=Fv()-1;n<=0?document.body.removeAttribute(Kr):document.body.setAttribute(Kr,n.toString())}},[])},QT=function(n){var l=n.noRelative,i=n.noImportant,s=n.gapMode,c=s===void 0?"margin":s;YT();var d=y.useMemo(function(){return qT(c)},[c]);return y.createElement(VT,{styles:GT(d,!l,c,i?"":"!important")})},th=!1;if(typeof window<"u")try{var dc=Object.defineProperty({},"passive",{get:function(){return th=!0,!0}});window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{th=!1}var qr=th?{passive:!1}:!1,PT=function(n){return n.tagName==="TEXTAREA"},P0=function(n,l){if(!(n instanceof Element))return!1;var i=window.getComputedStyle(n);return i[l]!=="hidden"&&!(i.overflowY===i.overflowX&&!PT(n)&&i[l]==="visible")},XT=function(n){return P0(n,"overflowY")},KT=function(n){return P0(n,"overflowX")},Zv=function(n,l){var i=l.ownerDocument,s=l;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var c=X0(n,s);if(c){var d=K0(n,s),h=d[1],m=d[2];if(h>m)return!0}s=s.parentNode}while(s&&s!==i.body);return!1},FT=function(n){var l=n.scrollTop,i=n.scrollHeight,s=n.clientHeight;return[l,i,s]},ZT=function(n){var l=n.scrollLeft,i=n.scrollWidth,s=n.clientWidth;return[l,i,s]},X0=function(n,l){return n==="v"?XT(l):KT(l)},K0=function(n,l){return n==="v"?FT(l):ZT(l)},IT=function(n,l){return n==="h"&&l==="rtl"?-1:1},$T=function(n,l,i,s,c){var d=IT(n,window.getComputedStyle(l).direction),h=d*s,m=i.target,v=l.contains(m),g=!1,x=h>0,b=0,E=0;do{if(!m)break;var C=K0(n,m),T=C[0],w=C[1],j=C[2],N=w-j-d*T;(T||N)&&X0(n,m)&&(b+=N,E+=T);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!v&&m!==document.body||v&&(l.contains(m)||l===m));return(x&&Math.abs(b)<1||!x&&Math.abs(E)<1)&&(g=!0),g},hc=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Iv=function(n){return[n.deltaX,n.deltaY]},$v=function(n){return n&&"current"in n?n.current:n},JT=function(n,l){return n[0]===l[0]&&n[1]===l[1]},WT=function(n){return`
363
363
  .block-interactivity-`.concat(n,` {pointer-events: none;}
364
364
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
365
- `)},WT=0,Vr=[];function eR(n){var l=v.useRef([]),i=v.useRef([0,0]),s=v.useRef(),c=v.useState(WT++)[0],d=v.useState(Q0)[0],h=v.useRef(n);v.useEffect(function(){h.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var w=ST([n.lockRef.current],(n.shards||[]).map(Iv),!0).filter(Boolean);return w.forEach(function(j){return j.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),w.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(w,j){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!h.current.allowPinchZoom;var N=hc(w),O=i.current,D="deltaX"in w?w.deltaX:O[0]-N[0],z="deltaY"in w?w.deltaY:O[1]-N[1],k,Q=w.target,G=Math.abs(D)>Math.abs(z)?"h":"v";if("touches"in w&&G==="h"&&Q.type==="range")return!1;var W=window.getSelection(),te=W&&W.anchorNode,le=te?te===Q||te.contains(Q):!1;if(le)return!1;var oe=Fv(G,Q);if(!oe)return!0;if(oe?k=G:(k=G==="v"?"h":"v",oe=Fv(G,Q)),!oe)return!1;if(!s.current&&"changedTouches"in w&&(D||z)&&(s.current=k),!k)return!0;var ee=s.current||k;return IT(ee,j,w,ee==="h"?D:z)},[]),y=v.useCallback(function(w){var j=w;if(!(!Vr.length||Vr[Vr.length-1]!==d)){var N="deltaY"in j?Zv(j):hc(j),O=l.current.filter(function(k){return k.name===j.type&&(k.target===j.target||j.target===k.shadowParent)&&$T(k.delta,N)})[0];if(O&&O.should){j.cancelable&&j.preventDefault();return}if(!O){var D=(h.current.shards||[]).map(Iv).filter(Boolean).filter(function(k){return k.contains(j.target)}),z=D.length>0?m(j,D[0]):!h.current.noIsolation;z&&j.cancelable&&j.preventDefault()}}},[]),p=v.useCallback(function(w,j,N,O){var D={name:w,delta:j,target:N,should:O,shadowParent:tR(N)};l.current.push(D),setTimeout(function(){l.current=l.current.filter(function(z){return z!==D})},1)},[]),b=v.useCallback(function(w){i.current=hc(w),s.current=void 0},[]),x=v.useCallback(function(w){p(w.type,Zv(w),w.target,m(w,n.lockRef.current))},[]),E=v.useCallback(function(w){p(w.type,hc(w),w.target,m(w,n.lockRef.current))},[]);v.useEffect(function(){return Vr.push(d),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:E}),document.addEventListener("wheel",y,qr),document.addEventListener("touchmove",y,qr),document.addEventListener("touchstart",b,qr),function(){Vr=Vr.filter(function(w){return w!==d}),document.removeEventListener("wheel",y,qr),document.removeEventListener("touchmove",y,qr),document.removeEventListener("touchstart",b,qr)}},[]);var C=n.removeScrollBar,T=n.inert;return v.createElement(v.Fragment,null,T?v.createElement(d,{styles:JT(c)}):null,C?v.createElement(YT,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function tR(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const nR=AT(Y0,eR);var qh=v.forwardRef(function(n,l){return v.createElement(qc,Bn({},n,{ref:l,sideCar:nR}))});qh.classNames=qc.classNames;var aR=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},Gr=new WeakMap,mc=new WeakMap,pc={},_d=0,F0=function(n){return n&&(n.host||F0(n.parentNode))},lR=function(n,l){return l.map(function(i){if(n.contains(i))return i;var s=F0(i);return s&&n.contains(s)?s:(console.error("aria-hidden",i,"in not contained inside",n,". Doing nothing"),null)}).filter(function(i){return!!i})},rR=function(n,l,i,s){var c=lR(l,Array.isArray(n)?n:[n]);pc[i]||(pc[i]=new WeakMap);var d=pc[i],h=[],m=new Set,y=new Set(c),p=function(x){!x||m.has(x)||(m.add(x),p(x.parentNode))};c.forEach(p);var b=function(x){!x||y.has(x)||Array.prototype.forEach.call(x.children,function(E){if(m.has(E))b(E);else try{var C=E.getAttribute(s),T=C!==null&&C!=="false",w=(Gr.get(E)||0)+1,j=(d.get(E)||0)+1;Gr.set(E,w),d.set(E,j),h.push(E),w===1&&T&&mc.set(E,!0),j===1&&E.setAttribute(i,"true"),T||E.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",E,N)}})};return b(l),m.clear(),_d++,function(){h.forEach(function(x){var E=Gr.get(x)-1,C=d.get(x)-1;Gr.set(x,E),d.set(x,C),E||(mc.has(x)||x.removeAttribute(s),mc.delete(x)),C||x.removeAttribute(i)}),_d--,_d||(Gr=new WeakMap,Gr=new WeakMap,mc=new WeakMap,pc={})}},Z0=function(n,l,i){i===void 0&&(i="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),c=aR(n);return c?(s.push.apply(s,Array.from(c.querySelectorAll("[aria-live], script"))),rR(s,c,i,"aria-hidden")):function(){return null}},Vc="Dialog",[I0]=Hc(Vc),[iR,An]=I0(Vc),$0=n=>{const{__scopeDialog:l,children:i,open:s,defaultOpen:c,onOpenChange:d,modal:h=!0}=n,m=v.useRef(null),y=v.useRef(null),[p,b]=Wd({prop:s,defaultProp:c??!1,onChange:d,caller:Vc});return u.jsx(iR,{scope:l,triggerRef:m,contentRef:y,contentId:Xr(),titleId:Xr(),descriptionId:Xr(),open:p,onOpenChange:b,onOpenToggle:v.useCallback(()=>b(x=>!x),[b]),modal:h,children:i})};$0.displayName=Vc;var J0="DialogTrigger",sR=v.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(J0,i),d=it(l,c.triggerRef);return u.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Yh(c.open),...s,ref:d,onClick:$e(n.onClick,c.onOpenToggle)})});sR.displayName=J0;var Vh="DialogPortal",[oR,W0]=I0(Vh,{forceMount:void 0}),eb=n=>{const{__scopeDialog:l,forceMount:i,children:s,container:c}=n,d=An(Vh,l);return u.jsx(oR,{scope:l,forceMount:i,children:v.Children.map(s,h=>u.jsx(Bc,{present:i||d.open,children:u.jsx(Bh,{asChild:!0,container:c,children:h})}))})};eb.displayName=Vh;var Rc="DialogOverlay",tb=v.forwardRef((n,l)=>{const i=W0(Rc,n.__scopeDialog),{forceMount:s=i.forceMount,...c}=n,d=An(Rc,n.__scopeDialog);return d.modal?u.jsx(Bc,{present:s||d.open,children:u.jsx(uR,{...c,ref:l})}):null});tb.displayName=Rc;var cR=Rs("DialogOverlay.RemoveScroll"),uR=v.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(Rc,i);return u.jsx(qh,{as:cR,allowPinchZoom:!0,shards:[c.contentRef],children:u.jsx(Ke.div,{"data-state":Yh(c.open),...s,ref:l,style:{pointerEvents:"auto",...s.style}})})}),Il="DialogContent",nb=v.forwardRef((n,l)=>{const i=W0(Il,n.__scopeDialog),{forceMount:s=i.forceMount,...c}=n,d=An(Il,n.__scopeDialog);return u.jsx(Bc,{present:s||d.open,children:d.modal?u.jsx(fR,{...c,ref:l}):u.jsx(dR,{...c,ref:l})})});nb.displayName=Il;var fR=v.forwardRef((n,l)=>{const i=An(Il,n.__scopeDialog),s=v.useRef(null),c=it(l,i.contentRef,s);return v.useEffect(()=>{const d=s.current;if(d)return Z0(d)},[]),u.jsx(ab,{...n,ref:c,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(n.onCloseAutoFocus,d=>{var h;d.preventDefault(),(h=i.triggerRef.current)==null||h.focus()}),onPointerDownOutside:$e(n.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&d.preventDefault()}),onFocusOutside:$e(n.onFocusOutside,d=>d.preventDefault())})}),dR=v.forwardRef((n,l)=>{const i=An(Il,n.__scopeDialog),s=v.useRef(!1),c=v.useRef(!1);return u.jsx(ab,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var h,m;(h=n.onCloseAutoFocus)==null||h.call(n,d),d.defaultPrevented||(s.current||(m=i.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,c.current=!1},onInteractOutside:d=>{var y,p;(y=n.onInteractOutside)==null||y.call(n,d),d.defaultPrevented||(s.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const h=d.target;((p=i.triggerRef.current)==null?void 0:p.contains(h))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),ab=v.forwardRef((n,l)=>{const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:d,...h}=n,m=An(Il,i),y=v.useRef(null),p=it(l,y);return q0(),u.jsxs(u.Fragment,{children:[u.jsx(Hh,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:c,onUnmountAutoFocus:d,children:u.jsx(kh,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Yh(m.open),...h,ref:p,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(hR,{titleId:m.titleId}),u.jsx(pR,{contentRef:y,descriptionId:m.descriptionId})]})]})}),Gh="DialogTitle",lb=v.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(Gh,i);return u.jsx(Ke.h2,{id:c.titleId,...s,ref:l})});lb.displayName=Gh;var rb="DialogDescription",ib=v.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(rb,i);return u.jsx(Ke.p,{id:c.descriptionId,...s,ref:l})});ib.displayName=rb;var sb="DialogClose",ob=v.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(sb,i);return u.jsx(Ke.button,{type:"button",...s,ref:l,onClick:$e(n.onClick,()=>c.onOpenChange(!1))})});ob.displayName=sb;function Yh(n){return n?"open":"closed"}var cb="DialogTitleWarning",[q4,ub]=GN(cb,{contentName:Il,titleName:Gh,docsSlug:"dialog"}),hR=({titleId:n})=>{const l=ub(cb),i=`\`${l.contentName}\` requires a \`${l.titleName}\` for the component to be accessible for screen reader users.
365
+ `)},eR=0,Vr=[];function tR(n){var l=y.useRef([]),i=y.useRef([0,0]),s=y.useRef(),c=y.useState(eR++)[0],d=y.useState(Q0)[0],h=y.useRef(n);y.useEffect(function(){h.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var w=wT([n.lockRef.current],(n.shards||[]).map($v),!0).filter(Boolean);return w.forEach(function(j){return j.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),w.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=y.useCallback(function(w,j){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!h.current.allowPinchZoom;var N=hc(w),O=i.current,M="deltaX"in w?w.deltaX:O[0]-N[0],z="deltaY"in w?w.deltaY:O[1]-N[1],q,X=w.target,G=Math.abs(M)>Math.abs(z)?"h":"v";if("touches"in w&&G==="h"&&X.type==="range")return!1;var Q=window.getSelection(),ee=Q&&Q.anchorNode,ne=ee?ee===X||ee.contains(X):!1;if(ne)return!1;var ie=Zv(G,X);if(!ie)return!0;if(ie?q=G:(q=G==="v"?"h":"v",ie=Zv(G,X)),!ie)return!1;if(!s.current&&"changedTouches"in w&&(M||z)&&(s.current=q),!q)return!0;var te=s.current||q;return $T(te,j,w,te==="h"?M:z)},[]),v=y.useCallback(function(w){var j=w;if(!(!Vr.length||Vr[Vr.length-1]!==d)){var N="deltaY"in j?Iv(j):hc(j),O=l.current.filter(function(q){return q.name===j.type&&(q.target===j.target||j.target===q.shadowParent)&&JT(q.delta,N)})[0];if(O&&O.should){j.cancelable&&j.preventDefault();return}if(!O){var M=(h.current.shards||[]).map($v).filter(Boolean).filter(function(q){return q.contains(j.target)}),z=M.length>0?m(j,M[0]):!h.current.noIsolation;z&&j.cancelable&&j.preventDefault()}}},[]),g=y.useCallback(function(w,j,N,O){var M={name:w,delta:j,target:N,should:O,shadowParent:nR(N)};l.current.push(M),setTimeout(function(){l.current=l.current.filter(function(z){return z!==M})},1)},[]),x=y.useCallback(function(w){i.current=hc(w),s.current=void 0},[]),b=y.useCallback(function(w){g(w.type,Iv(w),w.target,m(w,n.lockRef.current))},[]),E=y.useCallback(function(w){g(w.type,hc(w),w.target,m(w,n.lockRef.current))},[]);y.useEffect(function(){return Vr.push(d),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:E}),document.addEventListener("wheel",v,qr),document.addEventListener("touchmove",v,qr),document.addEventListener("touchstart",x,qr),function(){Vr=Vr.filter(function(w){return w!==d}),document.removeEventListener("wheel",v,qr),document.removeEventListener("touchmove",v,qr),document.removeEventListener("touchstart",x,qr)}},[]);var C=n.removeScrollBar,T=n.inert;return y.createElement(y.Fragment,null,T?y.createElement(d,{styles:WT(c)}):null,C?y.createElement(QT,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function nR(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const aR=OT(Y0,tR);var qh=y.forwardRef(function(n,l){return y.createElement(qc,Bn({},n,{ref:l,sideCar:aR}))});qh.classNames=qc.classNames;var lR=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},Gr=new WeakMap,mc=new WeakMap,pc={},_d=0,F0=function(n){return n&&(n.host||F0(n.parentNode))},rR=function(n,l){return l.map(function(i){if(n.contains(i))return i;var s=F0(i);return s&&n.contains(s)?s:(console.error("aria-hidden",i,"in not contained inside",n,". Doing nothing"),null)}).filter(function(i){return!!i})},iR=function(n,l,i,s){var c=rR(l,Array.isArray(n)?n:[n]);pc[i]||(pc[i]=new WeakMap);var d=pc[i],h=[],m=new Set,v=new Set(c),g=function(b){!b||m.has(b)||(m.add(b),g(b.parentNode))};c.forEach(g);var x=function(b){!b||v.has(b)||Array.prototype.forEach.call(b.children,function(E){if(m.has(E))x(E);else try{var C=E.getAttribute(s),T=C!==null&&C!=="false",w=(Gr.get(E)||0)+1,j=(d.get(E)||0)+1;Gr.set(E,w),d.set(E,j),h.push(E),w===1&&T&&mc.set(E,!0),j===1&&E.setAttribute(i,"true"),T||E.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",E,N)}})};return x(l),m.clear(),_d++,function(){h.forEach(function(b){var E=Gr.get(b)-1,C=d.get(b)-1;Gr.set(b,E),d.set(b,C),E||(mc.has(b)||b.removeAttribute(s),mc.delete(b)),C||b.removeAttribute(i)}),_d--,_d||(Gr=new WeakMap,Gr=new WeakMap,mc=new WeakMap,pc={})}},Z0=function(n,l,i){i===void 0&&(i="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),c=lR(n);return c?(s.push.apply(s,Array.from(c.querySelectorAll("[aria-live], script"))),iR(s,c,i,"aria-hidden")):function(){return null}},Vc="Dialog",[I0]=Hc(Vc),[sR,An]=I0(Vc),$0=n=>{const{__scopeDialog:l,children:i,open:s,defaultOpen:c,onOpenChange:d,modal:h=!0}=n,m=y.useRef(null),v=y.useRef(null),[g,x]=Wd({prop:s,defaultProp:c??!1,onChange:d,caller:Vc});return u.jsx(sR,{scope:l,triggerRef:m,contentRef:v,contentId:Xr(),titleId:Xr(),descriptionId:Xr(),open:g,onOpenChange:x,onOpenToggle:y.useCallback(()=>x(b=>!b),[x]),modal:h,children:i})};$0.displayName=Vc;var J0="DialogTrigger",oR=y.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(J0,i),d=it(l,c.triggerRef);return u.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Yh(c.open),...s,ref:d,onClick:Je(n.onClick,c.onOpenToggle)})});oR.displayName=J0;var Vh="DialogPortal",[cR,W0]=I0(Vh,{forceMount:void 0}),eb=n=>{const{__scopeDialog:l,forceMount:i,children:s,container:c}=n,d=An(Vh,l);return u.jsx(cR,{scope:l,forceMount:i,children:y.Children.map(s,h=>u.jsx(Bc,{present:i||d.open,children:u.jsx(Bh,{asChild:!0,container:c,children:h})}))})};eb.displayName=Vh;var Rc="DialogOverlay",tb=y.forwardRef((n,l)=>{const i=W0(Rc,n.__scopeDialog),{forceMount:s=i.forceMount,...c}=n,d=An(Rc,n.__scopeDialog);return d.modal?u.jsx(Bc,{present:s||d.open,children:u.jsx(fR,{...c,ref:l})}):null});tb.displayName=Rc;var uR=Rs("DialogOverlay.RemoveScroll"),fR=y.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(Rc,i);return u.jsx(qh,{as:uR,allowPinchZoom:!0,shards:[c.contentRef],children:u.jsx(Fe.div,{"data-state":Yh(c.open),...s,ref:l,style:{pointerEvents:"auto",...s.style}})})}),Il="DialogContent",nb=y.forwardRef((n,l)=>{const i=W0(Il,n.__scopeDialog),{forceMount:s=i.forceMount,...c}=n,d=An(Il,n.__scopeDialog);return u.jsx(Bc,{present:s||d.open,children:d.modal?u.jsx(dR,{...c,ref:l}):u.jsx(hR,{...c,ref:l})})});nb.displayName=Il;var dR=y.forwardRef((n,l)=>{const i=An(Il,n.__scopeDialog),s=y.useRef(null),c=it(l,i.contentRef,s);return y.useEffect(()=>{const d=s.current;if(d)return Z0(d)},[]),u.jsx(ab,{...n,ref:c,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(n.onCloseAutoFocus,d=>{var h;d.preventDefault(),(h=i.triggerRef.current)==null||h.focus()}),onPointerDownOutside:Je(n.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&d.preventDefault()}),onFocusOutside:Je(n.onFocusOutside,d=>d.preventDefault())})}),hR=y.forwardRef((n,l)=>{const i=An(Il,n.__scopeDialog),s=y.useRef(!1),c=y.useRef(!1);return u.jsx(ab,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var h,m;(h=n.onCloseAutoFocus)==null||h.call(n,d),d.defaultPrevented||(s.current||(m=i.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,c.current=!1},onInteractOutside:d=>{var v,g;(v=n.onInteractOutside)==null||v.call(n,d),d.defaultPrevented||(s.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const h=d.target;((g=i.triggerRef.current)==null?void 0:g.contains(h))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),ab=y.forwardRef((n,l)=>{const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:d,...h}=n,m=An(Il,i),v=y.useRef(null),g=it(l,v);return q0(),u.jsxs(u.Fragment,{children:[u.jsx(Hh,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:c,onUnmountAutoFocus:d,children:u.jsx(kh,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Yh(m.open),...h,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(mR,{titleId:m.titleId}),u.jsx(gR,{contentRef:v,descriptionId:m.descriptionId})]})]})}),Gh="DialogTitle",lb=y.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(Gh,i);return u.jsx(Fe.h2,{id:c.titleId,...s,ref:l})});lb.displayName=Gh;var rb="DialogDescription",ib=y.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(rb,i);return u.jsx(Fe.p,{id:c.descriptionId,...s,ref:l})});ib.displayName=rb;var sb="DialogClose",ob=y.forwardRef((n,l)=>{const{__scopeDialog:i,...s}=n,c=An(sb,i);return u.jsx(Fe.button,{type:"button",...s,ref:l,onClick:Je(n.onClick,()=>c.onOpenChange(!1))})});ob.displayName=sb;function Yh(n){return n?"open":"closed"}var cb="DialogTitleWarning",[q4,ub]=YN(cb,{contentName:Il,titleName:Gh,docsSlug:"dialog"}),mR=({titleId:n})=>{const l=ub(cb),i=`\`${l.contentName}\` requires a \`${l.titleName}\` for the component to be accessible for screen reader users.
366
366
 
367
367
  If you want to hide the \`${l.titleName}\`, you can wrap it with our VisuallyHidden component.
368
368
 
369
- For more information, see https://radix-ui.com/primitives/docs/components/${l.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(i))},[i,n]),null},mR="DialogDescriptionWarning",pR=({contentRef:n,descriptionId:l})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ub(mR).contentName}}.`;return v.useEffect(()=>{var d;const c=(d=n.current)==null?void 0:d.getAttribute("aria-describedby");l&&c&&(document.getElementById(l)||console.warn(s))},[s,n,l]),null},gR=$0,yR=eb,fb=tb,db=nb,hb=lb,mb=ib,vR=ob;const xR=gR,bR=yR,pb=v.forwardRef(({className:n,...l},i)=>u.jsx(fb,{ref:i,className:je("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",n),...l}));pb.displayName=fb.displayName;const gb=v.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(bR,{children:[u.jsx(pb,{}),u.jsxs(db,{ref:s,className:je("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-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",n),...i,children:[l,u.jsxs(vR,{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:[u.jsx(fj,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gb.displayName=db.displayName;function yb({className:n,...l}){return u.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",n),...l})}yb.displayName="DialogHeader";function vb({className:n,...l}){return u.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...l})}vb.displayName="DialogFooter";const xb=v.forwardRef(({className:n,...l},i)=>u.jsx(hb,{ref:i,className:je("text-lg font-semibold leading-none tracking-tight",n),...l}));xb.displayName=hb.displayName;const bb=v.forwardRef(({className:n,...l},i)=>u.jsx(mb,{ref:i,className:je("text-sm text-muted-foreground",n),...l}));bb.displayName=mb.displayName;const Sb=["ollama","lm-studio","anthropic","openai-compatible"],SR=["ollama","lm-studio","openai-compatible"],Ad={ollama:"http://localhost:11434","lm-studio":"http://localhost:1234","openai-compatible":void 0},wR=["debug","info","warn","error"],ER=["git","obsidian-sync","manual"],CR=[{value:2048,label:"2K"},{value:4096,label:"4K"},{value:8192,label:"8K"},{value:16384,label:"16K"},{value:32768,label:"32K"},{value:65536,label:"64K"},{value:131072,label:"128K"}],wb=CR.map(n=>({value:String(n.value),label:`${n.label} (${n.value.toLocaleString()})`})),jR=["Stage 1 (warm)","Stage 2 (cooling)","Stage 3 (cold)"],NR=["Seconds between cycles after initial activity subsides","Seconds between cycles as activity continues to drop","Seconds between cycles just before dormancy"],TR={metabolism:{active_interval:900,cooldown_intervals:[1800,3600,7200],dormancy_threshold:14400}};function ve({label:n,description:l,children:i}){return u.jsxs("div",{className:"grid gap-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-foreground",children:n}),l&&u.jsx("p",{className:"text-xs text-muted-foreground",children:l}),i]})}function Ec({checked:n,onChange:l}){return u.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>l(!n),className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${n?"bg-primary":"bg-muted"}`,children:u.jsx("span",{className:`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-200 ${n?"translate-x-5":"translate-x-0"}`})})}function hl({value:n,onChange:l,options:i,disabled:s,className:c}){return u.jsx("select",{value:n,onChange:d=>l(d.target.value),disabled:s,className:je("w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50",c),children:i.map(d=>{const h=typeof d=="string"?d:d.value,m=typeof d=="string"?d:d.label;return u.jsx("option",{value:h,children:m},h)})})}const ft=(n,l)=>i=>{const s=parseInt(i.target.value,10);isNaN(s)||n(l,s)};function Wa(n,l){return JSON.stringify(n)!==JSON.stringify(l)}function tr({title:n,description:l,isDirty:i,defaultOpen:s=!1,children:c}){const[d,h]=v.useState(s);return u.jsxs(Rt,{children:[u.jsxs(_t,{className:"cursor-pointer select-none",onClick:()=>h(m=>!m),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(At,{className:"text-base",children:n}),i&&u.jsx("span",{className:"h-2 w-2 rounded-full bg-primary",title:"Unsaved changes"})]}),u.jsx(Uc,{className:je("h-4 w-4 text-muted-foreground transition-transform duration-200",!d&&"-rotate-90")})]}),l&&u.jsx(pa,{children:l})]}),d&&u.jsx(Ot,{children:c})]})}const ze=v.forwardRef(({className:n,type:l,...i},s)=>u.jsx("input",{type:l,className:je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm 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",n),ref:s,...i}));ze.displayName="Input";const Eb=new Set(["openai-compatible"]);function RR(n,l,i){const s=n?Eb.has(n):!1;return er({queryKey:["models",n,l,i],queryFn:({signal:d})=>{const h=new URLSearchParams({provider:n});return l&&h.set("base_url",l),i&&h.set("type",i),sn(`/models?${h.toString()}`,{signal:d})},enabled:!!n&&(!s||!!l),staleTime:bj})}const _R=500;function nh({provider:n,baseUrl:l,value:i,onChange:s,placeholder:c,modelType:d}){const m=(n?Eb.has(n):!1)&&!l,[y,p]=v.useState(l);v.useEffect(()=>{const C=setTimeout(()=>p(l),_R);return()=>clearTimeout(C)},[l]);const{data:b,isLoading:x}=RR(n,y,d),E=(b==null?void 0:b.models)??[];return v.useEffect(()=>{if(x||m||E.length===0||E.includes(i))return;const T=E.find(w=>w.startsWith(i+":")||i.startsWith(w+":")||w===i)??E[0];T!==i&&s(T)},[E,x,m,i,s]),u.jsxs("select",{value:i,onChange:C=>s(C.target.value),disabled:x||!n||m,className:"w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50",children:[m&&u.jsx("option",{value:"",children:c??"Enter base URL first"}),!m&&x&&u.jsx("option",{value:i,children:"Loading models..."}),!m&&!x&&!n&&u.jsx("option",{value:"",children:c??"Select provider first"}),!m&&!x&&n&&E.length===0&&u.jsx("option",{value:"",children:c??"No models available"}),!m&&!x&&E.map(C=>u.jsx("option",{value:C,children:C},C))]})}function AR({intelligence:n,isDirty:l,updateLlm:i,updateEmbedding:s}){return u.jsx(tr,{title:"Intelligence",description:"LLM and embedding provider configuration",isDirty:l,defaultOpen:!0,children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"LLM"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Which LLM service to use for processing sessions",children:u.jsx(hl,{value:n.llm.provider,onChange:c=>i("provider",c),options:[...Sb]})}),n.llm.provider==="openai-compatible"&&u.jsx(ve,{label:"Base URL",description:"OpenAI-compatible API endpoint (e.g., http://localhost:8080/v1)",children:u.jsx(ze,{value:n.llm.base_url??"",onChange:c=>i("base_url",c.target.value),placeholder:"http://localhost:8080/v1"})}),u.jsx(ve,{label:"Model",description:"The model for extraction, summaries, and titles — speed matters more than depth",children:u.jsx(nh,{provider:n.llm.provider,baseUrl:n.llm.base_url,value:n.llm.model,onChange:c=>i("model",c),modelType:"llm"})}),u.jsx(ve,{label:"Context Window",description:"How much text the model can read per operation",children:u.jsx(hl,{value:String(n.llm.context_window),onChange:c=>i("context_window",parseInt(c,10)),options:wb})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Embedding"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Which service generates vector embeddings for search",children:u.jsx(hl,{value:n.embedding.provider,onChange:c=>s("provider",c),options:[...SR]})}),n.embedding.provider==="openai-compatible"&&u.jsx(ve,{label:"Base URL",description:"OpenAI-compatible embedding API endpoint",children:u.jsx(ze,{value:n.embedding.base_url??"",onChange:c=>s("base_url",c.target.value),placeholder:"http://localhost:8080/v1"})}),u.jsx(ve,{label:"Model",description:"The embedding model for semantic search and similarity",children:u.jsx(nh,{provider:n.embedding.provider,baseUrl:n.embedding.base_url,value:n.embedding.model,onChange:c=>s("model",c),modelType:"embedding"})})]})]})]})})}const $v=[1500,3e3,5e3,7500,1e4],OR={1500:6500,3e3:11500,5e3:18500,7500:24500,1e4:30500};function MR({digest:n,intelligence:l,isDirty:i,updateDigest:s,updateDigestIntelligence:c,updateDigestMetabolism:d,updateDigestSubstrate:h,updateDigestConsolidation:m}){const y=n.intelligence.provider??l.llm.provider,p=n.intelligence.base_url??l.llm.base_url;return u.jsx(tr,{title:"Digest",description:"Continuous synthesis of vault knowledge into pre-computed context",isDirty:i,children:u.jsxs("div",{className:"space-y-6",children:[u.jsx(ve,{label:"Enabled",description:"Run continuous vault synthesis in the background",children:u.jsx(Ec,{checked:n.enabled,onChange:b=>s("enabled",b)})}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Consolidation"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Enabled",description:"Automatically consolidate related spores into wisdom notes before each digest cycle",children:u.jsx(Ec,{checked:n.consolidation.enabled,onChange:b=>m("enabled",b)})}),u.jsx(ve,{label:"Max Tokens",description:"Token budget for wisdom note generation — higher values produce more comprehensive notes",children:u.jsx(ze,{type:"number",value:n.consolidation.max_tokens,onChange:b=>{const x=parseInt(b.target.value,10);isNaN(x)||m("max_tokens",x)}})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Intelligence"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Override the processor model for digest — use a larger model for better synthesis",children:u.jsx(hl,{value:n.intelligence.provider??"__null__",onChange:b=>c("provider",b==="__null__"?null:b),options:[{value:"__null__",label:"Use main provider"},...Sb.map(b=>({value:b,label:b}))]})}),u.jsx(ve,{label:"Model",description:"Digest model — quality matters more than speed here",children:u.jsx(nh,{provider:y,baseUrl:p,value:n.intelligence.model??"",onChange:b=>c("model",b||null),placeholder:"Use main model",modelType:"llm"})}),u.jsx(ve,{label:"Context Window",description:"How much vault content the digest model can process per cycle",children:u.jsx(hl,{value:String(n.intelligence.context_window),onChange:b=>c("context_window",parseInt(b,10)),options:wb})}),u.jsx(ve,{label:"Keep Alive",description:"How long to keep the digest model loaded between cycles (Ollama duration string)",children:u.jsx(ze,{value:n.intelligence.keep_alive??"",placeholder:"Provider default",onChange:b=>c("keep_alive",b.target.value||null)})}),u.jsx(ve,{label:"GPU KV Cache",description:"Offload key-value cache to GPU — faster but uses more VRAM",children:u.jsx(Ec,{checked:n.intelligence.gpu_kv_cache,onChange:b=>c("gpu_kv_cache",b)})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Tiers"}),u.jsx(ve,{label:"Token budgets",description:"Built-in tiers — eligible tiers are determined by your digest model's context window",children:u.jsx("div",{className:"flex flex-wrap gap-2",children:$v.map(b=>{const x=OR[b]??1/0,E=x<=(n.intelligence.context_window??0);return u.jsx(dt,{variant:E?"secondary":"outline",className:E?"":"opacity-40",title:E?`Eligible — requires ${x.toLocaleString()} context`:`Requires ${x.toLocaleString()} context (current: ${(n.intelligence.context_window??0).toLocaleString()})`,children:b.toLocaleString()},b)})})}),u.jsx("div",{className:"mt-4",children:u.jsx(ve,{label:"Inject Tier",description:"Which tier to inject at session start — larger tiers give agents more context",children:u.jsx(hl,{value:n.inject_tier!==null?String(n.inject_tier):"__null__",onChange:b=>s("inject_tier",b==="__null__"?null:parseInt(b,10)),options:[{value:"__null__",label:"None (disabled)"},...$v.map(b=>({value:String(b),label:`${b.toLocaleString()} tokens`}))]})})})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Metabolism"}),u.jsx("button",{type:"button",onClick:()=>{const b=TR.metabolism;d("active_interval",b.active_interval),d("dormancy_threshold",b.dormancy_threshold),d("cooldown_intervals",[...b.cooldown_intervals])},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Reset to recommended"})]}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Active Interval (sec)",description:"Seconds between digest cycles when new content is arriving",children:u.jsx(ze,{type:"number",value:n.metabolism.active_interval,onChange:b=>{const x=parseInt(b.target.value,10);isNaN(x)||d("active_interval",x)}})}),u.jsx(ve,{label:"Dormancy Threshold (sec)",description:"Seconds of inactivity before the digest engine goes dormant",children:u.jsx(ze,{type:"number",value:n.metabolism.dormancy_threshold,onChange:b=>{const x=parseInt(b.target.value,10);isNaN(x)||d("dormancy_threshold",x)}})})]}),u.jsxs("div",{className:"mt-4",children:[u.jsx("h5",{className:"mb-3 text-xs font-medium text-muted-foreground",children:"Cooldown Intervals (sec)"}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:jR.map((b,x)=>u.jsx(ve,{label:b,description:NR[x],children:u.jsx(ze,{type:"number",value:n.metabolism.cooldown_intervals[x]??"",onChange:E=>{const C=parseInt(E.target.value,10);if(!isNaN(C)){const T=[...n.metabolism.cooldown_intervals];T[x]=C,d("cooldown_intervals",T)}}})},b))})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Substrate"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Max Notes Per Cycle",description:"Maximum vault notes to process in a single digest cycle",children:u.jsx(ze,{type:"number",value:n.substrate.max_notes_per_cycle,onChange:b=>{const x=parseInt(b.target.value,10);isNaN(x)||h("max_notes_per_cycle",x)}})}),u.jsx(ve,{label:"Min Notes For Cycle",description:"Minimum new knowledge units needed before a digest cycle runs",children:u.jsx(ze,{type:"number",value:n.substrate.min_notes_for_cycle,onChange:b=>{const x=parseInt(b.target.value,10);isNaN(x)||h("min_notes_for_cycle",x)}})})]})]})]})})}function DR({capture:n,isDirty:l,updateCapture:i}){return u.jsx(tr,{title:"Capture",description:"Event buffering and token budgets for LLM processing",isDirty:l,children:u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Buffer Max Events",description:"Maximum events to buffer per session before flushing",children:u.jsx(ze,{type:"number",value:n.buffer_max_events,onChange:ft(i,"buffer_max_events")})}),u.jsx(ve,{label:"Extraction Max Tokens",description:"Output token limit for observation extraction from sessions",children:u.jsx(ze,{type:"number",value:n.extraction_max_tokens,onChange:ft(i,"extraction_max_tokens")})}),u.jsx(ve,{label:"Summary Max Tokens",description:"Output token limit for session summary generation",children:u.jsx(ze,{type:"number",value:n.summary_max_tokens,onChange:ft(i,"summary_max_tokens")})}),u.jsx(ve,{label:"Title Max Tokens",description:"Output token limit for session title generation",children:u.jsx(ze,{type:"number",value:n.title_max_tokens,onChange:ft(i,"title_max_tokens")})}),u.jsx(ve,{label:"Classification Max Tokens",description:"Output token limit for artifact classification",children:u.jsx(ze,{type:"number",value:n.classification_max_tokens,onChange:ft(i,"classification_max_tokens")})})]})})}function zR({context:n,isDirty:l,updateContext:i,updateContextLayer:s}){return u.jsx(tr,{title:"Context",description:"Context injection token budget and layer allocations",isDirty:l,children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(ve,{label:"Max Tokens",description:"Total token budget for per-prompt context injection",children:u.jsx(ze,{type:"number",value:n.max_tokens,onChange:ft(i,"max_tokens")})}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-1 text-sm font-medium text-muted-foreground",children:"Layer Allocations"}),u.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"How the budget is split across vault content types"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Plans",description:"Tokens allocated to active plan context",children:u.jsx(ze,{type:"number",value:n.layers.plans,onChange:ft(s,"plans")})}),u.jsx(ve,{label:"Sessions",description:"Tokens allocated to recent session context",children:u.jsx(ze,{type:"number",value:n.layers.sessions,onChange:ft(s,"sessions")})}),u.jsx(ve,{label:"Spores",description:"Tokens allocated to relevant spore context",children:u.jsx(ze,{type:"number",value:n.layers.spores,onChange:ft(s,"spores")})}),u.jsx(ve,{label:"Team",description:"Tokens allocated to team member context",children:u.jsx(ze,{type:"number",value:n.layers.team,onChange:ft(s,"team")})})]})]})]})})}function LR({daemon:n,isDirty:l,updateDaemon:i}){return u.jsx(tr,{title:"Daemon",description:"Daemon process settings",isDirty:l,children:u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Port",description:"Auto-derived from vault path — the daemon binds to this port on startup",children:u.jsx(ze,{type:"number",value:n.port??"",placeholder:"Auto",disabled:!0,className:"disabled:cursor-default disabled:opacity-70"})}),u.jsx(ve,{label:"Log Level",description:"Minimum severity level for daemon log output",children:u.jsx(hl,{value:n.log_level,onChange:s=>i("log_level",s),options:wR})}),u.jsx(ve,{label:"Grace Period (sec)",description:"Seconds to wait before shutting down when no sessions are active",children:u.jsx(ze,{type:"number",value:n.grace_period,onChange:ft(i,"grace_period")})}),u.jsx(ve,{label:"Max Log Size (bytes)",description:"Maximum daemon log file size in bytes before rotation",children:u.jsx(ze,{type:"number",value:n.max_log_size,onChange:ft(i,"max_log_size")})})]})})}function UR({pipeline:n,isDirty:l,updatePipeline:i,updatePipelineRetry:s,updatePipelineCircuitBreaker:c}){return u.jsxs(tr,{title:"Pipeline",description:"Work item processing, retry behavior, and circuit breaker settings",isDirty:l,children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Processing"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Batch Size",description:"Work items processed per stage per pipeline tick",children:u.jsx(ze,{type:"number",value:n.batch_size,onChange:ft(i,"batch_size")})}),u.jsx(ve,{label:"Tick Interval (sec)",description:"Seconds between pipeline processing ticks",children:u.jsx(ze,{type:"number",value:n.tick_interval_seconds,onChange:ft(i,"tick_interval_seconds")})}),u.jsx(ve,{label:"Retention Days",description:"Days to retain completed/failed work items before compaction",children:u.jsx(ze,{type:"number",value:n.retention_days,onChange:ft(i,"retention_days")})})]})]}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Retry"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Max Transient Retries",description:"Maximum retry attempts for recoverable failures",children:u.jsx(ze,{type:"number",value:n.retry.transient_max,onChange:ft(s,"transient_max")})}),u.jsx(ve,{label:"Backoff Base (sec)",description:"Base delay between retry attempts (exponential backoff)",children:u.jsx(ze,{type:"number",value:n.retry.backoff_base_seconds,onChange:ft(s,"backoff_base_seconds")})})]})]}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Circuit Breaker"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Failure Threshold",description:"Consecutive failures before opening a circuit breaker",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.failure_threshold,onChange:ft(c,"failure_threshold")})}),u.jsx(ve,{label:"Cooldown (sec)",description:"Initial cooldown duration when a circuit breaker opens",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.cooldown_seconds,onChange:ft(c,"cooldown_seconds")})}),u.jsx(ve,{label:"Max Cooldown (sec)",description:"Maximum cooldown duration for exponential backoff",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.max_cooldown_seconds,onChange:ft(c,"max_cooldown_seconds")})})]})]})]})}function kR({team:n,isDirty:l,updateTeam:i}){return u.jsx(tr,{title:"Team",description:"Multi-user collaboration settings",isDirty:l,children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(ve,{label:"Enabled",description:"Enable team knowledge sharing across vault users",children:u.jsx(Ec,{checked:n.enabled,onChange:s=>i("enabled",s)})}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"User Name",description:"Your display name for team attribution",children:u.jsx(ze,{value:n.user,onChange:s=>i("user",s.target.value)})}),u.jsx(ve,{label:"Sync Mode",description:"How team knowledge is synchronized between machines",children:u.jsx(hl,{value:n.sync,onChange:s=>i("sync",s),options:ER})})]})]})})}function HR({config:n,onSave:l,isSaving:i}){const[s,c]=v.useState(n),[d,h]=v.useState(!1),[m,y]=v.useState(null),{data:p}=Vs(),{restart:b,isRestarting:x}=E0();v.useEffect(()=>{c(n)},[n]);const E=(p==null?void 0:p.daemon.config_hash)??null,C=m!==null&&m!==E,T=Wa(s,n),w=Wa(s.intelligence,n.intelligence),j=Wa(s.digest,n.digest),N=Wa(s.capture,n.capture),O=Wa(s.context,n.context),D=Wa(s.daemon,n.daemon),z=Wa(s.pipeline,n.pipeline),k=Wa(s.team,n.team),Q=v.useCallback((F,I)=>c($=>{const he={[F]:I};return F==="provider"&&typeof I=="string"&&(he.base_url=Ad[I]??void 0),{...$,intelligence:{...$.intelligence,llm:{...$.intelligence.llm,...he}}}}),[]),G=v.useCallback((F,I)=>c($=>{const he={[F]:I};return F==="provider"&&(he.base_url=Ad[I]??void 0),{...$,intelligence:{...$.intelligence,embedding:{...$.intelligence.embedding,...he}}}}),[]),W=v.useCallback((F,I)=>c($=>({...$,digest:{...$.digest,[F]:I}})),[]),te=v.useCallback((F,I)=>c($=>{const he={[F]:I};return F==="provider"&&(he.base_url=typeof I=="string"?Ad[I]??void 0:null),{...$,digest:{...$.digest,intelligence:{...$.digest.intelligence,...he}}}}),[]),le=v.useCallback((F,I)=>c($=>({...$,digest:{...$.digest,metabolism:{...$.digest.metabolism,[F]:I}}})),[]),oe=v.useCallback((F,I)=>c($=>({...$,digest:{...$.digest,substrate:{...$.digest.substrate,[F]:I}}})),[]),ee=v.useCallback((F,I)=>c($=>({...$,digest:{...$.digest,consolidation:{...$.digest.consolidation,[F]:I}}})),[]),ge=v.useCallback((F,I)=>c($=>({...$,capture:{...$.capture,[F]:I}})),[]),ce=v.useCallback((F,I)=>c($=>({...$,context:{...$.context,[F]:I}})),[]),de=v.useCallback((F,I)=>c($=>({...$,context:{...$.context,layers:{...$.context.layers,[F]:I}}})),[]),U=v.useCallback((F,I)=>c($=>({...$,daemon:{...$.daemon,[F]:I}})),[]),Z=v.useCallback((F,I)=>c($=>({...$,pipeline:{...$.pipeline,[F]:I}})),[]),J=v.useCallback((F,I)=>c($=>({...$,pipeline:{...$.pipeline,retry:{...$.pipeline.retry,[F]:I}}})),[]),ie=v.useCallback((F,I)=>c($=>({...$,pipeline:{...$.pipeline,circuit_breaker:{...$.pipeline.circuit_breaker,[F]:I}}})),[]),ye=v.useCallback((F,I)=>c($=>({...$,team:{...$.team,[F]:I}})),[]),A=async()=>{const F=await l(s);return E&&y(E),h(!0),F},P=async()=>{h(!1),await b(!0)};return u.jsxs("div",{className:"space-y-4",children:[C&&u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-yellow-500/50 bg-yellow-500/10 px-4 py-3",children:[u.jsx(Dh,{className:"h-4 w-4 shrink-0 text-yellow-500"}),u.jsx("span",{className:"flex-1 text-sm text-yellow-700 dark:text-yellow-400",children:"Configuration changed — restart required for changes to take effect"}),u.jsxs(Je,{size:"sm",variant:"outline",className:"gap-1.5 border-yellow-500/50 text-yellow-700 hover:bg-yellow-500/10 dark:text-yellow-400",onClick:P,disabled:x,children:[x?u.jsx(nl,{className:"h-3.5 w-3.5 animate-spin"}):u.jsx(nl,{className:"h-3.5 w-3.5"}),"Restart Now"]})]}),u.jsx(AR,{intelligence:s.intelligence,isDirty:w,updateLlm:Q,updateEmbedding:G}),u.jsx(MR,{digest:s.digest,intelligence:s.intelligence,isDirty:j,updateDigest:W,updateDigestIntelligence:te,updateDigestMetabolism:le,updateDigestSubstrate:oe,updateDigestConsolidation:ee}),u.jsx(UR,{pipeline:s.pipeline,isDirty:z,updatePipeline:Z,updatePipelineRetry:J,updatePipelineCircuitBreaker:ie}),u.jsx(DR,{capture:s.capture,isDirty:N,updateCapture:ge}),u.jsx(zR,{context:s.context,isDirty:O,updateContext:ce,updateContextLayer:de}),u.jsx(LR,{daemon:s.daemon,isDirty:D,updateDaemon:U}),u.jsx(kR,{team:s.team,isDirty:k,updateTeam:ye}),u.jsxs("div",{className:"flex items-center justify-end gap-3 pt-2",children:[T&&u.jsx("span",{className:"text-sm text-muted-foreground",children:"Unsaved changes"}),u.jsxs(Je,{onClick:A,disabled:!T||i,className:"gap-2",children:[i?u.jsx(nl,{className:"h-4 w-4 animate-spin"}):u.jsx(aj,{className:"h-4 w-4"}),i?"Saving...":"Save Configuration"]})]}),u.jsx(xR,{open:d,onOpenChange:h,children:u.jsxs(gb,{children:[u.jsxs(yb,{children:[u.jsx(xb,{children:"Configuration Saved"}),u.jsx(bb,{children:"Changes have been saved to disk. Some settings require a daemon restart to take effect."})]}),u.jsxs(vb,{children:[u.jsx(Je,{variant:"outline",onClick:()=>h(!1),children:"Later"}),u.jsxs(Je,{onClick:P,disabled:x,className:"gap-2",children:[x?u.jsx(nl,{className:"h-4 w-4 animate-spin"}):u.jsx(nl,{className:"h-4 w-4"}),x?"Restarting...":"Restart Now"]})]})]})})]})}function BR(){const{config:n,isLoading:l,error:i,saveConfig:s,isSaving:c}=VN();return u.jsx(Uh,{isLoading:l,error:i,loadingText:"Loading configuration...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(x0,{className:"h-5 w-5 text-primary"}),u.jsx("h1",{className:"text-xl font-semibold",children:"Configuration"})]}),u.jsx(HR,{config:n,onSave:s,isSaving:c})]})})}function Jv(n,[l,i]){return Math.min(i,Math.max(l,n))}function qR(n){const l=n+"CollectionProvider",[i,s]=Hc(l),[c,d]=i(l,{collectionRef:{current:null},itemMap:new Map}),h=w=>{const{scope:j,children:N}=w,O=ma.useRef(null),D=ma.useRef(new Map).current;return u.jsx(c,{scope:j,itemMap:D,collectionRef:O,children:N})};h.displayName=l;const m=n+"CollectionSlot",y=Rs(m),p=ma.forwardRef((w,j)=>{const{scope:N,children:O}=w,D=d(m,N),z=it(j,D.collectionRef);return u.jsx(y,{ref:z,children:O})});p.displayName=m;const b=n+"CollectionItemSlot",x="data-radix-collection-item",E=Rs(b),C=ma.forwardRef((w,j)=>{const{scope:N,children:O,...D}=w,z=ma.useRef(null),k=it(j,z),Q=d(b,N);return ma.useEffect(()=>(Q.itemMap.set(z,{ref:z,...D}),()=>void Q.itemMap.delete(z))),u.jsx(E,{[x]:"",ref:k,children:O})});C.displayName=b;function T(w){const j=d(n+"CollectionConsumer",w);return ma.useCallback(()=>{const O=j.collectionRef.current;if(!O)return[];const D=Array.from(O.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((Q,G)=>D.indexOf(Q.ref.current)-D.indexOf(G.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:h,Slot:p,ItemSlot:C},T,s]}var VR=v.createContext(void 0);function GR(n){const l=v.useContext(VR);return n||l||"ltr"}const YR=["top","right","bottom","left"],ml=Math.min,ln=Math.max,_c=Math.round,gc=Math.floor,Gn=n=>({x:n,y:n}),QR={left:"right",right:"left",bottom:"top",top:"bottom"};function ah(n,l,i){return ln(n,ml(l,i))}function wa(n,l){return typeof n=="function"?n(l):n}function Ea(n){return n.split("-")[0]}function pi(n){return n.split("-")[1]}function Qh(n){return n==="x"?"y":"x"}function Ph(n){return n==="y"?"height":"width"}function qn(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Xh(n){return Qh(qn(n))}function PR(n,l,i){i===void 0&&(i=!1);const s=pi(n),c=Xh(n),d=Ph(c);let h=c==="x"?s===(i?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[d]>l.floating[d]&&(h=Ac(h)),[h,Ac(h)]}function XR(n){const l=Ac(n);return[lh(n),l,lh(l)]}function lh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Wv=["left","right"],ex=["right","left"],KR=["top","bottom"],FR=["bottom","top"];function ZR(n,l,i){switch(n){case"top":case"bottom":return i?l?ex:Wv:l?Wv:ex;case"left":case"right":return l?KR:FR;default:return[]}}function IR(n,l,i,s){const c=pi(n);let d=ZR(Ea(n),i==="start",s);return c&&(d=d.map(h=>h+"-"+c),l&&(d=d.concat(d.map(lh)))),d}function Ac(n){const l=Ea(n);return QR[l]+n.slice(l.length)}function $R(n){return{top:0,right:0,bottom:0,left:0,...n}}function Cb(n){return typeof n!="number"?$R(n):{top:n,right:n,bottom:n,left:n}}function Oc(n){const{x:l,y:i,width:s,height:c}=n;return{width:s,height:c,top:i,left:l,right:l+s,bottom:i+c,x:l,y:i}}function tx(n,l,i){let{reference:s,floating:c}=n;const d=qn(l),h=Xh(l),m=Ph(h),y=Ea(l),p=d==="y",b=s.x+s.width/2-c.width/2,x=s.y+s.height/2-c.height/2,E=s[m]/2-c[m]/2;let C;switch(y){case"top":C={x:b,y:s.y-c.height};break;case"bottom":C={x:b,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:x};break;case"left":C={x:s.x-c.width,y:x};break;default:C={x:s.x,y:s.y}}switch(pi(l)){case"start":C[h]-=E*(i&&p?-1:1);break;case"end":C[h]+=E*(i&&p?-1:1);break}return C}async function JR(n,l){var i;l===void 0&&(l={});const{x:s,y:c,platform:d,rects:h,elements:m,strategy:y}=n,{boundary:p="clippingAncestors",rootBoundary:b="viewport",elementContext:x="floating",altBoundary:E=!1,padding:C=0}=wa(l,n),T=Cb(C),j=m[E?x==="floating"?"reference":"floating":x],N=Oc(await d.getClippingRect({element:(i=await(d.isElement==null?void 0:d.isElement(j)))==null||i?j:j.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:p,rootBoundary:b,strategy:y})),O=x==="floating"?{x:s,y:c,width:h.floating.width,height:h.floating.height}:h.reference,D=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),z=await(d.isElement==null?void 0:d.isElement(D))?await(d.getScale==null?void 0:d.getScale(D))||{x:1,y:1}:{x:1,y:1},k=Oc(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:D,strategy:y}):O);return{top:(N.top-k.top+T.top)/z.y,bottom:(k.bottom-N.bottom+T.bottom)/z.y,left:(N.left-k.left+T.left)/z.x,right:(k.right-N.right+T.right)/z.x}}const WR=50,e_=async(n,l,i)=>{const{placement:s="bottom",strategy:c="absolute",middleware:d=[],platform:h}=i,m=h.detectOverflow?h:{...h,detectOverflow:JR},y=await(h.isRTL==null?void 0:h.isRTL(l));let p=await h.getElementRects({reference:n,floating:l,strategy:c}),{x:b,y:x}=tx(p,s,y),E=s,C=0;const T={};for(let w=0;w<d.length;w++){const j=d[w];if(!j)continue;const{name:N,fn:O}=j,{x:D,y:z,data:k,reset:Q}=await O({x:b,y:x,initialPlacement:s,placement:E,strategy:c,middlewareData:T,rects:p,platform:m,elements:{reference:n,floating:l}});b=D??b,x=z??x,T[N]={...T[N],...k},Q&&C<WR&&(C++,typeof Q=="object"&&(Q.placement&&(E=Q.placement),Q.rects&&(p=Q.rects===!0?await h.getElementRects({reference:n,floating:l,strategy:c}):Q.rects),{x:b,y:x}=tx(p,E,y)),w=-1)}return{x:b,y:x,placement:E,strategy:c,middlewareData:T}},t_=n=>({name:"arrow",options:n,async fn(l){const{x:i,y:s,placement:c,rects:d,platform:h,elements:m,middlewareData:y}=l,{element:p,padding:b=0}=wa(n,l)||{};if(p==null)return{};const x=Cb(b),E={x:i,y:s},C=Xh(c),T=Ph(C),w=await h.getDimensions(p),j=C==="y",N=j?"top":"left",O=j?"bottom":"right",D=j?"clientHeight":"clientWidth",z=d.reference[T]+d.reference[C]-E[C]-d.floating[T],k=E[C]-d.reference[C],Q=await(h.getOffsetParent==null?void 0:h.getOffsetParent(p));let G=Q?Q[D]:0;(!G||!await(h.isElement==null?void 0:h.isElement(Q)))&&(G=m.floating[D]||d.floating[T]);const W=z/2-k/2,te=G/2-w[T]/2-1,le=ml(x[N],te),oe=ml(x[O],te),ee=le,ge=G-w[T]-oe,ce=G/2-w[T]/2+W,de=ah(ee,ce,ge),U=!y.arrow&&pi(c)!=null&&ce!==de&&d.reference[T]/2-(ce<ee?le:oe)-w[T]/2<0,Z=U?ce<ee?ce-ee:ce-ge:0;return{[C]:E[C]+Z,data:{[C]:de,centerOffset:ce-de-Z,...U&&{alignmentOffset:Z}},reset:U}}}),n_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var i,s;const{placement:c,middlewareData:d,rects:h,initialPlacement:m,platform:y,elements:p}=l,{mainAxis:b=!0,crossAxis:x=!0,fallbackPlacements:E,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:w=!0,...j}=wa(n,l);if((i=d.arrow)!=null&&i.alignmentOffset)return{};const N=Ea(c),O=qn(m),D=Ea(m)===m,z=await(y.isRTL==null?void 0:y.isRTL(p.floating)),k=E||(D||!w?[Ac(m)]:XR(m)),Q=T!=="none";!E&&Q&&k.push(...IR(m,w,T,z));const G=[m,...k],W=await y.detectOverflow(l,j),te=[];let le=((s=d.flip)==null?void 0:s.overflows)||[];if(b&&te.push(W[N]),x){const ce=PR(c,h,z);te.push(W[ce[0]],W[ce[1]])}if(le=[...le,{placement:c,overflows:te}],!te.every(ce=>ce<=0)){var oe,ee;const ce=(((oe=d.flip)==null?void 0:oe.index)||0)+1,de=G[ce];if(de&&(!(x==="alignment"?O!==qn(de):!1)||le.every(J=>qn(J.placement)===O?J.overflows[0]>0:!0)))return{data:{index:ce,overflows:le},reset:{placement:de}};let U=(ee=le.filter(Z=>Z.overflows[0]<=0).sort((Z,J)=>Z.overflows[1]-J.overflows[1])[0])==null?void 0:ee.placement;if(!U)switch(C){case"bestFit":{var ge;const Z=(ge=le.filter(J=>{if(Q){const ie=qn(J.placement);return ie===O||ie==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(ie=>ie>0).reduce((ie,ye)=>ie+ye,0)]).sort((J,ie)=>J[1]-ie[1])[0])==null?void 0:ge[0];Z&&(U=Z);break}case"initialPlacement":U=m;break}if(c!==U)return{reset:{placement:U}}}return{}}}};function nx(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function ax(n){return YR.some(l=>n[l]>=0)}const a_=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:i,platform:s}=l,{strategy:c="referenceHidden",...d}=wa(n,l);switch(c){case"referenceHidden":{const h=await s.detectOverflow(l,{...d,elementContext:"reference"}),m=nx(h,i.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:ax(m)}}}case"escaped":{const h=await s.detectOverflow(l,{...d,altBoundary:!0}),m=nx(h,i.floating);return{data:{escapedOffsets:m,escaped:ax(m)}}}default:return{}}}}},jb=new Set(["left","top"]);async function l_(n,l){const{placement:i,platform:s,elements:c}=n,d=await(s.isRTL==null?void 0:s.isRTL(c.floating)),h=Ea(i),m=pi(i),y=qn(i)==="y",p=jb.has(h)?-1:1,b=d&&y?-1:1,x=wa(l,n);let{mainAxis:E,crossAxis:C,alignmentAxis:T}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof T=="number"&&(C=m==="end"?T*-1:T),y?{x:C*b,y:E*p}:{x:E*p,y:C*b}}const r_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var i,s;const{x:c,y:d,placement:h,middlewareData:m}=l,y=await l_(l,n);return h===((i=m.offset)==null?void 0:i.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:c+y.x,y:d+y.y,data:{...y,placement:h}}}}},i_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:i,y:s,placement:c,platform:d}=l,{mainAxis:h=!0,crossAxis:m=!1,limiter:y={fn:N=>{let{x:O,y:D}=N;return{x:O,y:D}}},...p}=wa(n,l),b={x:i,y:s},x=await d.detectOverflow(l,p),E=qn(Ea(c)),C=Qh(E);let T=b[C],w=b[E];if(h){const N=C==="y"?"top":"left",O=C==="y"?"bottom":"right",D=T+x[N],z=T-x[O];T=ah(D,T,z)}if(m){const N=E==="y"?"top":"left",O=E==="y"?"bottom":"right",D=w+x[N],z=w-x[O];w=ah(D,w,z)}const j=y.fn({...l,[C]:T,[E]:w});return{...j,data:{x:j.x-i,y:j.y-s,enabled:{[C]:h,[E]:m}}}}}},s_=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:i,y:s,placement:c,rects:d,middlewareData:h}=l,{offset:m=0,mainAxis:y=!0,crossAxis:p=!0}=wa(n,l),b={x:i,y:s},x=qn(c),E=Qh(x);let C=b[E],T=b[x];const w=wa(m,l),j=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(y){const D=E==="y"?"height":"width",z=d.reference[E]-d.floating[D]+j.mainAxis,k=d.reference[E]+d.reference[D]-j.mainAxis;C<z?C=z:C>k&&(C=k)}if(p){var N,O;const D=E==="y"?"width":"height",z=jb.has(Ea(c)),k=d.reference[x]-d.floating[D]+(z&&((N=h.offset)==null?void 0:N[x])||0)+(z?0:j.crossAxis),Q=d.reference[x]+d.reference[D]+(z?0:((O=h.offset)==null?void 0:O[x])||0)-(z?j.crossAxis:0);T<k?T=k:T>Q&&(T=Q)}return{[E]:C,[x]:T}}}},o_=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var i,s;const{placement:c,rects:d,platform:h,elements:m}=l,{apply:y=()=>{},...p}=wa(n,l),b=await h.detectOverflow(l,p),x=Ea(c),E=pi(c),C=qn(c)==="y",{width:T,height:w}=d.floating;let j,N;x==="top"||x==="bottom"?(j=x,N=E===(await(h.isRTL==null?void 0:h.isRTL(m.floating))?"start":"end")?"left":"right"):(N=x,j=E==="end"?"top":"bottom");const O=w-b.top-b.bottom,D=T-b.left-b.right,z=ml(w-b[j],O),k=ml(T-b[N],D),Q=!l.middlewareData.shift;let G=z,W=k;if((i=l.middlewareData.shift)!=null&&i.enabled.x&&(W=D),(s=l.middlewareData.shift)!=null&&s.enabled.y&&(G=O),Q&&!E){const le=ln(b.left,0),oe=ln(b.right,0),ee=ln(b.top,0),ge=ln(b.bottom,0);C?W=T-2*(le!==0||oe!==0?le+oe:ln(b.left,b.right)):G=w-2*(ee!==0||ge!==0?ee+ge:ln(b.top,b.bottom))}await y({...l,availableWidth:W,availableHeight:G});const te=await h.getDimensions(m.floating);return T!==te.width||w!==te.height?{reset:{rects:!0}}:{}}}};function Gc(){return typeof window<"u"}function gi(n){return Nb(n)?(n.nodeName||"").toLowerCase():"#document"}function rn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function Pn(n){var l;return(l=(Nb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function Nb(n){return Gc()?n instanceof Node||n instanceof rn(n).Node:!1}function Rn(n){return Gc()?n instanceof Element||n instanceof rn(n).Element:!1}function Ca(n){return Gc()?n instanceof HTMLElement||n instanceof rn(n).HTMLElement:!1}function lx(n){return!Gc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof rn(n).ShadowRoot}function Gs(n){const{overflow:l,overflowX:i,overflowY:s,display:c}=_n(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+i)&&c!=="inline"&&c!=="contents"}function c_(n){return/^(table|td|th)$/.test(gi(n))}function Yc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const u_=/transform|translate|scale|rotate|perspective|filter/,f_=/paint|layout|strict|content/,kl=n=>!!n&&n!=="none";let Od;function Kh(n){const l=Rn(n)?_n(n):n;return kl(l.transform)||kl(l.translate)||kl(l.scale)||kl(l.rotate)||kl(l.perspective)||!Fh()&&(kl(l.backdropFilter)||kl(l.filter))||u_.test(l.willChange||"")||f_.test(l.contain||"")}function d_(n){let l=pl(n);for(;Ca(l)&&!ci(l);){if(Kh(l))return l;if(Yc(l))return null;l=pl(l)}return null}function Fh(){return Od==null&&(Od=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Od}function ci(n){return/^(html|body|#document)$/.test(gi(n))}function _n(n){return rn(n).getComputedStyle(n)}function Qc(n){return Rn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function pl(n){if(gi(n)==="html")return n;const l=n.assignedSlot||n.parentNode||lx(n)&&n.host||Pn(n);return lx(l)?l.host:l}function Tb(n){const l=pl(n);return ci(l)?n.ownerDocument?n.ownerDocument.body:n.body:Ca(l)&&Gs(l)?l:Tb(l)}function _s(n,l,i){var s;l===void 0&&(l=[]),i===void 0&&(i=!0);const c=Tb(n),d=c===((s=n.ownerDocument)==null?void 0:s.body),h=rn(c);if(d){const m=rh(h);return l.concat(h,h.visualViewport||[],Gs(c)?c:[],m&&i?_s(m):[])}else return l.concat(c,_s(c,[],i))}function rh(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Rb(n){const l=_n(n);let i=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const c=Ca(n),d=c?n.offsetWidth:i,h=c?n.offsetHeight:s,m=_c(i)!==d||_c(s)!==h;return m&&(i=d,s=h),{width:i,height:s,$:m}}function Zh(n){return Rn(n)?n:n.contextElement}function Fr(n){const l=Zh(n);if(!Ca(l))return Gn(1);const i=l.getBoundingClientRect(),{width:s,height:c,$:d}=Rb(l);let h=(d?_c(i.width):i.width)/s,m=(d?_c(i.height):i.height)/c;return(!h||!Number.isFinite(h))&&(h=1),(!m||!Number.isFinite(m))&&(m=1),{x:h,y:m}}const h_=Gn(0);function _b(n){const l=rn(n);return!Fh()||!l.visualViewport?h_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function m_(n,l,i){return l===void 0&&(l=!1),!i||l&&i!==rn(n)?!1:l}function $l(n,l,i,s){l===void 0&&(l=!1),i===void 0&&(i=!1);const c=n.getBoundingClientRect(),d=Zh(n);let h=Gn(1);l&&(s?Rn(s)&&(h=Fr(s)):h=Fr(n));const m=m_(d,i,s)?_b(d):Gn(0);let y=(c.left+m.x)/h.x,p=(c.top+m.y)/h.y,b=c.width/h.x,x=c.height/h.y;if(d){const E=rn(d),C=s&&Rn(s)?rn(s):s;let T=E,w=rh(T);for(;w&&s&&C!==T;){const j=Fr(w),N=w.getBoundingClientRect(),O=_n(w),D=N.left+(w.clientLeft+parseFloat(O.paddingLeft))*j.x,z=N.top+(w.clientTop+parseFloat(O.paddingTop))*j.y;y*=j.x,p*=j.y,b*=j.x,x*=j.y,y+=D,p+=z,T=rn(w),w=rh(T)}}return Oc({width:b,height:x,x:y,y:p})}function Pc(n,l){const i=Qc(n).scrollLeft;return l?l.left+i:$l(Pn(n)).left+i}function Ab(n,l){const i=n.getBoundingClientRect(),s=i.left+l.scrollLeft-Pc(n,i),c=i.top+l.scrollTop;return{x:s,y:c}}function p_(n){let{elements:l,rect:i,offsetParent:s,strategy:c}=n;const d=c==="fixed",h=Pn(s),m=l?Yc(l.floating):!1;if(s===h||m&&d)return i;let y={scrollLeft:0,scrollTop:0},p=Gn(1);const b=Gn(0),x=Ca(s);if((x||!x&&!d)&&((gi(s)!=="body"||Gs(h))&&(y=Qc(s)),x)){const C=$l(s);p=Fr(s),b.x=C.x+s.clientLeft,b.y=C.y+s.clientTop}const E=h&&!x&&!d?Ab(h,y):Gn(0);return{width:i.width*p.x,height:i.height*p.y,x:i.x*p.x-y.scrollLeft*p.x+b.x+E.x,y:i.y*p.y-y.scrollTop*p.y+b.y+E.y}}function g_(n){return Array.from(n.getClientRects())}function y_(n){const l=Pn(n),i=Qc(n),s=n.ownerDocument.body,c=ln(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),d=ln(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let h=-i.scrollLeft+Pc(n);const m=-i.scrollTop;return _n(s).direction==="rtl"&&(h+=ln(l.clientWidth,s.clientWidth)-c),{width:c,height:d,x:h,y:m}}const rx=25;function v_(n,l){const i=rn(n),s=Pn(n),c=i.visualViewport;let d=s.clientWidth,h=s.clientHeight,m=0,y=0;if(c){d=c.width,h=c.height;const b=Fh();(!b||b&&l==="fixed")&&(m=c.offsetLeft,y=c.offsetTop)}const p=Pc(s);if(p<=0){const b=s.ownerDocument,x=b.body,E=getComputedStyle(x),C=b.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,T=Math.abs(s.clientWidth-x.clientWidth-C);T<=rx&&(d-=T)}else p<=rx&&(d+=p);return{width:d,height:h,x:m,y}}function x_(n,l){const i=$l(n,!0,l==="fixed"),s=i.top+n.clientTop,c=i.left+n.clientLeft,d=Ca(n)?Fr(n):Gn(1),h=n.clientWidth*d.x,m=n.clientHeight*d.y,y=c*d.x,p=s*d.y;return{width:h,height:m,x:y,y:p}}function ix(n,l,i){let s;if(l==="viewport")s=v_(n,i);else if(l==="document")s=y_(Pn(n));else if(Rn(l))s=x_(l,i);else{const c=_b(n);s={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return Oc(s)}function Ob(n,l){const i=pl(n);return i===l||!Rn(i)||ci(i)?!1:_n(i).position==="fixed"||Ob(i,l)}function b_(n,l){const i=l.get(n);if(i)return i;let s=_s(n,[],!1).filter(m=>Rn(m)&&gi(m)!=="body"),c=null;const d=_n(n).position==="fixed";let h=d?pl(n):n;for(;Rn(h)&&!ci(h);){const m=_n(h),y=Kh(h);!y&&m.position==="fixed"&&(c=null),(d?!y&&!c:!y&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Gs(h)&&!y&&Ob(n,h))?s=s.filter(b=>b!==h):c=m,h=pl(h)}return l.set(n,s),s}function S_(n){let{element:l,boundary:i,rootBoundary:s,strategy:c}=n;const h=[...i==="clippingAncestors"?Yc(l)?[]:b_(l,this._c):[].concat(i),s],m=ix(l,h[0],c);let y=m.top,p=m.right,b=m.bottom,x=m.left;for(let E=1;E<h.length;E++){const C=ix(l,h[E],c);y=ln(C.top,y),p=ml(C.right,p),b=ml(C.bottom,b),x=ln(C.left,x)}return{width:p-x,height:b-y,x,y}}function w_(n){const{width:l,height:i}=Rb(n);return{width:l,height:i}}function E_(n,l,i){const s=Ca(l),c=Pn(l),d=i==="fixed",h=$l(n,!0,d,l);let m={scrollLeft:0,scrollTop:0};const y=Gn(0);function p(){y.x=Pc(c)}if(s||!s&&!d)if((gi(l)!=="body"||Gs(c))&&(m=Qc(l)),s){const C=$l(l,!0,d,l);y.x=C.x+l.clientLeft,y.y=C.y+l.clientTop}else c&&p();d&&!s&&c&&p();const b=c&&!s&&!d?Ab(c,m):Gn(0),x=h.left+m.scrollLeft-y.x-b.x,E=h.top+m.scrollTop-y.y-b.y;return{x,y:E,width:h.width,height:h.height}}function Md(n){return _n(n).position==="static"}function sx(n,l){if(!Ca(n)||_n(n).position==="fixed")return null;if(l)return l(n);let i=n.offsetParent;return Pn(n)===i&&(i=i.ownerDocument.body),i}function Mb(n,l){const i=rn(n);if(Yc(n))return i;if(!Ca(n)){let c=pl(n);for(;c&&!ci(c);){if(Rn(c)&&!Md(c))return c;c=pl(c)}return i}let s=sx(n,l);for(;s&&c_(s)&&Md(s);)s=sx(s,l);return s&&ci(s)&&Md(s)&&!Kh(s)?i:s||d_(n)||i}const C_=async function(n){const l=this.getOffsetParent||Mb,i=this.getDimensions,s=await i(n.floating);return{reference:E_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function j_(n){return _n(n).direction==="rtl"}const N_={convertOffsetParentRelativeRectToViewportRelativeRect:p_,getDocumentElement:Pn,getClippingRect:S_,getOffsetParent:Mb,getElementRects:C_,getClientRects:g_,getDimensions:w_,getScale:Fr,isElement:Rn,isRTL:j_};function Db(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function T_(n,l){let i=null,s;const c=Pn(n);function d(){var m;clearTimeout(s),(m=i)==null||m.disconnect(),i=null}function h(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),d();const p=n.getBoundingClientRect(),{left:b,top:x,width:E,height:C}=p;if(m||l(),!E||!C)return;const T=gc(x),w=gc(c.clientWidth-(b+E)),j=gc(c.clientHeight-(x+C)),N=gc(b),D={rootMargin:-T+"px "+-w+"px "+-j+"px "+-N+"px",threshold:ln(0,ml(1,y))||1};let z=!0;function k(Q){const G=Q[0].intersectionRatio;if(G!==y){if(!z)return h();G?h(!1,G):s=setTimeout(()=>{h(!1,1e-7)},1e3)}G===1&&!Db(p,n.getBoundingClientRect())&&h(),z=!1}try{i=new IntersectionObserver(k,{...D,root:c.ownerDocument})}catch{i=new IntersectionObserver(k,D)}i.observe(n)}return h(!0),d}function R_(n,l,i,s){s===void 0&&(s={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=s,p=Zh(n),b=c||d?[...p?_s(p):[],...l?_s(l):[]]:[];b.forEach(N=>{c&&N.addEventListener("scroll",i,{passive:!0}),d&&N.addEventListener("resize",i)});const x=p&&m?T_(p,i):null;let E=-1,C=null;h&&(C=new ResizeObserver(N=>{let[O]=N;O&&O.target===p&&C&&l&&(C.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var D;(D=C)==null||D.observe(l)})),i()}),p&&!y&&C.observe(p),l&&C.observe(l));let T,w=y?$l(n):null;y&&j();function j(){const N=$l(n);w&&!Db(w,N)&&i(),w=N,T=requestAnimationFrame(j)}return i(),()=>{var N;b.forEach(O=>{c&&O.removeEventListener("scroll",i),d&&O.removeEventListener("resize",i)}),x==null||x(),(N=C)==null||N.disconnect(),C=null,y&&cancelAnimationFrame(T)}}const __=r_,A_=i_,O_=n_,M_=o_,D_=a_,ox=t_,z_=s_,L_=(n,l,i)=>{const s=new Map,c={platform:N_,...i},d={...c.platform,_c:s};return e_(n,l,{...c,platform:d})};var U_=typeof document<"u",k_=function(){},Cc=U_?v.useLayoutEffect:k_;function Mc(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let i,s,c;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(i=n.length,i!==l.length)return!1;for(s=i;s--!==0;)if(!Mc(n[s],l[s]))return!1;return!0}if(c=Object.keys(n),i=c.length,i!==Object.keys(l).length)return!1;for(s=i;s--!==0;)if(!{}.hasOwnProperty.call(l,c[s]))return!1;for(s=i;s--!==0;){const d=c[s];if(!(d==="_owner"&&n.$$typeof)&&!Mc(n[d],l[d]))return!1}return!0}return n!==n&&l!==l}function zb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function cx(n,l){const i=zb(n);return Math.round(l*i)/i}function Dd(n){const l=v.useRef(n);return Cc(()=>{l.current=n}),l}function H_(n){n===void 0&&(n={});const{placement:l="bottom",strategy:i="absolute",middleware:s=[],platform:c,elements:{reference:d,floating:h}={},transform:m=!0,whileElementsMounted:y,open:p}=n,[b,x]=v.useState({x:0,y:0,strategy:i,placement:l,middlewareData:{},isPositioned:!1}),[E,C]=v.useState(s);Mc(E,s)||C(s);const[T,w]=v.useState(null),[j,N]=v.useState(null),O=v.useCallback(J=>{J!==Q.current&&(Q.current=J,w(J))},[]),D=v.useCallback(J=>{J!==G.current&&(G.current=J,N(J))},[]),z=d||T,k=h||j,Q=v.useRef(null),G=v.useRef(null),W=v.useRef(b),te=y!=null,le=Dd(y),oe=Dd(c),ee=Dd(p),ge=v.useCallback(()=>{if(!Q.current||!G.current)return;const J={placement:l,strategy:i,middleware:E};oe.current&&(J.platform=oe.current),L_(Q.current,G.current,J).then(ie=>{const ye={...ie,isPositioned:ee.current!==!1};ce.current&&!Mc(W.current,ye)&&(W.current=ye,Hs.flushSync(()=>{x(ye)}))})},[E,l,i,oe,ee]);Cc(()=>{p===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,x(J=>({...J,isPositioned:!1})))},[p]);const ce=v.useRef(!1);Cc(()=>(ce.current=!0,()=>{ce.current=!1}),[]),Cc(()=>{if(z&&(Q.current=z),k&&(G.current=k),z&&k){if(le.current)return le.current(z,k,ge);ge()}},[z,k,ge,le,te]);const de=v.useMemo(()=>({reference:Q,floating:G,setReference:O,setFloating:D}),[O,D]),U=v.useMemo(()=>({reference:z,floating:k}),[z,k]),Z=v.useMemo(()=>{const J={position:i,left:0,top:0};if(!U.floating)return J;const ie=cx(U.floating,b.x),ye=cx(U.floating,b.y);return m?{...J,transform:"translate("+ie+"px, "+ye+"px)",...zb(U.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:ie,top:ye}},[i,m,U.floating,b.x,b.y]);return v.useMemo(()=>({...b,update:ge,refs:de,elements:U,floatingStyles:Z}),[b,ge,de,U,Z])}const B_=n=>{function l(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:n,fn(i){const{element:s,padding:c}=typeof n=="function"?n(i):n;return s&&l(s)?s.current!=null?ox({element:s.current,padding:c}).fn(i):{}:s?ox({element:s,padding:c}).fn(i):{}}}},q_=(n,l)=>{const i=__(n);return{name:i.name,fn:i.fn,options:[n,l]}},V_=(n,l)=>{const i=A_(n);return{name:i.name,fn:i.fn,options:[n,l]}},G_=(n,l)=>({fn:z_(n).fn,options:[n,l]}),Y_=(n,l)=>{const i=O_(n);return{name:i.name,fn:i.fn,options:[n,l]}},Q_=(n,l)=>{const i=M_(n);return{name:i.name,fn:i.fn,options:[n,l]}},P_=(n,l)=>{const i=D_(n);return{name:i.name,fn:i.fn,options:[n,l]}},X_=(n,l)=>{const i=B_(n);return{name:i.name,fn:i.fn,options:[n,l]}};var K_="Arrow",Lb=v.forwardRef((n,l)=>{const{children:i,width:s=10,height:c=5,...d}=n;return u.jsx(Ke.svg,{...d,ref:l,width:s,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?i:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lb.displayName=K_;var F_=Lb;function Z_(n){const[l,i]=v.useState(void 0);return Dt(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let h,m;if("borderBoxSize"in d){const y=d.borderBoxSize,p=Array.isArray(y)?y[0]:y;h=p.inlineSize,m=p.blockSize}else h=n.offsetWidth,m=n.offsetHeight;i({width:h,height:m})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else i(void 0)},[n]),l}var Ih="Popper",[Ub,kb]=Hc(Ih),[I_,Hb]=Ub(Ih),Bb=n=>{const{__scopePopper:l,children:i}=n,[s,c]=v.useState(null);return u.jsx(I_,{scope:l,anchor:s,onAnchorChange:c,children:i})};Bb.displayName=Ih;var qb="PopperAnchor",Vb=v.forwardRef((n,l)=>{const{__scopePopper:i,virtualRef:s,...c}=n,d=Hb(qb,i),h=v.useRef(null),m=it(l,h),y=v.useRef(null);return v.useEffect(()=>{const p=y.current;y.current=(s==null?void 0:s.current)||h.current,p!==y.current&&d.onAnchorChange(y.current)}),s?null:u.jsx(Ke.div,{...c,ref:m})});Vb.displayName=qb;var $h="PopperContent",[$_,J_]=Ub($h),Gb=v.forwardRef((n,l)=>{var ne,Se,Ne,Le,De,Ue;const{__scopePopper:i,side:s="bottom",sideOffset:c=0,align:d="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:y=!0,collisionBoundary:p=[],collisionPadding:b=0,sticky:x="partial",hideWhenDetached:E=!1,updatePositionStrategy:C="optimized",onPlaced:T,...w}=n,j=Hb($h,i),[N,O]=v.useState(null),D=it(l,Ct=>O(Ct)),[z,k]=v.useState(null),Q=Z_(z),G=(Q==null?void 0:Q.width)??0,W=(Q==null?void 0:Q.height)??0,te=s+(d!=="center"?"-"+d:""),le=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},oe=Array.isArray(p)?p:[p],ee=oe.length>0,ge={padding:le,boundary:oe.filter(eA),altBoundary:ee},{refs:ce,floatingStyles:de,placement:U,isPositioned:Z,middlewareData:J}=H_({strategy:"fixed",placement:te,whileElementsMounted:(...Ct)=>R_(...Ct,{animationFrame:C==="always"}),elements:{reference:j.anchor},middleware:[q_({mainAxis:c+W,alignmentAxis:h}),y&&V_({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?G_():void 0,...ge}),y&&Y_({...ge}),Q_({...ge,apply:({elements:Ct,rects:pt,availableWidth:Xn,availableHeight:Kn})=>{const{width:vl,height:Ys}=pt.reference,ja=Ct.floating.style;ja.setProperty("--radix-popper-available-width",`${Xn}px`),ja.setProperty("--radix-popper-available-height",`${Kn}px`),ja.setProperty("--radix-popper-anchor-width",`${vl}px`),ja.setProperty("--radix-popper-anchor-height",`${Ys}px`)}}),z&&X_({element:z,padding:m}),tA({arrowWidth:G,arrowHeight:W}),E&&P_({strategy:"referenceHidden",...ge})]}),[ie,ye]=Pb(U),A=Zl(T);Dt(()=>{Z&&(A==null||A())},[Z,A]);const P=(ne=J.arrow)==null?void 0:ne.x,F=(Se=J.arrow)==null?void 0:Se.y,I=((Ne=J.arrow)==null?void 0:Ne.centerOffset)!==0,[$,he]=v.useState();return Dt(()=>{N&&he(window.getComputedStyle(N).zIndex)},[N]),u.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:Z?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[(Le=J.transformOrigin)==null?void 0:Le.x,(De=J.transformOrigin)==null?void 0:De.y].join(" "),...((Ue=J.hide)==null?void 0:Ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:u.jsx($_,{scope:i,placedSide:ie,onArrowChange:k,arrowX:P,arrowY:F,shouldHideArrow:I,children:u.jsx(Ke.div,{"data-side":ie,"data-align":ye,...w,ref:D,style:{...w.style,animation:Z?void 0:"none"}})})})});Gb.displayName=$h;var Yb="PopperArrow",W_={top:"bottom",right:"left",bottom:"top",left:"right"},Qb=v.forwardRef(function(l,i){const{__scopePopper:s,...c}=l,d=J_(Yb,s),h=W_[d.placedSide];return u.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[h]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:u.jsx(F_,{...c,ref:i,style:{...c.style,display:"block"}})})});Qb.displayName=Yb;function eA(n){return n!==null}var tA=n=>({name:"transformOrigin",options:n,fn(l){var j,N,O;const{placement:i,rects:s,middlewareData:c}=l,h=((j=c.arrow)==null?void 0:j.centerOffset)!==0,m=h?0:n.arrowWidth,y=h?0:n.arrowHeight,[p,b]=Pb(i),x={start:"0%",center:"50%",end:"100%"}[b],E=(((N=c.arrow)==null?void 0:N.x)??0)+m/2,C=(((O=c.arrow)==null?void 0:O.y)??0)+y/2;let T="",w="";return p==="bottom"?(T=h?x:`${E}px`,w=`${-y}px`):p==="top"?(T=h?x:`${E}px`,w=`${s.floating.height+y}px`):p==="right"?(T=`${-y}px`,w=h?x:`${C}px`):p==="left"&&(T=`${s.floating.width+y}px`,w=h?x:`${C}px`),{data:{x:T,y:w}}}});function Pb(n){const[l,i="center"]=n.split("-");return[l,i]}var nA=Bb,aA=Vb,lA=Gb,rA=Qb;function iA(n){const l=v.useRef({value:n,previous:n});return v.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}var Xb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sA="VisuallyHidden",oA=v.forwardRef((n,l)=>u.jsx(Ke.span,{...n,ref:l,style:{...Xb,...n.style}}));oA.displayName=sA;var cA=[" ","Enter","ArrowUp","ArrowDown"],uA=[" ","Enter"],Jl="Select",[Xc,Kc,fA]=qR(Jl),[yi]=Hc(Jl,[fA,kb]),Fc=kb(),[dA,gl]=yi(Jl),[hA,mA]=yi(Jl),Kb=n=>{const{__scopeSelect:l,children:i,open:s,defaultOpen:c,onOpenChange:d,value:h,defaultValue:m,onValueChange:y,dir:p,name:b,autoComplete:x,disabled:E,required:C,form:T}=n,w=Fc(l),[j,N]=v.useState(null),[O,D]=v.useState(null),[z,k]=v.useState(!1),Q=GR(p),[G,W]=Wd({prop:s,defaultProp:c??!1,onChange:d,caller:Jl}),[te,le]=Wd({prop:h,defaultProp:m,onChange:y,caller:Jl}),oe=v.useRef(null),ee=j?T||!!j.closest("form"):!0,[ge,ce]=v.useState(new Set),de=Array.from(ge).map(U=>U.props.value).join(";");return u.jsx(nA,{...w,children:u.jsxs(dA,{required:C,scope:l,trigger:j,onTriggerChange:N,valueNode:O,onValueNodeChange:D,valueNodeHasChildren:z,onValueNodeHasChildrenChange:k,contentId:Xr(),value:te,onValueChange:le,open:G,onOpenChange:W,dir:Q,triggerPointerDownPosRef:oe,disabled:E,children:[u.jsx(Xc.Provider,{scope:l,children:u.jsx(hA,{scope:n.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{ce(Z=>new Set(Z).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{ce(Z=>{const J=new Set(Z);return J.delete(U),J})},[]),children:i})}),ee?u.jsxs(h1,{"aria-hidden":!0,required:C,tabIndex:-1,name:b,autoComplete:x,value:te,onChange:U=>le(U.target.value),disabled:E,form:T,children:[te===void 0?u.jsx("option",{value:""}):null,Array.from(ge)]},de):null]})})};Kb.displayName=Jl;var Fb="SelectTrigger",Zb=v.forwardRef((n,l)=>{const{__scopeSelect:i,disabled:s=!1,...c}=n,d=Fc(i),h=gl(Fb,i),m=h.disabled||s,y=it(l,h.onTriggerChange),p=Kc(i),b=v.useRef("touch"),[x,E,C]=p1(w=>{const j=p().filter(D=>!D.disabled),N=j.find(D=>D.value===h.value),O=g1(j,w,N);O!==void 0&&h.onValueChange(O.value)}),T=w=>{m||(h.onOpenChange(!0),C()),w&&(h.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return u.jsx(aA,{asChild:!0,...d,children:u.jsx(Ke.button,{type:"button",role:"combobox","aria-controls":h.contentId,"aria-expanded":h.open,"aria-required":h.required,"aria-autocomplete":"none",dir:h.dir,"data-state":h.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":m1(h.value)?"":void 0,...c,ref:y,onClick:$e(c.onClick,w=>{w.currentTarget.focus(),b.current!=="mouse"&&T(w)}),onPointerDown:$e(c.onPointerDown,w=>{b.current=w.pointerType;const j=w.target;j.hasPointerCapture(w.pointerId)&&j.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(T(w),w.preventDefault())}),onKeyDown:$e(c.onKeyDown,w=>{const j=x.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&E(w.key),!(j&&w.key===" ")&&cA.includes(w.key)&&(T(),w.preventDefault())})})})});Zb.displayName=Fb;var Ib="SelectValue",$b=v.forwardRef((n,l)=>{const{__scopeSelect:i,className:s,style:c,children:d,placeholder:h="",...m}=n,y=gl(Ib,i),{onValueNodeHasChildrenChange:p}=y,b=d!==void 0,x=it(l,y.onValueNodeChange);return Dt(()=>{p(b)},[p,b]),u.jsx(Ke.span,{...m,ref:x,style:{pointerEvents:"none"},children:m1(y.value)?u.jsx(u.Fragment,{children:h}):d})});$b.displayName=Ib;var pA="SelectIcon",Jb=v.forwardRef((n,l)=>{const{__scopeSelect:i,children:s,...c}=n;return u.jsx(Ke.span,{"aria-hidden":!0,...c,ref:l,children:s||"▼"})});Jb.displayName=pA;var gA="SelectPortal",Wb=n=>u.jsx(Bh,{asChild:!0,...n});Wb.displayName=gA;var Wl="SelectContent",e1=v.forwardRef((n,l)=>{const i=gl(Wl,n.__scopeSelect),[s,c]=v.useState();if(Dt(()=>{c(new DocumentFragment)},[]),!i.open){const d=s;return d?Hs.createPortal(u.jsx(t1,{scope:n.__scopeSelect,children:u.jsx(Xc.Slot,{scope:n.__scopeSelect,children:u.jsx("div",{children:n.children})})}),d):null}return u.jsx(n1,{...n,ref:l})});e1.displayName=Wl;var jn=10,[t1,yl]=yi(Wl),yA="SelectContentImpl",vA=Rs("SelectContent.RemoveScroll"),n1=v.forwardRef((n,l)=>{const{__scopeSelect:i,position:s="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:h,side:m,sideOffset:y,align:p,alignOffset:b,arrowPadding:x,collisionBoundary:E,collisionPadding:C,sticky:T,hideWhenDetached:w,avoidCollisions:j,...N}=n,O=gl(Wl,i),[D,z]=v.useState(null),[k,Q]=v.useState(null),G=it(l,ne=>z(ne)),[W,te]=v.useState(null),[le,oe]=v.useState(null),ee=Kc(i),[ge,ce]=v.useState(!1),de=v.useRef(!1);v.useEffect(()=>{if(D)return Z0(D)},[D]),q0();const U=v.useCallback(ne=>{const[Se,...Ne]=ee().map(Ue=>Ue.ref.current),[Le]=Ne.slice(-1),De=document.activeElement;for(const Ue of ne)if(Ue===De||(Ue==null||Ue.scrollIntoView({block:"nearest"}),Ue===Se&&k&&(k.scrollTop=0),Ue===Le&&k&&(k.scrollTop=k.scrollHeight),Ue==null||Ue.focus(),document.activeElement!==De))return},[ee,k]),Z=v.useCallback(()=>U([W,D]),[U,W,D]);v.useEffect(()=>{ge&&Z()},[ge,Z]);const{onOpenChange:J,triggerPointerDownPosRef:ie}=O;v.useEffect(()=>{if(D){let ne={x:0,y:0};const Se=Le=>{var De,Ue;ne={x:Math.abs(Math.round(Le.pageX)-(((De=ie.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((Ue=ie.current)==null?void 0:Ue.y)??0))}},Ne=Le=>{ne.x<=10&&ne.y<=10?Le.preventDefault():D.contains(Le.target)||J(!1),document.removeEventListener("pointermove",Se),ie.current=null};return ie.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[D,J,ie]),v.useEffect(()=>{const ne=()=>J(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[J]);const[ye,A]=p1(ne=>{const Se=ee().filter(De=>!De.disabled),Ne=Se.find(De=>De.ref.current===document.activeElement),Le=g1(Se,ne,Ne);Le&&setTimeout(()=>Le.ref.current.focus())}),P=v.useCallback((ne,Se,Ne)=>{const Le=!de.current&&!Ne;(O.value!==void 0&&O.value===Se||Le)&&(te(ne),Le&&(de.current=!0))},[O.value]),F=v.useCallback(()=>D==null?void 0:D.focus(),[D]),I=v.useCallback((ne,Se,Ne)=>{const Le=!de.current&&!Ne;(O.value!==void 0&&O.value===Se||Le)&&oe(ne)},[O.value]),$=s==="popper"?ih:a1,he=$===ih?{side:m,sideOffset:y,align:p,alignOffset:b,arrowPadding:x,collisionBoundary:E,collisionPadding:C,sticky:T,hideWhenDetached:w,avoidCollisions:j}:{};return u.jsx(t1,{scope:i,content:D,viewport:k,onViewportChange:Q,itemRefCallback:P,selectedItem:W,onItemLeave:F,itemTextRefCallback:I,focusSelectedItem:Z,selectedItemText:le,position:s,isPositioned:ge,searchRef:ye,children:u.jsx(qh,{as:vA,allowPinchZoom:!0,children:u.jsx(Hh,{asChild:!0,trapped:O.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:$e(c,ne=>{var Se;(Se=O.trigger)==null||Se.focus({preventScroll:!0}),ne.preventDefault()}),children:u.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:u.jsx($,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ne=>ne.preventDefault(),...N,...he,onPlaced:()=>ce(!0),ref:G,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:$e(N.onKeyDown,ne=>{const Se=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!Se&&ne.key.length===1&&A(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let Le=ee().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const De=ne.target,Ue=Le.indexOf(De);Le=Le.slice(Ue+1)}setTimeout(()=>U(Le)),ne.preventDefault()}})})})})})})});n1.displayName=yA;var xA="SelectItemAlignedPosition",a1=v.forwardRef((n,l)=>{const{__scopeSelect:i,onPlaced:s,...c}=n,d=gl(Wl,i),h=yl(Wl,i),[m,y]=v.useState(null),[p,b]=v.useState(null),x=it(l,G=>b(G)),E=Kc(i),C=v.useRef(!1),T=v.useRef(!0),{viewport:w,selectedItem:j,selectedItemText:N,focusSelectedItem:O}=h,D=v.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&p&&w&&j&&N){const G=d.trigger.getBoundingClientRect(),W=p.getBoundingClientRect(),te=d.valueNode.getBoundingClientRect(),le=N.getBoundingClientRect();if(d.dir!=="rtl"){const De=le.left-W.left,Ue=te.left-De,Ct=G.left-Ue,pt=G.width+Ct,Xn=Math.max(pt,W.width),Kn=window.innerWidth-jn,vl=Jv(Ue,[jn,Math.max(jn,Kn-Xn)]);m.style.minWidth=pt+"px",m.style.left=vl+"px"}else{const De=W.right-le.right,Ue=window.innerWidth-te.right-De,Ct=window.innerWidth-G.right-Ue,pt=G.width+Ct,Xn=Math.max(pt,W.width),Kn=window.innerWidth-jn,vl=Jv(Ue,[jn,Math.max(jn,Kn-Xn)]);m.style.minWidth=pt+"px",m.style.right=vl+"px"}const oe=E(),ee=window.innerHeight-jn*2,ge=w.scrollHeight,ce=window.getComputedStyle(p),de=parseInt(ce.borderTopWidth,10),U=parseInt(ce.paddingTop,10),Z=parseInt(ce.borderBottomWidth,10),J=parseInt(ce.paddingBottom,10),ie=de+U+ge+J+Z,ye=Math.min(j.offsetHeight*5,ie),A=window.getComputedStyle(w),P=parseInt(A.paddingTop,10),F=parseInt(A.paddingBottom,10),I=G.top+G.height/2-jn,$=ee-I,he=j.offsetHeight/2,ne=j.offsetTop+he,Se=de+U+ne,Ne=ie-Se;if(Se<=I){const De=oe.length>0&&j===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ue=p.clientHeight-w.offsetTop-w.offsetHeight,Ct=Math.max($,he+(De?F:0)+Ue+Z),pt=Se+Ct;m.style.height=pt+"px"}else{const De=oe.length>0&&j===oe[0].ref.current;m.style.top="0px";const Ct=Math.max(I,de+w.offsetTop+(De?P:0)+he)+Ne;m.style.height=Ct+"px",w.scrollTop=Se-I+w.offsetTop}m.style.margin=`${jn}px 0`,m.style.minHeight=ye+"px",m.style.maxHeight=ee+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[E,d.trigger,d.valueNode,m,p,w,j,N,d.dir,s]);Dt(()=>D(),[D]);const[z,k]=v.useState();Dt(()=>{p&&k(window.getComputedStyle(p).zIndex)},[p]);const Q=v.useCallback(G=>{G&&T.current===!0&&(D(),O==null||O(),T.current=!1)},[D,O]);return u.jsx(SA,{scope:i,contentWrapper:m,shouldExpandOnScrollRef:C,onScrollButtonChange:Q,children:u.jsx("div",{ref:y,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:u.jsx(Ke.div,{...c,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});a1.displayName=xA;var bA="SelectPopperPosition",ih=v.forwardRef((n,l)=>{const{__scopeSelect:i,align:s="start",collisionPadding:c=jn,...d}=n,h=Fc(i);return u.jsx(lA,{...h,...d,ref:l,align:s,collisionPadding:c,style:{boxSizing:"border-box",...d.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)"}})});ih.displayName=bA;var[SA,Jh]=yi(Wl,{}),sh="SelectViewport",l1=v.forwardRef((n,l)=>{const{__scopeSelect:i,nonce:s,...c}=n,d=yl(sh,i),h=Jh(sh,i),m=it(l,d.onViewportChange),y=v.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Xc.Slot,{scope:i,children:u.jsx(Ke.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:$e(c.onScroll,p=>{const b=p.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:E}=h;if(E!=null&&E.current&&x){const C=Math.abs(y.current-b.scrollTop);if(C>0){const T=window.innerHeight-jn*2,w=parseFloat(x.style.minHeight),j=parseFloat(x.style.height),N=Math.max(w,j);if(N<T){const O=N+C,D=Math.min(T,O),z=O-D;x.style.height=D+"px",x.style.bottom==="0px"&&(b.scrollTop=z>0?z:0,x.style.justifyContent="flex-end")}}}y.current=b.scrollTop})})})]})});l1.displayName=sh;var r1="SelectGroup",[wA,EA]=yi(r1),CA=v.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=Xr();return u.jsx(wA,{scope:i,id:c,children:u.jsx(Ke.div,{role:"group","aria-labelledby":c,...s,ref:l})})});CA.displayName=r1;var i1="SelectLabel",jA=v.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=EA(i1,i);return u.jsx(Ke.div,{id:c.id,...s,ref:l})});jA.displayName=i1;var Dc="SelectItem",[NA,s1]=yi(Dc),o1=v.forwardRef((n,l)=>{const{__scopeSelect:i,value:s,disabled:c=!1,textValue:d,...h}=n,m=gl(Dc,i),y=yl(Dc,i),p=m.value===s,[b,x]=v.useState(d??""),[E,C]=v.useState(!1),T=it(l,O=>{var D;return(D=y.itemRefCallback)==null?void 0:D.call(y,O,s,c)}),w=Xr(),j=v.useRef("touch"),N=()=>{c||(m.onValueChange(s),m.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 u.jsx(NA,{scope:i,value:s,disabled:c,textId:w,isSelected:p,onItemTextChange:v.useCallback(O=>{x(D=>D||((O==null?void 0:O.textContent)??"").trim())},[]),children:u.jsx(Xc.ItemSlot,{scope:i,value:s,disabled:c,textValue:b,children:u.jsx(Ke.div,{role:"option","aria-labelledby":w,"data-highlighted":E?"":void 0,"aria-selected":p&&E,"data-state":p?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...h,ref:T,onFocus:$e(h.onFocus,()=>C(!0)),onBlur:$e(h.onBlur,()=>C(!1)),onClick:$e(h.onClick,()=>{j.current!=="mouse"&&N()}),onPointerUp:$e(h.onPointerUp,()=>{j.current==="mouse"&&N()}),onPointerDown:$e(h.onPointerDown,O=>{j.current=O.pointerType}),onPointerMove:$e(h.onPointerMove,O=>{var D;j.current=O.pointerType,c?(D=y.onItemLeave)==null||D.call(y):j.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$e(h.onPointerLeave,O=>{var D;O.currentTarget===document.activeElement&&((D=y.onItemLeave)==null||D.call(y))}),onKeyDown:$e(h.onKeyDown,O=>{var z;((z=y.searchRef)==null?void 0:z.current)!==""&&O.key===" "||(uA.includes(O.key)&&N(),O.key===" "&&O.preventDefault())})})})})});o1.displayName=Dc;var bs="SelectItemText",c1=v.forwardRef((n,l)=>{const{__scopeSelect:i,className:s,style:c,...d}=n,h=gl(bs,i),m=yl(bs,i),y=s1(bs,i),p=mA(bs,i),[b,x]=v.useState(null),E=it(l,N=>x(N),y.onItemTextChange,N=>{var O;return(O=m.itemTextRefCallback)==null?void 0:O.call(m,N,y.value,y.disabled)}),C=b==null?void 0:b.textContent,T=v.useMemo(()=>u.jsx("option",{value:y.value,disabled:y.disabled,children:C},y.value),[y.disabled,y.value,C]),{onNativeOptionAdd:w,onNativeOptionRemove:j}=p;return Dt(()=>(w(T),()=>j(T)),[w,j,T]),u.jsxs(u.Fragment,{children:[u.jsx(Ke.span,{id:y.textId,...d,ref:E}),y.isSelected&&h.valueNode&&!h.valueNodeHasChildren?Hs.createPortal(d.children,h.valueNode):null]})});c1.displayName=bs;var u1="SelectItemIndicator",f1=v.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n;return s1(u1,i).isSelected?u.jsx(Ke.span,{"aria-hidden":!0,...s,ref:l}):null});f1.displayName=u1;var oh="SelectScrollUpButton",TA=v.forwardRef((n,l)=>{const i=yl(oh,n.__scopeSelect),s=Jh(oh,n.__scopeSelect),[c,d]=v.useState(!1),h=it(l,s.onScrollButtonChange);return Dt(()=>{if(i.viewport&&i.isPositioned){let m=function(){const p=y.scrollTop>0;d(p)};const y=i.viewport;return m(),y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)}},[i.viewport,i.isPositioned]),c?u.jsx(d1,{...n,ref:h,onAutoScroll:()=>{const{viewport:m,selectedItem:y}=i;m&&y&&(m.scrollTop=m.scrollTop-y.offsetHeight)}}):null});TA.displayName=oh;var ch="SelectScrollDownButton",RA=v.forwardRef((n,l)=>{const i=yl(ch,n.__scopeSelect),s=Jh(ch,n.__scopeSelect),[c,d]=v.useState(!1),h=it(l,s.onScrollButtonChange);return Dt(()=>{if(i.viewport&&i.isPositioned){let m=function(){const p=y.scrollHeight-y.clientHeight,b=Math.ceil(y.scrollTop)<p;d(b)};const y=i.viewport;return m(),y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)}},[i.viewport,i.isPositioned]),c?u.jsx(d1,{...n,ref:h,onAutoScroll:()=>{const{viewport:m,selectedItem:y}=i;m&&y&&(m.scrollTop=m.scrollTop+y.offsetHeight)}}):null});RA.displayName=ch;var d1=v.forwardRef((n,l)=>{const{__scopeSelect:i,onAutoScroll:s,...c}=n,d=yl("SelectScrollButton",i),h=v.useRef(null),m=Kc(i),y=v.useCallback(()=>{h.current!==null&&(window.clearInterval(h.current),h.current=null)},[]);return v.useEffect(()=>()=>y(),[y]),Dt(()=>{var b;const p=m().find(x=>x.ref.current===document.activeElement);(b=p==null?void 0:p.ref.current)==null||b.scrollIntoView({block:"nearest"})},[m]),u.jsx(Ke.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:$e(c.onPointerDown,()=>{h.current===null&&(h.current=window.setInterval(s,50))}),onPointerMove:$e(c.onPointerMove,()=>{var p;(p=d.onItemLeave)==null||p.call(d),h.current===null&&(h.current=window.setInterval(s,50))}),onPointerLeave:$e(c.onPointerLeave,()=>{y()})})}),_A="SelectSeparator",AA=v.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n;return u.jsx(Ke.div,{"aria-hidden":!0,...s,ref:l})});AA.displayName=_A;var uh="SelectArrow",OA=v.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=Fc(i),d=gl(uh,i),h=yl(uh,i);return d.open&&h.position==="popper"?u.jsx(rA,{...c,...s,ref:l}):null});OA.displayName=uh;var MA="SelectBubbleInput",h1=v.forwardRef(({__scopeSelect:n,value:l,...i},s)=>{const c=v.useRef(null),d=it(s,c),h=iA(l);return v.useEffect(()=>{const m=c.current;if(!m)return;const y=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(y,"value").set;if(h!==l&&b){const x=new Event("change",{bubbles:!0});b.call(m,l),m.dispatchEvent(x)}},[h,l]),u.jsx(Ke.select,{...i,style:{...Xb,...i.style},ref:d,defaultValue:l})});h1.displayName=MA;function m1(n){return n===""||n===void 0}function p1(n){const l=Zl(n),i=v.useRef(""),s=v.useRef(0),c=v.useCallback(h=>{const m=i.current+h;l(m),(function y(p){i.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>y(""),1e3))})(m)},[l]),d=v.useCallback(()=>{i.current="",window.clearTimeout(s.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(s.current),[]),[i,c,d]}function g1(n,l,i){const c=l.length>1&&Array.from(l).every(p=>p===l[0])?l[0]:l,d=i?n.indexOf(i):-1;let h=DA(n,Math.max(d,0));c.length===1&&(h=h.filter(p=>p!==i));const y=h.find(p=>p.textValue.toLowerCase().startsWith(c.toLowerCase()));return y!==i?y:void 0}function DA(n,l){return n.map((i,s)=>n[(l+s)%n.length])}var zA=Kb,y1=Zb,LA=$b,UA=Jb,kA=Wb,v1=e1,HA=l1,x1=o1,BA=c1,qA=f1;const Es=zA,Cs=LA,Zr=v.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(y1,{ref:s,className:je("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 placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...i,children:[l,u.jsx(UA,{asChild:!0,children:u.jsx(Uc,{className:"h-4 w-4 opacity-50"})})]}));Zr.displayName=y1.displayName;const Ir=v.forwardRef(({className:n,children:l,position:i="popper",...s},c)=>u.jsx(kA,{children:u.jsx(v1,{ref:c,className:je("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-card text-card-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",i==="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",n),position:i,...s,children:u.jsx(HA,{className:je("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l})})}));Ir.displayName=v1.displayName;const Hn=v.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(x1,{ref:s,className:je("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",n),...i,children:[u.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(qA,{children:u.jsx(GC,{className:"h-4 w-4"})})}),u.jsx(BA,{children:l})]}));Hn.displayName=x1.displayName;const VA=15e3,GA=zh,YA={succeeded:Ah,pending:kc,processing:Mt,failed:Oh,blocked:Mv,poisoned:Mv},QA={succeeded:"text-emerald-500",pending:"text-muted-foreground",processing:"text-amber-500",failed:"text-red-500",blocked:"text-red-400",poisoned:"text-red-600"},PA={succeeded:"bg-emerald-500",pending:"bg-muted-foreground/30",processing:"bg-amber-400",failed:"bg-red-500",blocked:"bg-red-400",poisoned:"bg-red-600"};function fh(n){if(!n)return"--";try{return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return n}}function b1(n){return n.charAt(0).toUpperCase()+n.slice(1)}function XA({stage:n,output:l}){if(!l)return null;let i;try{i=JSON.parse(l)}catch{return null}return u.jsxs("div",{className:"mt-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-xs space-y-1",children:[n==="extraction"&&u.jsxs(u.Fragment,{children:[i.observations!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Observations:"})," ",u.jsxs("span",{className:"font-medium",children:[String(i.observations)," extracted"]})]}),i.title&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Title:"})," ",u.jsx("span",{className:"font-medium",children:String(i.title)})]}),i.summary_tokens!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Summary:"})," ",String(i.summary_tokens)," tokens via ",String(i.model??"unknown")]})]}),n==="embedding"&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Embedded:"})," ",String(i.dimensions??"?")," dimensions via ",String(i.model??"unknown")]}),n==="consolidation"&&u.jsxs(u.Fragment,{children:[Array.isArray(i.superseded)&&i.superseded.length>0?u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Superseded:"})," ",String(i.superseded.length)," older spores"]}):u.jsx("div",{className:"text-muted-foreground",children:"No similar spores found"}),i.candidates_evaluated!==void 0&&Number(i.candidates_evaluated)>0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Candidates evaluated:"})," ",String(i.candidates_evaluated)]})]}),n==="digest"&&!!i.included_in_cycle&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Included in cycle"})," ",u.jsx("span",{className:"font-mono",children:String(i.included_in_cycle).slice(0,8)}),Array.isArray(i.tiers_generated)&&u.jsxs("span",{children:[" — ",String(i.tiers_generated.length)," tiers generated"]})]})]})}function KA({stageStatus:n,isLast:l,itemId:i,itemType:s,onRetried:c}){const[d,h]=v.useState(!1),[m,y]=v.useState(!1),p=YA[n.status]??PC,b=QA[n.status]??"text-muted-foreground",x=PA[n.status]??"bg-muted-foreground/30",E=n.status==="poisoned"||n.status==="failed",C=async()=>{h(!0);try{await bn(`/pipeline/retry/${encodeURIComponent(i)}`,{type:s,stage:n.stage}),c()}finally{h(!1)}},T=async()=>{y(!0);try{await bn(`/pipeline/skip/${encodeURIComponent(i)}`,{type:s,stage:n.stage}),c()}finally{y(!1)}};return u.jsxs("div",{className:"flex gap-3",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx(p,{className:je("h-5 w-5 shrink-0",b,n.status==="processing"&&"animate-spin")}),!l&&u.jsx("div",{className:je("mt-1 w-0.5 flex-1 min-h-[24px]",x)})]}),u.jsxs("div",{className:"flex-1 pb-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium",children:b1(n.stage)}),u.jsx(dt,{variant:n.status==="succeeded"?"default":n.status==="pending"?"secondary":"destructive",className:"text-xs",children:n.status}),n.attempt>1&&u.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["attempt ",n.attempt]}),E&&u.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u.jsxs(Je,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",disabled:d||m,onClick:C,children:[d?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Retry"]}),u.jsxs(Je,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs text-muted-foreground",disabled:d||m,onClick:T,children:[m?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(ij,{className:"h-3 w-3"}),"Skip"]})]})]}),u.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[n.started_at&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(w0,{className:"h-3 w-3"}),fh(n.started_at)]}),n.completed_at&&u.jsxs("span",{children:["completed ",fh(n.completed_at)]})]}),n.error_message&&u.jsxs("div",{className:"mt-2 rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs",children:[n.error_type&&u.jsxs("span",{className:"font-medium text-destructive",children:["[",n.error_type,"]"]})," ",u.jsx("span",{className:"text-destructive/80",children:n.error_message})]}),n.status==="succeeded"&&u.jsx(XA,{stage:n.stage,output:n.output})]})]})}function FA({history:n}){const[l,i]=v.useState(!1);return n.length===0?null:u.jsxs("div",{className:"mt-2 border-t border-border pt-2",children:[u.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>i(!l),children:[l?u.jsx(Uc,{className:"h-3 w-3"}):u.jsx(_h,{className:"h-3 w-3"}),n.length," transition",n.length!==1?"s":""]}),l&&u.jsx("div",{className:"mt-2 max-h-64 overflow-y-auto space-y-1",children:n.map(s=>u.jsxs("div",{className:"flex items-start gap-3 rounded-md bg-muted/30 px-3 py-1.5 text-xs",children:[u.jsxs("span",{className:"shrink-0 font-mono text-muted-foreground",children:["#",s.id]}),u.jsx("span",{className:"font-medium",children:b1(s.stage)}),u.jsx(dt,{variant:s.status==="succeeded"?"default":s.status==="pending"?"secondary":"destructive",className:"text-[10px] px-1.5 py-0",children:s.status}),s.attempt>1&&u.jsxs("span",{className:"font-mono text-muted-foreground",children:["att.",s.attempt]}),u.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:fh(s.created_at)}),s.error_message&&u.jsx("span",{className:"basis-full mt-0.5 text-destructive/70 break-all",children:s.error_message})]},s.id))})]})}function ZA({sessionId:n,onDone:l}){const[i,s]=v.useState(!1),c=async()=>{s(!0);try{await bn("/reprocess",{session:n}),l()}finally{s(!1)}};return u.jsxs(Je,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs",disabled:i,onClick:c,children:[i?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(nl,{className:"h-3 w-3"}),"Reprocess"]})}function IA({itemId:n,itemType:l}){const{data:i,isLoading:s,isError:c,refetch:d}=er({queryKey:["pipeline-item-detail",n,l],queryFn:({signal:y})=>sn(`/pipeline/items/${encodeURIComponent(n)}?type=${encodeURIComponent(l)}`,{signal:y}),staleTime:VA});if(s)return u.jsxs("div",{className:"flex items-center gap-2 py-4 px-4 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading item details..."]});if(c||!i)return u.jsx("div",{className:"py-4 px-4 text-sm text-muted-foreground",children:"Failed to load item details"});const h=new Map(i.stages.map(y=>[y.stage,y])),m=GA.filter(y=>h.has(y)).map(y=>h.get(y));return u.jsxs("div",{className:"space-y-3 rounded-md border border-border bg-card/50 px-4 py-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:"ID:"})," ",u.jsx("span",{className:"font-mono",children:i.id})]}),u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:"Type:"})," ",u.jsx(dt,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:i.type})]})]}),i.type==="session"&&u.jsx(ZA,{sessionId:i.id,onDone:()=>d()})]}),u.jsx("div",{className:"mt-3",children:m.map((y,p)=>u.jsx(KA,{stageStatus:y,isLast:p===m.length-1,itemId:i.id,itemType:i.type,onRetried:()=>d()},y.stage))}),u.jsx(FA,{history:i.history})]})}const gs=50,Nt="all",$A=zh,JA=["pending","processing","succeeded","failed","blocked","poisoned"],WA=["session","spore","artifact"],S1={capture:"Capture",extraction:"Extraction",embedding:"Embedding",consolidation:"Consolidation",digest:"Digest"},e4={succeeded:"default",pending:"secondary",processing:"outline",failed:"destructive",blocked:"destructive",poisoned:"destructive"},t4={succeeded:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/30",pending:"",processing:"border-amber-400/50 text-amber-600 dark:text-amber-400",failed:"",blocked:"bg-red-500/10",poisoned:"bg-red-600/15 text-red-700 dark:text-red-400 border-red-600/30"},n4={session:p0,spore:sj,artifact:ej},ux=12;function a4(n){return n.length>ux?n.slice(0,ux)+"...":n}function l4({stage:n,status:l,type:i,onStageChange:s,onStatusChange:c,onTypeChange:d}){return u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs(Es,{value:n,onValueChange:s,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Stage"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All stages"}),$A.map(h=>u.jsx(Hn,{value:h,children:S1[h]??h},h))]})]}),u.jsxs(Es,{value:l,onValueChange:c,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Status"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All statuses"}),JA.map(h=>u.jsx(Hn,{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]}),u.jsxs(Es,{value:i,onValueChange:d,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Type"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All types"}),WA.map(h=>u.jsx(Hn,{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]})]})}function r4({total:n,offset:l,pageSize:i,onPrevious:s,onNext:c}){const d=Math.floor(l/i)+1,h=Math.max(1,Math.ceil(n/i));return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-xs text-muted-foreground",children:[n," item",n!==1?"s":""]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(Je,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",disabled:l===0,onClick:s,children:u.jsx(m0,{className:"h-4 w-4"})}),u.jsxs("span",{className:"text-xs text-muted-foreground px-2",children:[d," / ",h]}),u.jsx(Je,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",disabled:l+i>=n,onClick:c,children:u.jsx(_h,{className:"h-4 w-4"})})]})]})}function i4({item:n,isExpanded:l,onToggle:i}){const s=n4[n.item_type]??p0,c=e4[n.status]??"secondary",d=t4[n.status]??"";return u.jsxs("div",{className:"border-b border-border last:border-b-0",children:[u.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent/50",onClick:i,children:[l?u.jsx(YC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):u.jsx(Uc,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),u.jsx(s,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),u.jsx("span",{className:"font-mono text-xs text-foreground",title:n.id,children:a4(n.id)}),u.jsx("span",{className:"text-xs text-muted-foreground",children:S1[n.stage]??n.stage}),u.jsx(dt,{variant:c,className:je("ml-auto text-[10px] px-1.5 py-0",d),children:n.status}),n.attempt>1&&u.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["x",n.attempt]})]}),!l&&n.error_message&&u.jsx("div",{className:"px-3 pb-2 pl-[60px]",children:u.jsx("p",{className:"truncate text-xs text-destructive/70",children:n.error_message})}),l&&u.jsx("div",{className:"px-3 pb-3 pl-8",children:u.jsx(IA,{itemId:n.id,itemType:n.item_type})})]})}function s4({onRetried:n}){const[l,i]=v.useState(!1),s=async()=>{i(!0);try{await bn("/pipeline/retry-all",{}),n()}finally{i(!1)}};return u.jsxs(Je,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",disabled:l,onClick:s,children:[l?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Retry All Poisoned"]})}function o4(){const[n,l]=pC(),[i,s]=v.useState(n.get("stage")??Nt),[c,d]=v.useState(n.get("status")??Nt),[h,m]=v.useState(n.get("type")??Nt),[y,p]=v.useState(0),[b,x]=v.useState(null),E=v.useCallback((k,Q,G)=>{G(Q),p(0),x(null),l(W=>{const te=new URLSearchParams(W);return Q===Nt?te.delete(k):te.set(k,Q),te},{replace:!0})},[l]),C=new URLSearchParams;i!==Nt&&C.set("stage",i),c!==Nt&&C.set("status",c),h!==Nt&&C.set("type",h),C.set("limit",String(gs)),C.set("offset",String(y));const{data:T,isLoading:w,isError:j,refetch:N}=qs({queryKey:["pipeline-items",i,c,h,y],queryFn:({signal:k})=>sn(`/pipeline/items?${C.toString()}`,{signal:k}),refetchInterval:hi.STATS,pollCategory:"standard"});v.useEffect(()=>{const k=n.get("stage"),Q=n.get("status"),G=n.get("type");(k??Nt)!==i&&s(k??Nt),(Q??Nt)!==c&&d(Q??Nt),(G??Nt)!==h&&m(G??Nt)},[n]);const O=(T==null?void 0:T.items)??[],D=(T==null?void 0:T.total)??0,z=O.some(k=>k.status==="poisoned");return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsx(l4,{stage:i,status:c,type:h,onStageChange:k=>E("stage",k,s),onStatusChange:k=>E("status",k,d),onTypeChange:k=>E("type",k,m)}),z&&u.jsx(s4,{onRetried:()=>N()})]}),u.jsxs("div",{className:"rounded-md border border-border",children:[w&&u.jsxs("div",{className:"flex items-center justify-center gap-2 py-8 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading work items..."]}),j&&u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Failed to load work items"}),!w&&!j&&O.length===0&&u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No items match the current filters"}),!w&&O.length>0&&u.jsx("div",{children:O.map(k=>{const Q=`${k.id}-${k.item_type}-${k.stage}`;return u.jsx(i4,{item:k,isExpanded:b===Q,onToggle:()=>x(G=>G===Q?null:Q)},Q)})})]}),D>gs&&u.jsx(r4,{total:D,offset:y,pageSize:gs,onPrevious:()=>p(k=>Math.max(0,k-gs)),onNext:()=>p(k=>k+gs)})]})}const c4={llm:"LLM (Extraction)",embedding:"Embedding","digest-llm":"LLM (Digest & Consolidation)"},u4={closed:b0,open:Mh,"half-open":rj},f4={closed:"default",open:"destructive","half-open":"outline"},d4={closed:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/30",open:"","half-open":"border-amber-400/50 text-amber-600 dark:text-amber-400"},h4={closed:"border-border",open:"border-red-500/40","half-open":"border-amber-400/40"};function m4(n){if(!n)return null;const l=new Date(n).getTime()-Date.now();if(l<=0)return null;const i=Math.ceil(l/1e3);return i<60?`${i}s`:`${Math.ceil(i/60)}m`}function p4(n){if(n.state==="closed")return null;if(!n.last_error)return n.state==="open"?"Circuit is open. Reset to resume processing.":"Circuit is testing. Next request will determine state.";const l=n.last_error.toLowerCase();return l.includes("timeout")||l.includes("timed out")?"Provider may be overloaded. Check model server responsiveness before resetting.":l.includes("connection")||l.includes("econnrefused")?"Provider unreachable. Verify the server is running and the URL is correct.":l.includes("401")||l.includes("403")||l.includes("auth")?"Authentication failure. Check your API key or credentials.":l.includes("rate")||l.includes("429")?"Rate limited. Wait for cooldown or switch to a different provider.":n.state==="open"?"Review the error and reset when ready to retry.":"Half-open: next request will probe the provider."}function g4({circuit:n,onReset:l}){const[i,s]=v.useState(!1),c=u4[n.state]??b0,d=f4[n.state]??"secondary",h=d4[n.state]??"",m=h4[n.state]??"border-border",y=n.state==="open"?m4(n.opens_at):null,p=p4(n),b=async()=>{s(!0);try{await bn(`/pipeline/circuit/${encodeURIComponent(n.provider_role)}/reset`,{}),l()}finally{s(!1)}};return u.jsxs("div",{className:je("rounded-lg border p-4 transition-colors",m),children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(c,{className:je("h-5 w-5 shrink-0",n.state==="closed"&&"text-emerald-500",n.state==="open"&&"text-red-500",n.state==="half-open"&&"text-amber-500")}),u.jsxs("div",{children:[u.jsx("span",{className:"text-sm font-medium",children:c4[n.provider_role]??n.provider_role}),u.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[u.jsx(dt,{variant:d,className:je("text-[10px] px-1.5 py-0",h),children:n.state}),n.failure_count>0&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[n.failure_count," failure",n.failure_count!==1?"s":""]}),y&&u.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["cooldown: ",y]})]})]})]}),n.state!=="closed"&&u.jsxs(Je,{variant:"outline",size:"sm",className:"shrink-0 h-7 gap-1.5 text-xs",disabled:i,onClick:b,children:[i?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Reset"]})]}),n.last_error&&u.jsx("p",{className:"mt-2 text-xs text-destructive/80 break-words",children:n.last_error}),p&&u.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground italic",children:p})]})}function y4(){const{data:n,isLoading:l,isError:i,refetch:s}=qs({queryKey:["pipeline-circuits"],queryFn:({signal:c})=>sn("/pipeline/circuits",{signal:c}),refetchInterval:hi.STATS,pollCategory:"standard"});return l?u.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading circuit breakers..."]}):i||!n?u.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"Circuit breaker data unavailable"}):n.length===0?u.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"No circuit breakers registered yet. They appear after the first pipeline tick."}):u.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:n.map(c=>u.jsx(g4,{circuit:c,onReset:()=>s()},c.provider_role))})}const v4=15e3,x4=[1500,3e3,5e3,7500,1e4];function b4(n){return n<1e3?`${n}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${(n/6e4).toFixed(1)}m`}function S4(){const[n,l]=v.useState(!1),[i,s]=v.useState("force"),[c,d]=v.useState("3000"),{data:h,isLoading:m}=er({queryKey:["digest-health"],queryFn:({signal:b})=>sn("/pipeline/digest-health",{signal:b}),refetchInterval:v4});if(m||!h)return null;const y=h.substrate_threshold>0?Math.min(100,Math.round(h.substrate_ready/h.substrate_threshold*100)):100;Math.max(0,h.substrate_threshold-h.substrate_ready);const p=async()=>{l(!0);try{i==="tier"?await bn("/digest",{tier:Number(c)}):await bn("/pipeline/digest/force",{})}finally{l(!1)}};return u.jsxs("div",{className:"space-y-4",children:[h.cycle_in_progress&&u.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-600 dark:text-amber-400",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),u.jsx("span",{className:"font-medium",children:"Digest cycle in progress"})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[u.jsx(FC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),u.jsx("div",{className:"h-2 flex-1 min-w-[80px] rounded-full bg-muted",children:u.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:`${y}%`}})}),u.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[h.substrate_ready,"/",h.substrate_threshold]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(dt,{variant:h.metabolism_state==="active"?"default":"secondary",className:"text-xs",children:[u.jsx(Rh,{className:"mr-1 h-3 w-3"}),h.metabolism_state]}),h.digest_ready&&u.jsxs(dt,{variant:"default",className:"text-xs",children:[u.jsx(dj,{className:"mr-1 h-3 w-3"}),"Ready"]})]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Je,{variant:i==="force"?"default":"outline",size:"sm",onClick:()=>s("force"),children:"Full Cycle"}),u.jsx(Je,{variant:i==="tier"?"default":"outline",size:"sm",onClick:()=>s("tier"),children:"Single Tier"}),i==="tier"&&u.jsxs(Es,{value:c,onValueChange:d,children:[u.jsx(Zr,{className:"h-8 w-24",children:u.jsx(Cs,{})}),u.jsx(Ir,{children:x4.map(b=>u.jsxs(Hn,{value:String(b),children:["T",b]},b))})]}),u.jsx(Je,{variant:"outline",size:"sm",disabled:n,onClick:p,children:n?"Running...":i==="tier"?`Run T${c}`:"Force Digest"})]}),h.last_cycle&&u.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[u.jsx(kc,{className:"h-3 w-3"}),u.jsx("span",{children:u.jsx("span",{className:"text-foreground",children:L0(h.last_cycle.timestamp)})}),u.jsxs("span",{children:[h.last_cycle.substrate_count," notes"]}),u.jsx("span",{children:b4(h.last_cycle.duration_ms)}),u.jsxs("span",{children:["T[",h.last_cycle.tiers_generated.join(", "),"]"]}),u.jsx("span",{className:"truncate",children:h.last_cycle.model})]})]})}function w1(n){return er({queryKey:["progress",n],queryFn:({signal:l})=>sn(`/progress/${n}`,{signal:l}),enabled:!!n,refetchInterval:l=>{const i=l.state.data;return(i==null?void 0:i.status)==="completed"||(i==null?void 0:i.status)==="failed"?!1:hi.PROGRESS}})}const w4=4e3;function E1({label:n,endpoint:l,body:i,description:s,icon:c,onComplete:d,disabled:h}){const[m,y]=v.useState("idle"),[p,b]=v.useState(null),[x,E]=v.useState(null),{data:C}=w1(p);v.useEffect(()=>{C&&(C.status==="completed"?(y("complete"),E(C.message??"Done"),b(null),d==null||d(C.result)):C.status==="failed"&&(y("failed"),E(C.message??"Failed"),b(null)))},[C,d]),v.useEffect(()=>{if(m!=="complete"&&m!=="failed")return;const O=setTimeout(()=>{y("idle"),E(null)},w4);return()=>clearTimeout(O)},[m]);const T=v.useCallback(async()=>{y("submitting");try{const O=await bn(l,i);O.token?(b(O.token),y("tracking")):(y("complete"),E("Done"),d==null||d(O))}catch{y("failed"),E("Request failed")}},[l,i,d]),w=m==="submitting"||m==="tracking",j=m==="tracking"&&(C==null?void 0:C.percent)!=null?C.percent:null,N=m==="tracking"?C==null?void 0:C.message:null;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs(Je,{variant:"outline",size:"sm",className:je("gap-2 transition-colors",m==="complete"&&"border-primary/50 text-primary",m==="failed"&&"border-destructive/50 text-destructive"),disabled:w||h,onClick:T,children:[w?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):m==="complete"?u.jsx(Ah,{className:"h-4 w-4"}):m==="failed"?u.jsx(Oh,{className:"h-4 w-4"}):c,w?N??"Running...":x??n]}),j!==null&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[Math.round(j),"%"]})]}),w&&j!==null&&u.jsx("div",{className:"mt-2 h-1.5 w-full rounded-full bg-muted overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:`${j}%`}})}),s&&m==="idle"&&u.jsx("p",{className:"text-xs text-muted-foreground",children:s})]})}const E4=6e3;function C4(){const[n,l]=v.useState("idle"),[i,s]=v.useState(null),[c,d]=v.useState(null),[h,m]=v.useState("idle"),[y,p]=v.useState(null),[b,x]=v.useState(null),{data:E}=w1(y);v.useEffect(()=>{E&&(E.status==="completed"?(m("complete"),x(E.message??"Curation complete"),p(null),s(null),l("idle")):E.status==="failed"&&(m("failed"),x(E.message??"Curation failed"),p(null)))},[E]),v.useEffect(()=>{if(h!=="complete"&&h!=="failed")return;const N=setTimeout(()=>{m("idle"),x(null)},E4);return()=>clearTimeout(N)},[h]);const C=v.useCallback(async()=>{l("loading"),d(null);try{const N=await bn("/curate",{dry_run:!0});s(N),l("loaded")}catch{d("Failed to load curation preview"),l("error")}},[]),T=v.useCallback(async()=>{m("submitting");try{const N=await bn("/curate",{dry_run:!1});N.token?(p(N.token),m("tracking")):(m("complete"),x("Curation complete"))}catch{m("failed"),x("Curation request failed")}},[]),w=h==="submitting"||h==="tracking",j=h==="tracking"&&(E==null?void 0:E.percent)!=null?E.percent:null;return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs(Je,{variant:"outline",size:"sm",className:"gap-2",disabled:n==="loading"||w,onClick:C,children:[n==="loading"?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):u.jsx(XC,{className:"h-4 w-4"}),n==="loading"?"Scanning...":"Preview"]}),u.jsxs(Je,{variant:"outline",size:"sm",className:je("gap-2 transition-colors",h==="complete"&&"border-primary/50 text-primary",h==="failed"&&"border-destructive/50 text-destructive"),disabled:w||n==="loading",onClick:T,children:[w?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):h==="complete"?u.jsx(Ah,{className:"h-4 w-4"}):h==="failed"?u.jsx(Oh,{className:"h-4 w-4"}):u.jsx(y0,{className:"h-4 w-4"}),w?(E==null?void 0:E.message)??"Curating...":b??"Execute"]}),j!==null&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[Math.round(j),"%"]})]}),w&&j!==null&&u.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-secondary",children:u.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:`${j}%`}})}),n==="error"&&c&&u.jsx("p",{className:"text-sm text-destructive",children:c}),n==="loaded"&&i&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"rounded-md border border-border bg-background p-3 text-sm space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Spores scanned"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:i.scanned})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Clusters evaluated"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:i.clustersEvaluated})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Would supersede"}),u.jsx(dt,{variant:i.superseded>0?"destructive":"secondary",className:"font-mono text-xs",children:i.superseded})]})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:i.superseded===0?"No duplicate spores found.":`${i.superseded} spore${i.superseded===1?"":"s"} would be superseded. Run Execute to apply.`})]})]})}const j4=3e4,ys="__all__",fx="all",vs="date",yc="failed",zd="index-only";function N4(){const[n,l]=v.useState(fx),[i,s]=v.useState(ys),{data:c}=er({queryKey:["sessions"],queryFn:({signal:x})=>sn("/sessions",{signal:x}),staleTime:j4}),d=(c==null?void 0:c.dates)??[],h=(c==null?void 0:c.sessions)??[],m=h.filter(x=>x.hasFailed).length,y=v.useMemo(()=>{switch(n){case vs:return i!==ys?{date:i}:{};case yc:return{failed:!0};case zd:return{index_only:!0};default:return{}}},[n,i]),p=v.useMemo(()=>n===vs&&i!==ys?h.filter(x=>x.date===i).length:n===yc?m:h.length,[n,i,h,m]),b=v.useMemo(()=>{switch(n){case vs:return i!==ys?`Reprocess ${i}`:"Reprocess All";case yc:return`Reprocess ${m} Failed`;case zd:return"Re-index Only (no LLM)";default:return"Reprocess All"}},[n,i,m]);return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-2",children:[[fx,"All Sessions"],[vs,"By Date"],[yc,"Failed Only"],[zd,"Index Only"]].map(([x,E])=>u.jsx("button",{type:"button",onClick:()=>l(x),className:`rounded-md border px-3 py-1 text-xs transition-colors ${n===x?"border-primary bg-primary text-primary-foreground":"border-input bg-transparent text-muted-foreground hover:text-foreground"}`,children:E},x))}),n===vs&&d.length>0&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm text-muted-foreground",children:"Date:"}),u.jsxs(Es,{value:i,onValueChange:s,children:[u.jsx(Zr,{className:"w-40",children:u.jsx(Cs,{})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:ys,children:"All dates"}),d.map(x=>u.jsx(Hn,{value:x,children:x},x))]})]})]}),u.jsx(E1,{label:b,endpoint:"/reprocess",body:y,icon:u.jsx(kc,{className:"h-4 w-4"}),description:`Re-extract observations and regenerate summaries for ${p} session(s).`}),u.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Sessions:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:h.length})]}),m>0&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Dh,{className:"h-3.5 w-3.5 text-yellow-500"}),u.jsx("span",{className:"text-muted-foreground",children:"Failed:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs text-yellow-600 dark:text-yellow-400",children:m})]})]})]})}function T4(){const{data:n,isLoading:l,isError:i,error:s}=Vs();return u.jsx(Uh,{isLoading:l,error:i?s instanceof Error?s:new Error("Unable to reach daemon"):null,loadingText:"Connecting to daemon...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(g0,{className:"h-5 w-5 text-primary"}),u.jsx("h1",{className:"text-xl font-semibold",children:"Mycelium"})]}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Pipeline integrity and processing health"})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsx(At,{className:"text-sm",children:"Pipeline Flow"}),u.jsx(pa,{children:"Live status of items progressing through the processing pipeline."})]}),u.jsx(Ot,{children:u.jsx(z0,{})})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(h0,{className:"h-4 w-4 text-primary"}),"Digest"]}),u.jsx(pa,{children:"Substrate accumulation, metabolism state, and cycle activity."})]}),u.jsx(Ot,{children:u.jsx(S4,{})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Mh,{className:"h-4 w-4 text-primary"}),"Circuit Breakers"]}),u.jsx(pa,{children:"Per-provider circuit breaker state and controls. Reset open circuits to resume processing."})]}),u.jsx(Ot,{children:u.jsx(y4,{})})]})]}),u.jsxs(Rt,{id:"work-items",children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx($C,{className:"h-4 w-4 text-primary"}),"Work Items"]}),u.jsx(pa,{children:"Filter and inspect individual pipeline items. Click a row to see full stage history."})]}),u.jsx(Ot,{children:u.jsx(o4,{})})]}),u.jsxs("section",{children:[u.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Utilities"}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(S0,{className:"h-4 w-4 text-primary"}),"Curation"]}),u.jsx(pa,{children:"Find and consolidate duplicate spores in the vault. Preview shows which pairs would be merged; execute performs the consolidation."})]}),u.jsx(Ot,{children:u.jsx(C4,{})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(nl,{className:"h-4 w-4 text-primary"}),"Rebuild Index"]}),u.jsx(pa,{children:"Reindex all vault notes for full-text search and vector embeddings."})]}),u.jsx(Ot,{children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(E1,{label:"Rebuild",endpoint:"/rebuild",icon:u.jsx(nl,{className:"h-4 w-4"}),description:"Rebuilds FTS5 and vector indexes from all vault notes."}),u.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"FTS entries:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:n.index.fts_entries})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Vectors:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:n.index.vector_count})]})]})]})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(kc,{className:"h-4 w-4 text-primary"}),"Reprocess"]}),u.jsx(pa,{children:"Re-extract observations and regenerate summaries for past sessions. Useful after LLM configuration changes or processing failures."})]}),u.jsx(Ot,{children:u.jsx(N4,{})})]})]})]})]})})}const R4=["debug","info","warn","error"],_4=200,dx=2e3,A4=40,hx={debug:0,info:1,warn:2,error:3},O4={debug:"border-transparent bg-muted text-muted-foreground",info:"border-transparent bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",warn:"border-transparent bg-amber-500/15 text-amber-600 dark:text-amber-400",error:"border-transparent bg-red-500/15 text-red-600 dark:text-red-400"};function M4(n){const l=new Date(n),i=String(l.getHours()).padStart(2,"0"),s=String(l.getMinutes()).padStart(2,"0"),c=String(l.getSeconds()).padStart(2,"0");return`${i}:${s}:${c}`}function D4(n){return n.scrollHeight-n.scrollTop-n.clientHeight<=A4}function z4(){const[n,l]=v.useState([]),[i,s]=v.useState(void 0),[c,d]=v.useState("debug"),[h,m]=v.useState(""),[y,p]=v.useState(!0),[b,x]=v.useState(!1),E=v.useRef(null),C=v.useRef(y);C.current=y;const T=v.useRef(i);T.current=i;const{data:w}=qs({queryKey:["logs"],queryFn:({signal:z})=>{const k=new URLSearchParams({limit:String(_4)});return T.current&&k.set("since",T.current),sn(`/logs?${k.toString()}`,{signal:z})},refetchInterval:hi.LOGS,pollCategory:"standard"});v.useEffect(()=>{w!=null&&w.entries.length&&(l(z=>{let k;if(w.cursor_reset){const Q=new Set(z.map(W=>`${W.timestamp}|${W.message}`)),G=w.entries.filter(W=>!Q.has(`${W.timestamp}|${W.message}`));k=G.length?[...z,...G]:z}else k=[...z,...w.entries];return k.length>dx?k.slice(-dx):k}),s(w.cursor),C.current||x(!0))},[w]),v.useEffect(()=>{!y||!E.current||(E.current.scrollTop=E.current.scrollHeight,x(!1))},[n,y]);const j=v.useCallback(()=>{const z=E.current;z&&(D4(z)?(p(!0),x(!1)):p(!1))},[]),N=v.useCallback(()=>{E.current&&(E.current.scrollTop=E.current.scrollHeight,p(!0),x(!1))},[]),O=v.useCallback(()=>{l([]),x(!1)},[]),D=v.useMemo(()=>{const z=hx[c],k=h.trim().toLowerCase();return n.filter(Q=>!(hx[Q.level]<z||k&&!Q.message.toLowerCase().includes(k)))},[n,c,h]);return u.jsxs("div",{className:"flex h-full flex-col",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-card px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-2 mr-2",children:[u.jsx(v0,{className:"h-4 w-4 text-primary"}),u.jsx("span",{className:"text-sm font-semibold",children:"Logs"})]}),u.jsx("div",{className:"flex items-center gap-1",children:R4.map(z=>u.jsx(Je,{size:"sm",variant:c===z?"default":"outline",className:"h-7 px-2 text-xs capitalize",onClick:()=>d(z),children:z},z))}),u.jsx(ze,{className:"h-7 w-48 text-xs",placeholder:"Filter messages...",value:h,onChange:z=>m(z.target.value)}),u.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u.jsxs(Je,{size:"sm",variant:y?"default":"outline",className:"h-7 gap-1.5 px-2 text-xs",onClick:()=>{y?p(!1):N()},title:y?"Pause auto-scroll":"Resume auto-scroll",children:[y?u.jsx(tj,{className:"h-3 w-3"}):u.jsx(y0,{className:"h-3 w-3"}),y?"Pause":"Resume"]}),u.jsxs(Je,{size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2 text-xs text-muted-foreground",onClick:O,title:"Clear log entries",children:[u.jsx(cj,{className:"h-3 w-3"}),"Clear"]})]})]}),u.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[u.jsx("div",{ref:E,onScroll:j,className:"h-full overflow-y-auto font-mono text-xs",children:D.length===0?u.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No log entries"}):u.jsx("table",{className:"w-full border-collapse",children:u.jsx("tbody",{children:D.map((z,k)=>u.jsx(L4,{entry:z},`${z.timestamp}-${k}`))})})}),b&&!y&&u.jsxs("button",{type:"button",onClick:N,className:je("absolute bottom-4 left-1/2 -translate-x-1/2","flex items-center gap-1.5 rounded-full border border-border","bg-card px-3 py-1.5 text-xs font-medium shadow-md","text-muted-foreground transition-colors hover:text-foreground"),children:[u.jsx(qC,{className:"h-3 w-3"}),"New entries below"]})]})]})}function L4({entry:n}){return u.jsxs("tr",{className:"border-b border-border/40 hover:bg-accent/30 transition-colors",children:[u.jsx("td",{className:"whitespace-nowrap py-1 pl-4 pr-3 text-muted-foreground/70 align-top w-[68px]",children:M4(n.timestamp)}),u.jsx("td",{className:"whitespace-nowrap py-1 pr-3 align-top w-[54px]",children:u.jsx(dt,{className:je("px-1.5 py-0 text-[10px] font-medium uppercase",O4[n.level]),children:n.level})}),u.jsx("td",{className:"whitespace-nowrap py-1 pr-3 text-muted-foreground align-top w-[120px] truncate max-w-[120px]",children:n.category}),u.jsx("td",{className:"py-1 pr-4 text-foreground align-top break-words",children:n.message})]})}function U4(){return u.jsx(qE,{children:u.jsxs(Yr,{element:u.jsx(gN,{}),children:[u.jsx(Yr,{path:"/",element:u.jsx(qN,{})}),u.jsx(Yr,{path:"/configuration",element:u.jsx(BR,{})}),u.jsx(Yr,{path:"/mycelium",element:u.jsx(T4,{})}),u.jsx(Yr,{path:"/logs",element:u.jsx(z4,{})})]})})}const k4=new Tw({defaultOptions:{queries:{staleTime:xj}}});nw.createRoot(document.getElementById("root")).render(u.jsx(ma.StrictMode,{children:u.jsx(CC,{children:u.jsx(OC,{children:u.jsx(LC,{children:u.jsx(Rw,{client:k4,children:u.jsx(fC,{children:u.jsx(U4,{})})})})})})}));
369
+ For more information, see https://radix-ui.com/primitives/docs/components/${l.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(i))},[i,n]),null},pR="DialogDescriptionWarning",gR=({contentRef:n,descriptionId:l})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ub(pR).contentName}}.`;return y.useEffect(()=>{var d;const c=(d=n.current)==null?void 0:d.getAttribute("aria-describedby");l&&c&&(document.getElementById(l)||console.warn(s))},[s,n,l]),null},yR=$0,vR=eb,fb=tb,db=nb,hb=lb,mb=ib,xR=ob;const bR=yR,SR=vR,pb=y.forwardRef(({className:n,...l},i)=>u.jsx(fb,{ref:i,className:je("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",n),...l}));pb.displayName=fb.displayName;const gb=y.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(SR,{children:[u.jsx(pb,{}),u.jsxs(db,{ref:s,className:je("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-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",n),...i,children:[l,u.jsxs(xR,{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:[u.jsx(fj,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gb.displayName=db.displayName;function yb({className:n,...l}){return u.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",n),...l})}yb.displayName="DialogHeader";function vb({className:n,...l}){return u.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...l})}vb.displayName="DialogFooter";const xb=y.forwardRef(({className:n,...l},i)=>u.jsx(hb,{ref:i,className:je("text-lg font-semibold leading-none tracking-tight",n),...l}));xb.displayName=hb.displayName;const bb=y.forwardRef(({className:n,...l},i)=>u.jsx(mb,{ref:i,className:je("text-sm text-muted-foreground",n),...l}));bb.displayName=mb.displayName;const Sb=["ollama","lm-studio","anthropic","openai-compatible"],wR=["ollama","lm-studio","openai-compatible"],Ad={ollama:"http://localhost:11434","lm-studio":"http://localhost:1234","openai-compatible":void 0},ER=["debug","info","warn","error"],CR=["git","obsidian-sync","manual"],jR=[{value:2048,label:"2K"},{value:4096,label:"4K"},{value:8192,label:"8K"},{value:16384,label:"16K"},{value:32768,label:"32K"},{value:65536,label:"64K"},{value:131072,label:"128K"}],wb=jR.map(n=>({value:String(n.value),label:`${n.label} (${n.value.toLocaleString()})`})),NR=["Stage 1 (warm)","Stage 2 (cooling)","Stage 3 (cold)"],TR=["Seconds between cycles after initial activity subsides","Seconds between cycles as activity continues to drop","Seconds between cycles just before dormancy"],RR={metabolism:{active_interval:900,cooldown_intervals:[1800,3600,7200],dormancy_threshold:14400}};function ve({label:n,description:l,children:i}){return u.jsxs("div",{className:"grid gap-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-foreground",children:n}),l&&u.jsx("p",{className:"text-xs text-muted-foreground",children:l}),i]})}function Ec({checked:n,onChange:l}){return u.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>l(!n),className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${n?"bg-primary":"bg-muted"}`,children:u.jsx("span",{className:`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-200 ${n?"translate-x-5":"translate-x-0"}`})})}function hl({value:n,onChange:l,options:i,disabled:s,className:c}){return u.jsx("select",{value:n,onChange:d=>l(d.target.value),disabled:s,className:je("w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50",c),children:i.map(d=>{const h=typeof d=="string"?d:d.value,m=typeof d=="string"?d:d.label;return u.jsx("option",{value:h,children:m},h)})})}const ft=(n,l)=>i=>{const s=parseInt(i.target.value,10);isNaN(s)||n(l,s)};function Wa(n,l){return JSON.stringify(n)!==JSON.stringify(l)}function tr({title:n,description:l,isDirty:i,defaultOpen:s=!1,children:c}){const[d,h]=y.useState(s);return u.jsxs(Rt,{children:[u.jsxs(_t,{className:"cursor-pointer select-none",onClick:()=>h(m=>!m),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(At,{className:"text-base",children:n}),i&&u.jsx("span",{className:"h-2 w-2 rounded-full bg-primary",title:"Unsaved changes"})]}),u.jsx(Uc,{className:je("h-4 w-4 text-muted-foreground transition-transform duration-200",!d&&"-rotate-90")})]}),l&&u.jsx(pa,{children:l})]}),d&&u.jsx(Ot,{children:c})]})}const ze=y.forwardRef(({className:n,type:l,...i},s)=>u.jsx("input",{type:l,className:je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm 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",n),ref:s,...i}));ze.displayName="Input";const Eb=new Set(["openai-compatible"]);function _R(n,l,i){const s=n?Eb.has(n):!1;return er({queryKey:["models",n,l,i],queryFn:({signal:d})=>{const h=new URLSearchParams({provider:n});return l&&h.set("base_url",l),i&&h.set("type",i),sn(`/models?${h.toString()}`,{signal:d})},enabled:!!n&&(!s||!!l),staleTime:bj})}const AR=500;function nh({provider:n,baseUrl:l,value:i,onChange:s,placeholder:c,modelType:d}){const m=(n?Eb.has(n):!1)&&!l,[v,g]=y.useState(l);y.useEffect(()=>{const C=setTimeout(()=>g(l),AR);return()=>clearTimeout(C)},[l]);const{data:x,isLoading:b}=_R(n,v,d),E=(x==null?void 0:x.models)??[];return y.useEffect(()=>{if(b||m||E.length===0||E.includes(i))return;const T=E.find(w=>w.startsWith(i+":")||i.startsWith(w+":")||w===i)??E[0];T!==i&&s(T)},[E,b,m,i,s]),u.jsxs("select",{value:i,onChange:C=>s(C.target.value),disabled:b||!n||m,className:"w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50",children:[m&&u.jsx("option",{value:"",children:c??"Enter base URL first"}),!m&&b&&u.jsx("option",{value:i,children:"Loading models..."}),!m&&!b&&!n&&u.jsx("option",{value:"",children:c??"Select provider first"}),!m&&!b&&n&&E.length===0&&u.jsx("option",{value:"",children:c??"No models available"}),!m&&!b&&E.map(C=>u.jsx("option",{value:C,children:C},C))]})}function OR({intelligence:n,isDirty:l,updateLlm:i,updateEmbedding:s}){return u.jsx(tr,{title:"Intelligence",description:"LLM and embedding provider configuration",isDirty:l,defaultOpen:!0,children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"LLM"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Which LLM service to use for processing sessions",children:u.jsx(hl,{value:n.llm.provider,onChange:c=>i("provider",c),options:[...Sb]})}),n.llm.provider==="openai-compatible"&&u.jsx(ve,{label:"Base URL",description:"OpenAI-compatible API endpoint (e.g., http://localhost:8080/v1)",children:u.jsx(ze,{value:n.llm.base_url??"",onChange:c=>i("base_url",c.target.value),placeholder:"http://localhost:8080/v1"})}),u.jsx(ve,{label:"Model",description:"The model for extraction, summaries, and titles — speed matters more than depth",children:u.jsx(nh,{provider:n.llm.provider,baseUrl:n.llm.base_url,value:n.llm.model,onChange:c=>i("model",c),modelType:"llm"})}),u.jsx(ve,{label:"Context Window",description:"How much text the model can read per operation",children:u.jsx(hl,{value:String(n.llm.context_window),onChange:c=>i("context_window",parseInt(c,10)),options:wb})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Embedding"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Which service generates vector embeddings for search",children:u.jsx(hl,{value:n.embedding.provider,onChange:c=>s("provider",c),options:[...wR]})}),n.embedding.provider==="openai-compatible"&&u.jsx(ve,{label:"Base URL",description:"OpenAI-compatible embedding API endpoint",children:u.jsx(ze,{value:n.embedding.base_url??"",onChange:c=>s("base_url",c.target.value),placeholder:"http://localhost:8080/v1"})}),u.jsx(ve,{label:"Model",description:"The embedding model for semantic search and similarity",children:u.jsx(nh,{provider:n.embedding.provider,baseUrl:n.embedding.base_url,value:n.embedding.model,onChange:c=>s("model",c),modelType:"embedding"})})]})]})]})})}const Jv=[1500,3e3,5e3,7500,1e4],MR={1500:6500,3e3:11500,5e3:18500,7500:24500,1e4:30500};function DR({digest:n,intelligence:l,isDirty:i,updateDigest:s,updateDigestIntelligence:c,updateDigestMetabolism:d,updateDigestSubstrate:h,updateDigestConsolidation:m}){const v=n.intelligence.provider??l.llm.provider,g=n.intelligence.base_url??l.llm.base_url;return u.jsx(tr,{title:"Digest",description:"Continuous synthesis of vault knowledge into pre-computed context",isDirty:i,children:u.jsxs("div",{className:"space-y-6",children:[u.jsx(ve,{label:"Enabled",description:"Run continuous vault synthesis in the background",children:u.jsx(Ec,{checked:n.enabled,onChange:x=>s("enabled",x)})}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Consolidation"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Enabled",description:"Automatically consolidate related spores into wisdom notes before each digest cycle",children:u.jsx(Ec,{checked:n.consolidation.enabled,onChange:x=>m("enabled",x)})}),u.jsx(ve,{label:"Max Tokens",description:"Token budget for wisdom note generation — higher values produce more comprehensive notes",children:u.jsx(ze,{type:"number",value:n.consolidation.max_tokens,onChange:x=>{const b=parseInt(x.target.value,10);isNaN(b)||m("max_tokens",b)}})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Intelligence"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Provider",description:"Override the processor model for digest — use a larger model for better synthesis",children:u.jsx(hl,{value:n.intelligence.provider??"__null__",onChange:x=>c("provider",x==="__null__"?null:x),options:[{value:"__null__",label:"Use main provider"},...Sb.map(x=>({value:x,label:x}))]})}),u.jsx(ve,{label:"Model",description:"Digest model — quality matters more than speed here",children:u.jsx(nh,{provider:v,baseUrl:g,value:n.intelligence.model??"",onChange:x=>c("model",x||null),placeholder:"Use main model",modelType:"llm"})}),u.jsx(ve,{label:"Context Window",description:"How much vault content the digest model can process per cycle",children:u.jsx(hl,{value:String(n.intelligence.context_window),onChange:x=>c("context_window",parseInt(x,10)),options:wb})}),u.jsx(ve,{label:"Keep Alive",description:"How long to keep the digest model loaded between cycles (Ollama duration string)",children:u.jsx(ze,{value:n.intelligence.keep_alive??"",placeholder:"Provider default",onChange:x=>c("keep_alive",x.target.value||null)})}),u.jsx(ve,{label:"GPU KV Cache",description:"Offload key-value cache to GPU — faster but uses more VRAM",children:u.jsx(Ec,{checked:n.intelligence.gpu_kv_cache,onChange:x=>c("gpu_kv_cache",x)})})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Tiers"}),u.jsx(ve,{label:"Token budgets",description:"Built-in tiers — eligible tiers are determined by your digest model's context window",children:u.jsx("div",{className:"flex flex-wrap gap-2",children:Jv.map(x=>{const b=MR[x]??1/0,E=b<=(n.intelligence.context_window??0);return u.jsx(dt,{variant:E?"secondary":"outline",className:E?"":"opacity-40",title:E?`Eligible — requires ${b.toLocaleString()} context`:`Requires ${b.toLocaleString()} context (current: ${(n.intelligence.context_window??0).toLocaleString()})`,children:x.toLocaleString()},x)})})}),u.jsx("div",{className:"mt-4",children:u.jsx(ve,{label:"Inject Tier",description:"Which tier to inject at session start — larger tiers give agents more context",children:u.jsx(hl,{value:n.inject_tier!==null?String(n.inject_tier):"__null__",onChange:x=>s("inject_tier",x==="__null__"?null:parseInt(x,10)),options:[{value:"__null__",label:"None (disabled)"},...Jv.map(x=>({value:String(x),label:`${x.toLocaleString()} tokens`}))]})})})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Metabolism"}),u.jsx("button",{type:"button",onClick:()=>{const x=RR.metabolism;d("active_interval",x.active_interval),d("dormancy_threshold",x.dormancy_threshold),d("cooldown_intervals",[...x.cooldown_intervals])},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Reset to recommended"})]}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Active Interval (sec)",description:"Seconds between digest cycles when new content is arriving",children:u.jsx(ze,{type:"number",value:n.metabolism.active_interval,onChange:x=>{const b=parseInt(x.target.value,10);isNaN(b)||d("active_interval",b)}})}),u.jsx(ve,{label:"Dormancy Threshold (sec)",description:"Seconds of inactivity before the digest engine goes dormant",children:u.jsx(ze,{type:"number",value:n.metabolism.dormancy_threshold,onChange:x=>{const b=parseInt(x.target.value,10);isNaN(b)||d("dormancy_threshold",b)}})})]}),u.jsxs("div",{className:"mt-4",children:[u.jsx("h5",{className:"mb-3 text-xs font-medium text-muted-foreground",children:"Cooldown Intervals (sec)"}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:NR.map((x,b)=>u.jsx(ve,{label:x,description:TR[b],children:u.jsx(ze,{type:"number",value:n.metabolism.cooldown_intervals[b]??"",onChange:E=>{const C=parseInt(E.target.value,10);if(!isNaN(C)){const T=[...n.metabolism.cooldown_intervals];T[b]=C,d("cooldown_intervals",T)}}})},x))})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-muted-foreground",children:"Substrate"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Max Notes Per Cycle",description:"Maximum vault notes to process in a single digest cycle",children:u.jsx(ze,{type:"number",value:n.substrate.max_notes_per_cycle,onChange:x=>{const b=parseInt(x.target.value,10);isNaN(b)||h("max_notes_per_cycle",b)}})}),u.jsx(ve,{label:"Min Notes For Cycle",description:"Minimum new knowledge units needed before a digest cycle runs",children:u.jsx(ze,{type:"number",value:n.substrate.min_notes_for_cycle,onChange:x=>{const b=parseInt(x.target.value,10);isNaN(b)||h("min_notes_for_cycle",b)}})})]})]})]})})}function zR({capture:n,isDirty:l,updateCapture:i}){return u.jsx(tr,{title:"Capture",description:"Event buffering and token budgets for LLM processing",isDirty:l,children:u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Buffer Max Events",description:"Maximum events to buffer per session before flushing",children:u.jsx(ze,{type:"number",value:n.buffer_max_events,onChange:ft(i,"buffer_max_events")})}),u.jsx(ve,{label:"Extraction Max Tokens",description:"Output token limit for observation extraction from sessions",children:u.jsx(ze,{type:"number",value:n.extraction_max_tokens,onChange:ft(i,"extraction_max_tokens")})}),u.jsx(ve,{label:"Summary Max Tokens",description:"Output token limit for session summary generation",children:u.jsx(ze,{type:"number",value:n.summary_max_tokens,onChange:ft(i,"summary_max_tokens")})}),u.jsx(ve,{label:"Title Max Tokens",description:"Output token limit for session title generation",children:u.jsx(ze,{type:"number",value:n.title_max_tokens,onChange:ft(i,"title_max_tokens")})}),u.jsx(ve,{label:"Classification Max Tokens",description:"Output token limit for artifact classification",children:u.jsx(ze,{type:"number",value:n.classification_max_tokens,onChange:ft(i,"classification_max_tokens")})})]})})}function LR({context:n,isDirty:l,updateContext:i,updateContextLayer:s}){return u.jsx(tr,{title:"Context",description:"Context injection token budget and layer allocations",isDirty:l,children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(ve,{label:"Max Tokens",description:"Total token budget for per-prompt context injection",children:u.jsx(ze,{type:"number",value:n.max_tokens,onChange:ft(i,"max_tokens")})}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-1 text-sm font-medium text-muted-foreground",children:"Layer Allocations"}),u.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"How the budget is split across vault content types"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Plans",description:"Tokens allocated to active plan context",children:u.jsx(ze,{type:"number",value:n.layers.plans,onChange:ft(s,"plans")})}),u.jsx(ve,{label:"Sessions",description:"Tokens allocated to recent session context",children:u.jsx(ze,{type:"number",value:n.layers.sessions,onChange:ft(s,"sessions")})}),u.jsx(ve,{label:"Spores",description:"Tokens allocated to relevant spore context",children:u.jsx(ze,{type:"number",value:n.layers.spores,onChange:ft(s,"spores")})}),u.jsx(ve,{label:"Team",description:"Tokens allocated to team member context",children:u.jsx(ze,{type:"number",value:n.layers.team,onChange:ft(s,"team")})})]})]})]})})}function UR({daemon:n,isDirty:l,updateDaemon:i}){return u.jsx(tr,{title:"Daemon",description:"Daemon process settings",isDirty:l,children:u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Port",description:"Auto-derived from vault path — the daemon binds to this port on startup",children:u.jsx(ze,{type:"number",value:n.port??"",placeholder:"Auto",disabled:!0,className:"disabled:cursor-default disabled:opacity-70"})}),u.jsx(ve,{label:"Log Level",description:"Minimum severity level for daemon log output",children:u.jsx(hl,{value:n.log_level,onChange:s=>i("log_level",s),options:ER})}),u.jsx(ve,{label:"Grace Period (sec)",description:"Seconds to wait before shutting down when no sessions are active",children:u.jsx(ze,{type:"number",value:n.grace_period,onChange:ft(i,"grace_period")})}),u.jsx(ve,{label:"Max Log Size (bytes)",description:"Maximum daemon log file size in bytes before rotation",children:u.jsx(ze,{type:"number",value:n.max_log_size,onChange:ft(i,"max_log_size")})})]})})}function kR({pipeline:n,isDirty:l,updatePipeline:i,updatePipelineRetry:s,updatePipelineCircuitBreaker:c}){return u.jsxs(tr,{title:"Pipeline",description:"Work item processing, retry behavior, and circuit breaker settings",isDirty:l,children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Processing"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Batch Size",description:"Work items processed per stage per pipeline tick",children:u.jsx(ze,{type:"number",value:n.batch_size,onChange:ft(i,"batch_size")})}),u.jsx(ve,{label:"Tick Interval (sec)",description:"Seconds between pipeline processing ticks",children:u.jsx(ze,{type:"number",value:n.tick_interval_seconds,onChange:ft(i,"tick_interval_seconds")})}),u.jsx(ve,{label:"Retention Days",description:"Days to retain completed/failed work items before compaction",children:u.jsx(ze,{type:"number",value:n.retention_days,onChange:ft(i,"retention_days")})})]})]}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Retry"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Max Transient Retries",description:"Maximum retry attempts for recoverable failures",children:u.jsx(ze,{type:"number",value:n.retry.transient_max,onChange:ft(s,"transient_max")})}),u.jsx(ve,{label:"Backoff Base (sec)",description:"Base delay between retry attempts (exponential backoff)",children:u.jsx(ze,{type:"number",value:n.retry.backoff_base_seconds,onChange:ft(s,"backoff_base_seconds")})})]})]}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Circuit Breaker"}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"Failure Threshold",description:"Consecutive failures before opening a circuit breaker",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.failure_threshold,onChange:ft(c,"failure_threshold")})}),u.jsx(ve,{label:"Cooldown (sec)",description:"Initial cooldown duration when a circuit breaker opens",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.cooldown_seconds,onChange:ft(c,"cooldown_seconds")})}),u.jsx(ve,{label:"Max Cooldown (sec)",description:"Maximum cooldown duration for exponential backoff",children:u.jsx(ze,{type:"number",value:n.circuit_breaker.max_cooldown_seconds,onChange:ft(c,"max_cooldown_seconds")})})]})]})]})}function HR({team:n,isDirty:l,updateTeam:i}){return u.jsx(tr,{title:"Team",description:"Multi-user collaboration settings",isDirty:l,children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(ve,{label:"Enabled",description:"Enable team knowledge sharing across vault users",children:u.jsx(Ec,{checked:n.enabled,onChange:s=>i("enabled",s)})}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsx(ve,{label:"User Name",description:"Your display name for team attribution",children:u.jsx(ze,{value:n.user,onChange:s=>i("user",s.target.value)})}),u.jsx(ve,{label:"Sync Mode",description:"How team knowledge is synchronized between machines",children:u.jsx(hl,{value:n.sync,onChange:s=>i("sync",s),options:CR})})]})]})})}function BR({config:n,onSave:l,isSaving:i}){const[s,c]=y.useState(n),[d,h]=y.useState(!1),[m,v]=y.useState(null),{data:g}=Vs(),{restart:x,isRestarting:b}=E0();y.useEffect(()=>{c(n)},[n]);const E=(g==null?void 0:g.daemon.config_hash)??null,C=m!==null&&m!==E,T=Wa(s,n),w=Wa(s.intelligence,n.intelligence),j=Wa(s.digest,n.digest),N=Wa(s.capture,n.capture),O=Wa(s.context,n.context),M=Wa(s.daemon,n.daemon),z=Wa(s.pipeline,n.pipeline),q=Wa(s.team,n.team),X=y.useCallback((Z,$)=>c(J=>{const he={[Z]:$};return Z==="provider"&&typeof $=="string"&&(he.base_url=Ad[$]??void 0),{...J,intelligence:{...J.intelligence,llm:{...J.intelligence.llm,...he}}}}),[]),G=y.useCallback((Z,$)=>c(J=>{const he={[Z]:$};return Z==="provider"&&(he.base_url=Ad[$]??void 0),{...J,intelligence:{...J.intelligence,embedding:{...J.intelligence.embedding,...he}}}}),[]),Q=y.useCallback((Z,$)=>c(J=>({...J,digest:{...J.digest,[Z]:$}})),[]),ee=y.useCallback((Z,$)=>c(J=>{const he={[Z]:$};return Z==="provider"&&(he.base_url=typeof $=="string"?Ad[$]??void 0:null),{...J,digest:{...J.digest,intelligence:{...J.digest.intelligence,...he}}}}),[]),ne=y.useCallback((Z,$)=>c(J=>({...J,digest:{...J.digest,metabolism:{...J.digest.metabolism,[Z]:$}}})),[]),ie=y.useCallback((Z,$)=>c(J=>({...J,digest:{...J.digest,substrate:{...J.digest.substrate,[Z]:$}}})),[]),te=y.useCallback((Z,$)=>c(J=>({...J,digest:{...J.digest,consolidation:{...J.digest.consolidation,[Z]:$}}})),[]),ge=y.useCallback((Z,$)=>c(J=>({...J,capture:{...J.capture,[Z]:$}})),[]),ce=y.useCallback((Z,$)=>c(J=>({...J,context:{...J.context,[Z]:$}})),[]),de=y.useCallback((Z,$)=>c(J=>({...J,context:{...J.context,layers:{...J.context.layers,[Z]:$}}})),[]),U=y.useCallback((Z,$)=>c(J=>({...J,daemon:{...J.daemon,[Z]:$}})),[]),I=y.useCallback((Z,$)=>c(J=>({...J,pipeline:{...J.pipeline,[Z]:$}})),[]),W=y.useCallback((Z,$)=>c(J=>({...J,pipeline:{...J.pipeline,retry:{...J.pipeline.retry,[Z]:$}}})),[]),se=y.useCallback((Z,$)=>c(J=>({...J,pipeline:{...J.pipeline,circuit_breaker:{...J.pipeline.circuit_breaker,[Z]:$}}})),[]),ye=y.useCallback((Z,$)=>c(J=>({...J,team:{...J.team,[Z]:$}})),[]),A=async()=>{const Z=await l(s);return E&&v(E),h(!0),Z},P=async()=>{h(!1),await x(!0)};return u.jsxs("div",{className:"space-y-4",children:[C&&u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-yellow-500/50 bg-yellow-500/10 px-4 py-3",children:[u.jsx(Dh,{className:"h-4 w-4 shrink-0 text-yellow-500"}),u.jsx("span",{className:"flex-1 text-sm text-yellow-700 dark:text-yellow-400",children:"Configuration changed — restart required for changes to take effect"}),u.jsxs(Ke,{size:"sm",variant:"outline",className:"gap-1.5 border-yellow-500/50 text-yellow-700 hover:bg-yellow-500/10 dark:text-yellow-400",onClick:P,disabled:b,children:[b?u.jsx(nl,{className:"h-3.5 w-3.5 animate-spin"}):u.jsx(nl,{className:"h-3.5 w-3.5"}),"Restart Now"]})]}),u.jsx(OR,{intelligence:s.intelligence,isDirty:w,updateLlm:X,updateEmbedding:G}),u.jsx(DR,{digest:s.digest,intelligence:s.intelligence,isDirty:j,updateDigest:Q,updateDigestIntelligence:ee,updateDigestMetabolism:ne,updateDigestSubstrate:ie,updateDigestConsolidation:te}),u.jsx(kR,{pipeline:s.pipeline,isDirty:z,updatePipeline:I,updatePipelineRetry:W,updatePipelineCircuitBreaker:se}),u.jsx(zR,{capture:s.capture,isDirty:N,updateCapture:ge}),u.jsx(LR,{context:s.context,isDirty:O,updateContext:ce,updateContextLayer:de}),u.jsx(UR,{daemon:s.daemon,isDirty:M,updateDaemon:U}),u.jsx(HR,{team:s.team,isDirty:q,updateTeam:ye}),u.jsxs("div",{className:"flex items-center justify-end gap-3 pt-2",children:[T&&u.jsx("span",{className:"text-sm text-muted-foreground",children:"Unsaved changes"}),u.jsxs(Ke,{onClick:A,disabled:!T||i,className:"gap-2",children:[i?u.jsx(nl,{className:"h-4 w-4 animate-spin"}):u.jsx(aj,{className:"h-4 w-4"}),i?"Saving...":"Save Configuration"]})]}),u.jsx(bR,{open:d,onOpenChange:h,children:u.jsxs(gb,{children:[u.jsxs(yb,{children:[u.jsx(xb,{children:"Configuration Saved"}),u.jsx(bb,{children:"Changes have been saved to disk. Some settings require a daemon restart to take effect."})]}),u.jsxs(vb,{children:[u.jsx(Ke,{variant:"outline",onClick:()=>h(!1),children:"Later"}),u.jsxs(Ke,{onClick:P,disabled:b,className:"gap-2",children:[b?u.jsx(nl,{className:"h-4 w-4 animate-spin"}):u.jsx(nl,{className:"h-4 w-4"}),b?"Restarting...":"Restart Now"]})]})]})})]})}function qR(){const{config:n,isLoading:l,error:i,saveConfig:s,isSaving:c}=GN();return u.jsx(Uh,{isLoading:l,error:i,loadingText:"Loading configuration...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(x0,{className:"h-5 w-5 text-primary"}),u.jsx("h1",{className:"text-xl font-semibold",children:"Configuration"})]}),u.jsx(BR,{config:n,onSave:s,isSaving:c})]})})}function Wv(n,[l,i]){return Math.min(i,Math.max(l,n))}function VR(n){const l=n+"CollectionProvider",[i,s]=Hc(l),[c,d]=i(l,{collectionRef:{current:null},itemMap:new Map}),h=w=>{const{scope:j,children:N}=w,O=ma.useRef(null),M=ma.useRef(new Map).current;return u.jsx(c,{scope:j,itemMap:M,collectionRef:O,children:N})};h.displayName=l;const m=n+"CollectionSlot",v=Rs(m),g=ma.forwardRef((w,j)=>{const{scope:N,children:O}=w,M=d(m,N),z=it(j,M.collectionRef);return u.jsx(v,{ref:z,children:O})});g.displayName=m;const x=n+"CollectionItemSlot",b="data-radix-collection-item",E=Rs(x),C=ma.forwardRef((w,j)=>{const{scope:N,children:O,...M}=w,z=ma.useRef(null),q=it(j,z),X=d(x,N);return ma.useEffect(()=>(X.itemMap.set(z,{ref:z,...M}),()=>void X.itemMap.delete(z))),u.jsx(E,{[b]:"",ref:q,children:O})});C.displayName=x;function T(w){const j=d(n+"CollectionConsumer",w);return ma.useCallback(()=>{const O=j.collectionRef.current;if(!O)return[];const M=Array.from(O.querySelectorAll(`[${b}]`));return Array.from(j.itemMap.values()).sort((X,G)=>M.indexOf(X.ref.current)-M.indexOf(G.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:h,Slot:g,ItemSlot:C},T,s]}var GR=y.createContext(void 0);function YR(n){const l=y.useContext(GR);return n||l||"ltr"}const QR=["top","right","bottom","left"],ml=Math.min,ln=Math.max,_c=Math.round,gc=Math.floor,Gn=n=>({x:n,y:n}),PR={left:"right",right:"left",bottom:"top",top:"bottom"};function ah(n,l,i){return ln(n,ml(l,i))}function wa(n,l){return typeof n=="function"?n(l):n}function Ea(n){return n.split("-")[0]}function pi(n){return n.split("-")[1]}function Qh(n){return n==="x"?"y":"x"}function Ph(n){return n==="y"?"height":"width"}function qn(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Xh(n){return Qh(qn(n))}function XR(n,l,i){i===void 0&&(i=!1);const s=pi(n),c=Xh(n),d=Ph(c);let h=c==="x"?s===(i?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[d]>l.floating[d]&&(h=Ac(h)),[h,Ac(h)]}function KR(n){const l=Ac(n);return[lh(n),l,lh(l)]}function lh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const ex=["left","right"],tx=["right","left"],FR=["top","bottom"],ZR=["bottom","top"];function IR(n,l,i){switch(n){case"top":case"bottom":return i?l?tx:ex:l?ex:tx;case"left":case"right":return l?FR:ZR;default:return[]}}function $R(n,l,i,s){const c=pi(n);let d=IR(Ea(n),i==="start",s);return c&&(d=d.map(h=>h+"-"+c),l&&(d=d.concat(d.map(lh)))),d}function Ac(n){const l=Ea(n);return PR[l]+n.slice(l.length)}function JR(n){return{top:0,right:0,bottom:0,left:0,...n}}function Cb(n){return typeof n!="number"?JR(n):{top:n,right:n,bottom:n,left:n}}function Oc(n){const{x:l,y:i,width:s,height:c}=n;return{width:s,height:c,top:i,left:l,right:l+s,bottom:i+c,x:l,y:i}}function nx(n,l,i){let{reference:s,floating:c}=n;const d=qn(l),h=Xh(l),m=Ph(h),v=Ea(l),g=d==="y",x=s.x+s.width/2-c.width/2,b=s.y+s.height/2-c.height/2,E=s[m]/2-c[m]/2;let C;switch(v){case"top":C={x,y:s.y-c.height};break;case"bottom":C={x,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:b};break;case"left":C={x:s.x-c.width,y:b};break;default:C={x:s.x,y:s.y}}switch(pi(l)){case"start":C[h]-=E*(i&&g?-1:1);break;case"end":C[h]+=E*(i&&g?-1:1);break}return C}async function WR(n,l){var i;l===void 0&&(l={});const{x:s,y:c,platform:d,rects:h,elements:m,strategy:v}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:b="floating",altBoundary:E=!1,padding:C=0}=wa(l,n),T=Cb(C),j=m[E?b==="floating"?"reference":"floating":b],N=Oc(await d.getClippingRect({element:(i=await(d.isElement==null?void 0:d.isElement(j)))==null||i?j:j.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:g,rootBoundary:x,strategy:v})),O=b==="floating"?{x:s,y:c,width:h.floating.width,height:h.floating.height}:h.reference,M=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),z=await(d.isElement==null?void 0:d.isElement(M))?await(d.getScale==null?void 0:d.getScale(M))||{x:1,y:1}:{x:1,y:1},q=Oc(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:M,strategy:v}):O);return{top:(N.top-q.top+T.top)/z.y,bottom:(q.bottom-N.bottom+T.bottom)/z.y,left:(N.left-q.left+T.left)/z.x,right:(q.right-N.right+T.right)/z.x}}const e_=50,t_=async(n,l,i)=>{const{placement:s="bottom",strategy:c="absolute",middleware:d=[],platform:h}=i,m=h.detectOverflow?h:{...h,detectOverflow:WR},v=await(h.isRTL==null?void 0:h.isRTL(l));let g=await h.getElementRects({reference:n,floating:l,strategy:c}),{x,y:b}=nx(g,s,v),E=s,C=0;const T={};for(let w=0;w<d.length;w++){const j=d[w];if(!j)continue;const{name:N,fn:O}=j,{x:M,y:z,data:q,reset:X}=await O({x,y:b,initialPlacement:s,placement:E,strategy:c,middlewareData:T,rects:g,platform:m,elements:{reference:n,floating:l}});x=M??x,b=z??b,T[N]={...T[N],...q},X&&C<e_&&(C++,typeof X=="object"&&(X.placement&&(E=X.placement),X.rects&&(g=X.rects===!0?await h.getElementRects({reference:n,floating:l,strategy:c}):X.rects),{x,y:b}=nx(g,E,v)),w=-1)}return{x,y:b,placement:E,strategy:c,middlewareData:T}},n_=n=>({name:"arrow",options:n,async fn(l){const{x:i,y:s,placement:c,rects:d,platform:h,elements:m,middlewareData:v}=l,{element:g,padding:x=0}=wa(n,l)||{};if(g==null)return{};const b=Cb(x),E={x:i,y:s},C=Xh(c),T=Ph(C),w=await h.getDimensions(g),j=C==="y",N=j?"top":"left",O=j?"bottom":"right",M=j?"clientHeight":"clientWidth",z=d.reference[T]+d.reference[C]-E[C]-d.floating[T],q=E[C]-d.reference[C],X=await(h.getOffsetParent==null?void 0:h.getOffsetParent(g));let G=X?X[M]:0;(!G||!await(h.isElement==null?void 0:h.isElement(X)))&&(G=m.floating[M]||d.floating[T]);const Q=z/2-q/2,ee=G/2-w[T]/2-1,ne=ml(b[N],ee),ie=ml(b[O],ee),te=ne,ge=G-w[T]-ie,ce=G/2-w[T]/2+Q,de=ah(te,ce,ge),U=!v.arrow&&pi(c)!=null&&ce!==de&&d.reference[T]/2-(ce<te?ne:ie)-w[T]/2<0,I=U?ce<te?ce-te:ce-ge:0;return{[C]:E[C]+I,data:{[C]:de,centerOffset:ce-de-I,...U&&{alignmentOffset:I}},reset:U}}}),a_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var i,s;const{placement:c,middlewareData:d,rects:h,initialPlacement:m,platform:v,elements:g}=l,{mainAxis:x=!0,crossAxis:b=!0,fallbackPlacements:E,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:w=!0,...j}=wa(n,l);if((i=d.arrow)!=null&&i.alignmentOffset)return{};const N=Ea(c),O=qn(m),M=Ea(m)===m,z=await(v.isRTL==null?void 0:v.isRTL(g.floating)),q=E||(M||!w?[Ac(m)]:KR(m)),X=T!=="none";!E&&X&&q.push(...$R(m,w,T,z));const G=[m,...q],Q=await v.detectOverflow(l,j),ee=[];let ne=((s=d.flip)==null?void 0:s.overflows)||[];if(x&&ee.push(Q[N]),b){const ce=XR(c,h,z);ee.push(Q[ce[0]],Q[ce[1]])}if(ne=[...ne,{placement:c,overflows:ee}],!ee.every(ce=>ce<=0)){var ie,te;const ce=(((ie=d.flip)==null?void 0:ie.index)||0)+1,de=G[ce];if(de&&(!(b==="alignment"?O!==qn(de):!1)||ne.every(W=>qn(W.placement)===O?W.overflows[0]>0:!0)))return{data:{index:ce,overflows:ne},reset:{placement:de}};let U=(te=ne.filter(I=>I.overflows[0]<=0).sort((I,W)=>I.overflows[1]-W.overflows[1])[0])==null?void 0:te.placement;if(!U)switch(C){case"bestFit":{var ge;const I=(ge=ne.filter(W=>{if(X){const se=qn(W.placement);return se===O||se==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(se=>se>0).reduce((se,ye)=>se+ye,0)]).sort((W,se)=>W[1]-se[1])[0])==null?void 0:ge[0];I&&(U=I);break}case"initialPlacement":U=m;break}if(c!==U)return{reset:{placement:U}}}return{}}}};function ax(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function lx(n){return QR.some(l=>n[l]>=0)}const l_=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:i,platform:s}=l,{strategy:c="referenceHidden",...d}=wa(n,l);switch(c){case"referenceHidden":{const h=await s.detectOverflow(l,{...d,elementContext:"reference"}),m=ax(h,i.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:lx(m)}}}case"escaped":{const h=await s.detectOverflow(l,{...d,altBoundary:!0}),m=ax(h,i.floating);return{data:{escapedOffsets:m,escaped:lx(m)}}}default:return{}}}}},jb=new Set(["left","top"]);async function r_(n,l){const{placement:i,platform:s,elements:c}=n,d=await(s.isRTL==null?void 0:s.isRTL(c.floating)),h=Ea(i),m=pi(i),v=qn(i)==="y",g=jb.has(h)?-1:1,x=d&&v?-1:1,b=wa(l,n);let{mainAxis:E,crossAxis:C,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return m&&typeof T=="number"&&(C=m==="end"?T*-1:T),v?{x:C*x,y:E*g}:{x:E*g,y:C*x}}const i_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var i,s;const{x:c,y:d,placement:h,middlewareData:m}=l,v=await r_(l,n);return h===((i=m.offset)==null?void 0:i.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:c+v.x,y:d+v.y,data:{...v,placement:h}}}}},s_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:i,y:s,placement:c,platform:d}=l,{mainAxis:h=!0,crossAxis:m=!1,limiter:v={fn:N=>{let{x:O,y:M}=N;return{x:O,y:M}}},...g}=wa(n,l),x={x:i,y:s},b=await d.detectOverflow(l,g),E=qn(Ea(c)),C=Qh(E);let T=x[C],w=x[E];if(h){const N=C==="y"?"top":"left",O=C==="y"?"bottom":"right",M=T+b[N],z=T-b[O];T=ah(M,T,z)}if(m){const N=E==="y"?"top":"left",O=E==="y"?"bottom":"right",M=w+b[N],z=w-b[O];w=ah(M,w,z)}const j=v.fn({...l,[C]:T,[E]:w});return{...j,data:{x:j.x-i,y:j.y-s,enabled:{[C]:h,[E]:m}}}}}},o_=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:i,y:s,placement:c,rects:d,middlewareData:h}=l,{offset:m=0,mainAxis:v=!0,crossAxis:g=!0}=wa(n,l),x={x:i,y:s},b=qn(c),E=Qh(b);let C=x[E],T=x[b];const w=wa(m,l),j=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(v){const M=E==="y"?"height":"width",z=d.reference[E]-d.floating[M]+j.mainAxis,q=d.reference[E]+d.reference[M]-j.mainAxis;C<z?C=z:C>q&&(C=q)}if(g){var N,O;const M=E==="y"?"width":"height",z=jb.has(Ea(c)),q=d.reference[b]-d.floating[M]+(z&&((N=h.offset)==null?void 0:N[b])||0)+(z?0:j.crossAxis),X=d.reference[b]+d.reference[M]+(z?0:((O=h.offset)==null?void 0:O[b])||0)-(z?j.crossAxis:0);T<q?T=q:T>X&&(T=X)}return{[E]:C,[b]:T}}}},c_=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var i,s;const{placement:c,rects:d,platform:h,elements:m}=l,{apply:v=()=>{},...g}=wa(n,l),x=await h.detectOverflow(l,g),b=Ea(c),E=pi(c),C=qn(c)==="y",{width:T,height:w}=d.floating;let j,N;b==="top"||b==="bottom"?(j=b,N=E===(await(h.isRTL==null?void 0:h.isRTL(m.floating))?"start":"end")?"left":"right"):(N=b,j=E==="end"?"top":"bottom");const O=w-x.top-x.bottom,M=T-x.left-x.right,z=ml(w-x[j],O),q=ml(T-x[N],M),X=!l.middlewareData.shift;let G=z,Q=q;if((i=l.middlewareData.shift)!=null&&i.enabled.x&&(Q=M),(s=l.middlewareData.shift)!=null&&s.enabled.y&&(G=O),X&&!E){const ne=ln(x.left,0),ie=ln(x.right,0),te=ln(x.top,0),ge=ln(x.bottom,0);C?Q=T-2*(ne!==0||ie!==0?ne+ie:ln(x.left,x.right)):G=w-2*(te!==0||ge!==0?te+ge:ln(x.top,x.bottom))}await v({...l,availableWidth:Q,availableHeight:G});const ee=await h.getDimensions(m.floating);return T!==ee.width||w!==ee.height?{reset:{rects:!0}}:{}}}};function Gc(){return typeof window<"u"}function gi(n){return Nb(n)?(n.nodeName||"").toLowerCase():"#document"}function rn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function Pn(n){var l;return(l=(Nb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function Nb(n){return Gc()?n instanceof Node||n instanceof rn(n).Node:!1}function Rn(n){return Gc()?n instanceof Element||n instanceof rn(n).Element:!1}function Ca(n){return Gc()?n instanceof HTMLElement||n instanceof rn(n).HTMLElement:!1}function rx(n){return!Gc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof rn(n).ShadowRoot}function Gs(n){const{overflow:l,overflowX:i,overflowY:s,display:c}=_n(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+i)&&c!=="inline"&&c!=="contents"}function u_(n){return/^(table|td|th)$/.test(gi(n))}function Yc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const f_=/transform|translate|scale|rotate|perspective|filter/,d_=/paint|layout|strict|content/,kl=n=>!!n&&n!=="none";let Od;function Kh(n){const l=Rn(n)?_n(n):n;return kl(l.transform)||kl(l.translate)||kl(l.scale)||kl(l.rotate)||kl(l.perspective)||!Fh()&&(kl(l.backdropFilter)||kl(l.filter))||f_.test(l.willChange||"")||d_.test(l.contain||"")}function h_(n){let l=pl(n);for(;Ca(l)&&!ci(l);){if(Kh(l))return l;if(Yc(l))return null;l=pl(l)}return null}function Fh(){return Od==null&&(Od=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Od}function ci(n){return/^(html|body|#document)$/.test(gi(n))}function _n(n){return rn(n).getComputedStyle(n)}function Qc(n){return Rn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function pl(n){if(gi(n)==="html")return n;const l=n.assignedSlot||n.parentNode||rx(n)&&n.host||Pn(n);return rx(l)?l.host:l}function Tb(n){const l=pl(n);return ci(l)?n.ownerDocument?n.ownerDocument.body:n.body:Ca(l)&&Gs(l)?l:Tb(l)}function _s(n,l,i){var s;l===void 0&&(l=[]),i===void 0&&(i=!0);const c=Tb(n),d=c===((s=n.ownerDocument)==null?void 0:s.body),h=rn(c);if(d){const m=rh(h);return l.concat(h,h.visualViewport||[],Gs(c)?c:[],m&&i?_s(m):[])}else return l.concat(c,_s(c,[],i))}function rh(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Rb(n){const l=_n(n);let i=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const c=Ca(n),d=c?n.offsetWidth:i,h=c?n.offsetHeight:s,m=_c(i)!==d||_c(s)!==h;return m&&(i=d,s=h),{width:i,height:s,$:m}}function Zh(n){return Rn(n)?n:n.contextElement}function Fr(n){const l=Zh(n);if(!Ca(l))return Gn(1);const i=l.getBoundingClientRect(),{width:s,height:c,$:d}=Rb(l);let h=(d?_c(i.width):i.width)/s,m=(d?_c(i.height):i.height)/c;return(!h||!Number.isFinite(h))&&(h=1),(!m||!Number.isFinite(m))&&(m=1),{x:h,y:m}}const m_=Gn(0);function _b(n){const l=rn(n);return!Fh()||!l.visualViewport?m_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function p_(n,l,i){return l===void 0&&(l=!1),!i||l&&i!==rn(n)?!1:l}function $l(n,l,i,s){l===void 0&&(l=!1),i===void 0&&(i=!1);const c=n.getBoundingClientRect(),d=Zh(n);let h=Gn(1);l&&(s?Rn(s)&&(h=Fr(s)):h=Fr(n));const m=p_(d,i,s)?_b(d):Gn(0);let v=(c.left+m.x)/h.x,g=(c.top+m.y)/h.y,x=c.width/h.x,b=c.height/h.y;if(d){const E=rn(d),C=s&&Rn(s)?rn(s):s;let T=E,w=rh(T);for(;w&&s&&C!==T;){const j=Fr(w),N=w.getBoundingClientRect(),O=_n(w),M=N.left+(w.clientLeft+parseFloat(O.paddingLeft))*j.x,z=N.top+(w.clientTop+parseFloat(O.paddingTop))*j.y;v*=j.x,g*=j.y,x*=j.x,b*=j.y,v+=M,g+=z,T=rn(w),w=rh(T)}}return Oc({width:x,height:b,x:v,y:g})}function Pc(n,l){const i=Qc(n).scrollLeft;return l?l.left+i:$l(Pn(n)).left+i}function Ab(n,l){const i=n.getBoundingClientRect(),s=i.left+l.scrollLeft-Pc(n,i),c=i.top+l.scrollTop;return{x:s,y:c}}function g_(n){let{elements:l,rect:i,offsetParent:s,strategy:c}=n;const d=c==="fixed",h=Pn(s),m=l?Yc(l.floating):!1;if(s===h||m&&d)return i;let v={scrollLeft:0,scrollTop:0},g=Gn(1);const x=Gn(0),b=Ca(s);if((b||!b&&!d)&&((gi(s)!=="body"||Gs(h))&&(v=Qc(s)),b)){const C=$l(s);g=Fr(s),x.x=C.x+s.clientLeft,x.y=C.y+s.clientTop}const E=h&&!b&&!d?Ab(h,v):Gn(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-v.scrollLeft*g.x+x.x+E.x,y:i.y*g.y-v.scrollTop*g.y+x.y+E.y}}function y_(n){return Array.from(n.getClientRects())}function v_(n){const l=Pn(n),i=Qc(n),s=n.ownerDocument.body,c=ln(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),d=ln(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let h=-i.scrollLeft+Pc(n);const m=-i.scrollTop;return _n(s).direction==="rtl"&&(h+=ln(l.clientWidth,s.clientWidth)-c),{width:c,height:d,x:h,y:m}}const ix=25;function x_(n,l){const i=rn(n),s=Pn(n),c=i.visualViewport;let d=s.clientWidth,h=s.clientHeight,m=0,v=0;if(c){d=c.width,h=c.height;const x=Fh();(!x||x&&l==="fixed")&&(m=c.offsetLeft,v=c.offsetTop)}const g=Pc(s);if(g<=0){const x=s.ownerDocument,b=x.body,E=getComputedStyle(b),C=x.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,T=Math.abs(s.clientWidth-b.clientWidth-C);T<=ix&&(d-=T)}else g<=ix&&(d+=g);return{width:d,height:h,x:m,y:v}}function b_(n,l){const i=$l(n,!0,l==="fixed"),s=i.top+n.clientTop,c=i.left+n.clientLeft,d=Ca(n)?Fr(n):Gn(1),h=n.clientWidth*d.x,m=n.clientHeight*d.y,v=c*d.x,g=s*d.y;return{width:h,height:m,x:v,y:g}}function sx(n,l,i){let s;if(l==="viewport")s=x_(n,i);else if(l==="document")s=v_(Pn(n));else if(Rn(l))s=b_(l,i);else{const c=_b(n);s={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return Oc(s)}function Ob(n,l){const i=pl(n);return i===l||!Rn(i)||ci(i)?!1:_n(i).position==="fixed"||Ob(i,l)}function S_(n,l){const i=l.get(n);if(i)return i;let s=_s(n,[],!1).filter(m=>Rn(m)&&gi(m)!=="body"),c=null;const d=_n(n).position==="fixed";let h=d?pl(n):n;for(;Rn(h)&&!ci(h);){const m=_n(h),v=Kh(h);!v&&m.position==="fixed"&&(c=null),(d?!v&&!c:!v&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Gs(h)&&!v&&Ob(n,h))?s=s.filter(x=>x!==h):c=m,h=pl(h)}return l.set(n,s),s}function w_(n){let{element:l,boundary:i,rootBoundary:s,strategy:c}=n;const h=[...i==="clippingAncestors"?Yc(l)?[]:S_(l,this._c):[].concat(i),s],m=sx(l,h[0],c);let v=m.top,g=m.right,x=m.bottom,b=m.left;for(let E=1;E<h.length;E++){const C=sx(l,h[E],c);v=ln(C.top,v),g=ml(C.right,g),x=ml(C.bottom,x),b=ln(C.left,b)}return{width:g-b,height:x-v,x:b,y:v}}function E_(n){const{width:l,height:i}=Rb(n);return{width:l,height:i}}function C_(n,l,i){const s=Ca(l),c=Pn(l),d=i==="fixed",h=$l(n,!0,d,l);let m={scrollLeft:0,scrollTop:0};const v=Gn(0);function g(){v.x=Pc(c)}if(s||!s&&!d)if((gi(l)!=="body"||Gs(c))&&(m=Qc(l)),s){const C=$l(l,!0,d,l);v.x=C.x+l.clientLeft,v.y=C.y+l.clientTop}else c&&g();d&&!s&&c&&g();const x=c&&!s&&!d?Ab(c,m):Gn(0),b=h.left+m.scrollLeft-v.x-x.x,E=h.top+m.scrollTop-v.y-x.y;return{x:b,y:E,width:h.width,height:h.height}}function Md(n){return _n(n).position==="static"}function ox(n,l){if(!Ca(n)||_n(n).position==="fixed")return null;if(l)return l(n);let i=n.offsetParent;return Pn(n)===i&&(i=i.ownerDocument.body),i}function Mb(n,l){const i=rn(n);if(Yc(n))return i;if(!Ca(n)){let c=pl(n);for(;c&&!ci(c);){if(Rn(c)&&!Md(c))return c;c=pl(c)}return i}let s=ox(n,l);for(;s&&u_(s)&&Md(s);)s=ox(s,l);return s&&ci(s)&&Md(s)&&!Kh(s)?i:s||h_(n)||i}const j_=async function(n){const l=this.getOffsetParent||Mb,i=this.getDimensions,s=await i(n.floating);return{reference:C_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function N_(n){return _n(n).direction==="rtl"}const T_={convertOffsetParentRelativeRectToViewportRelativeRect:g_,getDocumentElement:Pn,getClippingRect:w_,getOffsetParent:Mb,getElementRects:j_,getClientRects:y_,getDimensions:E_,getScale:Fr,isElement:Rn,isRTL:N_};function Db(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function R_(n,l){let i=null,s;const c=Pn(n);function d(){var m;clearTimeout(s),(m=i)==null||m.disconnect(),i=null}function h(m,v){m===void 0&&(m=!1),v===void 0&&(v=1),d();const g=n.getBoundingClientRect(),{left:x,top:b,width:E,height:C}=g;if(m||l(),!E||!C)return;const T=gc(b),w=gc(c.clientWidth-(x+E)),j=gc(c.clientHeight-(b+C)),N=gc(x),M={rootMargin:-T+"px "+-w+"px "+-j+"px "+-N+"px",threshold:ln(0,ml(1,v))||1};let z=!0;function q(X){const G=X[0].intersectionRatio;if(G!==v){if(!z)return h();G?h(!1,G):s=setTimeout(()=>{h(!1,1e-7)},1e3)}G===1&&!Db(g,n.getBoundingClientRect())&&h(),z=!1}try{i=new IntersectionObserver(q,{...M,root:c.ownerDocument})}catch{i=new IntersectionObserver(q,M)}i.observe(n)}return h(!0),d}function __(n,l,i,s){s===void 0&&(s={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:v=!1}=s,g=Zh(n),x=c||d?[...g?_s(g):[],...l?_s(l):[]]:[];x.forEach(N=>{c&&N.addEventListener("scroll",i,{passive:!0}),d&&N.addEventListener("resize",i)});const b=g&&m?R_(g,i):null;let E=-1,C=null;h&&(C=new ResizeObserver(N=>{let[O]=N;O&&O.target===g&&C&&l&&(C.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var M;(M=C)==null||M.observe(l)})),i()}),g&&!v&&C.observe(g),l&&C.observe(l));let T,w=v?$l(n):null;v&&j();function j(){const N=$l(n);w&&!Db(w,N)&&i(),w=N,T=requestAnimationFrame(j)}return i(),()=>{var N;x.forEach(O=>{c&&O.removeEventListener("scroll",i),d&&O.removeEventListener("resize",i)}),b==null||b(),(N=C)==null||N.disconnect(),C=null,v&&cancelAnimationFrame(T)}}const A_=i_,O_=s_,M_=a_,D_=c_,z_=l_,cx=n_,L_=o_,U_=(n,l,i)=>{const s=new Map,c={platform:T_,...i},d={...c.platform,_c:s};return t_(n,l,{...c,platform:d})};var k_=typeof document<"u",H_=function(){},Cc=k_?y.useLayoutEffect:H_;function Mc(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let i,s,c;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(i=n.length,i!==l.length)return!1;for(s=i;s--!==0;)if(!Mc(n[s],l[s]))return!1;return!0}if(c=Object.keys(n),i=c.length,i!==Object.keys(l).length)return!1;for(s=i;s--!==0;)if(!{}.hasOwnProperty.call(l,c[s]))return!1;for(s=i;s--!==0;){const d=c[s];if(!(d==="_owner"&&n.$$typeof)&&!Mc(n[d],l[d]))return!1}return!0}return n!==n&&l!==l}function zb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function ux(n,l){const i=zb(n);return Math.round(l*i)/i}function Dd(n){const l=y.useRef(n);return Cc(()=>{l.current=n}),l}function B_(n){n===void 0&&(n={});const{placement:l="bottom",strategy:i="absolute",middleware:s=[],platform:c,elements:{reference:d,floating:h}={},transform:m=!0,whileElementsMounted:v,open:g}=n,[x,b]=y.useState({x:0,y:0,strategy:i,placement:l,middlewareData:{},isPositioned:!1}),[E,C]=y.useState(s);Mc(E,s)||C(s);const[T,w]=y.useState(null),[j,N]=y.useState(null),O=y.useCallback(W=>{W!==X.current&&(X.current=W,w(W))},[]),M=y.useCallback(W=>{W!==G.current&&(G.current=W,N(W))},[]),z=d||T,q=h||j,X=y.useRef(null),G=y.useRef(null),Q=y.useRef(x),ee=v!=null,ne=Dd(v),ie=Dd(c),te=Dd(g),ge=y.useCallback(()=>{if(!X.current||!G.current)return;const W={placement:l,strategy:i,middleware:E};ie.current&&(W.platform=ie.current),U_(X.current,G.current,W).then(se=>{const ye={...se,isPositioned:te.current!==!1};ce.current&&!Mc(Q.current,ye)&&(Q.current=ye,Hs.flushSync(()=>{b(ye)}))})},[E,l,i,ie,te]);Cc(()=>{g===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,b(W=>({...W,isPositioned:!1})))},[g]);const ce=y.useRef(!1);Cc(()=>(ce.current=!0,()=>{ce.current=!1}),[]),Cc(()=>{if(z&&(X.current=z),q&&(G.current=q),z&&q){if(ne.current)return ne.current(z,q,ge);ge()}},[z,q,ge,ne,ee]);const de=y.useMemo(()=>({reference:X,floating:G,setReference:O,setFloating:M}),[O,M]),U=y.useMemo(()=>({reference:z,floating:q}),[z,q]),I=y.useMemo(()=>{const W={position:i,left:0,top:0};if(!U.floating)return W;const se=ux(U.floating,x.x),ye=ux(U.floating,x.y);return m?{...W,transform:"translate("+se+"px, "+ye+"px)",...zb(U.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:se,top:ye}},[i,m,U.floating,x.x,x.y]);return y.useMemo(()=>({...x,update:ge,refs:de,elements:U,floatingStyles:I}),[x,ge,de,U,I])}const q_=n=>{function l(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:n,fn(i){const{element:s,padding:c}=typeof n=="function"?n(i):n;return s&&l(s)?s.current!=null?cx({element:s.current,padding:c}).fn(i):{}:s?cx({element:s,padding:c}).fn(i):{}}}},V_=(n,l)=>{const i=A_(n);return{name:i.name,fn:i.fn,options:[n,l]}},G_=(n,l)=>{const i=O_(n);return{name:i.name,fn:i.fn,options:[n,l]}},Y_=(n,l)=>({fn:L_(n).fn,options:[n,l]}),Q_=(n,l)=>{const i=M_(n);return{name:i.name,fn:i.fn,options:[n,l]}},P_=(n,l)=>{const i=D_(n);return{name:i.name,fn:i.fn,options:[n,l]}},X_=(n,l)=>{const i=z_(n);return{name:i.name,fn:i.fn,options:[n,l]}},K_=(n,l)=>{const i=q_(n);return{name:i.name,fn:i.fn,options:[n,l]}};var F_="Arrow",Lb=y.forwardRef((n,l)=>{const{children:i,width:s=10,height:c=5,...d}=n;return u.jsx(Fe.svg,{...d,ref:l,width:s,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?i:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lb.displayName=F_;var Z_=Lb;function I_(n){const[l,i]=y.useState(void 0);return Dt(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let h,m;if("borderBoxSize"in d){const v=d.borderBoxSize,g=Array.isArray(v)?v[0]:v;h=g.inlineSize,m=g.blockSize}else h=n.offsetWidth,m=n.offsetHeight;i({width:h,height:m})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else i(void 0)},[n]),l}var Ih="Popper",[Ub,kb]=Hc(Ih),[$_,Hb]=Ub(Ih),Bb=n=>{const{__scopePopper:l,children:i}=n,[s,c]=y.useState(null);return u.jsx($_,{scope:l,anchor:s,onAnchorChange:c,children:i})};Bb.displayName=Ih;var qb="PopperAnchor",Vb=y.forwardRef((n,l)=>{const{__scopePopper:i,virtualRef:s,...c}=n,d=Hb(qb,i),h=y.useRef(null),m=it(l,h),v=y.useRef(null);return y.useEffect(()=>{const g=v.current;v.current=(s==null?void 0:s.current)||h.current,g!==v.current&&d.onAnchorChange(v.current)}),s?null:u.jsx(Fe.div,{...c,ref:m})});Vb.displayName=qb;var $h="PopperContent",[J_,W_]=Ub($h),Gb=y.forwardRef((n,l)=>{var ae,Se,Ne,Le,De,Ue;const{__scopePopper:i,side:s="bottom",sideOffset:c=0,align:d="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:b="partial",hideWhenDetached:E=!1,updatePositionStrategy:C="optimized",onPlaced:T,...w}=n,j=Hb($h,i),[N,O]=y.useState(null),M=it(l,Ct=>O(Ct)),[z,q]=y.useState(null),X=I_(z),G=(X==null?void 0:X.width)??0,Q=(X==null?void 0:X.height)??0,ee=s+(d!=="center"?"-"+d:""),ne=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},ie=Array.isArray(g)?g:[g],te=ie.length>0,ge={padding:ne,boundary:ie.filter(tA),altBoundary:te},{refs:ce,floatingStyles:de,placement:U,isPositioned:I,middlewareData:W}=B_({strategy:"fixed",placement:ee,whileElementsMounted:(...Ct)=>__(...Ct,{animationFrame:C==="always"}),elements:{reference:j.anchor},middleware:[V_({mainAxis:c+Q,alignmentAxis:h}),v&&G_({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?Y_():void 0,...ge}),v&&Q_({...ge}),P_({...ge,apply:({elements:Ct,rects:pt,availableWidth:Xn,availableHeight:Kn})=>{const{width:vl,height:Ys}=pt.reference,ja=Ct.floating.style;ja.setProperty("--radix-popper-available-width",`${Xn}px`),ja.setProperty("--radix-popper-available-height",`${Kn}px`),ja.setProperty("--radix-popper-anchor-width",`${vl}px`),ja.setProperty("--radix-popper-anchor-height",`${Ys}px`)}}),z&&K_({element:z,padding:m}),nA({arrowWidth:G,arrowHeight:Q}),E&&X_({strategy:"referenceHidden",...ge})]}),[se,ye]=Pb(U),A=Zl(T);Dt(()=>{I&&(A==null||A())},[I,A]);const P=(ae=W.arrow)==null?void 0:ae.x,Z=(Se=W.arrow)==null?void 0:Se.y,$=((Ne=W.arrow)==null?void 0:Ne.centerOffset)!==0,[J,he]=y.useState();return Dt(()=>{N&&he(window.getComputedStyle(N).zIndex)},[N]),u.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:I?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(Le=W.transformOrigin)==null?void 0:Le.x,(De=W.transformOrigin)==null?void 0:De.y].join(" "),...((Ue=W.hide)==null?void 0:Ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:u.jsx(J_,{scope:i,placedSide:se,onArrowChange:q,arrowX:P,arrowY:Z,shouldHideArrow:$,children:u.jsx(Fe.div,{"data-side":se,"data-align":ye,...w,ref:M,style:{...w.style,animation:I?void 0:"none"}})})})});Gb.displayName=$h;var Yb="PopperArrow",eA={top:"bottom",right:"left",bottom:"top",left:"right"},Qb=y.forwardRef(function(l,i){const{__scopePopper:s,...c}=l,d=W_(Yb,s),h=eA[d.placedSide];return u.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[h]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:u.jsx(Z_,{...c,ref:i,style:{...c.style,display:"block"}})})});Qb.displayName=Yb;function tA(n){return n!==null}var nA=n=>({name:"transformOrigin",options:n,fn(l){var j,N,O;const{placement:i,rects:s,middlewareData:c}=l,h=((j=c.arrow)==null?void 0:j.centerOffset)!==0,m=h?0:n.arrowWidth,v=h?0:n.arrowHeight,[g,x]=Pb(i),b={start:"0%",center:"50%",end:"100%"}[x],E=(((N=c.arrow)==null?void 0:N.x)??0)+m/2,C=(((O=c.arrow)==null?void 0:O.y)??0)+v/2;let T="",w="";return g==="bottom"?(T=h?b:`${E}px`,w=`${-v}px`):g==="top"?(T=h?b:`${E}px`,w=`${s.floating.height+v}px`):g==="right"?(T=`${-v}px`,w=h?b:`${C}px`):g==="left"&&(T=`${s.floating.width+v}px`,w=h?b:`${C}px`),{data:{x:T,y:w}}}});function Pb(n){const[l,i="center"]=n.split("-");return[l,i]}var aA=Bb,lA=Vb,rA=Gb,iA=Qb;function sA(n){const l=y.useRef({value:n,previous:n});return y.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}var Xb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),oA="VisuallyHidden",cA=y.forwardRef((n,l)=>u.jsx(Fe.span,{...n,ref:l,style:{...Xb,...n.style}}));cA.displayName=oA;var uA=[" ","Enter","ArrowUp","ArrowDown"],fA=[" ","Enter"],Jl="Select",[Xc,Kc,dA]=VR(Jl),[yi]=Hc(Jl,[dA,kb]),Fc=kb(),[hA,gl]=yi(Jl),[mA,pA]=yi(Jl),Kb=n=>{const{__scopeSelect:l,children:i,open:s,defaultOpen:c,onOpenChange:d,value:h,defaultValue:m,onValueChange:v,dir:g,name:x,autoComplete:b,disabled:E,required:C,form:T}=n,w=Fc(l),[j,N]=y.useState(null),[O,M]=y.useState(null),[z,q]=y.useState(!1),X=YR(g),[G,Q]=Wd({prop:s,defaultProp:c??!1,onChange:d,caller:Jl}),[ee,ne]=Wd({prop:h,defaultProp:m,onChange:v,caller:Jl}),ie=y.useRef(null),te=j?T||!!j.closest("form"):!0,[ge,ce]=y.useState(new Set),de=Array.from(ge).map(U=>U.props.value).join(";");return u.jsx(aA,{...w,children:u.jsxs(hA,{required:C,scope:l,trigger:j,onTriggerChange:N,valueNode:O,onValueNodeChange:M,valueNodeHasChildren:z,onValueNodeHasChildrenChange:q,contentId:Xr(),value:ee,onValueChange:ne,open:G,onOpenChange:Q,dir:X,triggerPointerDownPosRef:ie,disabled:E,children:[u.jsx(Xc.Provider,{scope:l,children:u.jsx(mA,{scope:n.__scopeSelect,onNativeOptionAdd:y.useCallback(U=>{ce(I=>new Set(I).add(U))},[]),onNativeOptionRemove:y.useCallback(U=>{ce(I=>{const W=new Set(I);return W.delete(U),W})},[]),children:i})}),te?u.jsxs(h1,{"aria-hidden":!0,required:C,tabIndex:-1,name:x,autoComplete:b,value:ee,onChange:U=>ne(U.target.value),disabled:E,form:T,children:[ee===void 0?u.jsx("option",{value:""}):null,Array.from(ge)]},de):null]})})};Kb.displayName=Jl;var Fb="SelectTrigger",Zb=y.forwardRef((n,l)=>{const{__scopeSelect:i,disabled:s=!1,...c}=n,d=Fc(i),h=gl(Fb,i),m=h.disabled||s,v=it(l,h.onTriggerChange),g=Kc(i),x=y.useRef("touch"),[b,E,C]=p1(w=>{const j=g().filter(M=>!M.disabled),N=j.find(M=>M.value===h.value),O=g1(j,w,N);O!==void 0&&h.onValueChange(O.value)}),T=w=>{m||(h.onOpenChange(!0),C()),w&&(h.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return u.jsx(lA,{asChild:!0,...d,children:u.jsx(Fe.button,{type:"button",role:"combobox","aria-controls":h.contentId,"aria-expanded":h.open,"aria-required":h.required,"aria-autocomplete":"none",dir:h.dir,"data-state":h.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":m1(h.value)?"":void 0,...c,ref:v,onClick:Je(c.onClick,w=>{w.currentTarget.focus(),x.current!=="mouse"&&T(w)}),onPointerDown:Je(c.onPointerDown,w=>{x.current=w.pointerType;const j=w.target;j.hasPointerCapture(w.pointerId)&&j.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(T(w),w.preventDefault())}),onKeyDown:Je(c.onKeyDown,w=>{const j=b.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&E(w.key),!(j&&w.key===" ")&&uA.includes(w.key)&&(T(),w.preventDefault())})})})});Zb.displayName=Fb;var Ib="SelectValue",$b=y.forwardRef((n,l)=>{const{__scopeSelect:i,className:s,style:c,children:d,placeholder:h="",...m}=n,v=gl(Ib,i),{onValueNodeHasChildrenChange:g}=v,x=d!==void 0,b=it(l,v.onValueNodeChange);return Dt(()=>{g(x)},[g,x]),u.jsx(Fe.span,{...m,ref:b,style:{pointerEvents:"none"},children:m1(v.value)?u.jsx(u.Fragment,{children:h}):d})});$b.displayName=Ib;var gA="SelectIcon",Jb=y.forwardRef((n,l)=>{const{__scopeSelect:i,children:s,...c}=n;return u.jsx(Fe.span,{"aria-hidden":!0,...c,ref:l,children:s||"▼"})});Jb.displayName=gA;var yA="SelectPortal",Wb=n=>u.jsx(Bh,{asChild:!0,...n});Wb.displayName=yA;var Wl="SelectContent",e1=y.forwardRef((n,l)=>{const i=gl(Wl,n.__scopeSelect),[s,c]=y.useState();if(Dt(()=>{c(new DocumentFragment)},[]),!i.open){const d=s;return d?Hs.createPortal(u.jsx(t1,{scope:n.__scopeSelect,children:u.jsx(Xc.Slot,{scope:n.__scopeSelect,children:u.jsx("div",{children:n.children})})}),d):null}return u.jsx(n1,{...n,ref:l})});e1.displayName=Wl;var jn=10,[t1,yl]=yi(Wl),vA="SelectContentImpl",xA=Rs("SelectContent.RemoveScroll"),n1=y.forwardRef((n,l)=>{const{__scopeSelect:i,position:s="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:h,side:m,sideOffset:v,align:g,alignOffset:x,arrowPadding:b,collisionBoundary:E,collisionPadding:C,sticky:T,hideWhenDetached:w,avoidCollisions:j,...N}=n,O=gl(Wl,i),[M,z]=y.useState(null),[q,X]=y.useState(null),G=it(l,ae=>z(ae)),[Q,ee]=y.useState(null),[ne,ie]=y.useState(null),te=Kc(i),[ge,ce]=y.useState(!1),de=y.useRef(!1);y.useEffect(()=>{if(M)return Z0(M)},[M]),q0();const U=y.useCallback(ae=>{const[Se,...Ne]=te().map(Ue=>Ue.ref.current),[Le]=Ne.slice(-1),De=document.activeElement;for(const Ue of ae)if(Ue===De||(Ue==null||Ue.scrollIntoView({block:"nearest"}),Ue===Se&&q&&(q.scrollTop=0),Ue===Le&&q&&(q.scrollTop=q.scrollHeight),Ue==null||Ue.focus(),document.activeElement!==De))return},[te,q]),I=y.useCallback(()=>U([Q,M]),[U,Q,M]);y.useEffect(()=>{ge&&I()},[ge,I]);const{onOpenChange:W,triggerPointerDownPosRef:se}=O;y.useEffect(()=>{if(M){let ae={x:0,y:0};const Se=Le=>{var De,Ue;ae={x:Math.abs(Math.round(Le.pageX)-(((De=se.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((Ue=se.current)==null?void 0:Ue.y)??0))}},Ne=Le=>{ae.x<=10&&ae.y<=10?Le.preventDefault():M.contains(Le.target)||W(!1),document.removeEventListener("pointermove",Se),se.current=null};return se.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[M,W,se]),y.useEffect(()=>{const ae=()=>W(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[W]);const[ye,A]=p1(ae=>{const Se=te().filter(De=>!De.disabled),Ne=Se.find(De=>De.ref.current===document.activeElement),Le=g1(Se,ae,Ne);Le&&setTimeout(()=>Le.ref.current.focus())}),P=y.useCallback((ae,Se,Ne)=>{const Le=!de.current&&!Ne;(O.value!==void 0&&O.value===Se||Le)&&(ee(ae),Le&&(de.current=!0))},[O.value]),Z=y.useCallback(()=>M==null?void 0:M.focus(),[M]),$=y.useCallback((ae,Se,Ne)=>{const Le=!de.current&&!Ne;(O.value!==void 0&&O.value===Se||Le)&&ie(ae)},[O.value]),J=s==="popper"?ih:a1,he=J===ih?{side:m,sideOffset:v,align:g,alignOffset:x,arrowPadding:b,collisionBoundary:E,collisionPadding:C,sticky:T,hideWhenDetached:w,avoidCollisions:j}:{};return u.jsx(t1,{scope:i,content:M,viewport:q,onViewportChange:X,itemRefCallback:P,selectedItem:Q,onItemLeave:Z,itemTextRefCallback:$,focusSelectedItem:I,selectedItemText:ne,position:s,isPositioned:ge,searchRef:ye,children:u.jsx(qh,{as:xA,allowPinchZoom:!0,children:u.jsx(Hh,{asChild:!0,trapped:O.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Je(c,ae=>{var Se;(Se=O.trigger)==null||Se.focus({preventScroll:!0}),ae.preventDefault()}),children:u.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:u.jsx(J,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ae=>ae.preventDefault(),...N,...he,onPlaced:()=>ce(!0),ref:G,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Je(N.onKeyDown,ae=>{const Se=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!Se&&ae.key.length===1&&A(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Le=te().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const De=ae.target,Ue=Le.indexOf(De);Le=Le.slice(Ue+1)}setTimeout(()=>U(Le)),ae.preventDefault()}})})})})})})});n1.displayName=vA;var bA="SelectItemAlignedPosition",a1=y.forwardRef((n,l)=>{const{__scopeSelect:i,onPlaced:s,...c}=n,d=gl(Wl,i),h=yl(Wl,i),[m,v]=y.useState(null),[g,x]=y.useState(null),b=it(l,G=>x(G)),E=Kc(i),C=y.useRef(!1),T=y.useRef(!0),{viewport:w,selectedItem:j,selectedItemText:N,focusSelectedItem:O}=h,M=y.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&g&&w&&j&&N){const G=d.trigger.getBoundingClientRect(),Q=g.getBoundingClientRect(),ee=d.valueNode.getBoundingClientRect(),ne=N.getBoundingClientRect();if(d.dir!=="rtl"){const De=ne.left-Q.left,Ue=ee.left-De,Ct=G.left-Ue,pt=G.width+Ct,Xn=Math.max(pt,Q.width),Kn=window.innerWidth-jn,vl=Wv(Ue,[jn,Math.max(jn,Kn-Xn)]);m.style.minWidth=pt+"px",m.style.left=vl+"px"}else{const De=Q.right-ne.right,Ue=window.innerWidth-ee.right-De,Ct=window.innerWidth-G.right-Ue,pt=G.width+Ct,Xn=Math.max(pt,Q.width),Kn=window.innerWidth-jn,vl=Wv(Ue,[jn,Math.max(jn,Kn-Xn)]);m.style.minWidth=pt+"px",m.style.right=vl+"px"}const ie=E(),te=window.innerHeight-jn*2,ge=w.scrollHeight,ce=window.getComputedStyle(g),de=parseInt(ce.borderTopWidth,10),U=parseInt(ce.paddingTop,10),I=parseInt(ce.borderBottomWidth,10),W=parseInt(ce.paddingBottom,10),se=de+U+ge+W+I,ye=Math.min(j.offsetHeight*5,se),A=window.getComputedStyle(w),P=parseInt(A.paddingTop,10),Z=parseInt(A.paddingBottom,10),$=G.top+G.height/2-jn,J=te-$,he=j.offsetHeight/2,ae=j.offsetTop+he,Se=de+U+ae,Ne=se-Se;if(Se<=$){const De=ie.length>0&&j===ie[ie.length-1].ref.current;m.style.bottom="0px";const Ue=g.clientHeight-w.offsetTop-w.offsetHeight,Ct=Math.max(J,he+(De?Z:0)+Ue+I),pt=Se+Ct;m.style.height=pt+"px"}else{const De=ie.length>0&&j===ie[0].ref.current;m.style.top="0px";const Ct=Math.max($,de+w.offsetTop+(De?P:0)+he)+Ne;m.style.height=Ct+"px",w.scrollTop=Se-$+w.offsetTop}m.style.margin=`${jn}px 0`,m.style.minHeight=ye+"px",m.style.maxHeight=te+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[E,d.trigger,d.valueNode,m,g,w,j,N,d.dir,s]);Dt(()=>M(),[M]);const[z,q]=y.useState();Dt(()=>{g&&q(window.getComputedStyle(g).zIndex)},[g]);const X=y.useCallback(G=>{G&&T.current===!0&&(M(),O==null||O(),T.current=!1)},[M,O]);return u.jsx(wA,{scope:i,contentWrapper:m,shouldExpandOnScrollRef:C,onScrollButtonChange:X,children:u.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:u.jsx(Fe.div,{...c,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});a1.displayName=bA;var SA="SelectPopperPosition",ih=y.forwardRef((n,l)=>{const{__scopeSelect:i,align:s="start",collisionPadding:c=jn,...d}=n,h=Fc(i);return u.jsx(rA,{...h,...d,ref:l,align:s,collisionPadding:c,style:{boxSizing:"border-box",...d.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)"}})});ih.displayName=SA;var[wA,Jh]=yi(Wl,{}),sh="SelectViewport",l1=y.forwardRef((n,l)=>{const{__scopeSelect:i,nonce:s,...c}=n,d=yl(sh,i),h=Jh(sh,i),m=it(l,d.onViewportChange),v=y.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Xc.Slot,{scope:i,children:u.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Je(c.onScroll,g=>{const x=g.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:E}=h;if(E!=null&&E.current&&b){const C=Math.abs(v.current-x.scrollTop);if(C>0){const T=window.innerHeight-jn*2,w=parseFloat(b.style.minHeight),j=parseFloat(b.style.height),N=Math.max(w,j);if(N<T){const O=N+C,M=Math.min(T,O),z=O-M;b.style.height=M+"px",b.style.bottom==="0px"&&(x.scrollTop=z>0?z:0,b.style.justifyContent="flex-end")}}}v.current=x.scrollTop})})})]})});l1.displayName=sh;var r1="SelectGroup",[EA,CA]=yi(r1),jA=y.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=Xr();return u.jsx(EA,{scope:i,id:c,children:u.jsx(Fe.div,{role:"group","aria-labelledby":c,...s,ref:l})})});jA.displayName=r1;var i1="SelectLabel",NA=y.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=CA(i1,i);return u.jsx(Fe.div,{id:c.id,...s,ref:l})});NA.displayName=i1;var Dc="SelectItem",[TA,s1]=yi(Dc),o1=y.forwardRef((n,l)=>{const{__scopeSelect:i,value:s,disabled:c=!1,textValue:d,...h}=n,m=gl(Dc,i),v=yl(Dc,i),g=m.value===s,[x,b]=y.useState(d??""),[E,C]=y.useState(!1),T=it(l,O=>{var M;return(M=v.itemRefCallback)==null?void 0:M.call(v,O,s,c)}),w=Xr(),j=y.useRef("touch"),N=()=>{c||(m.onValueChange(s),m.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 u.jsx(TA,{scope:i,value:s,disabled:c,textId:w,isSelected:g,onItemTextChange:y.useCallback(O=>{b(M=>M||((O==null?void 0:O.textContent)??"").trim())},[]),children:u.jsx(Xc.ItemSlot,{scope:i,value:s,disabled:c,textValue:x,children:u.jsx(Fe.div,{role:"option","aria-labelledby":w,"data-highlighted":E?"":void 0,"aria-selected":g&&E,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...h,ref:T,onFocus:Je(h.onFocus,()=>C(!0)),onBlur:Je(h.onBlur,()=>C(!1)),onClick:Je(h.onClick,()=>{j.current!=="mouse"&&N()}),onPointerUp:Je(h.onPointerUp,()=>{j.current==="mouse"&&N()}),onPointerDown:Je(h.onPointerDown,O=>{j.current=O.pointerType}),onPointerMove:Je(h.onPointerMove,O=>{var M;j.current=O.pointerType,c?(M=v.onItemLeave)==null||M.call(v):j.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(h.onPointerLeave,O=>{var M;O.currentTarget===document.activeElement&&((M=v.onItemLeave)==null||M.call(v))}),onKeyDown:Je(h.onKeyDown,O=>{var z;((z=v.searchRef)==null?void 0:z.current)!==""&&O.key===" "||(fA.includes(O.key)&&N(),O.key===" "&&O.preventDefault())})})})})});o1.displayName=Dc;var bs="SelectItemText",c1=y.forwardRef((n,l)=>{const{__scopeSelect:i,className:s,style:c,...d}=n,h=gl(bs,i),m=yl(bs,i),v=s1(bs,i),g=pA(bs,i),[x,b]=y.useState(null),E=it(l,N=>b(N),v.onItemTextChange,N=>{var O;return(O=m.itemTextRefCallback)==null?void 0:O.call(m,N,v.value,v.disabled)}),C=x==null?void 0:x.textContent,T=y.useMemo(()=>u.jsx("option",{value:v.value,disabled:v.disabled,children:C},v.value),[v.disabled,v.value,C]),{onNativeOptionAdd:w,onNativeOptionRemove:j}=g;return Dt(()=>(w(T),()=>j(T)),[w,j,T]),u.jsxs(u.Fragment,{children:[u.jsx(Fe.span,{id:v.textId,...d,ref:E}),v.isSelected&&h.valueNode&&!h.valueNodeHasChildren?Hs.createPortal(d.children,h.valueNode):null]})});c1.displayName=bs;var u1="SelectItemIndicator",f1=y.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n;return s1(u1,i).isSelected?u.jsx(Fe.span,{"aria-hidden":!0,...s,ref:l}):null});f1.displayName=u1;var oh="SelectScrollUpButton",RA=y.forwardRef((n,l)=>{const i=yl(oh,n.__scopeSelect),s=Jh(oh,n.__scopeSelect),[c,d]=y.useState(!1),h=it(l,s.onScrollButtonChange);return Dt(()=>{if(i.viewport&&i.isPositioned){let m=function(){const g=v.scrollTop>0;d(g)};const v=i.viewport;return m(),v.addEventListener("scroll",m),()=>v.removeEventListener("scroll",m)}},[i.viewport,i.isPositioned]),c?u.jsx(d1,{...n,ref:h,onAutoScroll:()=>{const{viewport:m,selectedItem:v}=i;m&&v&&(m.scrollTop=m.scrollTop-v.offsetHeight)}}):null});RA.displayName=oh;var ch="SelectScrollDownButton",_A=y.forwardRef((n,l)=>{const i=yl(ch,n.__scopeSelect),s=Jh(ch,n.__scopeSelect),[c,d]=y.useState(!1),h=it(l,s.onScrollButtonChange);return Dt(()=>{if(i.viewport&&i.isPositioned){let m=function(){const g=v.scrollHeight-v.clientHeight,x=Math.ceil(v.scrollTop)<g;d(x)};const v=i.viewport;return m(),v.addEventListener("scroll",m),()=>v.removeEventListener("scroll",m)}},[i.viewport,i.isPositioned]),c?u.jsx(d1,{...n,ref:h,onAutoScroll:()=>{const{viewport:m,selectedItem:v}=i;m&&v&&(m.scrollTop=m.scrollTop+v.offsetHeight)}}):null});_A.displayName=ch;var d1=y.forwardRef((n,l)=>{const{__scopeSelect:i,onAutoScroll:s,...c}=n,d=yl("SelectScrollButton",i),h=y.useRef(null),m=Kc(i),v=y.useCallback(()=>{h.current!==null&&(window.clearInterval(h.current),h.current=null)},[]);return y.useEffect(()=>()=>v(),[v]),Dt(()=>{var x;const g=m().find(b=>b.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),u.jsx(Fe.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:Je(c.onPointerDown,()=>{h.current===null&&(h.current=window.setInterval(s,50))}),onPointerMove:Je(c.onPointerMove,()=>{var g;(g=d.onItemLeave)==null||g.call(d),h.current===null&&(h.current=window.setInterval(s,50))}),onPointerLeave:Je(c.onPointerLeave,()=>{v()})})}),AA="SelectSeparator",OA=y.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n;return u.jsx(Fe.div,{"aria-hidden":!0,...s,ref:l})});OA.displayName=AA;var uh="SelectArrow",MA=y.forwardRef((n,l)=>{const{__scopeSelect:i,...s}=n,c=Fc(i),d=gl(uh,i),h=yl(uh,i);return d.open&&h.position==="popper"?u.jsx(iA,{...c,...s,ref:l}):null});MA.displayName=uh;var DA="SelectBubbleInput",h1=y.forwardRef(({__scopeSelect:n,value:l,...i},s)=>{const c=y.useRef(null),d=it(s,c),h=sA(l);return y.useEffect(()=>{const m=c.current;if(!m)return;const v=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(v,"value").set;if(h!==l&&x){const b=new Event("change",{bubbles:!0});x.call(m,l),m.dispatchEvent(b)}},[h,l]),u.jsx(Fe.select,{...i,style:{...Xb,...i.style},ref:d,defaultValue:l})});h1.displayName=DA;function m1(n){return n===""||n===void 0}function p1(n){const l=Zl(n),i=y.useRef(""),s=y.useRef(0),c=y.useCallback(h=>{const m=i.current+h;l(m),(function v(g){i.current=g,window.clearTimeout(s.current),g!==""&&(s.current=window.setTimeout(()=>v(""),1e3))})(m)},[l]),d=y.useCallback(()=>{i.current="",window.clearTimeout(s.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),[i,c,d]}function g1(n,l,i){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,d=i?n.indexOf(i):-1;let h=zA(n,Math.max(d,0));c.length===1&&(h=h.filter(g=>g!==i));const v=h.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return v!==i?v:void 0}function zA(n,l){return n.map((i,s)=>n[(l+s)%n.length])}var LA=Kb,y1=Zb,UA=$b,kA=Jb,HA=Wb,v1=e1,BA=l1,x1=o1,qA=c1,VA=f1;const Es=LA,Cs=UA,Zr=y.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(y1,{ref:s,className:je("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 placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...i,children:[l,u.jsx(kA,{asChild:!0,children:u.jsx(Uc,{className:"h-4 w-4 opacity-50"})})]}));Zr.displayName=y1.displayName;const Ir=y.forwardRef(({className:n,children:l,position:i="popper",...s},c)=>u.jsx(HA,{children:u.jsx(v1,{ref:c,className:je("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-card text-card-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",i==="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",n),position:i,...s,children:u.jsx(BA,{className:je("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l})})}));Ir.displayName=v1.displayName;const Hn=y.forwardRef(({className:n,children:l,...i},s)=>u.jsxs(x1,{ref:s,className:je("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",n),...i,children:[u.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(VA,{children:u.jsx(GC,{className:"h-4 w-4"})})}),u.jsx(qA,{children:l})]}));Hn.displayName=x1.displayName;const GA=15e3,YA=zh,QA={succeeded:Ah,pending:kc,processing:Mt,failed:Oh,blocked:Mv,poisoned:Mv},PA={succeeded:"text-emerald-500",pending:"text-muted-foreground",processing:"text-amber-500",failed:"text-red-500",blocked:"text-red-400",poisoned:"text-red-600"},XA={succeeded:"bg-emerald-500",pending:"bg-muted-foreground/30",processing:"bg-amber-400",failed:"bg-red-500",blocked:"bg-red-400",poisoned:"bg-red-600"};function fh(n){if(!n)return"--";try{return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return n}}function b1(n){return n.charAt(0).toUpperCase()+n.slice(1)}function KA({stage:n,output:l}){if(!l)return null;let i;try{i=JSON.parse(l)}catch{return null}return u.jsxs("div",{className:"mt-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-xs space-y-1",children:[n==="extraction"&&u.jsxs(u.Fragment,{children:[i.observations!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Observations:"})," ",u.jsxs("span",{className:"font-medium",children:[String(i.observations)," extracted"]})]}),i.title&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Title:"})," ",u.jsx("span",{className:"font-medium",children:String(i.title)})]}),i.summary_tokens!==void 0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Summary:"})," ",String(i.summary_tokens)," tokens via ",String(i.model??"unknown")]})]}),n==="embedding"&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Embedded:"})," ",String(i.dimensions??"?")," dimensions via ",String(i.model??"unknown")]}),n==="consolidation"&&u.jsxs(u.Fragment,{children:[Array.isArray(i.superseded)&&i.superseded.length>0?u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Superseded:"})," ",String(i.superseded.length)," older spores"]}):u.jsx("div",{className:"text-muted-foreground",children:"No similar spores found"}),i.candidates_evaluated!==void 0&&Number(i.candidates_evaluated)>0&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Candidates evaluated:"})," ",String(i.candidates_evaluated)]})]}),n==="digest"&&!!i.included_in_cycle&&u.jsxs("div",{children:[u.jsx("span",{className:"text-muted-foreground",children:"Included in cycle"})," ",u.jsx("span",{className:"font-mono",children:String(i.included_in_cycle).slice(0,8)}),Array.isArray(i.tiers_generated)&&u.jsxs("span",{children:[" — ",String(i.tiers_generated.length)," tiers generated"]})]})]})}function FA({stageStatus:n,isLast:l,itemId:i,itemType:s,onRetried:c}){const[d,h]=y.useState(!1),[m,v]=y.useState(!1),g=QA[n.status]??PC,x=PA[n.status]??"text-muted-foreground",b=XA[n.status]??"bg-muted-foreground/30",E=n.status==="poisoned"||n.status==="failed",C=async()=>{h(!0);try{await bn(`/pipeline/retry/${encodeURIComponent(i)}`,{type:s,stage:n.stage}),c()}finally{h(!1)}},T=async()=>{v(!0);try{await bn(`/pipeline/skip/${encodeURIComponent(i)}`,{type:s,stage:n.stage}),c()}finally{v(!1)}};return u.jsxs("div",{className:"flex gap-3",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx(g,{className:je("h-5 w-5 shrink-0",x,n.status==="processing"&&"animate-spin")}),!l&&u.jsx("div",{className:je("mt-1 w-0.5 flex-1 min-h-[24px]",b)})]}),u.jsxs("div",{className:"flex-1 pb-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium",children:b1(n.stage)}),u.jsx(dt,{variant:n.status==="succeeded"?"default":n.status==="pending"?"secondary":"destructive",className:"text-xs",children:n.status}),n.attempt>1&&u.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["attempt ",n.attempt]}),E&&u.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u.jsxs(Ke,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",disabled:d||m,onClick:C,children:[d?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Retry"]}),u.jsxs(Ke,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs text-muted-foreground",disabled:d||m,onClick:T,children:[m?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(ij,{className:"h-3 w-3"}),"Skip"]})]})]}),u.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[n.started_at&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(w0,{className:"h-3 w-3"}),fh(n.started_at)]}),n.completed_at&&u.jsxs("span",{children:["completed ",fh(n.completed_at)]})]}),n.error_message&&u.jsxs("div",{className:"mt-2 rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs",children:[n.error_type&&u.jsxs("span",{className:"font-medium text-destructive",children:["[",n.error_type,"]"]})," ",u.jsx("span",{className:"text-destructive/80",children:n.error_message})]}),n.status==="succeeded"&&u.jsx(KA,{stage:n.stage,output:n.output})]})]})}function ZA({history:n}){const[l,i]=y.useState(!1);return n.length===0?null:u.jsxs("div",{className:"mt-2 border-t border-border pt-2",children:[u.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>i(!l),children:[l?u.jsx(Uc,{className:"h-3 w-3"}):u.jsx(_h,{className:"h-3 w-3"}),n.length," transition",n.length!==1?"s":""]}),l&&u.jsx("div",{className:"mt-2 max-h-64 overflow-y-auto space-y-1",children:n.map(s=>u.jsxs("div",{className:"flex items-start gap-3 rounded-md bg-muted/30 px-3 py-1.5 text-xs",children:[u.jsxs("span",{className:"shrink-0 font-mono text-muted-foreground",children:["#",s.id]}),u.jsx("span",{className:"font-medium",children:b1(s.stage)}),u.jsx(dt,{variant:s.status==="succeeded"?"default":s.status==="pending"?"secondary":"destructive",className:"text-[10px] px-1.5 py-0",children:s.status}),s.attempt>1&&u.jsxs("span",{className:"font-mono text-muted-foreground",children:["att.",s.attempt]}),u.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:fh(s.created_at)}),s.error_message&&u.jsx("span",{className:"basis-full mt-0.5 text-destructive/70 break-all",children:s.error_message})]},s.id))})]})}function IA({sessionId:n,onDone:l}){const[i,s]=y.useState(!1),c=async()=>{s(!0);try{await bn("/reprocess",{session:n}),l()}finally{s(!1)}};return u.jsxs(Ke,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs",disabled:i,onClick:c,children:[i?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(nl,{className:"h-3 w-3"}),"Reprocess"]})}function $A({itemId:n,itemType:l}){const{data:i,isLoading:s,isError:c,refetch:d}=er({queryKey:["pipeline-item-detail",n,l],queryFn:({signal:v})=>sn(`/pipeline/items/${encodeURIComponent(n)}?type=${encodeURIComponent(l)}`,{signal:v}),staleTime:GA});if(s)return u.jsxs("div",{className:"flex items-center gap-2 py-4 px-4 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading item details..."]});if(c||!i)return u.jsx("div",{className:"py-4 px-4 text-sm text-muted-foreground",children:"Failed to load item details"});const h=new Map(i.stages.map(v=>[v.stage,v])),m=YA.filter(v=>h.has(v)).map(v=>h.get(v));return u.jsxs("div",{className:"space-y-3 rounded-md border border-border bg-card/50 px-4 py-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:"ID:"})," ",u.jsx("span",{className:"font-mono",children:i.id})]}),u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:"Type:"})," ",u.jsx(dt,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:i.type})]})]}),i.type==="session"&&u.jsx(IA,{sessionId:i.id,onDone:()=>d()})]}),u.jsx("div",{className:"mt-3",children:m.map((v,g)=>u.jsx(FA,{stageStatus:v,isLast:g===m.length-1,itemId:i.id,itemType:i.type,onRetried:()=>d()},v.stage))}),u.jsx(ZA,{history:i.history})]})}const gs=50,Nt="all",JA=zh,WA=["pending","processing","succeeded","failed","blocked","poisoned"],e4=["session","spore","artifact"],S1={capture:"Capture",extraction:"Extraction",embedding:"Embedding",consolidation:"Consolidation",digest:"Digest"},t4={succeeded:"default",pending:"secondary",processing:"outline",failed:"destructive",blocked:"destructive",poisoned:"destructive"},n4={succeeded:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/30",pending:"",processing:"border-amber-400/50 text-amber-600 dark:text-amber-400",failed:"",blocked:"bg-red-500/10",poisoned:"bg-red-600/15 text-red-700 dark:text-red-400 border-red-600/30"},a4={session:p0,spore:sj,artifact:ej},fx=12;function l4(n){return n.length>fx?n.slice(0,fx)+"...":n}function r4({stage:n,status:l,type:i,onStageChange:s,onStatusChange:c,onTypeChange:d}){return u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs(Es,{value:n,onValueChange:s,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Stage"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All stages"}),JA.map(h=>u.jsx(Hn,{value:h,children:S1[h]??h},h))]})]}),u.jsxs(Es,{value:l,onValueChange:c,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Status"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All statuses"}),WA.map(h=>u.jsx(Hn,{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]}),u.jsxs(Es,{value:i,onValueChange:d,children:[u.jsx(Zr,{className:"w-36 h-8 text-xs",children:u.jsx(Cs,{placeholder:"Type"})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:Nt,children:"All types"}),e4.map(h=>u.jsx(Hn,{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]})]})}function i4({total:n,offset:l,pageSize:i,onPrevious:s,onNext:c}){const d=Math.floor(l/i)+1,h=Math.max(1,Math.ceil(n/i));return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-xs text-muted-foreground",children:[n," item",n!==1?"s":""]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(Ke,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",disabled:l===0,onClick:s,children:u.jsx(m0,{className:"h-4 w-4"})}),u.jsxs("span",{className:"text-xs text-muted-foreground px-2",children:[d," / ",h]}),u.jsx(Ke,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",disabled:l+i>=n,onClick:c,children:u.jsx(_h,{className:"h-4 w-4"})})]})]})}function s4({item:n,isExpanded:l,onToggle:i}){const s=a4[n.item_type]??p0,c=t4[n.status]??"secondary",d=n4[n.status]??"";return u.jsxs("div",{className:"border-b border-border last:border-b-0",children:[u.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent/50",onClick:i,children:[l?u.jsx(YC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):u.jsx(Uc,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),u.jsx(s,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),u.jsx("span",{className:"font-mono text-xs text-foreground",title:n.id,children:l4(n.id)}),u.jsx("span",{className:"text-xs text-muted-foreground",children:S1[n.stage]??n.stage}),u.jsx(dt,{variant:c,className:je("ml-auto text-[10px] px-1.5 py-0",d),children:n.status}),n.attempt>1&&u.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["x",n.attempt]})]}),!l&&n.error_message&&u.jsx("div",{className:"px-3 pb-2 pl-[60px]",children:u.jsx("p",{className:"truncate text-xs text-destructive/70",children:n.error_message})}),l&&u.jsx("div",{className:"px-3 pb-3 pl-8",children:u.jsx($A,{itemId:n.id,itemType:n.item_type})})]})}function o4({onRetried:n}){const[l,i]=y.useState(!1),s=async()=>{i(!0);try{await bn("/pipeline/retry-all",{}),n()}finally{i(!1)}};return u.jsxs(Ke,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",disabled:l,onClick:s,children:[l?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Retry All Poisoned"]})}function c4(){const[n,l]=pC(),[i,s]=y.useState(n.get("stage")??Nt),[c,d]=y.useState(n.get("status")??Nt),[h,m]=y.useState(n.get("type")??Nt),[v,g]=y.useState(0),[x,b]=y.useState(null),E=y.useCallback((q,X,G)=>{G(X),g(0),b(null),l(Q=>{const ee=new URLSearchParams(Q);return X===Nt?ee.delete(q):ee.set(q,X),ee},{replace:!0})},[l]),C=new URLSearchParams;i!==Nt&&C.set("stage",i),c!==Nt&&C.set("status",c),h!==Nt&&C.set("type",h),C.set("limit",String(gs)),C.set("offset",String(v));const{data:T,isLoading:w,isError:j,refetch:N}=qs({queryKey:["pipeline-items",i,c,h,v],queryFn:({signal:q})=>sn(`/pipeline/items?${C.toString()}`,{signal:q}),refetchInterval:hi.STATS,pollCategory:"standard"});y.useEffect(()=>{const q=n.get("stage"),X=n.get("status"),G=n.get("type");(q??Nt)!==i&&s(q??Nt),(X??Nt)!==c&&d(X??Nt),(G??Nt)!==h&&m(G??Nt)},[n]);const O=(T==null?void 0:T.items)??[],M=(T==null?void 0:T.total)??0,z=O.some(q=>q.status==="poisoned");return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsx(r4,{stage:i,status:c,type:h,onStageChange:q=>E("stage",q,s),onStatusChange:q=>E("status",q,d),onTypeChange:q=>E("type",q,m)}),z&&u.jsx(o4,{onRetried:()=>N()})]}),u.jsxs("div",{className:"rounded-md border border-border",children:[w&&u.jsxs("div",{className:"flex items-center justify-center gap-2 py-8 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading work items..."]}),j&&u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Failed to load work items"}),!w&&!j&&O.length===0&&u.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No items match the current filters"}),!w&&O.length>0&&u.jsx("div",{children:O.map(q=>{const X=`${q.id}-${q.item_type}-${q.stage}`;return u.jsx(s4,{item:q,isExpanded:x===X,onToggle:()=>b(G=>G===X?null:X)},X)})})]}),M>gs&&u.jsx(i4,{total:M,offset:v,pageSize:gs,onPrevious:()=>g(q=>Math.max(0,q-gs)),onNext:()=>g(q=>q+gs)})]})}const u4={llm:"LLM (Extraction)",embedding:"Embedding","digest-llm":"LLM (Digest & Consolidation)"},f4={closed:b0,open:Mh,"half-open":rj},d4={closed:"default",open:"destructive","half-open":"outline"},h4={closed:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/30",open:"","half-open":"border-amber-400/50 text-amber-600 dark:text-amber-400"},m4={closed:"border-border",open:"border-red-500/40","half-open":"border-amber-400/40"};function p4(n){if(!n)return null;const l=new Date(n).getTime()-Date.now();if(l<=0)return null;const i=Math.ceil(l/1e3);return i<60?`${i}s`:`${Math.ceil(i/60)}m`}function g4(n){if(n.state==="closed")return null;if(!n.last_error)return n.state==="open"?"Circuit is open. Reset to resume processing.":"Circuit is testing. Next request will determine state.";const l=n.last_error.toLowerCase();return l.includes("timeout")||l.includes("timed out")?"Provider may be overloaded. Check model server responsiveness before resetting.":l.includes("connection")||l.includes("econnrefused")?"Provider unreachable. Verify the server is running and the URL is correct.":l.includes("401")||l.includes("403")||l.includes("auth")?"Authentication failure. Check your API key or credentials.":l.includes("rate")||l.includes("429")?"Rate limited. Wait for cooldown or switch to a different provider.":n.state==="open"?"Review the error and reset when ready to retry.":"Half-open: next request will probe the provider."}function y4({circuit:n,onReset:l}){const[i,s]=y.useState(!1),c=f4[n.state]??b0,d=d4[n.state]??"secondary",h=h4[n.state]??"",m=m4[n.state]??"border-border",v=n.state==="open"?p4(n.opens_at):null,g=g4(n),x=async()=>{s(!0);try{await bn(`/pipeline/circuit/${encodeURIComponent(n.provider_role)}/reset`,{}),l()}finally{s(!1)}};return u.jsxs("div",{className:je("rounded-lg border p-4 transition-colors",m),children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(c,{className:je("h-5 w-5 shrink-0",n.state==="closed"&&"text-emerald-500",n.state==="open"&&"text-red-500",n.state==="half-open"&&"text-amber-500")}),u.jsxs("div",{children:[u.jsx("span",{className:"text-sm font-medium",children:u4[n.provider_role]??n.provider_role}),u.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[u.jsx(dt,{variant:d,className:je("text-[10px] px-1.5 py-0",h),children:n.state}),n.failure_count>0&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[n.failure_count," failure",n.failure_count!==1?"s":""]}),v&&u.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["cooldown: ",v]})]})]})]}),n.state!=="closed"&&u.jsxs(Ke,{variant:"outline",size:"sm",className:"shrink-0 h-7 gap-1.5 text-xs",disabled:i,onClick:x,children:[i?u.jsx(Mt,{className:"h-3 w-3 animate-spin"}):u.jsx(Bs,{className:"h-3 w-3"}),"Reset"]})]}),n.last_error&&u.jsx("p",{className:"mt-2 text-xs text-destructive/80 break-words",children:n.last_error}),g&&u.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground italic",children:g})]})}function v4(){const{data:n,isLoading:l,isError:i,refetch:s}=qs({queryKey:["pipeline-circuits"],queryFn:({signal:c})=>sn("/pipeline/circuits",{signal:c}),refetchInterval:hi.STATS,pollCategory:"standard"});return l?u.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted-foreground",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),"Loading circuit breakers..."]}):i||!n?u.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"Circuit breaker data unavailable"}):n.length===0?u.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"No circuit breakers registered yet. They appear after the first pipeline tick."}):u.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:n.map(c=>u.jsx(y4,{circuit:c,onReset:()=>s()},c.provider_role))})}const x4=15e3,b4=[1500,3e3,5e3,7500,1e4];function S4(n){return n<1e3?`${n}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${(n/6e4).toFixed(1)}m`}function w4(){const[n,l]=y.useState(!1),[i,s]=y.useState("force"),[c,d]=y.useState("3000"),{data:h,isLoading:m}=er({queryKey:["digest-health"],queryFn:({signal:x})=>sn("/pipeline/digest-health",{signal:x}),refetchInterval:x4});if(m||!h)return null;const v=h.substrate_threshold>0?Math.min(100,Math.round(h.substrate_ready/h.substrate_threshold*100)):100;Math.max(0,h.substrate_threshold-h.substrate_ready);const g=async()=>{l(!0);try{i==="tier"?await bn("/digest",{tier:Number(c)}):await bn("/pipeline/digest/force",{})}finally{l(!1)}};return u.jsxs("div",{className:"space-y-4",children:[h.cycle_in_progress&&u.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-600 dark:text-amber-400",children:[u.jsx(Mt,{className:"h-4 w-4 animate-spin"}),u.jsx("span",{className:"font-medium",children:"Digest cycle in progress"})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[u.jsx(FC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),u.jsx("div",{className:"h-2 flex-1 min-w-[80px] rounded-full bg-muted",children:u.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:`${v}%`}})}),u.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[h.substrate_ready,"/",h.substrate_threshold]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(dt,{variant:h.metabolism_state==="active"?"default":"secondary",className:"text-xs",children:[u.jsx(Rh,{className:"mr-1 h-3 w-3"}),h.metabolism_state]}),h.digest_ready&&u.jsxs(dt,{variant:"default",className:"text-xs",children:[u.jsx(dj,{className:"mr-1 h-3 w-3"}),"Ready"]})]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Ke,{variant:i==="force"?"default":"outline",size:"sm",onClick:()=>s("force"),children:"Full Cycle"}),u.jsx(Ke,{variant:i==="tier"?"default":"outline",size:"sm",onClick:()=>s("tier"),children:"Single Tier"}),i==="tier"&&u.jsxs(Es,{value:c,onValueChange:d,children:[u.jsx(Zr,{className:"h-8 w-24",children:u.jsx(Cs,{})}),u.jsx(Ir,{children:b4.map(x=>u.jsxs(Hn,{value:String(x),children:["T",x]},x))})]}),u.jsx(Ke,{variant:"outline",size:"sm",disabled:n,onClick:g,children:n?"Running...":i==="tier"?`Run T${c}`:"Force Digest"})]}),h.last_cycle&&u.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[u.jsx(kc,{className:"h-3 w-3"}),u.jsx("span",{children:u.jsx("span",{className:"text-foreground",children:L0(h.last_cycle.timestamp)})}),u.jsxs("span",{children:[h.last_cycle.substrate_count," notes"]}),u.jsx("span",{children:S4(h.last_cycle.duration_ms)}),u.jsxs("span",{children:["T[",h.last_cycle.tiers_generated.join(", "),"]"]}),u.jsx("span",{className:"truncate",children:h.last_cycle.model})]})]})}function w1(n){return er({queryKey:["progress",n],queryFn:({signal:l})=>sn(`/progress/${n}`,{signal:l}),enabled:!!n,refetchInterval:l=>{const i=l.state.data;return(i==null?void 0:i.status)==="completed"||(i==null?void 0:i.status)==="failed"?!1:hi.PROGRESS}})}const E4=4e3;function E1({label:n,endpoint:l,body:i,description:s,icon:c,onComplete:d,disabled:h}){const[m,v]=y.useState("idle"),[g,x]=y.useState(null),[b,E]=y.useState(null),{data:C}=w1(g);y.useEffect(()=>{C&&(C.status==="completed"?(v("complete"),E(C.message??"Done"),x(null),d==null||d(C.result)):C.status==="failed"&&(v("failed"),E(C.message??"Failed"),x(null)))},[C,d]),y.useEffect(()=>{if(m!=="complete"&&m!=="failed")return;const O=setTimeout(()=>{v("idle"),E(null)},E4);return()=>clearTimeout(O)},[m]);const T=y.useCallback(async()=>{v("submitting");try{const O=await bn(l,i);O.token?(x(O.token),v("tracking")):(v("complete"),E("Done"),d==null||d(O))}catch{v("failed"),E("Request failed")}},[l,i,d]),w=m==="submitting"||m==="tracking",j=m==="tracking"&&(C==null?void 0:C.percent)!=null?C.percent:null,N=m==="tracking"?C==null?void 0:C.message:null;return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs(Ke,{variant:"outline",size:"sm",className:je("gap-2 transition-colors",m==="complete"&&"border-primary/50 text-primary",m==="failed"&&"border-destructive/50 text-destructive"),disabled:w||h,onClick:T,children:[w?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):m==="complete"?u.jsx(Ah,{className:"h-4 w-4"}):m==="failed"?u.jsx(Oh,{className:"h-4 w-4"}):c,w?N??"Running...":b??n]}),j!==null&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[Math.round(j),"%"]})]}),w&&j!==null&&u.jsx("div",{className:"mt-2 h-1.5 w-full rounded-full bg-muted overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:`${j}%`}})}),s&&m==="idle"&&u.jsx("p",{className:"text-xs text-muted-foreground",children:s})]})}const C4=6e3;function j4(){const[n,l]=y.useState("idle"),[i,s]=y.useState(null),[c,d]=y.useState(null),[h,m]=y.useState("idle"),[v,g]=y.useState(null),[x,b]=y.useState(null),{data:E}=w1(v);y.useEffect(()=>{E&&(E.status==="completed"?(m("complete"),b(E.message??"Curation complete"),g(null),s(null),l("idle")):E.status==="failed"&&(m("failed"),b(E.message??"Curation failed"),g(null)))},[E]),y.useEffect(()=>{if(h!=="complete"&&h!=="failed")return;const N=setTimeout(()=>{m("idle"),b(null)},C4);return()=>clearTimeout(N)},[h]);const C=y.useCallback(async()=>{l("loading"),d(null);try{const N=await bn("/curate",{dry_run:!0});s(N),l("loaded")}catch{d("Failed to load curation preview"),l("error")}},[]),T=y.useCallback(async()=>{m("submitting");try{const N=await bn("/curate",{dry_run:!1});N.token?(g(N.token),m("tracking")):(m("complete"),b("Curation complete"))}catch{m("failed"),b("Curation request failed")}},[]),w=h==="submitting"||h==="tracking",j=h==="tracking"&&(E==null?void 0:E.percent)!=null?E.percent:null;return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs(Ke,{variant:"outline",size:"sm",className:"gap-2",disabled:n==="loading"||w,onClick:C,children:[n==="loading"?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):u.jsx(XC,{className:"h-4 w-4"}),n==="loading"?"Scanning...":"Preview"]}),u.jsxs(Ke,{variant:"outline",size:"sm",className:je("gap-2 transition-colors",h==="complete"&&"border-primary/50 text-primary",h==="failed"&&"border-destructive/50 text-destructive"),disabled:w||n==="loading",onClick:T,children:[w?u.jsx(Mt,{className:"h-4 w-4 animate-spin"}):h==="complete"?u.jsx(Ah,{className:"h-4 w-4"}):h==="failed"?u.jsx(Oh,{className:"h-4 w-4"}):u.jsx(y0,{className:"h-4 w-4"}),w?(E==null?void 0:E.message)??"Curating...":x??"Execute"]}),j!==null&&u.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[Math.round(j),"%"]})]}),w&&j!==null&&u.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-secondary",children:u.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:`${j}%`}})}),n==="error"&&c&&u.jsx("p",{className:"text-sm text-destructive",children:c}),n==="loaded"&&i&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"rounded-md border border-border bg-background p-3 text-sm space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Spores scanned"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:i.scanned})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Clusters evaluated"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:i.clustersEvaluated})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-muted-foreground",children:"Would supersede"}),u.jsx(dt,{variant:i.superseded>0?"destructive":"secondary",className:"font-mono text-xs",children:i.superseded})]})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:i.superseded===0?"No duplicate spores found.":`${i.superseded} spore${i.superseded===1?"":"s"} would be superseded. Run Execute to apply.`})]})]})}const N4=3e4,ys="__all__",dx="all",vs="date",yc="failed",zd="index-only";function T4(){const[n,l]=y.useState(dx),[i,s]=y.useState(ys),{data:c}=er({queryKey:["sessions"],queryFn:({signal:b})=>sn("/sessions",{signal:b}),staleTime:N4}),d=(c==null?void 0:c.dates)??[],h=(c==null?void 0:c.sessions)??[],m=h.filter(b=>b.hasFailed).length,v=y.useMemo(()=>{switch(n){case vs:return i!==ys?{date:i}:{};case yc:return{failed:!0};case zd:return{index_only:!0};default:return{}}},[n,i]),g=y.useMemo(()=>n===vs&&i!==ys?h.filter(b=>b.date===i).length:n===yc?m:h.length,[n,i,h,m]),x=y.useMemo(()=>{switch(n){case vs:return i!==ys?`Reprocess ${i}`:"Reprocess All";case yc:return`Reprocess ${m} Failed`;case zd:return"Re-index Only (no LLM)";default:return"Reprocess All"}},[n,i,m]);return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-2",children:[[dx,"All Sessions"],[vs,"By Date"],[yc,"Failed Only"],[zd,"Index Only"]].map(([b,E])=>u.jsx("button",{type:"button",onClick:()=>l(b),className:`rounded-md border px-3 py-1 text-xs transition-colors ${n===b?"border-primary bg-primary text-primary-foreground":"border-input bg-transparent text-muted-foreground hover:text-foreground"}`,children:E},b))}),n===vs&&d.length>0&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm text-muted-foreground",children:"Date:"}),u.jsxs(Es,{value:i,onValueChange:s,children:[u.jsx(Zr,{className:"w-40",children:u.jsx(Cs,{})}),u.jsxs(Ir,{children:[u.jsx(Hn,{value:ys,children:"All dates"}),d.map(b=>u.jsx(Hn,{value:b,children:b},b))]})]})]}),u.jsx(E1,{label:x,endpoint:"/reprocess",body:v,icon:u.jsx(kc,{className:"h-4 w-4"}),description:`Re-extract observations and regenerate summaries for ${g} session(s).`}),u.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Sessions:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:h.length})]}),m>0&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Dh,{className:"h-3.5 w-3.5 text-yellow-500"}),u.jsx("span",{className:"text-muted-foreground",children:"Failed:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs text-yellow-600 dark:text-yellow-400",children:m})]})]})]})}function R4(){const{data:n,isLoading:l,isError:i,error:s}=Vs();return u.jsx(Uh,{isLoading:l,error:i?s instanceof Error?s:new Error("Unable to reach daemon"):null,loadingText:"Connecting to daemon...",children:n&&u.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(g0,{className:"h-5 w-5 text-primary"}),u.jsx("h1",{className:"text-xl font-semibold",children:"Mycelium"})]}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Pipeline integrity and processing health"})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsx(At,{className:"text-sm",children:"Pipeline Flow"}),u.jsx(pa,{children:"Live status of items progressing through the processing pipeline."})]}),u.jsx(Ot,{children:u.jsx(z0,{})})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(h0,{className:"h-4 w-4 text-primary"}),"Digest"]}),u.jsx(pa,{children:"Substrate accumulation, metabolism state, and cycle activity."})]}),u.jsx(Ot,{children:u.jsx(w4,{})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(Mh,{className:"h-4 w-4 text-primary"}),"Circuit Breakers"]}),u.jsx(pa,{children:"Per-provider circuit breaker state and controls. Reset open circuits to resume processing."})]}),u.jsx(Ot,{children:u.jsx(v4,{})})]})]}),u.jsxs(Rt,{id:"work-items",children:[u.jsxs(_t,{className:"pb-3",children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx($C,{className:"h-4 w-4 text-primary"}),"Work Items"]}),u.jsx(pa,{children:"Filter and inspect individual pipeline items. Click a row to see full stage history."})]}),u.jsx(Ot,{children:u.jsx(c4,{})})]}),u.jsxs("section",{children:[u.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Utilities"}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(S0,{className:"h-4 w-4 text-primary"}),"Curation"]}),u.jsx(pa,{children:"Find and consolidate duplicate spores in the vault. Preview shows which pairs would be merged; execute performs the consolidation."})]}),u.jsx(Ot,{children:u.jsx(j4,{})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(nl,{className:"h-4 w-4 text-primary"}),"Rebuild Index"]}),u.jsx(pa,{children:"Reindex all vault notes for full-text search and vector embeddings."})]}),u.jsx(Ot,{children:u.jsxs("div",{className:"space-y-4",children:[u.jsx(E1,{label:"Rebuild",endpoint:"/rebuild",icon:u.jsx(nl,{className:"h-4 w-4"}),description:"Rebuilds FTS5 and vector indexes from all vault notes."}),u.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"FTS entries:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:n.index.fts_entries})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Vectors:"}),u.jsx(dt,{variant:"secondary",className:"font-mono text-xs",children:n.index.vector_count})]})]})]})})]}),u.jsxs(Rt,{children:[u.jsxs(_t,{children:[u.jsxs(At,{className:"flex items-center gap-2 text-sm",children:[u.jsx(kc,{className:"h-4 w-4 text-primary"}),"Reprocess"]}),u.jsx(pa,{children:"Re-extract observations and regenerate summaries for past sessions. Useful after LLM configuration changes or processing failures."})]}),u.jsx(Ot,{children:u.jsx(T4,{})})]})]})]})]})})}const _4=200,hx=5e3,A4=40,O4={debug:"border-transparent bg-muted text-muted-foreground",info:"border-transparent bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",warn:"border-transparent bg-amber-500/15 text-amber-600 dark:text-amber-400",error:"border-transparent bg-red-500/15 text-red-600 dark:text-red-400"};function M4(n){const l=new Date(n),i=String(l.getHours()).padStart(2,"0"),s=String(l.getMinutes()).padStart(2,"0"),c=String(l.getSeconds()).padStart(2,"0");return`${i}:${s}:${c}`}function D4(n){return n.scrollHeight-n.scrollTop-n.clientHeight<=A4}function z4(){const[n,l]=y.useState([]),[i,s]=y.useState(void 0),[c,d]=y.useState("debug"),[h,m]=y.useState(""),[v,g]=y.useState(new Set),[x,b]=y.useState([]),[E,C]=y.useState(!0),[T,w]=y.useState(!1),j=y.useRef(null),N=y.useRef(E);N.current=E;const O=y.useRef(i);O.current=i;const{data:M}=qs({queryKey:["logs"],queryFn:({signal:Q})=>{const ee=new URLSearchParams({limit:String(_4)});return O.current&&ee.set("since",O.current),sn(`/logs?${ee.toString()}`,{signal:Q})},refetchInterval:hi.LOGS,pollCategory:"standard"});y.useEffect(()=>{M!=null&&M.entries.length&&(l(Q=>{let ee;if(M.cursor_reset){const ne=new Set(Q.map(te=>`${te.timestamp}|${te.message}`)),ie=M.entries.filter(te=>!ne.has(`${te.timestamp}|${te.message}`));ee=ie.length?[...Q,...ie]:Q}else ee=[...Q,...M.entries];return ee.length>hx?ee.slice(-hx):ee}),s(M.cursor),b(Q=>{const ee=new Set(Q);let ne=!1;for(const ie of M.entries)ee.has(ie.category)||(ee.add(ie.category),ne=!0);return ne?Array.from(ee).sort():Q}),N.current||w(!0))},[M]),y.useEffect(()=>{!E||!j.current||(j.current.scrollTop=j.current.scrollHeight,w(!1))},[n,E]);const z=y.useCallback(()=>{const Q=j.current;Q&&(D4(Q)?(C(!0),w(!1)):C(!1))},[]),q=y.useCallback(()=>{j.current&&(j.current.scrollTop=j.current.scrollHeight,C(!0),w(!1))},[]),X=y.useCallback(()=>{l([]),b([]),w(!1)},[]),G=y.useMemo(()=>{const Q=Dv[c],ee=h.trim().toLowerCase();return n.filter(ne=>!(Dv[ne.level]<Q||v.size>0&&!v.has(ne.category)||ee&&!ne.message.toLowerCase().includes(ee)))},[n,c,v,h]);return u.jsxs("div",{className:"flex h-full flex-col",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-card px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-2 mr-2",children:[u.jsx(v0,{className:"h-4 w-4 text-primary"}),u.jsx("span",{className:"text-sm font-semibold",children:"Logs"})]}),u.jsx("div",{className:"flex items-center gap-1",children:Sj.map(Q=>u.jsx(Ke,{size:"sm",variant:c===Q?"default":"outline",className:"h-7 px-2 text-xs capitalize",onClick:()=>d(Q),children:Q},Q))}),x.length>0&&u.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[u.jsx("span",{className:"text-[10px] text-muted-foreground mr-0.5",children:"cat:"}),x.map(Q=>u.jsx(Ke,{size:"sm",variant:v.has(Q)?"default":"ghost",className:"h-5 px-1.5 text-[10px]",onClick:()=>{g(ee=>{const ne=new Set(ee);return ne.has(Q)?ne.delete(Q):ne.add(Q),ne})},children:Q},Q)),v.size>0&&u.jsx(Ke,{size:"sm",variant:"ghost",className:"h-5 px-1.5 text-[10px] text-muted-foreground",onClick:()=>g(new Set),children:"clear"})]}),u.jsx(ze,{className:"h-7 w-48 text-xs",placeholder:"Filter messages...",value:h,onChange:Q=>m(Q.target.value)}),u.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u.jsxs(Ke,{size:"sm",variant:E?"default":"outline",className:"h-7 gap-1.5 px-2 text-xs",onClick:()=>{E?C(!1):q()},title:E?"Pause auto-scroll":"Resume auto-scroll",children:[E?u.jsx(tj,{className:"h-3 w-3"}):u.jsx(y0,{className:"h-3 w-3"}),E?"Pause":"Resume"]}),u.jsxs(Ke,{size:"sm",variant:"outline",className:"h-7 gap-1.5 px-2 text-xs text-muted-foreground",onClick:X,title:"Clear log entries",children:[u.jsx(cj,{className:"h-3 w-3"}),"Clear"]})]})]}),u.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[u.jsx("div",{ref:j,onScroll:z,className:"h-full overflow-y-auto font-mono text-xs",children:G.length===0?u.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No log entries"}):u.jsx("table",{className:"w-full border-collapse",children:u.jsx("tbody",{children:G.map((Q,ee)=>u.jsx(L4,{entry:Q},`${Q.timestamp}-${ee}`))})})}),T&&!E&&u.jsxs("button",{type:"button",onClick:q,className:je("absolute bottom-4 left-1/2 -translate-x-1/2","flex items-center gap-1.5 rounded-full border border-border","bg-card px-3 py-1.5 text-xs font-medium shadow-md","text-muted-foreground transition-colors hover:text-foreground"),children:[u.jsx(qC,{className:"h-3 w-3"}),"New entries below"]})]})]})}function L4({entry:n}){return u.jsxs("tr",{className:"border-b border-border/40 hover:bg-accent/30 transition-colors",children:[u.jsx("td",{className:"whitespace-nowrap py-1 pl-4 pr-3 text-muted-foreground/70 align-top w-[68px]",children:M4(n.timestamp)}),u.jsx("td",{className:"whitespace-nowrap py-1 pr-3 align-top w-[54px]",children:u.jsx(dt,{className:je("px-1.5 py-0 text-[10px] font-medium uppercase",O4[n.level]),children:n.level})}),u.jsx("td",{className:"whitespace-nowrap py-1 pr-3 text-muted-foreground align-top w-[120px] truncate max-w-[120px]",children:n.category}),u.jsx("td",{className:"py-1 pr-4 text-foreground align-top break-words",children:n.message})]})}function U4(){return u.jsx(qE,{children:u.jsxs(Yr,{element:u.jsx(yN,{}),children:[u.jsx(Yr,{path:"/",element:u.jsx(VN,{})}),u.jsx(Yr,{path:"/configuration",element:u.jsx(qR,{})}),u.jsx(Yr,{path:"/mycelium",element:u.jsx(R4,{})}),u.jsx(Yr,{path:"/logs",element:u.jsx(z4,{})})]})})}const k4=new Tw({defaultOptions:{queries:{staleTime:xj}}});nw.createRoot(document.getElementById("root")).render(u.jsx(ma.StrictMode,{children:u.jsx(CC,{children:u.jsx(OC,{children:u.jsx(LC,{children:u.jsx(Rw,{client:k4,children:u.jsx(fC,{children:u.jsx(U4,{})})})})})})}));