@openparachute/hub 0.7.4-rc.2 → 0.7.4-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -11
- package/src/__tests__/admin-auth.test.ts +128 -0
- package/src/__tests__/admin-clients.test.ts +103 -1
- package/src/__tests__/admin-lock.test.ts +7 -1
- package/src/__tests__/admin-vaults.test.ts +216 -10
- package/src/__tests__/api-account-2fa.test.ts +453 -0
- package/src/__tests__/api-hub-upgrade.test.ts +59 -3
- package/src/__tests__/api-mint-token.test.ts +75 -0
- package/src/__tests__/api-modules.test.ts +143 -0
- package/src/__tests__/api-settings-root-redirect.test.ts +302 -0
- package/src/__tests__/auth.test.ts +336 -0
- package/src/__tests__/clients.test.ts +326 -8
- package/src/__tests__/cloudflare-connector-service.test.ts +3 -1
- package/src/__tests__/cors.test.ts +138 -1
- package/src/__tests__/doctor.test.ts +755 -0
- package/src/__tests__/hub-command.test.ts +69 -2
- package/src/__tests__/hub-server.test.ts +127 -5
- package/src/__tests__/hub-settings.test.ts +188 -0
- package/src/__tests__/init.test.ts +153 -0
- package/src/__tests__/jwt-sign.test.ts +27 -0
- package/src/__tests__/managed-unit.test.ts +62 -0
- package/src/__tests__/oauth-handlers.test.ts +626 -0
- package/src/__tests__/oauth-ui.test.ts +107 -1
- package/src/__tests__/scope-explanations.test.ts +19 -0
- package/src/__tests__/setup-gate.test.ts +111 -3
- package/src/__tests__/setup-wizard.test.ts +124 -7
- package/src/__tests__/supervisor.test.ts +25 -0
- package/src/__tests__/vault-names.test.ts +32 -3
- package/src/__tests__/vault-remove.test.ts +40 -19
- package/src/__tests__/well-known.test.ts +37 -2
- package/src/admin-agent-grants.ts +16 -1
- package/src/admin-auth.ts +13 -4
- package/src/admin-clients.ts +66 -5
- package/src/admin-grants.ts +11 -2
- package/src/admin-vaults.ts +77 -27
- package/src/api-account-2fa.ts +395 -0
- package/src/api-admin-lock.ts +7 -0
- package/src/api-hub-upgrade.ts +52 -4
- package/src/api-hub.ts +10 -1
- package/src/api-invites.ts +18 -3
- package/src/api-me.ts +11 -2
- package/src/api-mint-token.ts +16 -1
- package/src/api-modules.ts +119 -1
- package/src/api-revoke-token.ts +14 -1
- package/src/api-settings-hub-origin.ts +14 -1
- package/src/api-settings-root-redirect.ts +201 -0
- package/src/api-tokens.ts +14 -1
- package/src/api-users.ts +15 -6
- package/src/api-vault-caps.ts +11 -2
- package/src/cli.ts +56 -5
- package/src/clients.ts +178 -0
- package/src/commands/auth.ts +263 -1
- package/src/commands/doctor.ts +1250 -0
- package/src/commands/hub.ts +102 -1
- package/src/commands/init.ts +108 -0
- package/src/commands/vault-remove.ts +16 -24
- package/src/cors.ts +7 -3
- package/src/help.ts +65 -1
- package/src/hub-db.ts +14 -0
- package/src/hub-server.ts +173 -25
- package/src/hub-settings.ts +163 -1
- package/src/jwt-sign.ts +25 -6
- package/src/managed-unit.ts +30 -1
- package/src/oauth-handlers.ts +110 -7
- package/src/oauth-ui.ts +174 -0
- package/src/rate-limit.ts +28 -0
- package/src/scope-explanations.ts +2 -1
- package/src/setup-wizard.ts +40 -21
- package/src/supervisor.ts +46 -2
- package/src/vault-names.ts +15 -4
- package/src/well-known.ts +10 -1
- package/web/ui/dist/assets/{index--728BX3j.css → index-BcC4U5gM.css} +1 -1
- package/web/ui/dist/assets/index-CVqK1cV5.js +61 -0
- package/web/ui/dist/index.html +2 -2
- package/web/ui/dist/assets/index-DZzX_Enf.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();var Zr={exports:{}},Yl={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Eh;function lv(){if(Eh)return Yl;Eh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var y in f)y!=="key"&&(h[y]=f[y])}else h=f;return f=h.ref,{$$typeof:l,type:o,key:g,ref:f!==void 0?f:null,props:h}}return Yl.Fragment=r,Yl.jsx=c,Yl.jsxs=c,Yl}var Th;function iv(){return Th||(Th=1,Zr.exports=lv()),Zr.exports}var i=iv(),Xr={exports:{}},ce={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var kh;function sv(){if(kh)return ce;kh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),_=Symbol.iterator;function k(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,q={};function H(N,G,I){this.props=N,this.context=G,this.refs=q,this.updater=I||E}H.prototype.isReactComponent={},H.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,G,"setState")},H.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Q(){}Q.prototype=H.prototype;function Z(N,G,I){this.props=N,this.context=G,this.refs=q,this.updater=I||E}var P=Z.prototype=new Q;P.constructor=Z,z(P,H.prototype),P.isPureReactComponent=!0;var J=Array.isArray;function $(){}var w={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function X(N,G,I){var ae=I.ref;return{$$typeof:l,type:N,key:G,ref:ae!==void 0?ae:null,props:I}}function te(N,G){return X(N.type,G,N.props)}function le(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function ie(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return G[I]})}var W=/\/+/g;function ge(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):G.toString(36)}function be(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,G,I,ae,oe){var he=typeof N;(he==="undefined"||he==="boolean")&&(N=null);var we=!1;if(N===null)we=!0;else switch(he){case"bigint":case"string":case"number":we=!0;break;case"object":switch(N.$$typeof){case l:case r:we=!0;break;case x:return we=N._init,D(we(N._payload),G,I,ae,oe)}}if(we)return oe=oe(N),we=ae===""?"."+ge(N,0):ae,J(oe)?(I="",we!=null&&(I=we.replace(W,"$&/")+"/"),D(oe,G,I,"",function(Jn){return Jn})):oe!=null&&(le(oe)&&(oe=te(oe,I+(oe.key==null||N&&N.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+we)),G.push(oe)),1;we=0;var lt=ae===""?".":ae+":";if(J(N))for(var Ye=0;Ye<N.length;Ye++)ae=N[Ye],he=lt+ge(ae,Ye),we+=D(ae,G,I,he,oe);else if(Ye=k(N),typeof Ye=="function")for(N=Ye.call(N),Ye=0;!(ae=N.next()).done;)ae=ae.value,he=lt+ge(ae,Ye++),we+=D(ae,G,I,he,oe);else if(he==="object"){if(typeof N.then=="function")return D(be(N),G,I,ae,oe);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return we}function F(N,G,I){if(N==null)return N;var ae=[],oe=0;return D(N,ae,"","",function(he){return G.call(I,he,oe++)}),ae}function re(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var ke=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ze={map:F,forEach:function(N,G,I){F(N,function(){G.apply(this,arguments)},I)},count:function(N){var G=0;return F(N,function(){G++}),G},toArray:function(N){return F(N,function(G){return G})||[]},only:function(N){if(!le(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ce.Activity=j,ce.Children=ze,ce.Component=H,ce.Fragment=c,ce.Profiler=f,ce.PureComponent=Z,ce.StrictMode=o,ce.Suspense=m,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ce.__COMPILER_RUNTIME={__proto__:null,c:function(N){return w.H.useMemoCache(N)}},ce.cache=function(N){return function(){return N.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(N,G,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ae=z({},N.props),oe=N.key;if(G!=null)for(he in G.key!==void 0&&(oe=""+G.key),G)!U.call(G,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&G.ref===void 0||(ae[he]=G[he]);var he=arguments.length-2;if(he===1)ae.children=I;else if(1<he){for(var we=Array(he),lt=0;lt<he;lt++)we[lt]=arguments[lt+2];ae.children=we}return X(N.type,oe,ae)},ce.createContext=function(N){return N={$$typeof:g,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ce.createElement=function(N,G,I){var ae,oe={},he=null;if(G!=null)for(ae in G.key!==void 0&&(he=""+G.key),G)U.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(oe[ae]=G[ae]);var we=arguments.length-2;if(we===1)oe.children=I;else if(1<we){for(var lt=Array(we),Ye=0;Ye<we;Ye++)lt[Ye]=arguments[Ye+2];oe.children=lt}if(N&&N.defaultProps)for(ae in we=N.defaultProps,we)oe[ae]===void 0&&(oe[ae]=we[ae]);return X(N,he,oe)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(N){return{$$typeof:y,render:N}},ce.isValidElement=le,ce.lazy=function(N){return{$$typeof:x,_payload:{_status:-1,_result:N},_init:re}},ce.memo=function(N,G){return{$$typeof:v,type:N,compare:G===void 0?null:G}},ce.startTransition=function(N){var G=w.T,I={};w.T=I;try{var ae=N(),oe=w.S;oe!==null&&oe(I,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then($,ke)}catch(he){ke(he)}finally{G!==null&&I.types!==null&&(G.types=I.types),w.T=G}},ce.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ce.use=function(N){return w.H.use(N)},ce.useActionState=function(N,G,I){return w.H.useActionState(N,G,I)},ce.useCallback=function(N,G){return w.H.useCallback(N,G)},ce.useContext=function(N){return w.H.useContext(N)},ce.useDebugValue=function(){},ce.useDeferredValue=function(N,G){return w.H.useDeferredValue(N,G)},ce.useEffect=function(N,G){return w.H.useEffect(N,G)},ce.useEffectEvent=function(N){return w.H.useEffectEvent(N)},ce.useId=function(){return w.H.useId()},ce.useImperativeHandle=function(N,G,I){return w.H.useImperativeHandle(N,G,I)},ce.useInsertionEffect=function(N,G){return w.H.useInsertionEffect(N,G)},ce.useLayoutEffect=function(N,G){return w.H.useLayoutEffect(N,G)},ce.useMemo=function(N,G){return w.H.useMemo(N,G)},ce.useOptimistic=function(N,G){return w.H.useOptimistic(N,G)},ce.useReducer=function(N,G,I){return w.H.useReducer(N,G,I)},ce.useRef=function(N){return w.H.useRef(N)},ce.useState=function(N){return w.H.useState(N)},ce.useSyncExternalStore=function(N,G,I){return w.H.useSyncExternalStore(N,G,I)},ce.useTransition=function(){return w.H.useTransition()},ce.version="19.2.5",ce}var _h;function oc(){return _h||(_h=1,Xr.exports=sv()),Xr.exports}var b=oc(),Qr={exports:{}},Gl={},$r={exports:{}},Jr={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Ah;function uv(){return Ah||(Ah=1,(function(l){function r(D,F){var re=D.length;D.push(F);e:for(;0<re;){var ke=re-1>>>1,ze=D[ke];if(0<f(ze,F))D[ke]=F,D[re]=ze,re=ke;else break e}}function c(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var F=D[0],re=D.pop();if(re!==F){D[0]=re;e:for(var ke=0,ze=D.length,N=ze>>>1;ke<N;){var G=2*(ke+1)-1,I=D[G],ae=G+1,oe=D[ae];if(0>f(I,re))ae<ze&&0>f(oe,I)?(D[ke]=oe,D[ae]=re,ke=ae):(D[ke]=I,D[G]=re,ke=G);else if(ae<ze&&0>f(oe,re))D[ke]=oe,D[ae]=re,ke=ae;else break e}}return F}function f(D,F){var re=D.sortIndex-F.sortIndex;return re!==0?re:D.id-F.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var g=Date,y=g.now();l.unstable_now=function(){return g.now()-y}}var m=[],v=[],x=1,j=null,_=3,k=!1,E=!1,z=!1,q=!1,H=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function P(D){for(var F=c(v);F!==null;){if(F.callback===null)o(v);else if(F.startTime<=D)o(v),F.sortIndex=F.expirationTime,r(m,F);else break;F=c(v)}}function J(D){if(z=!1,P(D),!E)if(c(m)!==null)E=!0,$||($=!0,ie());else{var F=c(v);F!==null&&be(J,F.startTime-D)}}var $=!1,w=-1,U=5,X=-1;function te(){return q?!0:!(l.unstable_now()-X<U)}function le(){if(q=!1,$){var D=l.unstable_now();X=D;var F=!0;try{e:{E=!1,z&&(z=!1,Q(w),w=-1),k=!0;var re=_;try{t:{for(P(D),j=c(m);j!==null&&!(j.expirationTime>D&&te());){var ke=j.callback;if(typeof ke=="function"){j.callback=null,_=j.priorityLevel;var ze=ke(j.expirationTime<=D);if(D=l.unstable_now(),typeof ze=="function"){j.callback=ze,P(D),F=!0;break t}j===c(m)&&o(m),P(D)}else o(m);j=c(m)}if(j!==null)F=!0;else{var N=c(v);N!==null&&be(J,N.startTime-D),F=!1}}break e}finally{j=null,_=re,k=!1}F=void 0}}finally{F?ie():$=!1}}}var ie;if(typeof Z=="function")ie=function(){Z(le)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ge=W.port2;W.port1.onmessage=le,ie=function(){ge.postMessage(null)}}else ie=function(){H(le,0)};function be(D,F){w=H(function(){D(l.unstable_now())},F)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(D){D.callback=null},l.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<D?Math.floor(1e3/D):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(D){switch(_){case 1:case 2:case 3:var F=3;break;default:F=_}var re=_;_=F;try{return D()}finally{_=re}},l.unstable_requestPaint=function(){q=!0},l.unstable_runWithPriority=function(D,F){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var re=_;_=D;try{return F()}finally{_=re}},l.unstable_scheduleCallback=function(D,F,re){var ke=l.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?ke+re:ke):re=ke,D){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=re+ze,D={id:x++,callback:F,priorityLevel:D,startTime:re,expirationTime:ze,sortIndex:-1},re>ke?(D.sortIndex=re,r(v,D),c(m)===null&&D===c(v)&&(z?(Q(w),w=-1):z=!0,be(J,re-ke))):(D.sortIndex=ze,r(m,D),E||k||(E=!0,$||($=!0,ie()))),D},l.unstable_shouldYield=te,l.unstable_wrapCallback=function(D){var F=_;return function(){var re=_;_=F;try{return D.apply(this,arguments)}finally{_=re}}}})(Jr)),Jr}var Rh;function rv(){return Rh||(Rh=1,$r.exports=uv()),$r.exports}var Kr={exports:{}},at={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Mh;function cv(){if(Mh)return at;Mh=1;var l=oc();function r(m){var v="https://react.dev/errors/"+m;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)v+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(m,v,x){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:j==null?null:""+j,children:m,containerInfo:v,implementation:x}}var g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(m,v){if(m==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,at.createPortal=function(m,v){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(r(299));return h(m,v,null,x)},at.flushSync=function(m){var v=g.T,x=o.p;try{if(g.T=null,o.p=2,m)return m()}finally{g.T=v,o.p=x,o.d.f()}},at.preconnect=function(m,v){typeof m=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(m,v))},at.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},at.preinit=function(m,v){if(typeof m=="string"&&v&&typeof v.as=="string"){var x=v.as,j=y(x,v.crossOrigin),_=typeof v.integrity=="string"?v.integrity:void 0,k=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;x==="style"?o.d.S(m,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:j,integrity:_,fetchPriority:k}):x==="script"&&o.d.X(m,{crossOrigin:j,integrity:_,fetchPriority:k,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},at.preinitModule=function(m,v){if(typeof m=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var x=y(v.as,v.crossOrigin);o.d.M(m,{crossOrigin:x,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&o.d.M(m)},at.preload=function(m,v){if(typeof m=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var x=v.as,j=y(x,v.crossOrigin);o.d.L(m,x,{crossOrigin:j,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},at.preloadModule=function(m,v){if(typeof m=="string")if(v){var x=y(v.as,v.crossOrigin);o.d.m(m,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:x,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else o.d.m(m)},at.requestFormReset=function(m){o.d.r(m)},at.unstable_batchedUpdates=function(m,v){return m(v)},at.useFormState=function(m,v,x){return g.H.useFormState(m,v,x)},at.useFormStatus=function(){return g.H.useHostTransitionStatus()},at.version="19.2.5",at}var zh;function ov(){if(zh)return Kr.exports;zh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Kr.exports=cv(),Kr.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Oh;function dv(){if(Oh)return Gl;Oh=1;var l=rv(),r=oc(),c=ov();function o(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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 g(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 y(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 m(e){if(h(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var s=a.return;if(s===null)break;var u=s.alternate;if(u===null){if(n=s.return,n!==null){a=n;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===a)return m(s),e;if(u===n)return m(s),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=s,n=u;else{for(var d=!1,p=s.child;p;){if(p===a){d=!0,a=s,n=u;break}if(p===n){d=!0,n=s,a=u;break}p=p.sibling}if(!d){for(p=u.child;p;){if(p===a){d=!0,a=u,n=s;break}if(p===n){d=!0,n=u,a=s;break}p=p.sibling}if(!d)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(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 j=Object.assign,_=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case J:return"Suspense";case $:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case Z:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var be=Array.isArray,D=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ke=[],ze=-1;function N(e){return{current:e}}function G(e){0>ze||(e.current=ke[ze],ke[ze]=null,ze--)}function I(e,t){ze++,ke[ze]=e.current,e.current=t}var ae=N(null),oe=N(null),he=N(null),we=N(null);function lt(e,t){switch(I(he,t),I(oe,e),I(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kf(t),e=Ff(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ae),I(ae,e)}function Ye(){G(ae),G(oe),G(he)}function Jn(e){e.memoizedState!==null&&I(we,e);var t=ae.current,a=Ff(t,e.type);t!==a&&(I(oe,e),I(ae,a))}function Kl(e){oe.current===e&&(G(ae),G(oe)),we.current===e&&(G(we),Hl._currentValue=re)}var Es,Cc;function La(e){if(Es===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Es=t&&t[1]||"",Cc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Es+e+Cc}var Ts=!1;function ks(e,t){if(!e||Ts)return"";Ts=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(O){var M=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){M=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){M=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),d=u[0],p=u[1];if(d&&p){var S=d.split(`
|
|
44
|
-
`),R=p.split(`
|
|
45
|
-
`);for(s=n=0;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;for(;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;if(n===S.length||s===R.length)for(n=S.length-1,s=R.length-1;1<=n&&0<=s&&S[n]!==R[s];)s--;for(;1<=n&&0<=s;n--,s--)if(S[n]!==R[s]){if(n!==1||s!==1)do if(n--,s--,0>s||S[n]!==R[s]){var B=`
|
|
46
|
-
`+S[n].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=n&&0<=s);break}}}finally{Ts=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?La(a):""}function Um(e,t){switch(e.tag){case 26:case 27:case 5:return La(e.type);case 16:return La("Lazy");case 13:return e.child!==t&&t!==null?La("Suspense Fallback"):La("Suspense");case 19:return La("SuspenseList");case 0:case 15:return ks(e.type,!1);case 11:return ks(e.type.render,!1);case 1:return ks(e.type,!0);case 31:return La("Activity");default:return""}}function Nc(e){try{var t="",a=null;do t+=Um(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var _s=Object.prototype.hasOwnProperty,As=l.unstable_scheduleCallback,Rs=l.unstable_cancelCallback,Dm=l.unstable_shouldYield,Hm=l.unstable_requestPaint,mt=l.unstable_now,Bm=l.unstable_getCurrentPriorityLevel,wc=l.unstable_ImmediatePriority,Ec=l.unstable_UserBlockingPriority,Fl=l.unstable_NormalPriority,Lm=l.unstable_LowPriority,Tc=l.unstable_IdlePriority,qm=l.log,Ym=l.unstable_setDisableYieldValue,Kn=null,pt=null;function fa(e){if(typeof qm=="function"&&Ym(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Kn,e)}catch{}}var gt=Math.clz32?Math.clz32:Zm,Gm=Math.log,Vm=Math.LN2;function Zm(e){return e>>>=0,e===0?32:31-(Gm(e)/Vm|0)|0}var Wl=256,Il=262144,Pl=4194304;function qa(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 ei(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var s=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=n&134217727;return p!==0?(n=p&~u,n!==0?s=qa(n):(d&=p,d!==0?s=qa(d):a||(a=p&~e,a!==0&&(s=qa(a))))):(p=n&~u,p!==0?s=qa(p):d!==0?s=qa(d):a||(a=n&~e,a!==0&&(s=qa(a)))),s===0?0:t!==0&&t!==s&&(t&u)===0&&(u=s&-s,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:s}function Fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xm(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 kc(){var e=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),e}function Ms(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qm(e,t,a,n,s,u){var d=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 p=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(a=d&~a;0<a;){var B=31-gt(a),Y=1<<B;p[B]=0,S[B]=-1;var M=R[B];if(M!==null)for(R[B]=null,B=0;B<M.length;B++){var O=M[B];O!==null&&(O.lane&=-536870913)}a&=~Y}n!==0&&_c(e,n,0),u!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function _c(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Ac(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),s=1<<n;s&t|e[n]&t&&(e[n]|=t),a&=~s}}function Rc(e,t){var a=t&-t;return a=(a&42)!==0?1:zs(a),(a&(e.suspendedLanes|t))!==0?0:a}function zs(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 Os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function zc(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var ha=Math.random().toString(36).slice(2),We="__reactFiber$"+ha,ut="__reactProps$"+ha,sn="__reactContainer$"+ha,Us="__reactEvents$"+ha,$m="__reactListeners$"+ha,Jm="__reactHandles$"+ha,Oc="__reactResources$"+ha,In="__reactMarker$"+ha;function Ds(e){delete e[We],delete e[ut],delete e[Us],delete e[$m],delete e[Jm]}function un(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[sn]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=nh(e);e!==null;){if(a=e[We])return a;e=nh(e)}return t}e=a,a=e.parentNode}return null}function rn(e){if(e=e[We]||e[sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function cn(e){var t=e[Oc];return t||(t=e[Oc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[In]=!0}var Uc=new Set,Dc={};function Ya(e,t){on(e,t),on(e+"Capture",t)}function on(e,t){for(Dc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var Km=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]*$"),Hc={},Bc={};function Fm(e){return _s.call(Bc,e)?!0:_s.call(Hc,e)?!1:Km.test(e)?Bc[e]=!0:(Hc[e]=!0,!1)}function ti(e,t,a){if(Fm(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ai(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 $t(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wm(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){a=""+d,u.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(d){a=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hs(e){if(!e._valueTracker){var t=Lc(e)?"checked":"value";e._valueTracker=Wm(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Lc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ni(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 Im=/[\n"\\]/g;function Tt(e){return e.replace(Im,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Bs(e,t,a,n,s,u,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Ls(e,d,Et(t)):a!=null?Ls(e,d,Et(a)):n!=null&&e.removeAttribute("value"),s==null&&u!=null&&(e.defaultChecked=!!u),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Et(p):e.removeAttribute("name")}function Yc(e,t,a,n,s,u,d,p){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Hs(e);return}a=a!=null?""+Et(a):"",t=t!=null?""+Et(t):a,p||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=p?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Hs(e)}function Ls(e,t,a){t==="number"&&ni(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dn(e,t,a,n){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Et(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Gc(e,t,a){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Et(a):""}function Vc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(be(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Et(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Hs(e)}function fn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Pm=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 Zc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Pm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Xc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var s in t)n=t[s],t.hasOwnProperty(s)&&a[s]!==n&&Zc(e,s,n)}else for(var u in t)t.hasOwnProperty(u)&&Zc(e,u,t[u])}function qs(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 ep=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"]]),tp=/^[\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 li(e){return tp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}var Ys=null;function Gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hn=null,mn=null;function Qc(e){var t=rn(e);if(t&&(e=t.stateNode)){var a=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Bs(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="'+Tt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var s=n[ut]||null;if(!s)throw Error(o(90));Bs(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&qc(n)}break e;case"textarea":Gc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&dn(e,!!a.multiple,t,!1)}}}var Vs=!1;function $c(e,t,a){if(Vs)return e(t,a);Vs=!0;try{var n=e(t);return n}finally{if(Vs=!1,(hn!==null||mn!==null)&&(Xi(),hn&&(t=hn,e=mn,mn=hn=null,Qc(t),e)))for(t=0;t<e.length;t++)Qc(e[t])}}function el(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ut]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zs=!1;if(Kt)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Zs=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Zs=!1}var ma=null,Xs=null,ii=null;function Jc(){if(ii)return ii;var e,t=Xs,a=t.length,n,s="value"in ma?ma.value:ma.textContent,u=s.length;for(e=0;e<a&&t[e]===s[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===s[u-n];n++);return ii=s.slice(e,1<n?1-n:void 0)}function si(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 ui(){return!0}function Kc(){return!1}function rt(e){function t(a,n,s,u,d){this._reactName=a,this._targetInst=s,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(a=e[p],this[p]=a?a(u):u[p]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ui:Kc,this.isPropagationStopped=Kc,this}return j(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=ui)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ui)},persist:function(){},isPersistent:ui}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=rt(Ga),al=j({},Ga,{view:0,detail:0}),ap=rt(al),Qs,$s,nl,ci=j({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ks,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!==nl&&(nl&&e.type==="mousemove"?(Qs=e.screenX-nl.screenX,$s=e.screenY-nl.screenY):$s=Qs=0,nl=e),Qs)},movementY:function(e){return"movementY"in e?e.movementY:$s}}),Fc=rt(ci),np=j({},ci,{dataTransfer:0}),lp=rt(np),ip=j({},al,{relatedTarget:0}),Js=rt(ip),sp=j({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),up=rt(sp),rp=j({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cp=rt(rp),op=j({},Ga,{data:0}),Wc=rt(op),dp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fp={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"},hp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hp[e])?!!t[e]:!1}function Ks(){return mp}var pp=j({},al,{key:function(e){if(e.key){var t=dp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ks,charCode:function(e){return e.type==="keypress"?si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gp=rt(pp),vp=j({},ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ic=rt(vp),yp=j({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ks}),bp=rt(yp),xp=j({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),jp=rt(xp),Sp=j({},ci,{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}),Cp=rt(Sp),Np=j({},Ga,{newState:0,oldState:0}),wp=rt(Np),Ep=[9,13,27,32],Fs=Kt&&"CompositionEvent"in window,ll=null;Kt&&"documentMode"in document&&(ll=document.documentMode);var Tp=Kt&&"TextEvent"in window&&!ll,Pc=Kt&&(!Fs||ll&&8<ll&&11>=ll),eo=" ",to=!1;function ao(e,t){switch(e){case"keyup":return Ep.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function no(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pn=!1;function kp(e,t){switch(e){case"compositionend":return no(t);case"keypress":return t.which!==32?null:(to=!0,eo);case"textInput":return e=t.data,e===eo&&to?null:e;default:return null}}function _p(e,t){if(pn)return e==="compositionend"||!Fs&&ao(e,t)?(e=Jc(),ii=Xs=ma=null,pn=!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 Pc&&t.locale!=="ko"?null:t.data;default:return null}}var Ap={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 lo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ap[e.type]:t==="textarea"}function io(e,t,a,n){hn?mn?mn.push(n):mn=[n]:hn=n,t=Ii(t,"onChange"),0<t.length&&(a=new ri("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var il=null,sl=null;function Rp(e){Vf(e,0)}function oi(e){var t=Pn(e);if(qc(t))return e}function so(e,t){if(e==="change")return t}var uo=!1;if(Kt){var Ws;if(Kt){var Is="oninput"in document;if(!Is){var ro=document.createElement("div");ro.setAttribute("oninput","return;"),Is=typeof ro.oninput=="function"}Ws=Is}else Ws=!1;uo=Ws&&(!document.documentMode||9<document.documentMode)}function co(){il&&(il.detachEvent("onpropertychange",oo),sl=il=null)}function oo(e){if(e.propertyName==="value"&&oi(sl)){var t=[];io(t,sl,e,Gs(e)),$c(Rp,t)}}function Mp(e,t,a){e==="focusin"?(co(),il=t,sl=a,il.attachEvent("onpropertychange",oo)):e==="focusout"&&co()}function zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oi(sl)}function Op(e,t){if(e==="click")return oi(t)}function Up(e,t){if(e==="input"||e==="change")return oi(t)}function Dp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:Dp;function ul(e,t){if(vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var s=a[n];if(!_s.call(t,s)||!vt(e[s],t[s]))return!1}return!0}function fo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ho(e,t){var a=fo(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=fo(a)}}function mo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function po(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ni(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=ni(e.document)}return t}function Ps(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 Hp=Kt&&"documentMode"in document&&11>=document.documentMode,gn=null,eu=null,rl=null,tu=!1;function go(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tu||gn==null||gn!==ni(n)||(n=gn,"selectionStart"in n&&Ps(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),rl&&ul(rl,n)||(rl=n,n=Ii(eu,"onSelect"),0<n.length&&(t=new ri("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=gn)))}function Va(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vn={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},au={},vo={};Kt&&(vo=document.createElement("div").style,"AnimationEvent"in window||(delete vn.animationend.animation,delete vn.animationiteration.animation,delete vn.animationstart.animation),"TransitionEvent"in window||delete vn.transitionend.transition);function Za(e){if(au[e])return au[e];if(!vn[e])return e;var t=vn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in vo)return au[e]=t[a];return e}var yo=Za("animationend"),bo=Za("animationiteration"),xo=Za("animationstart"),Bp=Za("transitionrun"),Lp=Za("transitionstart"),qp=Za("transitioncancel"),jo=Za("transitionend"),So=new Map,nu="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(" ");nu.push("scrollEnd");function Ht(e,t){So.set(e,t),Ya(t,[e])}var di=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)},kt=[],yn=0,lu=0;function fi(){for(var e=yn,t=lu=yn=0;t<e;){var a=kt[t];kt[t++]=null;var n=kt[t];kt[t++]=null;var s=kt[t];kt[t++]=null;var u=kt[t];if(kt[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}u!==0&&Co(a,s,u)}}function hi(e,t,a,n){kt[yn++]=e,kt[yn++]=t,kt[yn++]=a,kt[yn++]=n,lu|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function iu(e,t,a,n){return hi(e,t,a,n),mi(e)}function Xa(e,t){return hi(e,null,null,t),mi(e)}function Co(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var s=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(s=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,s&&t!==null&&(s=31-gt(a),e=u.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=a|536870912),u):null}function mi(e){if(50<Al)throw Al=0,mr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bn={};function Yp(e,t,a,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,a,n){return new Yp(e,t,a,n)}function su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ft(e,t){var a=e.alternate;return a===null?(a=yt(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 No(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 pi(e,t,a,n,s,u){var d=0;if(n=e,typeof e=="function")su(e)&&(d=1);else if(typeof e=="string")d=Qg(e,a,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=yt(31,a,t,s),e.elementType=X,e.lanes=u,e;case z:return Qa(a.children,s,u,t);case q:d=8,s|=24;break;case H:return e=yt(12,a,t,s|2),e.elementType=H,e.lanes=u,e;case J:return e=yt(13,a,t,s),e.elementType=J,e.lanes=u,e;case $:return e=yt(19,a,t,s),e.elementType=$,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:d=10;break e;case Q:d=9;break e;case P:d=11;break e;case w:d=14;break e;case U:d=16,n=null;break e}d=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=yt(d,a,t,s),t.elementType=e,t.type=n,t.lanes=u,t}function Qa(e,t,a,n){return e=yt(7,e,n,t),e.lanes=a,e}function uu(e,t,a){return e=yt(6,e,null,t),e.lanes=a,e}function wo(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function ru(e,t,a){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Eo=new WeakMap;function _t(e,t){if(typeof e=="object"&&e!==null){var a=Eo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Nc(t)},Eo.set(e,t),t)}return{value:e,source:t,stack:Nc(t)}}var xn=[],jn=0,gi=null,cl=0,At=[],Rt=0,pa=null,Gt=1,Vt="";function Wt(e,t){xn[jn++]=cl,xn[jn++]=gi,gi=e,cl=t}function To(e,t,a){At[Rt++]=Gt,At[Rt++]=Vt,At[Rt++]=pa,pa=e;var n=Gt;e=Vt;var s=32-gt(n)-1;n&=~(1<<s),a+=1;var u=32-gt(t)+s;if(30<u){var d=s-s%5;u=(n&(1<<d)-1).toString(32),n>>=d,s-=d,Gt=1<<32-gt(t)+s|a<<s|n,Vt=u+e}else Gt=1<<u|a<<s|n,Vt=e}function cu(e){e.return!==null&&(Wt(e,1),To(e,1,0))}function ou(e){for(;e===gi;)gi=xn[--jn],xn[jn]=null,cl=xn[--jn],xn[jn]=null;for(;e===pa;)pa=At[--Rt],At[Rt]=null,Vt=At[--Rt],At[Rt]=null,Gt=At[--Rt],At[Rt]=null}function ko(e,t){At[Rt++]=Gt,At[Rt++]=Vt,At[Rt++]=pa,Gt=t.id,Vt=t.overflow,pa=e}var Ie=null,Ue=null,xe=!1,ga=null,Mt=!1,du=Error(o(519));function va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(_t(t,e)),du}function _o(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[We]=e,t[ut]=n,a){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(a=0;a<Ml.length;a++)pe(Ml[a],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Yc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Vc(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||$f(t.textContent,a)?(n.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),n.onScroll!=null&&pe("scroll",t),n.onScrollEnd!=null&&pe("scrollend",t),n.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||va(e,!0)}function Ao(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:Mt=!1;return;case 27:case 3:Mt=!0;return;default:Ie=Ie.return}}function Sn(e){if(e!==Ie)return!1;if(!xe)return Ao(e),xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||_r(e.type,e.memoizedProps)),a=!a),a&&Ue&&va(e),Ao(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=ah(e)}else t===27?(t=Ue,Ra(e.type)?(e=Or,Or=null,Ue=e):Ue=t):Ue=Ie?Ot(e.stateNode.nextSibling):null;return!0}function $a(){Ue=Ie=null,xe=!1}function fu(){var e=ga;return e!==null&&(ft===null?ft=e:ft.push.apply(ft,e),ga=null),e}function ol(e){ga===null?ga=[e]:ga.push(e)}var hu=N(null),Ja=null,It=null;function ya(e,t,a){I(hu,t._currentValue),t._currentValue=a}function Pt(e){e._currentValue=hu.current,G(hu)}function mu(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function pu(e,t,a,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){var d=s.child;u=u.firstContext;e:for(;u!==null;){var p=u;u=s;for(var S=0;S<t.length;S++)if(p.context===t[S]){u.lanes|=a,p=u.alternate,p!==null&&(p.lanes|=a),mu(u.return,a,e),n||(d=null);break e}u=p.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(o(341));d.lanes|=a,u=d.alternate,u!==null&&(u.lanes|=a),mu(d,a,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Cn(e,t,a,n){e=null;for(var s=t,u=!1;s!==null;){if(!u){if((s.flags&524288)!==0)u=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var p=s.type;vt(s.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(s===we.current){if(d=s.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Hl):e=[Hl])}s=s.return}e!==null&&pu(t,e,a,n),t.flags|=262144}function vi(e){for(e=e.firstContext;e!==null;){if(!vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ka(e){Ja=e,It=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return Ro(Ja,e)}function yi(e,t){return Ja===null&&Ka(e),Ro(e,t)}function Ro(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},It===null){if(e===null)throw Error(o(308));It=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else It=It.next=t;return a}var Gp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Vp=l.unstable_scheduleCallback,Zp=l.unstable_NormalPriority,Ze={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gu(){return{controller:new Gp,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&Vp(Zp,function(){e.controller.abort()})}var fl=null,vu=0,Nn=0,wn=null;function Xp(e,t){if(fl===null){var a=fl=[];vu=0,Nn=xr(),wn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return vu++,t.then(Mo,Mo),t}function Mo(){if(--vu===0&&fl!==null){wn!==null&&(wn.status="fulfilled");var e=fl;fl=null,Nn=0,wn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),n}var zo=D.S;D.S=function(e,t){vf=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xp(e,t),zo!==null&&zo(e,t)};var Fa=N(null);function yu(){var e=Fa.current;return e!==null?e:Oe.pooledCache}function bi(e,t){t===null?I(Fa,Fa.current):I(Fa,t.pool)}function Oo(){var e=yu();return e===null?null:{parent:Ze._currentValue,pool:e}}var En=Error(o(460)),bu=Error(o(474)),xi=Error(o(542)),ji={then:function(){}};function Uo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Do(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Jt,Jt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bo(e),e;default:if(typeof t.status=="string")t.then(Jt,Jt);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bo(e),e}throw Ia=t,En}}function Wa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ia=a,En):a}}var Ia=null;function Ho(){if(Ia===null)throw Error(o(459));var e=Ia;return Ia=null,e}function Bo(e){if(e===En||e===xi)throw Error(o(483))}var Tn=null,hl=0;function Si(e){var t=hl;return hl+=1,Tn===null&&(Tn=[]),Do(Tn,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ci(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lo(e){function t(T,C){if(e){var A=T.deletions;A===null?(T.deletions=[C],T.flags|=16):A.push(C)}}function a(T,C){if(!e)return null;for(;C!==null;)t(T,C),C=C.sibling;return null}function n(T){for(var C=new Map;T!==null;)T.key!==null?C.set(T.key,T):C.set(T.index,T),T=T.sibling;return C}function s(T,C){return T=Ft(T,C),T.index=0,T.sibling=null,T}function u(T,C,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<C?(T.flags|=67108866,C):A):(T.flags|=67108866,C)):(T.flags|=1048576,C)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function p(T,C,A,L){return C===null||C.tag!==6?(C=uu(A,T.mode,L),C.return=T,C):(C=s(C,A),C.return=T,C)}function S(T,C,A,L){var se=A.type;return se===z?B(T,C,A.props.children,L,A.key):C!==null&&(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===U&&Wa(se)===C.type)?(C=s(C,A.props),ml(C,A),C.return=T,C):(C=pi(A.type,A.key,A.props,null,T.mode,L),ml(C,A),C.return=T,C)}function R(T,C,A,L){return C===null||C.tag!==4||C.stateNode.containerInfo!==A.containerInfo||C.stateNode.implementation!==A.implementation?(C=ru(A,T.mode,L),C.return=T,C):(C=s(C,A.children||[]),C.return=T,C)}function B(T,C,A,L,se){return C===null||C.tag!==7?(C=Qa(A,T.mode,L,se),C.return=T,C):(C=s(C,A),C.return=T,C)}function Y(T,C,A){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=uu(""+C,T.mode,A),C.return=T,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case k:return A=pi(C.type,C.key,C.props,null,T.mode,A),ml(A,C),A.return=T,A;case E:return C=ru(C,T.mode,A),C.return=T,C;case U:return C=Wa(C),Y(T,C,A)}if(be(C)||ie(C))return C=Qa(C,T.mode,A,null),C.return=T,C;if(typeof C.then=="function")return Y(T,Si(C),A);if(C.$$typeof===Z)return Y(T,yi(T,C),A);Ci(T,C)}return null}function M(T,C,A,L){var se=C!==null?C.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return se!==null?null:p(T,C,""+A,L);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case k:return A.key===se?S(T,C,A,L):null;case E:return A.key===se?R(T,C,A,L):null;case U:return A=Wa(A),M(T,C,A,L)}if(be(A)||ie(A))return se!==null?null:B(T,C,A,L,null);if(typeof A.then=="function")return M(T,C,Si(A),L);if(A.$$typeof===Z)return M(T,C,yi(T,A),L);Ci(T,A)}return null}function O(T,C,A,L,se){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return T=T.get(A)||null,p(C,T,""+L,se);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case k:return T=T.get(L.key===null?A:L.key)||null,S(C,T,L,se);case E:return T=T.get(L.key===null?A:L.key)||null,R(C,T,L,se);case U:return L=Wa(L),O(T,C,A,L,se)}if(be(L)||ie(L))return T=T.get(A)||null,B(C,T,L,se,null);if(typeof L.then=="function")return O(T,C,A,Si(L),se);if(L.$$typeof===Z)return O(T,C,A,yi(C,L),se);Ci(C,L)}return null}function ee(T,C,A,L){for(var se=null,Se=null,ne=C,fe=C=0,ye=null;ne!==null&&fe<A.length;fe++){ne.index>fe?(ye=ne,ne=null):ye=ne.sibling;var Ce=M(T,ne,A[fe],L);if(Ce===null){ne===null&&(ne=ye);break}e&&ne&&Ce.alternate===null&&t(T,ne),C=u(Ce,C,fe),Se===null?se=Ce:Se.sibling=Ce,Se=Ce,ne=ye}if(fe===A.length)return a(T,ne),xe&&Wt(T,fe),se;if(ne===null){for(;fe<A.length;fe++)ne=Y(T,A[fe],L),ne!==null&&(C=u(ne,C,fe),Se===null?se=ne:Se.sibling=ne,Se=ne);return xe&&Wt(T,fe),se}for(ne=n(ne);fe<A.length;fe++)ye=O(ne,T,fe,A[fe],L),ye!==null&&(e&&ye.alternate!==null&&ne.delete(ye.key===null?fe:ye.key),C=u(ye,C,fe),Se===null?se=ye:Se.sibling=ye,Se=ye);return e&&ne.forEach(function(Da){return t(T,Da)}),xe&&Wt(T,fe),se}function ue(T,C,A,L){if(A==null)throw Error(o(151));for(var se=null,Se=null,ne=C,fe=C=0,ye=null,Ce=A.next();ne!==null&&!Ce.done;fe++,Ce=A.next()){ne.index>fe?(ye=ne,ne=null):ye=ne.sibling;var Da=M(T,ne,Ce.value,L);if(Da===null){ne===null&&(ne=ye);break}e&&ne&&Da.alternate===null&&t(T,ne),C=u(Da,C,fe),Se===null?se=Da:Se.sibling=Da,Se=Da,ne=ye}if(Ce.done)return a(T,ne),xe&&Wt(T,fe),se;if(ne===null){for(;!Ce.done;fe++,Ce=A.next())Ce=Y(T,Ce.value,L),Ce!==null&&(C=u(Ce,C,fe),Se===null?se=Ce:Se.sibling=Ce,Se=Ce);return xe&&Wt(T,fe),se}for(ne=n(ne);!Ce.done;fe++,Ce=A.next())Ce=O(ne,T,fe,Ce.value,L),Ce!==null&&(e&&Ce.alternate!==null&&ne.delete(Ce.key===null?fe:Ce.key),C=u(Ce,C,fe),Se===null?se=Ce:Se.sibling=Ce,Se=Ce);return e&&ne.forEach(function(nv){return t(T,nv)}),xe&&Wt(T,fe),se}function Re(T,C,A,L){if(typeof A=="object"&&A!==null&&A.type===z&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case k:e:{for(var se=A.key;C!==null;){if(C.key===se){if(se=A.type,se===z){if(C.tag===7){a(T,C.sibling),L=s(C,A.props.children),L.return=T,T=L;break e}}else if(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===U&&Wa(se)===C.type){a(T,C.sibling),L=s(C,A.props),ml(L,A),L.return=T,T=L;break e}a(T,C);break}else t(T,C);C=C.sibling}A.type===z?(L=Qa(A.props.children,T.mode,L,A.key),L.return=T,T=L):(L=pi(A.type,A.key,A.props,null,T.mode,L),ml(L,A),L.return=T,T=L)}return d(T);case E:e:{for(se=A.key;C!==null;){if(C.key===se)if(C.tag===4&&C.stateNode.containerInfo===A.containerInfo&&C.stateNode.implementation===A.implementation){a(T,C.sibling),L=s(C,A.children||[]),L.return=T,T=L;break e}else{a(T,C);break}else t(T,C);C=C.sibling}L=ru(A,T.mode,L),L.return=T,T=L}return d(T);case U:return A=Wa(A),Re(T,C,A,L)}if(be(A))return ee(T,C,A,L);if(ie(A)){if(se=ie(A),typeof se!="function")throw Error(o(150));return A=se.call(A),ue(T,C,A,L)}if(typeof A.then=="function")return Re(T,C,Si(A),L);if(A.$$typeof===Z)return Re(T,C,yi(T,A),L);Ci(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,C!==null&&C.tag===6?(a(T,C.sibling),L=s(C,A),L.return=T,T=L):(a(T,C),L=uu(A,T.mode,L),L.return=T,T=L),d(T)):a(T,C)}return function(T,C,A,L){try{hl=0;var se=Re(T,C,A,L);return Tn=null,se}catch(ne){if(ne===En||ne===xi)throw ne;var Se=yt(29,ne,null,T.mode);return Se.lanes=L,Se.return=T,Se}finally{}}}var Pa=Lo(!0),qo=Lo(!1),ba=!1;function xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ju(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 xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ne&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=mi(e),Co(e,null,a),t}return hi(e,n,t,a),mi(e)}function pl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ac(e,a)}}function Su(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var s=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?s=u=d:u=u.next=d,a=a.next}while(a!==null);u===null?s=u=t:u=u.next=t}else s=u=t;a={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Cu=!1;function gl(){if(Cu){var e=wn;if(e!==null)throw e}}function vl(e,t,a,n){Cu=!1;var s=e.updateQueue;ba=!1;var u=s.firstBaseUpdate,d=s.lastBaseUpdate,p=s.shared.pending;if(p!==null){s.shared.pending=null;var S=p,R=S.next;S.next=null,d===null?u=R:d.next=R,d=S;var B=e.alternate;B!==null&&(B=B.updateQueue,p=B.lastBaseUpdate,p!==d&&(p===null?B.firstBaseUpdate=R:p.next=R,B.lastBaseUpdate=S))}if(u!==null){var Y=s.baseState;d=0,B=R=S=null,p=u;do{var M=p.lane&-536870913,O=M!==p.lane;if(O?(ve&M)===M:(n&M)===M){M!==0&&M===Nn&&(Cu=!0),B!==null&&(B=B.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ee=e,ue=p;M=t;var Re=a;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){Y=ee.call(Re,Y,M);break e}Y=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,M=typeof ee=="function"?ee.call(Re,Y,M):ee,M==null)break e;Y=j({},Y,M);break e;case 2:ba=!0}}M=p.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[M]:O.push(M))}else O={lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},B===null?(R=B=O,S=Y):B=B.next=O,d|=M;if(p=p.next,p===null){if(p=s.shared.pending,p===null)break;O=p,p=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);B===null&&(S=Y),s.baseState=S,s.firstBaseUpdate=R,s.lastBaseUpdate=B,u===null&&(s.shared.lanes=0),Ea|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Go(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Yo(a[e],t)}var kn=N(null),Ni=N(0);function Vo(e,t){e=ra,I(Ni,e),I(kn,t),ra=e|t.baseLanes}function Nu(){I(Ni,ra),I(kn,kn.current)}function wu(){ra=Ni.current,G(kn),G(Ni)}var bt=N(null),zt=null;function Sa(e){var t=e.alternate;I(Ge,Ge.current&1),I(bt,e),zt===null&&(t===null||kn.current!==null||t.memoizedState!==null)&&(zt=e)}function Eu(e){I(Ge,Ge.current),I(bt,e),zt===null&&(zt=e)}function Zo(e){e.tag===22?(I(Ge,Ge.current),I(bt,e),zt===null&&(zt=e)):Ca()}function Ca(){I(Ge,Ge.current),I(bt,bt.current)}function xt(e){G(bt),zt===e&&(zt=null),G(Ge)}var Ge=N(0);function wi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Mr(a)||zr(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 ea=0,de=null,_e=null,Xe=null,Ei=!1,_n=!1,en=!1,Ti=0,yl=0,An=null,$p=0;function Le(){throw Error(o(321))}function Tu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!vt(e[a],t[a]))return!1;return!0}function ku(e,t,a,n,s,u){return ea=u,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Td:Vu,en=!1,u=a(n,s),en=!1,_n&&(u=Qo(t,a,n,s)),Xo(e),u}function Xo(e){D.H=jl;var t=_e!==null&&_e.next!==null;if(ea=0,Xe=_e=de=null,Ei=!1,yl=0,An=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&vi(e)&&(Qe=!0))}function Qo(e,t,a,n){de=e;var s=0;do{if(_n&&(An=null),yl=0,_n=!1,25<=s)throw Error(o(301));if(s+=1,Xe=_e=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}D.H=kd,u=t(a,n)}while(_n);return u}function Jp(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?bl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(de.flags|=1024),t}function _u(){var e=Ti!==0;return Ti=0,e}function Au(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ru(e){if(Ei){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ei=!1}ea=0,Xe=_e=de=null,_n=!1,yl=Ti=0,An=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?de.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ve(){if(_e===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?de.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw de.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Xe===null?de.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function ki(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(e){var t=yl;return yl+=1,An===null&&(An=[]),e=Do(An,e,t),t=de,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Td:Vu),e}function _i(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bl(e);if(e.$$typeof===Z)return Pe(e)}throw Error(o(438,String(e)))}function Mu(e){var t=null,a=de.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=de.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ki(),de.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=te;return t.index++,a}function ta(e,t){return typeof t=="function"?t(e):t}function Ai(e){var t=Ve();return zu(t,_e,e)}function zu(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var s=e.baseQueue,u=n.pending;if(u!==null){if(s!==null){var d=s.next;s.next=u.next,u.next=d}t.baseQueue=s=u,n.pending=null}if(u=e.baseState,s===null)e.memoizedState=u;else{t=s.next;var p=d=null,S=null,R=t,B=!1;do{var Y=R.lane&-536870913;if(Y!==R.lane?(ve&Y)===Y:(ea&Y)===Y){var M=R.revertLane;if(M===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Y===Nn&&(B=!0);else if((ea&M)===M){R=R.next,M===Nn&&(B=!0);continue}else Y={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=Y,d=u):S=S.next=Y,de.lanes|=M,Ea|=M;Y=R.action,en&&a(u,Y),u=R.hasEagerState?R.eagerState:a(u,Y)}else M={lane:Y,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=M,d=u):S=S.next=M,de.lanes|=Y,Ea|=Y;R=R.next}while(R!==null&&R!==t);if(S===null?d=u:S.next=p,!vt(u,e.memoizedState)&&(Qe=!0,B&&(a=wn,a!==null)))throw a;e.memoizedState=u,e.baseState=d,e.baseQueue=S,n.lastRenderedState=u}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ou(e){var t=Ve(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,s=a.pending,u=t.memoizedState;if(s!==null){a.pending=null;var d=s=s.next;do u=e(u,d.action),d=d.next;while(d!==s);vt(u,t.memoizedState)||(Qe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function $o(e,t,a){var n=de,s=Ve(),u=xe;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!vt((_e||s).memoizedState,a);if(d&&(s.memoizedState=a,Qe=!0),s=s.queue,Hu(Fo.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,Rn(9,{destroy:void 0},Ko.bind(null,n,s,a,t),null),Oe===null)throw Error(o(349));u||(ea&127)!==0||Jo(n,t,a)}return a}function Jo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=de.updateQueue,t===null?(t=ki(),de.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ko(e,t,a,n){t.value=a,t.getSnapshot=n,Wo(t)&&Io(e)}function Fo(e,t,a){return a(function(){Wo(t)&&Io(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!vt(e,a)}catch{return!0}}function Io(e){var t=Xa(e,2);t!==null&&ht(t,e,2)}function Uu(e){var t=it();if(typeof e=="function"){var a=e;if(e=a(),en){fa(!0);try{a()}finally{fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t}function Po(e,t,a,n){return e.baseState=a,zu(e,_e,typeof n=="function"?n:ta)}function Kp(e,t,a,n,s){if(zi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};D.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,ed(t,u)):(u.next=a.next,t.pending=a.next=u)}}function ed(e,t){var a=t.action,n=t.payload,s=e.state;if(t.isTransition){var u=D.T,d={};D.T=d;try{var p=a(s,n),S=D.S;S!==null&&S(d,p),td(e,t,p)}catch(R){Du(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),D.T=u}}else try{u=a(s,n),td(e,t,u)}catch(R){Du(e,t,R)}}function td(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ad(e,t,n)},function(n){return Du(e,t,n)}):ad(e,t,a)}function ad(e,t,a){t.status="fulfilled",t.value=a,nd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,ed(e,a)))}function Du(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,nd(t),t=t.next;while(t!==n)}e.action=null}function nd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ld(e,t){return t}function id(e,t){if(xe){var a=Oe.formState;if(a!==null){e:{var n=de;if(xe){if(Ue){t:{for(var s=Ue,u=Mt;s.nodeType!==8;){if(!u){s=null;break t}if(s=Ot(s.nextSibling),s===null){s=null;break t}}u=s.data,s=u==="F!"||u==="F"?s:null}if(s){Ue=Ot(s.nextSibling),n=s.data==="F!";break e}}va(n)}n=!1}n&&(t=a[0])}}return a=it(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ld,lastRenderedState:t},a.queue=n,a=Nd.bind(null,de,n),n.dispatch=a,n=Uu(!1),u=Gu.bind(null,de,!1,n.queue),n=it(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,a=Kp.bind(null,de,s,u,a),s.dispatch=a,n.memoizedState=e,[t,a,!1]}function sd(e){var t=Ve();return ud(t,_e,e)}function ud(e,t,a){if(t=zu(e,t,ld)[0],e=Ai(ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bl(t)}catch(d){throw d===En?xi:d}else n=t;t=Ve();var s=t.queue,u=s.dispatch;return a!==t.memoizedState&&(de.flags|=2048,Rn(9,{destroy:void 0},Fp.bind(null,s,a),null)),[n,u,e]}function Fp(e,t){e.action=t}function rd(e){var t=Ve(),a=_e;if(a!==null)return ud(t,a,e);Ve(),t=t.memoizedState,a=Ve();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Rn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=de.updateQueue,t===null&&(t=ki(),de.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function cd(){return Ve().memoizedState}function Ri(e,t,a,n){var s=it();de.flags|=e,s.memoizedState=Rn(1|t,{destroy:void 0},a,n===void 0?null:n)}function Mi(e,t,a,n){var s=Ve();n=n===void 0?null:n;var u=s.memoizedState.inst;_e!==null&&n!==null&&Tu(n,_e.memoizedState.deps)?s.memoizedState=Rn(t,u,a,n):(de.flags|=e,s.memoizedState=Rn(1|t,u,a,n))}function od(e,t){Ri(8390656,8,e,t)}function Hu(e,t){Mi(2048,8,e,t)}function Wp(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ki(),de.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function dd(e){var t=Ve().memoizedState;return Wp({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function fd(e,t){return Mi(4,2,e,t)}function hd(e,t){return Mi(4,4,e,t)}function md(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 pd(e,t,a){a=a!=null?a.concat([e]):null,Mi(4,4,md.bind(null,t,e),a)}function Bu(){}function gd(e,t){var a=Ve();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Tu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function vd(e,t){var a=Ve();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Tu(t,n[1]))return n[0];if(n=e(),en){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[n,t],n}function Lu(e,t,a){return a===void 0||(ea&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=bf(),de.lanes|=e,Ea|=e,a)}function yd(e,t,a,n){return vt(a,t)?a:kn.current!==null?(e=Lu(e,a,n),vt(e,t)||(Qe=!0),e):(ea&42)===0||(ea&1073741824)!==0&&(ve&261930)===0?(Qe=!0,e.memoizedState=a):(e=bf(),de.lanes|=e,Ea|=e,t)}function bd(e,t,a,n,s){var u=F.p;F.p=u!==0&&8>u?u:8;var d=D.T,p={};D.T=p,Gu(e,!1,t,a);try{var S=s(),R=D.S;if(R!==null&&R(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var B=Qp(S,n);xl(e,t,B,Ct(e))}else xl(e,t,n,Ct(e))}catch(Y){xl(e,t,{then:function(){},status:"rejected",reason:Y},Ct())}finally{F.p=u,d!==null&&p.types!==null&&(d.types=p.types),D.T=d}}function Ip(){}function qu(e,t,a,n){if(e.tag!==5)throw Error(o(476));var s=xd(e).queue;bd(e,s,t,re,a===null?Ip:function(){return jd(e),a(n)})}function xd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:re},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jd(e){var t=xd(e);t.next===null&&(t=e.alternate.memoizedState),xl(e,t.next.queue,{},Ct())}function Yu(){return Pe(Hl)}function Sd(){return Ve().memoizedState}function Cd(){return Ve().memoizedState}function Pp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=xa(a);var n=ja(t,e,a);n!==null&&(ht(n,t,a),pl(n,t,a)),t={cache:gu()},e.payload=t;return}t=t.return}}function eg(e,t,a){var n=Ct();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zi(e)?wd(t,a):(a=iu(e,t,a,n),a!==null&&(ht(a,e,n),Ed(a,t,n)))}function Nd(e,t,a){var n=Ct();xl(e,t,a,n)}function xl(e,t,a,n){var s={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zi(e))wd(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,p=u(d,a);if(s.hasEagerState=!0,s.eagerState=p,vt(p,d))return hi(e,t,s,0),Oe===null&&fi(),!1}catch{}finally{}if(a=iu(e,t,s,n),a!==null)return ht(a,e,n),Ed(a,t,n),!0}return!1}function Gu(e,t,a,n){if(n={lane:2,revertLane:xr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zi(e)){if(t)throw Error(o(479))}else t=iu(e,a,n,2),t!==null&&ht(t,e,2)}function zi(e){var t=e.alternate;return e===de||t!==null&&t===de}function wd(e,t){_n=Ei=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ed(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ac(e,a)}}var jl={readContext:Pe,use:_i,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};jl.useEffectEvent=Le;var Td={readContext:Pe,use:_i,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:od,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ri(4194308,4,md.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){Ri(4,2,e,t)},useMemo:function(e,t){var a=it();t=t===void 0?null:t;var n=e();if(en){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=it();if(a!==void 0){var s=a(t);if(en){fa(!0);try{a(t)}finally{fa(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=eg.bind(null,de,e),[n.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Uu(e);var t=e.queue,a=Nd.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Bu,useDeferredValue:function(e,t){var a=it();return Lu(a,e,t)},useTransition:function(){var e=Uu(!1);return e=bd.bind(null,de,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=de,s=it();if(xe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Oe===null)throw Error(o(349));(ve&127)!==0||Jo(n,t,a)}s.memoizedState=a;var u={value:a,getSnapshot:t};return s.queue=u,od(Fo.bind(null,n,u,e),[e]),n.flags|=2048,Rn(9,{destroy:void 0},Ko.bind(null,n,u,a,t),null),a},useId:function(){var e=it(),t=Oe.identifierPrefix;if(xe){var a=Vt,n=Gt;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ti++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=$p++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Yu,useFormState:id,useActionState:id,useOptimistic:function(e){var t=it();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Gu.bind(null,de,!0,a),a.dispatch=t,[e,t]},useMemoCache:Mu,useCacheRefresh:function(){return it().memoizedState=Pp.bind(null,de)},useEffectEvent:function(e){var t=it(),a={impl:e};return t.memoizedState=a,function(){if((Ne&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Vu={readContext:Pe,use:_i,useCallback:gd,useContext:Pe,useEffect:Hu,useImperativeHandle:pd,useInsertionEffect:fd,useLayoutEffect:hd,useMemo:vd,useReducer:Ai,useRef:cd,useState:function(){return Ai(ta)},useDebugValue:Bu,useDeferredValue:function(e,t){var a=Ve();return yd(a,_e.memoizedState,e,t)},useTransition:function(){var e=Ai(ta)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:$o,useId:Sd,useHostTransitionStatus:Yu,useFormState:sd,useActionState:sd,useOptimistic:function(e,t){var a=Ve();return Po(a,_e,e,t)},useMemoCache:Mu,useCacheRefresh:Cd};Vu.useEffectEvent=dd;var kd={readContext:Pe,use:_i,useCallback:gd,useContext:Pe,useEffect:Hu,useImperativeHandle:pd,useInsertionEffect:fd,useLayoutEffect:hd,useMemo:vd,useReducer:Ou,useRef:cd,useState:function(){return Ou(ta)},useDebugValue:Bu,useDeferredValue:function(e,t){var a=Ve();return _e===null?Lu(a,e,t):yd(a,_e.memoizedState,e,t)},useTransition:function(){var e=Ou(ta)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:$o,useId:Sd,useHostTransitionStatus:Yu,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var a=Ve();return _e!==null?Po(a,_e,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Mu,useCacheRefresh:Cd};kd.useEffectEvent=dd;function Zu(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ct(),s=xa(n);s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,n),t!==null&&(ht(t,e,n),pl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ct(),s=xa(n);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,n),t!==null&&(ht(t,e,n),pl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ct(),n=xa(a);n.tag=2,t!=null&&(n.callback=t),t=ja(e,n,a),t!==null&&(ht(t,e,a),pl(t,e,a))}};function _d(e,t,a,n,s,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!ul(a,n)||!ul(s,u):!0}function Ad(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Xu.enqueueReplaceState(t,t.state,null)}function tn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=j({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function Rd(e){di(e)}function Md(e){console.error(e)}function zd(e){di(e)}function Oi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Od(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Qu(e,t,a){return a=xa(a),a.tag=3,a.payload={element:null},a.callback=function(){Oi(e,t)},a}function Ud(e){return e=xa(e),e.tag=3,e}function Dd(e,t,a,n){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;e.payload=function(){return s(u)},e.callback=function(){Od(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Od(t,a,n),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var p=n.stack;this.componentDidCatch(n.value,{componentStack:p!==null?p:""})})}function tg(e,t,a,n,s){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Cn(t,a,s,!0),a=bt.current,a!==null){switch(a.tag){case 31:case 13:return zt===null?Qi():a.alternate===null&&qe===0&&(qe=3),a.flags&=-257,a.flags|=65536,a.lanes=s,n===ji?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),vr(e,n,s)),!1;case 22:return a.flags|=65536,n===ji?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),vr(e,n,s)),!1}throw Error(o(435,a.tag))}return vr(e,n,s),Qi(),!1}if(xe)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==du&&(e=Error(o(422),{cause:n}),ol(_t(e,a)))):(n!==du&&(t=Error(o(423),{cause:n}),ol(_t(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=_t(n,a),s=Qu(e.stateNode,n,s),Su(e,s),qe!==4&&(qe=2)),!1;var u=Error(o(520),{cause:n});if(u=_t(u,a),_l===null?_l=[u]:_l.push(u),qe!==4&&(qe=2),t===null)return!0;n=_t(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Qu(a.stateNode,n,e),Su(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ta===null||!Ta.has(u))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Ud(s),Dd(s,e,a,n),Su(a,s),!1}a=a.return}while(a!==null);return!1}var $u=Error(o(461)),Qe=!1;function et(e,t,a,n){t.child=e===null?qo(t,null,a,n):Pa(t,e.child,a,n)}function Hd(e,t,a,n,s){a=a.render;var u=t.ref;if("ref"in n){var d={};for(var p in n)p!=="ref"&&(d[p]=n[p])}else d=n;return Ka(t),n=ku(e,t,a,d,u,s),p=_u(),e!==null&&!Qe?(Au(e,t,s),aa(e,t,s)):(xe&&p&&cu(t),t.flags|=1,et(e,t,n,s),t.child)}function Bd(e,t,a,n,s){if(e===null){var u=a.type;return typeof u=="function"&&!su(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Ld(e,t,u,n,s)):(e=pi(a.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!tr(e,s)){var d=u.memoizedProps;if(a=a.compare,a=a!==null?a:ul,a(d,n)&&e.ref===t.ref)return aa(e,t,s)}return t.flags|=1,e=Ft(u,n),e.ref=t.ref,e.return=t,t.child=e}function Ld(e,t,a,n,s){if(e!==null){var u=e.memoizedProps;if(ul(u,n)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=n=u,tr(e,s))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,aa(e,t,s)}return Ju(e,t,a,n,s)}function qd(e,t,a,n){var s=n.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~u}else n=0,t.child=null;return Yd(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bi(t,u!==null?u.cachePool:null),u!==null?Vo(t,u):Nu(),Zo(t);else return n=t.lanes=536870912,Yd(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(bi(t,u.cachePool),Vo(t,u),Ca(),t.memoizedState=null):(e!==null&&bi(t,null),Nu(),Ca());return et(e,t,s,a),t.child}function Sl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yd(e,t,a,n,s){var u=yu();return u=u===null?null:{parent:Ze._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&bi(t,null),Nu(),Zo(t),e!==null&&Cn(e,t,n,!0),t.childLanes=s,null}function Ui(e,t){return t=Hi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gd(e,t,a){return Pa(t,e.child,null,a),e=Ui(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function ag(e,t,a){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(n.mode==="hidden")return e=Ui(t,n),t.lanes=536870912,Sl(null,e);if(Eu(t),(e=Ue)?(e=th(e,Mt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},a=wo(e),a.return=t,t.child=a,Ie=t,Ue=null)):e=null,e===null)throw va(t);return t.lanes=536870912,null}return Ui(t,n)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Eu(t),s)if(t.flags&256)t.flags&=-257,t=Gd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Qe||Cn(e,t,a,!1),s=(a&e.childLanes)!==0,Qe||s){if(n=Oe,n!==null&&(d=Rc(n,a),d!==0&&d!==u.retryLane))throw u.retryLane=d,Xa(e,d),ht(n,e,d),$u;Qi(),t=Gd(e,t,a)}else e=u.treeContext,Ue=Ot(d.nextSibling),Ie=t,xe=!0,ga=null,Mt=!1,e!==null&&ko(t,e),t=Ui(t,n),t.flags|=4096;return t}return e=Ft(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Di(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ju(e,t,a,n,s){return Ka(t),a=ku(e,t,a,n,void 0,s),n=_u(),e!==null&&!Qe?(Au(e,t,s),aa(e,t,s)):(xe&&n&&cu(t),t.flags|=1,et(e,t,a,s),t.child)}function Vd(e,t,a,n,s,u){return Ka(t),t.updateQueue=null,a=Qo(t,n,a,s),Xo(e),n=_u(),e!==null&&!Qe?(Au(e,t,u),aa(e,t,u)):(xe&&n&&cu(t),t.flags|=1,et(e,t,a,u),t.child)}function Zd(e,t,a,n,s){if(Ka(t),t.stateNode===null){var u=bn,d=a.contextType;typeof d=="object"&&d!==null&&(u=Pe(d)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Xu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},xu(t),d=a.contextType,u.context=typeof d=="object"&&d!==null?Pe(d):bn,u.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(Zu(t,a,d,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&Xu.enqueueReplaceState(u,u.state,null),vl(t,n,u,s),gl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var p=t.memoizedProps,S=tn(a,p);u.props=S;var R=u.context,B=a.contextType;d=bn,typeof B=="object"&&B!==null&&(d=Pe(B));var Y=a.getDerivedStateFromProps;B=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p||R!==d)&&Ad(t,u,n,d),ba=!1;var M=t.memoizedState;u.state=M,vl(t,n,u,s),gl(),R=t.memoizedState,p||M!==R||ba?(typeof Y=="function"&&(Zu(t,a,Y,n),R=t.memoizedState),(S=ba||_d(t,a,S,n,M,R,d))?(B||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=R),u.props=n,u.state=R,u.context=d,n=S):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,ju(e,t),d=t.memoizedProps,B=tn(a,d),u.props=B,Y=t.pendingProps,M=u.context,R=a.contextType,S=bn,typeof R=="object"&&R!==null&&(S=Pe(R)),p=a.getDerivedStateFromProps,(R=typeof p=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||M!==S)&&Ad(t,u,n,S),ba=!1,M=t.memoizedState,u.state=M,vl(t,n,u,s),gl();var O=t.memoizedState;d!==Y||M!==O||ba||e!==null&&e.dependencies!==null&&vi(e.dependencies)?(typeof p=="function"&&(Zu(t,a,p,n),O=t.memoizedState),(B=ba||_d(t,a,B,n,M,O,S)||e!==null&&e.dependencies!==null&&vi(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,O,S),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,O,S)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=O),u.props=n,u.state=O,u.context=S,n=B):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,Di(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=Pa(t,e.child,null,s),t.child=Pa(t,null,a,s)):et(e,t,a,s),t.memoizedState=u.state,e=t.child):e=aa(e,t,s),e}function Xd(e,t,a,n){return $a(),t.flags|=256,et(e,t,a,n),t.child}var Ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fu(e){return{baseLanes:e,cachePool:Oo()}}function Wu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=St),e}function Qd(e,t,a){var n=t.pendingProps,s=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(s?Sa(t):Ca(),(e=Ue)?(e=th(e,Mt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},a=wo(e),a.return=t,t.child=a,Ie=t,Ue=null)):e=null,e===null)throw va(t);return zr(e)?t.lanes=32:t.lanes=536870912,null}var p=n.children;return n=n.fallback,s?(Ca(),s=t.mode,p=Hi({mode:"hidden",children:p},s),n=Qa(n,s,a,null),p.return=t,n.return=t,p.sibling=n,t.child=p,n=t.child,n.memoizedState=Fu(a),n.childLanes=Wu(e,d,a),t.memoizedState=Ku,Sl(null,n)):(Sa(t),Iu(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(u)t.flags&256?(Sa(t),t.flags&=-257,t=Pu(e,t,a)):t.memoizedState!==null?(Ca(),t.child=e.child,t.flags|=128,t=null):(Ca(),p=n.fallback,s=t.mode,n=Hi({mode:"visible",children:n.children},s),p=Qa(p,s,a,null),p.flags|=2,n.return=t,p.return=t,n.sibling=p,t.child=n,Pa(t,e.child,null,a),n=t.child,n.memoizedState=Fu(a),n.childLanes=Wu(e,d,a),t.memoizedState=Ku,t=Sl(null,n));else if(Sa(t),zr(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var R=d.dgst;d=R,n=Error(o(419)),n.stack="",n.digest=d,ol({value:n,source:null,stack:null}),t=Pu(e,t,a)}else if(Qe||Cn(e,t,a,!1),d=(a&e.childLanes)!==0,Qe||d){if(d=Oe,d!==null&&(n=Rc(d,a),n!==0&&n!==S.retryLane))throw S.retryLane=n,Xa(e,n),ht(d,e,n),$u;Mr(p)||Qi(),t=Pu(e,t,a)}else Mr(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,Ue=Ot(p.nextSibling),Ie=t,xe=!0,ga=null,Mt=!1,e!==null&&ko(t,e),t=Iu(t,n.children),t.flags|=4096);return t}return s?(Ca(),p=n.fallback,s=t.mode,S=e.child,R=S.sibling,n=Ft(S,{mode:"hidden",children:n.children}),n.subtreeFlags=S.subtreeFlags&65011712,R!==null?p=Ft(R,p):(p=Qa(p,s,a,null),p.flags|=2),p.return=t,n.return=t,n.sibling=p,t.child=n,Sl(null,n),n=t.child,p=e.child.memoizedState,p===null?p=Fu(a):(s=p.cachePool,s!==null?(S=Ze._currentValue,s=s.parent!==S?{parent:S,pool:S}:s):s=Oo(),p={baseLanes:p.baseLanes|a,cachePool:s}),n.memoizedState=p,n.childLanes=Wu(e,d,a),t.memoizedState=Ku,Sl(e.child,n)):(Sa(t),a=e.child,e=a.sibling,a=Ft(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function Iu(e,t){return t=Hi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hi(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Pu(e,t,a){return Pa(t,e.child,null,a),e=Iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $d(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),mu(e.return,t,a)}function er(e,t,a,n,s,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:s,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=s,d.treeForkCount=u)}function Jd(e,t,a){var n=t.pendingProps,s=n.revealOrder,u=n.tail;n=n.children;var d=Ge.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,I(Ge,d),et(e,t,n,a),n=xe?cl:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$d(e,a,t);else if(e.tag===19)$d(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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&wi(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),er(t,!1,s,a,u,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}er(t,!0,a,null,u,n);break;case"together":er(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Cn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Ft(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ft(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function tr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vi(e)))}function ng(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),ya(t,Ze,e.memoizedState.cache),$a();break;case 27:case 5:Jn(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Eu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Sa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Qd(e,t,a):(Sa(t),e=aa(e,t,a),e!==null?e.sibling:null);Sa(t);break;case 19:var s=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Cn(e,t,a,!1),n=(a&t.childLanes)!==0),s){if(n)return Jd(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(Ge,Ge.current),n)break;return null;case 22:return t.lanes=0,qd(e,t,a,t.pendingProps);case 24:ya(t,Ze,e.memoizedState.cache)}return aa(e,t,a)}function Kd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!tr(e,a)&&(t.flags&128)===0)return Qe=!1,ng(e,t,a);Qe=(e.flags&131072)!==0}else Qe=!1,xe&&(t.flags&1048576)!==0&&To(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Wa(t.elementType),t.type=e,typeof e=="function")su(e)?(n=tn(e,n),t.tag=1,t=Zd(null,t,e,n,a)):(t.tag=0,t=Ju(null,t,e,n,a));else{if(e!=null){var s=e.$$typeof;if(s===P){t.tag=11,t=Hd(null,t,e,n,a);break e}else if(s===w){t.tag=14,t=Bd(null,t,e,n,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return Ju(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,s=tn(n,t.pendingProps),Zd(e,t,n,s,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;s=u.element,ju(e,t),vl(t,n,null,a);var d=t.memoizedState;if(n=d.cache,ya(t,Ze,n),n!==u.cache&&pu(t,[Ze],a,!0),gl(),n=d.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Xd(e,t,n,a);break e}else if(n!==s){s=_t(Error(o(424)),t),ol(s),t=Xd(e,t,n,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(Ue=Ot(e.firstChild),Ie=t,xe=!0,ga=null,Mt=!0,a=qo(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($a(),n===s){t=aa(e,t,a);break e}et(e,t,n,a)}t=t.child}return t;case 26:return Di(e,t),e===null?(a=uh(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,n=Pi(he.current).createElement(a),n[We]=t,n[ut]=e,tt(n,a,e),Ke(n),t.stateNode=n):t.memoizedState=uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jn(t),e===null&&xe&&(n=t.stateNode=lh(t.type,t.pendingProps,he.current),Ie=t,Mt=!0,s=Ue,Ra(t.type)?(Or=s,Ue=Ot(n.firstChild)):Ue=s),et(e,t,t.pendingProps.children,a),Di(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((s=n=Ue)&&(n=zg(n,t.type,t.pendingProps,Mt),n!==null?(t.stateNode=n,Ie=t,Ue=Ot(n.firstChild),Mt=!1,s=!0):s=!1),s||va(t)),Jn(t),s=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,_r(s,u)?n=null:d!==null&&_r(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=ku(e,t,Jp,null,null,a),Hl._currentValue=s),Di(e,t),et(e,t,n,a),t.child;case 6:return e===null&&xe&&((e=a=Ue)&&(a=Og(a,t.pendingProps,Mt),a!==null?(t.stateNode=a,Ie=t,Ue=null,e=!0):e=!1),e||va(t)),null;case 13:return Qd(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Pa(t,null,n,a):et(e,t,n,a),t.child;case 11:return Hd(e,t,t.type,t.pendingProps,a);case 7:return et(e,t,t.pendingProps,a),t.child;case 8:return et(e,t,t.pendingProps.children,a),t.child;case 12:return et(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ya(t,t.type,n.value),et(e,t,n.children,a),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,Ka(t),s=Pe(s),n=n(s),t.flags|=1,et(e,t,n,a),t.child;case 14:return Bd(e,t,t.type,t.pendingProps,a);case 15:return Ld(e,t,t.type,t.pendingProps,a);case 19:return Jd(e,t,a);case 31:return ag(e,t,a);case 22:return qd(e,t,a,t.pendingProps);case 24:return Ka(t),n=Pe(Ze),e===null?(s=yu(),s===null&&(s=Oe,u=gu(),s.pooledCache=u,u.refCount++,u!==null&&(s.pooledCacheLanes|=a),s=u),t.memoizedState={parent:n,cache:s},xu(t),ya(t,Ze,s)):((e.lanes&a)!==0&&(ju(e,t),vl(t,null,null,a),gl()),s=e.memoizedState,u=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ya(t,Ze,n)):(n=u.cache,ya(t,Ze,n),n!==s.cache&&pu(t,[Ze],a,!0))),et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function na(e){e.flags|=4}function ar(e,t,a,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Cf())e.flags|=8192;else throw Ia=ji,bu}else e.flags&=-16777217}function Fd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fh(t))if(Cf())e.flags|=8192;else throw Ia=ji,bu}function Bi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?kc():536870912,e.lanes|=t,Un|=t)}function Cl(e,t){if(!xe)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 n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function De(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function lg(e,t,a){var n=t.pendingProps;switch(ou(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return De(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(Ze),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Sn(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fu())),De(t),null;case 26:var s=t.type,u=t.memoizedState;return e===null?(na(t),u!==null?(De(t),Fd(t,u)):(De(t),ar(t,s,null,n,a))):u?u!==e.memoizedState?(na(t),De(t),Fd(t,u)):(De(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&na(t),De(t),ar(t,s,e,n,a)),null;case 27:if(Kl(t),a=he.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return De(t),null}e=ae.current,Sn(t)?_o(t):(e=lh(s,n,a),t.stateNode=e,na(t))}return De(t),null;case 5:if(Kl(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return De(t),null}if(u=ae.current,Sn(t))_o(t);else{var d=Pi(he.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?d.createElement(s,{is:n.is}):d.createElement(s)}}u[We]=t,u[ut]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=u;e:switch(tt(u,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&na(t)}}return De(t),ar(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,Sn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,s=Ie,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||$f(e.nodeValue,a)),e||va(t,!0)}else e=Pi(e).createTextNode(n),e[We]=t,t.stateNode=e}return De(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Sn(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[We]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else a=fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return De(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Sn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[We]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),s=!1}else s=fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Bi(t,t.updateQueue),De(t),null);case 4:return Ye(),e===null&&Nr(t.stateNode.containerInfo),De(t),null;case 10:return Pt(t.type),De(t),null;case 19:if(G(Ge),n=t.memoizedState,n===null)return De(t),null;if(s=(t.flags&128)!==0,u=n.rendering,u===null)if(s)Cl(n,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=wi(e),u!==null){for(t.flags|=128,Cl(n,!1),e=u.updateQueue,t.updateQueue=e,Bi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)No(a,e),a=a.sibling;return I(Ge,Ge.current&1|2),xe&&Wt(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&mt()>Vi&&(t.flags|=128,s=!0,Cl(n,!1),t.lanes=4194304)}else{if(!s)if(e=wi(u),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Bi(t,e),Cl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!xe)return De(t),null}else 2*mt()-n.renderingStartTime>Vi&&a!==536870912&&(t.flags|=128,s=!0,Cl(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=mt(),e.sibling=null,a=Ge.current,I(Ge,s?a&1|2:a&1),xe&&Wt(t,n.treeForkCount),e):(De(t),null);case 22:case 23:return xt(t),wu(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),a=t.updateQueue,a!==null&&Bi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&G(Fa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Pt(Ze),De(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function ig(e,t){switch(ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(Ze),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Kl(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(o(340));$a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));$a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Ge),null;case 4:return Ye(),null;case 10:return Pt(t.type),null;case 22:case 23:return xt(t),wu(),e!==null&&G(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(Ze),null;case 25:return null;default:return null}}function Wd(e,t){switch(ou(t),t.tag){case 3:Pt(Ze),Ye();break;case 26:case 27:case 5:Kl(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:G(Ge);break;case 10:Pt(t.type);break;case 22:case 23:xt(t),wu(),e!==null&&G(Fa);break;case 24:Pt(Ze)}}function Nl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){n=void 0;var u=a.create,d=a.inst;n=u(),d.destroy=n}a=a.next}while(a!==s)}}catch(p){Te(t,t.return,p)}}function Na(e,t,a){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var u=s.next;n=u;do{if((n.tag&e)===e){var d=n.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,s=t;var S=a,R=p;try{R()}catch(B){Te(s,S,B)}}}n=n.next}while(n!==u)}}catch(B){Te(t,t.return,B)}}function Id(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Go(t,a)}catch(n){Te(e,e.return,n)}}}function Pd(e,t,a){a.props=tn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Te(e,t,n)}}function wl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(s){Te(e,t,s)}}function Zt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(s){Te(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Te(e,t,s)}else a.current=null}function ef(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(s){Te(e,e.return,s)}}function nr(e,t,a){try{var n=e.stateNode;Tg(n,e.type,a,t),n[ut]=t}catch(s){Te(e,e.return,s)}}function tf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ra(e.type)||e.tag===4}function lr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tf(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&&Ra(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 ir(e,t,a){var n=e.tag;if(n===5||n===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=Jt));else if(n!==4&&(n===27&&Ra(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function Li(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Ra(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Li(e,t,a),e=e.sibling;e!==null;)Li(e,t,a),e=e.sibling}function af(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);tt(t,n,a),t[We]=e,t[ut]=a}catch(u){Te(e,e.return,u)}}var la=!1,$e=!1,sr=!1,nf=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function sg(e,t){if(e=e.containerInfo,Tr=ss,e=po(e),Ps(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var s=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var d=0,p=-1,S=-1,R=0,B=0,Y=e,M=null;t:for(;;){for(var O;Y!==a||s!==0&&Y.nodeType!==3||(p=d+s),Y!==u||n!==0&&Y.nodeType!==3||(S=d+n),Y.nodeType===3&&(d+=Y.nodeValue.length),(O=Y.firstChild)!==null;)M=Y,Y=O;for(;;){if(Y===e)break t;if(M===a&&++R===s&&(p=d),M===u&&++B===n&&(S=d),(O=Y.nextSibling)!==null)break;Y=M,M=Y.parentNode}Y=O}a=p===-1||S===-1?null:{start:p,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(kr={focusedElem:e,selectionRange:a},ss=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,u=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++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,s=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var ee=tn(a.type,s);e=n.getSnapshotBeforeUpdate(ee,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Te(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Rr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rr(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Fe=e;break}Fe=t.return}}function lf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:sa(e,a),n&4&&Nl(5,a);break;case 1:if(sa(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Te(a,a.return,d)}else{var s=tn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Te(a,a.return,d)}}n&64&&Id(a),n&512&&wl(a,a.return);break;case 3:if(sa(e,a),n&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{Go(e,t)}catch(d){Te(a,a.return,d)}}break;case 27:t===null&&n&4&&af(a);case 26:case 5:sa(e,a),t===null&&n&4&&ef(a),n&512&&wl(a,a.return);break;case 12:sa(e,a);break;case 31:sa(e,a),n&4&&rf(e,a);break;case 13:sa(e,a),n&4&&cf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=pg.bind(null,a),Ug(e,a))));break;case 22:if(n=a.memoizedState!==null||la,!n){t=t!==null&&t.memoizedState!==null||$e,s=la;var u=$e;la=n,($e=t)&&!u?ua(e,a,(a.subtreeFlags&8772)!==0):sa(e,a),la=s,$e=u}break;case 30:break;default:sa(e,a)}}function sf(e){var t=e.alternate;t!==null&&(e.alternate=null,sf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ds(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 He=null,ct=!1;function ia(e,t,a){for(a=a.child;a!==null;)uf(e,t,a),a=a.sibling}function uf(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Kn,a)}catch{}switch(a.tag){case 26:$e||Zt(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||Zt(a,t);var n=He,s=ct;Ra(a.type)&&(He=a.stateNode,ct=!1),ia(e,t,a),Ol(a.stateNode),He=n,ct=s;break;case 5:$e||Zt(a,t);case 6:if(n=He,s=ct,He=null,ia(e,t,a),He=n,ct=s,He!==null)if(ct)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(u){Te(a,t,u)}else try{He.removeChild(a.stateNode)}catch(u){Te(a,t,u)}break;case 18:He!==null&&(ct?(e=He,Pf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Vn(e)):Pf(He,a.stateNode));break;case 4:n=He,s=ct,He=a.stateNode.containerInfo,ct=!0,ia(e,t,a),He=n,ct=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),$e||Na(4,a,t),ia(e,t,a);break;case 1:$e||(Zt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Pd(a,t,n)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:$e=(n=$e)||a.memoizedState!==null,ia(e,t,a),$e=n;break;default:ia(e,t,a)}}function rf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vn(e)}catch(a){Te(t,t.return,a)}}}function cf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vn(e)}catch(a){Te(t,t.return,a)}}function ug(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nf),t;default:throw Error(o(435,e.tag))}}function qi(e,t){var a=ug(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var s=gg.bind(null,e,n);n.then(s,s)}})}function ot(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var s=a[n],u=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Ra(p.type)){He=p.stateNode,ct=!1;break e}break;case 5:He=p.stateNode,ct=!1;break e;case 3:case 4:He=p.stateNode.containerInfo,ct=!0;break e}p=p.return}if(He===null)throw Error(o(160));uf(u,d,s),He=null,ct=!1,u=s.alternate,u!==null&&(u.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)of(t,e),t=t.sibling}var Bt=null;function of(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),dt(e),n&4&&(Na(3,e,e.return),Nl(3,e),Na(5,e,e.return));break;case 1:ot(t,e),dt(e),n&512&&($e||a===null||Zt(a,a.return)),n&64&&la&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var s=Bt;if(ot(t,e),dt(e),n&512&&($e||a===null||Zt(a,a.return)),n&4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(n){case"title":u=s.getElementsByTagName("title")[0],(!u||u[In]||u[We]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=s.createElement(n),s.head.insertBefore(u,s.querySelector("head > title"))),tt(u,n,a),u[We]=e,Ke(u),n=u;break e;case"link":var d=oh("link","href",s).get(n+(a.href||""));if(d){for(var p=0;p<d.length;p++)if(u=d[p],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(p,1);break t}}u=s.createElement(n),tt(u,n,a),s.head.appendChild(u);break;case"meta":if(d=oh("meta","content",s).get(n+(a.content||""))){for(p=0;p<d.length;p++)if(u=d[p],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(p,1);break t}}u=s.createElement(n),tt(u,n,a),s.head.appendChild(u);break;default:throw Error(o(468,n))}u[We]=e,Ke(u),n=u}e.stateNode=n}else dh(s,e.type,e.stateNode);else e.stateNode=ch(s,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?dh(s,e.type,e.stateNode):ch(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&nr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ot(t,e),dt(e),n&512&&($e||a===null||Zt(a,a.return)),a!==null&&n&4&&nr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ot(t,e),dt(e),n&512&&($e||a===null||Zt(a,a.return)),e.flags&32){s=e.stateNode;try{fn(s,"")}catch(ee){Te(e,e.return,ee)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,nr(e,s,a!==null?a.memoizedProps:s)),n&1024&&(sr=!0);break;case 6:if(ot(t,e),dt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ee){Te(e,e.return,ee)}}break;case 3:if(as=null,s=Bt,Bt=es(t.containerInfo),ot(t,e),Bt=s,dt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Vn(t.containerInfo)}catch(ee){Te(e,e.return,ee)}sr&&(sr=!1,df(e));break;case 4:n=Bt,Bt=es(e.stateNode.containerInfo),ot(t,e),dt(e),Bt=n;break;case 12:ot(t,e),dt(e);break;case 31:ot(t,e),dt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 13:ot(t,e),dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gi=mt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 22:s=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,R=la,B=$e;if(la=R||s,$e=B||S,ot(t,e),$e=B,la=R,dt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||S||la||$e||an(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(u=S.stateNode,s)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=S.stateNode;var Y=S.memoizedProps.style,M=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;p.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){Te(S,S.return,ee)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=s?"":S.memoizedProps}catch(ee){Te(S,S.return,ee)}}}else if(t.tag===18){if(a===null){S=t;try{var O=S.stateNode;s?eh(O,!0):eh(S.stateNode,!1)}catch(ee){Te(S,S.return,ee)}}}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}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,qi(e,a))));break;case 19:ot(t,e),dt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 30:break;case 21:break;default:ot(t,e),dt(e)}}function dt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(tf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var s=a.stateNode,u=lr(e);Li(e,u,s);break;case 5:var d=a.stateNode;a.flags&32&&(fn(d,""),a.flags&=-33);var p=lr(e);Li(e,p,d);break;case 3:case 4:var S=a.stateNode.containerInfo,R=lr(e);ir(e,R,S);break;default:throw Error(o(161))}}catch(B){Te(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function df(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;df(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;)lf(e,t.alternate,t),t=t.sibling}function an(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),an(t);break;case 1:Zt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Pd(t,t.return,a),an(t);break;case 27:Ol(t.stateNode);case 26:case 5:Zt(t,t.return),an(t);break;case 22:t.memoizedState===null&&an(t);break;case 30:an(t);break;default:an(t)}e=e.sibling}}function ua(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:ua(s,u,a),Nl(4,u);break;case 1:if(ua(s,u,a),n=u,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(R){Te(n,n.return,R)}if(n=u,s=n.updateQueue,s!==null){var p=n.stateNode;try{var S=s.shared.hiddenCallbacks;if(S!==null)for(s.shared.hiddenCallbacks=null,s=0;s<S.length;s++)Yo(S[s],p)}catch(R){Te(n,n.return,R)}}a&&d&64&&Id(u),wl(u,u.return);break;case 27:af(u);case 26:case 5:ua(s,u,a),a&&n===null&&d&4&&ef(u),wl(u,u.return);break;case 12:ua(s,u,a);break;case 31:ua(s,u,a),a&&d&4&&rf(s,u);break;case 13:ua(s,u,a),a&&d&4&&cf(s,u);break;case 22:u.memoizedState===null&&ua(s,u,a),wl(u,u.return);break;case 30:break;default:ua(s,u,a)}t=t.sibling}}function ur(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&&dl(a))}function rr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function Lt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ff(e,t,a,n),t=t.sibling}function ff(e,t,a,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Lt(e,t,a,n),s&2048&&Nl(9,t);break;case 1:Lt(e,t,a,n);break;case 3:Lt(e,t,a,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e)));break;case 12:if(s&2048){Lt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,p=u.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Te(t,t.return,S)}}else Lt(e,t,a,n);break;case 31:Lt(e,t,a,n);break;case 13:Lt(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Lt(e,t,a,n):El(e,t):u._visibility&2?Lt(e,t,a,n):(u._visibility|=2,Mn(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&ur(d,t);break;case 24:Lt(e,t,a,n),s&2048&&rr(t.alternate,t);break;default:Lt(e,t,a,n)}}function Mn(e,t,a,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,p=a,S=n,R=d.flags;switch(d.tag){case 0:case 11:case 15:Mn(u,d,p,S,s),Nl(8,d);break;case 23:break;case 22:var B=d.stateNode;d.memoizedState!==null?B._visibility&2?Mn(u,d,p,S,s):El(u,d):(B._visibility|=2,Mn(u,d,p,S,s)),s&&R&2048&&ur(d.alternate,d);break;case 24:Mn(u,d,p,S,s),s&&R&2048&&rr(d.alternate,d);break;default:Mn(u,d,p,S,s)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,s=n.flags;switch(n.tag){case 22:El(a,n),s&2048&&ur(n.alternate,n);break;case 24:El(a,n),s&2048&&rr(n.alternate,n);break;default:El(a,n)}t=t.sibling}}var Tl=8192;function zn(e,t,a){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)hf(e,t,a),e=e.sibling}function hf(e,t,a){switch(e.tag){case 26:zn(e,t,a),e.flags&Tl&&e.memoizedState!==null&&$g(a,Bt,e.memoizedState,e.memoizedProps);break;case 5:zn(e,t,a);break;case 3:case 4:var n=Bt;Bt=es(e.stateNode.containerInfo),zn(e,t,a),Bt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Tl,Tl=16777216,zn(e,t,a),Tl=n):zn(e,t,a));break;default:zn(e,t,a)}}function mf(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 kl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Fe=n,gf(n,e)}mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pf(e),e=e.sibling}function pf(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Na(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yi(e)):kl(e);break;default:kl(e)}}function Yi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Fe=n,gf(n,e)}mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),Yi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yi(t));break;default:Yi(t)}e=e.sibling}}function gf(e,t){for(;Fe!==null;){var a=Fe;switch(a.tag){case 0:case 11:case 15:Na(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:dl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Fe=n;else e:for(a=e;Fe!==null;){n=Fe;var s=n.sibling,u=n.return;if(sf(n),n===a){Fe=null;break e}if(s!==null){s.return=u,Fe=s;break e}Fe=u}}}var rg={getCacheForType:function(e){var t=Pe(Ze),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ze).controller.signal}},cg=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Oe=null,me=null,ve=0,Ee=0,jt=null,wa=!1,On=!1,cr=!1,ra=0,qe=0,Ea=0,nn=0,or=0,St=0,Un=0,_l=null,ft=null,dr=!1,Gi=0,vf=0,Vi=1/0,Zi=null,Ta=null,Je=0,ka=null,Dn=null,ca=0,fr=0,hr=null,yf=null,Al=0,mr=null;function Ct(){return(Ne&2)!==0&&ve!==0?ve&-ve:D.T!==null?xr():Mc()}function bf(){if(St===0)if((ve&536870912)===0||xe){var e=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),St=e}else St=536870912;return e=bt.current,e!==null&&(e.flags|=32),St}function ht(e,t,a){(e===Oe&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Hn(e,0),_a(e,ve,St,!1)),Wn(e,a),((Ne&2)===0||e!==Oe)&&(e===Oe&&((Ne&2)===0&&(nn|=a),qe===4&&_a(e,ve,St,!1)),Xt(e))}function xf(e,t,a){if((Ne&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Fn(e,t),s=n?fg(e,t):gr(e,t,!0),u=n;do{if(s===0){On&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!og(a)){s=gr(e,t,!1),u=!1;continue}if(s===2){if(u=t,e.errorRecoveryDisabledLanes&u)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;s=_l;var S=p.current.memoizedState.isDehydrated;if(S&&(Hn(p,d).flags|=256),d=gr(p,d,!1),d!==2){if(cr&&!S){p.errorRecoveryDisabledLanes|=u,nn|=u,s=4;break e}u=ft,ft=s,u!==null&&(ft===null?ft=u:ft.push.apply(ft,u))}s=d}if(u=!1,s!==2)continue}}if(s===1){Hn(e,0),_a(e,t,0,!0);break}e:{switch(n=e,u=s,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(n,t,St,!wa);break e;case 2:ft=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(s=Gi+300-mt(),10<s)){if(_a(n,t,St,!wa),ei(n,0,!0)!==0)break e;ca=t,n.timeoutHandle=Wf(jf.bind(null,n,a,ft,Zi,dr,t,St,nn,Un,wa,u,"Throttled",-0,0),s);break e}jf(n,a,ft,Zi,dr,t,St,nn,Un,wa,u,null,-0,0)}}break}while(!0);Xt(e)}function jf(e,t,a,n,s,u,d,p,S,R,B,Y,M,O){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},hf(t,u,Y);var ee=(u&62914560)===u?Gi-mt():(u&4194048)===u?vf-mt():0;if(ee=Jg(Y,ee),ee!==null){ca=u,e.cancelPendingCommit=ee(_f.bind(null,e,t,u,a,n,s,d,p,S,B,Y,null,M,O)),_a(e,u,d,!R);return}}_f(e,t,u,a,n,s,d,p,S)}function og(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 n=0;n<a.length;n++){var s=a[n],u=s.getSnapshot;s=s.value;try{if(!vt(u(),s))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 _a(e,t,a,n){t&=~or,t&=~nn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var u=31-gt(s),d=1<<u;n[u]=-1,s&=~d}a!==0&&_c(e,a,t)}function Xi(){return(Ne&6)===0?(Rl(0),!1):!0}function pr(){if(me!==null){if(Ee===0)var e=me.return;else e=me,It=Ja=null,Ru(e),Tn=null,hl=0,e=me;for(;e!==null;)Wd(e.alternate,e),e=e.return;me=null}}function Hn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ag(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,pr(),Oe=e,me=a=Ft(e.current,null),ve=t,Ee=0,jt=null,wa=!1,On=Fn(e,t),cr=!1,Un=St=or=nn=Ea=qe=0,ft=_l=null,dr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-gt(n),u=1<<s;t|=e[s],n&=~u}return ra=t,fi(),a}function Sf(e,t){de=null,D.H=jl,t===En||t===xi?(t=Ho(),Ee=3):t===bu?(t=Ho(),Ee=4):Ee=t===$u?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,me===null&&(qe=1,Oi(e,_t(t,e.current)))}function Cf(){var e=bt.current;return e===null?!0:(ve&4194048)===ve?zt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===zt:!1}function Nf(){var e=D.H;return D.H=jl,e===null?jl:e}function wf(){var e=D.A;return D.A=rg,e}function Qi(){qe=4,wa||(ve&4194048)!==ve&&bt.current!==null||(On=!0),(Ea&134217727)===0&&(nn&134217727)===0||Oe===null||_a(Oe,ve,St,!1)}function gr(e,t,a){var n=Ne;Ne|=2;var s=Nf(),u=wf();(Oe!==e||ve!==t)&&(Zi=null,Hn(e,t)),t=!1;var d=qe;e:do try{if(Ee!==0&&me!==null){var p=me,S=jt;switch(Ee){case 8:pr(),d=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var R=Ee;if(Ee=0,jt=null,Bn(e,p,S,R),a&&On){d=0;break e}break;default:R=Ee,Ee=0,jt=null,Bn(e,p,S,R)}}dg(),d=qe;break}catch(B){Sf(e,B)}while(!0);return t&&e.shellSuspendCounter++,It=Ja=null,Ne=n,D.H=s,D.A=u,me===null&&(Oe=null,ve=0,fi()),d}function dg(){for(;me!==null;)Ef(me)}function fg(e,t){var a=Ne;Ne|=2;var n=Nf(),s=wf();Oe!==e||ve!==t?(Zi=null,Vi=mt()+500,Hn(e,t)):On=Fn(e,t);e:do try{if(Ee!==0&&me!==null){t=me;var u=jt;t:switch(Ee){case 1:Ee=0,jt=null,Bn(e,t,u,1);break;case 2:case 9:if(Uo(u)){Ee=0,jt=null,Tf(t);break}t=function(){Ee!==2&&Ee!==9||Oe!==e||(Ee=7),Xt(e)},u.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Uo(u)?(Ee=0,jt=null,Tf(t)):(Ee=0,jt=null,Bn(e,t,u,7));break;case 5:var d=null;switch(me.tag){case 26:d=me.memoizedState;case 5:case 27:var p=me;if(d?fh(d):p.stateNode.complete){Ee=0,jt=null;var S=p.sibling;if(S!==null)me=S;else{var R=p.return;R!==null?(me=R,$i(R)):me=null}break t}}Ee=0,jt=null,Bn(e,t,u,5);break;case 6:Ee=0,jt=null,Bn(e,t,u,6);break;case 8:pr(),qe=6;break e;default:throw Error(o(462))}}hg();break}catch(B){Sf(e,B)}while(!0);return It=Ja=null,D.H=n,D.A=s,Ne=a,me!==null?0:(Oe=null,ve=0,fi(),qe)}function hg(){for(;me!==null&&!Dm();)Ef(me)}function Ef(e){var t=Kd(e.alternate,e,ra);e.memoizedProps=e.pendingProps,t===null?$i(e):me=t}function Tf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Vd(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Vd(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Ru(t);default:Wd(a,t),t=me=No(t,ra),t=Kd(a,t,ra)}e.memoizedProps=e.pendingProps,t===null?$i(e):me=t}function Bn(e,t,a,n){It=Ja=null,Ru(t),Tn=null,hl=0;var s=t.return;try{if(tg(e,s,t,a,ve)){qe=1,Oi(e,_t(a,e.current)),me=null;return}}catch(u){if(s!==null)throw me=s,u;qe=1,Oi(e,_t(a,e.current)),me=null;return}t.flags&32768?(xe||n===1?e=!0:On||(ve&536870912)!==0?e=!1:(wa=e=!0,(n===2||n===9||n===3||n===6)&&(n=bt.current,n!==null&&n.tag===13&&(n.flags|=16384))),kf(t,e)):$i(t)}function $i(e){var t=e;do{if((t.flags&32768)!==0){kf(t,wa);return}e=t.return;var a=lg(t.alternate,t,ra);if(a!==null){me=a;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);qe===0&&(qe=5)}function kf(e,t){do{var a=ig(e.alternate,e);if(a!==null){a.flags&=32767,me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=a}while(e!==null);qe=6,me=null}function _f(e,t,a,n,s,u,d,p,S){e.cancelPendingCommit=null;do Ji();while(Je!==0);if((Ne&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=lu,Qm(e,a,u,d,p,S),e===Oe&&(me=Oe=null,ve=0),Dn=t,ka=e,ca=a,fr=u,hr=s,yf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,vg(Fl,function(){return Of(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,s=F.p,F.p=2,d=Ne,Ne|=4;try{sg(e,t,a)}finally{Ne=d,F.p=s,D.T=n}}Je=1,Af(),Rf(),Mf()}}function Af(){if(Je===1){Je=0;var e=ka,t=Dn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var n=F.p;F.p=2;var s=Ne;Ne|=4;try{of(t,e);var u=kr,d=po(e.containerInfo),p=u.focusedElem,S=u.selectionRange;if(d!==p&&p&&p.ownerDocument&&mo(p.ownerDocument.documentElement,p)){if(S!==null&&Ps(p)){var R=S.start,B=S.end;if(B===void 0&&(B=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(B,p.value.length);else{var Y=p.ownerDocument||document,M=Y&&Y.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=p.textContent.length,ue=Math.min(S.start,ee),Re=S.end===void 0?ue:Math.min(S.end,ee);!O.extend&&ue>Re&&(d=Re,Re=ue,ue=d);var T=ho(p,ue),C=ho(p,Re);if(T&&C&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==C.node||O.focusOffset!==C.offset)){var A=Y.createRange();A.setStart(T.node,T.offset),O.removeAllRanges(),ue>Re?(O.addRange(A),O.extend(C.node,C.offset)):(A.setEnd(C.node,C.offset),O.addRange(A))}}}}for(Y=[],O=p;O=O.parentNode;)O.nodeType===1&&Y.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<Y.length;p++){var L=Y[p];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}ss=!!Tr,kr=Tr=null}finally{Ne=s,F.p=n,D.T=a}}e.current=t,Je=2}}function Rf(){if(Je===2){Je=0;var e=ka,t=Dn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var n=F.p;F.p=2;var s=Ne;Ne|=4;try{lf(e,t.alternate,t)}finally{Ne=s,F.p=n,D.T=a}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,Hm();var e=ka,t=Dn,a=ca,n=yf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Dn=ka=null,zf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),Os(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Kn,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,s=F.p,F.p=2,D.T=null;try{for(var u=e.onRecoverableError,d=0;d<n.length;d++){var p=n[d];u(p.value,{componentStack:p.stack})}}finally{D.T=t,F.p=s}}(ca&3)!==0&&Ji(),Xt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===mr?Al++:(Al=0,mr=e):Al=0,Rl(0)}}function zf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function Ji(){return Af(),Rf(),Mf(),Of()}function Of(){if(Je!==5)return!1;var e=ka,t=fr;fr=0;var a=Os(ca),n=D.T,s=F.p;try{F.p=32>a?32:a,D.T=null,a=hr,hr=null;var u=ka,d=ca;if(Je=0,Dn=ka=null,ca=0,(Ne&6)!==0)throw Error(o(331));var p=Ne;if(Ne|=4,pf(u.current),ff(u,u.current,d,a),Ne=p,Rl(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Kn,u)}catch{}return!0}finally{F.p=s,D.T=n,zf(e,t)}}function Uf(e,t,a){t=_t(a,t),t=Qu(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Wn(e,2),Xt(e))}function Te(e,t,a){if(e.tag===3)Uf(e,e,a);else for(;t!==null;){if(t.tag===3){Uf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ta===null||!Ta.has(n))){e=_t(a,e),a=Ud(2),n=ja(t,a,2),n!==null&&(Dd(a,n,t,e),Wn(n,2),Xt(n));break}}t=t.return}}function vr(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new cg;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(a)||(cr=!0,s.add(a),e=mg.bind(null,e,t,a),t.then(e,e))}function mg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Oe===e&&(ve&a)===a&&(qe===4||qe===3&&(ve&62914560)===ve&&300>mt()-Gi?(Ne&2)===0&&Hn(e,0):or|=a,Un===ve&&(Un=0)),Xt(e)}function Df(e,t){t===0&&(t=kc()),e=Xa(e,t),e!==null&&(Wn(e,t),Xt(e))}function pg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Df(e,a)}function gg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Df(e,a)}function vg(e,t){return As(e,t)}var Ki=null,Ln=null,yr=!1,Fi=!1,br=!1,Aa=0;function Xt(e){e!==Ln&&e.next===null&&(Ln===null?Ki=Ln=e:Ln=Ln.next=e),Fi=!0,yr||(yr=!0,bg())}function Rl(e,t){if(!br&&Fi){br=!0;do for(var a=!1,n=Ki;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var u=0;else{var d=n.suspendedLanes,p=n.pingedLanes;u=(1<<31-gt(42|e)+1)-1,u&=s&~(d&~p),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,qf(n,u))}else u=ve,u=ei(n,n===Oe?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Fn(n,u)||(a=!0,qf(n,u));n=n.next}while(a);br=!1}}function yg(){Hf()}function Hf(){Fi=yr=!1;var e=0;Aa!==0&&_g()&&(e=Aa);for(var t=mt(),a=null,n=Ki;n!==null;){var s=n.next,u=Bf(n,t);u===0?(n.next=null,a===null?Ki=s:a.next=s,s===null&&(Ln=a)):(a=n,(e!==0||(u&3)!==0)&&(Fi=!0)),n=s}Je!==0&&Je!==5||Rl(e),Aa!==0&&(Aa=0)}function Bf(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-gt(u),p=1<<d,S=s[d];S===-1?((p&a)===0||(p&n)!==0)&&(s[d]=Xm(p,t)):S<=t&&(e.expiredLanes|=p),u&=~p}if(t=Oe,a=ve,a=ei(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Rs(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Fn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Rs(n),Os(a)){case 2:case 8:a=Ec;break;case 32:a=Fl;break;case 268435456:a=Tc;break;default:a=Fl}return n=Lf.bind(null,e),a=As(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Rs(n),e.callbackPriority=2,e.callbackNode=null,2}function Lf(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ji()&&e.callbackNode!==a)return null;var n=ve;return n=ei(e,e===Oe?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(xf(e,n,t),Bf(e,mt()),e.callbackNode!=null&&e.callbackNode===a?Lf.bind(null,e):null)}function qf(e,t){if(Ji())return null;xf(e,t,!0)}function bg(){Rg(function(){(Ne&6)!==0?As(wc,yg):Hf()})}function xr(){if(Aa===0){var e=Nn;e===0&&(e=Wl,Wl<<=1,(Wl&261888)===0&&(Wl=256)),Aa=e}return Aa}function Yf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:li(""+e)}function Gf(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 xg(e,t,a,n,s){if(t==="submit"&&a&&a.stateNode===s){var u=Yf((s[ut]||null).action),d=n.submitter;d&&(t=(t=d[ut]||null)?Yf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var p=new ri("action","action",null,n,s);e.push({event:p,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Aa!==0){var S=d?Gf(s,d):new FormData(s);qu(a,{pending:!0,data:S,method:s.method,action:u},null,S)}}else typeof u=="function"&&(p.preventDefault(),S=d?Gf(s,d):new FormData(s),qu(a,{pending:!0,data:S,method:s.method,action:u},u,S))},currentTarget:s}]})}}for(var jr=0;jr<nu.length;jr++){var Sr=nu[jr],jg=Sr.toLowerCase(),Sg=Sr[0].toUpperCase()+Sr.slice(1);Ht(jg,"on"+Sg)}Ht(yo,"onAnimationEnd"),Ht(bo,"onAnimationIteration"),Ht(xo,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(Bp,"onTransitionRun"),Ht(Lp,"onTransitionStart"),Ht(qp,"onTransitionCancel"),Ht(jo,"onTransitionEnd"),on("onMouseEnter",["mouseout","mouseover"]),on("onMouseLeave",["mouseout","mouseover"]),on("onPointerEnter",["pointerout","pointerover"]),on("onPointerLeave",["pointerout","pointerover"]),Ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Vf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],s=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var p=n[d],S=p.instance,R=p.currentTarget;if(p=p.listener,S!==u&&s.isPropagationStopped())break e;u=p,s.currentTarget=R;try{u(s)}catch(B){di(B)}s.currentTarget=null,u=S}else for(d=0;d<n.length;d++){if(p=n[d],S=p.instance,R=p.currentTarget,p=p.listener,S!==u&&s.isPropagationStopped())break e;u=p,s.currentTarget=R;try{u(s)}catch(B){di(B)}s.currentTarget=null,u=S}}}}function pe(e,t){var a=t[Us];a===void 0&&(a=t[Us]=new Set);var n=e+"__bubble";a.has(n)||(Zf(t,e,2,!1),a.add(n))}function Cr(e,t,a){var n=0;t&&(n|=4),Zf(a,e,n,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){if(!e[Wi]){e[Wi]=!0,Uc.forEach(function(a){a!=="selectionchange"&&(Cg.has(a)||Cr(a,!1,e),Cr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wi]||(t[Wi]=!0,Cr("selectionchange",!1,t))}}function Zf(e,t,a,n){switch(bh(t)){case 2:var s=Wg;break;case 8:s=Ig;break;default:s=Lr}a=s.bind(null,t,a,e),s=void 0,!Zs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function wr(e,t,a,n,s){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var p=n.stateNode.containerInfo;if(p===s)break;if(d===4)for(d=n.return;d!==null;){var S=d.tag;if((S===3||S===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;p!==null;){if(d=un(p),d===null)return;if(S=d.tag,S===5||S===6||S===26||S===27){n=u=d;continue e}p=p.parentNode}}n=n.return}$c(function(){var R=u,B=Gs(a),Y=[];e:{var M=So.get(e);if(M!==void 0){var O=ri,ee=e;switch(e){case"keypress":if(si(a)===0)break e;case"keydown":case"keyup":O=gp;break;case"focusin":ee="focus",O=Js;break;case"focusout":ee="blur",O=Js;break;case"beforeblur":case"afterblur":O=Js;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":O=Fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=lp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=bp;break;case yo:case bo:case xo:O=up;break;case jo:O=jp;break;case"scroll":case"scrollend":O=ap;break;case"wheel":O=Cp;break;case"copy":case"cut":case"paste":O=cp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Ic;break;case"toggle":case"beforetoggle":O=wp}var ue=(t&4)!==0,Re=!ue&&(e==="scroll"||e==="scrollend"),T=ue?M!==null?M+"Capture":null:M;ue=[];for(var C=R,A;C!==null;){var L=C;if(A=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||A===null||T===null||(L=el(C,T),L!=null&&ue.push(zl(C,L,A))),Re)break;C=C.return}0<ue.length&&(M=new O(M,ee,null,a,B),Y.push({event:M,listeners:ue}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&a!==Ys&&(ee=a.relatedTarget||a.fromElement)&&(un(ee)||ee[sn]))break e;if((O||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=a.relatedTarget||a.toElement,O=R,ee=ee?un(ee):null,ee!==null&&(Re=h(ee),ue=ee.tag,ee!==Re||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(O=null,ee=R),O!==ee)){if(ue=Fc,L="onMouseLeave",T="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ue=Ic,L="onPointerLeave",T="onPointerEnter",C="pointer"),Re=O==null?M:Pn(O),A=ee==null?M:Pn(ee),M=new ue(L,C+"leave",O,a,B),M.target=Re,M.relatedTarget=A,L=null,un(B)===R&&(ue=new ue(T,C+"enter",ee,a,B),ue.target=A,ue.relatedTarget=Re,L=ue),Re=L,O&&ee)t:{for(ue=Ng,T=O,C=ee,A=0,L=T;L;L=ue(L))A++;L=0;for(var se=C;se;se=ue(se))L++;for(;0<A-L;)T=ue(T),A--;for(;0<L-A;)C=ue(C),L--;for(;A--;){if(T===C||C!==null&&T===C.alternate){ue=T;break t}T=ue(T),C=ue(C)}ue=null}else ue=null;O!==null&&Xf(Y,M,O,ue,!1),ee!==null&&Re!==null&&Xf(Y,Re,ee,ue,!0)}}e:{if(M=R?Pn(R):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Se=so;else if(lo(M))if(uo)Se=Up;else{Se=zp;var ne=Mp}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?R&&qs(R.elementType)&&(Se=so):Se=Op;if(Se&&(Se=Se(e,R))){io(Y,Se,a,B);break e}ne&&ne(e,M,R),e==="focusout"&&R&&M.type==="number"&&R.memoizedProps.value!=null&&Ls(M,"number",M.value)}switch(ne=R?Pn(R):window,e){case"focusin":(lo(ne)||ne.contentEditable==="true")&&(gn=ne,eu=R,rl=null);break;case"focusout":rl=eu=gn=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,go(Y,a,B);break;case"selectionchange":if(Hp)break;case"keydown":case"keyup":go(Y,a,B)}var fe;if(Fs)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else pn?ao(e,a)&&(ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ye="onCompositionStart");ye&&(Pc&&a.locale!=="ko"&&(pn||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&pn&&(fe=Jc()):(ma=B,Xs="value"in ma?ma.value:ma.textContent,pn=!0)),ne=Ii(R,ye),0<ne.length&&(ye=new Wc(ye,e,null,a,B),Y.push({event:ye,listeners:ne}),fe?ye.data=fe:(fe=no(a),fe!==null&&(ye.data=fe)))),(fe=Tp?kp(e,a):_p(e,a))&&(ye=Ii(R,"onBeforeInput"),0<ye.length&&(ne=new Wc("onBeforeInput","beforeinput",null,a,B),Y.push({event:ne,listeners:ye}),ne.data=fe)),xg(Y,e,R,a,B)}Vf(Y,t)})}function zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ii(e,t){for(var a=t+"Capture",n=[];e!==null;){var s=e,u=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||u===null||(s=el(e,a),s!=null&&n.unshift(zl(e,s,u)),s=el(e,t),s!=null&&n.push(zl(e,s,u))),e.tag===3)return n;e=e.return}return[]}function Ng(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,a,n,s){for(var u=t._reactName,d=[];a!==null&&a!==n;){var p=a,S=p.alternate,R=p.stateNode;if(p=p.tag,S!==null&&S===n)break;p!==5&&p!==26&&p!==27||R===null||(S=R,s?(R=el(a,u),R!=null&&d.unshift(zl(a,R,S))):s||(R=el(a,u),R!=null&&d.push(zl(a,R,S)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var wg=/\r\n?/g,Eg=/\u0000|\uFFFD/g;function Qf(e){return(typeof e=="string"?e:""+e).replace(wg,`
|
|
49
|
-
`).replace(Eg,"")}function $f(e,t){return t=Qf(t),Qf(e)===t}function Ae(e,t,a,n,s,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||fn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&fn(e,""+n);break;case"className":ai(e,"class",n);break;case"tabIndex":ai(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ai(e,a,n);break;case"style":Xc(e,n,u);break;case"data":if(t!=="object"){ai(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=li(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="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 u=="function"&&(a==="formAction"?(t!=="input"&&Ae(e,t,"name",s.name,s,null),Ae(e,t,"formEncType",s.formEncType,s,null),Ae(e,t,"formMethod",s.formMethod,s,null),Ae(e,t,"formTarget",s.formTarget,s,null)):(Ae(e,t,"encType",s.encType,s,null),Ae(e,t,"method",s.method,s,null),Ae(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=li(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Jt);break;case"onScroll":n!=null&&pe("scroll",e);break;case"onScrollEnd":n!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=li(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":pe("beforetoggle",e),pe("toggle",e),ti(e,"popover",n);break;case"xlinkActuate":$t(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":$t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":$t(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":$t(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":$t(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":$t(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":$t(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":$t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":$t(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ti(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ep.get(a)||a,ti(e,a,n))}}function Er(e,t,a,n,s,u){switch(a){case"style":Xc(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?fn(e,n):(typeof n=="number"||typeof n=="bigint")&&fn(e,""+n);break;case"onScroll":n!=null&&pe("scroll",e);break;case"onScrollEnd":n!=null&&pe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),u=e[ut]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,s),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,s);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ti(e,a,n)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var n=!1,s=!1,u;for(u in a)if(a.hasOwnProperty(u)){var d=a[u];if(d!=null)switch(u){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,u,d,a,null)}}s&&Ae(e,t,"srcSet",a.srcSet,a,null),n&&Ae(e,t,"src",a.src,a,null);return;case"input":pe("invalid",e);var p=u=d=s=null,S=null,R=null;for(n in a)if(a.hasOwnProperty(n)){var B=a[n];if(B!=null)switch(n){case"name":s=B;break;case"type":d=B;break;case"checked":S=B;break;case"defaultChecked":R=B;break;case"value":u=B;break;case"defaultValue":p=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:Ae(e,t,n,B,a,null)}}Yc(e,u,p,S,R,d,s,!1);return;case"select":pe("invalid",e),n=d=u=null;for(s in a)if(a.hasOwnProperty(s)&&(p=a[s],p!=null))switch(s){case"value":u=p;break;case"defaultValue":d=p;break;case"multiple":n=p;default:Ae(e,t,s,p,a,null)}t=u,a=d,e.multiple=!!n,t!=null?dn(e,!!n,t,!1):a!=null&&dn(e,!!n,a,!0);return;case"textarea":pe("invalid",e),u=s=n=null;for(d in a)if(a.hasOwnProperty(d)&&(p=a[d],p!=null))switch(d){case"value":n=p;break;case"defaultValue":s=p;break;case"children":u=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:Ae(e,t,d,p,a,null)}Vc(e,n,s,u);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(n=a[S],n!=null))switch(S){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Ae(e,t,S,n,a,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(n=0;n<Ml.length;n++)pe(Ml[n],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("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(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,R,n,a,null)}return;default:if(qs(t)){for(B in a)a.hasOwnProperty(B)&&(n=a[B],n!==void 0&&Er(e,t,B,n,a,void 0));return}}for(p in a)a.hasOwnProperty(p)&&(n=a[p],n!=null&&Ae(e,t,p,n,a,null))}function Tg(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,u=null,d=null,p=null,S=null,R=null,B=null;for(O in a){var Y=a[O];if(a.hasOwnProperty(O)&&Y!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=Y;default:n.hasOwnProperty(O)||Ae(e,t,O,null,n,Y)}}for(var M in n){var O=n[M];if(Y=a[M],n.hasOwnProperty(M)&&(O!=null||Y!=null))switch(M){case"type":u=O;break;case"name":s=O;break;case"checked":R=O;break;case"defaultChecked":B=O;break;case"value":d=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:O!==Y&&Ae(e,t,M,O,n,Y)}}Bs(e,d,p,S,R,B,u,s);return;case"select":O=d=p=M=null;for(u in a)if(S=a[u],a.hasOwnProperty(u)&&S!=null)switch(u){case"value":break;case"multiple":O=S;default:n.hasOwnProperty(u)||Ae(e,t,u,null,n,S)}for(s in n)if(u=n[s],S=a[s],n.hasOwnProperty(s)&&(u!=null||S!=null))switch(s){case"value":M=u;break;case"defaultValue":p=u;break;case"multiple":d=u;default:u!==S&&Ae(e,t,s,u,n,S)}t=p,a=d,n=O,M!=null?dn(e,!!a,M,!1):!!n!=!!a&&(t!=null?dn(e,!!a,t,!0):dn(e,!!a,a?[]:"",!1));return;case"textarea":O=M=null;for(p in a)if(s=a[p],a.hasOwnProperty(p)&&s!=null&&!n.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Ae(e,t,p,null,n,s)}for(d in n)if(s=n[d],u=a[d],n.hasOwnProperty(d)&&(s!=null||u!=null))switch(d){case"value":M=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==u&&Ae(e,t,d,s,n,u)}Gc(e,M,O);return;case"option":for(var ee in a)if(M=a[ee],a.hasOwnProperty(ee)&&M!=null&&!n.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Ae(e,t,ee,null,n,M)}for(S in n)if(M=n[S],O=a[S],n.hasOwnProperty(S)&&M!==O&&(M!=null||O!=null))switch(S){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Ae(e,t,S,M,n,O)}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 ue in a)M=a[ue],a.hasOwnProperty(ue)&&M!=null&&!n.hasOwnProperty(ue)&&Ae(e,t,ue,null,n,M);for(R in n)if(M=n[R],O=a[R],n.hasOwnProperty(R)&&M!==O&&(M!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:Ae(e,t,R,M,n,O)}return;default:if(qs(t)){for(var Re in a)M=a[Re],a.hasOwnProperty(Re)&&M!==void 0&&!n.hasOwnProperty(Re)&&Er(e,t,Re,void 0,n,M);for(B in n)M=n[B],O=a[B],!n.hasOwnProperty(B)||M===O||M===void 0&&O===void 0||Er(e,t,B,M,n,O);return}}for(var T in a)M=a[T],a.hasOwnProperty(T)&&M!=null&&!n.hasOwnProperty(T)&&Ae(e,t,T,null,n,M);for(Y in n)M=n[Y],O=a[Y],!n.hasOwnProperty(Y)||M===O||M==null&&O==null||Ae(e,t,Y,M,n,O)}function Jf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var s=a[n],u=s.transferSize,d=s.initiatorType,p=s.duration;if(u&&p&&Jf(d)){for(d=0,p=s.responseEnd,n+=1;n<a.length;n++){var S=a[n],R=S.startTime;if(R>p)break;var B=S.transferSize,Y=S.initiatorType;B&&Jf(Y)&&(S=S.responseEnd,d+=B*(S<p?1:(p-R)/(S-R)))}if(--n,t+=8*(u+d)/(s.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 Tr=null,kr=null;function Pi(e){return e.nodeType===9?e:e.ownerDocument}function Kf(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 Ff(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 _r(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 Ar=null;function _g(){var e=window.event;return e&&e.type==="popstate"?e===Ar?!1:(Ar=e,!0):(Ar=null,!1)}var Wf=typeof setTimeout=="function"?setTimeout:void 0,Ag=typeof clearTimeout=="function"?clearTimeout:void 0,If=typeof Promise=="function"?Promise:void 0,Rg=typeof queueMicrotask=="function"?queueMicrotask:typeof If<"u"?function(e){return If.resolve(null).then(e).catch(Mg)}:Wf;function Mg(e){setTimeout(function(){throw e})}function Ra(e){return e==="head"}function Pf(e,t){var a=t,n=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(s),Vn(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ol(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ol(a);for(var u=a.firstChild;u;){var d=u.nextSibling,p=u.nodeName;u[In]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=d}}else a==="body"&&Ol(e.ownerDocument.body);a=s}while(a);Vn(t)}function eh(e,t){var a=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Rr(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":Rr(a),Ds(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function zg(e,t,a,n){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[In])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ot(e.nextSibling),e===null)break}return null}function Og(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ot(e.nextSibling),e===null))return null;return e}function th(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ot(e.nextSibling),e===null))return null;return e}function Mr(e){return e.data==="$?"||e.data==="$~"}function zr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ug(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ot(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 Or=null;function ah(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ot(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function nh(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 lh(e,t,a){switch(t=Pi(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ds(e)}var Ut=new Map,ih=new Set;function es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oa=F.d;F.d={f:Dg,r:Hg,D:Bg,C:Lg,L:qg,m:Yg,X:Vg,S:Gg,M:Zg};function Dg(){var e=oa.f(),t=Xi();return e||t}function Hg(e){var t=rn(e);t!==null&&t.tag===5&&t.type==="form"?jd(t):oa.r(e)}var qn=typeof document>"u"?null:document;function sh(e,t,a){var n=qn;if(n&&typeof t=="string"&&t){var s=Tt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),ih.has(s)||(ih.add(s),e={rel:e,crossOrigin:a,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Bg(e){oa.D(e),sh("dns-prefetch",e,null)}function Lg(e,t){oa.C(e,t),sh("preconnect",e,t)}function qg(e,t,a){oa.L(e,t,a);var n=qn;if(n&&e&&t){var s='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Tt(a.imageSizes)+'"]')):s+='[href="'+Tt(e)+'"]';var u=s;switch(t){case"style":u=Yn(e);break;case"script":u=Gn(e)}Ut.has(u)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ut.set(u,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(Ul(u))||t==="script"&&n.querySelector(Dl(u))||(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Yg(e,t){oa.m(e,t);var a=qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Tt(n)+'"][href="'+Tt(e)+'"]',u=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Gn(e)}if(!Ut.has(u)&&(e=j({rel:"modulepreload",href:e},t),Ut.set(u,e),a.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Dl(u)))return}n=a.createElement("link"),tt(n,"link",e),Ke(n),a.head.appendChild(n)}}}function Gg(e,t,a){oa.S(e,t,a);var n=qn;if(n&&e){var s=cn(n).hoistableStyles,u=Yn(e);t=t||"default";var d=s.get(u);if(!d){var p={loading:0,preload:null};if(d=n.querySelector(Ul(u)))p.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ut.get(u))&&Ur(e,a);var S=d=n.createElement("link");Ke(S),tt(S,"link",e),S._p=new Promise(function(R,B){S.onload=R,S.onerror=B}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,ts(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:p},s.set(u,d)}}}function Vg(e,t){oa.X(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,s=Gn(e),u=n.get(s);u||(u=a.querySelector(Dl(s)),u||(e=j({src:e,async:!0},t),(t=Ut.get(s))&&Dr(e,t),u=a.createElement("script"),Ke(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function Zg(e,t){oa.M(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,s=Gn(e),u=n.get(s);u||(u=a.querySelector(Dl(s)),u||(e=j({src:e,async:!0,type:"module"},t),(t=Ut.get(s))&&Dr(e,t),u=a.createElement("script"),Ke(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function uh(e,t,a,n){var s=(s=he.current)?es(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Yn(a.href),a=cn(s).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Yn(a.href);var u=cn(s).hoistableStyles,d=u.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=s.querySelector(Ul(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Ut.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},Ut.set(e,a),u||Xg(s,e,a,d.state))),t&&n===null)throw Error(o(528,""));return d}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gn(a),a=cn(s).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Yn(e){return'href="'+Tt(e)+'"'}function Ul(e){return'link[rel="stylesheet"]['+e+"]"}function rh(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function Xg(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),tt(t,"link",a),Ke(t),e.head.appendChild(t))}function Gn(e){return'[src="'+Tt(e)+'"]'}function Dl(e){return"script[async]"+e}function ch(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(n)return t.instance=n,Ke(n),n;var s=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ke(n),tt(n,"style",s),ts(n,a.precedence,e),t.instance=n;case"stylesheet":s=Yn(a.href);var u=e.querySelector(Ul(s));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;n=rh(a),(s=Ut.get(s))&&Ur(n,s),u=(e.ownerDocument||e).createElement("link"),Ke(u);var d=u;return d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),tt(u,"link",n),t.state.loading|=4,ts(u,a.precedence,e),t.instance=u;case"script":return u=Gn(a.src),(s=e.querySelector(Dl(u)))?(t.instance=s,Ke(s),s):(n=a,(s=Ut.get(u))&&(n=j({},a),Dr(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ke(s),tt(s,"link",n),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,ts(n,a.precedence,e));return t.instance}function ts(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,u=s,d=0;d<n.length;d++){var p=n[d];if(p.dataset.precedence===t)u=p;else if(u!==s)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ur(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Dr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var as=null;function oh(e,t,a){if(as===null){var n=new Map,s=as=new Map;s.set(a,n)}else s=as,n=s.get(a),n||(n=new Map,s.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var u=a[s];if(!(u[In]||u[We]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var p=n.get(d);p?p.push(u):n.set(d,[u])}}return n}function dh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Qg(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 fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $g(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Yn(n.href),u=t.querySelector(Ul(s));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ns.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ke(u);return}u=t.ownerDocument||t,n=rh(n),(s=Ut.get(s))&&Ur(n,s),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),tt(u,"link",n),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ns.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Hr=0;function Jg(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&is(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Hr===0&&(Hr=62500*kg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&is(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Hr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ls=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ls=new Map,t.forEach(Kg,e),ls=null,ns.call(e))}function Kg(e,t){if(!(t.state.loading&4)){var a=ls.get(e);if(a)var n=a.get(null);else{a=new Map,ls.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<s.length;u++){var d=s[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),u=a.get(d)||n,u===n&&a.set(null,s),a.set(d,s),this.count++,n=ns.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),u?u.parentNode.insertBefore(s,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Hl={$$typeof:Z,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function Fg(e,t,a,n,s,u,d,p,S){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=Ms(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ms(0),this.hiddenUpdates=Ms(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function hh(e,t,a,n,s,u,d,p,S,R,B,Y){return e=new Fg(e,t,a,d,S,R,B,Y,p),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=gu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},xu(u),e}function mh(e){return e?(e=bn,e):bn}function ph(e,t,a,n,s,u){s=mh(s),n.context===null?n.context=s:n.pendingContext=s,n=xa(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=ja(e,n,t),a!==null&&(ht(a,e,t),pl(a,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Br(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Xa(e,67108864);t!==null&&ht(t,e,67108864),Br(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Ct();t=zs(t);var a=Xa(e,t);a!==null&&ht(a,e,t),Br(e,t)}}var ss=!0;function Wg(e,t,a,n){var s=D.T;D.T=null;var u=F.p;try{F.p=2,Lr(e,t,a,n)}finally{F.p=u,D.T=s}}function Ig(e,t,a,n){var s=D.T;D.T=null;var u=F.p;try{F.p=8,Lr(e,t,a,n)}finally{F.p=u,D.T=s}}function Lr(e,t,a,n){if(ss){var s=qr(n);if(s===null)wr(e,t,n,us,a),xh(e,n);else if(ev(s,e,t,a,n))n.stopPropagation();else if(xh(e,n),t&4&&-1<Pg.indexOf(e)){for(;s!==null;){var u=rn(s);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=qa(u.pendingLanes);if(d!==0){var p=u;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var S=1<<31-gt(d);p.entanglements[1]|=S,d&=~S}Xt(u),(Ne&6)===0&&(Vi=mt()+500,Rl(0))}}break;case 31:case 13:p=Xa(u,2),p!==null&&ht(p,u,2),Xi(),Br(u,2)}if(u=qr(n),u===null&&wr(e,t,n,us,a),u===s)break;s=u}s!==null&&n.stopPropagation()}else wr(e,t,n,null,a)}}function qr(e){return e=Gs(e),Yr(e)}var us=null;function Yr(e){if(us=null,e=un(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=y(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 us=e,null}function bh(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(Bm()){case wc:return 2;case Ec:return 8;case Fl:case Lm:return 32;case Tc:return 268435456;default:return 32}default:return 32}}var Gr=!1,Ma=null,za=null,Oa=null,Bl=new Map,Ll=new Map,Ua=[],Pg="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 xh(e,t){switch(e){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":Bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ll.delete(t.pointerId)}}function ql(e,t,a,n,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[s]},t!==null&&(t=rn(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function ev(e,t,a,n,s){switch(t){case"focusin":return Ma=ql(Ma,e,t,a,n,s),!0;case"dragenter":return za=ql(za,e,t,a,n,s),!0;case"mouseover":return Oa=ql(Oa,e,t,a,n,s),!0;case"pointerover":var u=s.pointerId;return Bl.set(u,ql(Bl.get(u)||null,e,t,a,n,s)),!0;case"gotpointercapture":return u=s.pointerId,Ll.set(u,ql(Ll.get(u)||null,e,t,a,n,s)),!0}return!1}function jh(e){var t=un(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,zc(e.priority,function(){yh(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,zc(e.priority,function(){yh(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 rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qr(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ys=n,a.target.dispatchEvent(n),Ys=null}else return t=rn(a),t!==null&&vh(t),e.blockedOn=a,!1;t.shift()}return!0}function Sh(e,t,a){rs(e)&&a.delete(t)}function tv(){Gr=!1,Ma!==null&&rs(Ma)&&(Ma=null),za!==null&&rs(za)&&(za=null),Oa!==null&&rs(Oa)&&(Oa=null),Bl.forEach(Sh),Ll.forEach(Sh)}function cs(e,t){e.blockedOn===t&&(e.blockedOn=null,Gr||(Gr=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,tv)))}var os=null;function Ch(e){os!==e&&(os=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){os===e&&(os=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(Yr(n||a)===null)continue;break}var u=rn(a);u!==null&&(e.splice(t,3),t-=3,qu(u,{pending:!0,data:s,method:a.method,action:n},n,s))}}))}function Vn(e){function t(S){return cs(S,e)}Ma!==null&&cs(Ma,e),za!==null&&cs(za,e),Oa!==null&&cs(Oa,e),Bl.forEach(t),Ll.forEach(t);for(var a=0;a<Ua.length;a++){var n=Ua[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ua.length&&(a=Ua[0],a.blockedOn===null);)jh(a),a.blockedOn===null&&Ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var s=a[n],u=a[n+1],d=s[ut]||null;if(typeof u=="function")d||Ch(a);else if(d){var p=null;if(u&&u.hasAttribute("formAction")){if(s=u,d=u[ut]||null)p=d.formAction;else if(Yr(s)!==null)continue}else p=d.action;typeof p=="function"?a[n+1]=p:(a.splice(n,3),n-=3),Ch(a)}}}function Nh(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Vr(e){this._internalRoot=e}ds.prototype.render=Vr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ct();ph(a,n,e,t,null,null)},ds.prototype.unmount=Vr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Xi(),t[sn]=null}};function ds(e){this._internalRoot=e}ds.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ua.length&&t!==0&&t<Ua[a].priority;a++);Ua.splice(a,0,e),a===0&&jh(e)}};var wh=r.version;if(wh!=="19.2.5")throw Error(o(527,wh,"19.2.5"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var av={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fs.isDisabled&&fs.supportsFiber)try{Kn=fs.inject(av),pt=fs}catch{}}return Gl.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",s=Rd,u=Md,d=zd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=hh(e,1,!1,null,null,a,n,null,s,u,d,Nh),e[sn]=t.current,Nr(e),new Vr(t)},Gl.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,s="",u=Rd,d=Md,p=zd,S=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(p=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=hh(e,1,!0,t,a??null,n,s,S,u,d,p,Nh),t.context=mh(null),a=t.current,n=Ct(),n=zs(n),s=xa(n),s.callback=null,ja(a,s,n),a=n,t.current.lanes=a,Wn(t,a),Xt(t),e[sn]=t.current,Nr(e),new ds(t)},Gl.version="19.2.5",Gl}var Uh;function fv(){if(Uh)return Qr.exports;Uh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Qr.exports=dv(),Qr.exports}var hv=fv();/**
|
|
50
|
-
* react-router v7.14.2
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var Dh="popstate";function Hh(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function mv(l={}){function r(o,f){var v;let h=(v=f.state)==null?void 0:v.masked,{pathname:g,search:y,hash:m}=h||o.location;return sc("",{pathname:g,search:y,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function c(o,f){return typeof f=="string"?f:Ql(f)}return gv(r,c,null,l)}function Be(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Dt(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function pv(){return Math.random().toString(36).substring(2,10)}function Bh(l,r){return{usr:l.state,key:l.key,idx:r,masked:l.unstable_mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function sc(l,r,c=null,o,f){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Zn(r):r,state:c,key:r&&r.key||o||pv(),unstable_mask:f}}function Ql({pathname:l="/",search:r="",hash:c=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(l+=c.charAt(0)==="#"?c:"#"+c),l}function Zn(l){let r={};if(l){let c=l.indexOf("#");c>=0&&(r.hash=l.substring(c),l=l.substring(0,c));let o=l.indexOf("?");o>=0&&(r.search=l.substring(o),l=l.substring(0,o)),l&&(r.pathname=l)}return r}function gv(l,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,g=f.history,y="POP",m=null,v=x();v==null&&(v=0,g.replaceState({...g.state,idx:v},""));function x(){return(g.state||{idx:null}).idx}function j(){y="POP";let q=x(),H=q==null?null:q-v;v=q,m&&m({action:y,location:z.location,delta:H})}function _(q,H){y="PUSH";let Q=Hh(q)?q:sc(z.location,q,H);v=x()+1;let Z=Bh(Q,v),P=z.createHref(Q.unstable_mask||Q);try{g.pushState(Z,"",P)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(P)}h&&m&&m({action:y,location:z.location,delta:1})}function k(q,H){y="REPLACE";let Q=Hh(q)?q:sc(z.location,q,H);v=x();let Z=Bh(Q,v),P=z.createHref(Q.unstable_mask||Q);g.replaceState(Z,"",P),h&&m&&m({action:y,location:z.location,delta:0})}function E(q){return vv(q)}let z={get action(){return y},get location(){return l(f,g)},listen(q){if(m)throw new Error("A history only accepts one active listener");return f.addEventListener(Dh,j),m=q,()=>{f.removeEventListener(Dh,j),m=null}},createHref(q){return r(f,q)},createURL:E,encodeLocation(q){let H=E(q);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:_,replace:k,go(q){return g.go(q)}};return z}function vv(l,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Be(c,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:Ql(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function Ph(l,r,c="/"){return yv(l,r,c,!1)}function yv(l,r,c,o){let f=typeof r=="string"?Zn(r):r,h=da(f.pathname||"/",c);if(h==null)return null;let g=em(l);bv(g);let y=null;for(let m=0;y==null&&m<g.length;++m){let v=Av(h);y=kv(g[m],v,o)}return y}function em(l,r=[],c=[],o="",f=!1){let h=(g,y,m=f,v)=>{let x={relativePath:v===void 0?g.path||"":v,caseSensitive:g.caseSensitive===!0,childrenIndex:y,route:g};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&m)return;Be(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let j=qt([o,x.relativePath]),_=c.concat(x);g.children&&g.children.length>0&&(Be(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),em(g.children,r,_,j,m)),!(g.path==null&&!g.index)&&r.push({path:j,score:Ev(j,g.index),routesMeta:_})};return l.forEach((g,y)=>{var m;if(g.path===""||!((m=g.path)!=null&&m.includes("?")))h(g,y);else for(let v of tm(g.path))h(g,y,!0,v)}),r}function tm(l){let r=l.split("/");if(r.length===0)return[];let[c,...o]=r,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let g=tm(o.join("/")),y=[];return y.push(...g.map(m=>m===""?h:[h,m].join("/"))),f&&y.push(...g),y.map(m=>l.startsWith("/")&&m===""?"/":m)}function bv(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:Tv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var xv=/^:[\w-]+$/,jv=3,Sv=2,Cv=1,Nv=10,wv=-2,Lh=l=>l==="*";function Ev(l,r){let c=l.split("/"),o=c.length;return c.some(Lh)&&(o+=wv),r&&(o+=Sv),c.filter(f=>!Lh(f)).reduce((f,h)=>f+(xv.test(h)?jv:h===""?Cv:Nv),o)}function Tv(l,r){return l.length===r.length&&l.slice(0,-1).every((o,f)=>o===r[f])?l[l.length-1]-r[r.length-1]:0}function kv(l,r,c=!1){let{routesMeta:o}=l,f={},h="/",g=[];for(let y=0;y<o.length;++y){let m=o[y],v=y===o.length-1,x=h==="/"?r:r.slice(h.length)||"/",j=vs({path:m.relativePath,caseSensitive:m.caseSensitive,end:v},x),_=m.route;if(!j&&v&&c&&!o[o.length-1].route.index&&(j=vs({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},x)),!j)return null;Object.assign(f,j.params),g.push({params:f,pathname:qt([h,j.pathname]),pathnameBase:Ov(qt([h,j.pathnameBase])),route:_}),j.pathnameBase!=="/"&&(h=qt([h,j.pathnameBase]))}return g}function vs(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=_v(l.path,l.caseSensitive,l.end),f=r.match(c);if(!f)return null;let h=f[0],g=h.replace(/(.)\/+$/,"$1"),y=f.slice(1);return{params:o.reduce((v,{paramName:x,isOptional:j},_)=>{if(x==="*"){let E=y[_]||"";g=h.slice(0,h.length-E.length).replace(/(.)\/+$/,"$1")}const k=y[_];return j&&!k?v[x]=void 0:v[x]=(k||"").replace(/%2F/g,"/"),v},{}),pathname:h,pathnameBase:g,pattern:l}}function _v(l,r=!1,c=!0){Dt(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,y,m,v,x)=>{if(o.push({paramName:y,isOptional:m!=null}),m){let j=x.charAt(v+g.length);return j&&j!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function Av(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Dt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function da(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=l.charAt(c);return o&&o!=="/"?null:l.slice(c)||"/"}var Rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Mv(l,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof l=="string"?Zn(l):l,h;return c?(c=am(c),c.startsWith("/")?h=qh(c.substring(1),"/"):h=qh(c,r)):h=r,{pathname:h,search:Uv(o),hash:Dv(f)}}function qh(l,r){let c=ys(r).split("/");return l.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function Fr(l,r,c,o){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zv(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function dc(l){let r=zv(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function js(l,r,c,o=!1){let f;typeof l=="string"?f=Zn(l):(f={...l},Be(!f.pathname||!f.pathname.includes("?"),Fr("?","pathname","search",f)),Be(!f.pathname||!f.pathname.includes("#"),Fr("#","pathname","hash",f)),Be(!f.search||!f.search.includes("#"),Fr("#","search","hash",f)));let h=l===""||f.pathname==="",g=h?"/":f.pathname,y;if(g==null)y=c;else{let j=r.length-1;if(!o&&g.startsWith("..")){let _=g.split("/");for(;_[0]==="..";)_.shift(),j-=1;f.pathname=_.join("/")}y=j>=0?r[j]:"/"}let m=Mv(f,y),v=g&&g!=="/"&&g.endsWith("/"),x=(h||g===".")&&c.endsWith("/");return!m.pathname.endsWith("/")&&(v||x)&&(m.pathname+="/"),m}var am=l=>l.replace(/\/\/+/g,"/"),qt=l=>am(l.join("/")),ys=l=>l.replace(/\/+$/,""),Ov=l=>ys(l).replace(/^\/*/,"/"),Uv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Dv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Hv=class{constructor(l,r,c,o=!1){this.status=l,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Bv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Lv(l){let r=l.map(c=>c.route.path).filter(Boolean);return qt(r)||"/"}var nm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lm(l,r){let c=l;if(typeof c!="string"||!Rv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(nm)try{let h=new URL(window.location.href),g=c.startsWith("//")?new URL(h.protocol+c):new URL(c),y=da(g.pathname,r);g.origin===h.origin&&y!=null?c=y+g.search+g.hash:f=!0}catch{Dt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var im=["POST","PUT","PATCH","DELETE"];new Set(im);var qv=["GET",...im];new Set(qv);var Xn=b.createContext(null);Xn.displayName="DataRouter";var Ss=b.createContext(null);Ss.displayName="DataRouterState";var sm=b.createContext(!1);function Yv(){return b.useContext(sm)}var um=b.createContext({isTransitioning:!1});um.displayName="ViewTransition";var Gv=b.createContext(new Map);Gv.displayName="Fetchers";var Vv=b.createContext(null);Vv.displayName="Await";var Nt=b.createContext(null);Nt.displayName="Navigation";var $l=b.createContext(null);$l.displayName="Location";var Yt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var fc=b.createContext(null);fc.displayName="RouteError";var rm="REACT_ROUTER_ERROR",Zv="REDIRECT",Xv="ROUTE_ERROR_RESPONSE";function Qv(l){if(l.startsWith(`${rm}:${Zv}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function $v(l){if(l.startsWith(`${rm}:${Xv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Hv(r.status,r.statusText,r.data)}catch{}}function Jv(l,{relative:r}={}){Be(Qn(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=b.useContext(Nt),{hash:f,pathname:h,search:g}=Jl(l,{relative:r}),y=h;return c!=="/"&&(y=h==="/"?c:qt([c,h])),o.createHref({pathname:y,search:g,hash:f})}function Qn(){return b.useContext($l)!=null}function wt(){return Be(Qn(),"useLocation() may be used only in the context of a <Router> component."),b.useContext($l).location}var cm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function om(l){b.useContext(Nt).static||b.useLayoutEffect(l)}function hc(){let{isDataRoute:l}=b.useContext(Yt);return l?ry():Kv()}function Kv(){Be(Qn(),"useNavigate() may be used only in the context of a <Router> component.");let l=b.useContext(Xn),{basename:r,navigator:c}=b.useContext(Nt),{matches:o}=b.useContext(Yt),{pathname:f}=wt(),h=JSON.stringify(dc(o)),g=b.useRef(!1);return om(()=>{g.current=!0}),b.useCallback((m,v={})=>{if(Dt(g.current,cm),!g.current)return;if(typeof m=="number"){c.go(m);return}let x=js(m,JSON.parse(h),f,v.relative==="path");l==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:qt([r,x.pathname])),(v.replace?c.replace:c.push)(x,v.state,v)},[r,c,h,f,l])}b.createContext(null);function Fv(){let{matches:l}=b.useContext(Yt),r=l[l.length-1];return(r==null?void 0:r.params)??{}}function Jl(l,{relative:r}={}){let{matches:c}=b.useContext(Yt),{pathname:o}=wt(),f=JSON.stringify(dc(c));return b.useMemo(()=>js(l,JSON.parse(f),o,r==="path"),[l,f,o,r])}function Wv(l,r){return dm(l,r)}function dm(l,r,c){var q;Be(Qn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=b.useContext(Nt),{matches:f}=b.useContext(Yt),h=f[f.length-1],g=h?h.params:{},y=h?h.pathname:"/",m=h?h.pathnameBase:"/",v=h&&h.route;{let H=v&&v.path||"";hm(y,!v||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${H}">) 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
|
-
|
|
60
|
-
Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let x=wt(),j;if(r){let H=typeof r=="string"?Zn(r):r;Be(m==="/"||((q=H.pathname)==null?void 0:q.startsWith(m)),`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 "${m}" but pathname "${H.pathname}" was given in the \`location\` prop.`),j=H}else j=x;let _=j.pathname||"/",k=_;if(m!=="/"){let H=m.replace(/^\//,"").split("/");k="/"+_.replace(/^\//,"").split("/").slice(H.length).join("/")}let E=Ph(l,{pathname:k});Dt(v||E!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),Dt(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 z=ay(E&&E.map(H=>Object.assign({},H,{params:Object.assign({},g,H.params),pathname:qt([m,o.encodeLocation?o.encodeLocation(H.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?m:qt([m,o.encodeLocation?o.encodeLocation(H.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),f,c);return r&&z?b.createElement($l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...j},navigationType:"POP"}},z):z}function Iv(){let l=uy(),r=Bv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),c=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},h={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",l),g=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:h},"ErrorBoundary")," or"," ",b.createElement("code",{style:h},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},r),c?b.createElement("pre",{style:f},c):null,g)}var Pv=b.createElement(Iv,null),fm=class extends b.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const c=$v(l.digest);c&&(l=c)}let r=l!==void 0?b.createElement(Yt.Provider,{value:this.props.routeContext},b.createElement(fc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?b.createElement(ey,{error:l},r):r}};fm.contextType=sm;var Wr=new WeakMap;function ey({children:l,error:r}){let{basename:c}=b.useContext(Nt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Qv(r.digest);if(o){let f=Wr.get(r);if(f)throw f;let h=lm(o.location,c);if(nm&&!Wr.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw Wr.set(r,g),g}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function ty({routeContext:l,match:r,children:c}){let o=b.useContext(Xn);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Yt.Provider,{value:l},c)}function ay(l,r=[],c){let o=c==null?void 0:c.state;if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let f=l,h=o==null?void 0:o.errors;if(h!=null){let x=f.findIndex(j=>j.route.id&&(h==null?void 0:h[j.route.id])!==void 0);Be(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let g=!1,y=-1;if(c&&o){g=o.renderFallback;for(let x=0;x<f.length;x++){let j=f[x];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&&(y=x),j.route.id){let{loaderData:_,errors:k}=o,E=j.route.loader&&!_.hasOwnProperty(j.route.id)&&(!k||k[j.route.id]===void 0);if(j.route.lazy||E){c.isStatic&&(g=!0),y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}}let m=c==null?void 0:c.onError,v=o&&m?(x,j)=>{var _,k;m(x,{location:o.location,params:((k=(_=o.matches)==null?void 0:_[0])==null?void 0:k.params)??{},unstable_pattern:Lv(o.matches),errorInfo:j})}:void 0;return f.reduceRight((x,j,_)=>{let k,E=!1,z=null,q=null;o&&(k=h&&j.route.id?h[j.route.id]:void 0,z=j.route.errorElement||Pv,g&&(y<0&&_===0?(hm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,q=null):y===_&&(E=!0,q=j.route.hydrateFallbackElement||null)));let H=r.concat(f.slice(0,_+1)),Q=()=>{let Z;return k?Z=z:E?Z=q:j.route.Component?Z=b.createElement(j.route.Component,null):j.route.element?Z=j.route.element:Z=x,b.createElement(ty,{match:j,routeContext:{outlet:x,matches:H,isDataRoute:o!=null},children:Z})};return o&&(j.route.ErrorBoundary||j.route.errorElement||_===0)?b.createElement(fm,{location:o.location,revalidation:o.revalidation,component:z,error:k,children:Q(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:v}):Q()},null)}function mc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ny(l){let r=b.useContext(Xn);return Be(r,mc(l)),r}function ly(l){let r=b.useContext(Ss);return Be(r,mc(l)),r}function iy(l){let r=b.useContext(Yt);return Be(r,mc(l)),r}function pc(l){let r=iy(l),c=r.matches[r.matches.length-1];return Be(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function sy(){return pc("useRouteId")}function uy(){var o;let l=b.useContext(fc),r=ly("useRouteError"),c=pc("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function ry(){let{router:l}=ny("useNavigate"),r=pc("useNavigate"),c=b.useRef(!1);return om(()=>{c.current=!0}),b.useCallback(async(f,h={})=>{Dt(c.current,cm),c.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var Yh={};function hm(l,r,c){!r&&!Yh[l]&&(Yh[l]=!0,Dt(!1,c))}b.memo(cy);function cy({routes:l,future:r,state:c,isStatic:o,onError:f}){return dm(l,void 0,{state:c,isStatic:o,onError:f})}function Ir({to:l,replace:r,state:c,relative:o}){Be(Qn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=b.useContext(Nt);Dt(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=b.useContext(Yt),{pathname:g}=wt(),y=hc(),m=js(l,dc(h),g,o==="path"),v=JSON.stringify(m);return b.useEffect(()=>{y(JSON.parse(v),{replace:r,state:c,relative:o})},[y,v,o,r,c]),null}function st(l){Be(!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 oy({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:g}){Be(!Qn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:y,navigator:f,static:h,unstable_useTransitions:g,future:{}}),[y,f,h,g]);typeof c=="string"&&(c=Zn(c));let{pathname:v="/",search:x="",hash:j="",state:_=null,key:k="default",unstable_mask:E}=c,z=b.useMemo(()=>{let q=da(v,y);return q==null?null:{location:{pathname:q,search:x,hash:j,state:_,key:k,unstable_mask:E},navigationType:o}},[y,v,x,j,_,k,o,E]);return Dt(z!=null,`<Router basename="${y}"> is not able to match the URL "${v}${x}${j}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:b.createElement(Nt.Provider,{value:m},b.createElement($l.Provider,{children:r,value:z}))}function dy({children:l,location:r}){return Wv(uc(l),r)}function uc(l,r=[]){let c=[];return b.Children.forEach(l,(o,f)=>{if(!b.isValidElement(o))return;let h=[...r,f];if(o.type===b.Fragment){c.push.apply(c,uc(o.props.children,h));return}Be(o.type===st,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||h.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(g.children=uc(o.props.children,h)),c.push(g)}),c}var ps="get",gs="application/x-www-form-urlencoded";function Cs(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function fy(l){return Cs(l)&&l.tagName.toLowerCase()==="button"}function hy(l){return Cs(l)&&l.tagName.toLowerCase()==="form"}function my(l){return Cs(l)&&l.tagName.toLowerCase()==="input"}function py(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function gy(l,r){return l.button===0&&(!r||r==="_self")&&!py(l)}function rc(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((r,c)=>{let o=l[c];return r.concat(Array.isArray(o)?o.map(f=>[c,f]):[[c,o]])},[]))}function vy(l,r){let c=rc(l);return r&&r.forEach((o,f)=>{c.has(f)||r.getAll(f).forEach(h=>{c.append(f,h)})}),c}var hs=null;function yy(){if(hs===null)try{new FormData(document.createElement("form"),0),hs=!1}catch{hs=!0}return hs}var by=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pr(l){return l!=null&&!by.has(l)?(Dt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gs}"`),null):l}function xy(l,r){let c,o,f,h,g;if(hy(l)){let y=l.getAttribute("action");o=y?da(y,r):null,c=l.getAttribute("method")||ps,f=Pr(l.getAttribute("enctype"))||gs,h=new FormData(l)}else if(fy(l)||my(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||y.getAttribute("action");if(o=m?da(m,r):null,c=l.getAttribute("formmethod")||y.getAttribute("method")||ps,f=Pr(l.getAttribute("formenctype"))||Pr(y.getAttribute("enctype"))||gs,h=new FormData(y,l),!yy()){let{name:v,type:x,value:j}=l;if(x==="image"){let _=v?`${v}.`:"";h.append(`${_}x`,"0"),h.append(`${_}y`,"0")}else v&&h.append(v,j)}}else{if(Cs(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=ps,o=null,f=gs,g=l}return h&&f==="text/plain"&&(g=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gc(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function mm(l,r,c,o){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return c?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&da(f.pathname,r)==="/"?f.pathname=`${ys(r)}/_root.${o}`:f.pathname=`${ys(f.pathname)}.${o}`,f}async function jy(l,r){if(l.id in r)return r[l.id];try{let c=await import(l.module);return r[l.id]=c,c}catch(c){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Sy(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function Cy(l,r,c){let o=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let g=await jy(h,c);return g.links?g.links():[]}return[]}));return Ty(o.flat(1).filter(Sy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Gh(l,r,c,o,f,h){let g=(m,v)=>c[v]?m.route.id!==c[v].route.id:!0,y=(m,v)=>{var x;return c[v].pathname!==m.pathname||((x=c[v].route.path)==null?void 0:x.endsWith("*"))&&c[v].params["*"]!==m.params["*"]};return h==="assets"?r.filter((m,v)=>g(m,v)||y(m,v)):h==="data"?r.filter((m,v)=>{var j;let x=o.routes[m.route.id];if(!x||!x.hasLoader)return!1;if(g(m,v)||y(m,v))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((j=c[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function Ny(l,r,{includeHydrateFallback:c}={}){return wy(l.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function wy(l){return[...new Set(l)]}function Ey(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function Ty(l,r){let c=new Set;return new Set(r),l.reduce((o,f)=>{let h=JSON.stringify(Ey(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function vc(){let l=b.useContext(Xn);return gc(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function ky(){let l=b.useContext(Ss);return gc(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var yc=b.createContext(void 0);yc.displayName="FrameworkContext";function bc(){let l=b.useContext(yc);return gc(l,"You must render this element inside a <HydratedRouter> element"),l}function _y(l,r){let c=b.useContext(yc),[o,f]=b.useState(!1),[h,g]=b.useState(!1),{onFocus:y,onBlur:m,onMouseEnter:v,onMouseLeave:x,onTouchStart:j}=r,_=b.useRef(null);b.useEffect(()=>{if(l==="render"&&g(!0),l==="viewport"){let z=H=>{H.forEach(Q=>{g(Q.isIntersecting)})},q=new IntersectionObserver(z,{threshold:.5});return _.current&&q.observe(_.current),()=>{q.disconnect()}}},[l]),b.useEffect(()=>{if(o){let z=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(z)}}},[o]);let k=()=>{f(!0)},E=()=>{f(!1),g(!1)};return c?l!=="intent"?[h,_,{}]:[h,_,{onFocus:Vl(y,k),onBlur:Vl(m,E),onMouseEnter:Vl(v,k),onMouseLeave:Vl(x,E),onTouchStart:Vl(j,k)}]:[!1,_,{}]}function Vl(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function Ay({page:l,...r}){let c=Yv(),{router:o}=vc(),f=b.useMemo(()=>Ph(o.routes,l,o.basename),[o.routes,l,o.basename]);return f?c?b.createElement(My,{page:l,matches:f,...r}):b.createElement(zy,{page:l,matches:f,...r}):null}function Ry(l){let{manifest:r,routeModules:c}=bc(),[o,f]=b.useState([]);return b.useEffect(()=>{let h=!1;return Cy(l,r,c).then(g=>{h||f(g)}),()=>{h=!0}},[l,r,c]),o}function My({page:l,matches:r,...c}){let o=wt(),{future:f}=bc(),{basename:h}=vc(),g=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let y=mm(l,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),m=!1,v=[];for(let x of r)typeof x.route.shouldRevalidate=="function"?m=!0:v.push(x.route.id);return m&&v.length>0&&y.searchParams.set("_routes",v.join(",")),[y.pathname+y.search]},[h,f.unstable_trailingSlashAwareDataRequests,l,o,r]);return b.createElement(b.Fragment,null,g.map(y=>b.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...c})))}function zy({page:l,matches:r,...c}){let o=wt(),{future:f,manifest:h,routeModules:g}=bc(),{basename:y}=vc(),{loaderData:m,matches:v}=ky(),x=b.useMemo(()=>Gh(l,r,v,h,o,"data"),[l,r,v,h,o]),j=b.useMemo(()=>Gh(l,r,v,h,o,"assets"),[l,r,v,h,o]),_=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let z=new Set,q=!1;if(r.forEach(Q=>{var P;let Z=h.routes[Q.route.id];!Z||!Z.hasLoader||(!x.some(J=>J.route.id===Q.route.id)&&Q.route.id in m&&((P=g[Q.route.id])!=null&&P.shouldRevalidate)||Z.hasClientLoader?q=!0:z.add(Q.route.id))}),z.size===0)return[];let H=mm(l,y,f.unstable_trailingSlashAwareDataRequests,"data");return q&&z.size>0&&H.searchParams.set("_routes",r.filter(Q=>z.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[H.pathname+H.search]},[y,f.unstable_trailingSlashAwareDataRequests,m,o,h,x,r,l,g]),k=b.useMemo(()=>Ny(j,h),[j,h]),E=Ry(j);return b.createElement(b.Fragment,null,_.map(z=>b.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...c})),k.map(z=>b.createElement("link",{key:z,rel:"modulepreload",href:z,...c})),E.map(({key:z,link:q})=>b.createElement("link",{key:z,nonce:c.nonce,...q,crossOrigin:q.crossOrigin??c.crossOrigin})))}function Oy(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var Uy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Uy&&(window.__reactRouterVersion="7.14.2")}catch{}function Dy({basename:l,children:r,unstable_useTransitions:c,window:o}){let f=b.useRef();f.current==null&&(f.current=mv({window:o,v5Compat:!0}));let h=f.current,[g,y]=b.useState({action:h.action,location:h.location}),m=b.useCallback(v=>{c===!1?y(v):b.startTransition(()=>y(v))},[c]);return b.useLayoutEffect(()=>h.listen(m),[h,m]),b.createElement(oy,{basename:l,children:r,location:g.location,navigationType:g.action,navigator:h,unstable_useTransitions:c})}var pm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nt=b.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:g,unstable_mask:y,state:m,target:v,to:x,preventScrollReset:j,viewTransition:_,unstable_defaultShouldRevalidate:k,...E},z){let{basename:q,navigator:H,unstable_useTransitions:Q}=b.useContext(Nt),Z=typeof x=="string"&&pm.test(x),P=lm(x,q);x=P.to;let J=Jv(x,{relative:f}),$=wt(),w=null;if(y){let be=js(y,[],$.unstable_mask?$.unstable_mask.pathname:"/",!0);q!=="/"&&(be.pathname=be.pathname==="/"?q:qt([q,be.pathname])),w=H.createHref(be)}let[U,X,te]=_y(o,E),le=qy(x,{replace:g,unstable_mask:y,state:m,target:v,preventScrollReset:j,relative:f,viewTransition:_,unstable_defaultShouldRevalidate:k,unstable_useTransitions:Q});function ie(be){r&&r(be),be.defaultPrevented||le(be)}let W=!(P.isExternal||h),ge=b.createElement("a",{...E,...te,href:(W?w:void 0)||P.absoluteURL||J,onClick:W?ie:r,ref:Oy(z,X),target:v,"data-discover":!Z&&c==="render"?"true":void 0});return U&&!Z?b.createElement(b.Fragment,null,ge,b.createElement(Ay,{page:J})):ge});nt.displayName="Link";var Hy=b.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:g,viewTransition:y,children:m,...v},x){let j=Jl(g,{relative:v.relative}),_=wt(),k=b.useContext(Ss),{navigator:E,basename:z}=b.useContext(Nt),q=k!=null&&Xy(j)&&y===!0,H=E.encodeLocation?E.encodeLocation(j).pathname:j.pathname,Q=_.pathname,Z=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;c||(Q=Q.toLowerCase(),Z=Z?Z.toLowerCase():null,H=H.toLowerCase()),Z&&z&&(Z=da(Z,z)||Z);const P=H!=="/"&&H.endsWith("/")?H.length-1:H.length;let J=Q===H||!f&&Q.startsWith(H)&&Q.charAt(P)==="/",$=Z!=null&&(Z===H||!f&&Z.startsWith(H)&&Z.charAt(H.length)==="/"),w={isActive:J,isPending:$,isTransitioning:q},U=J?r:void 0,X;typeof o=="function"?X=o(w):X=[o,J?"active":null,$?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let te=typeof h=="function"?h(w):h;return b.createElement(nt,{...v,"aria-current":U,className:X,ref:x,style:te,to:g,viewTransition:y},typeof m=="function"?m(w):m)});Hy.displayName="NavLink";var By=b.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:g=ps,action:y,onSubmit:m,relative:v,preventScrollReset:x,viewTransition:j,unstable_defaultShouldRevalidate:_,...k},E)=>{let{unstable_useTransitions:z}=b.useContext(Nt),q=Vy(),H=Zy(y,{relative:v}),Q=g.toLowerCase()==="get"?"get":"post",Z=typeof y=="string"&&pm.test(y),P=J=>{if(m&&m(J),J.defaultPrevented)return;J.preventDefault();let $=J.nativeEvent.submitter,w=($==null?void 0:$.getAttribute("formmethod"))||g,U=()=>q($||J.currentTarget,{fetcherKey:r,method:w,navigate:c,replace:f,state:h,relative:v,preventScrollReset:x,viewTransition:j,unstable_defaultShouldRevalidate:_});z&&c!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:E,method:Q,action:H,onSubmit:o?m:P,...k,"data-discover":!Z&&l==="render"?"true":void 0})});By.displayName="Form";function Ly(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gm(l){let r=b.useContext(Xn);return Be(r,Ly(l)),r}function qy(l,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:g,viewTransition:y,unstable_defaultShouldRevalidate:m,unstable_useTransitions:v}={}){let x=hc(),j=wt(),_=Jl(l,{relative:g});return b.useCallback(k=>{if(gy(k,r)){k.preventDefault();let E=c!==void 0?c:Ql(j)===Ql(_),z=()=>x(l,{replace:E,unstable_mask:o,state:f,preventScrollReset:h,relative:g,viewTransition:y,unstable_defaultShouldRevalidate:m});v?b.startTransition(()=>z()):z()}},[j,x,_,c,o,f,r,l,h,g,y,m,v])}function vm(l){Dt(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 r=b.useRef(rc(l)),c=b.useRef(!1),o=wt(),f=b.useMemo(()=>vy(o.search,c.current?null:r.current),[o.search]),h=hc(),g=b.useCallback((y,m)=>{const v=rc(typeof y=="function"?y(new URLSearchParams(f)):y);c.current=!0,h("?"+v,m)},[h,f]);return[f,g]}var Yy=0,Gy=()=>`__${String(++Yy)}__`;function Vy(){let{router:l}=gm("useSubmit"),{basename:r}=b.useContext(Nt),c=sy(),o=l.fetch,f=l.navigate;return b.useCallback(async(h,g={})=>{let{action:y,method:m,encType:v,formData:x,body:j}=xy(h,r);if(g.navigate===!1){let _=g.fetcherKey||Gy();await o(_,c,g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:x,body:j,formMethod:g.method||m,formEncType:g.encType||v,flushSync:g.flushSync})}else await f(g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:x,body:j,formMethod:g.method||m,formEncType:g.encType||v,replace:g.replace,state:g.state,fromRouteId:c,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,f,r,c])}function Zy(l,{relative:r}={}){let{basename:c}=b.useContext(Nt),o=b.useContext(Yt);Be(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Jl(l||".",{relative:r})},g=wt();if(l==null){h.search=g.search;let y=new URLSearchParams(h.search),m=y.getAll("index");if(m.some(x=>x==="")){y.delete("index"),m.filter(j=>j).forEach(j=>y.append("index",j));let x=y.toString();h.search=x?`?${x}`:""}}return(!l||l===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:qt([c,h.pathname])),Ql(h)}function Xy(l,{relative:r}={}){let c=b.useContext(um);Be(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=gm("useViewTransitionState"),f=Jl(l,{relative:r});if(!c.isTransitioning)return!1;let h=da(c.currentLocation.pathname,o)||c.currentLocation.pathname,g=da(c.nextLocation.pathname,o)||c.nextLocation.pathname;return vs(f.pathname,g)!=null||vs(f.pathname,h)!=null}const Qy='<path d="M23.1599 14.9453C22.7429 14.9429 22.3775 15.2985 22.375 15.7204C22.3726 16.1374 22.7282 16.5028 23.1501 16.5053C23.567 16.5077 23.9325 16.1521 23.935 15.7302C23.9374 15.3108 23.5793 14.9478 23.1599 14.9453Z" fill="currentColor"/><path d="M15.758 22.3758C15.3435 22.3562 14.9657 22.702 14.9461 23.1214C14.9265 23.5359 15.2723 23.9137 15.6917 23.9333C16.1063 23.9529 16.484 23.6071 16.5036 23.1877C16.5232 22.7731 16.1774 22.3954 15.758 22.3758Z" fill="currentColor"/><path d="M23.1208 9.08552C23.5721 9.10024 23.9375 8.76176 23.9473 8.31291C23.9571 7.86161 23.6137 7.50351 23.1649 7.49615C22.7308 7.49124 22.3825 7.81746 22.3604 8.24668C22.3383 8.70044 22.6744 9.06835 23.1208 9.08307V9.08552Z" fill="currentColor"/><path d="M8.32678 22.3598C7.87547 22.3451 7.51002 22.6836 7.50021 23.1324C7.49039 23.5837 7.83378 23.9418 8.28263 23.9492C8.73393 23.9541 9.08712 23.6058 9.08712 23.1545C9.08712 22.7032 8.75601 22.3746 8.32678 22.3598Z" fill="currentColor"/><path d="M23.1502 12.8994C23.6113 12.9019 24.0135 12.4947 24.0013 12.0361C23.9914 11.5897 23.6039 11.2095 23.16 11.207C22.6989 11.2046 22.2966 11.6117 22.3089 12.0704C22.3187 12.5143 22.7062 12.897 23.1502 12.8994Z" fill="currentColor"/><path d="M12.9002 23.1849C12.9198 22.7459 12.5568 22.3436 12.1079 22.3068C11.6542 22.2725 11.2299 22.6551 11.2078 23.1162C11.1882 23.5553 11.5512 23.9575 12 23.9943C12.4538 24.0287 12.8781 23.646 12.9002 23.1849Z" fill="currentColor"/><path d="M19.4899 20.3568C19.9829 20.3544 20.368 19.9595 20.3582 19.464C20.3508 18.9882 19.9755 18.6129 19.4997 18.6056C19.0067 18.5982 18.6118 18.9833 18.6094 19.4763C18.6094 19.9693 18.9969 20.3593 19.4899 20.3544V20.3568Z" fill="currentColor"/><path d="M0.946568 14.8555C0.483002 14.8555 0.0881117 15.243 0.0783008 15.7066C0.0684898 16.1873 0.470738 16.5994 0.951474 16.5969C1.41504 16.5969 1.80993 16.2094 1.81974 15.7458C1.82955 15.2651 1.4273 14.853 0.946568 14.8555Z" fill="currentColor"/><path d="M15.6895 1.82027C16.1678 1.83989 16.5872 1.445 16.597 0.964263C16.6044 0.500696 16.2267 0.0984479 15.7631 0.0788261C15.2848 0.0592042 14.8654 0.454094 14.8556 0.93483C14.8482 1.3984 15.2259 1.80065 15.6895 1.82027Z" fill="currentColor"/><path d="M0.928315 9.18321C1.44829 9.19302 1.84073 8.81285 1.84073 8.29532C1.84073 7.79742 1.47037 7.41479 0.974917 7.40253C0.454937 7.39272 0.0625 7.77289 0.0625 8.29042C0.0625 8.79078 0.432863 9.17095 0.928315 9.18321Z" fill="currentColor"/><path d="M8.33104 0.0630625C7.81106 0.0458934 7.41126 0.423614 7.40636 0.938689C7.399 1.43905 7.76691 1.82658 8.25991 1.84129C8.76272 1.85601 9.15761 1.50036 9.18459 1.00982C9.21157 0.489838 8.84121 0.0777789 8.33349 0.0630625H8.33104Z" fill="currentColor"/><path d="M19.483 3.67042C18.9728 3.67042 18.5362 4.1021 18.5313 4.61227C18.524 5.11999 18.9532 5.56148 19.4634 5.57374C19.9858 5.58846 20.4445 5.1347 20.4371 4.60982C20.4298 4.09965 19.9932 3.66797 19.483 3.66797V3.67042Z" fill="currentColor"/><path d="M0.976227 11.102C0.456247 11.0849 -0.00486668 11.5411 3.87869e-05 12.0611C0.00494425 12.5663 0.441531 13.0029 0.946794 13.0029C1.45206 13.0029 1.8911 12.5737 1.90091 12.066C1.91072 11.5631 1.48394 11.1192 0.976227 11.102Z" fill="currentColor"/><path d="M12.0584 4.16361e-05C11.5531 -0.00486383 11.1116 0.424365 11.1018 0.93208C11.0895 1.45206 11.5457 1.91072 12.0657 1.90091C12.571 1.8911 13.0051 1.45206 13.0002 0.946797C12.9978 0.441534 12.5636 0.0049471 12.0584 4.16361e-05Z" fill="currentColor"/><path d="M4.65891 18.5322C4.13894 18.5077 3.67046 18.9516 3.66801 19.479C3.6631 19.9867 4.09233 20.4257 4.6025 20.438C5.11022 20.4478 5.55416 20.0259 5.57133 19.5133C5.59095 19.0081 5.16908 18.5567 4.65891 18.5322Z" fill="currentColor"/><path d="M4.58641 5.65236C5.13337 5.67443 5.62637 5.21332 5.64845 4.65654C5.67052 4.10959 5.20941 3.61659 4.65264 3.59451C4.10568 3.57244 3.61268 4.03355 3.5906 4.59032C3.56853 5.13728 4.02964 5.63028 4.58641 5.65236Z" fill="currentColor"/><path d="M19.5008 16.8099C20.1017 16.8 20.5726 16.3169 20.5677 15.7159C20.5628 15.115 20.087 14.6392 19.4836 14.6367C18.8803 14.6343 18.402 15.1077 18.3946 15.7086C18.3873 16.3267 18.8803 16.8197 19.5008 16.8074V16.8099Z" fill="currentColor"/><path d="M15.7209 20.5694C16.3218 20.5694 16.8025 20.0985 16.8099 19.4976C16.8172 18.8967 16.3488 18.411 15.7478 18.3988C15.1298 18.384 14.6318 18.8746 14.6368 19.4927C14.6417 20.0936 15.1199 20.5694 15.7209 20.5719V20.5694Z" fill="currentColor"/><path d="M9.42652 19.4702C9.41916 18.8644 8.9188 18.364 8.31298 18.3518C7.69243 18.3395 7.1651 18.8546 7.16019 19.4751C7.15529 20.0981 7.67281 20.6157 8.29581 20.6157C8.9188 20.6157 9.43388 20.0908 9.42652 19.4702Z" fill="currentColor"/><path d="M19.4553 7.16016C18.8495 7.17487 18.354 7.68259 18.3516 8.28841C18.3491 8.91141 18.8666 9.42893 19.4896 9.42403C20.1126 9.41912 20.6253 8.89669 20.6154 8.27615C20.6056 7.65316 20.0734 7.14544 19.4553 7.16261V7.16016Z" fill="currentColor"/><path d="M15.7219 5.79748C16.3817 5.79748 16.9115 5.26034 16.8993 4.60055C16.887 3.95793 16.3695 3.44531 15.7244 3.44531C15.0793 3.44531 14.5348 3.98246 14.5471 4.64225C14.5593 5.28732 15.0793 5.79748 15.7219 5.79748Z" fill="currentColor"/><path d="M4.63052 16.9006C5.27559 16.8957 5.78821 16.3806 5.79557 15.738C5.80292 15.0782 5.27068 14.5435 4.6109 14.5509C3.94866 14.5582 3.42623 15.0978 3.44585 15.7576C3.46302 16.4002 3.9879 16.9055 4.63052 16.9006Z" fill="currentColor"/><path d="M12.0637 20.6756C12.7088 20.6683 13.2533 20.1115 13.246 19.4714C13.2386 18.8263 12.6818 18.2818 12.0417 18.2891C11.3966 18.2965 10.8521 18.8533 10.8594 19.4934C10.8668 20.1385 11.4211 20.683 12.0637 20.6756Z" fill="currentColor"/><path d="M19.4762 10.8594C18.8312 10.8618 18.2842 11.4137 18.2891 12.0563C18.2915 12.7014 18.8434 13.2483 19.486 13.2434C20.1311 13.241 20.6781 12.6891 20.6732 12.0465C20.6682 11.4039 20.1188 10.8569 19.4762 10.8594Z" fill="currentColor"/><path d="M8.31147 5.84627C8.98106 5.83645 9.52067 5.28459 9.51576 4.61499C9.51085 3.9454 8.9639 3.40089 8.29675 3.39844C7.62716 3.39844 7.07774 3.93804 7.07038 4.60764C7.06303 5.2944 7.6247 5.85362 8.31147 5.84627Z" fill="currentColor"/><path d="M4.64934 7.0706C3.96257 7.05588 3.39599 7.6102 3.39845 8.29942C3.39845 8.96902 3.94541 9.51597 4.615 9.51843C5.2846 9.52088 5.83646 8.98128 5.84382 8.31168C5.85118 7.64209 5.31648 7.08532 4.64689 7.0706H4.64934Z" fill="currentColor"/><path d="M12.0484 5.91679C12.7376 5.92169 13.3312 5.34285 13.3508 4.64873C13.3704 3.94479 12.7671 3.32916 12.0607 3.32425C11.3715 3.31934 10.7779 3.89819 10.7583 4.59231C10.7387 5.29625 11.3396 5.91434 12.0484 5.91679Z" fill="currentColor"/><path d="M4.58021 13.3473C5.28169 13.3743 5.90469 12.7783 5.91695 12.0695C5.92921 11.3827 5.35528 10.7818 4.66115 10.7548C3.95967 10.7278 3.33668 11.3238 3.32441 12.0327C3.31215 12.7194 3.88609 13.3203 4.58021 13.3473Z" fill="currentColor"/><path d="M15.7193 14.3359C14.9687 14.3359 14.3335 14.9761 14.3359 15.7266C14.3359 16.4772 14.9761 17.1124 15.7266 17.11C16.4772 17.11 17.1124 16.4698 17.11 15.7193C17.1075 14.9687 16.4698 14.3335 15.7193 14.3359Z" fill="currentColor"/><path d="M15.7407 9.73609C16.5428 9.72628 17.1756 9.0763 17.1658 8.27671C17.156 7.47712 16.506 6.84186 15.7064 6.85167C14.9068 6.86149 14.2716 7.51146 14.2814 8.31105C14.2912 9.11064 14.9411 9.7459 15.7407 9.73609Z" fill="currentColor"/><path d="M8.2987 14.2813C7.50156 14.2764 6.8565 14.9165 6.85159 15.7161C6.84669 16.5133 7.48685 17.1583 8.28644 17.1632C9.08358 17.1681 9.72865 16.528 9.73355 15.7284C9.73601 14.9313 9.09584 14.2862 8.2987 14.2813Z" fill="currentColor"/><path d="M8.2854 9.79467C9.12669 9.79712 9.78647 9.15696 9.79874 8.32057C9.811 7.45967 9.15857 6.79007 8.30257 6.78516C7.46128 6.78271 6.8015 7.42533 6.78923 8.25926C6.77697 9.12017 7.4294 9.78976 8.2854 9.79467Z" fill="currentColor"/><path d="M15.7268 10.5156C14.8757 10.5156 14.1644 11.2343 14.184 12.0829C14.2036 12.9242 14.9075 13.6061 15.7415 13.5914C16.5803 13.5766 17.2671 12.8801 17.2622 12.0461C17.2573 11.2097 16.5631 10.5181 15.7268 10.5156Z" fill="currentColor"/><path d="M12.0588 14.1836C11.2077 14.1787 10.4964 14.8998 10.516 15.7485C10.5356 16.5897 11.2371 17.2716 12.0686 17.2593C12.9074 17.2471 13.5942 16.553 13.5917 15.7166C13.5893 14.8802 12.8976 14.1885 12.0612 14.1836H12.0588Z" fill="currentColor"/><path d="M12.0397 6.66802C11.1568 6.67538 10.4356 7.39894 10.4258 8.28192C10.4185 9.17717 11.1666 9.92525 12.0618 9.91789C12.9448 9.91054 13.6659 9.18698 13.6757 8.304C13.6831 7.40875 12.935 6.66066 12.0397 6.66802Z" fill="currentColor"/><path d="M8.29197 13.6757C9.1725 13.6757 9.90096 12.9619 9.91813 12.074C9.9353 11.1812 9.19212 10.4282 8.29442 10.4258C7.41389 10.4258 6.68543 11.1395 6.66826 12.0274C6.65109 12.9202 7.39427 13.6732 8.29197 13.6757Z" fill="currentColor"/><path d="M12.0638 10.2891C11.068 10.2842 10.2905 11.0568 10.293 12.0526C10.293 13.0288 11.0533 13.8014 12.0222 13.8137C13.0204 13.8259 13.8077 13.0631 13.8151 12.0722C13.8225 11.074 13.0548 10.294 12.0638 10.2891Z" fill="currentColor"/>';function ym({size:l=20,idSuffix:r,className:c}){const o=`pc-brand-mark-clip-${r}`;return i.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:c,dangerouslySetInnerHTML:{__html:`<g clip-path="url(#${o})">${Qy}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const xc="Parachute";let ln=null,Zl=null;const $y=3e4;function Jy(){return"/admin/host-admin-token"}function Ky(){const l=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(l)}`}function Qt(){return window.location.replace(Ky()),new Promise(()=>{})}function Fy(){return window.location.replace("/account/"),new Promise(()=>{})}async function Me(){const l=Date.now();return ln&&ln.expiresAt-l>$y?ln.token:Zl||(Zl=Wy().finally(()=>{Zl=null}),Zl)}async function Wy(){const l=await fetch(Jy(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return ln=null,Qt();if(l.status===403)return ln=null,Fy();if(!l.ok)throw new Error(`/admin/host-admin-token failed: ${l.status} ${await l.text()}`);const r=await l.json();if(!r.token||!r.expires_at)throw new Error("/admin/host-admin-token returned malformed body");return ln={token:r.token,expiresAt:new Date(r.expires_at).getTime()},r.token}function je(){ln=null}class V extends Error{constructor(r,c){super(c),this.status=r,this.name="HttpError"}}async function jc(){const l=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}});if(!l.ok)throw new V(l.status,`well-known fetch failed: ${l.status}`);const r=await l.json(),c=r.vaults??[],o=r.services??[];return{moduleInstalled:o.some(h=>h.name==="parachute-vault"||h.name.startsWith("parachute-vault-")),vaults:c.map(h=>{const g={name:h.name,url:h.url,version:h.version,path:Iy(h.name,h.url,o)};return h.managementUrl&&(g.managementUrl=h.managementUrl),g})}}function Iy(l,r,c){const o=c.find(f=>f.name===`parachute-vault-${l}`||f.path===`/vault/${l}`);if(o)return o.path;try{return new URL(r).pathname}catch{return`/vault/${l}`}}async function bm(l){const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401)return Qt();if(!r.ok)throw new V(r.status,await K(r));const c=await r.json();if(!c.token||!c.expires_at)throw new V(500,"/admin/vault-admin-token returned malformed body");return{token:c.token,expiresAt:c.expires_at,scopes:c.scopes??[]}}async function Py(l){var g,y;const r=await bm(l),c=await fetch(`/vault/${encodeURIComponent(l)}/.parachute/usage`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r.token}`}});if(!c.ok)throw new V(c.status,await K(c));const o=await c.json(),f=(g=o.counts)==null?void 0:g.notes,h=(y=o.bytes)==null?void 0:y.total;if(typeof f!="number"||typeof h!="number")throw new V(500,"/.parachute/usage returned malformed body");return{notes:f,totalBytes:h}}function xm(l){if(!Number.isFinite(l)||l<0)return"0 B";if(l<1024)return`${Math.round(l)} B`;const r=l/1024;if(r<1024)return`${Math.round(r)} KB`;const c=r/1024;return c<1024?`${c.toFixed(1)} MB`:`${(c/1024).toFixed(1)} GB`}async function e1(l={}){const r=await Me(),c=l.vault?`?vault=${encodeURIComponent(l.vault)}`:"",o=await fetch(`/api/grants${c}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(o.status===401||o.status===403)throw je(),new V(o.status,await K(o));if(!o.ok)throw new V(o.status,await K(o));return(await o.json()).grants??[]}async function t1(l){const r=await Me(),c=await fetch(`/api/grants/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c))}async function jm(){const l=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!l.ok)throw new V(l.status,await K(l));return await l.json()}async function a1(l){const r=new URLSearchParams({__csrf:l}),c=await fetch("/logout",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"text/html, application/json"},credentials:"same-origin",body:r,redirect:"manual"});if(!(c.status===0||c.ok||c.status===302))throw new V(c.status,await K(c))}let Vh=!1;function n1(l,r){if(/^https?:\/\//i.test(r))return r;const c=l.replace(/\/+$/,"");return r==="/admin"||r==="/admin/"?(Vh||(Vh=!0,console.warn(`resolveManagementUrl: vault declares the legacy per-instance managementUrl ${JSON.stringify(r)}; joining under the vault URL for one release. New semantics: relative ("admin/") = per-instance join, leading-"/" = origin-absolute.`)),`${c}${r}`):r.startsWith("/")?new URL(r,`${c}/`).toString():`${c}/${r}`}async function Zh(l={}){const r=new URLSearchParams;l.revoked&&r.set("revoked",l.revoked),l.subject&&r.set("subject",l.subject),l.createdVia&&r.set("created_via",l.createdVia),l.cursor&&r.set("cursor",l.cursor);const c=r.toString(),o=c?`/api/auth/tokens?${c}`:"/api/auth/tokens",f=await Me(),h=await fetch(o,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${f}`}});if(h.status===401||h.status===403)throw je(),new V(h.status,await K(h));if(!h.ok)throw new V(h.status,await K(h));return await h.json()}async function Sm(l){const r=await Me(),c=await fetch("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function l1(l){const r=await Me(),c=await fetch("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({jti:l})});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function i1(l){const r=await Me(),c=await fetch(`/api/oauth/clients/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function s1(l,r){const o={method:"POST",headers:{accept:"application/json",authorization:`Bearer ${await Me()}`}};r!==void 0&&(o.headers={...o.headers,"content-type":"application/json"},o.body=JSON.stringify({return_to:r}));const f=await fetch(`/api/oauth/clients/${encodeURIComponent(l)}/approve`,o);if(f.status===401||f.status===403)throw je(),new V(f.status,await K(f));if(!f.ok)throw new V(f.status,await K(f));return await f.json()}async function Ns(){const l=await Me(),r=await fetch("/api/modules",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function ws(l,r){const c=await Me();return await fetch(`/api/modules/${encodeURIComponent(l)}/${r}`,{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${c}`}})}async function u1(l){const r=await ws(l,"install");if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).operation_id}async function r1(l){const r=await ws(l,"upgrade");if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).operation_id}async function c1(l){const r=await ws(l,"restart");if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function o1(l){const r=await ws(l,"uninstall");if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function d1(l){const r=await Me(),c=await fetch("/api/modules/channel",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({channel:l})});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return(await c.json()).channel}async function Cm(){const l=await Me(),r=await fetch("/api/settings/hub-origin",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function Xh(l){const r=await Me(),c=await fetch("/api/settings/hub-origin",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({hub_origin:l})});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return(await c.json()).hub_origin}async function f1(l){const r=await Me(),c=await fetch(`/api/modules/operations/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function h1(){const l=await Me(),r=await fetch("/api/users",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).users??[]}async function m1(l){const r=await Me(),c=await fetch("/api/users",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return(await c.json()).user}async function p1(l){const r=await Me(),c=await fetch(`/api/users/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw c.status===401&&je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));const o=await c.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function g1(l,r){const c=await Me(),o=await fetch(`/api/users/${encodeURIComponent(l)}/reset-password`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({new_password:r})});if(o.status===401||o.status===403)throw o.status===401&&je(),new V(o.status,await K(o));if(!o.ok)throw new V(o.status,await K(o));const f=await o.json().catch(()=>({}));return{revocationLagSeconds:typeof f.revocation_lag_seconds=="number"?f.revocation_lag_seconds:60}}async function v1(l,r){const c=await Me(),o=await fetch(`/api/users/${encodeURIComponent(l)}/vaults`,{method:"PATCH",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({assigned_vaults:r})});if(o.status===401||o.status===403)throw o.status===401&&je(),new V(o.status,await K(o));if(!o.ok)throw new V(o.status,await K(o))}async function Nm(){const l=await Me(),r=await fetch("/api/users/vaults",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).vaults??[]}async function y1(){const l=await Me(),r=await fetch("/api/vault-caps",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).vault_caps??[]}async function b1(l,r){const c=await Me(),o=await fetch(`/api/vault-caps/${encodeURIComponent(l)}`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({cap_bytes:r})});if(o.status===401||o.status===403)throw je(),new V(o.status,await K(o));if(!o.ok)throw new V(o.status,await K(o));return(await o.json()).vault_cap}async function x1(){const l=await Me(),r=await fetch("/api/invites",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return(await r.json()).invites??[]}async function j1(l){const r=await Me(),c=await fetch("/api/invites",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function S1(l){const r=await Me(),c=await fetch(`/api/invites/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c))}async function cc(){const l=await Me(),r=await fetch("/api/hub",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function C1(l){const r=await Me(),c=await fetch("/api/hub/upgrade",{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw je(),new V(c.status,await K(c));if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function N1(){const l=await Me(),r=await fetch("/api/hub/upgrade/status",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===404)return null;if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function Sc(){const l=await fetch("/api/admin-lock",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new V(l.status,await K(l));return await l.json()}async function $n(l,r,c={}){return await fetch(`/api/admin-lock${l}`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify({__csrf:r,...c})})}async function w1(l,r){const c=await $n("/unlock",l,{pin:r});if(!c.ok)throw new V(c.status,await K(c));return await c.json().catch(()=>({})),Sc()}async function E1(l){const r=await $n("/lock",l);if(!r.ok)throw new V(r.status,await K(r))}async function T1(l){const r=await $n("/heartbeat",l);if(!r.ok)throw new V(r.status,await K(r));return await r.json()}async function k1(l,r,c){const o={pin:r};c!==void 0&&(o.idle_seconds=c);const f=await $n("/set",l,o);if(!f.ok)throw new V(f.status,await K(f))}async function _1(l,r,c,o){const f={new_pin:r};c&&(f.current_pin=c),o!==void 0&&(f.idle_seconds=o);const h=await $n("/change",l,f);if(!h.ok)throw new V(h.status,await K(h))}async function A1(l,r){const c={};r&&(c.current_pin=r);const o=await $n("/remove",l,c);if(!o.ok)throw new V(o.status,await K(o))}async function K(l){try{const r=await l.text(),c=JSON.parse(r);if(c.error_description)return c.error_description;if(c.error)return c.error;if(r)return r}catch{}return`${l.status} ${l.statusText}`}async function R1(){const l=await fetch("/api/connections/catalog",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new V(l.status,await K(l));const r=await l.json(),c=Array.isArray(r.events)?r.events:[],o=Array.isArray(r.actions)?r.actions:[],f=Array.isArray(r.templates)?r.templates:[];return{events:c,actions:o,templates:f}}async function M1(){const l=await fetch("/admin/connections",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new V(l.status,await K(l));const r=await l.json();return Array.isArray(r.connections)?r.connections:[]}async function z1(l){const r=await fetch("/admin/connections",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify(l)});if(r.status===401)return Qt();if(!r.ok)throw new V(r.status,await K(r));const c=await r.json();if(!c.connection||typeof c.connection.id!="string")throw new V(500,"/admin/connections returned a malformed connection body");return{connection:c.connection,...c.connect?{connect:c.connect}:{}}}async function O1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}/approve`,{method:"POST",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();return}if(!r.ok)throw new V(r.status,await K(r))}async function U1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();return}if(r.status===207){let c="connection teardown partially failed";try{const o=await r.json();Array.isArray(o.errors)&&o.errors.length>0&&(c=o.errors.map(f=>`${f.step??"step"}: ${f.detail??"failed"}`).join("; "))}catch{}throw new V(207,c)}if(!r.ok)throw new V(r.status,await K(r))}async function D1(){const l=await Me(),r=await fetch("/admin/grants",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw je(),new V(r.status,await K(r));if(!r.ok)throw new V(r.status,await K(r));const c=await r.json();return Array.isArray(c.grants)?c.grants:[]}async function ec(l,r){const c=await fetch(`/admin/grants/${encodeURIComponent(l)}/approve`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify(r!==void 0?{token:r}:{})});if(c.status===401)return Qt();if(!c.ok)throw new V(c.status,await K(c));return await c.json()}async function H1(l){const r=await fetch(`/admin/grants/${encodeURIComponent(l)}/revoke`,{method:"POST",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();return}if(!r.ok)throw new V(r.status,await K(r))}const B1=3e4;function Qh(l){const r=Math.max(0,l),c=Math.floor(r/1e3);if(c<60)return`${c}s`;const o=Math.floor(c/60);if(o<60)return`${o}m`;const f=Math.floor(o/60);return f<24?`${f}h ${o%60}m`:`${Math.floor(f/24)}d ${f%24}h`}function tc(l){const r=new Date(l);if(Number.isNaN(r.getTime()))return l;const c=o=>String(o).padStart(2,"0");return`${r.getUTCFullYear()}-${c(r.getUTCMonth()+1)}-${c(r.getUTCDate())} ${c(r.getUTCHours())}:${c(r.getUTCMinutes())}:${c(r.getUTCSeconds())} UTC`}function L1(l){var r;if(l.source==="container")return"container";if(l.source==="npm")return"npm";if(l.source==="bun-linked"){const c=(r=l.bun_linked_path)==null?void 0:r.split("/").filter(Boolean).pop();return c&&l.git_head?`bun-linked → ${c} @ ${l.git_head}`:c?`bun-linked → ${c}`:"bun-linked"}return"unknown"}function q1(){const[l,r]=b.useState(null),[c,o]=b.useState(!1),[f,h]=b.useState(!1),[g,y]=b.useState(null),m=b.useCallback(async()=>{h(!0);try{const v=await cc();r(v),y(new Date)}catch{}finally{h(!1)}},[]);return b.useEffect(()=>{m()},[m]),b.useEffect(()=>{const v=()=>{m()};window.addEventListener("focus",v);const x=window.setInterval(()=>{m()},B1);return()=>{window.removeEventListener("focus",v),window.clearInterval(x)}},[m]),l?i.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[i.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(v=>!v),"aria-expanded":c,"data-testid":"hub-version-badge-summary",children:["Hub ",i.jsx("strong",{children:l.version})," · running"," ",i.jsx("span",{"data-testid":"hub-version-badge-uptime",children:Qh(l.uptime_ms)})," ·"," ",i.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:l.source})]}),c?i.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[i.jsxs("dl",{children:[i.jsx("dt",{children:"Hub"}),i.jsx("dd",{children:i.jsxs("code",{children:["@openparachute/hub ",l.version]})}),i.jsx("dt",{children:"Source"}),i.jsx("dd",{children:L1(l)}),i.jsx("dt",{children:"Started"}),i.jsxs("dd",{children:[tc(l.started_at)," (",Qh(l.uptime_ms)," ago)"]}),l.container_build_time?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Built"}),i.jsx("dd",{children:tc(l.container_build_time)})]}):null,l.render_commit?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Commit"}),i.jsxs("dd",{children:[i.jsx("code",{children:l.render_commit.slice(0,8)}),l.render_branch?i.jsxs(i.Fragment,{children:[" on ",i.jsx("code",{children:l.render_branch})]}):null]})]}):null,g?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Last checked"}),i.jsx("dd",{children:tc(g.toISOString())})]}):null]}),i.jsx("button",{type:"button",className:"hub-version-badge-refresh secondary",onClick:()=>void m(),disabled:f,"data-testid":"hub-version-badge-refresh",children:f?"Refreshing…":"Refresh"})]}):null]}):null}function Y1({csrf:l,onUnlocked:r}){const[c,o]=b.useState(""),[f,h]=b.useState(!1),[g,y]=b.useState(null),m=b.useRef(null);b.useEffect(()=>{var x;(x=m.current)==null||x.focus()},[]);async function v(x){var j;if(x.preventDefault(),!f){h(!0),y(null);try{await w1(l,c),o(""),r()}catch(_){const k=_ instanceof V?_.status===429?"Too many attempts — wait a moment and try again.":"Incorrect PIN.":_ instanceof Error?_.message:"Unlock failed.";y(k),o(""),(j=m.current)==null||j.focus()}finally{h(!1)}}}return i.jsx("main",{className:"lock-screen","data-testid":"admin-lock-screen","aria-label":"Admin console locked",children:i.jsxs("div",{className:"lock-card",children:[i.jsx(ym,{size:32,idSuffix:"lock",className:"lock-brand-mark"}),i.jsxs("h1",{className:"lock-title",children:[xc," is locked"]}),i.jsx("p",{className:"muted lock-sub",children:"Enter your PIN to unlock the admin console."}),i.jsxs("form",{onSubmit:x=>void v(x),className:"lock-form",children:[i.jsx("label",{htmlFor:"admin-lock-pin",className:"visually-hidden",children:"PIN"}),i.jsx("input",{id:"admin-lock-pin",ref:m,type:"password",inputMode:"numeric",autoComplete:"off",pattern:"[0-9]*",maxLength:12,placeholder:"••••",value:c,disabled:f,onChange:x=>o(x.target.value.replace(/[^0-9]/g,"")),className:"lock-pin-input","data-testid":"admin-lock-pin-input","aria-invalid":g?"true":void 0}),i.jsx("button",{type:"submit",disabled:f||c.length<4,"data-testid":"admin-lock-unlock",children:f?"Unlocking…":"Unlock"})]}),g&&i.jsx("div",{className:"error lock-error",role:"alert","data-testid":"admin-lock-error",children:g})]})})}const G1=3e4;function V1(l,r){const[c,o]=b.useState(!0),[f,h]=b.useState(!1),[g,y]=b.useState(!1),m=b.useRef(null),v=b.useRef(0),x=b.useRef(900),j=b.useRef(l),_=b.useRef(!1);j.current=l,_.current=f;const k=b.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),E=b.useCallback(()=>{k(),m.current=setTimeout(()=>h(!0),Math.max(1,x.current)*1e3)},[k]),z=b.useCallback(H=>{y(H.configured),h(H.locked),x.current=H.idle_seconds,H.configured&&!H.locked?E():k()},[E,k]),q=b.useCallback(()=>{r&&Sc().then(z).catch(()=>{}).finally(()=>o(!1))},[r,z]);return b.useEffect(()=>{if(!r){o(!1);return}q()},[r,q]),b.useEffect(()=>{if(!r||!g)return;function H(){if(_.current)return;E();const P=Date.now();if(P-v.current<G1)return;v.current=P;const J=j.current;J&&T1(J).then($=>{$.locked?h(!0):x.current=$.idle_seconds}).catch(()=>{})}const Q=["pointerdown","keydown","scroll","mousemove"];for(const P of Q)window.addEventListener(P,H,{passive:!0});function Z(){q()}return window.addEventListener("focus",Z),()=>{for(const P of Q)window.removeEventListener(P,H);window.removeEventListener("focus",Z)}},[r,g,E,q]),b.useEffect(()=>()=>k(),[k]),{loading:c,locked:f,configured:g,refresh:q}}function Z1(){const{clientId:l}=Fv(),r=l??"",[c]=vm(),o=X1(c.get("return_to")),[f,h]=b.useState({kind:"loading"}),[g,y]=b.useState({kind:"idle"}),[m,v]=b.useState(0);b.useEffect(()=>{if(!r){h({kind:"error",message:"missing client id in URL"});return}let j=!1;return h({kind:"loading"}),i1(r).then(_=>{j||(h({kind:"ok",client:_}),_.status==="approved"&&(y({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(_=>{if(j)return;if(_ instanceof V&&_.status===404){h({kind:"not_found"});return}const k=_ instanceof Error?_.message:String(_);h({kind:"error",message:k})}),()=>{j=!0}},[r,m,o]);async function x(){y({kind:"approving"});try{const j=await s1(r,o||void 0);if(j.redirect_to&&wm(j.redirect_to)){window.location.assign(j.redirect_to);return}y({kind:"approved",alreadyApproved:j.already_approved})}catch(j){const _=j instanceof V?`approve failed (${j.status}): ${j.message}`:j instanceof Error?j.message:String(j);y({kind:"error",message:_})}}return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h2",{children:"Approve app"})}),Q1({loadState:f,action:g,onApprove:x,onRetry:()=>v(j=>j+1)})]})}function wm(l){return!(!l||!l.startsWith("/")||l.startsWith("//"))}function X1(l){return l===null?null:wm(l)?l:null}function Q1({loadState:l,action:r,onApprove:c,onRetry:o}){if(l.kind==="loading")return i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(l.kind==="not_found")return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"Unknown client."}),i.jsxs("p",{className:"muted",children:["This client_id isn't registered with this hub. The deep link may be stale, or the requesting app may have been registered against a different hub."," ",i.jsx(nt,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:o,className:"secondary",children:"Retry"})]});const{client:f}=l,h=f.client_name??f.client_id;if(r.kind==="approved")return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:r.alreadyApproved?"Already approved.":"Approved."}),i.jsxs("p",{className:"muted",children:[i.jsx("code",{children:h})," ",r.alreadyApproved?"was already on this hub's approved list.":"can now run an OAuth flow with this hub."," ","Return to the app that sent you here and retry the action — the request will go through now."]}),i.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:i.jsx(nt,{to:"/permissions",children:"View permissions"})})]});const g=r.kind==="approving",y=r.kind==="error"?r.message:null;return i.jsxs("div",{children:[i.jsx("p",{className:"muted",children:"An app is asking this hub to issue OAuth tokens. Review the details below and approve only if you recognize the app."}),i.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:i.jsxs("div",{className:"body",children:[i.jsx("div",{className:"name",children:i.jsx("code",{children:h})}),i.jsxs("div",{className:"dim",children:[i.jsx("span",{className:"muted",children:"client_id: "}),i.jsx("code",{children:f.client_id})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((m,v)=>i.jsxs("span",{children:[i.jsx("code",{children:m}),v<f.redirect_uris.length-1?" ":null]},m))]}),f.scopes.length>0?i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((m,v)=>i.jsxs("span",{children:[i.jsx("code",{children:$1(m)}),v<f.scopes.length-1?" ":null]},m)),f.scopes.some(Em)?i.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[i.jsx("code",{children:"*"})," — a specific vault is selected during sign-in via the consent picker (or the user's assigned vault for multi-user setups)."]}):null]}):null,i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"registered: "}),i.jsx("code",{title:f.registered_at,children:f.registered_at})]}),y?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y})}):null]})}),i.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{c()},disabled:g,children:g?"Approving…":`Approve ${h}`}),i.jsx(nt,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function $1(l){return Em(l)?`vault:*:${l.split(":")[1]}`:l}function Em(l){const r=l.split(":");if(r.length!==2||r[0]!=="vault")return!1;const c=r[1];return c==="read"||c==="write"}function J1(l){const r={};for(const c of l.parameters){const o=/^sink\.params\.(.+)$/.exec(c.target);o!=null&&o[1]&&(r[o[1]]=c.example??`my-${c.key}`)}return r}function ac(l,r){return l instanceof V?`${r} failed (${l.status}): ${l.message}`:l instanceof Error?l.message:String(l)}function $h({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return i.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(l).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function K1(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState({kind:"idle"}),[g,y]=b.useState({kind:"idle"}),[m,v]=b.useState({kind:"idle"}),[x,j]=b.useState(""),[_,k]=b.useState(""),[E,z]=b.useState(""),[q,H]=b.useState(""),[Q,Z]=b.useState(""),[P,J]=b.useState(""),[$,w]=b.useState("");b.useEffect(()=>{let ie=!1;return r({kind:"loading"}),Promise.all([M1(),R1(),jc()]).then(([W,ge,be])=>{ie||(r({kind:"ok",data:{connections:W,catalog:ge,vaults:be.vaults}}),z(D=>{var F;return D||((F=be.vaults[0])==null?void 0:F.name)||""}))}).catch(W=>{ie||r({kind:"error",message:W instanceof Error?W.message:String(W)})}),()=>{ie=!0}},[c]);function U(ie){j(ie.source.module),k(ie.source.event),Z(ie.sink.module),J(ie.sink.action),H(ie.source.filter?JSON.stringify(ie.source.filter,null,2):"");const W=J1(ie);w(Object.keys(W).length>0?JSON.stringify(W,null,2):""),h({kind:"idle"})}async function X(ie){if(ie.preventDefault(),!x||!_||!Q||!P){h({kind:"error",message:"Pick a source event and a sink action."});return}let W,ge;try{W=q.trim()?JSON.parse(q):void 0}catch{h({kind:"error",message:"Filter is not valid JSON."});return}try{ge=$.trim()?JSON.parse($):void 0}catch{h({kind:"error",message:"Action params are not valid JSON."});return}if(x==="vault"&&!E){h({kind:"error",message:"Pick a vault for the source event."});return}h({kind:"submitting"});try{const be=await z1({source:{module:x,...x==="vault"?{vault:E}:{},event:_,...W?{filter:W}:{}},sink:{module:Q,action:P,...ge?{params:ge}:{}}});h({kind:"created",...be.connect?{connect:be.connect}:{}}),o(D=>D+1)}catch(be){h({kind:"error",message:ac(be,"Create")})}}async function te(ie){y({kind:"removing",id:ie});try{await U1(ie),y({kind:"idle"}),o(W=>W+1)}catch(W){y({kind:"error",id:ie,message:ac(W,"Remove")})}}async function le(ie){if(m.kind!=="approving"){v({kind:"approving",id:ie});try{await O1(ie),v({kind:"idle"}),o(W=>W+1)}catch(W){v({kind:"error",id:ie,message:ac(W,"Approve")})}}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Connections"})}),i.jsxs("p",{className:"muted",children:["A connection wires ",i.jsx("em",{children:"when [event] in a module → do [action] in another module"}),". The hub mints the tokens and registers the trigger. Modules declare presets for the common cases — pick one below to pre-fill the builder."]}),F1(l,g,y,te,m,le,()=>o(ie=>ie+1)),l.kind==="ok"&&i.jsx(t0,{catalog:l.data.catalog,vaults:l.data.vaults,sourceModule:x,setSourceModule:j,sourceEvent:_,setSourceEvent:k,vault:E,setVault:z,filterText:q,setFilterText:H,sinkModule:Q,setSinkModule:Z,sinkAction:P,setSinkAction:J,paramsText:$,setParamsText:w,createSt:f,setCreateSt:h,onSubmit:X,onApplyTemplate:U})]})}function F1(l,r,c,o,f,h,g){if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading connections…"});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load connections: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:g,className:"secondary",children:"Retry"})]});const{connections:y}=l.data;return y.length===0?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No connections yet."}),i.jsx("p",{className:"muted",children:"Build one below, or start from a module's preset."})]}):i.jsx(P1,{connections:y,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h})}function Tm(l){return l.requested_by&&l.requested_by.length>0?l.requested_by:"custom"}function W1(l){return l==="custom"?"Custom (built here)":`Added from ${l}`}function I1(l){const r=new Map;for(const c of l){const o=Tm(c),f=r.get(o);f?f.push(c):r.set(o,[c])}return Array.from(r.entries()).sort(([c],[o])=>c===o?0:c==="custom"?1:o==="custom"?-1:c.localeCompare(o))}function P1({connections:l,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h}){const g=I1(l);return i.jsx(i.Fragment,{children:g.map(([y,m])=>i.jsxs("div",{className:"channel-list",style:{marginTop:"1rem"},"data-provenance-group":y,children:[i.jsx("h3",{style:{marginBottom:"0.25rem"},children:W1(y)}),i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"channel-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:"Connection"}),i.jsx("th",{scope:"col",children:"When"}),i.jsx("th",{scope:"col",children:"Do"}),i.jsx("th",{scope:"col",children:"Source"}),i.jsx("th",{scope:"col",children:"Actions"})]})}),i.jsx("tbody",{children:m.map(v=>e0(v,r,c,o,f,h))})]})})]},y))})}function e0(l,r,c,o,f,h){const g=r.kind==="confirming"&&r.id===l.id,y=r.kind==="removing"&&r.id===l.id,m=r.kind==="error"&&r.id===l.id?r.message:null,v=l.status==="pending",x=f.kind==="approving"&&f.id===l.id,j=f.kind==="error"&&f.id===l.id?f.message:null,_=`${l.source.module}.${l.source.event}${l.source.vault?` (${l.source.vault})`:""}`,k=`${l.sink.module}.${l.sink.action}`,E=Tm(l);return i.jsxs("tr",{"data-connection-id":l.id,"data-requested-by":E,children:[i.jsxs("td",{children:[i.jsx("code",{children:l.id}),v&&i.jsxs(i.Fragment,{children:[" ",i.jsx("span",{className:"tag","data-testid":"pending-badge",title:`A module claimed a credential it already holds${l.provisioned.scope?` (${l.provisioned.scope})`:""} — approving lets it renew before expiry. Nothing new is granted.`,children:"pending approval"})]})]}),i.jsx("td",{children:i.jsx("code",{children:_})}),i.jsx("td",{children:i.jsx("code",{children:k})}),i.jsx("td",{children:E==="custom"?i.jsx("span",{className:"muted",children:"custom"}):i.jsx("span",{className:"tag","data-testid":"provenance-badge",children:E})}),i.jsxs("td",{children:[v&&i.jsx("button",{type:"button",disabled:x,onClick:()=>void h(l.id),"aria-label":`Approve ${l.id}`,"data-testid":"approve-connection",style:{marginRight:"0.5rem"},children:x?"Approving…":"Approve"}),g?i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm remove ${l.id}`,children:[i.jsxs("p",{children:["Remove connection ",i.jsx("code",{children:l.id}),"? This tears down the provisioned trigger (and channel config, if any)."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",className:"destructive",onClick:()=>{o(l.id)},disabled:y,children:y?"Removing…":"Remove"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:y,children:"Cancel"})]})]}):i.jsx("button",{type:"button",className:"secondary",disabled:y,onClick:()=>c({kind:"confirming",id:l.id}),"aria-label":`Remove ${l.id}`,children:y?"Removing…":"Remove"}),m&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:m})}),j&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:j})})]})]},l.id)}function t0(l){const{catalog:r,createSt:c}=l,o=c.kind==="submitting",f=m=>r.events.filter(v=>v.module===m),h=m=>r.actions.filter(v=>v.module===m),g=Array.from(new Set(r.events.map(m=>m.module))),y=Array.from(new Set(r.actions.map(m=>m.module)));return i.jsxs("section",{style:{marginTop:"1.5rem"},children:[i.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("h3",{style:{marginRight:"auto"},children:"Build a connection"}),r.templates.map(m=>i.jsxs("button",{type:"button",className:"secondary",onClick:()=>l.onApplyTemplate(m),"data-testid":`preset-${m.module}-${m.key}`,...m.description?{title:m.description}:{},children:["Preset: ",m.title]},`${m.module}/${m.key}`))]}),i.jsxs("form",{onSubmit:m=>void l.onSubmit(m),"aria-label":"Build a connection",children:[i.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem"},children:[i.jsx("legend",{children:"When (source event)"}),i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-source-module",children:"Module"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-source-module",value:l.sourceModule,disabled:o,onChange:m=>{l.setSourceModule(m.target.value),l.setSourceEvent("")},children:[i.jsx("option",{value:"",children:"— pick a module —"}),g.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),l.sourceModule&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-source-event",children:"Event"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-source-event",value:l.sourceEvent,disabled:o,onChange:m=>l.setSourceEvent(m.target.value),children:[i.jsx("option",{value:"",children:"— pick an event —"}),f(l.sourceModule).map(m=>i.jsxs("option",{value:m.key,children:[m.title," (",m.key,")"]},m.key))]})]}),l.sourceModule==="vault"&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-vault",children:"Vault"}),i.jsx("br",{}),i.jsx("select",{id:"conn-vault",value:l.vault,disabled:o,onChange:m=>l.setVault(m.target.value),children:l.vaults.map(m=>i.jsx("option",{value:m.name,children:m.name},m.name))})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"conn-filter",children:["Filter ",i.jsx("span",{className:"muted",children:"(JSON — tags / has_metadata / missing_metadata)"})]}),i.jsx("br",{}),i.jsx("textarea",{id:"conn-filter",value:l.filterText,disabled:o,rows:4,style:{width:"100%",fontFamily:"monospace"},onChange:m=>l.setFilterText(m.target.value),placeholder:'{ "tags": ["#agent-message/inbound"] }'})]})]}),i.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem",marginTop:"0.75rem"},children:[i.jsx("legend",{children:"Do (sink action)"}),i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-sink-module",children:"Module"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-sink-module",value:l.sinkModule,disabled:o,onChange:m=>{l.setSinkModule(m.target.value),l.setSinkAction("")},children:[i.jsx("option",{value:"",children:"— pick a module —"}),y.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),l.sinkModule&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-sink-action",children:"Action"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-sink-action",value:l.sinkAction,disabled:o,onChange:m=>l.setSinkAction(m.target.value),children:[i.jsx("option",{value:"",children:"— pick an action —"}),h(l.sinkModule).map(m=>i.jsxs("option",{value:m.key,children:[m.title," (",m.key,")"]},m.key))]})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"conn-params",children:["Action params ",i.jsxs("span",{className:"muted",children:["(JSON — e.g. ",'{ "channel": "eng" }',")"]})]}),i.jsx("br",{}),i.jsx("textarea",{id:"conn-params",value:l.paramsText,disabled:o,rows:3,style:{width:"100%",fontFamily:"monospace"},onChange:m=>l.setParamsText(m.target.value),placeholder:'{ "channel": "eng" }'})]})]}),c.kind==="error"&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:c.message})}),i.jsx("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:i.jsx("button",{type:"submit",disabled:o,children:o?"Creating…":"Create connection"})})]}),c.kind==="created"&&c.connect&&i.jsx(a0,{connect:c.connect,onDismiss:()=>l.setCreateSt({kind:"idle"})}),c.kind==="created"&&!c.connect&&i.jsx("div",{className:"success-banner",style:{marginTop:"1rem"},"data-testid":"connection-created",children:"Connection created."})]})}function a0({connect:l,onDismiss:r}){return i.jsxs("div",{className:"mcp-connect-card",style:{marginTop:"1rem"},"data-testid":"connection-connect-panel",children:[i.jsx("h3",{children:"Connect a session"}),i.jsx("p",{className:"muted",children:"Run these where your Claude Code session will live; authorize in the browser when prompted."}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"1 · Register the channel (MCP)"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"connection-mcp-add",children:l.mcpAdd}),i.jsx($h,{value:l.mcpAdd})]})]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"2 · Launch a session on the channel"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"connection-launch",children:l.launch}),i.jsx($h,{value:l.launch})]}),i.jsxs("p",{className:"muted",style:{marginTop:"0.4rem"},children:["⚠ This launches Claude Code with unrestricted tool access (",i.jsx("code",{children:"--dangerously-skip-permissions"}),") — run it only on a machine you trust for that session."]})]}),i.jsx("div",{style:{marginTop:"0.75rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})})]})}function Xl(l,r){return l instanceof V||l instanceof Error?l.message:`${r} failed`}function n0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState({kind:"idle"}),[f,h]=b.useState(0);b.useEffect(()=>{let x=!1;return r({kind:"loading"}),D1().then(j=>{x||r({kind:"ok",grants:j})}).catch(j=>{x||r({kind:"error",message:Xl(j,"Load")})}),()=>{x=!0}},[f]);async function g(x){o({kind:"working",id:x});try{await ec(x),o({kind:"idle"}),h(j=>j+1)}catch(j){o({kind:"error",id:x,message:Xl(j,"Approve")})}}async function y(x,j){if(j.trim().length===0){o({kind:"error",id:x,message:"Paste the API token before approving."});return}o({kind:"working",id:x});try{await ec(x,j),o({kind:"idle"}),h(_=>_+1)}catch(_){o({kind:"error",id:x,message:Xl(_,"Approve")})}}async function m(x){o({kind:"working",id:x});try{const j=await ec(x);if(j.authorizeUrl){window.location.assign(j.authorizeUrl);return}o({kind:"idle"}),h(_=>_+1)}catch(j){o({kind:"error",id:x,message:Xl(j,"Connect")})}}async function v(x){o({kind:"working",id:x});try{await H1(x),o({kind:"idle"}),h(j=>j+1)}catch(j){o({kind:"error",id:x,message:Xl(j,"Revoke")})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Grants"})}),i.jsxs("p",{className:"muted",children:["Agents declare connections they want beyond their own vault — other vaults (tag-scoped) and external service credentials. Each one waits here for your approval. A vault note can only"," ",i.jsx("em",{children:"request"}),"; nothing is granted until you approve it below."]}),l0(l,c,o,{onApproveVault:g,onApproveService:y,onConnectMcp:m,onRevoke:v,onRetry:()=>h(x=>x+1)})]})}function l0(l,r,c,o){if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading grants…"});if(l.kind==="error")return i.jsxs("div",{children:[i.jsx("div",{className:"error-banner",children:l.message}),i.jsx("button",{type:"button",onClick:o.onRetry,className:"secondary",children:"Retry"})]});if(l.grants.length===0)return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No grant requests yet."}),i.jsx("p",{className:"muted",children:"When an agent declares a connection it wants, it shows up here for approval."})]});const f=new Map;for(const g of l.grants){const y=f.get(g.agent)??[];y.push(g),f.set(g.agent,y)}const h=[...f.keys()].sort();return i.jsx("div",{className:"grants-groups",children:h.map(g=>i.jsxs("section",{"aria-label":`Grants for ${g}`,style:{marginBottom:"1.5rem"},children:[i.jsx("h3",{style:{marginBottom:"0.25rem"},children:g}),i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"channel-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Connection"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Actions"})]})}),i.jsx("tbody",{children:(f.get(g)??[]).map(y=>i.jsx(s0,{grant:y,rowSt:r,setRowSt:c,actions:o},y.id))})]})})]},g))})}function i0(l){if(l.kind==="vault"){const r=l.access??"read",c=l.tags&&l.tags.length>0?` (${l.tags.join(", ")})`:"";return`vault: ${l.target} · ${r}${c}`}if(l.kind==="service"){const r=l.inject&&l.inject.length>0?` · inject: ${l.inject.join("+")}`:"";return`service: ${l.target}${r}`}return`mcp: ${l.target}`}function s0({grant:l,rowSt:r,setRowSt:c,actions:o}){const f=r.kind==="working"&&r.id===l.id,h=r.kind==="error"&&r.id===l.id?r.message:null,g=l.connection,y=g.kind==="mcp",m=g.kind==="service",v=l.status!=="approved",x=r.kind==="pasting"&&r.id===l.id?r.token:null;return i.jsxs("tr",{"data-grant-id":l.id,children:[i.jsxs("td",{children:[i.jsx("code",{children:i0(g)}),y&&i.jsx("span",{className:"muted",children:" — remote MCP (OAuth)"})]}),i.jsxs("td",{children:[i.jsx("span",{className:`status status-${l.status}`,children:l.status}),l.reason&&i.jsxs("span",{className:"muted",children:[" — ",l.reason]})]}),i.jsxs("td",{children:[v&&g.kind==="vault"&&i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onApproveVault(l.id),children:f?"Approving…":l.status==="revoked"?"Re-approve":"Approve"}),v&&y&&x===null&&i.jsxs("span",{style:{display:"inline-flex",gap:"0.5rem",alignItems:"center"},children:[i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onConnectMcp(l.id),children:f?"Connecting…":l.status==="needs_consent"?"Reconnect":"Connect"}),i.jsx("button",{type:"button",className:"secondary",disabled:f,onClick:()=>c({kind:"pasting",id:l.id,token:""}),children:"Paste a token instead"})]}),v&&m&&x===null&&i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>c({kind:"pasting",id:l.id,token:""}),children:l.status==="revoked"?"Re-approve…":"Approve…"}),v&&(m||y)&&x!==null&&i.jsxs("span",{style:{display:"inline-flex",gap:"0.5rem",alignItems:"center"},children:[i.jsx("input",{type:"password","aria-label":`API token for ${g.target}`,placeholder:`${g.target} API token`,value:x,onChange:j=>c({kind:"pasting",id:l.id,token:j.target.value})}),i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onApproveService(l.id,x),children:f?"Approving…":"Save & approve"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),children:"Cancel"})]}),l.status==="approved"&&i.jsx("button",{type:"button",className:"secondary",disabled:f,onClick:()=>o.onRevoke(l.id),children:f?"Revoking…":"Revoke"}),h&&i.jsxs("span",{className:"error-inline",children:[" ",h]})]})]})}const u0=[{to:"/connections",label:"Connections",desc:"Wire a module event to another module's action."},{to:"/modules",label:"Modules",desc:"Install, upgrade, and manage modules."},{to:"/users",label:"Users",desc:"Manage operators and invite members."},{to:"/tokens",label:"Tokens",desc:"Mint and revoke access tokens."},{to:"/permissions",label:"Permissions",desc:"OAuth consent grants per app."},{to:"/settings",label:"Settings",desc:"Canonical URL, install channel, more."}];function r0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(null);b.useEffect(()=>{let g=!1;return Ns().then(y=>{g||r({kind:"ok",modules:y.modules.filter(m=>m.installed)})}).catch(y=>{if(g)return;const m=y instanceof Error?y.message:String(y);r({kind:"error",message:m})}),jc().then(y=>{g||o(y.vaults.length)}).catch(()=>{g||o(null)}),()=>{g=!0}},[]);const f=l.kind==="ok"?l.modules:[],h=f.flatMap(g=>g.uis.map(y=>({key:`${g.short}:${y.name}`,label:y.display_name,tagline:y.tagline,href:y.path,ownerLabel:g.display_name})));return i.jsxs("div",{"data-route-content":"true",className:"admin-home",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Hub"})}),i.jsxs("p",{className:"muted",children:["Everything on this hub, in one place. Hub-native sections open here in the admin shell; module surfaces (marked ",i.jsx("span",{className:"ext-mark",children:"↗"}),") open the module's own UI."]}),i.jsxs("section",{className:"home-group","data-testid":"home-administer",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Administer"}),i.jsx("span",{className:"home-group-tag home-group-tag-hub",children:"hub"})]}),i.jsx("p",{className:"muted home-group-sub",children:"Cross-cutting host admin. Opens here in the shell — the nav stays with you."}),i.jsx("div",{className:"home-grid",children:u0.map(g=>i.jsxs(nt,{to:g.to,className:"home-card home-card-hub","data-section":g.to,children:[i.jsx("span",{className:"home-card-title",children:g.label}),i.jsx("span",{className:"home-card-desc",children:g.desc})]},g.to))})]}),i.jsxs("section",{className:"home-group","data-testid":"home-modules",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Modules"}),i.jsx("span",{className:"home-group-tag home-group-tag-module",children:"modules"})]}),i.jsxs("p",{className:"muted home-group-sub",children:["Installed modules. Each opens its own admin surface outside the hub shell. Manage install / upgrade / restart from ",i.jsx(nt,{to:"/modules",children:"Modules"}),"."]}),l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading modules…"}):l.kind==="error"?i.jsxs("p",{className:"muted","data-testid":"home-modules-error",children:["Couldn't load modules (",l.message,"). Open ",i.jsx(nt,{to:"/modules",children:"Modules"})," ","directly."]}):f.length===0?i.jsxs("p",{className:"muted","data-testid":"home-modules-empty",children:["No modules installed yet. ",i.jsx(nt,{to:"/modules",children:"Install one →"})]}):i.jsx("div",{className:"home-grid",children:f.map(g=>g.short==="vault"&&c===0?i.jsx(o0,{module:g},g.short):i.jsx(c0,{module:g},g.short))})]}),h.length>0?i.jsxs("section",{className:"home-group","data-testid":"home-surfaces",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Your surfaces"}),i.jsx("span",{className:"home-group-tag home-group-tag-module",children:"module-owned"})]}),i.jsx("p",{className:"muted home-group-sub",children:"The user-facing apps these modules host. Opens the app — outside the hub shell."}),i.jsx("div",{className:"home-grid",children:h.map(g=>i.jsxs("a",{href:g.href,className:"home-card home-card-surface","data-testid":`home-surface-${g.key}`,children:[i.jsxs("span",{className:"home-card-title",children:[g.label," ",i.jsx("span",{className:"ext-mark",children:"↗"})]}),g.tagline?i.jsx("span",{className:"home-card-desc",children:g.tagline}):null,i.jsxs("span",{className:"home-card-owner",children:["opens ",g.ownerLabel,"'s surface"]})]},g.key))})]}):null]})}function c0({module:l}){const r=l.config_ui_url??l.management_url;return r?i.jsxs("a",{href:r,className:"home-card home-card-module","data-testid":`home-module-${l.short}`,children:[i.jsxs("span",{className:"home-card-title",children:[l.display_name," ",i.jsx("span",{className:"ext-mark",children:"↗"})]}),l.tagline?i.jsx("span",{className:"home-card-desc",children:l.tagline}):null,i.jsxs("span",{className:"home-card-owner",children:["opens ",l.display_name,"'s own admin"]})]}):i.jsxs("div",{className:"home-card home-card-module home-card-disabled","data-testid":`home-module-${l.short}`,"aria-disabled":"true",children:[i.jsx("span",{className:"home-card-title",children:l.display_name}),l.tagline?i.jsx("span",{className:"home-card-desc",children:l.tagline}):null,i.jsx("span",{className:"home-card-owner home-card-owner-empty",children:"no admin UI yet"})]})}function o0({module:l}){return i.jsxs("a",{href:"/admin/setup?step=vault",className:"home-card home-card-hub","data-testid":`home-module-${l.short}`,children:[i.jsx("span",{className:"home-card-title",children:l.display_name}),i.jsx("span",{className:"home-card-desc",children:"No vaults yet — create your first vault to start storing notes, tokens, and secrets."}),i.jsx("span",{className:"home-card-owner",children:"create your first vault — opens the setup wizard"})]})}const d0=2e3,f0=12e4;function h0(){const[l,r]=b.useState(null),[c,o]=b.useState({kind:"idle"}),f=b.useRef(null),h=b.useRef(0),g=b.useCallback(async()=>{try{r(await cc())}catch{}},[]);b.useEffect(()=>{g()},[g]),b.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const y=b.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),m=b.useCallback((x,j)=>{h.current=Date.now()+f0,y(),f.current=setInterval(()=>{(async()=>{let _=null,k=null;try{_=await cc()}catch{}try{k=await N1()}catch{}if(_){const E=_.version!==x,z=j!==null&&_.version===j;if(E||z){y(),r(_),o({kind:"succeeded",newVersion:_.version});return}}if((k==null?void 0:k.phase)==="failed"){y(),o({kind:"error",message:k.error??"the hub upgrade failed — check the platform log"});return}if(Date.now()>=h.current){y();const E=(k==null?void 0:k.log.at(-1))??null;o({kind:"timeout",lastLog:E})}})()},d0)},[y]);async function v(){if(!l)return;const x=l.version;o({kind:"starting"});try{const j=await C1();if(j.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:j.target_version});return}o({kind:"upgrading",previousVersion:x,targetVersion:j.target_version}),m(x,j.target_version)}catch(j){o({kind:"error",message:j instanceof Error?j.message:String(j)})}}return l?i.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[i.jsxs("div",{className:"install-card-body",children:[i.jsxs("h3",{children:["Hub ",i.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),i.jsxs("p",{className:"install-card-meta muted",children:["Installed ",i.jsxs("code",{"data-testid":"hub-current-version",children:["v",l.version]})," · source"," ",i.jsx("code",{children:l.source})]}),i.jsx(p0,{state:c})]}),i.jsx("div",{className:"install-card-actions",children:i.jsx(m0,{state:c,onUpgrade:()=>void v()})})]}):null}function m0({state:l,onUpgrade:r}){if(l.kind==="redeploy-required")return i.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const c=l.kind==="starting"||l.kind==="upgrading";return i.jsx("button",{type:"button",onClick:r,disabled:c,"data-testid":"hub-upgrade-button",children:c?"Upgrading…":"Upgrade hub"})}function p0({state:l}){switch(l.kind){case"idle":return null;case"starting":return i.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return i.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-upgrading",children:["Upgrading",l.targetVersion?` to v${l.targetVersion}`:"","… the hub will restart; this page reconnects automatically."]});case"succeeded":return i.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",i.jsxs("code",{children:["v",l.newVersion]}),"."]});case"timeout":return i.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",l.lastLog?i.jsxs(i.Fragment,{children:[" ",i.jsxs("span",{className:"dim",children:["Last status: ",l.lastLog]})]}):null]});case"redeploy-required":return i.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-redeploy",children:["This hub is baked into its container image, so an in-place upgrade wouldn't survive a restart."," ",l.targetVersion?i.jsxs(i.Fragment,{children:["Redeploy from your platform dashboard to move to ",i.jsxs("code",{children:["v",l.targetVersion]}),"."]}):i.jsx(i.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return i.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",l.message]})}}function g0(){if(typeof navigator>"u")return"other";const l=(navigator.platform||"").toLowerCase();return l.includes("mac")?"darwin":l.includes("linux")?"linux":"other"}function v0(l,r){const c=[];if(l.darwin&&c.push({label:"macOS",command:l.darwin,preferred:r==="darwin"}),l.linux&&c.push({label:"Linux",command:l.linux,preferred:r==="linux"}),l.generic){const o=c.some(f=>f.preferred);c.push({label:"Any platform",command:l.generic,preferred:!o})}return c.sort((o,f)=>Number(f.preferred)-Number(o.preferred))}function y0({command:l}){const[r,c]=b.useState(!1);async function o(){try{await navigator.clipboard.writeText(l),c(!0),setTimeout(()=>c(!1),1500)}catch{}}return i.jsxs("div",{className:"depcard-cmd",children:[i.jsx("pre",{className:"depcard-cmd-text",children:l}),i.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:r?"Copied":"Copy"})]})}function b0({wire:l}){const r=g0(),c=v0(l.install,r);return i.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[i.jsxs("h3",{className:"depcard-heading",children:[l.binary," isn't installed"]}),l.why?i.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",l.why,"."]}):null,c.length>0?i.jsxs("div",{className:"depcard-installs",children:[i.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),c.map(o=>i.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[i.jsx("span",{className:"depcard-os",children:o.label}),i.jsx(y0,{command:o.command})]},o.label))]}):null,l.docs_url?i.jsx("p",{className:"depcard-docs",children:i.jsx("a",{href:l.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,l.sysadmin_hint?i.jsx("p",{className:"depcard-hint muted",children:l.sysadmin_hint}):null]})}function x0(l){const{error:r,errorDetail:c}=l;return(c==null?void 0:c.error_type)==="missing_dependency"?i.jsx(b0,{wire:c}):c!=null&&c.error_description?i.jsx("span",{className:"depcard-fallback",children:c.error_description}):r?i.jsx("span",{className:"depcard-fallback",children:r}):null}function j0(l){switch(l){case"running":return"active";case"starting":case"restarting":return"pending";case"crashed":return"failing";case"stopped":case null:case void 0:return"inactive";default:return"inactive"}}function S0(l){if(l==null)return"active";switch(l){case"active":case"pending":case"inactive":case"failing":return l;case"pending-oauth":return"pending";case"disabled":return"inactive";default:return"active"}}const C0=1e3;function N0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState([]),[f,h]=b.useState({}),[g,y]=b.useState({}),m=b.useCallback(async()=>{try{const w=await Ns();r({kind:"ok",catalog:w})}catch(w){const U=w instanceof Error?w.message:String(w);r({kind:"error",message:U})}},[]);b.useEffect(()=>{m()},[m]);const v=b.useRef(null);b.useEffect(()=>{if(c.length===0){v.current&&(clearInterval(v.current),v.current=null);return}if(!v.current)return v.current=setInterval(()=>{Promise.all(c.map(async w=>{var U;try{const X=await f1(w.operationId);o(te=>te.map(le=>le.operationId===X.id?{...le,log:X.log,status:X.status,error:X.error,errorDetail:X.error_detail}:le)),(X.status==="succeeded"||X.status==="failed")&&(X.status==="failed"&&((U=X.error_detail)==null?void 0:U.error_type)==="missing_dependency"?m():setTimeout(()=>{o(le=>le.filter(ie=>ie.operationId!==X.id)),m()},1500))}catch(X){const te=X instanceof Error?X.message:String(X);o(le=>le.map(ie=>ie.operationId===w.operationId?{...ie,status:"failed",error:te}:ie))}}))},C0),()=>{v.current&&(clearInterval(v.current),v.current=null)}},[c,m]);async function x(w){y(U=>{const X={...U};return delete X[w],X});try{const U=await u1(w);o(X=>[...X,{kind:"install",operationId:U,short:w,log:[],status:"pending"}])}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}}async function j(w){y(U=>{const X={...U};return delete X[w],X});try{const U=await r1(w);o(X=>[...X,{kind:"upgrade",operationId:U,short:w,log:[],status:"pending"}])}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}}async function _(w){if(!f[w]){h(U=>({...U,[w]:!0})),y(U=>{const X={...U};return delete X[w],X});try{await c1(w),await m()}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[w]:!1}))}}}async function k(w){if(!f[w]&&window.confirm(`Uninstall ${w}? The container will stop the service, remove the package, and drop its services.json entry. The persistent disk's data dir is left intact.`)){h(U=>({...U,[w]:!0})),y(U=>{const X={...U};return delete X[w],X});try{await o1(w),await m()}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[w]:!1}))}}}if(l.kind==="loading")return i.jsx("div",{className:"empty",children:"Loading modules…"});if(l.kind==="error")return l.message.includes("setup_required")?i.jsxs("div",{className:"empty",children:["Hub not yet configured. ",i.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):i.jsxs("div",{className:"empty",children:["Failed to load modules: ",l.message,"."," ",i.jsx("button",{type:"button",onClick:()=>void m(),children:"Retry"})]});const E=l.catalog,{modules:z,supervisor_available:q,module_install_channel:H}=E,Q=z.filter(w=>w.installed),Z=z.filter(w=>!w.installed&&w.available_to_install),P=new Set(c.filter(w=>w.kind==="install").map(w=>w.short)),J=Z.filter(w=>!P.has(w.short));async function $(w){if(w!==H){r({kind:"ok",catalog:{...E,module_install_channel:w}});try{const U=await d1(w);r(X=>X.kind==="ok"?{kind:"ok",catalog:{...X.catalog,module_install_channel:U}}:X)}catch(U){const X=U instanceof Error?U.message:String(U);r({kind:"error",message:`Failed to update channel — ${X}`})}}}return i.jsxs("section",{className:"modules",children:[i.jsx("h1",{children:"Modules"}),i.jsx("p",{className:"muted",children:"Install, upgrade, and manage Parachute modules. Available modules are pinned for the v0.6 release; the marketplace is on the roadmap."}),i.jsx(h0,{}),i.jsx(_0,{channel:H,disabled:!q,onChange:w=>void $(w)}),!q&&i.jsxs("div",{className:"banner banner-info",children:["This hub is running outside container mode (no supervisor wired). Module install / restart / upgrade is available only under ",i.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",i.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),c.length>0&&i.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[i.jsx("strong",{children:"In progress:"}),i.jsx("ul",{children:c.map(w=>i.jsxs("li",{children:[i.jsx("code",{children:w.short})," · ",w.kind," · status: ",w.status,w.status==="failed"&&(w.errorDetail||w.error)?i.jsx("div",{className:"depcard-wrap",children:x0({error:w.error,errorDetail:w.errorDetail})}):null,w.log.length>0&&i.jsxs("details",{children:[i.jsxs("summary",{children:[w.log.length," log line(s)"]}),i.jsx("pre",{children:w.log.join(`
|
|
61
|
-
`)})]})]},w.operationId))})]}),i.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[i.jsx("h2",{children:"Installed modules"}),Q.length===0?i.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",i.jsx("strong",{children:"Install a module"})," below to get started."]}):Jh(Q,w=>i.jsx("ul",{className:"module-list",children:w.map(U=>i.jsx(w0,{module:U,supervisorAvailable:q,syncBusy:!!f[U.short],errorMessage:g[U.short],onUpgrade:()=>void j(U.short),onRestart:()=>void _(U.short),onUninstall:()=>void k(U.short)},U.short))}),"installed")]}),i.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[i.jsx("h2",{children:"Install a module"}),J.length===0?i.jsx("p",{className:"muted","data-testid":"installable-empty",children:P.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):Jh(J,w=>i.jsx("ul",{className:"install-list",children:w.map(U=>i.jsx(E0,{module:U,supervisorAvailable:q,installing:P.has(U.short),errorMessage:g[U.short],onInstall:()=>void x(U.short)},U.short))}),"installable")]})]})}function Jh(l,r,c){const o=l.filter(g=>g.focus==="core"),f=l.filter(g=>g.focus==="experimental"),h=l.filter(g=>g.focus==="deprecated");return i.jsxs(i.Fragment,{children:[o.length>0&&i.jsx("div",{"data-testid":`${c}-core-group`,children:r(o)}),f.length>0&&i.jsxs("div",{className:"modules-experimental","data-testid":`${c}-experimental-group`,children:[i.jsxs("h3",{className:"muted experimental-heading",children:["Experimental"," ",i.jsx("span",{className:"muted",children:"— exploration modules; not part of the core surface"})]}),r(f)]}),h.length>0&&i.jsxs("div",{className:"modules-deprecated","data-testid":`${c}-deprecated-group`,children:[i.jsxs("h3",{className:"muted deprecated-heading",children:["Deprecated"," ",i.jsx("span",{className:"muted",children:"— retained for existing installs; not offered for new setups"})]}),r(h)]})]})}function w0({module:l,supervisorAvailable:r,syncBusy:c,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:g}){const y=r&&!c,m=l.installed_version!==l.latest_version&&l.latest_version!==null,v=l.management_url,x=l.config_ui_url;return i.jsxs("li",{className:"module-row","data-short":l.short,children:[i.jsxs("header",{children:[i.jsxs("h2",{children:[l.display_name," ",i.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),(()=>{const j=T0(l);return i.jsx("span",{className:`status status-${j.cssState}`,"data-state":j.cssState,"data-testid":`module-status-${l.short}`,children:j.label})})()]}),l.tagline?i.jsx("p",{className:"tagline",children:l.tagline}):null,i.jsxs("dl",{className:"meta",children:[i.jsx("dt",{children:"Package"}),i.jsx("dd",{children:i.jsx("code",{children:l.package})}),i.jsx("dt",{children:"Installed"}),i.jsxs("dd",{children:["v",l.installed_version??"unknown",m&&i.jsxs("span",{className:"badge",children:["v",l.latest_version," available"]})]}),l.pid&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"PID"}),i.jsx("dd",{children:l.pid})]})]}),l.uis.length>0&&i.jsx(k0,{uis:l.uis}),i.jsxs("div",{className:"actions",children:[v?i.jsx("a",{className:"btn",href:v,"data-testid":`open-${l.short}`,children:"Open"}):i.jsx("button",{type:"button",className:"btn",disabled:!0,title:x?"No separate Open surface — use Configure for this module's admin UI.":"This module hasn't shipped an admin UI yet.","data-testid":`open-${l.short}`,children:"Open"}),x?i.jsx("a",{className:"btn",href:x,"data-testid":`configure-${l.short}`,children:"Configure"}):null,i.jsx("button",{type:"button",disabled:!y,onClick:h,children:"Restart"}),i.jsx("button",{type:"button",disabled:!y||!m,onClick:f,children:m?`Upgrade to v${l.latest_version}`:"Up to date"}),i.jsx("button",{type:"button",className:"destructive",disabled:!y,onClick:g,children:"Uninstall"})]}),o&&i.jsx("div",{className:"error",children:o})]})}function E0({module:l,supervisorAvailable:r,installing:c,errorMessage:o,onInstall:f}){const h=r&&!c;return i.jsxs("li",{className:"install-card","data-short":l.short,children:[i.jsxs("div",{className:"install-card-body",children:[i.jsxs("h3",{children:[l.display_name," ",i.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),l.tagline?i.jsx("p",{className:"tagline",children:l.tagline}):null,i.jsxs("p",{className:"muted install-card-meta",children:[i.jsx("code",{children:l.package}),l.latest_version?i.jsxs(i.Fragment,{children:[" · ","latest ",i.jsxs("code",{children:["v",l.latest_version]})]}):null]})]}),i.jsx("div",{className:"install-card-actions",children:i.jsx("button",{type:"button",disabled:!h,onClick:f,children:c?"Installing…":"Install"})}),o&&i.jsx("div",{className:"error",children:o})]})}function T0(l){if(!l.installed)return{cssState:"absent",label:"not installed"};if(!l.supervisor_status)return{cssState:"absent",label:"not supervised"};const r=j0(l.supervisor_status);return{cssState:r,label:r}}function k0({uis:l}){return i.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[i.jsxs("summary",{children:["Hosted UIs ",i.jsxs("span",{className:"muted",children:["(",l.length,")"]})]}),i.jsx("ul",{className:"ui-sub-units",children:l.map(r=>{const c=S0(r.status);return i.jsxs("li",{className:"ui-sub-unit","data-name":r.name,children:[r.icon_url&&i.jsx("img",{src:r.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),i.jsxs("div",{className:"ui-sub-unit-body",children:[i.jsxs("a",{href:r.path,className:"ui-sub-unit-link",children:[i.jsx("strong",{children:r.display_name}),i.jsxs("span",{className:"muted",children:[" · ",r.path]})]}),r.tagline?i.jsx("p",{className:"tagline",children:r.tagline}):null]}),i.jsx("span",{className:`status status-${c}`,"data-state":c,"data-testid":`ui-status-${r.name}`,children:c})]},r.name)})})]})}function _0({channel:l,disabled:r,onChange:c}){return i.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[i.jsx("legend",{children:"Install channel"}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:l==="latest",disabled:r,onChange:()=>c("latest")}),"Stable (",i.jsx("code",{children:"latest"}),")"]}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:l==="rc",disabled:r,onChange:()=>c("rc")}),"Release candidates (",i.jsx("code",{children:"rc"}),")"]}),i.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",i.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),i.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",i.jsx(nt,{to:"/settings",children:"Settings"}),"."]})]})}function A0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(""),[g,y]=b.useState(0),[m,v]=b.useState({kind:"idle"});b.useEffect(()=>{let k=!1;return r({kind:"loading"}),e1(f?{vault:f}:{}).then(z=>{k||r({kind:"ok",grants:z})}).catch(z=>{if(k)return;const q=z instanceof Error?z.message:String(z);r({kind:"error",message:q})}),()=>{k=!0}},[g,f]);function x(k){k.preventDefault(),h(c.trim())}function j(){o(""),h("")}async function _(k){v({kind:"revoking",clientId:k.client_id});try{await t1(k.client_id),v({kind:"idle"}),y(E=>E+1)}catch(E){const z=E instanceof V?`revoke failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);v({kind:"error",clientId:k.client_id,message:z})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Permissions"})}),i.jsxs("p",{className:"muted",children:["Apps you've granted OAuth scopes to. Revoking a grant forces the consent screen on the next authorize flow — it does ",i.jsx("em",{children:"not"})," invalidate tokens already issued."]}),i.jsxs("form",{onSubmit:x,style:{marginTop:"1rem",marginBottom:"1rem"},children:[i.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),i.jsx("input",{id:"vault-filter",type:"text",value:c,onChange:k=>o(k.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),i.jsx("button",{type:"submit",children:"Apply"}),f?i.jsx("button",{type:"button",onClick:j,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),R0({state:l,revoke:m,setRevoke:v,onConfirm:_,onRetry:()=>y(k=>k+1)})]})}function R0({state:l,revoke:r,setRevoke:c,onConfirm:o,onRetry:f}){return l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):l.grants.length===0?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No grants."}),i.jsx("p",{className:"muted",children:"When an app asks for OAuth scopes and you approve them, the grant lands here. Revoking it forces the consent screen on the next authorize flow."})]}):i.jsx("div",{style:{marginTop:"1rem"},children:l.grants.map(h=>{const g=r.kind==="revoking"&&r.clientId===h.client_id,y=r.kind==="error"&&r.clientId===h.client_id?r:null,m=r.kind==="confirming"&&r.grant.client_id===h.client_id;return i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsx("div",{className:"name",children:i.jsx("code",{children:h.client_name??h.client_id})}),i.jsxs("div",{className:"dim",children:[i.jsx("span",{className:"muted",children:"granted "}),i.jsx("code",{title:h.granted_at,children:M0(h.granted_at)})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((v,x)=>i.jsxs("span",{children:[i.jsx("code",{children:v}),x<h.scopes.length-1?" ":null]},v))]}),y?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y.message})}):null,m?i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${h.client_name??h.client_id}`,children:[i.jsxs("p",{children:["Revoke ",i.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:g,children:g?"Revoking…":"Revoke"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:g,children:"Cancel"})]})]}):null]}),m?null:i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",grant:h}),"aria-label":`Revoke ${h.client_name??h.client_id}`,children:"Revoke"})]},h.client_id)})})}function M0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}function z0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(!1),[g,y]=b.useState(null),m=b.useCallback(async()=>{try{const E=await Cm();r({kind:"ok",setting:E}),o(E.hub_origin??""),y(null)}catch(E){const z=E instanceof Error?E.message:String(E);r({kind:"error",message:z})}},[]);b.useEffect(()=>{m()},[m]);async function v(E){if(E.preventDefault(),f||l.kind!=="ok")return;const z=c.trim(),q=z.length===0?null:z;h(!0),y(null);try{await Xh(q),await m()}catch(H){const Q=H instanceof Error?H.message:String(H);y(Q)}finally{h(!1)}}async function x(){if(!f&&l.kind==="ok"){h(!0),y(null);try{await Xh(null),await m()}catch(E){const z=E instanceof Error?E.message:String(E);y(z)}finally{h(!1)}}}if(l.kind==="loading")return i.jsx("div",{className:"empty",children:"Loading settings…"});if(l.kind==="error")return i.jsxs("div",{className:"empty",children:["Failed to load settings: ",l.message,"."," ",i.jsx("button",{type:"button",onClick:()=>void m(),children:"Retry"})]});const{setting:j}=l,_=j.hub_origin!==null,k=c.trim()!==(j.hub_origin??"");return i.jsxs("section",{className:"settings",children:[i.jsx("h1",{children:"Hub settings"}),i.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),i.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[i.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),i.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[i.jsx("dt",{children:"Current value"}),i.jsxs("dd",{children:[i.jsx("code",{children:j.resolved_issuer})," ",i.jsx(U0,{source:j.source,hasStored:_})]})]}),i.jsxs("form",{onSubmit:E=>void v(E),className:"settings-form","data-testid":"hub-origin-form",children:[i.jsxs("label",{htmlFor:"hub-origin-input",children:[i.jsx("span",{children:"Canonical URL"}),i.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:c,disabled:f,onChange:E=>o(E.target.value),autoComplete:"off",spellCheck:!1})]}),i.jsxs("p",{className:"muted",children:["Set this when you've attached a custom domain. Tokens are minted against this URL — changing it invalidates any tokens already in circulation (the ",i.jsx("code",{children:"iss"})," claim won't match the new issuer on verification). Leave blank to use the request origin (default for Render-assigned URLs)."]}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:f||!k,children:f?"Saving…":"Save"}),i.jsx("button",{type:"button",className:"destructive",disabled:f||!_,onClick:()=>void x(),children:"Reset to default"})]}),g&&i.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:g})]})]}),i.jsx(O0,{})]})}function O0(){const[l,r]=b.useState(null),[c,o]=b.useState(null),[f,h]=b.useState(null),[g,y]=b.useState(""),[m,v]=b.useState(""),[x,j]=b.useState(""),[_,k]=b.useState("15"),[E,z]=b.useState(!1),[q,H]=b.useState(null),[Q,Z]=b.useState(null),P=b.useCallback(async()=>{try{const[te,le]=await Promise.all([Sc(),jm()]);r(te),o(le.hasSession?le.csrf:null),k(String(Math.round(te.idle_seconds/60))),h(null)}catch(te){h(te instanceof Error?te.message:String(te))}},[]);b.useEffect(()=>{P()},[P]);function J(){const te=Number.parseInt(_,10);if(Number.isFinite(te))return Math.max(1,te)*60}async function $(te){if(te.preventDefault(),!(E||!c)){if(H(null),Z(null),!/^[0-9]{4,12}$/.test(g)){H("PIN must be 4–12 digits.");return}if(g!==m){H("PINs don't match.");return}z(!0);try{await k1(c,g,J()),y(""),v(""),Z("Screen lock enabled."),await P()}catch(le){H(le instanceof Error?le.message:String(le))}finally{z(!1)}}}async function w(te){if(te.preventDefault(),!(E||!c)){if(H(null),Z(null),!/^[0-9]{4,12}$/.test(g)){H("New PIN must be 4–12 digits.");return}if(g!==m){H("PINs don't match.");return}z(!0);try{await _1(c,g,x||void 0,J()),y(""),v(""),j(""),Z("PIN updated."),await P()}catch(le){H(le instanceof Error?le.message:String(le))}finally{z(!1)}}}async function U(){if(!(E||!c)){H(null),Z(null),z(!0);try{await A1(c,x||void 0),j(""),Z("Screen lock disabled."),await P()}catch(te){H(te instanceof Error?te.message:String(te))}finally{z(!1)}}}const X=(l==null?void 0:l.configured)??!1;return i.jsxs("section",{className:"settings-block","aria-labelledby":"admin-lock-heading","data-testid":"admin-lock-settings",children:[i.jsx("h2",{id:"admin-lock-heading",children:"Admin screen lock"}),i.jsxs("p",{className:"muted",children:["An optional PIN that locks the whole admin console after a period of inactivity — a phone-style lock for a remotely-exposed hub. Off by default; the OAuth flow for your connected apps is never affected. ",i.jsx("strong",{children:"Note:"})," this guards the exposed web portal only — anyone with shell access to the box bypasses it (that's an OS / disk-encryption concern)."]}),f?i.jsxs("div",{className:"error","data-testid":"admin-lock-load-error",children:["Failed to load lock status: ",f,"."," ",i.jsx("button",{type:"button",onClick:()=>void P(),children:"Retry"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("p",{children:["Status:"," ",i.jsx("span",{className:`lock-status-pill ${X?"lock-status-on":"lock-status-off"}`,"data-testid":"admin-lock-status-pill",children:X?"Enabled":"Off"})]}),X?i.jsxs("form",{onSubmit:te=>void w(te),className:"lock-settings-form",children:[i.jsxs("label",{children:["Current PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:x,disabled:E,onChange:te=>j(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-current-pin"})]}),i.jsxs("label",{children:["New PIN (4–12 digits)",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:g,disabled:E,onChange:te=>y(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-new-pin"})]}),i.jsxs("label",{children:["Confirm new PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:m,disabled:E,onChange:te=>v(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-new-pin2"})]}),i.jsxs("label",{children:["Lock after (minutes idle)",i.jsx("input",{type:"number",min:1,max:1440,value:_,disabled:E,onChange:te=>k(te.target.value),"data-testid":"admin-lock-idle"})]}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:E,"data-testid":"admin-lock-change",children:E?"Saving…":"Update PIN"}),i.jsx("button",{type:"button",className:"destructive",disabled:E,onClick:()=>void U(),"data-testid":"admin-lock-remove",children:"Remove lock"})]})]}):i.jsxs("form",{onSubmit:te=>void $(te),className:"lock-settings-form",children:[i.jsxs("label",{children:["PIN (4–12 digits)",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:g,disabled:E,onChange:te=>y(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-set-pin"})]}),i.jsxs("label",{children:["Confirm PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:m,disabled:E,onChange:te=>v(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-set-pin2"})]}),i.jsxs("label",{children:["Lock after (minutes idle)",i.jsx("input",{type:"number",min:1,max:1440,value:_,disabled:E,onChange:te=>k(te.target.value),"data-testid":"admin-lock-idle"})]}),i.jsx("div",{className:"actions",children:i.jsx("button",{type:"submit",disabled:E,"data-testid":"admin-lock-enable",children:E?"Saving…":"Enable screen lock"})})]}),q&&i.jsx("div",{className:"error","data-testid":"admin-lock-form-error",children:q}),Q&&i.jsx("p",{className:"muted","data-testid":"admin-lock-notice",children:Q})]})]})}function U0({source:l,hasStored:r}){return l==="settings"?i.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):l==="env"?i.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",i.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):l==="expose"?i.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from your ",i.jsx("code",{children:"parachute expose"})," config"]}):i.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const nc={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function D0(){const[l,r]=vm(),c=L0(l.get("status")),o=q0(l.get("source")),[f,h]=b.useState({kind:"loading"}),[g,y]=b.useState(0),[m,v]=b.useState({kind:"idle"}),[x,j]=b.useState(nc),[_,k]=b.useState({kind:"idle"}),[E,z]=b.useState(!1),[q,H]=b.useState(!1);function Q(w,U){r(X=>{const te=new URLSearchParams(X);return U==="all"?te.delete(w):te.set(w,U),te},{replace:!0})}b.useEffect(()=>{let w=!1;return h({kind:"loading"}),Zh(Kh(c,o)).then(U=>{w||h({kind:"ok",tokens:U.tokens,nextCursor:U.next_cursor})}).catch(U=>{if(w)return;const X=U instanceof Error?U.message:String(U);h({kind:"error",message:X})}),()=>{w=!0}},[g,c,o]);async function Z(){if(f.kind!=="ok"||!f.nextCursor||q)return;const w={...Kh(c,o),cursor:f.nextCursor};H(!0);try{const U=await Zh(w);h({kind:"ok",tokens:[...f.tokens,...U.tokens],nextCursor:U.next_cursor})}catch(U){const X=U instanceof Error?U.message:String(U);h({kind:"error",message:X})}finally{H(!1)}}async function P(w){w.preventDefault();const U=x.scope.trim();if(U.length===0){v({kind:"error",message:"scope is required"});return}let X;if(x.permissions.trim().length>0)try{const le=JSON.parse(x.permissions);if(le===null||typeof le!="object"||Array.isArray(le)){v({kind:"error",message:'permissions must be a JSON object (e.g. {"vault":{"default":...}})'});return}X=le}catch(le){const ie=le instanceof Error?le.message:String(le);v({kind:"error",message:`permissions is not valid JSON — ${ie}`});return}let te;if(x.expiresIn.trim().length>0){const le=Number(x.expiresIn);if(!Number.isInteger(le)||le<=0){v({kind:"error",message:"expires_in must be a positive integer (seconds)"});return}te=le}v({kind:"submitting"});try{const le=await Sm({scope:U,...x.audience.trim()?{audience:x.audience.trim()}:{},...te!==void 0?{expires_in:te}:{},...x.subject.trim()?{subject:x.subject.trim()}:{},...X?{permissions:X}:{}});v({kind:"minted",token:le}),j(nc),z(!1),y(ie=>ie+1)}catch(le){const ie=le instanceof V?`mint failed (${le.status}): ${le.message}`:le instanceof Error?le.message:String(le);v({kind:"error",message:ie})}}async function J(w){k({kind:"revoking",jti:w});try{await l1(w),k({kind:"idle"}),y(U=>U+1)}catch(U){const X=U instanceof V?`revoke failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);k({kind:"error",jti:w,message:X})}}function $(w){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(w)}return i.jsxs("div",{children:[i.jsxs("div",{className:"list-header",children:[i.jsx("h1",{children:"Tokens"}),i.jsx("button",{type:"button",onClick:()=>z(w=>!w),children:E?"Hide form":"Mint new token"})]}),i.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",i.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",i.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),m.kind==="minted"?i.jsxs("div",{className:"mint-banner",children:[i.jsx("h3",{children:"Minted"}),i.jsxs("p",{children:["Your new access token (jti: ",i.jsx("code",{children:m.token.jti}),"):"]}),i.jsx("div",{className:"token-box",children:i.jsx("code",{children:m.token.token})}),i.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"button",onClick:()=>$(m.token.token),children:"Copy"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Dismiss"})]})]}):null,E?i.jsx("div",{className:"section",children:i.jsxs("form",{onSubmit:P,children:[i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),i.jsx("input",{id:"mint-scope",type:"text",value:x.scope,onChange:w=>j({...x,scope:w.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),i.jsxs("div",{className:"field-hint",children:["Space-separated ",i.jsx("code",{children:"resource:verb"})," or ",i.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),i.jsx("input",{id:"mint-audience",type:"text",value:x.audience,onChange:w=>j({...x,audience:w.target.value}),placeholder:"inferred from scope when blank"}),i.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",i.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",i.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",i.jsx("code",{children:"hub"}),"."]})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),i.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:x.expiresIn,onChange:w=>j({...x,expiresIn:w.target.value}),placeholder:"default 90d (7776000)"})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),i.jsx("input",{id:"mint-subject",type:"text",value:x.subject,onChange:w=>j({...x,subject:w.target.value}),placeholder:"defaults to operator's sub"})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),i.jsx("textarea",{id:"mint-permissions",value:x.permissions,onChange:w=>j({...x,permissions:w.target.value}),placeholder:'e.g. {"vault":{"default":{"write_tags":["health"]}}}',rows:3,style:{width:"100%",fontFamily:"monospace",fontSize:"0.9rem"}})]}),m.kind==="error"?i.jsx("div",{className:"field-error",children:i.jsx("code",{children:m.message})}):null,i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:m.kind==="submitting",children:m.kind==="submitting"?"Minting…":"Mint"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>{z(!1),j(nc),v({kind:"idle"})},children:"Cancel"})]})]})}):null,i.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[i.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Status:"}),[{value:"all",label:"Show all"},{value:"live",label:"Live only"},{value:"revoked",label:"Revoked only"}].map(w=>i.jsx("button",{type:"button",onClick:()=>Q("status",w.value),className:c===w.value?void 0:"secondary","aria-pressed":c===w.value,children:w.label},w.value))]}),i.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[i.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Source:"}),[{value:"all",label:"All sources"},{value:"oauth_refresh",label:"OAuth"},{value:"operator_mint",label:"Operator"},{value:"cli_mint",label:"CLI mint"}].map(w=>i.jsx("button",{type:"button",onClick:()=>Q("source",w.value),className:o===w.value?void 0:"secondary","aria-pressed":o===w.value,children:w.label},w.value))]}),H0({list:f,revoke:_,setRevoke:k,onConfirm:J,onLoadMore:Z,onRetry:()=>y(w=>w+1),loadingMore:q,filtersActive:c!=="all"||o!=="all"})]})}function H0({list:l,revoke:r,setRevoke:c,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:g,filtersActive:y}){return l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):l.tokens.length===0?y?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),i.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No tokens."}),i.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",i.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):i.jsxs("div",{"data-route-content":"true",children:[l.tokens.map(m=>{const v=B0(m),x=r.kind==="revoking"&&r.jti===m.jti,j=r.kind==="confirming"&&r.jti===m.jti,_=r.kind==="error"&&r.jti===m.jti?r:null,k=m.user_id??m.subject??"(unknown)";return i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsxs("div",{className:"name",children:[i.jsx("code",{title:m.jti,children:ms(m.jti)}),i.jsx("span",{className:`tag${v==="live"?"":" muted"}`,children:v}),i.jsx("span",{className:`tag source-${G0(m.created_via)}`,title:`created_via: ${m.created_via}`,children:Y0(m.created_via)})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"identity: "}),i.jsx("code",{children:k}),m.client_id?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"muted",children:" · client: "}),i.jsx("code",{children:m.client_id})]}):null]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"scope: "}),m.scopes.map((E,z)=>i.jsxs("span",{children:[i.jsx("code",{children:E}),z<m.scopes.length-1?" ":null]},E))]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[i.jsx("span",{className:"muted",children:"created "}),i.jsx("code",{title:m.created_at,children:lc(m.created_at)}),i.jsx("span",{className:"muted",children:" · expires "}),i.jsx("code",{title:m.expires_at,children:lc(m.expires_at)}),m.revoked_at?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"muted",children:" · revoked "}),i.jsx("code",{title:m.revoked_at,children:lc(m.revoked_at)})]}):null]}),m.permissions?i.jsxs("details",{style:{marginTop:"0.35rem"},children:[i.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),i.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(m.permissions,null,2)})]}):null,_?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:_.message})}):null,j?i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${ms(m.jti)}`,children:[i.jsxs("p",{children:["Revoke ",i.jsx("code",{children:ms(m.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{o(m.jti)},disabled:x,children:x?"Revoking…":"Revoke"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:x,children:"Cancel"})]})]}):null]}),!j&&v==="live"?i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",jti:m.jti}),"aria-label":`Revoke ${ms(m.jti)}`,children:"Revoke"}):null]},m.jti)}),l.nextCursor?i.jsx("div",{style:{marginTop:"1rem"},children:i.jsx("button",{type:"button",className:"secondary",disabled:g,onClick:()=>{f()},children:g?"Loading…":"Load more"})}):null]})}function B0(l){if(l.revoked_at)return"revoked";const r=new Date(l.expires_at).getTime();return!Number.isNaN(r)&&r<Date.now()?"expired":"live"}function L0(l){return l==="live"||l==="revoked"||l==="all"?l:"all"}function q0(l){return l==="oauth_refresh"||l==="operator_mint"||l==="cli_mint"||l==="all"?l:"all"}function Kh(l,r){const c={};return l==="live"?c.revoked="false":l==="revoked"?c.revoked="true":c.revoked="all",r!=="all"&&(c.createdVia=r),c}function Y0(l){switch(l){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return l}}function G0(l){switch(l){case"oauth_refresh":return"oauth";case"operator_mint":return"operator";case"cli_mint":return"cli";default:return"unknown"}}function ms(l){return l.length<=14?l:`${l.slice(0,8)}…${l.slice(-4)}`}function lc(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const V0=1440*60;function Z0(l){return l.provision_vault?"owner (new vault)":l.vault_name===null?"account only":l.role==="read"?"read-only (shared)":"read & write (shared)"}function Fh(l){const r=l.username!==null?`an account for "${l.username}"`:"an account (they pick the username)";if(l.provision_vault){const o=l.vault_name!==null?`their own new vault "${l.vault_name}"`:"their own new vault (they name it)";return`Creates ${r} + ${o}, as owner.`}if(l.vault_name===null)return`Creates ${r} with no vault access yet.`;const c=l.role==="read"?"read-only":"read & write";return`Creates ${r} with ${c} access to your existing vault "${l.vault_name}".`}function X0(l,r,c){const o=l.username!==null?` Your username will be "${l.username}".`:"",f=l.provision_vault?l.vault_name!==null?` You'll get your own new vault ("${l.vault_name}").`:" You'll get your own new vault.":l.vault_name!==null?` You'll get ${l.role==="read"?"read-only":"read & write"} access to the vault "${l.vault_name}".`:"",h=new Date(c).toLocaleDateString();return`You're invited to my Parachute. Open this link to set your password and claim your account.${o}${f} The link works once and expires ${h}: ${r}`}function Q0({hubOrigin:l}){const[r,c]=b.useState({kind:"loading"}),[o,f]=b.useState(0),[h,g]=b.useState(""),[y,m]=b.useState("provision"),[v,x]=b.useState(""),[j,_]=b.useState(""),[k,E]=b.useState("read"),[z,q]=b.useState([]),[H,Q]=b.useState("7"),[Z,P]=b.useState({kind:"idle"}),[J,$]=b.useState(null),[w,U]=b.useState(null),X={username:h.trim()!==""?h.trim():null,vault_name:y==="share"?j!==""?j:null:v.trim()!==""?v.trim():null,role:y==="share"?k:"write",provision_vault:y==="provision"};b.useEffect(()=>{let W=!1;return c({kind:"loading"}),Promise.all([x1(),Nm()]).then(([ge,be])=>{W||(c({kind:"ok",invites:ge}),q(be))}).catch(ge=>{W||c({kind:"error",message:ge instanceof Error?ge.message:String(ge)})}),()=>{W=!0}},[o]);async function te(W){if(W.preventDefault(),Z.kind==="submitting")return;if(y==="share"&&j===""){P({kind:"error",message:"Pick which existing vault to share before creating the invite."});return}P({kind:"submitting"}),$(null);const ge=Number.parseInt(H,10),be={...h.trim()!==""?{username:h.trim()}:{},...Number.isFinite(ge)&&ge>0?{expires_in:ge*V0}:{},...y==="share"?{vault_name:j,provision_vault:!1,role:k}:{...v.trim()!==""?{vault_name:v.trim()}:{},provision_vault:!0}};try{const D=await j1(be);P({kind:"created",result:D}),g(""),x(""),_(""),f(F=>F+1)}catch(D){P({kind:"error",message:D instanceof Error?D.message:String(D)})}}async function le(W){if(!w){U(W);try{await S1(W),f(ge=>ge+1)}catch(ge){c({kind:"error",message:ge instanceof Error?ge.message:String(ge)})}finally{U(null)}}}function ie(W,ge){var be;(be=navigator.clipboard)==null||be.writeText(W).then(()=>{$(ge),setTimeout(()=>$(null),2e3)})}return i.jsxs("section",{style:{marginTop:"2rem"},"data-testid":"invites-section",children:[i.jsx("div",{className:"list-header",children:i.jsx("h2",{children:"Invite links"})}),i.jsx("p",{className:"muted",children:"Generate a one-time, expiring link. The recipient opens it and picks their password — no admin-typed default password. Either provision them a new vault of their own, or share an existing vault read-only or read & write. Pre-naming the username makes the link a named deliverable (the recipient can't change it)."}),i.jsxs("form",{onSubmit:W=>void te(W),style:{marginBottom:"1rem"},children:[i.jsxs("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap",alignItems:"flex-end"},children:[i.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[i.jsx("span",{className:"field-label",children:"Username (optional)"}),i.jsx("input",{type:"text",value:h,onChange:W=>g(W.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",minLength:2,maxLength:32,autoComplete:"off",spellCheck:!1})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 14rem"},children:[i.jsx("span",{className:"field-label",children:"Vault access"}),i.jsxs("select",{value:y,onChange:W=>m(W.target.value==="share"?"share":"provision"),children:[i.jsx("option",{value:"provision",children:"Create a new vault for them"}),i.jsx("option",{value:"share",children:"Share an existing vault"})]})]}),y==="provision"?i.jsxs("label",{className:"field",style:{flex:"1 1 12rem"},children:[i.jsx("span",{className:"field-label",children:"New vault name (optional)"}),i.jsx("input",{type:"text",value:v,onChange:W=>x(W.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",autoComplete:"off",spellCheck:!1})]}):i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[i.jsx("span",{className:"field-label",children:"Vault"}),i.jsxs("select",{value:j,onChange:W=>_(W.target.value),required:!0,children:[i.jsx("option",{value:"",children:"Pick a vault…"}),z.map(W=>i.jsx("option",{value:W,children:W},W))]})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 9rem"},children:[i.jsx("span",{className:"field-label",children:"Role"}),i.jsxs("select",{value:k,onChange:W=>E(W.target.value==="write"?"write":"read"),children:[i.jsx("option",{value:"read",children:"Read-only"}),i.jsx("option",{value:"write",children:"Read & write"})]})]})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 8rem"},children:[i.jsx("span",{className:"field-label",children:"Expires (days)"}),i.jsx("input",{type:"number",min:1,max:90,value:H,onChange:W=>Q(W.target.value)})]}),i.jsx("button",{type:"submit",disabled:Z.kind==="submitting",children:Z.kind==="submitting"?"Creating…":"Create invite"})]}),i.jsx("p",{className:"muted",style:{marginTop:"0.5rem"},"data-testid":"invite-preview",children:y==="share"&&j===""?"Pick the existing vault to share to finish configuring this link.":Fh(X)})]}),Z.kind==="error"&&i.jsx("div",{className:"error-banner",style:{marginBottom:"1rem"},children:Z.message}),Z.kind==="created"&&i.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"1rem"},children:[i.jsx("strong",{children:"Invite created."})," ",Fh(Z.result.invite),i.jsx("br",{}),`Copy it now — the link is shown only once and can't be retrieved later (the hub stores only a hash). "Copy message" includes a ready-to-send note telling the recipient what the link does.`,i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("code",{style:{wordBreak:"break-all",flex:"1 1 16rem"},children:Z.result.url}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>ie(Z.result.url,"link"),children:J==="link"?"Copied!":"Copy link"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>ie(X0(Z.result.invite,Z.result.url,Z.result.invite.expires_at),"message"),children:J==="message"?"Copied!":"Copy message"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>P({kind:"idle"}),children:"Dismiss"})]})]}),r.kind==="loading"&&i.jsx("p",{className:"muted",children:"Loading invites…"}),r.kind==="error"&&i.jsxs("div",{className:"error-banner",children:[r.message,i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>f(W=>W+1),children:"Retry"})})]}),r.kind==="ok"&&r.invites.length===0&&i.jsx("p",{className:"muted",children:"No invites yet."}),r.kind==="ok"&&r.invites.length>0&&i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"user-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"For"}),i.jsx("th",{children:"Vault"}),i.jsx("th",{children:"Access"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Expires"}),i.jsx("th",{children:"Created"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:r.invites.map(W=>i.jsxs("tr",{children:[i.jsx("td",{children:W.username??i.jsx("span",{className:"muted",children:"they choose"})}),i.jsx("td",{children:W.vault_name??i.jsx("span",{className:"muted",children:"redeemer chooses"})}),i.jsx("td",{children:Z0(W)}),i.jsx("td",{children:i.jsx("span",{className:`status status-${W.status}`,children:W.status})}),i.jsx("td",{className:"muted",children:new Date(W.expires_at).toLocaleDateString()}),i.jsx("td",{className:"muted",children:new Date(W.created_at).toLocaleDateString()}),i.jsx("td",{children:W.status==="pending"?i.jsx("button",{type:"button",className:"secondary",disabled:w===W.id,onClick:()=>void le(W.id),children:w===W.id?"Revoking…":"Revoke"}):null})]},W.id))})]})}),l?i.jsxs("p",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Redemption links are served from ",i.jsxs("code",{children:[l,"/account/setup/<token>"]}),"."]}):null]})}const Ba=12,$0=/^[a-z0-9_-]+$/,bs=2,xs=32,Wh={username:"",password:"",assignedVaults:[]};function km({username:l,hubOrigin:r}){const c=`${r||""}/login`;return i.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",i.jsx("code",{children:c})," with username ",i.jsx("code",{children:l})," and this password — they'll be prompted to set a new one on first sign-in."]})}function J0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState(!1),[g,y]=b.useState(Wh),[m,v]=b.useState({kind:"idle"}),[x,j]=b.useState({kind:"idle"}),[_,k]=b.useState({kind:"idle"}),[E,z]=b.useState({kind:"idle"});b.useEffect(()=>{let J=!1;return r({kind:"loading"}),Promise.all([h1(),Nm(),Cm()]).then(([$,w,U])=>{if(J)return;const X=U.resolved_issuer.replace(/\/+$/,"");r({kind:"ok",data:{users:$,vaults:w,hubOrigin:X}})}).catch($=>{if(J)return;const w=$ instanceof Error?$.message:String($);r({kind:"error",message:w})}),()=>{J=!0}},[c]);function q(J){return J.username.length<bs||J.username.length>xs?`Username must be ${bs}-${xs} characters.`:$0.test(J.username)?J.password.length<Ba?`Password must be at least ${Ba} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function H(J){J.preventDefault();const $=q(g);if($){v({kind:"error",message:$});return}v({kind:"submitting"});const w={username:g.username,password:g.password,assignedVaults:g.assignedVaults};try{const U=await m1(w);y(Wh),v({kind:"created",username:U.username}),o(X=>X+1)}catch(U){const X=U instanceof V?`Create failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);v({kind:"error",message:X})}}async function Q(J){j({kind:"deleting",userId:J.id});try{const{revocationLagSeconds:$}=await p1(J.id);j({kind:"done",username:J.username,revocationLagSeconds:$}),o(w=>w+1)}catch($){const w=$ instanceof V?`Delete failed (${$.status}): ${$.message}`:$ instanceof Error?$.message:String($);j({kind:"error",userId:J.id,message:w})}}async function Z(J,$){z({kind:"submitting",userId:J.id,selected:$});try{await v1(J.id,$),z({kind:"done",userId:J.id,username:J.username}),o(w=>w+1)}catch(w){const U=w instanceof V?`Edit vaults failed (${w.status}): ${w.message}`:w instanceof Error?w.message:String(w);z({kind:"error",userId:J.id,selected:$,message:U})}}async function P(J,$){if($.length<Ba){k({kind:"error",userId:J.id,password:$,message:`Password must be at least ${Ba} characters.`});return}k({kind:"submitting",userId:J.id,password:$});try{const{revocationLagSeconds:w}=await g1(J.id,$);k({kind:"done",userId:J.id,username:J.username,revocationLagSeconds:w}),o(U=>U+1)}catch(w){const U=w instanceof V?`Reset failed (${w.status}): ${w.message}`:w instanceof Error?w.message:String(w);k({kind:"error",userId:J.id,password:$,message:U})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Users"})}),i.jsxs("p",{className:"muted",children:["Hub user accounts. Each user can be a member of one or more vaults — the OAuth issuer narrows their tokens to ",i.jsx("code",{children:"vault:<assigned>:*"})," scopes for any vault in their list. Users with no assignments can't authorize any vault yet — assign at least one above. The first admin is unrestricted (admin posture). Admin-created users land with a default password and are prompted to change it on first sign-in",l.kind==="ok"?i.jsxs(i.Fragment,{children:[" ","at ",i.jsxs("code",{children:[l.data.hubOrigin,"/login"]})]}):null,"."]}),x.kind==="done"&&i.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",i.jsx("code",{children:x.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",x.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",i.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>j({kind:"idle"}),children:"Dismiss"})})]}),K0(l,x,j,Q,_,k,P,E,z,Z,l.kind==="ok"?l.data.vaults:[],l.kind==="ok"?l.data.hubOrigin:"",()=>o(J=>J+1)),l.kind==="ok"&&i.jsx(P0,{show:f,setShow:h,form:g,setForm:y,vaults:l.data.vaults,hubOrigin:l.data.hubOrigin,createState:m,setCreateState:v,onSubmit:H}),l.kind==="ok"&&i.jsx(Q0,{hubOrigin:l.data.hubOrigin}),l.kind==="ok"&&i.jsx(tb,{})]})}function K0(l,r,c,o,f,h,g,y,m,v,x,j,_){var z;if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading users…"});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:_,className:"secondary",children:"Retry"})]});const{users:k}=l.data;if(k.length===0)return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No users yet."}),i.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const E=(z=k[0])==null?void 0:z.id;return i.jsx(F0,{users:k,firstAdminId:E,deleteSt:r,setDeleteSt:c,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:g,editVaultsSt:y,setEditVaultsSt:m,onSubmitEditVaults:v,availableVaults:x,hubOrigin:j})}function F0({users:l,firstAdminId:r,deleteSt:c,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:g,onSubmitReset:y,editVaultsSt:m,setEditVaultsSt:v,onSubmitEditVaults:x,availableVaults:j,hubOrigin:_}){return i.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"user-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:"Username"}),i.jsx("th",{scope:"col",children:"Email"}),i.jsx("th",{scope:"col",children:"Role"}),i.jsx("th",{scope:"col",children:"Assigned vaults"}),i.jsx("th",{scope:"col",children:"Password set"}),i.jsx("th",{scope:"col",children:"Created"}),i.jsx("th",{scope:"col",children:"Actions"})]})}),i.jsx("tbody",{children:l.map(k=>{const E=k.id===r,z=c.kind==="deleting"&&c.userId===k.id,q=c.kind==="confirming"&&c.user.id===k.id,H=c.kind==="error"&&c.userId===k.id?c:null,Q=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===k.id?h:null,Z=h.kind==="done"&&h.userId===k.id?h:null,P=(m.kind==="open"||m.kind==="submitting"||m.kind==="error")&&m.userId===k.id?m:null,J=m.kind==="done"&&m.userId===k.id?m:null;return i.jsxs("tr",{"data-user-id":k.id,children:[i.jsxs("td",{children:[i.jsx("code",{children:k.username}),E&&i.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),i.jsx("td",{children:k.email?k.email.includes("@")?i.jsx("a",{href:`mailto:${k.email}`,children:k.email}):i.jsx("span",{children:k.email}):i.jsx("span",{className:"muted",title:"No email on file (account predates signup-email capture)",children:"—"})}),i.jsx("td",{children:E?i.jsx("span",{className:"badge",children:"admin"}):i.jsx("span",{className:"muted",children:"member"})}),i.jsx("td",{children:k.assigned_vaults.length>0?i.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:k.assigned_vaults.map($=>i.jsx("code",{children:$},$))}):i.jsx("span",{className:"muted",title:E?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),i.jsx("td",{children:k.password_changed?i.jsx("span",{"aria-label":"changed",children:"✓"}):i.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),i.jsx("td",{children:i.jsx("span",{title:k.created_at,children:_m(k.created_at)})}),i.jsxs("td",{children:[q?null:i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[E&&i.jsxs(i.Fragment,{children:[i.jsx("span",{id:`first-admin-tooltip-${k.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),i.jsx("span",{id:`first-admin-reset-tooltip-${k.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),i.jsx("span",{id:`first-admin-vaults-tooltip-${k.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),i.jsx("button",{type:"button",className:"secondary",disabled:E||P!==null||m.kind==="submitting"&&m.userId===k.id,title:E?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":E?`first-admin-vaults-tooltip-${k.id}`:void 0,onClick:()=>v({kind:"open",userId:k.id,selected:[...k.assigned_vaults]}),"aria-label":`Edit vaults for ${k.username}`,children:"Edit vaults"}),i.jsx("button",{type:"button",className:"secondary",disabled:E||Q!==null||h.kind==="submitting"&&h.userId===k.id,title:E?"First admin uses /account/change-password directly":void 0,"aria-describedby":E?`first-admin-reset-tooltip-${k.id}`:void 0,onClick:()=>g({kind:"open",userId:k.id,password:""}),"aria-label":`Reset password for ${k.username}`,children:"Reset password"}),i.jsx("button",{type:"button",className:"secondary",disabled:E||z,title:E?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":E?`first-admin-tooltip-${k.id}`:void 0,onClick:()=>o({kind:"confirming",user:k}),"aria-label":`Delete ${k.username}`,children:z?"Deleting…":"Delete"})]}),q&&i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${k.username}`,children:[i.jsxs("p",{children:["Delete ",i.jsx("code",{children:k.username}),"? This revokes their tokens, drops their sessions and grants, and removes the account. The audit trail is preserved — tokens stay with ",i.jsx("code",{children:"revoked_at"})," set, anonymised."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(k)},disabled:z,children:z?"Deleting…":"Delete"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:z,children:"Cancel"})]})]}),H&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:H.message})}),Q&&i.jsx(W0,{user:k,state:Q,onCancel:()=>g({kind:"idle"}),onPasswordChange:$=>g({kind:"open",userId:k.id,password:$}),onSubmit:$=>{y(k,$)}}),Z&&i.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",i.jsx("code",{children:Z.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",i.jsx(km,{username:Z.username,hubOrigin:_}),i.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Their existing tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",Z.revocationLagSeconds," ","seconds — if you're resetting because of a suspected compromise, also restart the affected services (e.g. ",i.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})})]}),P&&i.jsx(I0,{user:k,state:P,availableVaults:j,onCancel:()=>v({kind:"idle"}),onSelectedChange:$=>v({kind:"open",userId:k.id,selected:$}),onSubmit:$=>{x(k,$)}}),J&&i.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",i.jsx("code",{children:J.username}),".",i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Dismiss"})})]})]})]},k.id)})})]})})})}function W0({user:l,state:r,onCancel:c,onPasswordChange:o,onSubmit:f}){const h=r.kind==="submitting",g=r.kind==="error"?r.message:null,y=`reset-password-input-${l.id}`;return i.jsxs("form",{onSubmit:m=>{m.preventDefault(),f(r.password)},"aria-label":`Reset password for ${l.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[i.jsxs("p",{style:{margin:0},children:[i.jsxs("label",{htmlFor:y,children:["New temporary password for ",i.jsx("code",{children:l.username})," ",i.jsxs("span",{className:"muted",children:["(min ",Ba," chars)"]})]}),i.jsx("br",{}),i.jsx("input",{id:y,type:"password",required:!0,autoComplete:"new-password",minLength:Ba,value:r.password,disabled:h,onChange:m=>o(m.target.value)})]}),g&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:g})}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),i.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}function I0({user:l,state:r,availableVaults:c,onCancel:o,onSelectedChange:f,onSubmit:h}){const g=r.kind==="submitting",y=r.kind==="error"?r.message:null,m=`edit-vaults-select-${l.id}`;function v(x){const j=Array.from(x.target.selectedOptions).map(_=>_.value);f(j)}return i.jsxs("form",{onSubmit:x=>{x.preventDefault(),h(r.selected)},"aria-label":`Edit vaults for ${l.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[i.jsx("p",{style:{margin:0},children:i.jsxs("label",{htmlFor:m,children:["Vault assignments for ",i.jsx("code",{children:l.username})," ",i.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),r.selected.length>0&&i.jsx("div",{"data-testid":`edit-vaults-chips-${l.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:r.selected.map(x=>i.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:x},x))}),i.jsx("select",{id:m,multiple:!0,value:r.selected,onChange:v,disabled:g,size:Math.min(Math.max(c.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:c.map(x=>i.jsx("option",{value:x,children:x},x))}),c.length===0&&i.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),y&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:y})}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:g,children:g?"Saving…":"Save vault assignments"}),i.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:g,children:"Cancel"})]})]})}function P0({show:l,setShow:r,form:c,setForm:o,vaults:f,hubOrigin:h,createState:g,setCreateState:y,onSubmit:m}){const v=g.kind==="submitting";return i.jsx("section",{style:{marginTop:"1.5rem"},children:l?i.jsxs("form",{onSubmit:x=>void m(x),"aria-label":"Create user",children:[i.jsx("h3",{children:"Create user"}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",i.jsxs("span",{className:"muted",children:["(",bs,"-",xs," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),i.jsx("br",{}),i.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:c.username,minLength:bs,maxLength:xs,pattern:"[a-z0-9_\\-]+",onChange:x=>o({...c,username:x.target.value})})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-password",children:["Password ",i.jsxs("span",{className:"muted",children:["(min ",Ba," chars)"]})]}),i.jsx("br",{}),i.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:c.password,minLength:Ba,onChange:x=>o({...c,password:x.target.value})})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",i.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),i.jsx("br",{}),c.assignedVaults.length>0&&i.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:c.assignedVaults.map(x=>i.jsx("code",{children:x},x))}),i.jsx("br",{}),i.jsx("select",{id:"new-user-vaults",multiple:!0,value:c.assignedVaults,onChange:x=>o({...c,assignedVaults:Array.from(x.target.selectedOptions).map(j=>j.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(x=>i.jsx("option",{value:x,children:x},x))}),f.length===0&&i.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),g.kind==="error"&&i.jsx("div",{className:"error-banner",children:i.jsx("code",{children:g.message})}),g.kind==="created"&&i.jsxs("output",{className:"success-banner",children:["User ",i.jsx("code",{children:g.username})," created. They'll be prompted to change their password on first sign-in.",i.jsx(km,{username:g.username,hubOrigin:h})]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:v,children:v?"Creating…":"Create user"}),i.jsx("button",{type:"button",className:"secondary",disabled:v,onClick:()=>{r(!1),y({kind:"idle"})},children:"Close"})]})]}):i.jsx("button",{type:"button",onClick:()=>r(!0),children:"Create User"})})}function _m(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const Am=1024*1024*1024;function eb(l){if(l===null)return"";const r=l/Am;return Number.isInteger(r)?String(r):r.toFixed(2)}function tb(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState({kind:"idle"});b.useEffect(()=>{let y=!1;return r({kind:"loading"}),y1().then(m=>{y||r({kind:"ok",caps:m})}).catch(m=>{if(y)return;const v=m instanceof Error?m.message:String(m);r({kind:"error",message:v})}),()=>{y=!0}},[c]);async function g(y,m){const v=Number(m);if(!Number.isFinite(v)||v<=0){h({kind:"error",vaultName:y,gibInput:m,message:"Cap must be a positive number of GB."});return}h({kind:"submitting",vaultName:y,gibInput:m});try{await b1(y,Math.round(v*Am)),h({kind:"idle"}),o(x=>x+1)}catch(x){const j=x instanceof V?`Set cap failed (${x.status}): ${x.message}`:x instanceof Error?x.message:String(x);h({kind:"error",vaultName:y,gibInput:m,message:j})}}return i.jsxs("section",{style:{marginTop:"1.5rem"},"data-testid":"vault-caps-section",children:[i.jsx("h2",{children:"Vault caps"}),i.jsx("p",{className:"muted",children:"Per-vault storage ceilings for this hub. Public-signup vaults are stamped with a default cap (~1 GB); admin-provisioned vaults are uncapped until you set one. Edit a cap to raise or lower a vault's ceiling."}),l.kind==="loading"&&i.jsx("p",{className:"muted",children:"Loading vault caps…"}),l.kind==="error"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load vault caps: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>o(y=>y+1),children:"Retry"})]}),l.kind==="ok"&&l.caps.length===0&&i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No vaults on this hub yet."}),i.jsx("p",{className:"muted",children:"Caps appear here once a vault is registered."})]}),l.kind==="ok"&&l.caps.length>0&&i.jsx("div",{className:"table-scroll",style:{marginTop:"1rem"},children:i.jsxs("table",{className:"user-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:"Vault"}),i.jsx("th",{scope:"col",children:"Cap"}),i.jsx("th",{scope:"col",children:"Updated"}),i.jsx("th",{scope:"col",children:"Actions"})]})}),i.jsx("tbody",{children:l.caps.map(y=>{const m=(f.kind==="open"||f.kind==="submitting"||f.kind==="error")&&f.vaultName===y.vault_name?f:null;return i.jsxs("tr",{"data-vault-name":y.vault_name,children:[i.jsx("td",{children:i.jsx("code",{children:y.vault_name})}),i.jsx("td",{"data-testid":`vault-cap-${y.vault_name}`,children:y.cap_bytes!==null?xm(y.cap_bytes):i.jsx("span",{className:"muted",title:"No cap set — this vault is uncapped",children:"uncapped"})}),i.jsx("td",{children:y.updated_at?i.jsx("span",{title:y.updated_at,children:_m(y.updated_at)}):i.jsx("span",{className:"muted",children:"—"})}),i.jsx("td",{children:m?i.jsx(ab,{vaultName:y.vault_name,state:m,onCancel:()=>h({kind:"idle"}),onChange:v=>h({kind:"open",vaultName:y.vault_name,gibInput:v}),onSubmit:v=>{g(y.vault_name,v)}}):i.jsx("button",{type:"button",className:"secondary",onClick:()=>h({kind:"open",vaultName:y.vault_name,gibInput:eb(y.cap_bytes)}),"aria-label":`Edit cap for ${y.vault_name}`,children:"Edit cap"})})]},y.vault_name)})})]})})]})}function ab({vaultName:l,state:r,onCancel:c,onChange:o,onSubmit:f}){const h=r.kind==="submitting",g=r.kind==="error"?r.message:null,y=`cap-input-${l}`;return i.jsxs("form",{onSubmit:m=>{m.preventDefault(),f(r.gibInput)},"aria-label":`Edit cap for ${l}`,style:{padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[i.jsxs("label",{htmlFor:y,children:["Cap for ",i.jsx("code",{children:l})," ",i.jsx("span",{className:"muted",children:"(GB)"})]}),i.jsx("br",{}),i.jsx("input",{id:y,type:"number",step:"0.01",value:r.gibInput,disabled:h,onChange:m=>o(m.target.value),style:{width:"8rem",marginTop:"0.25rem"}}),g&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:g})}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:h,children:h?"Saving…":"Save cap"}),i.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}const nb="https://parachute.computer/install#connect-mcp-clients";function Rm(l){return`${l.replace(/\/+$/,"")}/mcp`}function Mm(l,r){return`claude mcp add --transport http parachute-${l} ${Rm(r)}`}function lb(l,r,c){return`${Mm(l,r)} --header "Authorization: Bearer ${c}"`}function ic({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return i.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(l).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function ib({vaultName:l,vaultUrl:r,embedded:c=!1}){const o=Rm(r),f=Mm(l,r),[h,g]=b.useState(!1),[y,m]=b.useState({kind:"idle"});async function v(){if(y.kind!=="submitting"){m({kind:"submitting"});try{const _=await Sm({scope:`vault:${l}:read vault:${l}:write`});m({kind:"minted",token:_})}catch(_){const k=_ instanceof V?`mint failed (${_.status}): ${_.message}`:_ instanceof Error?_.message:String(_);m({kind:"error",message:k})}}}const x=y.kind==="minted"?lb(l,r,y.token.token):null,j=i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:"Connect an MCP client (or connector)"}),i.jsxs("p",{className:"muted",children:["Connect an MCP client — Claude Code, Claude.ai, etc. (sometimes called a connector in ChatGPT and other web UIs) — to the ",i.jsx("code",{children:l})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-endpoint",children:o}),i.jsx(ic,{value:o})]})]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-add-command",children:f}),i.jsx(ic,{value:f})]}),i.jsx("p",{className:"dim",children:"No token needed — the command triggers browser OAuth on first use (you sign in to this hub and approve access). For other clients, point them at the endpoint above."})]}),i.jsxs("details",{className:"mcp-token-path",open:h,onToggle:_=>g(_.currentTarget.open),children:[i.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),i.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",i.jsxs("code",{children:["vault:",l,":read vault:",l,":write"]})," ","— not admin) and pass it as a header. Revealed once; copy it now."]}),y.kind==="minted"&&x?i.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[i.jsx("h3",{children:"Token minted"}),i.jsxs("p",{className:"muted",children:["This is the only time the hub shows this token. Copy the command below — it embeds the live token in the ",i.jsx("code",{children:"Authorization"})," header."]}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-header-command",children:x}),i.jsx(ic,{value:x})]}),i.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",i.jsx("code",{children:"/admin/tokens"}),"."]})]}):i.jsx("div",{className:"actions",children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>{v()},disabled:y.kind==="submitting",children:y.kind==="submitting"?"Minting…":"Mint a token"})}),y.kind==="error"?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y.message})}):null]}),i.jsx("p",{className:"dim mcp-docs-link",children:i.jsx("a",{href:nb,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return c?i.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:j}):i.jsx("div",{className:"mcp-connect-card",children:j})}const Ih="/vault/admin/";function sb(){const[l,r]=b.useState("detecting"),[c,o]=b.useState({kind:"loading"}),[f,h]=b.useState(0),[g,y]=b.useState({kind:"idle"}),[m,v]=b.useState(null),[x,j]=b.useState({});b.useEffect(()=>{let E=!1;return Ns().then(z=>{if(E)return;const q=z.modules.find(H=>H.short==="vault");if(q!=null&&q.installed&&q.config_ui_url===Ih){r("redirecting"),window.location.replace(Ih);return}r("legacy")}).catch(()=>{E||r("legacy")}),()=>{E=!0}},[]);async function _(E){if(E.managementUrl){y({kind:"minting",name:E.name});try{const z=await bm(E.name),q=n1(E.url,E.managementUrl),H=q.includes("#")?"&":"#";window.location.assign(`${q}${H}token=${z.token}`)}catch(z){const q=z instanceof V?`mint failed (${z.status}): ${z.message}`:z instanceof Error?z.message:String(z);y({kind:"error",name:E.name,message:q})}}}if(b.useEffect(()=>{if(l!=="legacy")return;let E=!1;return jc().then(z=>{E||o({kind:"ok",vaults:z.vaults,moduleInstalled:z.moduleInstalled})}).catch(z=>{if(E)return;const q=z instanceof Error?z.message:String(z);o({kind:"error",message:q})}),()=>{E=!0}},[f,l]),b.useEffect(()=>{if(c.kind!=="ok")return;const E=c.vaults.map(q=>q.name);if(E.length===0)return;let z=!1;j(q=>{const H={...q};for(const Q of E)H[Q]||(H[Q]={kind:"loading"});return H});for(const q of E)Py(q).then(H=>{z||j(Q=>({...Q,[q]:{kind:"ok",usage:H}}))}).catch(()=>{z||j(H=>({...H,[q]:{kind:"error"}}))});return()=>{z=!0}},[c]),l!=="legacy")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsx("p",{className:"muted","data-testid":"vaults-detecting",children:l==="redirecting"?"Opening the vault admin…":"Loading…"})]});if(c.kind==="loading")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsx("p",{className:"muted",children:"Loading…"})]});if(c.kind==="error")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",i.jsx("code",{children:c.message})]}),i.jsx("button",{type:"button",onClick:()=>h(E=>E+1),className:"secondary",children:"Retry"})]});const k=c.vaults.length===0&&!c.moduleInstalled;return i.jsxs("div",{"data-route-content":"true",children:[i.jsxs("div",{className:"list-header",children:[i.jsxs("h1",{children:["Vaults (",c.vaults.length,")"]}),k?i.jsx(nt,{to:"/modules",children:i.jsx("button",{type:"button",children:"Install vault module"})}):null]}),i.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",i.jsx("code",{children:"/.well-known/parachute.json"}),"."," ",i.jsx("strong",{children:"Manage"})," opens the vault's own admin app (outside the hub shell); use your browser's back button to return here."]}),c.vaults.length>0?i.jsxs("p",{className:"muted","data-testid":"vaults-legacy-create-hint",children:["To create another vault, upgrade the vault module from ",i.jsx(nt,{to:"/modules",children:"Modules"})," ","(its own admin app includes create), or run"," ",i.jsx("code",{children:"parachute vault create <name>"})," on the host."]}):null,c.vaults.length===0?k?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No vault module installed."}),i.jsx("p",{className:"muted",children:"The vault backend isn't installed on this hub yet, so there's nothing to provision a vault against. Install it from the Modules page first, then come back here to create your first vault."}),i.jsx("p",{style:{marginTop:"0.75rem"},children:i.jsx(nt,{to:"/modules",children:"Install vault module →"})})]}):i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No vaults yet."}),i.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),i.jsx("p",{style:{marginTop:"0.75rem"},children:i.jsx("a",{href:"/admin/setup?step=vault",children:"Create a vault →"})})]}):i.jsx("div",{style:{marginTop:"1rem"},children:c.vaults.map(E=>{const z=g.kind==="minting"&&g.name===E.name,q=g.kind==="error"&&g.name===E.name?g:null,H=m===E.name,Q=x[E.name],Z=(Q==null?void 0:Q.kind)==="ok"?`${Q.usage.notes} ${Q.usage.notes===1?"note":"notes"} · ${xm(Q.usage.totalBytes)}`:(Q==null?void 0:Q.kind)==="loading"?"…":"—";return i.jsxs("div",{className:"vault-row-group",children:[i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsxs("div",{className:"name",children:[i.jsx("code",{children:E.name}),i.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",E.version]})]}),i.jsx("div",{className:"dim url",children:i.jsx("code",{children:E.url})}),i.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${E.name}`,children:Z}),q?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:q.message})}):null]}),i.jsxs("div",{className:"vault-row-actions",children:[i.jsx("button",{type:"button",className:H?void 0:"secondary","aria-expanded":H,"aria-label":`Connect an MCP client to vault ${E.name}`,onClick:()=>v(P=>P===E.name?null:E.name),children:H?"Hide connect":"Connect"}),E.managementUrl?i.jsx("button",{type:"button",onClick:()=>{_(E)},disabled:z,"aria-label":`Manage vault ${E.name}`,children:z?"Opening…":"Manage"}):i.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),H?i.jsx(ib,{vaultName:E.name,vaultUrl:E.url}):null]},E.name)})})]})}function zm(l){return l==="/permissions"||l.startsWith("/permissions/")?"permissions":l==="/tokens"||l.startsWith("/tokens/")?"tokens":l==="/modules"||l.startsWith("/modules/")?"modules":l==="/users"||l.startsWith("/users/")?"users":l==="/connections"||l.startsWith("/connections/")?"connections":l==="/vaults"||l.startsWith("/vaults/")?"vaults":l==="/settings"||l.startsWith("/settings/")?"settings":l.startsWith("/approve-client/")?"approve app":"home"}function ub(l){return`${zm(l).split(" ").map(c=>c.length>0?c[0].toUpperCase()+c.slice(1):c).join(" ")} · ${xc}`}function rb(){const{pathname:l}=wt(),r=zm(l),[c,o]=b.useState(null);b.useEffect(()=>{document.title=ub(l)},[l]);const[f,h]=b.useState(!1),[g,y]=b.useState([]),m=c!=null&&c.hasSession?c.csrf:null,v=V1(m,!!(c!=null&&c.hasSession));b.useEffect(()=>{let _=!1;return jm().then(k=>{_||o(k)}).catch(()=>{_||o({hasSession:!1})}),()=>{_=!0}},[]),b.useEffect(()=>{if(!c||!c.hasSession)return;let _=!1;return Ns().then(k=>{_||y(k.modules.filter(E=>E.installed))}).catch(()=>{_||y([])}),()=>{_=!0}},[c]),b.useEffect(()=>{v.locked&&je()},[v.locked]);async function x(){if(m){try{await E1(m)}catch{}je(),v.refresh()}}async function j(_){h(!0);try{await a1(_),window.location.href="/"}catch{h(!1)}}return v.locked&&m?i.jsx(Y1,{csrf:m,onUnlocked:v.refresh}):i.jsxs("div",{className:"page",children:[i.jsxs("nav",{className:"nav",children:[i.jsxs(nt,{to:"/",className:"brand",children:[i.jsx(ym,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),i.jsx("span",{className:"brand-wordmark",children:xc}),i.jsx("span",{className:"sub",children:r})]}),i.jsx(ob,{me:c,signingOut:f,onSignOut:j}),c!=null&&c.hasSession&&v.configured?i.jsx("button",{type:"button",className:"auth-spa-signout","data-testid":"admin-lock-now",title:"Lock the admin console now",onClick:()=>void x(),children:"Lock now"}):null,i.jsx(Ha,{to:"/",label:"Home",exact:!0}),i.jsx(Ha,{to:"/connections",label:"Connections"}),i.jsx(Ha,{to:"/grants",label:"Grants"}),i.jsx(Ha,{to:"/modules",label:"Modules"}),i.jsx(Ha,{to:"/users",label:"Users"}),i.jsx(Ha,{to:"/tokens",label:"Tokens"}),i.jsx(Ha,{to:"/permissions",label:"Permissions"}),i.jsx(Ha,{to:"/settings",label:"Settings"}),i.jsx("span",{className:"nav-divider","aria-hidden":"true"}),i.jsx(cb,{services:g}),i.jsx("a",{href:"/hub.html",title:"Hub discovery page (top-level)",children:"Discovery"})]}),i.jsxs(dy,{children:[i.jsx(st,{path:"/",element:i.jsx(r0,{})}),i.jsx(st,{path:"/vaults",element:i.jsx(sb,{})}),i.jsx(st,{path:"/vaults/new",element:i.jsx(Ir,{to:"/vaults",replace:!0})}),i.jsx(st,{path:"/modules",element:i.jsx(N0,{})}),i.jsx(st,{path:"/users",element:i.jsx(J0,{})}),i.jsx(st,{path:"/connections",element:i.jsx(K1,{})}),i.jsx(st,{path:"/grants",element:i.jsx(n0,{})}),i.jsx(st,{path:"/channels",element:i.jsx(Ir,{to:"/connections",replace:!0})}),i.jsx(st,{path:"/channels/*",element:i.jsx(Ir,{to:"/connections",replace:!0})}),i.jsx(st,{path:"/permissions",element:i.jsx(A0,{})}),i.jsx(st,{path:"/tokens",element:i.jsx(D0,{})}),i.jsx(st,{path:"/settings",element:i.jsx(z0,{})}),i.jsx(st,{path:"/approve-client/:clientId",element:i.jsx(Z1,{})}),i.jsx(st,{path:"*",element:i.jsxs("div",{className:"empty",children:["404 — back to ",i.jsx(nt,{to:"/",children:"Home"}),"."]})})]}),c!=null&&c.hasSession?i.jsx(q1,{}):null]})}function Ha({to:l,label:r,alsoActiveAt:c,exact:o}){const{pathname:f}=wt(),y=(o?f===l:f===l||f.startsWith(`${l}/`))||c!==void 0&&f===c;return i.jsx(nt,{to:l,className:y?"nav-link nav-link-active":"nav-link","aria-current":y?"page":void 0,children:r})}function cb({services:l}){return l.length===0?null:i.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[i.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),i.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:l.map(r=>{const c=r.management_url;return c?i.jsx("a",{className:"nav-dropdown-item",href:c,role:"menuitem","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short):i.jsx("span",{className:"nav-dropdown-item nav-dropdown-item-disabled",role:"menuitem","aria-disabled":"true",title:"This module hasn't shipped an admin UI yet.","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short)})})]})}function ob({me:l,signingOut:r,onSignOut:c}){return l===null?null:l.hasSession?i.jsxs("span",{className:"auth-spa",children:[i.jsxs("span",{className:"muted",children:["Signed in as ",i.jsx("strong",{children:l.user.displayName})]})," ","·"," ",i.jsx("button",{type:"button",className:"auth-spa-signout",disabled:r,onClick:()=>{c(l.csrf)},children:r?"Signing out…":"Sign out"})]}):i.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const Om=document.getElementById("root");if(!Om)throw new Error("#root not found");function db(){const l=window.location.pathname;return l==="/admin"||l.startsWith("/admin/")?"/admin":""}hv.createRoot(Om).render(i.jsx(b.StrictMode,{children:i.jsx(Dy,{basename:db(),children:i.jsx(rb,{})})}));
|