@openparachute/hub 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/__tests__/account-setup.test.ts +276 -6
- package/src/__tests__/admin-connections-credentials.test.ts +1320 -0
- package/src/__tests__/api-invites.test.ts +166 -6
- package/src/__tests__/audience-gate.test.ts +752 -0
- package/src/__tests__/hub-db.test.ts +36 -0
- package/src/__tests__/hub-server.test.ts +266 -0
- package/src/__tests__/invites.test.ts +64 -1
- package/src/__tests__/lifecycle.test.ts +238 -3
- package/src/__tests__/ws-bridge.test.ts +573 -0
- package/src/__tests__/ws-connection-caps.test.ts +456 -0
- package/src/account-setup.ts +94 -23
- package/src/admin-connections.ts +916 -14
- package/src/admin-login-ui.ts +64 -15
- package/src/admin-vaults.ts +9 -0
- package/src/api-invites.ts +92 -12
- package/src/audience-gate.ts +268 -0
- package/src/chrome-strip.ts +8 -1
- package/src/commands/lifecycle.ts +187 -47
- package/src/connections-store.ts +32 -2
- package/src/help.ts +13 -6
- package/src/host-admin-token-validation.ts +6 -2
- package/src/hub-db.ts +26 -1
- package/src/hub-server.ts +501 -12
- package/src/invites.ts +69 -2
- package/src/jwt-sign.ts +7 -1
- package/src/module-manifest.ts +107 -0
- package/src/origin-check.ts +7 -4
- package/src/services-manifest.ts +97 -0
- package/src/ws-bridge.ts +256 -0
- package/src/ws-connection-caps.ts +170 -0
- package/web/ui/dist/assets/index-Cxtod68O.js +61 -0
- package/web/ui/dist/index.html +1 -1
- package/web/ui/dist/assets/index-C-XzMVqN.js +0 -61
|
@@ -0,0 +1,61 @@
|
|
|
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 v of h.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).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 Gr={exports:{}},ql={};/**
|
|
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 jh;function Kg(){if(jh)return ql;jh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,h){var v=null;if(h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+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:v,ref:f!==void 0?f:null,props:h}}return ql.Fragment=r,ql.jsx=c,ql.jsxs=c,ql}var Sh;function Fg(){return Sh||(Sh=1,Gr.exports=Kg()),Gr.exports}var s=Fg(),Zr={exports:{}},re={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ch;function Wg(){if(Ch)return re;Ch=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"),v=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),z=Symbol.iterator;function A(N){return N===null||typeof N!="object"?null:(N=z&&N[z]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,Y={};function G(N,q,W){this.props=N,this.context=q,this.refs=Y,this.updater=W||T}G.prototype.isReactComponent={},G.prototype.setState=function(N,q){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,q,"setState")},G.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Q(){}Q.prototype=G.prototype;function $(N,q,W){this.props=N,this.context=q,this.refs=Y,this.updater=W||T}var le=$.prototype=new Q;le.constructor=$,O(le,G.prototype),le.isPureReactComponent=!0;var F=Array.isArray;function J(){}var E={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function Z(N,q,W){var ee=W.ref;return{$$typeof:l,type:N,key:q,ref:ee!==void 0?ee:null,props:W}}function Me(N,q){return Z(N.type,q,N.props)}function ue(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function ae(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return q[W]})}var K=/\/+/g;function pe(N,q){return typeof N=="object"&&N!==null&&N.key!=null?ae(""+N.key):q.toString(36)}function ye(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(J,J):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,q,W,ee,ce){var fe=typeof N;(fe==="undefined"||fe==="boolean")&&(N=null);var Ce=!1;if(N===null)Ce=!0;else switch(fe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(N.$$typeof){case l:case r:Ce=!0;break;case S:return Ce=N._init,D(Ce(N._payload),q,W,ee,ce)}}if(Ce)return ce=ce(N),Ce=ee===""?"."+pe(N,0):ee,F(ce)?(W="",Ce!=null&&(W=Ce.replace(K,"$&/")+"/"),D(ce,q,W,"",function($n){return $n})):ce!=null&&(ue(ce)&&(ce=Me(ce,W+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(K,"$&/")+"/")+Ce)),q.push(ce)),1;Ce=0;var lt=ee===""?".":ee+":";if(F(N))for(var Ye=0;Ye<N.length;Ye++)ee=N[Ye],fe=lt+pe(ee,Ye),Ce+=D(ee,q,W,fe,ce);else if(Ye=A(N),typeof Ye=="function")for(N=Ye.call(N),Ye=0;!(ee=N.next()).done;)ee=ee.value,fe=lt+pe(ee,Ye++),Ce+=D(ee,q,W,fe,ce);else if(fe==="object"){if(typeof N.then=="function")return D(ye(N),q,W,ee,ce);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function X(N,q,W){if(N==null)return N;var ee=[],ce=0;return D(N,ee,"","",function(fe){return q.call(W,fe,ce++)}),ee}function se(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var we=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ze={map:X,forEach:function(N,q,W){X(N,function(){q.apply(this,arguments)},W)},count:function(N){var q=0;return X(N,function(){q++}),q},toArray:function(N){return X(N,function(q){return q})||[]},only:function(N){if(!ue(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return re.Activity=x,re.Children=ze,re.Component=G,re.Fragment=c,re.Profiler=f,re.PureComponent=$,re.StrictMode=o,re.Suspense=p,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,re.__COMPILER_RUNTIME={__proto__:null,c:function(N){return E.H.useMemoCache(N)}},re.cache=function(N){return function(){return N.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(N,q,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ee=O({},N.props),ce=N.key;if(q!=null)for(fe in q.key!==void 0&&(ce=""+q.key),q)!U.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(ee[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)ee.children=W;else if(1<fe){for(var Ce=Array(fe),lt=0;lt<fe;lt++)Ce[lt]=arguments[lt+2];ee.children=Ce}return Z(N.type,ce,ee)},re.createContext=function(N){return N={$$typeof:v,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},re.createElement=function(N,q,W){var ee,ce={},fe=null;if(q!=null)for(ee in q.key!==void 0&&(fe=""+q.key),q)U.call(q,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ce[ee]=q[ee]);var Ce=arguments.length-2;if(Ce===1)ce.children=W;else if(1<Ce){for(var lt=Array(Ce),Ye=0;Ye<Ce;Ye++)lt[Ye]=arguments[Ye+2];ce.children=lt}if(N&&N.defaultProps)for(ee in Ce=N.defaultProps,Ce)ce[ee]===void 0&&(ce[ee]=Ce[ee]);return Z(N,fe,ce)},re.createRef=function(){return{current:null}},re.forwardRef=function(N){return{$$typeof:y,render:N}},re.isValidElement=ue,re.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:se}},re.memo=function(N,q){return{$$typeof:g,type:N,compare:q===void 0?null:q}},re.startTransition=function(N){var q=E.T,W={};E.T=W;try{var ee=N(),ce=E.S;ce!==null&&ce(W,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(J,we)}catch(fe){we(fe)}finally{q!==null&&W.types!==null&&(q.types=W.types),E.T=q}},re.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},re.use=function(N){return E.H.use(N)},re.useActionState=function(N,q,W){return E.H.useActionState(N,q,W)},re.useCallback=function(N,q){return E.H.useCallback(N,q)},re.useContext=function(N){return E.H.useContext(N)},re.useDebugValue=function(){},re.useDeferredValue=function(N,q){return E.H.useDeferredValue(N,q)},re.useEffect=function(N,q){return E.H.useEffect(N,q)},re.useEffectEvent=function(N){return E.H.useEffectEvent(N)},re.useId=function(){return E.H.useId()},re.useImperativeHandle=function(N,q,W){return E.H.useImperativeHandle(N,q,W)},re.useInsertionEffect=function(N,q){return E.H.useInsertionEffect(N,q)},re.useLayoutEffect=function(N,q){return E.H.useLayoutEffect(N,q)},re.useMemo=function(N,q){return E.H.useMemo(N,q)},re.useOptimistic=function(N,q){return E.H.useOptimistic(N,q)},re.useReducer=function(N,q,W){return E.H.useReducer(N,q,W)},re.useRef=function(N){return E.H.useRef(N)},re.useState=function(N){return E.H.useState(N)},re.useSyncExternalStore=function(N,q,W){return E.H.useSyncExternalStore(N,q,W)},re.useTransition=function(){return E.H.useTransition()},re.version="19.2.5",re}var Nh;function uc(){return Nh||(Nh=1,Zr.exports=Wg()),Zr.exports}var b=uc(),Vr={exports:{}},Yl={},Xr={exports:{}},Qr={};/**
|
|
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 Eh;function Ig(){return Eh||(Eh=1,(function(l){function r(D,X){var se=D.length;D.push(X);e:for(;0<se;){var we=se-1>>>1,ze=D[we];if(0<f(ze,X))D[we]=X,D[se]=ze,se=we;else break e}}function c(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var X=D[0],se=D.pop();if(se!==X){D[0]=se;e:for(var we=0,ze=D.length,N=ze>>>1;we<N;){var q=2*(we+1)-1,W=D[q],ee=q+1,ce=D[ee];if(0>f(W,se))ee<ze&&0>f(ce,W)?(D[we]=ce,D[ee]=se,we=ee):(D[we]=W,D[q]=se,we=q);else if(ee<ze&&0>f(ce,se))D[we]=ce,D[ee]=se,we=ee;else break e}}return X}function f(D,X){var se=D.sortIndex-X.sortIndex;return se!==0?se:D.id-X.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 v=Date,y=v.now();l.unstable_now=function(){return v.now()-y}}var p=[],g=[],S=1,x=null,z=3,A=!1,T=!1,O=!1,Y=!1,G=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function le(D){for(var X=c(g);X!==null;){if(X.callback===null)o(g);else if(X.startTime<=D)o(g),X.sortIndex=X.expirationTime,r(p,X);else break;X=c(g)}}function F(D){if(O=!1,le(D),!T)if(c(p)!==null)T=!0,J||(J=!0,ae());else{var X=c(g);X!==null&&ye(F,X.startTime-D)}}var J=!1,E=-1,U=5,Z=-1;function Me(){return Y?!0:!(l.unstable_now()-Z<U)}function ue(){if(Y=!1,J){var D=l.unstable_now();Z=D;var X=!0;try{e:{T=!1,O&&(O=!1,Q(E),E=-1),A=!0;var se=z;try{t:{for(le(D),x=c(p);x!==null&&!(x.expirationTime>D&&Me());){var we=x.callback;if(typeof we=="function"){x.callback=null,z=x.priorityLevel;var ze=we(x.expirationTime<=D);if(D=l.unstable_now(),typeof ze=="function"){x.callback=ze,le(D),X=!0;break t}x===c(p)&&o(p),le(D)}else o(p);x=c(p)}if(x!==null)X=!0;else{var N=c(g);N!==null&&ye(F,N.startTime-D),X=!1}}break e}finally{x=null,z=se,A=!1}X=void 0}}finally{X?ae():J=!1}}}var ae;if(typeof $=="function")ae=function(){$(ue)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,pe=K.port2;K.port1.onmessage=ue,ae=function(){pe.postMessage(null)}}else ae=function(){G(ue,0)};function ye(D,X){E=G(function(){D(l.unstable_now())},X)}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 z},l.unstable_next=function(D){switch(z){case 1:case 2:case 3:var X=3;break;default:X=z}var se=z;z=X;try{return D()}finally{z=se}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(D,X){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=z;z=D;try{return X()}finally{z=se}},l.unstable_scheduleCallback=function(D,X,se){var we=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?we+se:we):se=we,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=se+ze,D={id:S++,callback:X,priorityLevel:D,startTime:se,expirationTime:ze,sortIndex:-1},se>we?(D.sortIndex=se,r(g,D),c(p)===null&&D===c(g)&&(O?(Q(E),E=-1):O=!0,ye(F,se-we))):(D.sortIndex=ze,r(p,D),T||A||(T=!0,J||(J=!0,ae()))),D},l.unstable_shouldYield=Me,l.unstable_wrapCallback=function(D){var X=z;return function(){var se=z;z=X;try{return D.apply(this,arguments)}finally{z=se}}}})(Qr)),Qr}var wh;function Pg(){return wh||(wh=1,Xr.exports=Ig()),Xr.exports}var $r={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 Th;function ev(){if(Th)return at;Th=1;var l=uc();function r(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+g+" 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(p,g,S){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:x==null?null:""+x,children:p,containerInfo:g,implementation:S}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,at.createPortal=function(p,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return h(p,g,null,S)},at.flushSync=function(p){var g=v.T,S=o.p;try{if(v.T=null,o.p=2,p)return p()}finally{v.T=g,o.p=S,o.d.f()}},at.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(p,g))},at.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},at.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var S=g.as,x=y(S,g.crossOrigin),z=typeof g.integrity=="string"?g.integrity:void 0,A=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;S==="style"?o.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:z,fetchPriority:A}):S==="script"&&o.d.X(p,{crossOrigin:x,integrity:z,fetchPriority:A,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},at.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var S=y(g.as,g.crossOrigin);o.d.M(p,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(p)},at.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var S=g.as,x=y(S,g.crossOrigin);o.d.L(p,S,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},at.preloadModule=function(p,g){if(typeof p=="string")if(g){var S=y(g.as,g.crossOrigin);o.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(p)},at.requestFormReset=function(p){o.d.r(p)},at.unstable_batchedUpdates=function(p,g){return p(g)},at.useFormState=function(p,g,S){return v.H.useFormState(p,g,S)},at.useFormStatus=function(){return v.H.useHostTransitionStatus()},at.version="19.2.5",at}var _h;function tv(){if(_h)return $r.exports;_h=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(),$r.exports=ev(),$r.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 Rh;function av(){if(Rh)return Yl;Rh=1;var l=Pg(),r=uc(),c=tv();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 v(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 p(e){if(h(e)!==e)throw Error(o(188))}function g(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 i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return p(i),e;if(u===n)return p(i),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=u;else{for(var d=!1,m=i.child;m;){if(m===a){d=!0,a=i,n=u;break}if(m===n){d=!0,n=i,a=u;break}m=m.sibling}if(!d){for(m=u.child;m;){if(m===a){d=!0,a=u,n=i;break}if(m===n){d=!0,n=u,a=i;break}m=m.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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,z=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),$=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),Me=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var K=Symbol.for("react.client.reference");function pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===K?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case G:return"Profiler";case Y:return"StrictMode";case F:return"Suspense";case J:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case $:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var ye=Array.isArray,D=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},we=[],ze=-1;function N(e){return{current:e}}function q(e){0>ze||(e.current=we[ze],we[ze]=null,ze--)}function W(e,t){ze++,we[ze]=e.current,e.current=t}var ee=N(null),ce=N(null),fe=N(null),Ce=N(null);function lt(e,t){switch(W(fe,t),W(ce,e),W(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vf(t),e=Xf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(ee),W(ee,e)}function Ye(){q(ee),q(ce),q(fe)}function $n(e){e.memoizedState!==null&&W(Ce,e);var t=ee.current,a=Xf(t,e.type);t!==a&&(W(ce,e),W(ee,a))}function $l(e){ce.current===e&&(q(ee),q(ce)),Ce.current===e&&(q(Ce),Dl._currentValue=se)}var Ns,yc;function Ha(e){if(Ns===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ns=t&&t[1]||"",yc=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ns+e+yc}var Es=!1;function ws(e,t){if(!e||Es)return"";Es=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(k){var M=k}Reflect.construct(e,[],L)}else{try{L.call()}catch(k){M=k}e.call(L.prototype)}}else{try{throw Error()}catch(k){M=k}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(k){if(k&&M&&typeof k.stack=="string")return[k.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var j=d.split(`
|
|
44
|
+
`),R=m.split(`
|
|
45
|
+
`);for(i=n=0;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;for(;i<R.length&&!R[i].includes("DetermineComponentFrameRoot");)i++;if(n===j.length||i===R.length)for(n=j.length-1,i=R.length-1;1<=n&&0<=i&&j[n]!==R[i];)i--;for(;1<=n&&0<=i;n--,i--)if(j[n]!==R[i]){if(n!==1||i!==1)do if(n--,i--,0>i||j[n]!==R[i]){var H=`
|
|
46
|
+
`+j[n].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=n&&0<=i);break}}}finally{Es=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function wm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return ws(e.type,!1);case 11:return ws(e.type.render,!1);case 1:return ws(e.type,!0);case 31:return Ha("Activity");default:return""}}function bc(e){try{var t="",a=null;do t+=wm(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var Ts=Object.prototype.hasOwnProperty,_s=l.unstable_scheduleCallback,Rs=l.unstable_cancelCallback,Tm=l.unstable_shouldYield,_m=l.unstable_requestPaint,mt=l.unstable_now,Rm=l.unstable_getCurrentPriorityLevel,xc=l.unstable_ImmediatePriority,jc=l.unstable_UserBlockingPriority,Jl=l.unstable_NormalPriority,Am=l.unstable_LowPriority,Sc=l.unstable_IdlePriority,Mm=l.log,zm=l.unstable_setDisableYieldValue,Jn=null,pt=null;function da(e){if(typeof Mm=="function"&&zm(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Jn,e)}catch{}}var gt=Math.clz32?Math.clz32:Um,km=Math.log,Om=Math.LN2;function Um(e){return e>>>=0,e===0?32:31-(km(e)/Om|0)|0}var Kl=256,Fl=262144,Wl=4194304;function Ba(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 Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~u,n!==0?i=Ba(n):(d&=m,d!==0?i=Ba(d):a||(a=m&~e,a!==0&&(i=Ba(a))))):(m=n&~u,m!==0?i=Ba(m):d!==0?i=Ba(d):a||(a=n&~e,a!==0&&(i=Ba(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function Kn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Dm(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 Cc(){var e=Wl;return Wl<<=1,(Wl&62914560)===0&&(Wl=4194304),e}function As(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hm(e,t,a,n,i,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 m=e.entanglements,j=e.expirationTimes,R=e.hiddenUpdates;for(a=d&~a;0<a;){var H=31-gt(a),L=1<<H;m[H]=0,j[H]=-1;var M=R[H];if(M!==null)for(R[H]=null,H=0;H<M.length;H++){var k=M[H];k!==null&&(k.lane&=-536870913)}a&=~L}n!==0&&Nc(e,n,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function Nc(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 Ec(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function wc(e,t){var a=t&-t;return a=(a&42)!==0?1:Ms(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ms(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 zs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tc(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:mh(e.type))}function _c(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var fa=Math.random().toString(36).slice(2),We="__reactFiber$"+fa,st="__reactProps$"+fa,sn="__reactContainer$"+fa,ks="__reactEvents$"+fa,Bm="__reactListeners$"+fa,Lm="__reactHandles$"+fa,Rc="__reactResources$"+fa,Wn="__reactMarker$"+fa;function Os(e){delete e[We],delete e[st],delete e[ks],delete e[Bm],delete e[Lm]}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=If(e);e!==null;){if(a=e[We])return a;e=If(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 In(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[Rc];return t||(t=e[Rc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Wn]=!0}var Ac=new Set,Mc={};function La(e,t){on(e,t),on(e+"Capture",t)}function on(e,t){for(Mc[e]=t,e=0;e<t.length;e++)Ac.add(t[e])}var qm=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]*$"),zc={},kc={};function Ym(e){return Ts.call(kc,e)?!0:Ts.call(zc,e)?!1:qm.test(e)?kc[e]=!0:(zc[e]=!0,!1)}function Pl(e,t,a){if(Ym(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 ei(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 Qt(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 wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gm(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 i=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.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 Us(e){if(!e._valueTracker){var t=Oc(e)?"checked":"value";e._valueTracker=Gm(e,t,""+e[t])}}function Uc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Oc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ti(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 Zm=/[\n"\\]/g;function Tt(e){return e.replace(Zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ds(e,t,a,n,i,u,d,m){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=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Hs(e,d,wt(t)):a!=null?Hs(e,d,wt(a)):n!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+wt(m):e.removeAttribute("name")}function Dc(e,t,a,n,i,u,d,m){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)){Us(e);return}a=a!=null?""+wt(a):"",t=t!=null?""+wt(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Us(e)}function Hs(e,t,a){t==="number"&&ti(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+wt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Hc(e,t,a){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wt(a):""}function Bc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(ye(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=wt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Us(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 Vm=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 Lc(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||Vm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function qc(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 i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&Lc(e,i,n)}else for(var u in t)t.hasOwnProperty(u)&&Lc(e,u,t[u])}function Bs(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 Xm=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"]]),Qm=/^[\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 ai(e){return Qm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $t(){}var Ls=null;function qs(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 Yc(e){var t=rn(e);if(t&&(e=t.stateNode)){var a=e[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ds(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 i=n[st]||null;if(!i)throw Error(o(90));Ds(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Uc(n)}break e;case"textarea":Hc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&dn(e,!!a.multiple,t,!1)}}}var Ys=!1;function Gc(e,t,a){if(Ys)return e(t,a);Ys=!0;try{var n=e(t);return n}finally{if(Ys=!1,(hn!==null||mn!==null)&&(Zi(),hn&&(t=hn,e=mn,mn=hn=null,Yc(t),e)))for(t=0;t<e.length;t++)Yc(e[t])}}function Pn(e,t){var a=e.stateNode;if(a===null)return null;var n=a[st]||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 Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gs=!1;if(Jt)try{var el={};Object.defineProperty(el,"passive",{get:function(){Gs=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Gs=!1}var ha=null,Zs=null,ni=null;function Zc(){if(ni)return ni;var e,t=Zs,a=t.length,n,i="value"in ha?ha.value:ha.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===i[u-n];n++);return ni=i.slice(e,1<n?1-n:void 0)}function li(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 ii(){return!0}function Vc(){return!1}function ut(e){function t(a,n,i,u,d){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ii:Vc,this.isPropagationStopped=Vc,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ii)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ii)},persist:function(){},isPersistent:ii}),t}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},si=ut(qa),tl=x({},qa,{view:0,detail:0}),$m=ut(tl),Vs,Xs,al,ui=x({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$s,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!==al&&(al&&e.type==="mousemove"?(Vs=e.screenX-al.screenX,Xs=e.screenY-al.screenY):Xs=Vs=0,al=e),Vs)},movementY:function(e){return"movementY"in e?e.movementY:Xs}}),Xc=ut(ui),Jm=x({},ui,{dataTransfer:0}),Km=ut(Jm),Fm=x({},tl,{relatedTarget:0}),Qs=ut(Fm),Wm=x({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Im=ut(Wm),Pm=x({},qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ep=ut(Pm),tp=x({},qa,{data:0}),Qc=ut(tp),ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},np={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"},lp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ip(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lp[e])?!!t[e]:!1}function $s(){return ip}var sp=x({},tl,{key:function(e){if(e.key){var t=ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$s,charCode:function(e){return e.type==="keypress"?li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),up=ut(sp),rp=x({},ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$c=ut(rp),cp=x({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$s}),op=ut(cp),dp=x({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),fp=ut(dp),hp=x({},ui,{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}),mp=ut(hp),pp=x({},qa,{newState:0,oldState:0}),gp=ut(pp),vp=[9,13,27,32],Js=Jt&&"CompositionEvent"in window,nl=null;Jt&&"documentMode"in document&&(nl=document.documentMode);var yp=Jt&&"TextEvent"in window&&!nl,Jc=Jt&&(!Js||nl&&8<nl&&11>=nl),Kc=" ",Fc=!1;function Wc(e,t){switch(e){case"keyup":return vp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ic(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pn=!1;function bp(e,t){switch(e){case"compositionend":return Ic(t);case"keypress":return t.which!==32?null:(Fc=!0,Kc);case"textInput":return e=t.data,e===Kc&&Fc?null:e;default:return null}}function xp(e,t){if(pn)return e==="compositionend"||!Js&&Wc(e,t)?(e=Zc(),ni=Zs=ha=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 Jc&&t.locale!=="ko"?null:t.data;default:return null}}var jp={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 Pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jp[e.type]:t==="textarea"}function eo(e,t,a,n){hn?mn?mn.push(n):mn=[n]:hn=n,t=Fi(t,"onChange"),0<t.length&&(a=new si("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var ll=null,il=null;function Sp(e){Bf(e,0)}function ri(e){var t=In(e);if(Uc(t))return e}function to(e,t){if(e==="change")return t}var ao=!1;if(Jt){var Ks;if(Jt){var Fs="oninput"in document;if(!Fs){var no=document.createElement("div");no.setAttribute("oninput","return;"),Fs=typeof no.oninput=="function"}Ks=Fs}else Ks=!1;ao=Ks&&(!document.documentMode||9<document.documentMode)}function lo(){ll&&(ll.detachEvent("onpropertychange",io),il=ll=null)}function io(e){if(e.propertyName==="value"&&ri(il)){var t=[];eo(t,il,e,qs(e)),Gc(Sp,t)}}function Cp(e,t,a){e==="focusin"?(lo(),ll=t,il=a,ll.attachEvent("onpropertychange",io)):e==="focusout"&&lo()}function Np(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ri(il)}function Ep(e,t){if(e==="click")return ri(t)}function wp(e,t){if(e==="input"||e==="change")return ri(t)}function Tp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:Tp;function sl(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 i=a[n];if(!Ts.call(t,i)||!vt(e[i],t[i]))return!1}return!0}function so(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uo(e,t){var a=so(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=so(a)}}function ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function co(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ti(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=ti(e.document)}return t}function Ws(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 _p=Jt&&"documentMode"in document&&11>=document.documentMode,gn=null,Is=null,ul=null,Ps=!1;function oo(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ps||gn==null||gn!==ti(n)||(n=gn,"selectionStart"in n&&Ws(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}),ul&&sl(ul,n)||(ul=n,n=Fi(Is,"onSelect"),0<n.length&&(t=new si("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=gn)))}function Ya(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vn={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionrun:Ya("Transition","TransitionRun"),transitionstart:Ya("Transition","TransitionStart"),transitioncancel:Ya("Transition","TransitionCancel"),transitionend:Ya("Transition","TransitionEnd")},eu={},fo={};Jt&&(fo=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 Ga(e){if(eu[e])return eu[e];if(!vn[e])return e;var t=vn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in fo)return eu[e]=t[a];return e}var ho=Ga("animationend"),mo=Ga("animationiteration"),po=Ga("animationstart"),Rp=Ga("transitionrun"),Ap=Ga("transitionstart"),Mp=Ga("transitioncancel"),go=Ga("transitionend"),vo=new Map,tu="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(" ");tu.push("scrollEnd");function Ht(e,t){vo.set(e,t),La(t,[e])}var ci=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)},_t=[],yn=0,au=0;function oi(){for(var e=yn,t=au=yn=0;t<e;){var a=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var i=_t[t];_t[t++]=null;var u=_t[t];if(_t[t++]=null,n!==null&&i!==null){var d=n.pending;d===null?i.next=i:(i.next=d.next,d.next=i),n.pending=i}u!==0&&yo(a,i,u)}}function di(e,t,a,n){_t[yn++]=e,_t[yn++]=t,_t[yn++]=a,_t[yn++]=n,au|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function nu(e,t,a,n){return di(e,t,a,n),fi(e)}function Za(e,t){return di(e,null,null,t),fi(e)}function yo(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!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||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-gt(a),e=u.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),u):null}function fi(e){if(50<Rl)throw Rl=0,fr=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 zp(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 zp(e,t,a,n)}function lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(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 bo(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 hi(e,t,a,n,i,u){var d=0;if(n=e,typeof e=="function")lu(e)&&(d=1);else if(typeof e=="string")d=Hg(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=yt(31,a,t,i),e.elementType=Z,e.lanes=u,e;case O:return Va(a.children,i,u,t);case Y:d=8,i|=24;break;case G:return e=yt(12,a,t,i|2),e.elementType=G,e.lanes=u,e;case F:return e=yt(13,a,t,i),e.elementType=F,e.lanes=u,e;case J:return e=yt(19,a,t,i),e.elementType=J,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:d=10;break e;case Q:d=9;break e;case le:d=11;break e;case E: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,i),t.elementType=e,t.type=n,t.lanes=u,t}function Va(e,t,a,n){return e=yt(7,e,n,t),e.lanes=a,e}function iu(e,t,a){return e=yt(6,e,null,t),e.lanes=a,e}function xo(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function su(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 jo=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var a=jo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:bc(t)},jo.set(e,t),t)}return{value:e,source:t,stack:bc(t)}}var xn=[],jn=0,mi=null,rl=0,At=[],Mt=0,ma=null,Gt=1,Zt="";function Ft(e,t){xn[jn++]=rl,xn[jn++]=mi,mi=e,rl=t}function So(e,t,a){At[Mt++]=Gt,At[Mt++]=Zt,At[Mt++]=ma,ma=e;var n=Gt;e=Zt;var i=32-gt(n)-1;n&=~(1<<i),a+=1;var u=32-gt(t)+i;if(30<u){var d=i-i%5;u=(n&(1<<d)-1).toString(32),n>>=d,i-=d,Gt=1<<32-gt(t)+i|a<<i|n,Zt=u+e}else Gt=1<<u|a<<i|n,Zt=e}function uu(e){e.return!==null&&(Ft(e,1),So(e,1,0))}function ru(e){for(;e===mi;)mi=xn[--jn],xn[jn]=null,rl=xn[--jn],xn[jn]=null;for(;e===ma;)ma=At[--Mt],At[Mt]=null,Zt=At[--Mt],At[Mt]=null,Gt=At[--Mt],At[Mt]=null}function Co(e,t){At[Mt++]=Gt,At[Mt++]=Zt,At[Mt++]=ma,Gt=t.id,Zt=t.overflow,ma=e}var Ie=null,Oe=null,be=!1,pa=null,zt=!1,cu=Error(o(519));function ga(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(Rt(t,e)),cu}function No(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[We]=e,t[st]=n,a){case"dialog":me("cancel",t),me("close",t);break;case"iframe":case"object":case"embed":me("load",t);break;case"video":case"audio":for(a=0;a<Ml.length;a++)me(Ml[a],t);break;case"source":me("error",t);break;case"img":case"image":case"link":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"input":me("invalid",t),Dc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":me("invalid",t);break;case"textarea":me("invalid",t),Bc(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||Gf(t.textContent,a)?(n.popover!=null&&(me("beforetoggle",t),me("toggle",t)),n.onScroll!=null&&me("scroll",t),n.onScrollEnd!=null&&me("scrollend",t),n.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||ga(e,!0)}function Eo(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:zt=!1;return;case 27:case 3:zt=!0;return;default:Ie=Ie.return}}function Sn(e){if(e!==Ie)return!1;if(!be)return Eo(e),be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Tr(e.type,e.memoizedProps)),a=!a),a&&Oe&&ga(e),Eo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Oe=Wf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Oe=Wf(e)}else t===27?(t=Oe,Aa(e.type)?(e=zr,zr=null,Oe=e):Oe=t):Oe=Ie?Ot(e.stateNode.nextSibling):null;return!0}function Xa(){Oe=Ie=null,be=!1}function ou(){var e=pa;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),pa=null),e}function cl(e){pa===null?pa=[e]:pa.push(e)}var du=N(null),Qa=null,Wt=null;function va(e,t,a){W(du,t._currentValue),t._currentValue=a}function It(e){e._currentValue=du.current,q(du)}function fu(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 hu(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var d=i.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=i;for(var j=0;j<t.length;j++)if(m.context===t[j]){u.lanes|=a,m=u.alternate,m!==null&&(m.lanes|=a),fu(u.return,a,e),n||(d=null);break e}u=m.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(o(341));d.lanes|=a,u=d.alternate,u!==null&&(u.lanes|=a),fu(d,a,e),d=null}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function Cn(e,t,a,n){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var m=i.type;vt(i.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(i===Ce.current){if(d=i.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Dl):e=[Dl])}i=i.return}e!==null&&hu(t,e,a,n),t.flags|=262144}function pi(e){for(e=e.firstContext;e!==null;){if(!vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Qa=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return wo(Qa,e)}function gi(e,t){return Qa===null&&$a(e),wo(e,t)}function wo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wt===null){if(e===null)throw Error(o(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return a}var kp=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()})}},Op=l.unstable_scheduleCallback,Up=l.unstable_NormalPriority,Ve={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mu(){return{controller:new kp,data:new Map,refCount:0}}function ol(e){e.refCount--,e.refCount===0&&Op(Up,function(){e.controller.abort()})}var dl=null,pu=0,Nn=0,En=null;function Dp(e,t){if(dl===null){var a=dl=[];pu=0,Nn=yr(),En={status:"pending",value:void 0,then:function(n){a.push(n)}}}return pu++,t.then(To,To),t}function To(){if(--pu===0&&dl!==null){En!==null&&(En.status="fulfilled");var e=dl;dl=null,Nn=0,En=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Hp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var _o=D.S;D.S=function(e,t){ff=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Dp(e,t),_o!==null&&_o(e,t)};var Ja=N(null);function gu(){var e=Ja.current;return e!==null?e:ke.pooledCache}function vi(e,t){t===null?W(Ja,Ja.current):W(Ja,t.pool)}function Ro(){var e=gu();return e===null?null:{parent:Ve._currentValue,pool:e}}var wn=Error(o(460)),vu=Error(o(474)),yi=Error(o(542)),bi={then:function(){}};function Ao(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Mo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($t,$t),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ko(e),e;default:if(typeof t.status=="string")t.then($t,$t);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ko(e),e}throw Fa=t,wn}}function Ka(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fa=a,wn):a}}var Fa=null;function zo(){if(Fa===null)throw Error(o(459));var e=Fa;return Fa=null,e}function ko(e){if(e===wn||e===yi)throw Error(o(483))}var Tn=null,fl=0;function xi(e){var t=fl;return fl+=1,Tn===null&&(Tn=[]),Mo(Tn,e,t)}function hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===z?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Oo(e){function t(w,C){if(e){var _=w.deletions;_===null?(w.deletions=[C],w.flags|=16):_.push(C)}}function a(w,C){if(!e)return null;for(;C!==null;)t(w,C),C=C.sibling;return null}function n(w){for(var C=new Map;w!==null;)w.key!==null?C.set(w.key,w):C.set(w.index,w),w=w.sibling;return C}function i(w,C){return w=Kt(w,C),w.index=0,w.sibling=null,w}function u(w,C,_){return w.index=_,e?(_=w.alternate,_!==null?(_=_.index,_<C?(w.flags|=67108866,C):_):(w.flags|=67108866,C)):(w.flags|=1048576,C)}function d(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function m(w,C,_,B){return C===null||C.tag!==6?(C=iu(_,w.mode,B),C.return=w,C):(C=i(C,_),C.return=w,C)}function j(w,C,_,B){var ne=_.type;return ne===O?H(w,C,_.props.children,B,_.key):C!==null&&(C.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===U&&Ka(ne)===C.type)?(C=i(C,_.props),hl(C,_),C.return=w,C):(C=hi(_.type,_.key,_.props,null,w.mode,B),hl(C,_),C.return=w,C)}function R(w,C,_,B){return C===null||C.tag!==4||C.stateNode.containerInfo!==_.containerInfo||C.stateNode.implementation!==_.implementation?(C=su(_,w.mode,B),C.return=w,C):(C=i(C,_.children||[]),C.return=w,C)}function H(w,C,_,B,ne){return C===null||C.tag!==7?(C=Va(_,w.mode,B,ne),C.return=w,C):(C=i(C,_),C.return=w,C)}function L(w,C,_){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=iu(""+C,w.mode,_),C.return=w,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case A:return _=hi(C.type,C.key,C.props,null,w.mode,_),hl(_,C),_.return=w,_;case T:return C=su(C,w.mode,_),C.return=w,C;case U:return C=Ka(C),L(w,C,_)}if(ye(C)||ae(C))return C=Va(C,w.mode,_,null),C.return=w,C;if(typeof C.then=="function")return L(w,xi(C),_);if(C.$$typeof===$)return L(w,gi(w,C),_);ji(w,C)}return null}function M(w,C,_,B){var ne=C!==null?C.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ne!==null?null:m(w,C,""+_,B);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case A:return _.key===ne?j(w,C,_,B):null;case T:return _.key===ne?R(w,C,_,B):null;case U:return _=Ka(_),M(w,C,_,B)}if(ye(_)||ae(_))return ne!==null?null:H(w,C,_,B,null);if(typeof _.then=="function")return M(w,C,xi(_),B);if(_.$$typeof===$)return M(w,C,gi(w,_),B);ji(w,_)}return null}function k(w,C,_,B,ne){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return w=w.get(_)||null,m(C,w,""+B,ne);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case A:return w=w.get(B.key===null?_:B.key)||null,j(C,w,B,ne);case T:return w=w.get(B.key===null?_:B.key)||null,R(C,w,B,ne);case U:return B=Ka(B),k(w,C,_,B,ne)}if(ye(B)||ae(B))return w=w.get(_)||null,H(C,w,B,ne,null);if(typeof B.then=="function")return k(w,C,_,xi(B),ne);if(B.$$typeof===$)return k(w,C,_,gi(C,B),ne);ji(C,B)}return null}function I(w,C,_,B){for(var ne=null,xe=null,te=C,de=C=0,ve=null;te!==null&&de<_.length;de++){te.index>de?(ve=te,te=null):ve=te.sibling;var je=M(w,te,_[de],B);if(je===null){te===null&&(te=ve);break}e&&te&&je.alternate===null&&t(w,te),C=u(je,C,de),xe===null?ne=je:xe.sibling=je,xe=je,te=ve}if(de===_.length)return a(w,te),be&&Ft(w,de),ne;if(te===null){for(;de<_.length;de++)te=L(w,_[de],B),te!==null&&(C=u(te,C,de),xe===null?ne=te:xe.sibling=te,xe=te);return be&&Ft(w,de),ne}for(te=n(te);de<_.length;de++)ve=k(te,w,de,_[de],B),ve!==null&&(e&&ve.alternate!==null&&te.delete(ve.key===null?de:ve.key),C=u(ve,C,de),xe===null?ne=ve:xe.sibling=ve,xe=ve);return e&&te.forEach(function(Ua){return t(w,Ua)}),be&&Ft(w,de),ne}function ie(w,C,_,B){if(_==null)throw Error(o(151));for(var ne=null,xe=null,te=C,de=C=0,ve=null,je=_.next();te!==null&&!je.done;de++,je=_.next()){te.index>de?(ve=te,te=null):ve=te.sibling;var Ua=M(w,te,je.value,B);if(Ua===null){te===null&&(te=ve);break}e&&te&&Ua.alternate===null&&t(w,te),C=u(Ua,C,de),xe===null?ne=Ua:xe.sibling=Ua,xe=Ua,te=ve}if(je.done)return a(w,te),be&&Ft(w,de),ne;if(te===null){for(;!je.done;de++,je=_.next())je=L(w,je.value,B),je!==null&&(C=u(je,C,de),xe===null?ne=je:xe.sibling=je,xe=je);return be&&Ft(w,de),ne}for(te=n(te);!je.done;de++,je=_.next())je=k(te,w,de,je.value,B),je!==null&&(e&&je.alternate!==null&&te.delete(je.key===null?de:je.key),C=u(je,C,de),xe===null?ne=je:xe.sibling=je,xe=je);return e&&te.forEach(function(Jg){return t(w,Jg)}),be&&Ft(w,de),ne}function Re(w,C,_,B){if(typeof _=="object"&&_!==null&&_.type===O&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case A:e:{for(var ne=_.key;C!==null;){if(C.key===ne){if(ne=_.type,ne===O){if(C.tag===7){a(w,C.sibling),B=i(C,_.props.children),B.return=w,w=B;break e}}else if(C.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===U&&Ka(ne)===C.type){a(w,C.sibling),B=i(C,_.props),hl(B,_),B.return=w,w=B;break e}a(w,C);break}else t(w,C);C=C.sibling}_.type===O?(B=Va(_.props.children,w.mode,B,_.key),B.return=w,w=B):(B=hi(_.type,_.key,_.props,null,w.mode,B),hl(B,_),B.return=w,w=B)}return d(w);case T:e:{for(ne=_.key;C!==null;){if(C.key===ne)if(C.tag===4&&C.stateNode.containerInfo===_.containerInfo&&C.stateNode.implementation===_.implementation){a(w,C.sibling),B=i(C,_.children||[]),B.return=w,w=B;break e}else{a(w,C);break}else t(w,C);C=C.sibling}B=su(_,w.mode,B),B.return=w,w=B}return d(w);case U:return _=Ka(_),Re(w,C,_,B)}if(ye(_))return I(w,C,_,B);if(ae(_)){if(ne=ae(_),typeof ne!="function")throw Error(o(150));return _=ne.call(_),ie(w,C,_,B)}if(typeof _.then=="function")return Re(w,C,xi(_),B);if(_.$$typeof===$)return Re(w,C,gi(w,_),B);ji(w,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,C!==null&&C.tag===6?(a(w,C.sibling),B=i(C,_),B.return=w,w=B):(a(w,C),B=iu(_,w.mode,B),B.return=w,w=B),d(w)):a(w,C)}return function(w,C,_,B){try{fl=0;var ne=Re(w,C,_,B);return Tn=null,ne}catch(te){if(te===wn||te===yi)throw te;var xe=yt(29,te,null,w.mode);return xe.lanes=B,xe.return=w,xe}finally{}}}var Wa=Oo(!0),Uo=Oo(!1),ya=!1;function yu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bu(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 ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Se&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=fi(e),yo(e,null,a),t}return di(e,n,t,a),fi(e)}function ml(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,Ec(e,a)}}function xu(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=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?i=u=d:u=u.next=d,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:n.baseState,firstBaseUpdate:i,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 ju=!1;function pl(){if(ju){var e=En;if(e!==null)throw e}}function gl(e,t,a,n){ju=!1;var i=e.updateQueue;ya=!1;var u=i.firstBaseUpdate,d=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var j=m,R=j.next;j.next=null,d===null?u=R:d.next=R,d=j;var H=e.alternate;H!==null&&(H=H.updateQueue,m=H.lastBaseUpdate,m!==d&&(m===null?H.firstBaseUpdate=R:m.next=R,H.lastBaseUpdate=j))}if(u!==null){var L=i.baseState;d=0,H=R=j=null,m=u;do{var M=m.lane&-536870913,k=M!==m.lane;if(k?(ge&M)===M:(n&M)===M){M!==0&&M===Nn&&(ju=!0),H!==null&&(H=H.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,ie=m;M=t;var Re=a;switch(ie.tag){case 1:if(I=ie.payload,typeof I=="function"){L=I.call(Re,L,M);break e}L=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=ie.payload,M=typeof I=="function"?I.call(Re,L,M):I,M==null)break e;L=x({},L,M);break e;case 2:ya=!0}}M=m.callback,M!==null&&(e.flags|=64,k&&(e.flags|=8192),k=i.callbacks,k===null?i.callbacks=[M]:k.push(M))}else k={lane:M,tag:m.tag,payload:m.payload,callback:m.callback,next:null},H===null?(R=H=k,j=L):H=H.next=k,d|=M;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;k=m,m=k.next,k.next=null,i.lastBaseUpdate=k,i.shared.pending=null}}while(!0);H===null&&(j=L),i.baseState=j,i.firstBaseUpdate=R,i.lastBaseUpdate=H,u===null&&(i.shared.lanes=0),Ea|=d,e.lanes=d,e.memoizedState=L}}function Do(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Ho(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Do(a[e],t)}var _n=N(null),Si=N(0);function Bo(e,t){e=ua,W(Si,e),W(_n,t),ua=e|t.baseLanes}function Su(){W(Si,ua),W(_n,_n.current)}function Cu(){ua=Si.current,q(_n),q(Si)}var bt=N(null),kt=null;function ja(e){var t=e.alternate;W(Ge,Ge.current&1),W(bt,e),kt===null&&(t===null||_n.current!==null||t.memoizedState!==null)&&(kt=e)}function Nu(e){W(Ge,Ge.current),W(bt,e),kt===null&&(kt=e)}function Lo(e){e.tag===22?(W(Ge,Ge.current),W(bt,e),kt===null&&(kt=e)):Sa()}function Sa(){W(Ge,Ge.current),W(bt,bt.current)}function xt(e){q(bt),kt===e&&(kt=null),q(Ge)}var Ge=N(0);function Ci(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ar(a)||Mr(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 Pt=0,oe=null,Te=null,Xe=null,Ni=!1,Rn=!1,Ia=!1,Ei=0,vl=0,An=null,Bp=0;function Le(){throw Error(o(321))}function Eu(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 wu(e,t,a,n,i,u){return Pt=u,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Sd:Yu,Ia=!1,u=a(n,i),Ia=!1,Rn&&(u=Yo(t,a,n,i)),qo(e),u}function qo(e){D.H=xl;var t=Te!==null&&Te.next!==null;if(Pt=0,Xe=Te=oe=null,Ni=!1,vl=0,An=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&pi(e)&&(Qe=!0))}function Yo(e,t,a,n){oe=e;var i=0;do{if(Rn&&(An=null),vl=0,Rn=!1,25<=i)throw Error(o(301));if(i+=1,Xe=Te=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=Cd,u=t(a,n)}while(Rn);return u}function Lp(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?yl(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(oe.flags|=1024),t}function Tu(){var e=Ei!==0;return Ei=0,e}function _u(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ru(e){if(Ni){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ni=!1}Pt=0,Xe=Te=oe=null,Rn=!1,vl=Ei=0,An=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ze(){if(Te===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Xe===null?oe.memoizedState:Xe.next;if(t!==null)Xe=t,Te=e;else{if(e===null)throw oe.alternate===null?Error(o(467)):Error(o(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yl(e){var t=vl;return vl+=1,An===null&&(An=[]),e=Mo(An,e,t),t=oe,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Sd:Yu),e}function Ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yl(e);if(e.$$typeof===$)return Pe(e)}throw Error(o(438,String(e)))}function Au(e){var t=null,a=oe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=oe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=wi(),oe.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]=Me;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function _i(e){var t=Ze();return Mu(t,Te,e)}function Mu(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,u=n.pending;if(u!==null){if(i!==null){var d=i.next;i.next=u.next,u.next=d}t.baseQueue=i=u,n.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var m=d=null,j=null,R=t,H=!1;do{var L=R.lane&-536870913;if(L!==R.lane?(ge&L)===L:(Pt&L)===L){var M=R.revertLane;if(M===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),L===Nn&&(H=!0);else if((Pt&M)===M){R=R.next,M===Nn&&(H=!0);continue}else L={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(m=j=L,d=u):j=j.next=L,oe.lanes|=M,Ea|=M;L=R.action,Ia&&a(u,L),u=R.hasEagerState?R.eagerState:a(u,L)}else M={lane:L,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(m=j=M,d=u):j=j.next=M,oe.lanes|=L,Ea|=L;R=R.next}while(R!==null&&R!==t);if(j===null?d=u:j.next=m,!vt(u,e.memoizedState)&&(Qe=!0,H&&(a=En,a!==null)))throw a;e.memoizedState=u,e.baseState=d,e.baseQueue=j,n.lastRenderedState=u}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function zu(e){var t=Ze(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var d=i=i.next;do u=e(u,d.action),d=d.next;while(d!==i);vt(u,t.memoizedState)||(Qe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function Go(e,t,a){var n=oe,i=Ze(),u=be;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!vt((Te||i).memoizedState,a);if(d&&(i.memoizedState=a,Qe=!0),i=i.queue,Uu(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||d||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,Mn(9,{destroy:void 0},Vo.bind(null,n,i,a,t),null),ke===null)throw Error(o(349));u||(Pt&127)!==0||Zo(n,t,a)}return a}function Zo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=oe.updateQueue,t===null?(t=wi(),oe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Vo(e,t,a,n){t.value=a,t.getSnapshot=n,Qo(t)&&$o(e)}function Xo(e,t,a){return a(function(){Qo(t)&&$o(e)})}function Qo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!vt(e,a)}catch{return!0}}function $o(e){var t=Za(e,2);t!==null&&ft(t,e,2)}function ku(e){var t=it();if(typeof e=="function"){var a=e;if(e=a(),Ia){da(!0);try{a()}finally{da(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function Jo(e,t,a,n){return e.baseState=a,Mu(e,Te,typeof n=="function"?n:ea)}function qp(e,t,a,n,i){if(Mi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,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,Ko(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Ko(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var u=D.T,d={};D.T=d;try{var m=a(i,n),j=D.S;j!==null&&j(d,m),Fo(e,t,m)}catch(R){Ou(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),D.T=u}}else try{u=a(i,n),Fo(e,t,u)}catch(R){Ou(e,t,R)}}function Fo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Wo(e,t,n)},function(n){return Ou(e,t,n)}):Wo(e,t,a)}function Wo(e,t,a){t.status="fulfilled",t.value=a,Io(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ko(e,a)))}function Ou(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Io(t),t=t.next;while(t!==n)}e.action=null}function Io(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Po(e,t){return t}function ed(e,t){if(be){var a=ke.formState;if(a!==null){e:{var n=oe;if(be){if(Oe){t:{for(var i=Oe,u=zt;i.nodeType!==8;){if(!u){i=null;break t}if(i=Ot(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Oe=Ot(i.nextSibling),n=i.data==="F!";break e}}ga(n)}n=!1}n&&(t=a[0])}}return a=it(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:t},a.queue=n,a=bd.bind(null,oe,n),n.dispatch=a,n=ku(!1),u=qu.bind(null,oe,!1,n.queue),n=it(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=qp.bind(null,oe,i,u,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function td(e){var t=Ze();return ad(t,Te,e)}function ad(e,t,a){if(t=Mu(e,t,Po)[0],e=_i(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=yl(t)}catch(d){throw d===wn?yi:d}else n=t;t=Ze();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(oe.flags|=2048,Mn(9,{destroy:void 0},Yp.bind(null,i,a),null)),[n,u,e]}function Yp(e,t){e.action=t}function nd(e){var t=Ze(),a=Te;if(a!==null)return ad(t,a,e);Ze(),t=t.memoizedState,a=Ze();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Mn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=oe.updateQueue,t===null&&(t=wi(),oe.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 ld(){return Ze().memoizedState}function Ri(e,t,a,n){var i=it();oe.flags|=e,i.memoizedState=Mn(1|t,{destroy:void 0},a,n===void 0?null:n)}function Ai(e,t,a,n){var i=Ze();n=n===void 0?null:n;var u=i.memoizedState.inst;Te!==null&&n!==null&&Eu(n,Te.memoizedState.deps)?i.memoizedState=Mn(t,u,a,n):(oe.flags|=e,i.memoizedState=Mn(1|t,u,a,n))}function id(e,t){Ri(8390656,8,e,t)}function Uu(e,t){Ai(2048,8,e,t)}function Gp(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=wi(),oe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function sd(e){var t=Ze().memoizedState;return Gp({ref:t,nextImpl:e}),function(){if((Se&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ud(e,t){return Ai(4,2,e,t)}function rd(e,t){return Ai(4,4,e,t)}function cd(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 od(e,t,a){a=a!=null?a.concat([e]):null,Ai(4,4,cd.bind(null,t,e),a)}function Du(){}function dd(e,t){var a=Ze();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Eu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function fd(e,t){var a=Ze();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Eu(t,n[1]))return n[0];if(n=e(),Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n}function Hu(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=mf(),oe.lanes|=e,Ea|=e,a)}function hd(e,t,a,n){return vt(a,t)?a:_n.current!==null?(e=Hu(e,a,n),vt(e,t)||(Qe=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(ge&261930)===0?(Qe=!0,e.memoizedState=a):(e=mf(),oe.lanes|=e,Ea|=e,t)}function md(e,t,a,n,i){var u=X.p;X.p=u!==0&&8>u?u:8;var d=D.T,m={};D.T=m,qu(e,!1,t,a);try{var j=i(),R=D.S;if(R!==null&&R(m,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=Hp(j,n);bl(e,t,H,Ct(e))}else bl(e,t,n,Ct(e))}catch(L){bl(e,t,{then:function(){},status:"rejected",reason:L},Ct())}finally{X.p=u,d!==null&&m.types!==null&&(d.types=m.types),D.T=d}}function Zp(){}function Bu(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=pd(e).queue;md(e,i,t,se,a===null?Zp:function(){return gd(e),a(n)})}function pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:se},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gd(e){var t=pd(e);t.next===null&&(t=e.alternate.memoizedState),bl(e,t.next.queue,{},Ct())}function Lu(){return Pe(Dl)}function vd(){return Ze().memoizedState}function yd(){return Ze().memoizedState}function Vp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=ba(a);var n=xa(t,e,a);n!==null&&(ft(n,t,a),ml(n,t,a)),t={cache:mu()},e.payload=t;return}t=t.return}}function Xp(e,t,a){var n=Ct();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mi(e)?xd(t,a):(a=nu(e,t,a,n),a!==null&&(ft(a,e,n),jd(a,t,n)))}function bd(e,t,a){var n=Ct();bl(e,t,a,n)}function bl(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mi(e))xd(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,m=u(d,a);if(i.hasEagerState=!0,i.eagerState=m,vt(m,d))return di(e,t,i,0),ke===null&&oi(),!1}catch{}finally{}if(a=nu(e,t,i,n),a!==null)return ft(a,e,n),jd(a,t,n),!0}return!1}function qu(e,t,a,n){if(n={lane:2,revertLane:yr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Mi(e)){if(t)throw Error(o(479))}else t=nu(e,a,n,2),t!==null&&ft(t,e,2)}function Mi(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function xd(e,t){Rn=Ni=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ec(e,a)}}var xl={readContext:Pe,use:Ti,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};xl.useEffectEvent=Le;var Sd={readContext:Pe,use:Ti,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:id,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ri(4194308,4,cd.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(Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=it();if(a!==void 0){var i=a(t);if(Ia){da(!0);try{a(t)}finally{da(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=Xp.bind(null,oe,e),[n.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=ku(e);var t=e.queue,a=bd.bind(null,oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Du,useDeferredValue:function(e,t){var a=it();return Hu(a,e,t)},useTransition:function(){var e=ku(!1);return e=md.bind(null,oe,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=oe,i=it();if(be){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ke===null)throw Error(o(349));(ge&127)!==0||Zo(n,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,id(Xo.bind(null,n,u,e),[e]),n.flags|=2048,Mn(9,{destroy:void 0},Vo.bind(null,n,u,a,t),null),a},useId:function(){var e=it(),t=ke.identifierPrefix;if(be){var a=Zt,n=Gt;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ei++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Bp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lu,useFormState:ed,useActionState:ed,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=qu.bind(null,oe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Au,useCacheRefresh:function(){return it().memoizedState=Vp.bind(null,oe)},useEffectEvent:function(e){var t=it(),a={impl:e};return t.memoizedState=a,function(){if((Se&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Yu={readContext:Pe,use:Ti,useCallback:dd,useContext:Pe,useEffect:Uu,useImperativeHandle:od,useInsertionEffect:ud,useLayoutEffect:rd,useMemo:fd,useReducer:_i,useRef:ld,useState:function(){return _i(ea)},useDebugValue:Du,useDeferredValue:function(e,t){var a=Ze();return hd(a,Te.memoizedState,e,t)},useTransition:function(){var e=_i(ea)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:yl(e),t]},useSyncExternalStore:Go,useId:vd,useHostTransitionStatus:Lu,useFormState:td,useActionState:td,useOptimistic:function(e,t){var a=Ze();return Jo(a,Te,e,t)},useMemoCache:Au,useCacheRefresh:yd};Yu.useEffectEvent=sd;var Cd={readContext:Pe,use:Ti,useCallback:dd,useContext:Pe,useEffect:Uu,useImperativeHandle:od,useInsertionEffect:ud,useLayoutEffect:rd,useMemo:fd,useReducer:zu,useRef:ld,useState:function(){return zu(ea)},useDebugValue:Du,useDeferredValue:function(e,t){var a=Ze();return Te===null?Hu(a,e,t):hd(a,Te.memoizedState,e,t)},useTransition:function(){var e=zu(ea)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:yl(e),t]},useSyncExternalStore:Go,useId:vd,useHostTransitionStatus:Lu,useFormState:nd,useActionState:nd,useOptimistic:function(e,t){var a=Ze();return Te!==null?Jo(a,Te,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Au,useCacheRefresh:yd};Cd.useEffectEvent=sd;function Gu(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=ba(n);i.payload=t,a!=null&&(i.callback=a),t=xa(e,i,n),t!==null&&(ft(t,e,n),ml(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=ba(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=xa(e,i,n),t!==null&&(ft(t,e,n),ml(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ct(),n=ba(a);n.tag=2,t!=null&&(n.callback=t),t=xa(e,n,a),t!==null&&(ft(t,e,a),ml(t,e,a))}};function Nd(e,t,a,n,i,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!sl(a,n)||!sl(i,u):!0}function Ed(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&&Zu.enqueueReplaceState(t,t.state,null)}function Pa(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=x({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function wd(e){ci(e)}function Td(e){console.error(e)}function _d(e){ci(e)}function zi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Rd(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Vu(e,t,a){return a=ba(a),a.tag=3,a.payload={element:null},a.callback=function(){zi(e,t)},a}function Ad(e){return e=ba(e),e.tag=3,e}function Md(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=n.value;e.payload=function(){return i(u)},e.callback=function(){Rd(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Rd(t,a,n),typeof i!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function Qp(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Cn(t,a,i,!0),a=bt.current,a!==null){switch(a.tag){case 31:case 13:return kt===null?Vi():a.alternate===null&&qe===0&&(qe=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===bi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),pr(e,n,i)),!1;case 22:return a.flags|=65536,n===bi?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)),pr(e,n,i)),!1}throw Error(o(435,a.tag))}return pr(e,n,i),Vi(),!1}if(be)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==cu&&(e=Error(o(422),{cause:n}),cl(Rt(e,a)))):(n!==cu&&(t=Error(o(423),{cause:n}),cl(Rt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=Rt(n,a),i=Vu(e.stateNode,n,i),xu(e,i),qe!==4&&(qe=2)),!1;var u=Error(o(520),{cause:n});if(u=Rt(u,a),_l===null?_l=[u]:_l.push(u),qe!==4&&(qe=2),t===null)return!0;n=Rt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=Vu(a.stateNode,n,e),xu(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"&&(wa===null||!wa.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Ad(i),Md(i,e,a,n),xu(a,i),!1}a=a.return}while(a!==null);return!1}var Xu=Error(o(461)),Qe=!1;function et(e,t,a,n){t.child=e===null?Uo(t,null,a,n):Wa(t,e.child,a,n)}function zd(e,t,a,n,i){a=a.render;var u=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return $a(t),n=wu(e,t,a,d,u,i),m=Tu(),e!==null&&!Qe?(_u(e,t,i),ta(e,t,i)):(be&&m&&uu(t),t.flags|=1,et(e,t,n,i),t.child)}function kd(e,t,a,n,i){if(e===null){var u=a.type;return typeof u=="function"&&!lu(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Od(e,t,u,n,i)):(e=hi(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Pu(e,i)){var d=u.memoizedProps;if(a=a.compare,a=a!==null?a:sl,a(d,n)&&e.ref===t.ref)return ta(e,t,i)}return t.flags|=1,e=Kt(u,n),e.ref=t.ref,e.return=t,t.child=e}function Od(e,t,a,n,i){if(e!==null){var u=e.memoizedProps;if(sl(u,n)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=n=u,Pu(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,ta(e,t,i)}return Qu(e,t,a,n,i)}function Ud(e,t,a,n){var i=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,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~u}else n=0,t.child=null;return Dd(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vi(t,u!==null?u.cachePool:null),u!==null?Bo(t,u):Su(),Lo(t);else return n=t.lanes=536870912,Dd(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(vi(t,u.cachePool),Bo(t,u),Sa(),t.memoizedState=null):(e!==null&&vi(t,null),Su(),Sa());return et(e,t,i,a),t.child}function jl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Dd(e,t,a,n,i){var u=gu();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&vi(t,null),Su(),Lo(t),e!==null&&Cn(e,t,n,!0),t.childLanes=i,null}function ki(e,t){return t=Ui({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hd(e,t,a){return Wa(t,e.child,null,a),e=ki(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function $p(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(n.mode==="hidden")return e=ki(t,n),t.lanes=536870912,jl(null,e);if(Nu(t),(e=Oe)?(e=Ff(e,zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=xo(e),a.return=t,t.child=a,Ie=t,Oe=null)):e=null,e===null)throw ga(t);return t.lanes=536870912,null}return ki(t,n)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Nu(t),i)if(t.flags&256)t.flags&=-257,t=Hd(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),i=(a&e.childLanes)!==0,Qe||i){if(n=ke,n!==null&&(d=wc(n,a),d!==0&&d!==u.retryLane))throw u.retryLane=d,Za(e,d),ft(n,e,d),Xu;Vi(),t=Hd(e,t,a)}else e=u.treeContext,Oe=Ot(d.nextSibling),Ie=t,be=!0,pa=null,zt=!1,e!==null&&Co(t,e),t=ki(t,n),t.flags|=4096;return t}return e=Kt(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oi(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 Qu(e,t,a,n,i){return $a(t),a=wu(e,t,a,n,void 0,i),n=Tu(),e!==null&&!Qe?(_u(e,t,i),ta(e,t,i)):(be&&n&&uu(t),t.flags|=1,et(e,t,a,i),t.child)}function Bd(e,t,a,n,i,u){return $a(t),t.updateQueue=null,a=Yo(t,n,a,i),qo(e),n=Tu(),e!==null&&!Qe?(_u(e,t,u),ta(e,t,u)):(be&&n&&uu(t),t.flags|=1,et(e,t,a,u),t.child)}function Ld(e,t,a,n,i){if($a(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=Zu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},yu(t),d=a.contextType,u.context=typeof d=="object"&&d!==null?Pe(d):bn,u.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(Gu(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&&Zu.enqueueReplaceState(u,u.state,null),gl(t,n,u,i),pl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,j=Pa(a,m);u.props=j;var R=u.context,H=a.contextType;d=bn,typeof H=="object"&&H!==null&&(d=Pe(H));var L=a.getDerivedStateFromProps;H=typeof L=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,H||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||R!==d)&&Ed(t,u,n,d),ya=!1;var M=t.memoizedState;u.state=M,gl(t,n,u,i),pl(),R=t.memoizedState,m||M!==R||ya?(typeof L=="function"&&(Gu(t,a,L,n),R=t.memoizedState),(j=ya||Nd(t,a,j,n,M,R,d))?(H||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=j):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,bu(e,t),d=t.memoizedProps,H=Pa(a,d),u.props=H,L=t.pendingProps,M=u.context,R=a.contextType,j=bn,typeof R=="object"&&R!==null&&(j=Pe(R)),m=a.getDerivedStateFromProps,(R=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==L||M!==j)&&Ed(t,u,n,j),ya=!1,M=t.memoizedState,u.state=M,gl(t,n,u,i),pl();var k=t.memoizedState;d!==L||M!==k||ya||e!==null&&e.dependencies!==null&&pi(e.dependencies)?(typeof m=="function"&&(Gu(t,a,m,n),k=t.memoizedState),(H=ya||Nd(t,a,H,n,M,k,j)||e!==null&&e.dependencies!==null&&pi(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,k,j),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,k,j)),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=k),u.props=n,u.state=k,u.context=j,n=H):(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,Oi(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=Wa(t,e.child,null,i),t.child=Wa(t,null,a,i)):et(e,t,a,i),t.memoizedState=u.state,e=t.child):e=ta(e,t,i),e}function qd(e,t,a,n){return Xa(),t.flags|=256,et(e,t,a,n),t.child}var $u={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ju(e){return{baseLanes:e,cachePool:Ro()}}function Ku(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=St),e}function Yd(e,t,a){var n=t.pendingProps,i=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(i?ja(t):Sa(),(e=Oe)?(e=Ff(e,zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=xo(e),a.return=t,t.child=a,Ie=t,Oe=null)):e=null,e===null)throw ga(t);return Mr(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,i?(Sa(),i=t.mode,m=Ui({mode:"hidden",children:m},i),n=Va(n,i,a,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=Ju(a),n.childLanes=Ku(e,d,a),t.memoizedState=$u,jl(null,n)):(ja(t),Fu(t,m))}var j=e.memoizedState;if(j!==null&&(m=j.dehydrated,m!==null)){if(u)t.flags&256?(ja(t),t.flags&=-257,t=Wu(e,t,a)):t.memoizedState!==null?(Sa(),t.child=e.child,t.flags|=128,t=null):(Sa(),m=n.fallback,i=t.mode,n=Ui({mode:"visible",children:n.children},i),m=Va(m,i,a,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,Wa(t,e.child,null,a),n=t.child,n.memoizedState=Ju(a),n.childLanes=Ku(e,d,a),t.memoizedState=$u,t=jl(null,n));else if(ja(t),Mr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var R=d.dgst;d=R,n=Error(o(419)),n.stack="",n.digest=d,cl({value:n,source:null,stack:null}),t=Wu(e,t,a)}else if(Qe||Cn(e,t,a,!1),d=(a&e.childLanes)!==0,Qe||d){if(d=ke,d!==null&&(n=wc(d,a),n!==0&&n!==j.retryLane))throw j.retryLane=n,Za(e,n),ft(d,e,n),Xu;Ar(m)||Vi(),t=Wu(e,t,a)}else Ar(m)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Oe=Ot(m.nextSibling),Ie=t,be=!0,pa=null,zt=!1,e!==null&&Co(t,e),t=Fu(t,n.children),t.flags|=4096);return t}return i?(Sa(),m=n.fallback,i=t.mode,j=e.child,R=j.sibling,n=Kt(j,{mode:"hidden",children:n.children}),n.subtreeFlags=j.subtreeFlags&65011712,R!==null?m=Kt(R,m):(m=Va(m,i,a,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,jl(null,n),n=t.child,m=e.child.memoizedState,m===null?m=Ju(a):(i=m.cachePool,i!==null?(j=Ve._currentValue,i=i.parent!==j?{parent:j,pool:j}:i):i=Ro(),m={baseLanes:m.baseLanes|a,cachePool:i}),n.memoizedState=m,n.childLanes=Ku(e,d,a),t.memoizedState=$u,jl(e.child,n)):(ja(t),a=e.child,e=a.sibling,a=Kt(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 Fu(e,t){return t=Ui({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ui(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Wu(e,t,a){return Wa(t,e.child,null,a),e=Fu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gd(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),fu(e.return,t,a)}function Iu(e,t,a,n,i,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=i,d.treeForkCount=u)}function Zd(e,t,a){var n=t.pendingProps,i=n.revealOrder,u=n.tail;n=n.children;var d=Ge.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,W(Ge,d),et(e,t,n,a),n=be?rl:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gd(e,a,t);else if(e.tag===19)Gd(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(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Ci(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),Iu(t,!1,i,a,u,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ci(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Iu(t,!0,a,null,u,n);break;case"together":Iu(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ta(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=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Pu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pi(e)))}function Jp(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),va(t,Ve,e.memoizedState.cache),Xa();break;case 27:case 5:$n(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Yd(e,t,a):(ja(t),e=ta(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Cn(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return Zd(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),W(Ge,Ge.current),n)break;return null;case 22:return t.lanes=0,Ud(e,t,a,t.pendingProps);case 24:va(t,Ve,e.memoizedState.cache)}return ta(e,t,a)}function Vd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!Pu(e,a)&&(t.flags&128)===0)return Qe=!1,Jp(e,t,a);Qe=(e.flags&131072)!==0}else Qe=!1,be&&(t.flags&1048576)!==0&&So(t,rl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ka(t.elementType),t.type=e,typeof e=="function")lu(e)?(n=Pa(e,n),t.tag=1,t=Ld(null,t,e,n,a)):(t.tag=0,t=Qu(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===le){t.tag=11,t=zd(null,t,e,n,a);break e}else if(i===E){t.tag=14,t=kd(null,t,e,n,a);break e}}throw t=pe(e)||e,Error(o(306,t,""))}}return t;case 0:return Qu(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Pa(n,t.pendingProps),Ld(e,t,n,i,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;i=u.element,bu(e,t),gl(t,n,null,a);var d=t.memoizedState;if(n=d.cache,va(t,Ve,n),n!==u.cache&&hu(t,[Ve],a,!0),pl(),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=qd(e,t,n,a);break e}else if(n!==i){i=Rt(Error(o(424)),t),cl(i),t=qd(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(Oe=Ot(e.firstChild),Ie=t,be=!0,pa=null,zt=!0,a=Uo(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xa(),n===i){t=ta(e,t,a);break e}et(e,t,n,a)}t=t.child}return t;case 26:return Oi(e,t),e===null?(a=ah(t.type,null,t.pendingProps,null))?t.memoizedState=a:be||(a=t.type,e=t.pendingProps,n=Wi(fe.current).createElement(a),n[We]=t,n[st]=e,tt(n,a,e),Ke(n),t.stateNode=n):t.memoizedState=ah(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $n(t),e===null&&be&&(n=t.stateNode=Pf(t.type,t.pendingProps,fe.current),Ie=t,zt=!0,i=Oe,Aa(t.type)?(zr=i,Oe=Ot(n.firstChild)):Oe=i),et(e,t,t.pendingProps.children,a),Oi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((i=n=Oe)&&(n=Ng(n,t.type,t.pendingProps,zt),n!==null?(t.stateNode=n,Ie=t,Oe=Ot(n.firstChild),zt=!1,i=!0):i=!1),i||ga(t)),$n(t),i=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,Tr(i,u)?n=null:d!==null&&Tr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=wu(e,t,Lp,null,null,a),Dl._currentValue=i),Oi(e,t),et(e,t,n,a),t.child;case 6:return e===null&&be&&((e=a=Oe)&&(a=Eg(a,t.pendingProps,zt),a!==null?(t.stateNode=a,Ie=t,Oe=null,e=!0):e=!1),e||ga(t)),null;case 13:return Yd(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Wa(t,null,n,a):et(e,t,n,a),t.child;case 11:return zd(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,va(t,t.type,n.value),et(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,$a(t),i=Pe(i),n=n(i),t.flags|=1,et(e,t,n,a),t.child;case 14:return kd(e,t,t.type,t.pendingProps,a);case 15:return Od(e,t,t.type,t.pendingProps,a);case 19:return Zd(e,t,a);case 31:return $p(e,t,a);case 22:return Ud(e,t,a,t.pendingProps);case 24:return $a(t),n=Pe(Ve),e===null?(i=gu(),i===null&&(i=ke,u=mu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:n,cache:i},yu(t),va(t,Ve,i)):((e.lanes&a)!==0&&(bu(e,t),gl(t,null,null,a),pl()),i=e.memoizedState,u=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),va(t,Ve,n)):(n=u.cache,va(t,Ve,n),n!==i.cache&&hu(t,[Ve],a,!0))),et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function aa(e){e.flags|=4}function er(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(yf())e.flags|=8192;else throw Fa=bi,vu}else e.flags&=-16777217}function Xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uh(t))if(yf())e.flags|=8192;else throw Fa=bi,vu}function Di(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Cc():536870912,e.lanes|=t,Un|=t)}function Sl(e,t){if(!be)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 Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Kp(e,t,a){var n=t.pendingProps;switch(ru(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),It(Ve),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Sn(t)?aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ou())),Ue(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(aa(t),u!==null?(Ue(t),Xd(t,u)):(Ue(t),er(t,i,null,n,a))):u?u!==e.memoizedState?(aa(t),Ue(t),Xd(t,u)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&aa(t),Ue(t),er(t,i,e,n,a)),null;case 27:if($l(t),a=fe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=ee.current,Sn(t)?No(t):(e=Pf(i,n,a),t.stateNode=e,aa(t))}return Ue(t),null;case 5:if($l(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(u=ee.current,Sn(t))No(t);else{var d=Wi(fe.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);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(i,{is:n.is}):d.createElement(i)}}u[We]=t,u[st]=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,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&aa(t)}}return Ue(t),er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=fe.current,Sn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=Ie,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Gf(e.nodeValue,a)),e||ga(t,!0)}else e=Wi(e).createTextNode(n),e[We]=t,t.stateNode=e}return Ue(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 Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else a=ou(),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 Ue(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Sn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[We]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else i=ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)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,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Di(t,t.updateQueue),Ue(t),null);case 4:return Ye(),e===null&&Sr(t.stateNode.containerInfo),Ue(t),null;case 10:return It(t.type),Ue(t),null;case 19:if(q(Ge),n=t.memoizedState,n===null)return Ue(t),null;if(i=(t.flags&128)!==0,u=n.rendering,u===null)if(i)Sl(n,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ci(e),u!==null){for(t.flags|=128,Sl(n,!1),e=u.updateQueue,t.updateQueue=e,Di(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)bo(a,e),a=a.sibling;return W(Ge,Ge.current&1|2),be&&Ft(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&mt()>Yi&&(t.flags|=128,i=!0,Sl(n,!1),t.lanes=4194304)}else{if(!i)if(e=Ci(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Di(t,e),Sl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!be)return Ue(t),null}else 2*mt()-n.renderingStartTime>Yi&&a!==536870912&&(t.flags|=128,i=!0,Sl(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,W(Ge,i?a&1|2:a&1),be&&Ft(t,n.treeForkCount),e):(Ue(t),null);case 22:case 23:return xt(t),Cu(),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&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),a=t.updateQueue,a!==null&&Di(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&&q(Ja),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),It(Ve),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Fp(e,t){switch(ru(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(Ve),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $l(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(o(340));Xa()}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));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Ge),null;case 4:return Ye(),null;case 10:return It(t.type),null;case 22:case 23:return xt(t),Cu(),e!==null&&q(Ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(Ve),null;case 25:return null;default:return null}}function Qd(e,t){switch(ru(t),t.tag){case 3:It(Ve),Ye();break;case 26:case 27:case 5:$l(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:q(Ge);break;case 10:It(t.type);break;case 22:case 23:xt(t),Cu(),e!==null&&q(Ja);break;case 24:It(Ve)}}function Cl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;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!==i)}}catch(m){Ee(t,t.return,m)}}function Ca(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){var d=n.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,i=t;var j=a,R=m;try{R()}catch(H){Ee(i,j,H)}}}n=n.next}while(n!==u)}}catch(H){Ee(t,t.return,H)}}function $d(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ho(t,a)}catch(n){Ee(e,e.return,n)}}}function Jd(e,t,a){a.props=Pa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ee(e,t,n)}}function Nl(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(i){Ee(e,t,i)}}function Vt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Ee(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Ee(e,t,i)}else a.current=null}function Kd(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(i){Ee(e,e.return,i)}}function tr(e,t,a){try{var n=e.stateNode;yg(n,e.type,a,t),n[st]=t}catch(i){Ee(e,e.return,i)}}function Fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Aa(e.type)||e.tag===4}function ar(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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&&Aa(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 nr(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=$t));else if(n!==4&&(n===27&&Aa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(nr(e,t,a),e=e.sibling;e!==null;)nr(e,t,a),e=e.sibling}function Hi(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&&Aa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hi(e,t,a),e=e.sibling;e!==null;)Hi(e,t,a),e=e.sibling}function Wd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);tt(t,n,a),t[We]=e,t[st]=a}catch(u){Ee(e,e.return,u)}}var na=!1,$e=!1,lr=!1,Id=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Wp(e,t){if(e=e.containerInfo,Er=ls,e=co(e),Ws(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 i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var d=0,m=-1,j=-1,R=0,H=0,L=e,M=null;t:for(;;){for(var k;L!==a||i!==0&&L.nodeType!==3||(m=d+i),L!==u||n!==0&&L.nodeType!==3||(j=d+n),L.nodeType===3&&(d+=L.nodeValue.length),(k=L.firstChild)!==null;)M=L,L=k;for(;;){if(L===e)break t;if(M===a&&++R===i&&(m=d),M===u&&++H===n&&(j=d),(k=L.nextSibling)!==null)break;L=M,M=L.parentNode}L=k}a=m===-1||j===-1?null:{start:m,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(wr={focusedElem:e,selectionRange:a},ls=!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++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,i=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var I=Pa(a.type,i);e=n.getSnapshotBeforeUpdate(I,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ie){Ee(a,a.return,ie)}}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 Pd(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),n&4&&Cl(5,a);break;case 1:if(ia(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Ee(a,a.return,d)}else{var i=Pa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ee(a,a.return,d)}}n&64&&$d(a),n&512&&Nl(a,a.return);break;case 3:if(ia(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{Ho(e,t)}catch(d){Ee(a,a.return,d)}}break;case 27:t===null&&n&4&&Wd(a);case 26:case 5:ia(e,a),t===null&&n&4&&Kd(a),n&512&&Nl(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),n&4&&af(e,a);break;case 13:ia(e,a),n&4&&nf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=sg.bind(null,a),wg(e,a))));break;case 22:if(n=a.memoizedState!==null||na,!n){t=t!==null&&t.memoizedState!==null||$e,i=na;var u=$e;na=n,($e=t)&&!u?sa(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),na=i,$e=u}break;case 30:break;default:ia(e,a)}}function ef(e){var t=e.alternate;t!==null&&(e.alternate=null,ef(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Os(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,rt=!1;function la(e,t,a){for(a=a.child;a!==null;)tf(e,t,a),a=a.sibling}function tf(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Jn,a)}catch{}switch(a.tag){case 26:$e||Vt(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||Vt(a,t);var n=He,i=rt;Aa(a.type)&&(He=a.stateNode,rt=!1),la(e,t,a),kl(a.stateNode),He=n,rt=i;break;case 5:$e||Vt(a,t);case 6:if(n=He,i=rt,He=null,la(e,t,a),He=n,rt=i,He!==null)if(rt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(u){Ee(a,t,u)}else try{He.removeChild(a.stateNode)}catch(u){Ee(a,t,u)}break;case 18:He!==null&&(rt?(e=He,Jf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Zn(e)):Jf(He,a.stateNode));break;case 4:n=He,i=rt,He=a.stateNode.containerInfo,rt=!0,la(e,t,a),He=n,rt=i;break;case 0:case 11:case 14:case 15:Ca(2,a,t),$e||Ca(4,a,t),la(e,t,a);break;case 1:$e||(Vt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Jd(a,t,n)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:$e=(n=$e)||a.memoizedState!==null,la(e,t,a),$e=n;break;default:la(e,t,a)}}function af(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zn(e)}catch(a){Ee(t,t.return,a)}}}function nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zn(e)}catch(a){Ee(t,t.return,a)}}function Ip(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Id),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Id),t;default:throw Error(o(435,e.tag))}}function Bi(e,t){var a=Ip(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=ug.bind(null,e,n);n.then(i,i)}})}function ct(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],u=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Aa(m.type)){He=m.stateNode,rt=!1;break e}break;case 5:He=m.stateNode,rt=!1;break e;case 3:case 4:He=m.stateNode.containerInfo,rt=!0;break e}m=m.return}if(He===null)throw Error(o(160));tf(u,d,i),He=null,rt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)lf(t,e),t=t.sibling}var Bt=null;function lf(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ct(t,e),ot(e),n&4&&(Ca(3,e,e.return),Cl(3,e),Ca(5,e,e.return));break;case 1:ct(t,e),ot(e),n&512&&($e||a===null||Vt(a,a.return)),n&64&&na&&(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 i=Bt;if(ct(t,e),ot(e),n&512&&($e||a===null||Vt(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,i=i.ownerDocument||i;t:switch(n){case"title":u=i.getElementsByTagName("title")[0],(!u||u[Wn]||u[We]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(n),i.head.insertBefore(u,i.querySelector("head > title"))),tt(u,n,a),u[We]=e,Ke(u),n=u;break e;case"link":var d=ih("link","href",i).get(n+(a.href||""));if(d){for(var m=0;m<d.length;m++)if(u=d[m],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(m,1);break t}}u=i.createElement(n),tt(u,n,a),i.head.appendChild(u);break;case"meta":if(d=ih("meta","content",i).get(n+(a.content||""))){for(m=0;m<d.length;m++)if(u=d[m],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(m,1);break t}}u=i.createElement(n),tt(u,n,a),i.head.appendChild(u);break;default:throw Error(o(468,n))}u[We]=e,Ke(u),n=u}e.stateNode=n}else sh(i,e.type,e.stateNode);else e.stateNode=lh(i,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?sh(i,e.type,e.stateNode):lh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&tr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ct(t,e),ot(e),n&512&&($e||a===null||Vt(a,a.return)),a!==null&&n&4&&tr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ct(t,e),ot(e),n&512&&($e||a===null||Vt(a,a.return)),e.flags&32){i=e.stateNode;try{fn(i,"")}catch(I){Ee(e,e.return,I)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,tr(e,i,a!==null?a.memoizedProps:i)),n&1024&&(lr=!0);break;case 6:if(ct(t,e),ot(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(I){Ee(e,e.return,I)}}break;case 3:if(es=null,i=Bt,Bt=Ii(t.containerInfo),ct(t,e),Bt=i,ot(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Zn(t.containerInfo)}catch(I){Ee(e,e.return,I)}lr&&(lr=!1,sf(e));break;case 4:n=Bt,Bt=Ii(e.stateNode.containerInfo),ct(t,e),ot(e),Bt=n;break;case 12:ct(t,e),ot(e);break;case 31:ct(t,e),ot(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 13:ct(t,e),ot(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qi=mt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 22:i=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,R=na,H=$e;if(na=R||i,$e=H||j,ct(t,e),$e=H,na=R,ot(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||j||na||$e||en(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(u=j.stateNode,i)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=j.stateNode;var L=j.memoizedProps.style,M=L!=null&&L.hasOwnProperty("display")?L.display:null;m.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(I){Ee(j,j.return,I)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(I){Ee(j,j.return,I)}}}else if(t.tag===18){if(a===null){j=t;try{var k=j.stateNode;i?Kf(k,!0):Kf(j.stateNode,!1)}catch(I){Ee(j,j.return,I)}}}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,Bi(e,a))));break;case 19:ct(t,e),ot(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 30:break;case 21:break;default:ct(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Fd(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,u=ar(e);Hi(e,u,i);break;case 5:var d=a.stateNode;a.flags&32&&(fn(d,""),a.flags&=-33);var m=ar(e);Hi(e,m,d);break;case 3:case 4:var j=a.stateNode.containerInfo,R=ar(e);nr(e,R,j);break;default:throw Error(o(161))}}catch(H){Ee(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pd(e,t.alternate,t),t=t.sibling}function en(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),en(t);break;case 1:Vt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Jd(t,t.return,a),en(t);break;case 27:kl(t.stateNode);case 26:case 5:Vt(t,t.return),en(t);break;case 22:t.memoizedState===null&&en(t);break;case 30:en(t);break;default:en(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:sa(i,u,a),Cl(4,u);break;case 1:if(sa(i,u,a),n=u,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(R){Ee(n,n.return,R)}if(n=u,i=n.updateQueue,i!==null){var m=n.stateNode;try{var j=i.shared.hiddenCallbacks;if(j!==null)for(i.shared.hiddenCallbacks=null,i=0;i<j.length;i++)Do(j[i],m)}catch(R){Ee(n,n.return,R)}}a&&d&64&&$d(u),Nl(u,u.return);break;case 27:Wd(u);case 26:case 5:sa(i,u,a),a&&n===null&&d&4&&Kd(u),Nl(u,u.return);break;case 12:sa(i,u,a);break;case 31:sa(i,u,a),a&&d&4&&af(i,u);break;case 13:sa(i,u,a),a&&d&4&&nf(i,u);break;case 22:u.memoizedState===null&&sa(i,u,a),Nl(u,u.return);break;case 30:break;default:sa(i,u,a)}t=t.sibling}}function ir(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&&ol(a))}function sr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ol(e))}function Lt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)uf(e,t,a,n),t=t.sibling}function uf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Lt(e,t,a,n),i&2048&&Cl(9,t);break;case 1:Lt(e,t,a,n);break;case 3:Lt(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ol(e)));break;case 12:if(i&2048){Lt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,m=u.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ee(t,t.return,j)}}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,zn(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&ir(d,t);break;case 24:Lt(e,t,a,n),i&2048&&sr(t.alternate,t);break;default:Lt(e,t,a,n)}}function zn(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,m=a,j=n,R=d.flags;switch(d.tag){case 0:case 11:case 15:zn(u,d,m,j,i),Cl(8,d);break;case 23:break;case 22:var H=d.stateNode;d.memoizedState!==null?H._visibility&2?zn(u,d,m,j,i):El(u,d):(H._visibility|=2,zn(u,d,m,j,i)),i&&R&2048&&ir(d.alternate,d);break;case 24:zn(u,d,m,j,i),i&&R&2048&&sr(d.alternate,d);break;default:zn(u,d,m,j,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:El(a,n),i&2048&&ir(n.alternate,n);break;case 24:El(a,n),i&2048&&sr(n.alternate,n);break;default:El(a,n)}t=t.sibling}}var wl=8192;function kn(e,t,a){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)rf(e,t,a),e=e.sibling}function rf(e,t,a){switch(e.tag){case 26:kn(e,t,a),e.flags&wl&&e.memoizedState!==null&&Bg(a,Bt,e.memoizedState,e.memoizedProps);break;case 5:kn(e,t,a);break;case 3:case 4:var n=Bt;Bt=Ii(e.stateNode.containerInfo),kn(e,t,a),Bt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=wl,wl=16777216,kn(e,t,a),wl=n):kn(e,t,a));break;default:kn(e,t,a)}}function cf(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 Tl(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,df(n,e)}cf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)of(e),e=e.sibling}function of(e){switch(e.tag){case 0:case 11:case 15:Tl(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Tl(e);break;case 12:Tl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Li(e)):Tl(e);break;default:Tl(e)}}function Li(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,df(n,e)}cf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),Li(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Li(t));break;default:Li(t)}e=e.sibling}}function df(e,t){for(;Fe!==null;){var a=Fe;switch(a.tag){case 0:case 11:case 15:Ca(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:ol(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Fe=n;else e:for(a=e;Fe!==null;){n=Fe;var i=n.sibling,u=n.return;if(ef(n),n===a){Fe=null;break e}if(i!==null){i.return=u,Fe=i;break e}Fe=u}}}var Pp={getCacheForType:function(e){var t=Pe(Ve),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ve).controller.signal}},eg=typeof WeakMap=="function"?WeakMap:Map,Se=0,ke=null,he=null,ge=0,Ne=0,jt=null,Na=!1,On=!1,ur=!1,ua=0,qe=0,Ea=0,tn=0,rr=0,St=0,Un=0,_l=null,dt=null,cr=!1,qi=0,ff=0,Yi=1/0,Gi=null,wa=null,Je=0,Ta=null,Dn=null,ra=0,or=0,dr=null,hf=null,Rl=0,fr=null;function Ct(){return(Se&2)!==0&&ge!==0?ge&-ge:D.T!==null?yr():Tc()}function mf(){if(St===0)if((ge&536870912)===0||be){var e=Fl;Fl<<=1,(Fl&3932160)===0&&(Fl=262144),St=e}else St=536870912;return e=bt.current,e!==null&&(e.flags|=32),St}function ft(e,t,a){(e===ke&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)&&(Hn(e,0),_a(e,ge,St,!1)),Fn(e,a),((Se&2)===0||e!==ke)&&(e===ke&&((Se&2)===0&&(tn|=a),qe===4&&_a(e,ge,St,!1)),Xt(e))}function pf(e,t,a){if((Se&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kn(e,t),i=n?ng(e,t):mr(e,t,!0),u=n;do{if(i===0){On&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!tg(a)){i=mr(e,t,!1),u=!1;continue}if(i===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 m=e;i=_l;var j=m.current.memoizedState.isDehydrated;if(j&&(Hn(m,d).flags|=256),d=mr(m,d,!1),d!==2){if(ur&&!j){m.errorRecoveryDisabledLanes|=u,tn|=u,i=4;break e}u=dt,dt=i,u!==null&&(dt===null?dt=u:dt.push.apply(dt,u))}i=d}if(u=!1,i!==2)continue}}if(i===1){Hn(e,0),_a(e,t,0,!0);break}e:{switch(n=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(n,t,St,!Na);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=qi+300-mt(),10<i)){if(_a(n,t,St,!Na),Il(n,0,!0)!==0)break e;ra=t,n.timeoutHandle=Qf(gf.bind(null,n,a,dt,Gi,cr,t,St,tn,Un,Na,u,"Throttled",-0,0),i);break e}gf(n,a,dt,Gi,cr,t,St,tn,Un,Na,u,null,-0,0)}}break}while(!0);Xt(e)}function gf(e,t,a,n,i,u,d,m,j,R,H,L,M,k){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},rf(t,u,L);var I=(u&62914560)===u?qi-mt():(u&4194048)===u?ff-mt():0;if(I=Lg(L,I),I!==null){ra=u,e.cancelPendingCommit=I(Nf.bind(null,e,t,u,a,n,i,d,m,j,H,L,null,M,k)),_a(e,u,d,!R);return}}Nf(e,t,u,a,n,i,d,m,j)}function tg(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 i=a[n],u=i.getSnapshot;i=i.value;try{if(!vt(u(),i))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&=~rr,t&=~tn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var u=31-gt(i),d=1<<u;n[u]=-1,i&=~d}a!==0&&Nc(e,a,t)}function Zi(){return(Se&6)===0?(Al(0),!1):!0}function hr(){if(he!==null){if(Ne===0)var e=he.return;else e=he,Wt=Qa=null,Ru(e),Tn=null,fl=0,e=he;for(;e!==null;)Qd(e.alternate,e),e=e.return;he=null}}function Hn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,jg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,hr(),ke=e,he=a=Kt(e.current,null),ge=t,Ne=0,jt=null,Na=!1,On=Kn(e,t),ur=!1,Un=St=rr=tn=Ea=qe=0,dt=_l=null,cr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-gt(n),u=1<<i;t|=e[i],n&=~u}return ua=t,oi(),a}function vf(e,t){oe=null,D.H=xl,t===wn||t===yi?(t=zo(),Ne=3):t===vu?(t=zo(),Ne=4):Ne=t===Xu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,he===null&&(qe=1,zi(e,Rt(t,e.current)))}function yf(){var e=bt.current;return e===null?!0:(ge&4194048)===ge?kt===null:(ge&62914560)===ge||(ge&536870912)!==0?e===kt:!1}function bf(){var e=D.H;return D.H=xl,e===null?xl:e}function xf(){var e=D.A;return D.A=Pp,e}function Vi(){qe=4,Na||(ge&4194048)!==ge&&bt.current!==null||(On=!0),(Ea&134217727)===0&&(tn&134217727)===0||ke===null||_a(ke,ge,St,!1)}function mr(e,t,a){var n=Se;Se|=2;var i=bf(),u=xf();(ke!==e||ge!==t)&&(Gi=null,Hn(e,t)),t=!1;var d=qe;e:do try{if(Ne!==0&&he!==null){var m=he,j=jt;switch(Ne){case 8:hr(),d=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var R=Ne;if(Ne=0,jt=null,Bn(e,m,j,R),a&&On){d=0;break e}break;default:R=Ne,Ne=0,jt=null,Bn(e,m,j,R)}}ag(),d=qe;break}catch(H){vf(e,H)}while(!0);return t&&e.shellSuspendCounter++,Wt=Qa=null,Se=n,D.H=i,D.A=u,he===null&&(ke=null,ge=0,oi()),d}function ag(){for(;he!==null;)jf(he)}function ng(e,t){var a=Se;Se|=2;var n=bf(),i=xf();ke!==e||ge!==t?(Gi=null,Yi=mt()+500,Hn(e,t)):On=Kn(e,t);e:do try{if(Ne!==0&&he!==null){t=he;var u=jt;t:switch(Ne){case 1:Ne=0,jt=null,Bn(e,t,u,1);break;case 2:case 9:if(Ao(u)){Ne=0,jt=null,Sf(t);break}t=function(){Ne!==2&&Ne!==9||ke!==e||(Ne=7),Xt(e)},u.then(t,t);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:Ao(u)?(Ne=0,jt=null,Sf(t)):(Ne=0,jt=null,Bn(e,t,u,7));break;case 5:var d=null;switch(he.tag){case 26:d=he.memoizedState;case 5:case 27:var m=he;if(d?uh(d):m.stateNode.complete){Ne=0,jt=null;var j=m.sibling;if(j!==null)he=j;else{var R=m.return;R!==null?(he=R,Xi(R)):he=null}break t}}Ne=0,jt=null,Bn(e,t,u,5);break;case 6:Ne=0,jt=null,Bn(e,t,u,6);break;case 8:hr(),qe=6;break e;default:throw Error(o(462))}}lg();break}catch(H){vf(e,H)}while(!0);return Wt=Qa=null,D.H=n,D.A=i,Se=a,he!==null?0:(ke=null,ge=0,oi(),qe)}function lg(){for(;he!==null&&!Tm();)jf(he)}function jf(e){var t=Vd(e.alternate,e,ua);e.memoizedProps=e.pendingProps,t===null?Xi(e):he=t}function Sf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Bd(a,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=Bd(a,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:Ru(t);default:Qd(a,t),t=he=bo(t,ua),t=Vd(a,t,ua)}e.memoizedProps=e.pendingProps,t===null?Xi(e):he=t}function Bn(e,t,a,n){Wt=Qa=null,Ru(t),Tn=null,fl=0;var i=t.return;try{if(Qp(e,i,t,a,ge)){qe=1,zi(e,Rt(a,e.current)),he=null;return}}catch(u){if(i!==null)throw he=i,u;qe=1,zi(e,Rt(a,e.current)),he=null;return}t.flags&32768?(be||n===1?e=!0:On||(ge&536870912)!==0?e=!1:(Na=e=!0,(n===2||n===9||n===3||n===6)&&(n=bt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Cf(t,e)):Xi(t)}function Xi(e){var t=e;do{if((t.flags&32768)!==0){Cf(t,Na);return}e=t.return;var a=Kp(t.alternate,t,ua);if(a!==null){he=a;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);qe===0&&(qe=5)}function Cf(e,t){do{var a=Fp(e.alternate,e);if(a!==null){a.flags&=32767,he=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=a}while(e!==null);qe=6,he=null}function Nf(e,t,a,n,i,u,d,m,j){e.cancelPendingCommit=null;do Qi();while(Je!==0);if((Se&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=au,Hm(e,a,u,d,m,j),e===ke&&(he=ke=null,ge=0),Dn=t,Ta=e,ra=a,or=u,dr=i,hf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rg(Jl,function(){return Rf(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,i=X.p,X.p=2,d=Se,Se|=4;try{Wp(e,t,a)}finally{Se=d,X.p=i,D.T=n}}Je=1,Ef(),wf(),Tf()}}function Ef(){if(Je===1){Je=0;var e=Ta,t=Dn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var n=X.p;X.p=2;var i=Se;Se|=4;try{lf(t,e);var u=wr,d=co(e.containerInfo),m=u.focusedElem,j=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&ro(m.ownerDocument.documentElement,m)){if(j!==null&&Ws(m)){var R=j.start,H=j.end;if(H===void 0&&(H=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(H,m.value.length);else{var L=m.ownerDocument||document,M=L&&L.defaultView||window;if(M.getSelection){var k=M.getSelection(),I=m.textContent.length,ie=Math.min(j.start,I),Re=j.end===void 0?ie:Math.min(j.end,I);!k.extend&&ie>Re&&(d=Re,Re=ie,ie=d);var w=uo(m,ie),C=uo(m,Re);if(w&&C&&(k.rangeCount!==1||k.anchorNode!==w.node||k.anchorOffset!==w.offset||k.focusNode!==C.node||k.focusOffset!==C.offset)){var _=L.createRange();_.setStart(w.node,w.offset),k.removeAllRanges(),ie>Re?(k.addRange(_),k.extend(C.node,C.offset)):(_.setEnd(C.node,C.offset),k.addRange(_))}}}}for(L=[],k=m;k=k.parentNode;)k.nodeType===1&&L.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<L.length;m++){var B=L[m];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ls=!!Er,wr=Er=null}finally{Se=i,X.p=n,D.T=a}}e.current=t,Je=2}}function wf(){if(Je===2){Je=0;var e=Ta,t=Dn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var n=X.p;X.p=2;var i=Se;Se|=4;try{Pd(e,t.alternate,t)}finally{Se=i,X.p=n,D.T=a}}Je=3}}function Tf(){if(Je===4||Je===3){Je=0,_m();var e=Ta,t=Dn,a=ra,n=hf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Dn=Ta=null,_f(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(wa=null),zs(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Jn,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,i=X.p,X.p=2,D.T=null;try{for(var u=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];u(m.value,{componentStack:m.stack})}}finally{D.T=t,X.p=i}}(ra&3)!==0&&Qi(),Xt(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===fr?Rl++:(Rl=0,fr=e):Rl=0,Al(0)}}function _f(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ol(t)))}function Qi(){return Ef(),wf(),Tf(),Rf()}function Rf(){if(Je!==5)return!1;var e=Ta,t=or;or=0;var a=zs(ra),n=D.T,i=X.p;try{X.p=32>a?32:a,D.T=null,a=dr,dr=null;var u=Ta,d=ra;if(Je=0,Dn=Ta=null,ra=0,(Se&6)!==0)throw Error(o(331));var m=Se;if(Se|=4,of(u.current),uf(u,u.current,d,a),Se=m,Al(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Jn,u)}catch{}return!0}finally{X.p=i,D.T=n,_f(e,t)}}function Af(e,t,a){t=Rt(a,t),t=Vu(e.stateNode,t,2),e=xa(e,t,2),e!==null&&(Fn(e,2),Xt(e))}function Ee(e,t,a){if(e.tag===3)Af(e,e,a);else for(;t!==null;){if(t.tag===3){Af(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wa===null||!wa.has(n))){e=Rt(a,e),a=Ad(2),n=xa(t,a,2),n!==null&&(Md(a,n,t,e),Fn(n,2),Xt(n));break}}t=t.return}}function pr(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new eg;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(ur=!0,i.add(a),e=ig.bind(null,e,t,a),t.then(e,e))}function ig(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ke===e&&(ge&a)===a&&(qe===4||qe===3&&(ge&62914560)===ge&&300>mt()-qi?(Se&2)===0&&Hn(e,0):rr|=a,Un===ge&&(Un=0)),Xt(e)}function Mf(e,t){t===0&&(t=Cc()),e=Za(e,t),e!==null&&(Fn(e,t),Xt(e))}function sg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Mf(e,a)}function ug(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.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),Mf(e,a)}function rg(e,t){return _s(e,t)}var $i=null,Ln=null,gr=!1,Ji=!1,vr=!1,Ra=0;function Xt(e){e!==Ln&&e.next===null&&(Ln===null?$i=Ln=e:Ln=Ln.next=e),Ji=!0,gr||(gr=!0,og())}function Al(e,t){if(!vr&&Ji){vr=!0;do for(var a=!1,n=$i;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var u=0;else{var d=n.suspendedLanes,m=n.pingedLanes;u=(1<<31-gt(42|e)+1)-1,u&=i&~(d&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Uf(n,u))}else u=ge,u=Il(n,n===ke?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Kn(n,u)||(a=!0,Uf(n,u));n=n.next}while(a);vr=!1}}function cg(){zf()}function zf(){Ji=gr=!1;var e=0;Ra!==0&&xg()&&(e=Ra);for(var t=mt(),a=null,n=$i;n!==null;){var i=n.next,u=kf(n,t);u===0?(n.next=null,a===null?$i=i:a.next=i,i===null&&(Ln=a)):(a=n,(e!==0||(u&3)!==0)&&(Ji=!0)),n=i}Je!==0&&Je!==5||Al(e),Ra!==0&&(Ra=0)}function kf(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-gt(u),m=1<<d,j=i[d];j===-1?((m&a)===0||(m&n)!==0)&&(i[d]=Dm(m,t)):j<=t&&(e.expiredLanes|=m),u&=~m}if(t=ke,a=ge,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Rs(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Rs(n),zs(a)){case 2:case 8:a=jc;break;case 32:a=Jl;break;case 268435456:a=Sc;break;default:a=Jl}return n=Of.bind(null,e),a=_s(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Rs(n),e.callbackPriority=2,e.callbackNode=null,2}function Of(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Qi()&&e.callbackNode!==a)return null;var n=ge;return n=Il(e,e===ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(pf(e,n,t),kf(e,mt()),e.callbackNode!=null&&e.callbackNode===a?Of.bind(null,e):null)}function Uf(e,t){if(Qi())return null;pf(e,t,!0)}function og(){Sg(function(){(Se&6)!==0?_s(xc,cg):zf()})}function yr(){if(Ra===0){var e=Nn;e===0&&(e=Kl,Kl<<=1,(Kl&261888)===0&&(Kl=256)),Ra=e}return Ra}function Df(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ai(""+e)}function Hf(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 dg(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var u=Df((i[st]||null).action),d=n.submitter;d&&(t=(t=d[st]||null)?Df(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var m=new si("action","action",null,n,i);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ra!==0){var j=d?Hf(i,d):new FormData(i);Bu(a,{pending:!0,data:j,method:i.method,action:u},null,j)}}else typeof u=="function"&&(m.preventDefault(),j=d?Hf(i,d):new FormData(i),Bu(a,{pending:!0,data:j,method:i.method,action:u},u,j))},currentTarget:i}]})}}for(var br=0;br<tu.length;br++){var xr=tu[br],fg=xr.toLowerCase(),hg=xr[0].toUpperCase()+xr.slice(1);Ht(fg,"on"+hg)}Ht(ho,"onAnimationEnd"),Ht(mo,"onAnimationIteration"),Ht(po,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(Rp,"onTransitionRun"),Ht(Ap,"onTransitionStart"),Ht(Mp,"onTransitionCancel"),Ht(go,"onTransitionEnd"),on("onMouseEnter",["mouseout","mouseover"]),on("onMouseLeave",["mouseout","mouseover"]),on("onPointerEnter",["pointerout","pointerover"]),on("onPointerLeave",["pointerout","pointerover"]),La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),La("onBeforeInput",["compositionend","keypress","textInput","paste"]),La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),La("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(" "),mg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Bf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[d],j=m.instance,R=m.currentTarget;if(m=m.listener,j!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(H){ci(H)}i.currentTarget=null,u=j}else for(d=0;d<n.length;d++){if(m=n[d],j=m.instance,R=m.currentTarget,m=m.listener,j!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(H){ci(H)}i.currentTarget=null,u=j}}}}function me(e,t){var a=t[ks];a===void 0&&(a=t[ks]=new Set);var n=e+"__bubble";a.has(n)||(Lf(t,e,2,!1),a.add(n))}function jr(e,t,a){var n=0;t&&(n|=4),Lf(a,e,n,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[Ki]){e[Ki]=!0,Ac.forEach(function(a){a!=="selectionchange"&&(mg.has(a)||jr(a,!1,e),jr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,jr("selectionchange",!1,t))}}function Lf(e,t,a,n){switch(mh(t)){case 2:var i=Gg;break;case 8:i=Zg;break;default:i=Hr}a=i.bind(null,t,a,e),i=void 0,!Gs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Cr(e,t,a,n,i){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 m=n.stateNode.containerInfo;if(m===i)break;if(d===4)for(d=n.return;d!==null;){var j=d.tag;if((j===3||j===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;m!==null;){if(d=un(m),d===null)return;if(j=d.tag,j===5||j===6||j===26||j===27){n=u=d;continue e}m=m.parentNode}}n=n.return}Gc(function(){var R=u,H=qs(a),L=[];e:{var M=vo.get(e);if(M!==void 0){var k=si,I=e;switch(e){case"keypress":if(li(a)===0)break e;case"keydown":case"keyup":k=up;break;case"focusin":I="focus",k=Qs;break;case"focusout":I="blur",k=Qs;break;case"beforeblur":case"afterblur":k=Qs;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":k=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Km;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=op;break;case ho:case mo:case po:k=Im;break;case go:k=fp;break;case"scroll":case"scrollend":k=$m;break;case"wheel":k=mp;break;case"copy":case"cut":case"paste":k=ep;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=$c;break;case"toggle":case"beforetoggle":k=gp}var ie=(t&4)!==0,Re=!ie&&(e==="scroll"||e==="scrollend"),w=ie?M!==null?M+"Capture":null:M;ie=[];for(var C=R,_;C!==null;){var B=C;if(_=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||_===null||w===null||(B=Pn(C,w),B!=null&&ie.push(zl(C,B,_))),Re)break;C=C.return}0<ie.length&&(M=new k(M,I,null,a,H),L.push({event:M,listeners:ie}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",M&&a!==Ls&&(I=a.relatedTarget||a.fromElement)&&(un(I)||I[sn]))break e;if((k||M)&&(M=H.window===H?H:(M=H.ownerDocument)?M.defaultView||M.parentWindow:window,k?(I=a.relatedTarget||a.toElement,k=R,I=I?un(I):null,I!==null&&(Re=h(I),ie=I.tag,I!==Re||ie!==5&&ie!==27&&ie!==6)&&(I=null)):(k=null,I=R),k!==I)){if(ie=Xc,B="onMouseLeave",w="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ie=$c,B="onPointerLeave",w="onPointerEnter",C="pointer"),Re=k==null?M:In(k),_=I==null?M:In(I),M=new ie(B,C+"leave",k,a,H),M.target=Re,M.relatedTarget=_,B=null,un(H)===R&&(ie=new ie(w,C+"enter",I,a,H),ie.target=_,ie.relatedTarget=Re,B=ie),Re=B,k&&I)t:{for(ie=pg,w=k,C=I,_=0,B=w;B;B=ie(B))_++;B=0;for(var ne=C;ne;ne=ie(ne))B++;for(;0<_-B;)w=ie(w),_--;for(;0<B-_;)C=ie(C),B--;for(;_--;){if(w===C||C!==null&&w===C.alternate){ie=w;break t}w=ie(w),C=ie(C)}ie=null}else ie=null;k!==null&&qf(L,M,k,ie,!1),I!==null&&Re!==null&&qf(L,Re,I,ie,!0)}}e:{if(M=R?In(R):window,k=M.nodeName&&M.nodeName.toLowerCase(),k==="select"||k==="input"&&M.type==="file")var xe=to;else if(Pc(M))if(ao)xe=wp;else{xe=Np;var te=Cp}else k=M.nodeName,!k||k.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?R&&Bs(R.elementType)&&(xe=to):xe=Ep;if(xe&&(xe=xe(e,R))){eo(L,xe,a,H);break e}te&&te(e,M,R),e==="focusout"&&R&&M.type==="number"&&R.memoizedProps.value!=null&&Hs(M,"number",M.value)}switch(te=R?In(R):window,e){case"focusin":(Pc(te)||te.contentEditable==="true")&&(gn=te,Is=R,ul=null);break;case"focusout":ul=Is=gn=null;break;case"mousedown":Ps=!0;break;case"contextmenu":case"mouseup":case"dragend":Ps=!1,oo(L,a,H);break;case"selectionchange":if(_p)break;case"keydown":case"keyup":oo(L,a,H)}var de;if(Js)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else pn?Wc(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Jc&&a.locale!=="ko"&&(pn||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&pn&&(de=Zc()):(ha=H,Zs="value"in ha?ha.value:ha.textContent,pn=!0)),te=Fi(R,ve),0<te.length&&(ve=new Qc(ve,e,null,a,H),L.push({event:ve,listeners:te}),de?ve.data=de:(de=Ic(a),de!==null&&(ve.data=de)))),(de=yp?bp(e,a):xp(e,a))&&(ve=Fi(R,"onBeforeInput"),0<ve.length&&(te=new Qc("onBeforeInput","beforeinput",null,a,H),L.push({event:te,listeners:ve}),te.data=de)),dg(L,e,R,a,H)}Bf(L,t)})}function zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Fi(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Pn(e,a),i!=null&&n.unshift(zl(e,i,u)),i=Pn(e,t),i!=null&&n.push(zl(e,i,u))),e.tag===3)return n;e=e.return}return[]}function pg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qf(e,t,a,n,i){for(var u=t._reactName,d=[];a!==null&&a!==n;){var m=a,j=m.alternate,R=m.stateNode;if(m=m.tag,j!==null&&j===n)break;m!==5&&m!==26&&m!==27||R===null||(j=R,i?(R=Pn(a,u),R!=null&&d.unshift(zl(a,R,j))):i||(R=Pn(a,u),R!=null&&d.push(zl(a,R,j)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var gg=/\r\n?/g,vg=/\u0000|\uFFFD/g;function Yf(e){return(typeof e=="string"?e:""+e).replace(gg,`
|
|
49
|
+
`).replace(vg,"")}function Gf(e,t){return t=Yf(t),Yf(e)===t}function _e(e,t,a,n,i,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":ei(e,"class",n);break;case"tabIndex":ei(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ei(e,a,n);break;case"style":qc(e,n,u);break;case"data":if(t!=="object"){ei(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=ai(""+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"&&_e(e,t,"name",i.name,i,null),_e(e,t,"formEncType",i.formEncType,i,null),_e(e,t,"formMethod",i.formMethod,i,null),_e(e,t,"formTarget",i.formTarget,i,null)):(_e(e,t,"encType",i.encType,i,null),_e(e,t,"method",i.method,i,null),_e(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ai(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=$t);break;case"onScroll":n!=null&&me("scroll",e);break;case"onScrollEnd":n!=null&&me("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(i.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=ai(""+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":me("beforetoggle",e),me("toggle",e),Pl(e,"popover",n);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Pl(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=Xm.get(a)||a,Pl(e,a,n))}}function Nr(e,t,a,n,i,u){switch(a){case"style":qc(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(i.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&&me("scroll",e);break;case"onScrollEnd":n!=null&&me("scrollend",e);break;case"onClick":n!=null&&(e.onclick=$t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),u=e[st]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Pl(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":me("error",e),me("load",e);var n=!1,i=!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":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:_e(e,t,u,d,a,null)}}i&&_e(e,t,"srcSet",a.srcSet,a,null),n&&_e(e,t,"src",a.src,a,null);return;case"input":me("invalid",e);var m=u=d=i=null,j=null,R=null;for(n in a)if(a.hasOwnProperty(n)){var H=a[n];if(H!=null)switch(n){case"name":i=H;break;case"type":d=H;break;case"checked":j=H;break;case"defaultChecked":R=H;break;case"value":u=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:_e(e,t,n,H,a,null)}}Dc(e,u,m,j,R,d,i,!1);return;case"select":me("invalid",e),n=d=u=null;for(i in a)if(a.hasOwnProperty(i)&&(m=a[i],m!=null))switch(i){case"value":u=m;break;case"defaultValue":d=m;break;case"multiple":n=m;default:_e(e,t,i,m,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":me("invalid",e),u=i=n=null;for(d in a)if(a.hasOwnProperty(d)&&(m=a[d],m!=null))switch(d){case"value":n=m;break;case"defaultValue":i=m;break;case"children":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:_e(e,t,d,m,a,null)}Bc(e,n,i,u);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(n=a[j],n!=null))switch(j){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:_e(e,t,j,n,a,null)}return;case"dialog":me("beforetoggle",e),me("toggle",e),me("cancel",e),me("close",e);break;case"iframe":case"object":me("load",e);break;case"video":case"audio":for(n=0;n<Ml.length;n++)me(Ml[n],e);break;case"image":me("error",e),me("load",e);break;case"details":me("toggle",e);break;case"embed":case"source":case"link":me("error",e),me("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:_e(e,t,R,n,a,null)}return;default:if(Bs(t)){for(H in a)a.hasOwnProperty(H)&&(n=a[H],n!==void 0&&Nr(e,t,H,n,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(n=a[m],n!=null&&_e(e,t,m,n,a,null))}function yg(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 i=null,u=null,d=null,m=null,j=null,R=null,H=null;for(k in a){var L=a[k];if(a.hasOwnProperty(k)&&L!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":j=L;default:n.hasOwnProperty(k)||_e(e,t,k,null,n,L)}}for(var M in n){var k=n[M];if(L=a[M],n.hasOwnProperty(M)&&(k!=null||L!=null))switch(M){case"type":u=k;break;case"name":i=k;break;case"checked":R=k;break;case"defaultChecked":H=k;break;case"value":d=k;break;case"defaultValue":m=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,t));break;default:k!==L&&_e(e,t,M,k,n,L)}}Ds(e,d,m,j,R,H,u,i);return;case"select":k=d=m=M=null;for(u in a)if(j=a[u],a.hasOwnProperty(u)&&j!=null)switch(u){case"value":break;case"multiple":k=j;default:n.hasOwnProperty(u)||_e(e,t,u,null,n,j)}for(i in n)if(u=n[i],j=a[i],n.hasOwnProperty(i)&&(u!=null||j!=null))switch(i){case"value":M=u;break;case"defaultValue":m=u;break;case"multiple":d=u;default:u!==j&&_e(e,t,i,u,n,j)}t=m,a=d,n=k,M!=null?dn(e,!!a,M,!1):!!n!=!!a&&(t!=null?dn(e,!!a,t,!0):dn(e,!!a,a?[]:"",!1));return;case"textarea":k=M=null;for(m in a)if(i=a[m],a.hasOwnProperty(m)&&i!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,null,n,i)}for(d in n)if(i=n[d],u=a[d],n.hasOwnProperty(d)&&(i!=null||u!=null))switch(d){case"value":M=i;break;case"defaultValue":k=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&_e(e,t,d,i,n,u)}Hc(e,M,k);return;case"option":for(var I in a)if(M=a[I],a.hasOwnProperty(I)&&M!=null&&!n.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:_e(e,t,I,null,n,M)}for(j in n)if(M=n[j],k=a[j],n.hasOwnProperty(j)&&M!==k&&(M!=null||k!=null))switch(j){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:_e(e,t,j,M,n,k)}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 ie in a)M=a[ie],a.hasOwnProperty(ie)&&M!=null&&!n.hasOwnProperty(ie)&&_e(e,t,ie,null,n,M);for(R in n)if(M=n[R],k=a[R],n.hasOwnProperty(R)&&M!==k&&(M!=null||k!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:_e(e,t,R,M,n,k)}return;default:if(Bs(t)){for(var Re in a)M=a[Re],a.hasOwnProperty(Re)&&M!==void 0&&!n.hasOwnProperty(Re)&&Nr(e,t,Re,void 0,n,M);for(H in n)M=n[H],k=a[H],!n.hasOwnProperty(H)||M===k||M===void 0&&k===void 0||Nr(e,t,H,M,n,k);return}}for(var w in a)M=a[w],a.hasOwnProperty(w)&&M!=null&&!n.hasOwnProperty(w)&&_e(e,t,w,null,n,M);for(L in n)M=n[L],k=a[L],!n.hasOwnProperty(L)||M===k||M==null&&k==null||_e(e,t,L,M,n,k)}function Zf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],u=i.transferSize,d=i.initiatorType,m=i.duration;if(u&&m&&Zf(d)){for(d=0,m=i.responseEnd,n+=1;n<a.length;n++){var j=a[n],R=j.startTime;if(R>m)break;var H=j.transferSize,L=j.initiatorType;H&&Zf(L)&&(j=j.responseEnd,d+=H*(j<m?1:(m-R)/(j-R)))}if(--n,t+=8*(u+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Er=null,wr=null;function Wi(e){return e.nodeType===9?e:e.ownerDocument}function Vf(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 Xf(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 Tr(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 _r=null;function xg(){var e=window.event;return e&&e.type==="popstate"?e===_r?!1:(_r=e,!0):(_r=null,!1)}var Qf=typeof setTimeout=="function"?setTimeout:void 0,jg=typeof clearTimeout=="function"?clearTimeout:void 0,$f=typeof Promise=="function"?Promise:void 0,Sg=typeof queueMicrotask=="function"?queueMicrotask:typeof $f<"u"?function(e){return $f.resolve(null).then(e).catch(Cg)}:Qf;function Cg(e){setTimeout(function(){throw e})}function Aa(e){return e==="head"}function Jf(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Zn(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")kl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,kl(a);for(var u=a.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Wn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=d}}else a==="body"&&kl(e.ownerDocument.body);a=i}while(a);Zn(t)}function Kf(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),Os(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ng(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Wn])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!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ot(e.nextSibling),e===null)break}return null}function Eg(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 Ff(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 Ar(e){return e.data==="$?"||e.data==="$~"}function Mr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function wg(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 zr=null;function Wf(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 If(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 Pf(e,t,a){switch(t=Wi(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 kl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Os(e)}var Ut=new Map,eh=new Set;function Ii(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=X.d;X.d={f:Tg,r:_g,D:Rg,C:Ag,L:Mg,m:zg,X:Og,S:kg,M:Ug};function Tg(){var e=ca.f(),t=Zi();return e||t}function _g(e){var t=rn(e);t!==null&&t.tag===5&&t.type==="form"?gd(t):ca.r(e)}var qn=typeof document>"u"?null:document;function th(e,t,a){var n=qn;if(n&&typeof t=="string"&&t){var i=Tt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),eh.has(i)||(eh.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Rg(e){ca.D(e),th("dns-prefetch",e,null)}function Ag(e,t){ca.C(e,t),th("preconnect",e,t)}function Mg(e,t,a){ca.L(e,t,a);var n=qn;if(n&&e&&t){var i='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Tt(a.imageSizes)+'"]')):i+='[href="'+Tt(e)+'"]';var u=i;switch(t){case"style":u=Yn(e);break;case"script":u=Gn(e)}Ut.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ut.set(u,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Ol(u))||t==="script"&&n.querySelector(Ul(u))||(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function zg(e,t){ca.m(e,t);var a=qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Tt(n)+'"][href="'+Tt(e)+'"]',u=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Gn(e)}if(!Ut.has(u)&&(e=x({rel:"modulepreload",href:e},t),Ut.set(u,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ul(u)))return}n=a.createElement("link"),tt(n,"link",e),Ke(n),a.head.appendChild(n)}}}function kg(e,t,a){ca.S(e,t,a);var n=qn;if(n&&e){var i=cn(n).hoistableStyles,u=Yn(e);t=t||"default";var d=i.get(u);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(Ol(u)))m.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ut.get(u))&&kr(e,a);var j=d=n.createElement("link");Ke(j),tt(j,"link",e),j._p=new Promise(function(R,H){j.onload=R,j.onerror=H}),j.addEventListener("load",function(){m.loading|=1}),j.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Pi(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:m},i.set(u,d)}}}function Og(e,t){ca.X(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,i=Gn(e),u=n.get(i);u||(u=a.querySelector(Ul(i)),u||(e=x({src:e,async:!0},t),(t=Ut.get(i))&&Or(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(i,u))}}function Ug(e,t){ca.M(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,i=Gn(e),u=n.get(i);u||(u=a.querySelector(Ul(i)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Ut.get(i))&&Or(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(i,u))}}function ah(e,t,a,n){var i=(i=fe.current)?Ii(i):null;if(!i)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(i).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(i).hoistableStyles,d=u.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=i.querySelector(Ol(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||Dg(i,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(i).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 Ol(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Dg(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 Ul(e){return"script[async]"+e}function lh(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 i=x({},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",i),Pi(n,a.precedence,e),t.instance=n;case"stylesheet":i=Yn(a.href);var u=e.querySelector(Ol(i));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;n=nh(a),(i=Ut.get(i))&&kr(n,i),u=(e.ownerDocument||e).createElement("link"),Ke(u);var d=u;return d._p=new Promise(function(m,j){d.onload=m,d.onerror=j}),tt(u,"link",n),t.state.loading|=4,Pi(u,a.precedence,e),t.instance=u;case"script":return u=Gn(a.src),(i=e.querySelector(Ul(u)))?(t.instance=i,Ke(i),i):(n=a,(i=Ut.get(u))&&(n=x({},a),Or(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),tt(i,"link",n),e.head.appendChild(i),t.instance=i);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,Pi(n,a.precedence,e));return t.instance}function Pi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,u=i,d=0;d<n.length;d++){var m=n[d];if(m.dataset.precedence===t)u=m;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function kr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Or(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var es=null;function ih(e,t,a){if(es===null){var n=new Map,i=es=new Map;i.set(a,n)}else i=es,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[Wn]||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 m=n.get(d);m?m.push(u):n.set(d,[u])}}return n}function sh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Hg(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 uh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Bg(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 i=Yn(n.href),u=t.querySelector(Ol(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ts.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ke(u);return}u=t.ownerDocument||t,n=nh(n),(i=Ut.get(i))&&kr(n,i),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(m,j){d.onload=m,d.onerror=j}),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=ts.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ur=0;function Lg(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Ur===0&&(Ur=62500*bg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Ur?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function ts(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var as=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,as=new Map,t.forEach(qg,e),as=null,ts.call(e))}function qg(e,t){if(!(t.state.loading&4)){var a=as.get(e);if(a)var n=a.get(null);else{a=new Map,as.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var d=i[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}i=t.instance,d=i.getAttribute("data-precedence"),u=a.get(d)||n,u===n&&a.set(null,i),a.set(d,i),this.count++,n=ts.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Dl={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Yg(e,t,a,n,i,u,d,m,j){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=As(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=As(0),this.hiddenUpdates=As(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function rh(e,t,a,n,i,u,d,m,j,R,H,L){return e=new Yg(e,t,a,d,j,R,H,L,m),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=mu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},yu(u),e}function ch(e){return e?(e=bn,e):bn}function oh(e,t,a,n,i,u){i=ch(i),n.context===null?n.context=i:n.pendingContext=i,n=ba(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=xa(e,n,t),a!==null&&(ft(a,e,t),ml(a,e,t))}function dh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Dr(e,t){dh(e,t),(e=e.alternate)&&dh(e,t)}function fh(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&ft(t,e,67108864),Dr(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Ct();t=Ms(t);var a=Za(e,t);a!==null&&ft(a,e,t),Dr(e,t)}}var ls=!0;function Gg(e,t,a,n){var i=D.T;D.T=null;var u=X.p;try{X.p=2,Hr(e,t,a,n)}finally{X.p=u,D.T=i}}function Zg(e,t,a,n){var i=D.T;D.T=null;var u=X.p;try{X.p=8,Hr(e,t,a,n)}finally{X.p=u,D.T=i}}function Hr(e,t,a,n){if(ls){var i=Br(n);if(i===null)Cr(e,t,n,is,a),ph(e,n);else if(Xg(i,e,t,a,n))n.stopPropagation();else if(ph(e,n),t&4&&-1<Vg.indexOf(e)){for(;i!==null;){var u=rn(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Ba(u.pendingLanes);if(d!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var j=1<<31-gt(d);m.entanglements[1]|=j,d&=~j}Xt(u),(Se&6)===0&&(Yi=mt()+500,Al(0))}}break;case 31:case 13:m=Za(u,2),m!==null&&ft(m,u,2),Zi(),Dr(u,2)}if(u=Br(n),u===null&&Cr(e,t,n,is,a),u===i)break;i=u}i!==null&&n.stopPropagation()}else Cr(e,t,n,null,a)}}function Br(e){return e=qs(e),Lr(e)}var is=null;function Lr(e){if(is=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=v(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 is=e,null}function mh(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(Rm()){case xc:return 2;case jc:return 8;case Jl:case Am:return 32;case Sc:return 268435456;default:return 32}default:return 32}}var qr=!1,Ma=null,za=null,ka=null,Hl=new Map,Bl=new Map,Oa=[],Vg="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 ph(e,t){switch(e){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":ka=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function Ll(e,t,a,n,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[i]},t!==null&&(t=rn(t),t!==null&&fh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Xg(e,t,a,n,i){switch(t){case"focusin":return Ma=Ll(Ma,e,t,a,n,i),!0;case"dragenter":return za=Ll(za,e,t,a,n,i),!0;case"mouseover":return ka=Ll(ka,e,t,a,n,i),!0;case"pointerover":var u=i.pointerId;return Hl.set(u,Ll(Hl.get(u)||null,e,t,a,n,i)),!0;case"gotpointercapture":return u=i.pointerId,Bl.set(u,Ll(Bl.get(u)||null,e,t,a,n,i)),!0}return!1}function gh(e){var t=un(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,_c(e.priority,function(){hh(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,_c(e.priority,function(){hh(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 ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Br(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ls=n,a.target.dispatchEvent(n),Ls=null}else return t=rn(a),t!==null&&fh(t),e.blockedOn=a,!1;t.shift()}return!0}function vh(e,t,a){ss(e)&&a.delete(t)}function Qg(){qr=!1,Ma!==null&&ss(Ma)&&(Ma=null),za!==null&&ss(za)&&(za=null),ka!==null&&ss(ka)&&(ka=null),Hl.forEach(vh),Bl.forEach(vh)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,qr||(qr=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Qg)))}var rs=null;function yh(e){rs!==e&&(rs=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){rs===e&&(rs=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(Lr(n||a)===null)continue;break}var u=rn(a);u!==null&&(e.splice(t,3),t-=3,Bu(u,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Zn(e){function t(j){return us(j,e)}Ma!==null&&us(Ma,e),za!==null&&us(za,e),ka!==null&&us(ka,e),Hl.forEach(t),Bl.forEach(t);for(var a=0;a<Oa.length;a++){var n=Oa[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Oa.length&&(a=Oa[0],a.blockedOn===null);)gh(a),a.blockedOn===null&&Oa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],u=a[n+1],d=i[st]||null;if(typeof u=="function")d||yh(a);else if(d){var m=null;if(u&&u.hasAttribute("formAction")){if(i=u,d=u[st]||null)m=d.formAction;else if(Lr(i)!==null)continue}else m=d.action;typeof m=="function"?a[n+1]=m:(a.splice(n,3),n-=3),yh(a)}}}function bh(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=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,i=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),i!==null&&(i(),i=null)}}}function Yr(e){this._internalRoot=e}cs.prototype.render=Yr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ct();oh(a,n,e,t,null,null)},cs.prototype.unmount=Yr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;oh(e.current,2,null,e,null,null),Zi(),t[sn]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Oa.length&&t!==0&&t<Oa[a].priority;a++);Oa.splice(a,0,e),a===0&&gh(e)}};var xh=r.version;if(xh!=="19.2.5")throw Error(o(527,xh,"19.2.5"));X.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=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var $g={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!os.isDisabled&&os.supportsFiber)try{Jn=os.inject($g),pt=os}catch{}}return Yl.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",i=wd,u=Td,d=_d;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=rh(e,1,!1,null,null,a,n,null,i,u,d,bh),e[sn]=t.current,Sr(e),new Yr(t)},Yl.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,i="",u=wd,d=Td,m=_d,j=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=rh(e,1,!0,t,a??null,n,i,j,u,d,m,bh),t.context=ch(null),a=t.current,n=Ct(),n=Ms(n),i=ba(n),i.callback=null,xa(a,i,n),a=n,t.current.lanes=a,Fn(t,a),Xt(t),e[sn]=t.current,Sr(e),new cs(t)},Yl.version="19.2.5",Yl}var Ah;function nv(){if(Ah)return Vr.exports;Ah=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(),Vr.exports=av(),Vr.exports}var lv=nv();/**
|
|
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 Mh="popstate";function zh(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function iv(l={}){function r(o,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:v,search:y,hash:p}=h||o.location;return nc("",{pathname:v,search:y,hash:p},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:Vl(f)}return uv(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 sv(){return Math.random().toString(36).substring(2,10)}function kh(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 nc(l,r,c=null,o,f){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Vn(r):r,state:c,key:r&&r.key||o||sv(),unstable_mask:f}}function Vl({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 Vn(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 uv(l,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,v=f.history,y="POP",p=null,g=S();g==null&&(g=0,v.replaceState({...v.state,idx:g},""));function S(){return(v.state||{idx:null}).idx}function x(){y="POP";let Y=S(),G=Y==null?null:Y-g;g=Y,p&&p({action:y,location:O.location,delta:G})}function z(Y,G){y="PUSH";let Q=zh(Y)?Y:nc(O.location,Y,G);g=S()+1;let $=kh(Q,g),le=O.createHref(Q.unstable_mask||Q);try{v.pushState($,"",le)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;f.location.assign(le)}h&&p&&p({action:y,location:O.location,delta:1})}function A(Y,G){y="REPLACE";let Q=zh(Y)?Y:nc(O.location,Y,G);g=S();let $=kh(Q,g),le=O.createHref(Q.unstable_mask||Q);v.replaceState($,"",le),h&&p&&p({action:y,location:O.location,delta:0})}function T(Y){return rv(Y)}let O={get action(){return y},get location(){return l(f,v)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(Mh,x),p=Y,()=>{f.removeEventListener(Mh,x),p=null}},createHref(Y){return r(f,Y)},createURL:T,encodeLocation(Y){let G=T(Y);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:z,replace:A,go(Y){return v.go(Y)}};return O}function rv(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:Vl(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function Jh(l,r,c="/"){return cv(l,r,c,!1)}function cv(l,r,c,o){let f=typeof r=="string"?Vn(r):r,h=oa(f.pathname||"/",c);if(h==null)return null;let v=Kh(l);ov(v);let y=null;for(let p=0;y==null&&p<v.length;++p){let g=jv(h);y=bv(v[p],g,o)}return y}function Kh(l,r=[],c=[],o="",f=!1){let h=(v,y,p=f,g)=>{let S={relativePath:g===void 0?v.path||"":g,caseSensitive:v.caseSensitive===!0,childrenIndex:y,route:v};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&p)return;Be(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let x=qt([o,S.relativePath]),z=c.concat(S);v.children&&v.children.length>0&&(Be(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Kh(v.children,r,z,x,p)),!(v.path==null&&!v.index)&&r.push({path:x,score:vv(x,v.index),routesMeta:z})};return l.forEach((v,y)=>{var p;if(v.path===""||!((p=v.path)!=null&&p.includes("?")))h(v,y);else for(let g of Fh(v.path))h(v,y,!0,g)}),r}function Fh(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 v=Fh(o.join("/")),y=[];return y.push(...v.map(p=>p===""?h:[h,p].join("/"))),f&&y.push(...v),y.map(p=>l.startsWith("/")&&p===""?"/":p)}function ov(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:yv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var dv=/^:[\w-]+$/,fv=3,hv=2,mv=1,pv=10,gv=-2,Oh=l=>l==="*";function vv(l,r){let c=l.split("/"),o=c.length;return c.some(Oh)&&(o+=gv),r&&(o+=hv),c.filter(f=>!Oh(f)).reduce((f,h)=>f+(dv.test(h)?fv:h===""?mv:pv),o)}function yv(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 bv(l,r,c=!1){let{routesMeta:o}=l,f={},h="/",v=[];for(let y=0;y<o.length;++y){let p=o[y],g=y===o.length-1,S=h==="/"?r:r.slice(h.length)||"/",x=ps({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},S),z=p.route;if(!x&&g&&c&&!o[o.length-1].route.index&&(x=ps({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},S)),!x)return null;Object.assign(f,x.params),v.push({params:f,pathname:qt([h,x.pathname]),pathnameBase:Ev(qt([h,x.pathnameBase])),route:z}),x.pathnameBase!=="/"&&(h=qt([h,x.pathnameBase]))}return v}function ps(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=xv(l.path,l.caseSensitive,l.end),f=r.match(c);if(!f)return null;let h=f[0],v=h.replace(/(.)\/+$/,"$1"),y=f.slice(1);return{params:o.reduce((g,{paramName:S,isOptional:x},z)=>{if(S==="*"){let T=y[z]||"";v=h.slice(0,h.length-T.length).replace(/(.)\/+$/,"$1")}const A=y[z];return x&&!A?g[S]=void 0:g[S]=(A||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:v,pattern:l}}function xv(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,(v,y,p,g,S)=>{if(o.push({paramName:y,isOptional:p!=null}),p){let x=S.charAt(g+v.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 jv(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 oa(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 Sv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Cv(l,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof l=="string"?Vn(l):l,h;return c?(c=Wh(c),c.startsWith("/")?h=Uh(c.substring(1),"/"):h=Uh(c,r)):h=r,{pathname:h,search:wv(o),hash:Tv(f)}}function Uh(l,r){let c=gs(r).split("/");return l.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function Jr(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 Nv(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function rc(l){let r=Nv(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function bs(l,r,c,o=!1){let f;typeof l=="string"?f=Vn(l):(f={...l},Be(!f.pathname||!f.pathname.includes("?"),Jr("?","pathname","search",f)),Be(!f.pathname||!f.pathname.includes("#"),Jr("#","pathname","hash",f)),Be(!f.search||!f.search.includes("#"),Jr("#","search","hash",f)));let h=l===""||f.pathname==="",v=h?"/":f.pathname,y;if(v==null)y=c;else{let x=r.length-1;if(!o&&v.startsWith("..")){let z=v.split("/");for(;z[0]==="..";)z.shift(),x-=1;f.pathname=z.join("/")}y=x>=0?r[x]:"/"}let p=Cv(f,y),g=v&&v!=="/"&&v.endsWith("/"),S=(h||v===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(g||S)&&(p.pathname+="/"),p}var Wh=l=>l.replace(/\/\/+/g,"/"),qt=l=>Wh(l.join("/")),gs=l=>l.replace(/\/+$/,""),Ev=l=>gs(l).replace(/^\/*/,"/"),wv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Tv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,_v=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 Rv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Av(l){let r=l.map(c=>c.route.path).filter(Boolean);return qt(r)||"/"}var Ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ph(l,r){let c=l;if(typeof c!="string"||!Sv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(Ih)try{let h=new URL(window.location.href),v=c.startsWith("//")?new URL(h.protocol+c):new URL(c),y=oa(v.pathname,r);v.origin===h.origin&&y!=null?c=y+v.search+v.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 em=["POST","PUT","PATCH","DELETE"];new Set(em);var Mv=["GET",...em];new Set(Mv);var Xn=b.createContext(null);Xn.displayName="DataRouter";var xs=b.createContext(null);xs.displayName="DataRouterState";var tm=b.createContext(!1);function zv(){return b.useContext(tm)}var am=b.createContext({isTransitioning:!1});am.displayName="ViewTransition";var kv=b.createContext(new Map);kv.displayName="Fetchers";var Ov=b.createContext(null);Ov.displayName="Await";var Nt=b.createContext(null);Nt.displayName="Navigation";var Xl=b.createContext(null);Xl.displayName="Location";var Yt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var cc=b.createContext(null);cc.displayName="RouteError";var nm="REACT_ROUTER_ERROR",Uv="REDIRECT",Dv="ROUTE_ERROR_RESPONSE";function Hv(l){if(l.startsWith(`${nm}:${Uv}:{`))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 Bv(l){if(l.startsWith(`${nm}:${Dv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new _v(r.status,r.statusText,r.data)}catch{}}function Lv(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:v}=Ql(l,{relative:r}),y=h;return c!=="/"&&(y=h==="/"?c:qt([c,h])),o.createHref({pathname:y,search:v,hash:f})}function Qn(){return b.useContext(Xl)!=null}function Et(){return Be(Qn(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Xl).location}var lm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function im(l){b.useContext(Nt).static||b.useLayoutEffect(l)}function oc(){let{isDataRoute:l}=b.useContext(Yt);return l?Pv():qv()}function qv(){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}=Et(),h=JSON.stringify(rc(o)),v=b.useRef(!1);return im(()=>{v.current=!0}),b.useCallback((p,g={})=>{if(Dt(v.current,lm),!v.current)return;if(typeof p=="number"){c.go(p);return}let S=bs(p,JSON.parse(h),f,g.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:qt([r,S.pathname])),(g.replace?c.replace:c.push)(S,g.state,g)},[r,c,h,f,l])}b.createContext(null);function Yv(){let{matches:l}=b.useContext(Yt),r=l[l.length-1];return(r==null?void 0:r.params)??{}}function Ql(l,{relative:r}={}){let{matches:c}=b.useContext(Yt),{pathname:o}=Et(),f=JSON.stringify(rc(c));return b.useMemo(()=>bs(l,JSON.parse(f),o,r==="path"),[l,f,o,r])}function Gv(l,r){return sm(l,r)}function sm(l,r,c){var Y;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],v=h?h.params:{},y=h?h.pathname:"/",p=h?h.pathnameBase:"/",g=h&&h.route;{let G=g&&g.path||"";rm(y,!g||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${G}">) 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="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let S=Et(),x;if(r){let G=typeof r=="string"?Vn(r):r;Be(p==="/"||((Y=G.pathname)==null?void 0:Y.startsWith(p)),`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 "${p}" but pathname "${G.pathname}" was given in the \`location\` prop.`),x=G}else x=S;let z=x.pathname||"/",A=z;if(p!=="/"){let G=p.replace(/^\//,"").split("/");A="/"+z.replace(/^\//,"").split("/").slice(G.length).join("/")}let T=Jh(l,{pathname:A});Dt(g||T!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Dt(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let O=$v(T&&T.map(G=>Object.assign({},G,{params:Object.assign({},v,G.params),pathname:qt([p,o.encodeLocation?o.encodeLocation(G.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?p:qt([p,o.encodeLocation?o.encodeLocation(G.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),f,c);return r&&O?b.createElement(Xl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},O):O}function Zv(){let l=Iv(),r=Rv(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},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=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,v)}var Vv=b.createElement(Zv,null),um=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=Bv(l.digest);c&&(l=c)}let r=l!==void 0?b.createElement(Yt.Provider,{value:this.props.routeContext},b.createElement(cc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?b.createElement(Xv,{error:l},r):r}};um.contextType=tm;var Kr=new WeakMap;function Xv({children:l,error:r}){let{basename:c}=b.useContext(Nt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Hv(r.digest);if(o){let f=Kr.get(r);if(f)throw f;let h=Ph(o.location,c);if(Ih&&!Kr.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw Kr.set(r,v),v}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function Qv({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 $v(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 S=f.findIndex(x=>x.route.id&&(h==null?void 0:h[x.route.id])!==void 0);Be(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let v=!1,y=-1;if(c&&o){v=o.renderFallback;for(let S=0;S<f.length;S++){let x=f[S];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(y=S),x.route.id){let{loaderData:z,errors:A}=o,T=x.route.loader&&!z.hasOwnProperty(x.route.id)&&(!A||A[x.route.id]===void 0);if(x.route.lazy||T){c.isStatic&&(v=!0),y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}}let p=c==null?void 0:c.onError,g=o&&p?(S,x)=>{var z,A;p(S,{location:o.location,params:((A=(z=o.matches)==null?void 0:z[0])==null?void 0:A.params)??{},unstable_pattern:Av(o.matches),errorInfo:x})}:void 0;return f.reduceRight((S,x,z)=>{let A,T=!1,O=null,Y=null;o&&(A=h&&x.route.id?h[x.route.id]:void 0,O=x.route.errorElement||Vv,v&&(y<0&&z===0?(rm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,Y=null):y===z&&(T=!0,Y=x.route.hydrateFallbackElement||null)));let G=r.concat(f.slice(0,z+1)),Q=()=>{let $;return A?$=O:T?$=Y:x.route.Component?$=b.createElement(x.route.Component,null):x.route.element?$=x.route.element:$=S,b.createElement(Qv,{match:x,routeContext:{outlet:S,matches:G,isDataRoute:o!=null},children:$})};return o&&(x.route.ErrorBoundary||x.route.errorElement||z===0)?b.createElement(um,{location:o.location,revalidation:o.revalidation,component:O,error:A,children:Q(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:g}):Q()},null)}function dc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jv(l){let r=b.useContext(Xn);return Be(r,dc(l)),r}function Kv(l){let r=b.useContext(xs);return Be(r,dc(l)),r}function Fv(l){let r=b.useContext(Yt);return Be(r,dc(l)),r}function fc(l){let r=Fv(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 Wv(){return fc("useRouteId")}function Iv(){var o;let l=b.useContext(cc),r=Kv("useRouteError"),c=fc("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function Pv(){let{router:l}=Jv("useNavigate"),r=fc("useNavigate"),c=b.useRef(!1);return im(()=>{c.current=!0}),b.useCallback(async(f,h={})=>{Dt(c.current,lm),c.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var Dh={};function rm(l,r,c){!r&&!Dh[l]&&(Dh[l]=!0,Dt(!1,c))}b.memo(ey);function ey({routes:l,future:r,state:c,isStatic:o,onError:f}){return sm(l,void 0,{state:c,isStatic:o,onError:f})}function Fr({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:v}=Et(),y=oc(),p=bs(l,rc(h),v,o==="path"),g=JSON.stringify(p);return b.useEffect(()=>{y(JSON.parse(g),{replace:r,state:c,relative:o})},[y,g,o,r,c]),null}function ht(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 ty({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:v}){Be(!Qn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:y,navigator:f,static:h,unstable_useTransitions:v,future:{}}),[y,f,h,v]);typeof c=="string"&&(c=Vn(c));let{pathname:g="/",search:S="",hash:x="",state:z=null,key:A="default",unstable_mask:T}=c,O=b.useMemo(()=>{let Y=oa(g,y);return Y==null?null:{location:{pathname:Y,search:S,hash:x,state:z,key:A,unstable_mask:T},navigationType:o}},[y,g,S,x,z,A,o,T]);return Dt(O!=null,`<Router basename="${y}"> is not able to match the URL "${g}${S}${x}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:b.createElement(Nt.Provider,{value:p},b.createElement(Xl.Provider,{children:r,value:O}))}function ay({children:l,location:r}){return Gv(lc(l),r)}function lc(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,lc(o.props.children,h));return}Be(o.type===ht,`[${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 v={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&&(v.children=lc(o.props.children,h)),c.push(v)}),c}var hs="get",ms="application/x-www-form-urlencoded";function js(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function ny(l){return js(l)&&l.tagName.toLowerCase()==="button"}function ly(l){return js(l)&&l.tagName.toLowerCase()==="form"}function iy(l){return js(l)&&l.tagName.toLowerCase()==="input"}function sy(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function uy(l,r){return l.button===0&&(!r||r==="_self")&&!sy(l)}function ic(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 ry(l,r){let c=ic(l);return r&&r.forEach((o,f)=>{c.has(f)||r.getAll(f).forEach(h=>{c.append(f,h)})}),c}var ds=null;function cy(){if(ds===null)try{new FormData(document.createElement("form"),0),ds=!1}catch{ds=!0}return ds}var oy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wr(l){return l!=null&&!oy.has(l)?(Dt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ms}"`),null):l}function dy(l,r){let c,o,f,h,v;if(ly(l)){let y=l.getAttribute("action");o=y?oa(y,r):null,c=l.getAttribute("method")||hs,f=Wr(l.getAttribute("enctype"))||ms,h=new FormData(l)}else if(ny(l)||iy(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 p=l.getAttribute("formaction")||y.getAttribute("action");if(o=p?oa(p,r):null,c=l.getAttribute("formmethod")||y.getAttribute("method")||hs,f=Wr(l.getAttribute("formenctype"))||Wr(y.getAttribute("enctype"))||ms,h=new FormData(y,l),!cy()){let{name:g,type:S,value:x}=l;if(S==="image"){let z=g?`${g}.`:"";h.append(`${z}x`,"0"),h.append(`${z}y`,"0")}else g&&h.append(g,x)}}else{if(js(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=hs,o=null,f=ms,v=l}return h&&f==="text/plain"&&(v=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hc(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function cm(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&&oa(f.pathname,r)==="/"?f.pathname=`${gs(r)}/_root.${o}`:f.pathname=`${gs(f.pathname)}.${o}`,f}async function fy(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 hy(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 my(l,r,c){let o=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let v=await fy(h,c);return v.links?v.links():[]}return[]}));return yy(o.flat(1).filter(hy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Hh(l,r,c,o,f,h){let v=(p,g)=>c[g]?p.route.id!==c[g].route.id:!0,y=(p,g)=>{var S;return c[g].pathname!==p.pathname||((S=c[g].route.path)==null?void 0:S.endsWith("*"))&&c[g].params["*"]!==p.params["*"]};return h==="assets"?r.filter((p,g)=>v(p,g)||y(p,g)):h==="data"?r.filter((p,g)=>{var x;let S=o.routes[p.route.id];if(!S||!S.hasLoader)return!1;if(v(p,g)||y(p,g))return!0;if(p.route.shouldRevalidate){let z=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((x=c[0])==null?void 0:x.params)||{},nextUrl:new URL(l,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function py(l,r,{includeHydrateFallback:c}={}){return gy(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 gy(l){return[...new Set(l)]}function vy(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function yy(l,r){let c=new Set;return new Set(r),l.reduce((o,f)=>{let h=JSON.stringify(vy(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function mc(){let l=b.useContext(Xn);return hc(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function by(){let l=b.useContext(xs);return hc(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var pc=b.createContext(void 0);pc.displayName="FrameworkContext";function gc(){let l=b.useContext(pc);return hc(l,"You must render this element inside a <HydratedRouter> element"),l}function xy(l,r){let c=b.useContext(pc),[o,f]=b.useState(!1),[h,v]=b.useState(!1),{onFocus:y,onBlur:p,onMouseEnter:g,onMouseLeave:S,onTouchStart:x}=r,z=b.useRef(null);b.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let O=G=>{G.forEach(Q=>{v(Q.isIntersecting)})},Y=new IntersectionObserver(O,{threshold:.5});return z.current&&Y.observe(z.current),()=>{Y.disconnect()}}},[l]),b.useEffect(()=>{if(o){let O=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(O)}}},[o]);let A=()=>{f(!0)},T=()=>{f(!1),v(!1)};return c?l!=="intent"?[h,z,{}]:[h,z,{onFocus:Gl(y,A),onBlur:Gl(p,T),onMouseEnter:Gl(g,A),onMouseLeave:Gl(S,T),onTouchStart:Gl(x,A)}]:[!1,z,{}]}function Gl(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function jy({page:l,...r}){let c=zv(),{router:o}=mc(),f=b.useMemo(()=>Jh(o.routes,l,o.basename),[o.routes,l,o.basename]);return f?c?b.createElement(Cy,{page:l,matches:f,...r}):b.createElement(Ny,{page:l,matches:f,...r}):null}function Sy(l){let{manifest:r,routeModules:c}=gc(),[o,f]=b.useState([]);return b.useEffect(()=>{let h=!1;return my(l,r,c).then(v=>{h||f(v)}),()=>{h=!0}},[l,r,c]),o}function Cy({page:l,matches:r,...c}){let o=Et(),{future:f}=gc(),{basename:h}=mc(),v=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let y=cm(l,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let S of r)typeof S.route.shouldRevalidate=="function"?p=!0:g.push(S.route.id);return p&&g.length>0&&y.searchParams.set("_routes",g.join(",")),[y.pathname+y.search]},[h,f.unstable_trailingSlashAwareDataRequests,l,o,r]);return b.createElement(b.Fragment,null,v.map(y=>b.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...c})))}function Ny({page:l,matches:r,...c}){let o=Et(),{future:f,manifest:h,routeModules:v}=gc(),{basename:y}=mc(),{loaderData:p,matches:g}=by(),S=b.useMemo(()=>Hh(l,r,g,h,o,"data"),[l,r,g,h,o]),x=b.useMemo(()=>Hh(l,r,g,h,o,"assets"),[l,r,g,h,o]),z=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let O=new Set,Y=!1;if(r.forEach(Q=>{var le;let $=h.routes[Q.route.id];!$||!$.hasLoader||(!S.some(F=>F.route.id===Q.route.id)&&Q.route.id in p&&((le=v[Q.route.id])!=null&&le.shouldRevalidate)||$.hasClientLoader?Y=!0:O.add(Q.route.id))}),O.size===0)return[];let G=cm(l,y,f.unstable_trailingSlashAwareDataRequests,"data");return Y&&O.size>0&&G.searchParams.set("_routes",r.filter(Q=>O.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[G.pathname+G.search]},[y,f.unstable_trailingSlashAwareDataRequests,p,o,h,S,r,l,v]),A=b.useMemo(()=>py(x,h),[x,h]),T=Sy(x);return b.createElement(b.Fragment,null,z.map(O=>b.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...c})),A.map(O=>b.createElement("link",{key:O,rel:"modulepreload",href:O,...c})),T.map(({key:O,link:Y})=>b.createElement("link",{key:O,nonce:c.nonce,...Y,crossOrigin:Y.crossOrigin??c.crossOrigin})))}function Ey(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var wy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wy&&(window.__reactRouterVersion="7.14.2")}catch{}function Ty({basename:l,children:r,unstable_useTransitions:c,window:o}){let f=b.useRef();f.current==null&&(f.current=iv({window:o,v5Compat:!0}));let h=f.current,[v,y]=b.useState({action:h.action,location:h.location}),p=b.useCallback(g=>{c===!1?y(g):b.startTransition(()=>y(g))},[c]);return b.useLayoutEffect(()=>h.listen(p),[h,p]),b.createElement(ty,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:h,unstable_useTransitions:c})}var om=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nt=b.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:v,unstable_mask:y,state:p,target:g,to:S,preventScrollReset:x,viewTransition:z,unstable_defaultShouldRevalidate:A,...T},O){let{basename:Y,navigator:G,unstable_useTransitions:Q}=b.useContext(Nt),$=typeof S=="string"&&om.test(S),le=Ph(S,Y);S=le.to;let F=Lv(S,{relative:f}),J=Et(),E=null;if(y){let ye=bs(y,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);Y!=="/"&&(ye.pathname=ye.pathname==="/"?Y:qt([Y,ye.pathname])),E=G.createHref(ye)}let[U,Z,Me]=xy(o,T),ue=My(S,{replace:v,unstable_mask:y,state:p,target:g,preventScrollReset:x,relative:f,viewTransition:z,unstable_defaultShouldRevalidate:A,unstable_useTransitions:Q});function ae(ye){r&&r(ye),ye.defaultPrevented||ue(ye)}let K=!(le.isExternal||h),pe=b.createElement("a",{...T,...Me,href:(K?E:void 0)||le.absoluteURL||F,onClick:K?ae:r,ref:Ey(O,Z),target:g,"data-discover":!$&&c==="render"?"true":void 0});return U&&!$?b.createElement(b.Fragment,null,pe,b.createElement(jy,{page:F})):pe});nt.displayName="Link";var _y=b.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:v,viewTransition:y,children:p,...g},S){let x=Ql(v,{relative:g.relative}),z=Et(),A=b.useContext(xs),{navigator:T,basename:O}=b.useContext(Nt),Y=A!=null&&Dy(x)&&y===!0,G=T.encodeLocation?T.encodeLocation(x).pathname:x.pathname,Q=z.pathname,$=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;c||(Q=Q.toLowerCase(),$=$?$.toLowerCase():null,G=G.toLowerCase()),$&&O&&($=oa($,O)||$);const le=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let F=Q===G||!f&&Q.startsWith(G)&&Q.charAt(le)==="/",J=$!=null&&($===G||!f&&$.startsWith(G)&&$.charAt(G.length)==="/"),E={isActive:F,isPending:J,isTransitioning:Y},U=F?r:void 0,Z;typeof o=="function"?Z=o(E):Z=[o,F?"active":null,J?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let Me=typeof h=="function"?h(E):h;return b.createElement(nt,{...g,"aria-current":U,className:Z,ref:S,style:Me,to:v,viewTransition:y},typeof p=="function"?p(E):p)});_y.displayName="NavLink";var Ry=b.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:v=hs,action:y,onSubmit:p,relative:g,preventScrollReset:S,viewTransition:x,unstable_defaultShouldRevalidate:z,...A},T)=>{let{unstable_useTransitions:O}=b.useContext(Nt),Y=Oy(),G=Uy(y,{relative:g}),Q=v.toLowerCase()==="get"?"get":"post",$=typeof y=="string"&&om.test(y),le=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let J=F.nativeEvent.submitter,E=(J==null?void 0:J.getAttribute("formmethod"))||v,U=()=>Y(J||F.currentTarget,{fetcherKey:r,method:E,navigate:c,replace:f,state:h,relative:g,preventScrollReset:S,viewTransition:x,unstable_defaultShouldRevalidate:z});O&&c!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:T,method:Q,action:G,onSubmit:o?p:le,...A,"data-discover":!$&&l==="render"?"true":void 0})});Ry.displayName="Form";function Ay(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dm(l){let r=b.useContext(Xn);return Be(r,Ay(l)),r}function My(l,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:v,viewTransition:y,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let S=oc(),x=Et(),z=Ql(l,{relative:v});return b.useCallback(A=>{if(uy(A,r)){A.preventDefault();let T=c!==void 0?c:Vl(x)===Vl(z),O=()=>S(l,{replace:T,unstable_mask:o,state:f,preventScrollReset:h,relative:v,viewTransition:y,unstable_defaultShouldRevalidate:p});g?b.startTransition(()=>O()):O()}},[x,S,z,c,o,f,r,l,h,v,y,p,g])}function fm(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(ic(l)),c=b.useRef(!1),o=Et(),f=b.useMemo(()=>ry(o.search,c.current?null:r.current),[o.search]),h=oc(),v=b.useCallback((y,p)=>{const g=ic(typeof y=="function"?y(new URLSearchParams(f)):y);c.current=!0,h("?"+g,p)},[h,f]);return[f,v]}var zy=0,ky=()=>`__${String(++zy)}__`;function Oy(){let{router:l}=dm("useSubmit"),{basename:r}=b.useContext(Nt),c=Wv(),o=l.fetch,f=l.navigate;return b.useCallback(async(h,v={})=>{let{action:y,method:p,encType:g,formData:S,body:x}=dy(h,r);if(v.navigate===!1){let z=v.fetcherKey||ky();await o(z,c,v.action||y,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:x,formMethod:v.method||p,formEncType:v.encType||g,flushSync:v.flushSync})}else await f(v.action||y,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:x,formMethod:v.method||p,formEncType:v.encType||g,replace:v.replace,state:v.state,fromRouteId:c,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,f,r,c])}function Uy(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={...Ql(l||".",{relative:r})},v=Et();if(l==null){h.search=v.search;let y=new URLSearchParams(h.search),p=y.getAll("index");if(p.some(S=>S==="")){y.delete("index"),p.filter(x=>x).forEach(x=>y.append("index",x));let S=y.toString();h.search=S?`?${S}`:""}}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])),Vl(h)}function Dy(l,{relative:r}={}){let c=b.useContext(am);Be(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=dm("useViewTransitionState"),f=Ql(l,{relative:r});if(!c.isTransitioning)return!1;let h=oa(c.currentLocation.pathname,o)||c.currentLocation.pathname,v=oa(c.nextLocation.pathname,o)||c.nextLocation.pathname;return ps(f.pathname,v)!=null||ps(f.pathname,h)!=null}const Hy='<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 By({size:l=20,idSuffix:r,className:c}){const o=`pc-brand-mark-clip-${r}`;return s.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})">${Hy}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const hm="Parachute";let nn=null,Zl=null;const Ly=3e4;function qy(){return"/admin/host-admin-token"}function Yy(){const l=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(l)}`}function ln(){return window.location.replace(Yy()),new Promise(()=>{})}function Gy(){return window.location.replace("/account/"),new Promise(()=>{})}async function De(){const l=Date.now();return nn&&nn.expiresAt-l>Ly?nn.token:Zl||(Zl=Zy().finally(()=>{Zl=null}),Zl)}async function Zy(){const l=await fetch(qy(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return nn=null,ln();if(l.status===403)return nn=null,Gy();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 nn={token:r.token,expiresAt:new Date(r.expires_at).getTime()},r.token}function Ae(){nn=null}class V extends Error{constructor(r,c){super(c),this.status=r,this.name="HttpError"}}async function vc(){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 v={name:h.name,url:h.url,version:h.version,path:Vy(h.name,h.url,o)};return h.managementUrl&&(v.managementUrl=h.managementUrl),v})}}function Vy(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 mm(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 ln();if(!r.ok)throw new V(r.status,await P(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 Xy(l){var v,y;const r=await mm(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 P(c));const o=await c.json(),f=(v=o.counts)==null?void 0:v.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 Qy(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 $y(l={}){const r=await De(),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 Ae(),new V(o.status,await P(o));if(!o.ok)throw new V(o.status,await P(o));return(await o.json()).grants??[]}async function Jy(l){const r=await De(),c=await fetch(`/api/grants/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c))}async function Ky(){const l=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!l.ok)throw new V(l.status,await P(l));return await l.json()}async function Fy(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 P(c))}let Bh=!1;function Wy(l,r){if(/^https?:\/\//i.test(r))return r;const c=l.replace(/\/+$/,"");return r==="/admin"||r==="/admin/"?(Bh||(Bh=!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 Lh(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 De(),h=await fetch(o,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${f}`}});if(h.status===401||h.status===403)throw Ae(),new V(h.status,await P(h));if(!h.ok)throw new V(h.status,await P(h));return await h.json()}async function pm(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function Iy(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function Py(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function e1(l,r){const o={method:"POST",headers:{accept:"application/json",authorization:`Bearer ${await De()}`}};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 Ae(),new V(f.status,await P(f));if(!f.ok)throw new V(f.status,await P(f));return await f.json()}async function Ss(){const l=await De(),r=await fetch("/api/modules",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function Cs(l,r){const c=await De();return await fetch(`/api/modules/${encodeURIComponent(l)}/${r}`,{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${c}`}})}async function t1(l){const r=await Cs(l,"install");if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return(await r.json()).operation_id}async function a1(l){const r=await Cs(l,"upgrade");if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return(await r.json()).operation_id}async function n1(l){const r=await Cs(l,"restart");if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function l1(l){const r=await Cs(l,"uninstall");if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function i1(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return(await c.json()).channel}async function gm(){const l=await De(),r=await fetch("/api/settings/hub-origin",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function qh(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return(await c.json()).hub_origin}async function s1(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function u1(){const l=await De(),r=await fetch("/api/users",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return(await r.json()).users??[]}async function r1(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return(await c.json()).user}async function c1(l){const r=await De(),c=await fetch(`/api/users/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw c.status===401&&Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));const o=await c.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function o1(l,r){const c=await De(),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&&Ae(),new V(o.status,await P(o));if(!o.ok)throw new V(o.status,await P(o));const f=await o.json().catch(()=>({}));return{revocationLagSeconds:typeof f.revocation_lag_seconds=="number"?f.revocation_lag_seconds:60}}async function d1(l,r){const c=await De(),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&&Ae(),new V(o.status,await P(o));if(!o.ok)throw new V(o.status,await P(o))}async function vm(){const l=await De(),r=await fetch("/api/users/vaults",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return(await r.json()).vaults??[]}async function f1(){const l=await De(),r=await fetch("/api/invites",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return(await r.json()).invites??[]}async function h1(l){const r=await De(),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 Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function m1(l){const r=await De(),c=await fetch(`/api/invites/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401)throw Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c))}async function sc(){const l=await De(),r=await fetch("/api/hub",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function p1(l){const r=await De(),c=await fetch("/api/hub/upgrade",{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw Ae(),new V(c.status,await P(c));if(!c.ok)throw new V(c.status,await P(c));return await c.json()}async function g1(){const l=await De(),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 Ae(),new V(r.status,await P(r));if(!r.ok)throw new V(r.status,await P(r));return await r.json()}async function P(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 v1(){const l=await fetch("/api/connections/catalog",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return ln();if(!l.ok)throw new V(l.status,await P(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 y1(){const l=await fetch("/admin/connections",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return ln();if(!l.ok)throw new V(l.status,await P(l));const r=await l.json();return Array.isArray(r.connections)?r.connections:[]}async function b1(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 ln();if(!r.ok)throw new V(r.status,await P(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 x1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}/approve`,{method:"POST",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await ln();return}if(!r.ok)throw new V(r.status,await P(r))}async function j1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await ln();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 P(r))}const S1=3e4;function Yh(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 Ir(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 C1(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 N1(){const[l,r]=b.useState(null),[c,o]=b.useState(!1),[f,h]=b.useState(!1),[v,y]=b.useState(null),p=b.useCallback(async()=>{h(!0);try{const g=await sc();r(g),y(new Date)}catch{}finally{h(!1)}},[]);return b.useEffect(()=>{p()},[p]),b.useEffect(()=>{const g=()=>{p()};window.addEventListener("focus",g);const S=window.setInterval(()=>{p()},S1);return()=>{window.removeEventListener("focus",g),window.clearInterval(S)}},[p]),l?s.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[s.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(g=>!g),"aria-expanded":c,"data-testid":"hub-version-badge-summary",children:["Hub ",s.jsx("strong",{children:l.version})," · running"," ",s.jsx("span",{"data-testid":"hub-version-badge-uptime",children:Yh(l.uptime_ms)})," ·"," ",s.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:l.source})]}),c?s.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[s.jsxs("dl",{children:[s.jsx("dt",{children:"Hub"}),s.jsx("dd",{children:s.jsxs("code",{children:["@openparachute/hub ",l.version]})}),s.jsx("dt",{children:"Source"}),s.jsx("dd",{children:C1(l)}),s.jsx("dt",{children:"Started"}),s.jsxs("dd",{children:[Ir(l.started_at)," (",Yh(l.uptime_ms)," ago)"]}),l.container_build_time?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Built"}),s.jsx("dd",{children:Ir(l.container_build_time)})]}):null,l.render_commit?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Commit"}),s.jsxs("dd",{children:[s.jsx("code",{children:l.render_commit.slice(0,8)}),l.render_branch?s.jsxs(s.Fragment,{children:[" on ",s.jsx("code",{children:l.render_branch})]}):null]})]}):null,v?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Last checked"}),s.jsx("dd",{children:Ir(v.toISOString())})]}):null]}),s.jsx("button",{type:"button",className:"hub-version-badge-refresh secondary",onClick:()=>void p(),disabled:f,"data-testid":"hub-version-badge-refresh",children:f?"Refreshing…":"Refresh"})]}):null]}):null}function E1(){const{clientId:l}=Yv(),r=l??"",[c]=fm(),o=w1(c.get("return_to")),[f,h]=b.useState({kind:"loading"}),[v,y]=b.useState({kind:"idle"}),[p,g]=b.useState(0);b.useEffect(()=>{if(!r){h({kind:"error",message:"missing client id in URL"});return}let x=!1;return h({kind:"loading"}),Py(r).then(z=>{x||(h({kind:"ok",client:z}),z.status==="approved"&&(y({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(z=>{if(x)return;if(z instanceof V&&z.status===404){h({kind:"not_found"});return}const A=z instanceof Error?z.message:String(z);h({kind:"error",message:A})}),()=>{x=!0}},[r,p,o]);async function S(){y({kind:"approving"});try{const x=await e1(r,o||void 0);if(x.redirect_to&&ym(x.redirect_to)){window.location.assign(x.redirect_to);return}y({kind:"approved",alreadyApproved:x.already_approved})}catch(x){const z=x instanceof V?`approve failed (${x.status}): ${x.message}`:x instanceof Error?x.message:String(x);y({kind:"error",message:z})}}return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h2",{children:"Approve app"})}),T1({loadState:f,action:v,onApprove:S,onRetry:()=>g(x=>x+1)})]})}function ym(l){return!(!l||!l.startsWith("/")||l.startsWith("//"))}function w1(l){return l===null?null:ym(l)?l:null}function T1({loadState:l,action:r,onApprove:c,onRetry:o}){if(l.kind==="loading")return s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(l.kind==="not_found")return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"Unknown client."}),s.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."," ",s.jsx(nt,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",s.jsx("code",{children:l.message})]}),s.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 s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:r.alreadyApproved?"Already approved.":"Approved."}),s.jsxs("p",{className:"muted",children:[s.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."]}),s.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:s.jsx(nt,{to:"/permissions",children:"View permissions"})})]});const v=r.kind==="approving",y=r.kind==="error"?r.message:null;return s.jsxs("div",{children:[s.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."}),s.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"client_id: "}),s.jsx("code",{children:f.client_id})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((p,g)=>s.jsxs("span",{children:[s.jsx("code",{children:p}),g<f.redirect_uris.length-1?" ":null]},p))]}),f.scopes.length>0?s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((p,g)=>s.jsxs("span",{children:[s.jsx("code",{children:_1(p)}),g<f.scopes.length-1?" ":null]},p)),f.scopes.some(bm)?s.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[s.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,s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"registered: "}),s.jsx("code",{title:f.registered_at,children:f.registered_at})]}),y?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:y})}):null]})}),s.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{c()},disabled:v,children:v?"Approving…":`Approve ${h}`}),s.jsx(nt,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function _1(l){return bm(l)?`vault:*:${l.split(":")[1]}`:l}function bm(l){const r=l.split(":");if(r.length!==2||r[0]!=="vault")return!1;const c=r[1];return c==="read"||c==="write"}function R1(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 Pr(l,r){return l instanceof V?`${r} failed (${l.status}): ${l.message}`:l instanceof Error?l.message:String(l)}function Gh({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return s.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 A1(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState({kind:"idle"}),[v,y]=b.useState({kind:"idle"}),[p,g]=b.useState({kind:"idle"}),[S,x]=b.useState(""),[z,A]=b.useState(""),[T,O]=b.useState(""),[Y,G]=b.useState(""),[Q,$]=b.useState(""),[le,F]=b.useState(""),[J,E]=b.useState("");b.useEffect(()=>{let ae=!1;return r({kind:"loading"}),Promise.all([y1(),v1(),vc()]).then(([K,pe,ye])=>{ae||(r({kind:"ok",data:{connections:K,catalog:pe,vaults:ye.vaults}}),O(D=>{var X;return D||((X=ye.vaults[0])==null?void 0:X.name)||""}))}).catch(K=>{ae||r({kind:"error",message:K instanceof Error?K.message:String(K)})}),()=>{ae=!0}},[c]);function U(ae){x(ae.source.module),A(ae.source.event),$(ae.sink.module),F(ae.sink.action),G(ae.source.filter?JSON.stringify(ae.source.filter,null,2):"");const K=R1(ae);E(Object.keys(K).length>0?JSON.stringify(K,null,2):""),h({kind:"idle"})}async function Z(ae){if(ae.preventDefault(),!S||!z||!Q||!le){h({kind:"error",message:"Pick a source event and a sink action."});return}let K,pe;try{K=Y.trim()?JSON.parse(Y):void 0}catch{h({kind:"error",message:"Filter is not valid JSON."});return}try{pe=J.trim()?JSON.parse(J):void 0}catch{h({kind:"error",message:"Action params are not valid JSON."});return}if(S==="vault"&&!T){h({kind:"error",message:"Pick a vault for the source event."});return}h({kind:"submitting"});try{const ye=await b1({source:{module:S,...S==="vault"?{vault:T}:{},event:z,...K?{filter:K}:{}},sink:{module:Q,action:le,...pe?{params:pe}:{}}});h({kind:"created",...ye.connect?{connect:ye.connect}:{}}),o(D=>D+1)}catch(ye){h({kind:"error",message:Pr(ye,"Create")})}}async function Me(ae){y({kind:"removing",id:ae});try{await j1(ae),y({kind:"idle"}),o(K=>K+1)}catch(K){y({kind:"error",id:ae,message:Pr(K,"Remove")})}}async function ue(ae){if(p.kind!=="approving"){g({kind:"approving",id:ae});try{await x1(ae),g({kind:"idle"}),o(K=>K+1)}catch(K){g({kind:"error",id:ae,message:Pr(K,"Approve")})}}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Connections"})}),s.jsxs("p",{className:"muted",children:["A connection wires ",s.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."]}),M1(l,v,y,Me,p,ue,()=>o(ae=>ae+1)),l.kind==="ok"&&s.jsx(D1,{catalog:l.data.catalog,vaults:l.data.vaults,sourceModule:S,setSourceModule:x,sourceEvent:z,setSourceEvent:A,vault:T,setVault:O,filterText:Y,setFilterText:G,sinkModule:Q,setSinkModule:$,sinkAction:le,setSinkAction:F,paramsText:J,setParamsText:E,createSt:f,setCreateSt:h,onSubmit:Z,onApplyTemplate:U})]})}function M1(l,r,c,o,f,h,v){if(l.kind==="loading")return s.jsx("p",{className:"muted",children:"Loading connections…"});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load connections: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:v,className:"secondary",children:"Retry"})]});const{connections:y}=l.data;return y.length===0?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No connections yet."}),s.jsx("p",{className:"muted",children:"Build one below, or start from a module's preset."})]}):s.jsx(O1,{connections:y,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h})}function xm(l){return l.requested_by&&l.requested_by.length>0?l.requested_by:"custom"}function z1(l){return l==="custom"?"Custom (built here)":`Added from ${l}`}function k1(l){const r=new Map;for(const c of l){const o=xm(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 O1({connections:l,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h}){const v=k1(l);return s.jsx(s.Fragment,{children:v.map(([y,p])=>s.jsxs("div",{className:"channel-list",style:{marginTop:"1rem"},"data-provenance-group":y,children:[s.jsx("h3",{style:{marginBottom:"0.25rem"},children:z1(y)}),s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"channel-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Connection"}),s.jsx("th",{scope:"col",children:"When"}),s.jsx("th",{scope:"col",children:"Do"}),s.jsx("th",{scope:"col",children:"Source"}),s.jsx("th",{scope:"col",children:"Actions"})]})}),s.jsx("tbody",{children:p.map(g=>U1(g,r,c,o,f,h))})]})})]},y))})}function U1(l,r,c,o,f,h){const v=r.kind==="confirming"&&r.id===l.id,y=r.kind==="removing"&&r.id===l.id,p=r.kind==="error"&&r.id===l.id?r.message:null,g=l.status==="pending",S=f.kind==="approving"&&f.id===l.id,x=f.kind==="error"&&f.id===l.id?f.message:null,z=`${l.source.module}.${l.source.event}${l.source.vault?` (${l.source.vault})`:""}`,A=`${l.sink.module}.${l.sink.action}`,T=xm(l);return s.jsxs("tr",{"data-connection-id":l.id,"data-requested-by":T,children:[s.jsxs("td",{children:[s.jsx("code",{children:l.id}),g&&s.jsxs(s.Fragment,{children:[" ",s.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"})]})]}),s.jsx("td",{children:s.jsx("code",{children:z})}),s.jsx("td",{children:s.jsx("code",{children:A})}),s.jsx("td",{children:T==="custom"?s.jsx("span",{className:"muted",children:"custom"}):s.jsx("span",{className:"tag","data-testid":"provenance-badge",children:T})}),s.jsxs("td",{children:[g&&s.jsx("button",{type:"button",disabled:S,onClick:()=>void h(l.id),"aria-label":`Approve ${l.id}`,"data-testid":"approve-connection",style:{marginRight:"0.5rem"},children:S?"Approving…":"Approve"}),v?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm remove ${l.id}`,children:[s.jsxs("p",{children:["Remove connection ",s.jsx("code",{children:l.id}),"? This tears down the provisioned trigger (and channel config, if any)."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",className:"destructive",onClick:()=>{o(l.id)},disabled:y,children:y?"Removing…":"Remove"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:y,children:"Cancel"})]})]}):s.jsx("button",{type:"button",className:"secondary",disabled:y,onClick:()=>c({kind:"confirming",id:l.id}),"aria-label":`Remove ${l.id}`,children:y?"Removing…":"Remove"}),p&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:p})}),x&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:x})})]})]},l.id)}function D1(l){const{catalog:r,createSt:c}=l,o=c.kind==="submitting",f=p=>r.events.filter(g=>g.module===p),h=p=>r.actions.filter(g=>g.module===p),v=Array.from(new Set(r.events.map(p=>p.module))),y=Array.from(new Set(r.actions.map(p=>p.module)));return s.jsxs("section",{style:{marginTop:"1.5rem"},children:[s.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[s.jsx("h3",{style:{marginRight:"auto"},children:"Build a connection"}),r.templates.map(p=>s.jsxs("button",{type:"button",className:"secondary",onClick:()=>l.onApplyTemplate(p),"data-testid":`preset-${p.module}-${p.key}`,...p.description?{title:p.description}:{},children:["Preset: ",p.title]},`${p.module}/${p.key}`))]}),s.jsxs("form",{onSubmit:p=>void l.onSubmit(p),"aria-label":"Build a connection",children:[s.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem"},children:[s.jsx("legend",{children:"When (source event)"}),s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-source-module",children:"Module"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-source-module",value:l.sourceModule,disabled:o,onChange:p=>{l.setSourceModule(p.target.value),l.setSourceEvent("")},children:[s.jsx("option",{value:"",children:"— pick a module —"}),v.map(p=>s.jsx("option",{value:p,children:p},p))]})]}),l.sourceModule&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-source-event",children:"Event"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-source-event",value:l.sourceEvent,disabled:o,onChange:p=>l.setSourceEvent(p.target.value),children:[s.jsx("option",{value:"",children:"— pick an event —"}),f(l.sourceModule).map(p=>s.jsxs("option",{value:p.key,children:[p.title," (",p.key,")"]},p.key))]})]}),l.sourceModule==="vault"&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-vault",children:"Vault"}),s.jsx("br",{}),s.jsx("select",{id:"conn-vault",value:l.vault,disabled:o,onChange:p=>l.setVault(p.target.value),children:l.vaults.map(p=>s.jsx("option",{value:p.name,children:p.name},p.name))})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"conn-filter",children:["Filter ",s.jsx("span",{className:"muted",children:"(JSON — tags / has_metadata / missing_metadata)"})]}),s.jsx("br",{}),s.jsx("textarea",{id:"conn-filter",value:l.filterText,disabled:o,rows:4,style:{width:"100%",fontFamily:"monospace"},onChange:p=>l.setFilterText(p.target.value),placeholder:'{ "tags": ["#channel-message/inbound"] }'})]})]}),s.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem",marginTop:"0.75rem"},children:[s.jsx("legend",{children:"Do (sink action)"}),s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-sink-module",children:"Module"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-sink-module",value:l.sinkModule,disabled:o,onChange:p=>{l.setSinkModule(p.target.value),l.setSinkAction("")},children:[s.jsx("option",{value:"",children:"— pick a module —"}),y.map(p=>s.jsx("option",{value:p,children:p},p))]})]}),l.sinkModule&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-sink-action",children:"Action"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-sink-action",value:l.sinkAction,disabled:o,onChange:p=>l.setSinkAction(p.target.value),children:[s.jsx("option",{value:"",children:"— pick an action —"}),h(l.sinkModule).map(p=>s.jsxs("option",{value:p.key,children:[p.title," (",p.key,")"]},p.key))]})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"conn-params",children:["Action params ",s.jsxs("span",{className:"muted",children:["(JSON — e.g. ",'{ "channel": "eng" }',")"]})]}),s.jsx("br",{}),s.jsx("textarea",{id:"conn-params",value:l.paramsText,disabled:o,rows:3,style:{width:"100%",fontFamily:"monospace"},onChange:p=>l.setParamsText(p.target.value),placeholder:'{ "channel": "eng" }'})]})]}),c.kind==="error"&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:c.message})}),s.jsx("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:s.jsx("button",{type:"submit",disabled:o,children:o?"Creating…":"Create connection"})})]}),c.kind==="created"&&c.connect&&s.jsx(H1,{connect:c.connect,onDismiss:()=>l.setCreateSt({kind:"idle"})}),c.kind==="created"&&!c.connect&&s.jsx("div",{className:"success-banner",style:{marginTop:"1rem"},"data-testid":"connection-created",children:"Connection created."})]})}function H1({connect:l,onDismiss:r}){return s.jsxs("div",{className:"mcp-connect-card",style:{marginTop:"1rem"},"data-testid":"connection-connect-panel",children:[s.jsx("h3",{children:"Connect a session"}),s.jsx("p",{className:"muted",children:"Run these where your Claude Code session will live; authorize in the browser when prompted."}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"1 · Register the channel (MCP)"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"connection-mcp-add",children:l.mcpAdd}),s.jsx(Gh,{value:l.mcpAdd})]})]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"2 · Launch a session on the channel"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"connection-launch",children:l.launch}),s.jsx(Gh,{value:l.launch})]}),s.jsxs("p",{className:"muted",style:{marginTop:"0.4rem"},children:["⚠ This launches Claude Code with unrestricted tool access (",s.jsx("code",{children:"--dangerously-skip-permissions"}),") — run it only on a machine you trust for that session."]})]}),s.jsx("div",{style:{marginTop:"0.75rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})})]})}const B1=[{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 L1(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(null);b.useEffect(()=>{let v=!1;return Ss().then(y=>{v||r({kind:"ok",modules:y.modules.filter(p=>p.installed)})}).catch(y=>{if(v)return;const p=y instanceof Error?y.message:String(y);r({kind:"error",message:p})}),vc().then(y=>{v||o(y.vaults.length)}).catch(()=>{v||o(null)}),()=>{v=!0}},[]);const f=l.kind==="ok"?l.modules:[],h=f.flatMap(v=>v.uis.map(y=>({key:`${v.short}:${y.name}`,label:y.display_name,tagline:y.tagline,href:y.path,ownerLabel:v.display_name})));return s.jsxs("div",{"data-route-content":"true",className:"admin-home",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Hub"})}),s.jsxs("p",{className:"muted",children:["Everything on this hub, in one place. Hub-native sections open here in the admin shell; module surfaces (marked ",s.jsx("span",{className:"ext-mark",children:"↗"}),") open the module's own UI."]}),s.jsxs("section",{className:"home-group","data-testid":"home-administer",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Administer"}),s.jsx("span",{className:"home-group-tag home-group-tag-hub",children:"hub"})]}),s.jsx("p",{className:"muted home-group-sub",children:"Cross-cutting host admin. Opens here in the shell — the nav stays with you."}),s.jsx("div",{className:"home-grid",children:B1.map(v=>s.jsxs(nt,{to:v.to,className:"home-card home-card-hub","data-section":v.to,children:[s.jsx("span",{className:"home-card-title",children:v.label}),s.jsx("span",{className:"home-card-desc",children:v.desc})]},v.to))})]}),s.jsxs("section",{className:"home-group","data-testid":"home-modules",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Modules"}),s.jsx("span",{className:"home-group-tag home-group-tag-module",children:"modules"})]}),s.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 ",s.jsx(nt,{to:"/modules",children:"Modules"}),"."]}),l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading modules…"}):l.kind==="error"?s.jsxs("p",{className:"muted","data-testid":"home-modules-error",children:["Couldn't load modules (",l.message,"). Open ",s.jsx(nt,{to:"/modules",children:"Modules"})," ","directly."]}):f.length===0?s.jsxs("p",{className:"muted","data-testid":"home-modules-empty",children:["No modules installed yet. ",s.jsx(nt,{to:"/modules",children:"Install one →"})]}):s.jsx("div",{className:"home-grid",children:f.map(v=>v.short==="vault"&&c===0?s.jsx(Y1,{module:v},v.short):s.jsx(q1,{module:v},v.short))})]}),h.length>0?s.jsxs("section",{className:"home-group","data-testid":"home-surfaces",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Your surfaces"}),s.jsx("span",{className:"home-group-tag home-group-tag-module",children:"module-owned"})]}),s.jsx("p",{className:"muted home-group-sub",children:"The user-facing apps these modules host. Opens the app — outside the hub shell."}),s.jsx("div",{className:"home-grid",children:h.map(v=>s.jsxs("a",{href:v.href,className:"home-card home-card-surface","data-testid":`home-surface-${v.key}`,children:[s.jsxs("span",{className:"home-card-title",children:[v.label," ",s.jsx("span",{className:"ext-mark",children:"↗"})]}),v.tagline?s.jsx("span",{className:"home-card-desc",children:v.tagline}):null,s.jsxs("span",{className:"home-card-owner",children:["opens ",v.ownerLabel,"'s surface"]})]},v.key))})]}):null]})}function q1({module:l}){const r=l.config_ui_url??l.management_url;return r?s.jsxs("a",{href:r,className:"home-card home-card-module","data-testid":`home-module-${l.short}`,children:[s.jsxs("span",{className:"home-card-title",children:[l.display_name," ",s.jsx("span",{className:"ext-mark",children:"↗"})]}),l.tagline?s.jsx("span",{className:"home-card-desc",children:l.tagline}):null,s.jsxs("span",{className:"home-card-owner",children:["opens ",l.display_name,"'s own admin"]})]}):s.jsxs("div",{className:"home-card home-card-module home-card-disabled","data-testid":`home-module-${l.short}`,"aria-disabled":"true",children:[s.jsx("span",{className:"home-card-title",children:l.display_name}),l.tagline?s.jsx("span",{className:"home-card-desc",children:l.tagline}):null,s.jsx("span",{className:"home-card-owner home-card-owner-empty",children:"no admin UI yet"})]})}function Y1({module:l}){return s.jsxs("a",{href:"/admin/setup?step=vault",className:"home-card home-card-hub","data-testid":`home-module-${l.short}`,children:[s.jsx("span",{className:"home-card-title",children:l.display_name}),s.jsx("span",{className:"home-card-desc",children:"No vaults yet — create your first vault to start storing notes, tokens, and secrets."}),s.jsx("span",{className:"home-card-owner",children:"create your first vault — opens the setup wizard"})]})}const G1=2e3,Z1=12e4;function V1(){const[l,r]=b.useState(null),[c,o]=b.useState({kind:"idle"}),f=b.useRef(null),h=b.useRef(0),v=b.useCallback(async()=>{try{r(await sc())}catch{}},[]);b.useEffect(()=>{v()},[v]),b.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const y=b.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),p=b.useCallback((S,x)=>{h.current=Date.now()+Z1,y(),f.current=setInterval(()=>{(async()=>{let z=null,A=null;try{z=await sc()}catch{}try{A=await g1()}catch{}if(z){const T=z.version!==S,O=x!==null&&z.version===x;if(T||O){y(),r(z),o({kind:"succeeded",newVersion:z.version});return}}if((A==null?void 0:A.phase)==="failed"){y(),o({kind:"error",message:A.error??"the hub upgrade failed — check the platform log"});return}if(Date.now()>=h.current){y();const T=(A==null?void 0:A.log.at(-1))??null;o({kind:"timeout",lastLog:T})}})()},G1)},[y]);async function g(){if(!l)return;const S=l.version;o({kind:"starting"});try{const x=await p1();if(x.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:x.target_version});return}o({kind:"upgrading",previousVersion:S,targetVersion:x.target_version}),p(S,x.target_version)}catch(x){o({kind:"error",message:x instanceof Error?x.message:String(x)})}}return l?s.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:["Hub ",s.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),s.jsxs("p",{className:"install-card-meta muted",children:["Installed ",s.jsxs("code",{"data-testid":"hub-current-version",children:["v",l.version]})," · source"," ",s.jsx("code",{children:l.source})]}),s.jsx(Q1,{state:c})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx(X1,{state:c,onUpgrade:()=>void g()})})]}):null}function X1({state:l,onUpgrade:r}){if(l.kind==="redeploy-required")return s.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const c=l.kind==="starting"||l.kind==="upgrading";return s.jsx("button",{type:"button",onClick:r,disabled:c,"data-testid":"hub-upgrade-button",children:c?"Upgrading…":"Upgrade hub"})}function Q1({state:l}){switch(l.kind){case"idle":return null;case"starting":return s.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return s.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 s.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",s.jsxs("code",{children:["v",l.newVersion]}),"."]});case"timeout":return s.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",l.lastLog?s.jsxs(s.Fragment,{children:[" ",s.jsxs("span",{className:"dim",children:["Last status: ",l.lastLog]})]}):null]});case"redeploy-required":return s.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?s.jsxs(s.Fragment,{children:["Redeploy from your platform dashboard to move to ",s.jsxs("code",{children:["v",l.targetVersion]}),"."]}):s.jsx(s.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return s.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",l.message]})}}function $1(){if(typeof navigator>"u")return"other";const l=(navigator.platform||"").toLowerCase();return l.includes("mac")?"darwin":l.includes("linux")?"linux":"other"}function J1(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 K1({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 s.jsxs("div",{className:"depcard-cmd",children:[s.jsx("pre",{className:"depcard-cmd-text",children:l}),s.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:r?"Copied":"Copy"})]})}function F1({wire:l}){const r=$1(),c=J1(l.install,r);return s.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[s.jsxs("h3",{className:"depcard-heading",children:[l.binary," isn't installed"]}),l.why?s.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",l.why,"."]}):null,c.length>0?s.jsxs("div",{className:"depcard-installs",children:[s.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),c.map(o=>s.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[s.jsx("span",{className:"depcard-os",children:o.label}),s.jsx(K1,{command:o.command})]},o.label))]}):null,l.docs_url?s.jsx("p",{className:"depcard-docs",children:s.jsx("a",{href:l.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,l.sysadmin_hint?s.jsx("p",{className:"depcard-hint muted",children:l.sysadmin_hint}):null]})}function W1(l){const{error:r,errorDetail:c}=l;return(c==null?void 0:c.error_type)==="missing_dependency"?s.jsx(F1,{wire:c}):c!=null&&c.error_description?s.jsx("span",{className:"depcard-fallback",children:c.error_description}):r?s.jsx("span",{className:"depcard-fallback",children:r}):null}function I1(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 P1(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 e0=1e3;function t0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState([]),[f,h]=b.useState({}),[v,y]=b.useState({}),p=b.useCallback(async()=>{try{const E=await Ss();r({kind:"ok",catalog:E})}catch(E){const U=E instanceof Error?E.message:String(E);r({kind:"error",message:U})}},[]);b.useEffect(()=>{p()},[p]);const g=b.useRef(null);b.useEffect(()=>{if(c.length===0){g.current&&(clearInterval(g.current),g.current=null);return}if(!g.current)return g.current=setInterval(()=>{Promise.all(c.map(async E=>{var U;try{const Z=await s1(E.operationId);o(Me=>Me.map(ue=>ue.operationId===Z.id?{...ue,log:Z.log,status:Z.status,error:Z.error,errorDetail:Z.error_detail}:ue)),(Z.status==="succeeded"||Z.status==="failed")&&(Z.status==="failed"&&((U=Z.error_detail)==null?void 0:U.error_type)==="missing_dependency"?p():setTimeout(()=>{o(ue=>ue.filter(ae=>ae.operationId!==Z.id)),p()},1500))}catch(Z){const Me=Z instanceof Error?Z.message:String(Z);o(ue=>ue.map(ae=>ae.operationId===E.operationId?{...ae,status:"failed",error:Me}:ae))}}))},e0),()=>{g.current&&(clearInterval(g.current),g.current=null)}},[c,p]);async function S(E){y(U=>{const Z={...U};return delete Z[E],Z});try{const U=await t1(E);o(Z=>[...Z,{kind:"install",operationId:U,short:E,log:[],status:"pending"}])}catch(U){y(Z=>({...Z,[E]:U instanceof Error?U.message:String(U)}))}}async function x(E){y(U=>{const Z={...U};return delete Z[E],Z});try{const U=await a1(E);o(Z=>[...Z,{kind:"upgrade",operationId:U,short:E,log:[],status:"pending"}])}catch(U){y(Z=>({...Z,[E]:U instanceof Error?U.message:String(U)}))}}async function z(E){if(!f[E]){h(U=>({...U,[E]:!0})),y(U=>{const Z={...U};return delete Z[E],Z});try{await n1(E),await p()}catch(U){y(Z=>({...Z,[E]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[E]:!1}))}}}async function A(E){if(!f[E]&&window.confirm(`Uninstall ${E}? 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,[E]:!0})),y(U=>{const Z={...U};return delete Z[E],Z});try{await l1(E),await p()}catch(U){y(Z=>({...Z,[E]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[E]:!1}))}}}if(l.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading modules…"});if(l.kind==="error")return l.message.includes("setup_required")?s.jsxs("div",{className:"empty",children:["Hub not yet configured. ",s.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):s.jsxs("div",{className:"empty",children:["Failed to load modules: ",l.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void p(),children:"Retry"})]});const T=l.catalog,{modules:O,supervisor_available:Y,module_install_channel:G}=T,Q=O.filter(E=>E.installed),$=O.filter(E=>!E.installed&&E.available),le=new Set(c.filter(E=>E.kind==="install").map(E=>E.short)),F=$.filter(E=>!le.has(E.short));async function J(E){if(E!==G){r({kind:"ok",catalog:{...T,module_install_channel:E}});try{const U=await i1(E);r(Z=>Z.kind==="ok"?{kind:"ok",catalog:{...Z.catalog,module_install_channel:U}}:Z)}catch(U){const Z=U instanceof Error?U.message:String(U);r({kind:"error",message:`Failed to update channel — ${Z}`})}}}return s.jsxs("section",{className:"modules",children:[s.jsx("h1",{children:"Modules"}),s.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."}),s.jsx(V1,{}),s.jsx(s0,{channel:G,disabled:!Y,onChange:E=>void J(E)}),!Y&&s.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 ",s.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",s.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),c.length>0&&s.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[s.jsx("strong",{children:"In progress:"}),s.jsx("ul",{children:c.map(E=>s.jsxs("li",{children:[s.jsx("code",{children:E.short})," · ",E.kind," · status: ",E.status,E.status==="failed"&&(E.errorDetail||E.error)?s.jsx("div",{className:"depcard-wrap",children:W1({error:E.error,errorDetail:E.errorDetail})}):null,E.log.length>0&&s.jsxs("details",{children:[s.jsxs("summary",{children:[E.log.length," log line(s)"]}),s.jsx("pre",{children:E.log.join(`
|
|
61
|
+
`)})]})]},E.operationId))})]}),s.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[s.jsx("h2",{children:"Installed modules"}),Q.length===0?s.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",s.jsx("strong",{children:"Install a module"})," below to get started."]}):Zh(Q,E=>s.jsx("ul",{className:"module-list",children:E.map(U=>s.jsx(a0,{module:U,supervisorAvailable:Y,syncBusy:!!f[U.short],errorMessage:v[U.short],onUpgrade:()=>void x(U.short),onRestart:()=>void z(U.short),onUninstall:()=>void A(U.short)},U.short))}),"installed")]}),s.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[s.jsx("h2",{children:"Install a module"}),F.length===0?s.jsx("p",{className:"muted","data-testid":"installable-empty",children:le.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):Zh(F,E=>s.jsx("ul",{className:"install-list",children:E.map(U=>s.jsx(n0,{module:U,supervisorAvailable:Y,installing:le.has(U.short),errorMessage:v[U.short],onInstall:()=>void S(U.short)},U.short))}),"installable")]})]})}function Zh(l,r,c){const o=l.filter(h=>h.focus!=="experimental"),f=l.filter(h=>h.focus==="experimental");return s.jsxs(s.Fragment,{children:[o.length>0&&s.jsx("div",{"data-testid":`${c}-core-group`,children:r(o)}),f.length>0&&s.jsxs("div",{className:"modules-experimental","data-testid":`${c}-experimental-group`,children:[s.jsxs("h3",{className:"muted experimental-heading",children:["Experimental"," ",s.jsx("span",{className:"muted",children:"— exploration modules; not part of the core surface"})]}),r(f)]})]})}function a0({module:l,supervisorAvailable:r,syncBusy:c,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:v}){const y=r&&!c,p=l.installed_version!==l.latest_version&&l.latest_version!==null,g=l.management_url,S=l.config_ui_url;return s.jsxs("li",{className:"module-row","data-short":l.short,children:[s.jsxs("header",{children:[s.jsxs("h2",{children:[l.display_name," ",s.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),(()=>{const x=l0(l);return s.jsx("span",{className:`status status-${x.cssState}`,"data-state":x.cssState,"data-testid":`module-status-${l.short}`,children:x.label})})()]}),l.tagline?s.jsx("p",{className:"tagline",children:l.tagline}):null,s.jsxs("dl",{className:"meta",children:[s.jsx("dt",{children:"Package"}),s.jsx("dd",{children:s.jsx("code",{children:l.package})}),s.jsx("dt",{children:"Installed"}),s.jsxs("dd",{children:["v",l.installed_version??"unknown",p&&s.jsxs("span",{className:"badge",children:["v",l.latest_version," available"]})]}),l.pid&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"PID"}),s.jsx("dd",{children:l.pid})]})]}),l.uis.length>0&&s.jsx(i0,{uis:l.uis}),s.jsxs("div",{className:"actions",children:[g?s.jsx("a",{className:"btn",href:g,"data-testid":`open-${l.short}`,children:"Open"}):s.jsx("button",{type:"button",className:"btn",disabled:!0,title:S?"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"}),S?s.jsx("a",{className:"btn",href:S,"data-testid":`configure-${l.short}`,children:"Configure"}):null,s.jsx("button",{type:"button",disabled:!y,onClick:h,children:"Restart"}),s.jsx("button",{type:"button",disabled:!y||!p,onClick:f,children:p?`Upgrade to v${l.latest_version}`:"Up to date"}),s.jsx("button",{type:"button",className:"destructive",disabled:!y,onClick:v,children:"Uninstall"})]}),o&&s.jsx("div",{className:"error",children:o})]})}function n0({module:l,supervisorAvailable:r,installing:c,errorMessage:o,onInstall:f}){const h=r&&!c;return s.jsxs("li",{className:"install-card","data-short":l.short,children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:[l.display_name," ",s.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),l.tagline?s.jsx("p",{className:"tagline",children:l.tagline}):null,s.jsxs("p",{className:"muted install-card-meta",children:[s.jsx("code",{children:l.package}),l.latest_version?s.jsxs(s.Fragment,{children:[" · ","latest ",s.jsxs("code",{children:["v",l.latest_version]})]}):null]})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx("button",{type:"button",disabled:!h,onClick:f,children:c?"Installing…":"Install"})}),o&&s.jsx("div",{className:"error",children:o})]})}function l0(l){if(!l.installed)return{cssState:"absent",label:"not installed"};if(!l.supervisor_status)return{cssState:"absent",label:"not supervised"};const r=I1(l.supervisor_status);return{cssState:r,label:r}}function i0({uis:l}){return s.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[s.jsxs("summary",{children:["Hosted UIs ",s.jsxs("span",{className:"muted",children:["(",l.length,")"]})]}),s.jsx("ul",{className:"ui-sub-units",children:l.map(r=>{const c=P1(r.status);return s.jsxs("li",{className:"ui-sub-unit","data-name":r.name,children:[r.icon_url&&s.jsx("img",{src:r.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),s.jsxs("div",{className:"ui-sub-unit-body",children:[s.jsxs("a",{href:r.path,className:"ui-sub-unit-link",children:[s.jsx("strong",{children:r.display_name}),s.jsxs("span",{className:"muted",children:[" · ",r.path]})]}),r.tagline?s.jsx("p",{className:"tagline",children:r.tagline}):null]}),s.jsx("span",{className:`status status-${c}`,"data-state":c,"data-testid":`ui-status-${r.name}`,children:c})]},r.name)})})]})}function s0({channel:l,disabled:r,onChange:c}){return s.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[s.jsx("legend",{children:"Install channel"}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:l==="latest",disabled:r,onChange:()=>c("latest")}),"Stable (",s.jsx("code",{children:"latest"}),")"]}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:l==="rc",disabled:r,onChange:()=>c("rc")}),"Release candidates (",s.jsx("code",{children:"rc"}),")"]}),s.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",s.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),s.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",s.jsx(nt,{to:"/settings",children:"Settings"}),"."]})]})}function u0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(""),[v,y]=b.useState(0),[p,g]=b.useState({kind:"idle"});b.useEffect(()=>{let A=!1;return r({kind:"loading"}),$y(f?{vault:f}:{}).then(O=>{A||r({kind:"ok",grants:O})}).catch(O=>{if(A)return;const Y=O instanceof Error?O.message:String(O);r({kind:"error",message:Y})}),()=>{A=!0}},[v,f]);function S(A){A.preventDefault(),h(c.trim())}function x(){o(""),h("")}async function z(A){g({kind:"revoking",clientId:A.client_id});try{await Jy(A.client_id),g({kind:"idle"}),y(T=>T+1)}catch(T){const O=T instanceof V?`revoke failed (${T.status}): ${T.message}`:T instanceof Error?T.message:String(T);g({kind:"error",clientId:A.client_id,message:O})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Permissions"})}),s.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 ",s.jsx("em",{children:"not"})," invalidate tokens already issued."]}),s.jsxs("form",{onSubmit:S,style:{marginTop:"1rem",marginBottom:"1rem"},children:[s.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),s.jsx("input",{id:"vault-filter",type:"text",value:c,onChange:A=>o(A.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),s.jsx("button",{type:"submit",children:"Apply"}),f?s.jsx("button",{type:"button",onClick:x,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),r0({state:l,revoke:p,setRevoke:g,onConfirm:z,onRetry:()=>y(A=>A+1)})]})}function r0({state:l,revoke:r,setRevoke:c,onConfirm:o,onRetry:f}){return l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):l.grants.length===0?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No grants."}),s.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."})]}):s.jsx("div",{style:{marginTop:"1rem"},children:l.grants.map(h=>{const v=r.kind==="revoking"&&r.clientId===h.client_id,y=r.kind==="error"&&r.clientId===h.client_id?r:null,p=r.kind==="confirming"&&r.grant.client_id===h.client_id;return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h.client_name??h.client_id})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"granted "}),s.jsx("code",{title:h.granted_at,children:c0(h.granted_at)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((g,S)=>s.jsxs("span",{children:[s.jsx("code",{children:g}),S<h.scopes.length-1?" ":null]},g))]}),y?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:y.message})}):null,p?s.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:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:v,children:v?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:v,children:"Cancel"})]})]}):null]}),p?null:s.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 c0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}function o0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(!1),[v,y]=b.useState(null),p=b.useCallback(async()=>{try{const T=await gm();r({kind:"ok",setting:T}),o(T.hub_origin??""),y(null)}catch(T){const O=T instanceof Error?T.message:String(T);r({kind:"error",message:O})}},[]);b.useEffect(()=>{p()},[p]);async function g(T){if(T.preventDefault(),f||l.kind!=="ok")return;const O=c.trim(),Y=O.length===0?null:O;h(!0),y(null);try{await qh(Y),await p()}catch(G){const Q=G instanceof Error?G.message:String(G);y(Q)}finally{h(!1)}}async function S(){if(!f&&l.kind==="ok"){h(!0),y(null);try{await qh(null),await p()}catch(T){const O=T instanceof Error?T.message:String(T);y(O)}finally{h(!1)}}}if(l.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading settings…"});if(l.kind==="error")return s.jsxs("div",{className:"empty",children:["Failed to load settings: ",l.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void p(),children:"Retry"})]});const{setting:x}=l,z=x.hub_origin!==null,A=c.trim()!==(x.hub_origin??"");return s.jsxs("section",{className:"settings",children:[s.jsx("h1",{children:"Hub settings"}),s.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),s.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[s.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),s.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[s.jsx("dt",{children:"Current value"}),s.jsxs("dd",{children:[s.jsx("code",{children:x.resolved_issuer})," ",s.jsx(d0,{source:x.source,hasStored:z})]})]}),s.jsxs("form",{onSubmit:T=>void g(T),className:"settings-form","data-testid":"hub-origin-form",children:[s.jsxs("label",{htmlFor:"hub-origin-input",children:[s.jsx("span",{children:"Canonical URL"}),s.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:c,disabled:f,onChange:T=>o(T.target.value),autoComplete:"off",spellCheck:!1})]}),s.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 ",s.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)."]}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:f||!A,children:f?"Saving…":"Save"}),s.jsx("button",{type:"button",className:"destructive",disabled:f||!z,onClick:()=>void S(),children:"Reset to default"})]}),v&&s.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:v})]})]})]})}function d0({source:l,hasStored:r}){return l==="settings"?s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):l==="env"?s.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",s.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):l==="expose"?s.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from your ",s.jsx("code",{children:"parachute expose"})," config"]}):s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const ec={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function f0(){const[l,r]=fm(),c=p0(l.get("status")),o=g0(l.get("source")),[f,h]=b.useState({kind:"loading"}),[v,y]=b.useState(0),[p,g]=b.useState({kind:"idle"}),[S,x]=b.useState(ec),[z,A]=b.useState({kind:"idle"}),[T,O]=b.useState(!1),[Y,G]=b.useState(!1);function Q(E,U){r(Z=>{const Me=new URLSearchParams(Z);return U==="all"?Me.delete(E):Me.set(E,U),Me},{replace:!0})}b.useEffect(()=>{let E=!1;return h({kind:"loading"}),Lh(Vh(c,o)).then(U=>{E||h({kind:"ok",tokens:U.tokens,nextCursor:U.next_cursor})}).catch(U=>{if(E)return;const Z=U instanceof Error?U.message:String(U);h({kind:"error",message:Z})}),()=>{E=!0}},[v,c,o]);async function $(){if(f.kind!=="ok"||!f.nextCursor||Y)return;const E={...Vh(c,o),cursor:f.nextCursor};G(!0);try{const U=await Lh(E);h({kind:"ok",tokens:[...f.tokens,...U.tokens],nextCursor:U.next_cursor})}catch(U){const Z=U instanceof Error?U.message:String(U);h({kind:"error",message:Z})}finally{G(!1)}}async function le(E){E.preventDefault();const U=S.scope.trim();if(U.length===0){g({kind:"error",message:"scope is required"});return}let Z;if(S.permissions.trim().length>0)try{const ue=JSON.parse(S.permissions);if(ue===null||typeof ue!="object"||Array.isArray(ue)){g({kind:"error",message:'permissions must be a JSON object (e.g. {"vault":{"default":...}})'});return}Z=ue}catch(ue){const ae=ue instanceof Error?ue.message:String(ue);g({kind:"error",message:`permissions is not valid JSON — ${ae}`});return}let Me;if(S.expiresIn.trim().length>0){const ue=Number(S.expiresIn);if(!Number.isInteger(ue)||ue<=0){g({kind:"error",message:"expires_in must be a positive integer (seconds)"});return}Me=ue}g({kind:"submitting"});try{const ue=await pm({scope:U,...S.audience.trim()?{audience:S.audience.trim()}:{},...Me!==void 0?{expires_in:Me}:{},...S.subject.trim()?{subject:S.subject.trim()}:{},...Z?{permissions:Z}:{}});g({kind:"minted",token:ue}),x(ec),O(!1),y(ae=>ae+1)}catch(ue){const ae=ue instanceof V?`mint failed (${ue.status}): ${ue.message}`:ue instanceof Error?ue.message:String(ue);g({kind:"error",message:ae})}}async function F(E){A({kind:"revoking",jti:E});try{await Iy(E),A({kind:"idle"}),y(U=>U+1)}catch(U){const Z=U instanceof V?`revoke failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);A({kind:"error",jti:E,message:Z})}}function J(E){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(E)}return s.jsxs("div",{children:[s.jsxs("div",{className:"list-header",children:[s.jsx("h1",{children:"Tokens"}),s.jsx("button",{type:"button",onClick:()=>O(E=>!E),children:T?"Hide form":"Mint new token"})]}),s.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",s.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",s.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),p.kind==="minted"?s.jsxs("div",{className:"mint-banner",children:[s.jsx("h3",{children:"Minted"}),s.jsxs("p",{children:["Your new access token (jti: ",s.jsx("code",{children:p.token.jti}),"):"]}),s.jsx("div",{className:"token-box",children:s.jsx("code",{children:p.token.token})}),s.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"button",onClick:()=>J(p.token.token),children:"Copy"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})]})]}):null,T?s.jsx("div",{className:"section",children:s.jsxs("form",{onSubmit:le,children:[s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),s.jsx("input",{id:"mint-scope",type:"text",value:S.scope,onChange:E=>x({...S,scope:E.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),s.jsxs("div",{className:"field-hint",children:["Space-separated ",s.jsx("code",{children:"resource:verb"})," or ",s.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),s.jsx("input",{id:"mint-audience",type:"text",value:S.audience,onChange:E=>x({...S,audience:E.target.value}),placeholder:"inferred from scope when blank"}),s.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",s.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",s.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",s.jsx("code",{children:"hub"}),"."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),s.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:S.expiresIn,onChange:E=>x({...S,expiresIn:E.target.value}),placeholder:"default 90d (7776000)"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),s.jsx("input",{id:"mint-subject",type:"text",value:S.subject,onChange:E=>x({...S,subject:E.target.value}),placeholder:"defaults to operator's sub"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),s.jsx("textarea",{id:"mint-permissions",value:S.permissions,onChange:E=>x({...S,permissions:E.target.value}),placeholder:'e.g. {"vault":{"default":{"write_tags":["health"]}}}',rows:3,style:{width:"100%",fontFamily:"monospace",fontSize:"0.9rem"}})]}),p.kind==="error"?s.jsx("div",{className:"field-error",children:s.jsx("code",{children:p.message})}):null,s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:p.kind==="submitting",children:p.kind==="submitting"?"Minting…":"Mint"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>{O(!1),x(ec),g({kind:"idle"})},children:"Cancel"})]})]})}):null,s.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.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(E=>s.jsx("button",{type:"button",onClick:()=>Q("status",E.value),className:c===E.value?void 0:"secondary","aria-pressed":c===E.value,children:E.label},E.value))]}),s.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.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(E=>s.jsx("button",{type:"button",onClick:()=>Q("source",E.value),className:o===E.value?void 0:"secondary","aria-pressed":o===E.value,children:E.label},E.value))]}),h0({list:f,revoke:z,setRevoke:A,onConfirm:F,onLoadMore:$,onRetry:()=>y(E=>E+1),loadingMore:Y,filtersActive:c!=="all"||o!=="all"})]})}function h0({list:l,revoke:r,setRevoke:c,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:v,filtersActive:y}){return l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):l.tokens.length===0?y?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),s.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens."}),s.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",s.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):s.jsxs("div",{"data-route-content":"true",children:[l.tokens.map(p=>{const g=m0(p),S=r.kind==="revoking"&&r.jti===p.jti,x=r.kind==="confirming"&&r.jti===p.jti,z=r.kind==="error"&&r.jti===p.jti?r:null,A=p.user_id??p.subject??"(unknown)";return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{title:p.jti,children:fs(p.jti)}),s.jsx("span",{className:`tag${g==="live"?"":" muted"}`,children:g}),s.jsx("span",{className:`tag source-${y0(p.created_via)}`,title:`created_via: ${p.created_via}`,children:v0(p.created_via)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"identity: "}),s.jsx("code",{children:A}),p.client_id?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · client: "}),s.jsx("code",{children:p.client_id})]}):null]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scope: "}),p.scopes.map((T,O)=>s.jsxs("span",{children:[s.jsx("code",{children:T}),O<p.scopes.length-1?" ":null]},T))]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[s.jsx("span",{className:"muted",children:"created "}),s.jsx("code",{title:p.created_at,children:tc(p.created_at)}),s.jsx("span",{className:"muted",children:" · expires "}),s.jsx("code",{title:p.expires_at,children:tc(p.expires_at)}),p.revoked_at?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · revoked "}),s.jsx("code",{title:p.revoked_at,children:tc(p.revoked_at)})]}):null]}),p.permissions?s.jsxs("details",{style:{marginTop:"0.35rem"},children:[s.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),s.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(p.permissions,null,2)})]}):null,z?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:z.message})}):null,x?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${fs(p.jti)}`,children:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:fs(p.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(p.jti)},disabled:S,children:S?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:S,children:"Cancel"})]})]}):null]}),!x&&g==="live"?s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",jti:p.jti}),"aria-label":`Revoke ${fs(p.jti)}`,children:"Revoke"}):null]},p.jti)}),l.nextCursor?s.jsx("div",{style:{marginTop:"1rem"},children:s.jsx("button",{type:"button",className:"secondary",disabled:v,onClick:()=>{f()},children:v?"Loading…":"Load more"})}):null]})}function m0(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 p0(l){return l==="live"||l==="revoked"||l==="all"?l:"all"}function g0(l){return l==="oauth_refresh"||l==="operator_mint"||l==="cli_mint"||l==="all"?l:"all"}function Vh(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 v0(l){switch(l){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return l}}function y0(l){switch(l){case"oauth_refresh":return"oauth";case"operator_mint":return"operator";case"cli_mint":return"cli";default:return"unknown"}}function fs(l){return l.length<=14?l:`${l.slice(0,8)}…${l.slice(-4)}`}function tc(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const b0=1440*60;function x0(l){return l.provision_vault?"owner (new vault)":l.vault_name===null?"account only":l.role==="read"?"read-only (shared)":"read & write (shared)"}function Xh(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 j0(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 S0({hubOrigin:l}){const[r,c]=b.useState({kind:"loading"}),[o,f]=b.useState(0),[h,v]=b.useState(""),[y,p]=b.useState("provision"),[g,S]=b.useState(""),[x,z]=b.useState(""),[A,T]=b.useState("read"),[O,Y]=b.useState([]),[G,Q]=b.useState("7"),[$,le]=b.useState({kind:"idle"}),[F,J]=b.useState(null),[E,U]=b.useState(null),Z={username:h.trim()!==""?h.trim():null,vault_name:y==="share"?x!==""?x:null:g.trim()!==""?g.trim():null,role:y==="share"?A:"write",provision_vault:y==="provision"};b.useEffect(()=>{let K=!1;return c({kind:"loading"}),Promise.all([f1(),vm()]).then(([pe,ye])=>{K||(c({kind:"ok",invites:pe}),Y(ye))}).catch(pe=>{K||c({kind:"error",message:pe instanceof Error?pe.message:String(pe)})}),()=>{K=!0}},[o]);async function Me(K){if(K.preventDefault(),$.kind==="submitting")return;if(y==="share"&&x===""){le({kind:"error",message:"Pick which existing vault to share before creating the invite."});return}le({kind:"submitting"}),J(null);const pe=Number.parseInt(G,10),ye={...h.trim()!==""?{username:h.trim()}:{},...Number.isFinite(pe)&&pe>0?{expires_in:pe*b0}:{},...y==="share"?{vault_name:x,provision_vault:!1,role:A}:{...g.trim()!==""?{vault_name:g.trim()}:{},provision_vault:!0}};try{const D=await h1(ye);le({kind:"created",result:D}),v(""),S(""),z(""),f(X=>X+1)}catch(D){le({kind:"error",message:D instanceof Error?D.message:String(D)})}}async function ue(K){if(!E){U(K);try{await m1(K),f(pe=>pe+1)}catch(pe){c({kind:"error",message:pe instanceof Error?pe.message:String(pe)})}finally{U(null)}}}function ae(K,pe){var ye;(ye=navigator.clipboard)==null||ye.writeText(K).then(()=>{J(pe),setTimeout(()=>J(null),2e3)})}return s.jsxs("section",{style:{marginTop:"2rem"},"data-testid":"invites-section",children:[s.jsx("div",{className:"list-header",children:s.jsx("h2",{children:"Invite links"})}),s.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)."}),s.jsxs("form",{onSubmit:K=>void Me(K),style:{marginBottom:"1rem"},children:[s.jsxs("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap",alignItems:"flex-end"},children:[s.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[s.jsx("span",{className:"field-label",children:"Username (optional)"}),s.jsx("input",{type:"text",value:h,onChange:K=>v(K.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",minLength:2,maxLength:32,autoComplete:"off",spellCheck:!1})]}),s.jsxs("label",{className:"field",style:{flex:"0 0 14rem"},children:[s.jsx("span",{className:"field-label",children:"Vault access"}),s.jsxs("select",{value:y,onChange:K=>p(K.target.value==="share"?"share":"provision"),children:[s.jsx("option",{value:"provision",children:"Create a new vault for them"}),s.jsx("option",{value:"share",children:"Share an existing vault"})]})]}),y==="provision"?s.jsxs("label",{className:"field",style:{flex:"1 1 12rem"},children:[s.jsx("span",{className:"field-label",children:"New vault name (optional)"}),s.jsx("input",{type:"text",value:g,onChange:K=>S(K.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",autoComplete:"off",spellCheck:!1})]}):s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[s.jsx("span",{className:"field-label",children:"Vault"}),s.jsxs("select",{value:x,onChange:K=>z(K.target.value),required:!0,children:[s.jsx("option",{value:"",children:"Pick a vault…"}),O.map(K=>s.jsx("option",{value:K,children:K},K))]})]}),s.jsxs("label",{className:"field",style:{flex:"0 0 9rem"},children:[s.jsx("span",{className:"field-label",children:"Role"}),s.jsxs("select",{value:A,onChange:K=>T(K.target.value==="write"?"write":"read"),children:[s.jsx("option",{value:"read",children:"Read-only"}),s.jsx("option",{value:"write",children:"Read & write"})]})]})]}),s.jsxs("label",{className:"field",style:{flex:"0 0 8rem"},children:[s.jsx("span",{className:"field-label",children:"Expires (days)"}),s.jsx("input",{type:"number",min:1,max:90,value:G,onChange:K=>Q(K.target.value)})]}),s.jsx("button",{type:"submit",disabled:$.kind==="submitting",children:$.kind==="submitting"?"Creating…":"Create invite"})]}),s.jsx("p",{className:"muted",style:{marginTop:"0.5rem"},"data-testid":"invite-preview",children:y==="share"&&x===""?"Pick the existing vault to share to finish configuring this link.":Xh(Z)})]}),$.kind==="error"&&s.jsx("div",{className:"error-banner",style:{marginBottom:"1rem"},children:$.message}),$.kind==="created"&&s.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"1rem"},children:[s.jsx("strong",{children:"Invite created."})," ",Xh($.result.invite),s.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.`,s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[s.jsx("code",{style:{wordBreak:"break-all",flex:"1 1 16rem"},children:$.result.url}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>ae($.result.url,"link"),children:F==="link"?"Copied!":"Copy link"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>ae(j0($.result.invite,$.result.url,$.result.invite.expires_at),"message"),children:F==="message"?"Copied!":"Copy message"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>le({kind:"idle"}),children:"Dismiss"})]})]}),r.kind==="loading"&&s.jsx("p",{className:"muted",children:"Loading invites…"}),r.kind==="error"&&s.jsxs("div",{className:"error-banner",children:[r.message,s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>f(K=>K+1),children:"Retry"})})]}),r.kind==="ok"&&r.invites.length===0&&s.jsx("p",{className:"muted",children:"No invites yet."}),r.kind==="ok"&&r.invites.length>0&&s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"user-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"For"}),s.jsx("th",{children:"Vault"}),s.jsx("th",{children:"Access"}),s.jsx("th",{children:"Status"}),s.jsx("th",{children:"Expires"}),s.jsx("th",{children:"Created"}),s.jsx("th",{})]})}),s.jsx("tbody",{children:r.invites.map(K=>s.jsxs("tr",{children:[s.jsx("td",{children:K.username??s.jsx("span",{className:"muted",children:"they choose"})}),s.jsx("td",{children:K.vault_name??s.jsx("span",{className:"muted",children:"redeemer chooses"})}),s.jsx("td",{children:x0(K)}),s.jsx("td",{children:s.jsx("span",{className:`status status-${K.status}`,children:K.status})}),s.jsx("td",{className:"muted",children:new Date(K.expires_at).toLocaleDateString()}),s.jsx("td",{className:"muted",children:new Date(K.created_at).toLocaleDateString()}),s.jsx("td",{children:K.status==="pending"?s.jsx("button",{type:"button",className:"secondary",disabled:E===K.id,onClick:()=>void ue(K.id),children:E===K.id?"Revoking…":"Revoke"}):null})]},K.id))})]})}),l?s.jsxs("p",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Redemption links are served from ",s.jsxs("code",{children:[l,"/account/setup/<token>"]}),"."]}):null]})}const Da=12,C0=/^[a-z0-9_-]+$/,vs=2,ys=32,Qh={username:"",password:"",assignedVaults:[]};function jm({username:l,hubOrigin:r}){const c=`${r||""}/login`;return s.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",s.jsx("code",{children:c})," with username ",s.jsx("code",{children:l})," and this password — they'll be prompted to set a new one on first sign-in."]})}function N0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState(!1),[v,y]=b.useState(Qh),[p,g]=b.useState({kind:"idle"}),[S,x]=b.useState({kind:"idle"}),[z,A]=b.useState({kind:"idle"}),[T,O]=b.useState({kind:"idle"});b.useEffect(()=>{let F=!1;return r({kind:"loading"}),Promise.all([u1(),vm(),gm()]).then(([J,E,U])=>{if(F)return;const Z=U.resolved_issuer.replace(/\/+$/,"");r({kind:"ok",data:{users:J,vaults:E,hubOrigin:Z}})}).catch(J=>{if(F)return;const E=J instanceof Error?J.message:String(J);r({kind:"error",message:E})}),()=>{F=!0}},[c]);function Y(F){return F.username.length<vs||F.username.length>ys?`Username must be ${vs}-${ys} characters.`:C0.test(F.username)?F.password.length<Da?`Password must be at least ${Da} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function G(F){F.preventDefault();const J=Y(v);if(J){g({kind:"error",message:J});return}g({kind:"submitting"});const E={username:v.username,password:v.password,assignedVaults:v.assignedVaults};try{const U=await r1(E);y(Qh),g({kind:"created",username:U.username}),o(Z=>Z+1)}catch(U){const Z=U instanceof V?`Create failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);g({kind:"error",message:Z})}}async function Q(F){x({kind:"deleting",userId:F.id});try{const{revocationLagSeconds:J}=await c1(F.id);x({kind:"done",username:F.username,revocationLagSeconds:J}),o(E=>E+1)}catch(J){const E=J instanceof V?`Delete failed (${J.status}): ${J.message}`:J instanceof Error?J.message:String(J);x({kind:"error",userId:F.id,message:E})}}async function $(F,J){O({kind:"submitting",userId:F.id,selected:J});try{await d1(F.id,J),O({kind:"done",userId:F.id,username:F.username}),o(E=>E+1)}catch(E){const U=E instanceof V?`Edit vaults failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);O({kind:"error",userId:F.id,selected:J,message:U})}}async function le(F,J){if(J.length<Da){A({kind:"error",userId:F.id,password:J,message:`Password must be at least ${Da} characters.`});return}A({kind:"submitting",userId:F.id,password:J});try{const{revocationLagSeconds:E}=await o1(F.id,J);A({kind:"done",userId:F.id,username:F.username,revocationLagSeconds:E}),o(U=>U+1)}catch(E){const U=E instanceof V?`Reset failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);A({kind:"error",userId:F.id,password:J,message:U})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Users"})}),s.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 ",s.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"?s.jsxs(s.Fragment,{children:[" ","at ",s.jsxs("code",{children:[l.data.hubOrigin,"/login"]})]}):null,"."]}),S.kind==="done"&&s.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",s.jsx("code",{children:S.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",S.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>x({kind:"idle"}),children:"Dismiss"})})]}),E0(l,S,x,Q,z,A,le,T,O,$,l.kind==="ok"?l.data.vaults:[],l.kind==="ok"?l.data.hubOrigin:"",()=>o(F=>F+1)),l.kind==="ok"&&s.jsx(R0,{show:f,setShow:h,form:v,setForm:y,vaults:l.data.vaults,hubOrigin:l.data.hubOrigin,createState:p,setCreateState:g,onSubmit:G}),l.kind==="ok"&&s.jsx(S0,{hubOrigin:l.data.hubOrigin})]})}function E0(l,r,c,o,f,h,v,y,p,g,S,x,z){var O;if(l.kind==="loading")return s.jsx("p",{className:"muted",children:"Loading users…"});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:z,className:"secondary",children:"Retry"})]});const{users:A}=l.data;if(A.length===0)return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No users yet."}),s.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const T=(O=A[0])==null?void 0:O.id;return s.jsx(w0,{users:A,firstAdminId:T,deleteSt:r,setDeleteSt:c,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:v,editVaultsSt:y,setEditVaultsSt:p,onSubmitEditVaults:g,availableVaults:S,hubOrigin:x})}function w0({users:l,firstAdminId:r,deleteSt:c,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:v,onSubmitReset:y,editVaultsSt:p,setEditVaultsSt:g,onSubmitEditVaults:S,availableVaults:x,hubOrigin:z}){return s.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"user-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Username"}),s.jsx("th",{scope:"col",children:"Assigned vaults"}),s.jsx("th",{scope:"col",children:"Password set"}),s.jsx("th",{scope:"col",children:"Created"}),s.jsx("th",{scope:"col",children:"Actions"})]})}),s.jsx("tbody",{children:l.map(A=>{const T=A.id===r,O=c.kind==="deleting"&&c.userId===A.id,Y=c.kind==="confirming"&&c.user.id===A.id,G=c.kind==="error"&&c.userId===A.id?c:null,Q=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===A.id?h:null,$=h.kind==="done"&&h.userId===A.id?h:null,le=(p.kind==="open"||p.kind==="submitting"||p.kind==="error")&&p.userId===A.id?p:null,F=p.kind==="done"&&p.userId===A.id?p:null;return s.jsxs("tr",{"data-user-id":A.id,children:[s.jsxs("td",{children:[s.jsx("code",{children:A.username}),T&&s.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),s.jsx("td",{children:A.assigned_vaults.length>0?s.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:A.assigned_vaults.map(J=>s.jsx("code",{children:J},J))}):s.jsx("span",{className:"muted",title:T?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),s.jsx("td",{children:A.password_changed?s.jsx("span",{"aria-label":"changed",children:"✓"}):s.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),s.jsx("td",{children:s.jsx("span",{title:A.created_at,children:A0(A.created_at)})}),s.jsxs("td",{children:[Y?null:s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[T&&s.jsxs(s.Fragment,{children:[s.jsx("span",{id:`first-admin-tooltip-${A.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),s.jsx("span",{id:`first-admin-reset-tooltip-${A.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),s.jsx("span",{id:`first-admin-vaults-tooltip-${A.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),s.jsx("button",{type:"button",className:"secondary",disabled:T||le!==null||p.kind==="submitting"&&p.userId===A.id,title:T?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":T?`first-admin-vaults-tooltip-${A.id}`:void 0,onClick:()=>g({kind:"open",userId:A.id,selected:[...A.assigned_vaults]}),"aria-label":`Edit vaults for ${A.username}`,children:"Edit vaults"}),s.jsx("button",{type:"button",className:"secondary",disabled:T||Q!==null||h.kind==="submitting"&&h.userId===A.id,title:T?"First admin uses /account/change-password directly":void 0,"aria-describedby":T?`first-admin-reset-tooltip-${A.id}`:void 0,onClick:()=>v({kind:"open",userId:A.id,password:""}),"aria-label":`Reset password for ${A.username}`,children:"Reset password"}),s.jsx("button",{type:"button",className:"secondary",disabled:T||O,title:T?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":T?`first-admin-tooltip-${A.id}`:void 0,onClick:()=>o({kind:"confirming",user:A}),"aria-label":`Delete ${A.username}`,children:O?"Deleting…":"Delete"})]}),Y&&s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${A.username}`,children:[s.jsxs("p",{children:["Delete ",s.jsx("code",{children:A.username}),"? This revokes their tokens, drops their sessions and grants, and removes the account. The audit trail is preserved — tokens stay with ",s.jsx("code",{children:"revoked_at"})," set, anonymised."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(A)},disabled:O,children:O?"Deleting…":"Delete"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:O,children:"Cancel"})]})]}),G&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:G.message})}),Q&&s.jsx(T0,{user:A,state:Q,onCancel:()=>v({kind:"idle"}),onPasswordChange:J=>v({kind:"open",userId:A.id,password:J}),onSubmit:J=>{y(A,J)}}),$&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",s.jsx("code",{children:$.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",s.jsx(jm,{username:$.username,hubOrigin:z}),s.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 ",$.revocationLagSeconds," ","seconds — if you're resetting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Dismiss"})})]}),le&&s.jsx(_0,{user:A,state:le,availableVaults:x,onCancel:()=>g({kind:"idle"}),onSelectedChange:J=>g({kind:"open",userId:A.id,selected:J}),onSubmit:J=>{S(A,J)}}),F&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",s.jsx("code",{children:F.username}),".",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})})]})]})]},A.id)})})]})})})}function T0({user:l,state:r,onCancel:c,onPasswordChange:o,onSubmit:f}){const h=r.kind==="submitting",v=r.kind==="error"?r.message:null,y=`reset-password-input-${l.id}`;return s.jsxs("form",{onSubmit:p=>{p.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:[s.jsxs("p",{style:{margin:0},children:[s.jsxs("label",{htmlFor:y,children:["New temporary password for ",s.jsx("code",{children:l.username})," ",s.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:y,type:"password",required:!0,autoComplete:"new-password",minLength:Da,value:r.password,disabled:h,onChange:p=>o(p.target.value)})]}),v&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:v})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),s.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}function _0({user:l,state:r,availableVaults:c,onCancel:o,onSelectedChange:f,onSubmit:h}){const v=r.kind==="submitting",y=r.kind==="error"?r.message:null,p=`edit-vaults-select-${l.id}`;function g(S){const x=Array.from(S.target.selectedOptions).map(z=>z.value);f(x)}return s.jsxs("form",{onSubmit:S=>{S.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:[s.jsx("p",{style:{margin:0},children:s.jsxs("label",{htmlFor:p,children:["Vault assignments for ",s.jsx("code",{children:l.username})," ",s.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),r.selected.length>0&&s.jsx("div",{"data-testid":`edit-vaults-chips-${l.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:r.selected.map(S=>s.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:S},S))}),s.jsx("select",{id:p,multiple:!0,value:r.selected,onChange:g,disabled:v,size:Math.min(Math.max(c.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:c.map(S=>s.jsx("option",{value:S,children:S},S))}),c.length===0&&s.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),y&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:y})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:v,children:v?"Saving…":"Save vault assignments"}),s.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:v,children:"Cancel"})]})]})}function R0({show:l,setShow:r,form:c,setForm:o,vaults:f,hubOrigin:h,createState:v,setCreateState:y,onSubmit:p}){const g=v.kind==="submitting";return s.jsx("section",{style:{marginTop:"1.5rem"},children:l?s.jsxs("form",{onSubmit:S=>void p(S),"aria-label":"Create user",children:[s.jsx("h3",{children:"Create user"}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",s.jsxs("span",{className:"muted",children:["(",vs,"-",ys," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:c.username,minLength:vs,maxLength:ys,pattern:"[a-z0-9_\\-]+",onChange:S=>o({...c,username:S.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-password",children:["Password ",s.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:c.password,minLength:Da,onChange:S=>o({...c,password:S.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",s.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),s.jsx("br",{}),c.assignedVaults.length>0&&s.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:c.assignedVaults.map(S=>s.jsx("code",{children:S},S))}),s.jsx("br",{}),s.jsx("select",{id:"new-user-vaults",multiple:!0,value:c.assignedVaults,onChange:S=>o({...c,assignedVaults:Array.from(S.target.selectedOptions).map(x=>x.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(S=>s.jsx("option",{value:S,children:S},S))}),f.length===0&&s.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),v.kind==="error"&&s.jsx("div",{className:"error-banner",children:s.jsx("code",{children:v.message})}),v.kind==="created"&&s.jsxs("output",{className:"success-banner",children:["User ",s.jsx("code",{children:v.username})," created. They'll be prompted to change their password on first sign-in.",s.jsx(jm,{username:v.username,hubOrigin:h})]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:g,children:g?"Creating…":"Create user"}),s.jsx("button",{type:"button",className:"secondary",disabled:g,onClick:()=>{r(!1),y({kind:"idle"})},children:"Close"})]})]}):s.jsx("button",{type:"button",onClick:()=>r(!0),children:"Create User"})})}function A0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const M0="https://parachute.computer/install#connect-mcp-clients";function Sm(l){return`${l.replace(/\/+$/,"")}/mcp`}function Cm(l,r){return`claude mcp add --transport http parachute-${l} ${Sm(r)}`}function z0(l,r,c){return`${Cm(l,r)} --header "Authorization: Bearer ${c}"`}function ac({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return s.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 k0({vaultName:l,vaultUrl:r,embedded:c=!1}){const o=Sm(r),f=Cm(l,r),[h,v]=b.useState(!1),[y,p]=b.useState({kind:"idle"});async function g(){if(y.kind!=="submitting"){p({kind:"submitting"});try{const z=await pm({scope:`vault:${l}:read vault:${l}:write`});p({kind:"minted",token:z})}catch(z){const A=z instanceof V?`mint failed (${z.status}): ${z.message}`:z instanceof Error?z.message:String(z);p({kind:"error",message:A})}}}const S=y.kind==="minted"?z0(l,r,y.token.token):null,x=s.jsxs(s.Fragment,{children:[s.jsx("h3",{children:"Connect an MCP client (or connector)"}),s.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 ",s.jsx("code",{children:l})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-endpoint",children:o}),s.jsx(ac,{value:o})]})]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-add-command",children:f}),s.jsx(ac,{value:f})]}),s.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."})]}),s.jsxs("details",{className:"mcp-token-path",open:h,onToggle:z=>v(z.currentTarget.open),children:[s.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),s.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",s.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"&&S?s.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[s.jsx("h3",{children:"Token minted"}),s.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 ",s.jsx("code",{children:"Authorization"})," header."]}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-header-command",children:S}),s.jsx(ac,{value:S})]}),s.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",s.jsx("code",{children:"/admin/tokens"}),"."]})]}):s.jsx("div",{className:"actions",children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>{g()},disabled:y.kind==="submitting",children:y.kind==="submitting"?"Minting…":"Mint a token"})}),y.kind==="error"?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:y.message})}):null]}),s.jsx("p",{className:"dim mcp-docs-link",children:s.jsx("a",{href:M0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return c?s.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:x}):s.jsx("div",{className:"mcp-connect-card",children:x})}const $h="/vault/admin/";function O0(){const[l,r]=b.useState("detecting"),[c,o]=b.useState({kind:"loading"}),[f,h]=b.useState(0),[v,y]=b.useState({kind:"idle"}),[p,g]=b.useState(null),[S,x]=b.useState({});b.useEffect(()=>{let T=!1;return Ss().then(O=>{if(T)return;const Y=O.modules.find(G=>G.short==="vault");if(Y!=null&&Y.installed&&Y.config_ui_url===$h){r("redirecting"),window.location.replace($h);return}r("legacy")}).catch(()=>{T||r("legacy")}),()=>{T=!0}},[]);async function z(T){if(T.managementUrl){y({kind:"minting",name:T.name});try{const O=await mm(T.name),Y=Wy(T.url,T.managementUrl),G=Y.includes("#")?"&":"#";window.location.assign(`${Y}${G}token=${O.token}`)}catch(O){const Y=O instanceof V?`mint failed (${O.status}): ${O.message}`:O instanceof Error?O.message:String(O);y({kind:"error",name:T.name,message:Y})}}}if(b.useEffect(()=>{if(l!=="legacy")return;let T=!1;return vc().then(O=>{T||o({kind:"ok",vaults:O.vaults,moduleInstalled:O.moduleInstalled})}).catch(O=>{if(T)return;const Y=O instanceof Error?O.message:String(O);o({kind:"error",message:Y})}),()=>{T=!0}},[f,l]),b.useEffect(()=>{if(c.kind!=="ok")return;const T=c.vaults.map(Y=>Y.name);if(T.length===0)return;let O=!1;x(Y=>{const G={...Y};for(const Q of T)G[Q]||(G[Q]={kind:"loading"});return G});for(const Y of T)Xy(Y).then(G=>{O||x(Q=>({...Q,[Y]:{kind:"ok",usage:G}}))}).catch(()=>{O||x(G=>({...G,[Y]:{kind:"error"}}))});return()=>{O=!0}},[c]),l!=="legacy")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsx("p",{className:"muted","data-testid":"vaults-detecting",children:l==="redirecting"?"Opening the vault admin…":"Loading…"})]});if(c.kind==="loading")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsx("p",{className:"muted",children:"Loading…"})]});if(c.kind==="error")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",s.jsx("code",{children:c.message})]}),s.jsx("button",{type:"button",onClick:()=>h(T=>T+1),className:"secondary",children:"Retry"})]});const A=c.vaults.length===0&&!c.moduleInstalled;return s.jsxs("div",{"data-route-content":"true",children:[s.jsxs("div",{className:"list-header",children:[s.jsxs("h1",{children:["Vaults (",c.vaults.length,")"]}),A?s.jsx(nt,{to:"/modules",children:s.jsx("button",{type:"button",children:"Install vault module"})}):null]}),s.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",s.jsx("code",{children:"/.well-known/parachute.json"}),"."," ",s.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?s.jsxs("p",{className:"muted","data-testid":"vaults-legacy-create-hint",children:["To create another vault, upgrade the vault module from ",s.jsx(nt,{to:"/modules",children:"Modules"})," ","(its own admin app includes create), or run"," ",s.jsx("code",{children:"parachute vault create <name>"})," on the host."]}):null,c.vaults.length===0?A?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vault module installed."}),s.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."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx(nt,{to:"/modules",children:"Install vault module →"})})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vaults yet."}),s.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx("a",{href:"/admin/setup?step=vault",children:"Create a vault →"})})]}):s.jsx("div",{style:{marginTop:"1rem"},children:c.vaults.map(T=>{const O=v.kind==="minting"&&v.name===T.name,Y=v.kind==="error"&&v.name===T.name?v:null,G=p===T.name,Q=S[T.name],$=(Q==null?void 0:Q.kind)==="ok"?`${Q.usage.notes} ${Q.usage.notes===1?"note":"notes"} · ${Qy(Q.usage.totalBytes)}`:(Q==null?void 0:Q.kind)==="loading"?"…":"—";return s.jsxs("div",{className:"vault-row-group",children:[s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{children:T.name}),s.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",T.version]})]}),s.jsx("div",{className:"dim url",children:s.jsx("code",{children:T.url})}),s.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${T.name}`,children:$}),Y?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:Y.message})}):null]}),s.jsxs("div",{className:"vault-row-actions",children:[s.jsx("button",{type:"button",className:G?void 0:"secondary","aria-expanded":G,"aria-label":`Connect an MCP client to vault ${T.name}`,onClick:()=>g(le=>le===T.name?null:T.name),children:G?"Hide connect":"Connect"}),T.managementUrl?s.jsx("button",{type:"button",onClick:()=>{z(T)},disabled:O,"aria-label":`Manage vault ${T.name}`,children:O?"Opening…":"Manage"}):s.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),G?s.jsx(k0,{vaultName:T.name,vaultUrl:T.url}):null]},T.name)})})]})}function Nm(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 U0(l){return`${Nm(l).split(" ").map(c=>c.length>0?c[0].toUpperCase()+c.slice(1):c).join(" ")} · ${hm}`}function D0(){const{pathname:l}=Et(),r=Nm(l),[c,o]=b.useState(null);b.useEffect(()=>{document.title=U0(l)},[l]);const[f,h]=b.useState(!1),[v,y]=b.useState([]);b.useEffect(()=>{let g=!1;return Ky().then(S=>{g||o(S)}).catch(()=>{g||o({hasSession:!1})}),()=>{g=!0}},[]),b.useEffect(()=>{if(!c||!c.hasSession)return;let g=!1;return Ss().then(S=>{g||y(S.modules.filter(x=>x.installed))}).catch(()=>{g||y([])}),()=>{g=!0}},[c]);async function p(g){h(!0);try{await Fy(g),window.location.href="/"}catch{h(!1)}}return s.jsxs("div",{className:"page",children:[s.jsxs("nav",{className:"nav",children:[s.jsxs(nt,{to:"/",className:"brand",children:[s.jsx(By,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),s.jsx("span",{className:"brand-wordmark",children:hm}),s.jsx("span",{className:"sub",children:r})]}),s.jsx(B0,{me:c,signingOut:f,onSignOut:p}),s.jsx(an,{to:"/",label:"Home",exact:!0}),s.jsx(an,{to:"/connections",label:"Connections"}),s.jsx(an,{to:"/modules",label:"Modules"}),s.jsx(an,{to:"/users",label:"Users"}),s.jsx(an,{to:"/tokens",label:"Tokens"}),s.jsx(an,{to:"/permissions",label:"Permissions"}),s.jsx(an,{to:"/settings",label:"Settings"}),s.jsx("span",{className:"nav-divider","aria-hidden":"true"}),s.jsx(H0,{services:v}),s.jsx("a",{href:"/hub.html",title:"Hub discovery page (top-level)",children:"Discovery"})]}),s.jsxs(ay,{children:[s.jsx(ht,{path:"/",element:s.jsx(L1,{})}),s.jsx(ht,{path:"/vaults",element:s.jsx(O0,{})}),s.jsx(ht,{path:"/vaults/new",element:s.jsx(Fr,{to:"/vaults",replace:!0})}),s.jsx(ht,{path:"/modules",element:s.jsx(t0,{})}),s.jsx(ht,{path:"/users",element:s.jsx(N0,{})}),s.jsx(ht,{path:"/connections",element:s.jsx(A1,{})}),s.jsx(ht,{path:"/channels",element:s.jsx(Fr,{to:"/connections",replace:!0})}),s.jsx(ht,{path:"/channels/*",element:s.jsx(Fr,{to:"/connections",replace:!0})}),s.jsx(ht,{path:"/permissions",element:s.jsx(u0,{})}),s.jsx(ht,{path:"/tokens",element:s.jsx(f0,{})}),s.jsx(ht,{path:"/settings",element:s.jsx(o0,{})}),s.jsx(ht,{path:"/approve-client/:clientId",element:s.jsx(E1,{})}),s.jsx(ht,{path:"*",element:s.jsxs("div",{className:"empty",children:["404 — back to ",s.jsx(nt,{to:"/",children:"Home"}),"."]})})]}),c!=null&&c.hasSession?s.jsx(N1,{}):null]})}function an({to:l,label:r,alsoActiveAt:c,exact:o}){const{pathname:f}=Et(),y=(o?f===l:f===l||f.startsWith(`${l}/`))||c!==void 0&&f===c;return s.jsx(nt,{to:l,className:y?"nav-link nav-link-active":"nav-link","aria-current":y?"page":void 0,children:r})}function H0({services:l}){return l.length===0?null:s.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[s.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),s.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:l.map(r=>{const c=r.management_url;return c?s.jsx("a",{className:"nav-dropdown-item",href:c,role:"menuitem","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short):s.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 B0({me:l,signingOut:r,onSignOut:c}){return l===null?null:l.hasSession?s.jsxs("span",{className:"auth-spa",children:[s.jsxs("span",{className:"muted",children:["Signed in as ",s.jsx("strong",{children:l.user.displayName})]})," ","·"," ",s.jsx("button",{type:"button",className:"auth-spa-signout",disabled:r,onClick:()=>{c(l.csrf)},children:r?"Signing out…":"Sign out"})]}):s.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const Em=document.getElementById("root");if(!Em)throw new Error("#root not found");function L0(){const l=window.location.pathname;return l==="/admin"||l.startsWith("/admin/")?"/admin":""}lv.createRoot(Em).render(s.jsx(b.StrictMode,{children:s.jsx(Ty,{basename:L0(),children:s.jsx(D0,{})})}));
|