@openparachute/vault 0.7.3 → 0.7.4-rc.2
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/core/src/attachment/tickets.ts +9 -0
- package/core/src/mcp-manifest.ts +5 -1
- package/core/src/mcp.ts +8 -0
- package/package.json +1 -1
- package/src/attachment-tickets.test.ts +46 -0
- package/src/attachment-tickets.ts +6 -0
- package/src/embeddings-routes.test.ts +188 -0
- package/src/embeddings-routes.ts +178 -0
- package/src/routes.ts +15 -1
- package/src/routing.test.ts +129 -0
- package/src/routing.ts +28 -0
- package/src/vault-store.ts +15 -0
- package/src/vault.test.ts +167 -0
- package/web/ui/dist/assets/index-NvwxfZcu.js +61 -0
- package/web/ui/dist/index.html +1 -1
- package/web/ui/dist/assets/index-CJ6NtIwh.js +0 -61
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&r(g)}).observe(document,{childList:!0,subtree:!0});function o(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 r(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Jc={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 wh;function uy(){if(wh)return ql;wh=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(r,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var E in f)E!=="key"&&(h[E]=f[E])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:g,ref:f!==void 0?f:null,props:h}}return ql.Fragment=c,ql.jsx=o,ql.jsxs=o,ql}var Ch;function sy(){return Ch||(Ch=1,Jc.exports=uy()),Jc.exports}var l=sy(),Kc={exports:{}},se={};/**
|
|
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 Ah;function cy(){if(Ah)return se;Ah=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),R=Symbol.iterator;function L(j){return j===null||typeof j!="object"?null:(j=R&&j[R]||j["@@iterator"],typeof j=="function"?j:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,D={};function G(j,N,V){this.props=j,this.context=N,this.refs=D,this.updater=V||H}G.prototype.isReactComponent={},G.prototype.setState=function(j,N){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,N,"setState")},G.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function F(){}F.prototype=G.prototype;function B(j,N,V){this.props=j,this.context=N,this.refs=D,this.updater=V||H}var z=B.prototype=new F;z.constructor=B,k(z,G.prototype),z.isPureReactComponent=!0;var Z=Array.isArray;function J(){}var X={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function ce(j,N,V){var Q=V.ref;return{$$typeof:u,type:j,key:N,ref:Q!==void 0?Q:null,props:V}}function ze(j,N){return ce(j.type,N,j.props)}function Ue(j){return typeof j=="object"&&j!==null&&j.$$typeof===u}function He(j){var N={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return N[V]})}var Ce=/\/+/g;function I(j,N){return typeof j=="object"&&j!==null&&j.key!=null?He(""+j.key):N.toString(36)}function ie(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(J,J):(j.status="pending",j.then(function(N){j.status==="pending"&&(j.status="fulfilled",j.value=N)},function(N){j.status==="pending"&&(j.status="rejected",j.reason=N)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function M(j,N,V,Q,ae){var ue=typeof j;(ue==="undefined"||ue==="boolean")&&(j=null);var je=!1;if(j===null)je=!0;else switch(ue){case"bigint":case"string":case"number":je=!0;break;case"object":switch(j.$$typeof){case u:case c:je=!0;break;case S:return je=j._init,M(je(j._payload),N,V,Q,ae)}}if(je)return ae=ae(j),je=Q===""?"."+I(j,0):Q,Z(ae)?(V="",je!=null&&(V=je.replace(Ce,"$&/")+"/"),M(ae,N,V,"",function(Ja){return Ja})):ae!=null&&(Ue(ae)&&(ae=ze(ae,V+(ae.key==null||j&&j.key===ae.key?"":(""+ae.key).replace(Ce,"$&/")+"/")+je)),N.push(ae)),1;je=0;var at=Q===""?".":Q+":";if(Z(j))for(var qe=0;qe<j.length;qe++)Q=j[qe],ue=at+I(Q,qe),je+=M(Q,N,V,ue,ae);else if(qe=L(j),typeof qe=="function")for(j=qe.call(j),qe=0;!(Q=j.next()).done;)Q=Q.value,ue=at+I(Q,qe++),je+=M(Q,N,V,ue,ae);else if(ue==="object"){if(typeof j.then=="function")return M(ie(j),N,V,Q,ae);throw N=String(j),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return je}function K(j,N,V){if(j==null)return j;var Q=[],ae=0;return M(j,Q,"","",function(ue){return N.call(V,ue,ae++)}),Q}function ne(j){if(j._status===-1){var N=j._result;N=N(),N.then(function(V){(j._status===0||j._status===-1)&&(j._status=1,j._result=V)},function(V){(j._status===0||j._status===-1)&&(j._status=2,j._result=V)}),j._status===-1&&(j._status=0,j._result=N)}if(j._status===1)return j._result.default;throw j._result}var ye=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},$={map:K,forEach:function(j,N,V){K(j,function(){N.apply(this,arguments)},V)},count:function(j){var N=0;return K(j,function(){N++}),N},toArray:function(j){return K(j,function(N){return N})||[]},only:function(j){if(!Ue(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return se.Activity=v,se.Children=$,se.Component=G,se.Fragment=o,se.Profiler=f,se.PureComponent=B,se.StrictMode=r,se.Suspense=x,se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,se.__COMPILER_RUNTIME={__proto__:null,c:function(j){return X.H.useMemoCache(j)}},se.cache=function(j){return function(){return j.apply(null,arguments)}},se.cacheSignal=function(){return null},se.cloneElement=function(j,N,V){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var Q=k({},j.props),ae=j.key;if(N!=null)for(ue in N.key!==void 0&&(ae=""+N.key),N)!ee.call(N,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&N.ref===void 0||(Q[ue]=N[ue]);var ue=arguments.length-2;if(ue===1)Q.children=V;else if(1<ue){for(var je=Array(ue),at=0;at<ue;at++)je[at]=arguments[at+2];Q.children=je}return ce(j.type,ae,Q)},se.createContext=function(j){return j={$$typeof:g,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:h,_context:j},j},se.createElement=function(j,N,V){var Q,ae={},ue=null;if(N!=null)for(Q in N.key!==void 0&&(ue=""+N.key),N)ee.call(N,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ae[Q]=N[Q]);var je=arguments.length-2;if(je===1)ae.children=V;else if(1<je){for(var at=Array(je),qe=0;qe<je;qe++)at[qe]=arguments[qe+2];ae.children=at}if(j&&j.defaultProps)for(Q in je=j.defaultProps,je)ae[Q]===void 0&&(ae[Q]=je[Q]);return ce(j,ue,ae)},se.createRef=function(){return{current:null}},se.forwardRef=function(j){return{$$typeof:E,render:j}},se.isValidElement=Ue,se.lazy=function(j){return{$$typeof:S,_payload:{_status:-1,_result:j},_init:ne}},se.memo=function(j,N){return{$$typeof:p,type:j,compare:N===void 0?null:N}},se.startTransition=function(j){var N=X.T,V={};X.T=V;try{var Q=j(),ae=X.S;ae!==null&&ae(V,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(J,ye)}catch(ue){ye(ue)}finally{N!==null&&V.types!==null&&(N.types=V.types),X.T=N}},se.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},se.use=function(j){return X.H.use(j)},se.useActionState=function(j,N,V){return X.H.useActionState(j,N,V)},se.useCallback=function(j,N){return X.H.useCallback(j,N)},se.useContext=function(j){return X.H.useContext(j)},se.useDebugValue=function(){},se.useDeferredValue=function(j,N){return X.H.useDeferredValue(j,N)},se.useEffect=function(j,N){return X.H.useEffect(j,N)},se.useEffectEvent=function(j){return X.H.useEffectEvent(j)},se.useId=function(){return X.H.useId()},se.useImperativeHandle=function(j,N,V){return X.H.useImperativeHandle(j,N,V)},se.useInsertionEffect=function(j,N){return X.H.useInsertionEffect(j,N)},se.useLayoutEffect=function(j,N){return X.H.useLayoutEffect(j,N)},se.useMemo=function(j,N){return X.H.useMemo(j,N)},se.useOptimistic=function(j,N){return X.H.useOptimistic(j,N)},se.useReducer=function(j,N,V){return X.H.useReducer(j,N,V)},se.useRef=function(j){return X.H.useRef(j)},se.useState=function(j){return X.H.useState(j)},se.useSyncExternalStore=function(j,N,V){return X.H.useSyncExternalStore(j,N,V)},se.useTransition=function(){return X.H.useTransition()},se.version="19.2.5",se}var Rh;function or(){return Rh||(Rh=1,Kc.exports=cy()),Kc.exports}var y=or(),$c={exports:{}},Gl={},Fc={exports:{}},Wc={};/**
|
|
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 kh;function ry(){return kh||(kh=1,(function(u){function c(M,K){var ne=M.length;M.push(K);e:for(;0<ne;){var ye=ne-1>>>1,$=M[ye];if(0<f($,K))M[ye]=K,M[ne]=$,ne=ye;else break e}}function o(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var K=M[0],ne=M.pop();if(ne!==K){M[0]=ne;e:for(var ye=0,$=M.length,j=$>>>1;ye<j;){var N=2*(ye+1)-1,V=M[N],Q=N+1,ae=M[Q];if(0>f(V,ne))Q<$&&0>f(ae,V)?(M[ye]=ae,M[Q]=ne,ye=Q):(M[ye]=V,M[N]=ne,ye=N);else if(Q<$&&0>f(ae,ne))M[ye]=ae,M[Q]=ne,ye=Q;else break e}}return K}function f(M,K){var ne=M.sortIndex-K.sortIndex;return ne!==0?ne:M.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var g=Date,E=g.now();u.unstable_now=function(){return g.now()-E}}var x=[],p=[],S=1,v=null,R=3,L=!1,H=!1,k=!1,D=!1,G=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var K=o(p);K!==null;){if(K.callback===null)r(p);else if(K.startTime<=M)r(p),K.sortIndex=K.expirationTime,c(x,K);else break;K=o(p)}}function Z(M){if(k=!1,z(M),!H)if(o(x)!==null)H=!0,J||(J=!0,He());else{var K=o(p);K!==null&&ie(Z,K.startTime-M)}}var J=!1,X=-1,ee=5,ce=-1;function ze(){return D?!0:!(u.unstable_now()-ce<ee)}function Ue(){if(D=!1,J){var M=u.unstable_now();ce=M;var K=!0;try{e:{H=!1,k&&(k=!1,F(X),X=-1),L=!0;var ne=R;try{t:{for(z(M),v=o(x);v!==null&&!(v.expirationTime>M&&ze());){var ye=v.callback;if(typeof ye=="function"){v.callback=null,R=v.priorityLevel;var $=ye(v.expirationTime<=M);if(M=u.unstable_now(),typeof $=="function"){v.callback=$,z(M),K=!0;break t}v===o(x)&&r(x),z(M)}else r(x);v=o(x)}if(v!==null)K=!0;else{var j=o(p);j!==null&&ie(Z,j.startTime-M),K=!1}}break e}finally{v=null,R=ne,L=!1}K=void 0}}finally{K?He():J=!1}}}var He;if(typeof B=="function")He=function(){B(Ue)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,I=Ce.port2;Ce.port1.onmessage=Ue,He=function(){I.postMessage(null)}}else He=function(){G(Ue,0)};function ie(M,K){X=G(function(){M(u.unstable_now())},K)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(M){M.callback=null},u.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<M?Math.floor(1e3/M):5},u.unstable_getCurrentPriorityLevel=function(){return R},u.unstable_next=function(M){switch(R){case 1:case 2:case 3:var K=3;break;default:K=R}var ne=R;R=K;try{return M()}finally{R=ne}},u.unstable_requestPaint=function(){D=!0},u.unstable_runWithPriority=function(M,K){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ne=R;R=M;try{return K()}finally{R=ne}},u.unstable_scheduleCallback=function(M,K,ne){var ye=u.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ye+ne:ye):ne=ye,M){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=ne+$,M={id:S++,callback:K,priorityLevel:M,startTime:ne,expirationTime:$,sortIndex:-1},ne>ye?(M.sortIndex=ne,c(p,M),o(x)===null&&M===o(p)&&(k?(F(X),X=-1):k=!0,ie(Z,ne-ye))):(M.sortIndex=$,c(x,M),H||L||(H=!0,J||(J=!0,He()))),M},u.unstable_shouldYield=ze,u.unstable_wrapCallback=function(M){var K=R;return function(){var ne=R;R=K;try{return M.apply(this,arguments)}finally{R=ne}}}})(Wc)),Wc}var zh;function oy(){return zh||(zh=1,Fc.exports=ry()),Fc.exports}var Ic={exports:{}},tt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Mh;function dy(){if(Mh)return tt;Mh=1;var u=or();function c(x){var p="https://react.dev/errors/"+x;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)p+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(c(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(x,p,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:v==null?null:""+v,children:x,containerInfo:p,implementation:S}}var g=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(x,p){if(x==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,tt.createPortal=function(x,p){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(c(299));return h(x,p,null,S)},tt.flushSync=function(x){var p=g.T,S=r.p;try{if(g.T=null,r.p=2,x)return x()}finally{g.T=p,r.p=S,r.d.f()}},tt.preconnect=function(x,p){typeof x=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(x,p))},tt.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},tt.preinit=function(x,p){if(typeof x=="string"&&p&&typeof p.as=="string"){var S=p.as,v=E(S,p.crossOrigin),R=typeof p.integrity=="string"?p.integrity:void 0,L=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;S==="style"?r.d.S(x,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:R,fetchPriority:L}):S==="script"&&r.d.X(x,{crossOrigin:v,integrity:R,fetchPriority:L,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},tt.preinitModule=function(x,p){if(typeof x=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var S=E(p.as,p.crossOrigin);r.d.M(x,{crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(x)},tt.preload=function(x,p){if(typeof x=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var S=p.as,v=E(S,p.crossOrigin);r.d.L(x,S,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},tt.preloadModule=function(x,p){if(typeof x=="string")if(p){var S=E(p.as,p.crossOrigin);r.d.m(x,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(x)},tt.requestFormReset=function(x){r.d.r(x)},tt.unstable_batchedUpdates=function(x,p){return x(p)},tt.useFormState=function(x,p,S){return g.H.useFormState(x,p,S)},tt.useFormStatus=function(){return g.H.useHostTransitionStatus()},tt.version="19.2.5",tt}var Oh;function fy(){if(Oh)return Ic.exports;Oh=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),Ic.exports=dy(),Ic.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 Dh;function hy(){if(Dh)return Gl;Dh=1;var u=oy(),c=or(),o=fy();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function E(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 x(e){if(h(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return x(i),e;if(s===a)return x(i),t;s=s.sibling}throw Error(r(188))}if(n.return!==a.return)n=i,a=s;else{for(var d=!1,m=i.child;m;){if(m===n){d=!0,n=i,a=s;break}if(m===a){d=!0,a=i,n=s;break}m=m.sibling}if(!d){for(m=s.child;m;){if(m===n){d=!0,n=s,a=i;break}if(m===a){d=!0,a=s,n=i;break}m=m.sibling}if(!d)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?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 v=Object.assign,R=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),B=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ze=Symbol.for("react.memo_cache_sentinel"),Ue=Symbol.iterator;function He(e){return e===null||typeof e!="object"?null:(e=Ue&&e[Ue]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Symbol.for("react.client.reference");function I(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case G:return"Profiler";case D:return"StrictMode";case Z:return"Suspense";case J:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case B:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:I(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return I(e(t))}catch{}}return null}var ie=Array.isArray,M=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ye=[],$=-1;function j(e){return{current:e}}function N(e){0>$||(e.current=ye[$],ye[$]=null,$--)}function V(e,t){$++,ye[$]=e.current,e.current=t}var Q=j(null),ae=j(null),ue=j(null),je=j(null);function at(e,t){switch(V(ue,t),V(ae,e),V(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ff(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ff(t),e=Wf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(Q),V(Q,e)}function qe(){N(Q),N(ae),N(ue)}function Ja(e){e.memoizedState!==null&&V(je,e);var t=Q.current,n=Wf(t,e.type);t!==n&&(V(ae,e),V(Q,n))}function ti(e){ae.current===e&&(N(Q),N(ae)),je.current===e&&(N(je),Ul._currentValue=ne)}var Au,Tr;function qn(e){if(Au===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Au=t&&t[1]||"",Tr=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Au+e+Tr}var Ru=!1;function ku(e,t){if(!e||Ru)return"";Ru=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(O){var A=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){A=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){A=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&A&&typeof O.stack=="string")return[O.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),d=s[0],m=s[1];if(d&&m){var b=d.split(`
|
|
44
|
+
`),C=m.split(`
|
|
45
|
+
`);for(i=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;i<C.length&&!C[i].includes("DetermineComponentFrameRoot");)i++;if(a===b.length||i===C.length)for(a=b.length-1,i=C.length-1;1<=a&&0<=i&&b[a]!==C[i];)i--;for(;1<=a&&0<=i;a--,i--)if(b[a]!==C[i]){if(a!==1||i!==1)do if(a--,i--,0>i||b[a]!==C[i]){var U=`
|
|
46
|
+
`+b[a].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=a&&0<=i);break}}}finally{Ru=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function Hm(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return ku(e.type,!1);case 11:return ku(e.type.render,!1);case 1:return ku(e.type,!0);case 31:return qn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Hm(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var zu=Object.prototype.hasOwnProperty,Mu=u.unstable_scheduleCallback,Ou=u.unstable_cancelCallback,Bm=u.unstable_shouldYield,Lm=u.unstable_requestPaint,ht=u.unstable_now,qm=u.unstable_getCurrentPriorityLevel,Nr=u.unstable_ImmediatePriority,wr=u.unstable_UserBlockingPriority,ni=u.unstable_NormalPriority,Gm=u.unstable_LowPriority,Cr=u.unstable_IdlePriority,Ym=u.log,Vm=u.unstable_setDisableYieldValue,Ka=null,mt=null;function hn(e){if(typeof Ym=="function"&&Vm(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ka,e)}catch{}}var pt=Math.clz32?Math.clz32:Zm,Xm=Math.log,Qm=Math.LN2;function Zm(e){return e>>>=0,e===0?32:31-(Xm(e)/Qm|0)|0}var ai=256,li=262144,ii=4194304;function Gn(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 ui(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,s=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~s,a!==0?i=Gn(a):(d&=m,d!==0?i=Gn(d):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~s,m!==0?i=Gn(m):d!==0?i=Gn(d):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&s)===0&&(s=i&-i,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:i}function $a(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Jm(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 Ar(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Du(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Km(e,t,n,a,i,s){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,C=e.hiddenUpdates;for(n=d&~n;0<n;){var U=31-pt(n),Y=1<<U;m[U]=0,b[U]=-1;var A=C[U];if(A!==null)for(C[U]=null,U=0;U<A.length;U++){var O=A[U];O!==null&&(O.lane&=-536870913)}n&=~Y}a!==0&&Rr(e,a,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(d&~t))}function Rr(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function kr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-pt(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function zr(e,t){var n=t&-t;return n=(n&42)!==0?1:Uu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Uu(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 Hu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mr(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function Or(e,t){var n=K.p;try{return K.p=e,t()}finally{K.p=n}}var mn=Math.random().toString(36).slice(2),Fe="__reactFiber$"+mn,ut="__reactProps$"+mn,sa="__reactContainer$"+mn,Bu="__reactEvents$"+mn,$m="__reactListeners$"+mn,Fm="__reactHandles$"+mn,Dr="__reactResources$"+mn,Wa="__reactMarker$"+mn;function Lu(e){delete e[Fe],delete e[ut],delete e[Bu],delete e[$m],delete e[Fm]}function ca(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sa]||n[Fe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lh(e);e!==null;){if(n=e[Fe])return n;e=lh(e)}return t}e=n,n=e.parentNode}return null}function ra(e){if(e=e[Fe]||e[sa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function oa(e){var t=e[Dr];return t||(t=e[Dr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Wa]=!0}var Ur=new Set,Hr={};function Yn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(Hr[e]=t,e=0;e<t.length;e++)Ur.add(t[e])}var Wm=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]*$"),Br={},Lr={};function Im(e){return zu.call(Lr,e)?!0:zu.call(Br,e)?!1:Wm.test(e)?Lr[e]=!0:(Br[e]=!0,!1)}function si(e,t,n){if(Im(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ci(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Qt(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pm(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){n=""+d,s.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qu(e){if(!e._valueTracker){var t=qr(e)?"checked":"value";e._valueTracker=Pm(e,t,""+e[t])}}function Gr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=qr(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ri(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 ep=/[\n"\\]/g;function Tt(e){return e.replace(ep,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,n,a,i,s,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=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Yu(e,d,Et(t)):n!=null?Yu(e,d,Et(n)):a!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Et(m):e.removeAttribute("name")}function Yr(e,t,n,a,i,s,d,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){qu(e);return}n=n!=null?""+Et(n):"",t=t!=null?""+Et(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),qu(e)}function Yu(e,t,n){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fa(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vr(e,t,n){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Et(n):""}function Xr(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(r(92));if(ie(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Et(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qu(e)}function ha(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tp=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 Qr(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||tp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Zr(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Qr(e,i,a)}else for(var s in t)t.hasOwnProperty(s)&&Qr(e,s,t[s])}function Vu(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 np=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"]]),ap=/^[\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 oi(e){return ap.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Xu=null;function Qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,pa=null;function Jr(e){var t=ra(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Tt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[ut]||null;if(!i)throw Error(r(90));Gu(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Gr(a)}break e;case"textarea":Vr(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}}}var Zu=!1;function Kr(e,t,n){if(Zu)return e(t,n);Zu=!0;try{var a=e(t);return a}finally{if(Zu=!1,(ma!==null||pa!==null)&&(Wi(),ma&&(t=ma,e=pa,pa=ma=null,Jr(t),e)))for(t=0;t<e.length;t++)Jr(e[t])}}function Pa(e,t){var n=e.stateNode;if(n===null)return null;var a=n[ut]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=!1;if(Jt)try{var el={};Object.defineProperty(el,"passive",{get:function(){Ju=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Ju=!1}var pn=null,Ku=null,di=null;function $r(){if(di)return di;var e,t=Ku,n=t.length,a,i="value"in pn?pn.value:pn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var d=n-e;for(a=1;a<=d&&t[n-a]===i[s-a];a++);return di=i.slice(e,1<a?1-a:void 0)}function fi(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 hi(){return!0}function Fr(){return!1}function st(e){function t(n,a,i,s,d){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=s,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hi:Fr,this.isPropagationStopped=Fr,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=st(Vn),tl=v({},Vn,{view:0,detail:0}),lp=st(tl),$u,Fu,nl,pi=v({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nl&&(nl&&e.type==="mousemove"?($u=e.screenX-nl.screenX,Fu=e.screenY-nl.screenY):Fu=$u=0,nl=e),$u)},movementY:function(e){return"movementY"in e?e.movementY:Fu}}),Wr=st(pi),ip=v({},pi,{dataTransfer:0}),up=st(ip),sp=v({},tl,{relatedTarget:0}),Wu=st(sp),cp=v({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),rp=st(cp),op=v({},Vn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dp=st(op),fp=v({},Vn,{data:0}),Ir=st(fp),hp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mp={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"},pp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pp[e])?!!t[e]:!1}function Iu(){return gp}var yp=v({},tl,{key:function(e){if(e.key){var t=hp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vp=st(yp),xp=v({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pr=st(xp),bp=v({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),jp=st(bp),Sp=v({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ep=st(Sp),Tp=v({},pi,{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}),_p=st(Tp),Np=v({},Vn,{newState:0,oldState:0}),wp=st(Np),Cp=[9,13,27,32],Pu=Jt&&"CompositionEvent"in window,al=null;Jt&&"documentMode"in document&&(al=document.documentMode);var Ap=Jt&&"TextEvent"in window&&!al,eo=Jt&&(!Pu||al&&8<al&&11>=al),to=" ",no=!1;function ao(e,t){switch(e){case"keyup":return Cp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ga=!1;function Rp(e,t){switch(e){case"compositionend":return lo(t);case"keypress":return t.which!==32?null:(no=!0,to);case"textInput":return e=t.data,e===to&&no?null:e;default:return null}}function kp(e,t){if(ga)return e==="compositionend"||!Pu&&ao(e,t)?(e=$r(),di=Ku=pn=null,ga=!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 eo&&t.locale!=="ko"?null:t.data;default:return null}}var zp={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 io(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zp[e.type]:t==="textarea"}function uo(e,t,n,a){ma?pa?pa.push(a):pa=[a]:ma=a,t=lu(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var ll=null,il=null;function Mp(e){Xf(e,0)}function gi(e){var t=Ia(e);if(Gr(t))return e}function so(e,t){if(e==="change")return t}var co=!1;if(Jt){var es;if(Jt){var ts="oninput"in document;if(!ts){var ro=document.createElement("div");ro.setAttribute("oninput","return;"),ts=typeof ro.oninput=="function"}es=ts}else es=!1;co=es&&(!document.documentMode||9<document.documentMode)}function oo(){ll&&(ll.detachEvent("onpropertychange",fo),il=ll=null)}function fo(e){if(e.propertyName==="value"&&gi(il)){var t=[];uo(t,il,e,Qu(e)),Kr(Mp,t)}}function Op(e,t,n){e==="focusin"?(oo(),ll=t,il=n,ll.attachEvent("onpropertychange",fo)):e==="focusout"&&oo()}function Dp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(il)}function Up(e,t){if(e==="click")return gi(t)}function Hp(e,t){if(e==="input"||e==="change")return gi(t)}function Bp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Bp;function ul(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!zu.call(t,i)||!gt(e[i],t[i]))return!1}return!0}function ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mo(e,t){var n=ho(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ho(n)}}function po(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?po(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function go(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ri(e.document)}return t}function ns(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 Lp=Jt&&"documentMode"in document&&11>=document.documentMode,ya=null,as=null,sl=null,ls=!1;function yo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ls||ya==null||ya!==ri(a)||(a=ya,"selectionStart"in a&&ns(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),sl&&ul(sl,a)||(sl=a,a=lu(as,"onSelect"),0<a.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ya)))}function Xn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var va={animationend:Xn("Animation","AnimationEnd"),animationiteration:Xn("Animation","AnimationIteration"),animationstart:Xn("Animation","AnimationStart"),transitionrun:Xn("Transition","TransitionRun"),transitionstart:Xn("Transition","TransitionStart"),transitioncancel:Xn("Transition","TransitionCancel"),transitionend:Xn("Transition","TransitionEnd")},is={},vo={};Jt&&(vo=document.createElement("div").style,"AnimationEvent"in window||(delete va.animationend.animation,delete va.animationiteration.animation,delete va.animationstart.animation),"TransitionEvent"in window||delete va.transitionend.transition);function Qn(e){if(is[e])return is[e];if(!va[e])return e;var t=va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vo)return is[e]=t[n];return e}var xo=Qn("animationend"),bo=Qn("animationiteration"),jo=Qn("animationstart"),qp=Qn("transitionrun"),Gp=Qn("transitionstart"),Yp=Qn("transitioncancel"),So=Qn("transitionend"),Eo=new Map,us="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(" ");us.push("scrollEnd");function Ot(e,t){Eo.set(e,t),Yn(t,[e])}var yi=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=[],xa=0,ss=0;function vi(){for(var e=xa,t=ss=xa=0;t<e;){var n=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var i=_t[t];_t[t++]=null;var s=_t[t];if(_t[t++]=null,a!==null&&i!==null){var d=a.pending;d===null?i.next=i:(i.next=d.next,d.next=i),a.pending=i}s!==0&&To(n,i,s)}}function xi(e,t,n,a){_t[xa++]=e,_t[xa++]=t,_t[xa++]=n,_t[xa++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,n,a){return xi(e,t,n,a),bi(e)}function Zn(e,t){return xi(e,null,null,t),bi(e)}function To(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,s=e.return;s!==null;)s.childLanes|=n,a=s.alternate,a!==null&&(a.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-pt(n),e=s.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),s):null}function bi(e){if(50<Al)throw Al=0,yc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function Vp(e,t,n,a){this.tag=e,this.key=n,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,a){return new Vp(e,t,n,a)}function rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function _o(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,n,a,i,s){var d=0;if(a=e,typeof e=="function")rs(e)&&(d=1);else if(typeof e=="string")d=Kg(e,n,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=yt(31,n,t,i),e.elementType=ce,e.lanes=s,e;case k:return Jn(n.children,i,s,t);case D:d=8,i|=24;break;case G:return e=yt(12,n,t,i|2),e.elementType=G,e.lanes=s,e;case Z:return e=yt(13,n,t,i),e.elementType=Z,e.lanes=s,e;case J:return e=yt(19,n,t,i),e.elementType=J,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:d=10;break e;case F:d=9;break e;case z:d=11;break e;case X:d=14;break e;case ee:d=16,a=null;break e}d=29,n=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=yt(d,n,t,i),t.elementType=e,t.type=a,t.lanes=s,t}function Jn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function os(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function No(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function ds(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wo=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var n=wo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:_r(t)},wo.set(e,t),t)}return{value:e,source:t,stack:_r(t)}}var ja=[],Sa=0,Si=null,cl=0,wt=[],Ct=0,gn=null,Bt=1,Lt="";function $t(e,t){ja[Sa++]=cl,ja[Sa++]=Si,Si=e,cl=t}function Co(e,t,n){wt[Ct++]=Bt,wt[Ct++]=Lt,wt[Ct++]=gn,gn=e;var a=Bt;e=Lt;var i=32-pt(a)-1;a&=~(1<<i),n+=1;var s=32-pt(t)+i;if(30<s){var d=i-i%5;s=(a&(1<<d)-1).toString(32),a>>=d,i-=d,Bt=1<<32-pt(t)+i|n<<i|a,Lt=s+e}else Bt=1<<s|n<<i|a,Lt=e}function fs(e){e.return!==null&&($t(e,1),Co(e,1,0))}function hs(e){for(;e===Si;)Si=ja[--Sa],ja[Sa]=null,cl=ja[--Sa],ja[Sa]=null;for(;e===gn;)gn=wt[--Ct],wt[Ct]=null,Lt=wt[--Ct],wt[Ct]=null,Bt=wt[--Ct],wt[Ct]=null}function Ao(e,t){wt[Ct++]=Bt,wt[Ct++]=Lt,wt[Ct++]=gn,Bt=t.id,Lt=t.overflow,gn=e}var We=null,Ae=null,ge=!1,yn=null,At=!1,ms=Error(r(519));function vn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rl(Nt(t,e)),ms}function Ro(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[ut]=a,n){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(n=0;n<kl.length;n++)he(kl[n],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),Yr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Xr(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Kf(t.textContent,n)?(a.popover!=null&&(he("beforetoggle",t),he("toggle",t)),a.onScroll!=null&&he("scroll",t),a.onScrollEnd!=null&&he("scrollend",t),a.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||vn(e,!0)}function ko(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:We=We.return}}function Ea(e){if(e!==We)return!1;if(!ge)return ko(e),ge=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||zc(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),ko(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=ah(e)}else t===27?(t=Ae,zn(e.type)?(e=Hc,Hc=null,Ae=e):Ae=t):Ae=We?kt(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=We=null,ge=!1}function ps(){var e=yn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),yn=null),e}function rl(e){yn===null?yn=[e]:yn.push(e)}var gs=j(null),$n=null,Ft=null;function xn(e,t,n){V(gs,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=gs.current,N(gs)}function ys(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function vs(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var d=i.child;s=s.firstContext;e:for(;s!==null;){var m=s;s=i;for(var b=0;b<t.length;b++)if(m.context===t[b]){s.lanes|=n,m=s.alternate,m!==null&&(m.lanes|=n),ys(s.return,n,e),a||(d=null);break e}s=m.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(r(341));d.lanes|=n,s=d.alternate,s!==null&&(s.lanes|=n),ys(d,n,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 Ta(e,t,n,a){e=null;for(var i=t,s=!1;i!==null;){if(!s){if((i.flags&524288)!==0)s=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var m=i.type;gt(i.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(i===je.current){if(d=i.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}i=i.return}e!==null&&vs(t,e,n,a),t.flags|=262144}function Ei(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fn(e){$n=e,Ft=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ie(e){return zo($n,e)}function Ti(e,t){return $n===null&&Fn(e),zo(e,t)}function zo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ft===null){if(e===null)throw Error(r(308));Ft=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ft=Ft.next=t;return n}var Xp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Qp=u.unstable_scheduleCallback,Zp=u.unstable_NormalPriority,Ve={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new Xp,data:new Map,refCount:0}}function ol(e){e.refCount--,e.refCount===0&&Qp(Zp,function(){e.controller.abort()})}var dl=null,bs=0,_a=0,Na=null;function Jp(e,t){if(dl===null){var n=dl=[];bs=0,_a=Ec(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return bs++,t.then(Mo,Mo),t}function Mo(){if(--bs===0&&dl!==null){Na!==null&&(Na.status="fulfilled");var e=dl;dl=null,_a=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Kp(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var Oo=M.S;M.S=function(e,t){vf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jp(e,t),Oo!==null&&Oo(e,t)};var Wn=j(null);function js(){var e=Wn.current;return e!==null?e:we.pooledCache}function _i(e,t){t===null?V(Wn,Wn.current):V(Wn,t.pool)}function Do(){var e=js();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(r(460)),Ss=Error(r(474)),Ni=Error(r(542)),wi={then:function(){}};function Uo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ho(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lo(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=we,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lo(e),e}throw Pn=t,wa}}function In(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,wa):n}}var Pn=null;function Bo(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function Lo(e){if(e===wa||e===Ni)throw Error(r(483))}var Ca=null,fl=0;function Ci(e){var t=fl;return fl+=1,Ca===null&&(Ca=[]),Ho(Ca,e,t)}function hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ai(e,t){throw t.$$typeof===R?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qo(e){function t(_,T){if(e){var w=_.deletions;w===null?(_.deletions=[T],_.flags|=16):w.push(T)}}function n(_,T){if(!e)return null;for(;T!==null;)t(_,T),T=T.sibling;return null}function a(_){for(var T=new Map;_!==null;)_.key!==null?T.set(_.key,_):T.set(_.index,_),_=_.sibling;return T}function i(_,T){return _=Kt(_,T),_.index=0,_.sibling=null,_}function s(_,T,w){return _.index=w,e?(w=_.alternate,w!==null?(w=w.index,w<T?(_.flags|=67108866,T):w):(_.flags|=67108866,T)):(_.flags|=1048576,T)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,T,w,q){return T===null||T.tag!==6?(T=os(w,_.mode,q),T.return=_,T):(T=i(T,w),T.return=_,T)}function b(_,T,w,q){var te=w.type;return te===k?U(_,T,w.props.children,q,w.key):T!==null&&(T.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===ee&&In(te)===T.type)?(T=i(T,w.props),hl(T,w),T.return=_,T):(T=ji(w.type,w.key,w.props,null,_.mode,q),hl(T,w),T.return=_,T)}function C(_,T,w,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==w.containerInfo||T.stateNode.implementation!==w.implementation?(T=ds(w,_.mode,q),T.return=_,T):(T=i(T,w.children||[]),T.return=_,T)}function U(_,T,w,q,te){return T===null||T.tag!==7?(T=Jn(w,_.mode,q,te),T.return=_,T):(T=i(T,w),T.return=_,T)}function Y(_,T,w){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=os(""+T,_.mode,w),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case L:return w=ji(T.type,T.key,T.props,null,_.mode,w),hl(w,T),w.return=_,w;case H:return T=ds(T,_.mode,w),T.return=_,T;case ee:return T=In(T),Y(_,T,w)}if(ie(T)||He(T))return T=Jn(T,_.mode,w,null),T.return=_,T;if(typeof T.then=="function")return Y(_,Ci(T),w);if(T.$$typeof===B)return Y(_,Ti(_,T),w);Ai(_,T)}return null}function A(_,T,w,q){var te=T!==null?T.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return te!==null?null:m(_,T,""+w,q);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case L:return w.key===te?b(_,T,w,q):null;case H:return w.key===te?C(_,T,w,q):null;case ee:return w=In(w),A(_,T,w,q)}if(ie(w)||He(w))return te!==null?null:U(_,T,w,q,null);if(typeof w.then=="function")return A(_,T,Ci(w),q);if(w.$$typeof===B)return A(_,T,Ti(_,w),q);Ai(_,w)}return null}function O(_,T,w,q,te){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(w)||null,m(T,_,""+q,te);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case L:return _=_.get(q.key===null?w:q.key)||null,b(T,_,q,te);case H:return _=_.get(q.key===null?w:q.key)||null,C(T,_,q,te);case ee:return q=In(q),O(_,T,w,q,te)}if(ie(q)||He(q))return _=_.get(w)||null,U(T,_,q,te,null);if(typeof q.then=="function")return O(_,T,w,Ci(q),te);if(q.$$typeof===B)return O(_,T,w,Ti(T,q),te);Ai(T,q)}return null}function W(_,T,w,q){for(var te=null,ve=null,P=T,oe=T=0,pe=null;P!==null&&oe<w.length;oe++){P.index>oe?(pe=P,P=null):pe=P.sibling;var xe=A(_,P,w[oe],q);if(xe===null){P===null&&(P=pe);break}e&&P&&xe.alternate===null&&t(_,P),T=s(xe,T,oe),ve===null?te=xe:ve.sibling=xe,ve=xe,P=pe}if(oe===w.length)return n(_,P),ge&&$t(_,oe),te;if(P===null){for(;oe<w.length;oe++)P=Y(_,w[oe],q),P!==null&&(T=s(P,T,oe),ve===null?te=P:ve.sibling=P,ve=P);return ge&&$t(_,oe),te}for(P=a(P);oe<w.length;oe++)pe=O(P,_,oe,w[oe],q),pe!==null&&(e&&pe.alternate!==null&&P.delete(pe.key===null?oe:pe.key),T=s(pe,T,oe),ve===null?te=pe:ve.sibling=pe,ve=pe);return e&&P.forEach(function(Hn){return t(_,Hn)}),ge&&$t(_,oe),te}function le(_,T,w,q){if(w==null)throw Error(r(151));for(var te=null,ve=null,P=T,oe=T=0,pe=null,xe=w.next();P!==null&&!xe.done;oe++,xe=w.next()){P.index>oe?(pe=P,P=null):pe=P.sibling;var Hn=A(_,P,xe.value,q);if(Hn===null){P===null&&(P=pe);break}e&&P&&Hn.alternate===null&&t(_,P),T=s(Hn,T,oe),ve===null?te=Hn:ve.sibling=Hn,ve=Hn,P=pe}if(xe.done)return n(_,P),ge&&$t(_,oe),te;if(P===null){for(;!xe.done;oe++,xe=w.next())xe=Y(_,xe.value,q),xe!==null&&(T=s(xe,T,oe),ve===null?te=xe:ve.sibling=xe,ve=xe);return ge&&$t(_,oe),te}for(P=a(P);!xe.done;oe++,xe=w.next())xe=O(P,_,oe,xe.value,q),xe!==null&&(e&&xe.alternate!==null&&P.delete(xe.key===null?oe:xe.key),T=s(xe,T,oe),ve===null?te=xe:ve.sibling=xe,ve=xe);return e&&P.forEach(function(iy){return t(_,iy)}),ge&&$t(_,oe),te}function Ne(_,T,w,q){if(typeof w=="object"&&w!==null&&w.type===k&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case L:e:{for(var te=w.key;T!==null;){if(T.key===te){if(te=w.type,te===k){if(T.tag===7){n(_,T.sibling),q=i(T,w.props.children),q.return=_,_=q;break e}}else if(T.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===ee&&In(te)===T.type){n(_,T.sibling),q=i(T,w.props),hl(q,w),q.return=_,_=q;break e}n(_,T);break}else t(_,T);T=T.sibling}w.type===k?(q=Jn(w.props.children,_.mode,q,w.key),q.return=_,_=q):(q=ji(w.type,w.key,w.props,null,_.mode,q),hl(q,w),q.return=_,_=q)}return d(_);case H:e:{for(te=w.key;T!==null;){if(T.key===te)if(T.tag===4&&T.stateNode.containerInfo===w.containerInfo&&T.stateNode.implementation===w.implementation){n(_,T.sibling),q=i(T,w.children||[]),q.return=_,_=q;break e}else{n(_,T);break}else t(_,T);T=T.sibling}q=ds(w,_.mode,q),q.return=_,_=q}return d(_);case ee:return w=In(w),Ne(_,T,w,q)}if(ie(w))return W(_,T,w,q);if(He(w)){if(te=He(w),typeof te!="function")throw Error(r(150));return w=te.call(w),le(_,T,w,q)}if(typeof w.then=="function")return Ne(_,T,Ci(w),q);if(w.$$typeof===B)return Ne(_,T,Ti(_,w),q);Ai(_,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,T!==null&&T.tag===6?(n(_,T.sibling),q=i(T,w),q.return=_,_=q):(n(_,T),q=os(w,_.mode,q),q.return=_,_=q),d(_)):n(_,T)}return function(_,T,w,q){try{fl=0;var te=Ne(_,T,w,q);return Ca=null,te}catch(P){if(P===wa||P===Ni)throw P;var ve=yt(29,P,null,_.mode);return ve.lanes=q,ve.return=_,ve}finally{}}}var ea=qo(!0),Go=qo(!1),bn=!1;function Es(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(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 jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(be&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=bi(e),To(e,null,n),t}return xi(e,a,t,n),bi(e)}function ml(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,kr(e,n)}}function _s(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?i=s=d:s=s.next=d,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ns=!1;function pl(){if(Ns){var e=Na;if(e!==null)throw e}}function gl(e,t,n,a){Ns=!1;var i=e.updateQueue;bn=!1;var s=i.firstBaseUpdate,d=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var b=m,C=b.next;b.next=null,d===null?s=C:d.next=C,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=C:m.next=C,U.lastBaseUpdate=b))}if(s!==null){var Y=i.baseState;d=0,U=C=b=null,m=s;do{var A=m.lane&-536870913,O=A!==m.lane;if(O?(me&A)===A:(a&A)===A){A!==0&&A===_a&&(Ns=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var W=e,le=m;A=t;var Ne=n;switch(le.tag){case 1:if(W=le.payload,typeof W=="function"){Y=W.call(Ne,Y,A);break e}Y=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=le.payload,A=typeof W=="function"?W.call(Ne,Y,A):W,A==null)break e;Y=v({},Y,A);break e;case 2:bn=!0}}A=m.callback,A!==null&&(e.flags|=64,O&&(e.flags|=8192),O=i.callbacks,O===null?i.callbacks=[A]:O.push(A))}else O={lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(C=U=O,b=Y):U=U.next=O,d|=A;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;O=m,m=O.next,O.next=null,i.lastBaseUpdate=O,i.shared.pending=null}}while(!0);U===null&&(b=Y),i.baseState=b,i.firstBaseUpdate=C,i.lastBaseUpdate=U,s===null&&(i.shared.lanes=0),wn|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Vo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Yo(n[e],t)}var Aa=j(null),Ri=j(0);function Xo(e,t){e=sn,V(Ri,e),V(Aa,t),sn=e|t.baseLanes}function ws(){V(Ri,sn),V(Aa,Aa.current)}function Cs(){sn=Ri.current,N(Aa),N(Ri)}var vt=j(null),Rt=null;function En(e){var t=e.alternate;V(Ge,Ge.current&1),V(vt,e),Rt===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(Rt=e)}function As(e){V(Ge,Ge.current),V(vt,e),Rt===null&&(Rt=e)}function Qo(e){e.tag===22?(V(Ge,Ge.current),V(vt,e),Rt===null&&(Rt=e)):Tn()}function Tn(){V(Ge,Ge.current),V(vt,vt.current)}function xt(e){N(vt),Rt===e&&(Rt=null),N(Ge)}var Ge=j(0);function ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Dc(n)||Uc(n)))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 It=0,re=null,Te=null,Xe=null,zi=!1,Ra=!1,ta=!1,Mi=0,yl=0,ka=null,$p=0;function Be(){throw Error(r(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function ks(e,t,n,a,i,s){return It=s,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Cd:Zs,ta=!1,s=n(a,i),ta=!1,Ra&&(s=Jo(t,n,a,i)),Zo(e),s}function Zo(e){M.H=bl;var t=Te!==null&&Te.next!==null;if(It=0,Xe=Te=re=null,zi=!1,yl=0,ka=null,t)throw Error(r(300));e===null||Qe||(e=e.dependencies,e!==null&&Ei(e)&&(Qe=!0))}function Jo(e,t,n,a){re=e;var i=0;do{if(Ra&&(ka=null),yl=0,Ra=!1,25<=i)throw Error(r(301));if(i+=1,Xe=Te=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}M.H=Ad,s=t(n,a)}while(Ra);return s}function Fp(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(re.flags|=1024),t}function zs(){var e=Mi!==0;return Mi=0,e}function Ms(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Os(e){if(zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zi=!1}It=0,Xe=Te=re=null,Ra=!1,yl=Mi=0,ka=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?re.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ye(){if(Te===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Xe===null?re.memoizedState:Xe.next;if(t!==null)Xe=t,Te=e;else{if(e===null)throw re.alternate===null?Error(r(467)):Error(r(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Xe===null?re.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vl(e){var t=yl;return yl+=1,ka===null&&(ka=[]),e=Ho(ka,e,t),t=re,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Cd:Zs),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vl(e);if(e.$$typeof===B)return Ie(e)}throw Error(r(438,String(e)))}function Ds(e){var t=null,n=re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=re.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Oi(),re.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=ze;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=Ye();return Us(t,Te,e)}function Us(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var i=e.baseQueue,s=a.pending;if(s!==null){if(i!==null){var d=i.next;i.next=s.next,s.next=d}t.baseQueue=i=s,a.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var m=d=null,b=null,C=t,U=!1;do{var Y=C.lane&-536870913;if(Y!==C.lane?(me&Y)===Y:(It&Y)===Y){var A=C.revertLane;if(A===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),Y===_a&&(U=!0);else if((It&A)===A){C=C.next,A===_a&&(U=!0);continue}else Y={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},b===null?(m=b=Y,d=s):b=b.next=Y,re.lanes|=A,wn|=A;Y=C.action,ta&&n(s,Y),s=C.hasEagerState?C.eagerState:n(s,Y)}else A={lane:Y,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},b===null?(m=b=A,d=s):b=b.next=A,re.lanes|=Y,wn|=Y;C=C.next}while(C!==null&&C!==t);if(b===null?d=s:b.next=m,!gt(s,e.memoizedState)&&(Qe=!0,U&&(n=Na,n!==null)))throw n;e.memoizedState=s,e.baseState=d,e.baseQueue=b,a.lastRenderedState=s}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Hs(e){var t=Ye(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do s=e(s,d.action),d=d.next;while(d!==i);gt(s,t.memoizedState)||(Qe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function Ko(e,t,n){var a=re,i=Ye(),s=ge;if(s){if(n===void 0)throw Error(r(407));n=n()}else n=t();var d=!gt((Te||i).memoizedState,n);if(d&&(i.memoizedState=n,Qe=!0),i=i.queue,qs(Wo.bind(null,a,i,e),[e]),i.getSnapshot!==t||d||Xe!==null&&Xe.memoizedState.tag&1){if(a.flags|=2048,za(9,{destroy:void 0},Fo.bind(null,a,i,n,t),null),we===null)throw Error(r(349));s||(It&127)!==0||$o(a,t,n)}return n}function $o(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=re.updateQueue,t===null?(t=Oi(),re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,a){t.value=n,t.getSnapshot=a,Io(t)&&Po(e)}function Wo(e,t,n){return n(function(){Io(t)&&Po(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gt(e,n)}catch{return!0}}function Po(e){var t=Zn(e,2);t!==null&&ft(t,e,2)}function Bs(e){var t=lt();if(typeof e=="function"){var n=e;if(e=n(),ta){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function ed(e,t,n,a){return e.baseState=n,Us(e,Te,typeof a=="function"?a:Pt)}function Wp(e,t,n,a,i){if(Li(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){s.listeners.push(d)}};M.T!==null?n(!0):s.isTransition=!1,a(s),n=t.pending,n===null?(s.next=t.pending=s,td(t,s)):(s.next=n.next,t.pending=n.next=s)}}function td(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var s=M.T,d={};M.T=d;try{var m=n(i,a),b=M.S;b!==null&&b(d,m),nd(e,t,m)}catch(C){Ls(e,t,C)}finally{s!==null&&d.types!==null&&(s.types=d.types),M.T=s}}else try{s=n(i,a),nd(e,t,s)}catch(C){Ls(e,t,C)}}function nd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){ad(e,t,a)},function(a){return Ls(e,t,a)}):ad(e,t,n)}function ad(e,t,n){t.status="fulfilled",t.value=n,ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,td(e,n)))}function Ls(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,ld(t),t=t.next;while(t!==a)}e.action=null}function ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function id(e,t){return t}function ud(e,t){if(ge){var n=we.formState;if(n!==null){e:{var a=re;if(ge){if(Ae){t:{for(var i=Ae,s=At;i.nodeType!==8;){if(!s){i=null;break t}if(i=kt(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){Ae=kt(i.nextSibling),a=i.data==="F!";break e}}vn(a)}a=!1}a&&(t=n[0])}}return n=lt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:id,lastRenderedState:t},n.queue=a,n=_d.bind(null,re,a),a.dispatch=n,a=Bs(!1),s=Qs.bind(null,re,!1,a.queue),a=lt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=Wp.bind(null,re,i,s,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function sd(e){var t=Ye();return cd(t,Te,e)}function cd(e,t,n){if(t=Us(e,t,id)[0],e=Ui(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=vl(t)}catch(d){throw d===wa?Ni:d}else a=t;t=Ye();var i=t.queue,s=i.dispatch;return n!==t.memoizedState&&(re.flags|=2048,za(9,{destroy:void 0},Ip.bind(null,i,n),null)),[a,s,e]}function Ip(e,t){e.action=t}function rd(e){var t=Ye(),n=Te;if(n!==null)return cd(t,n,e);Ye(),t=t.memoizedState,n=Ye();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function za(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=re.updateQueue,t===null&&(t=Oi(),re.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function od(){return Ye().memoizedState}function Hi(e,t,n,a){var i=lt();re.flags|=e,i.memoizedState=za(1|t,{destroy:void 0},n,a===void 0?null:a)}function Bi(e,t,n,a){var i=Ye();a=a===void 0?null:a;var s=i.memoizedState.inst;Te!==null&&a!==null&&Rs(a,Te.memoizedState.deps)?i.memoizedState=za(t,s,n,a):(re.flags|=e,i.memoizedState=za(1|t,s,n,a))}function dd(e,t){Hi(8390656,8,e,t)}function qs(e,t){Bi(2048,8,e,t)}function Pp(e){re.flags|=4;var t=re.updateQueue;if(t===null)t=Oi(),re.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fd(e){var t=Ye().memoizedState;return Pp({ref:t,nextImpl:e}),function(){if((be&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function hd(e,t){return Bi(4,2,e,t)}function md(e,t){return Bi(4,4,e,t)}function pd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gd(e,t,n){n=n!=null?n.concat([e]):null,Bi(4,4,pd.bind(null,t,e),n)}function Gs(){}function yd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Rs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function vd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Rs(t,a[1]))return a[0];if(a=e(),ta){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function Ys(e,t,n){return n===void 0||(It&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=bf(),re.lanes|=e,wn|=e,n)}function xd(e,t,n,a){return gt(n,t)?n:Aa.current!==null?(e=Ys(e,n,a),gt(e,t)||(Qe=!0),e):(It&42)===0||(It&1073741824)!==0&&(me&261930)===0?(Qe=!0,e.memoizedState=n):(e=bf(),re.lanes|=e,wn|=e,t)}function bd(e,t,n,a,i){var s=K.p;K.p=s!==0&&8>s?s:8;var d=M.T,m={};M.T=m,Qs(e,!1,t,n);try{var b=i(),C=M.S;if(C!==null&&C(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=Kp(b,a);xl(e,t,U,St(e))}else xl(e,t,a,St(e))}catch(Y){xl(e,t,{then:function(){},status:"rejected",reason:Y},St())}finally{K.p=s,d!==null&&m.types!==null&&(d.types=m.types),M.T=d}}function eg(){}function Vs(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=jd(e).queue;bd(e,i,t,ne,n===null?eg:function(){return Sd(e),n(a)})}function jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Sd(e){var t=jd(e);t.next===null&&(t=e.alternate.memoizedState),xl(e,t.next.queue,{},St())}function Xs(){return Ie(Ul)}function Ed(){return Ye().memoizedState}function Td(){return Ye().memoizedState}function tg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=St();e=jn(n);var a=Sn(t,e,n);a!==null&&(ft(a,t,n),ml(a,t,n)),t={cache:xs()},e.payload=t;return}t=t.return}}function ng(e,t,n){var a=St();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Li(e)?Nd(t,n):(n=cs(e,t,n,a),n!==null&&(ft(n,e,a),wd(n,t,a)))}function _d(e,t,n){var a=St();xl(e,t,n,a)}function xl(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Li(e))Nd(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,m=s(d,n);if(i.hasEagerState=!0,i.eagerState=m,gt(m,d))return xi(e,t,i,0),we===null&&vi(),!1}catch{}finally{}if(n=cs(e,t,i,a),n!==null)return ft(n,e,a),wd(n,t,a),!0}return!1}function Qs(e,t,n,a){if(a={lane:2,revertLane:Ec(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(r(479))}else t=cs(e,n,a,2),t!==null&&ft(t,e,2)}function Li(e){var t=e.alternate;return e===re||t!==null&&t===re}function Nd(e,t){Ra=zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wd(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,kr(e,n)}}var bl={readContext:Ie,use:Di,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};bl.useEffectEvent=Be;var Cd={readContext:Ie,use:Di,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:dd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hi(4194308,4,pd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){Hi(4,2,e,t)},useMemo:function(e,t){var n=lt();t=t===void 0?null:t;var a=e();if(ta){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=lt();if(n!==void 0){var i=n(t);if(ta){hn(!0);try{n(t)}finally{hn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=ng.bind(null,re,e),[a.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Bs(e);var t=e.queue,n=_d.bind(null,re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){var n=lt();return Ys(n,e,t)},useTransition:function(){var e=Bs(!1);return e=bd.bind(null,re,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=re,i=lt();if(ge){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),we===null)throw Error(r(349));(me&127)!==0||$o(a,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,dd(Wo.bind(null,a,s,e),[e]),a.flags|=2048,za(9,{destroy:void 0},Fo.bind(null,a,s,n,t),null),n},useId:function(){var e=lt(),t=we.identifierPrefix;if(ge){var n=Lt,a=Bt;n=(a&~(1<<32-pt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Mi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=$p++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:ud,useActionState:ud,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qs.bind(null,re,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ds,useCacheRefresh:function(){return lt().memoizedState=tg.bind(null,re)},useEffectEvent:function(e){var t=lt(),n={impl:e};return t.memoizedState=n,function(){if((be&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Zs={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:qs,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Ui,useRef:od,useState:function(){return Ui(Pt)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ye();return xd(n,Te.memoizedState,e,t)},useTransition:function(){var e=Ui(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Xs,useFormState:sd,useActionState:sd,useOptimistic:function(e,t){var n=Ye();return ed(n,Te,e,t)},useMemoCache:Ds,useCacheRefresh:Td};Zs.useEffectEvent=fd;var Ad={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:qs,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Hs,useRef:od,useState:function(){return Hs(Pt)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ye();return Te===null?Ys(n,e,t):xd(n,Te.memoizedState,e,t)},useTransition:function(){var e=Hs(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Xs,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var n=Ye();return Te!==null?ed(n,Te,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ds,useCacheRefresh:Td};Ad.useEffectEvent=fd;function Js(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=St(),i=jn(a);i.payload=t,n!=null&&(i.callback=n),t=Sn(e,i,a),t!==null&&(ft(t,e,a),ml(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=St(),i=jn(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Sn(e,i,a),t!==null&&(ft(t,e,a),ml(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=St(),a=jn(n);a.tag=2,t!=null&&(a.callback=t),t=Sn(e,a,n),t!==null&&(ft(t,e,n),ml(t,e,n))}};function Rd(e,t,n,a,i,s,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,d):t.prototype&&t.prototype.isPureReactComponent?!ul(n,a)||!ul(i,s):!0}function kd(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function na(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function zd(e){yi(e)}function Md(e){console.error(e)}function Od(e){yi(e)}function qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Dd(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function $s(e,t,n){return n=jn(n),n.tag=3,n.payload={element:null},n.callback=function(){qi(e,t)},n}function Ud(e){return e=jn(e),e.tag=3,e}function Hd(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var s=a.value;e.payload=function(){return i(s)},e.callback=function(){Dd(t,n,a)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Dd(t,n,a),typeof i!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function ag(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ta(t,n,i,!0),n=vt.current,n!==null){switch(n.tag){case 31:case 13:return Rt===null?Ii():n.alternate===null&&Le===0&&(Le=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===wi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),bc(e,a,i)),!1;case 22:return n.flags|=65536,a===wi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),bc(e,a,i)),!1}throw Error(r(435,n.tag))}return bc(e,a,i),Ii(),!1}if(ge)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==ms&&(e=Error(r(422),{cause:a}),rl(Nt(e,n)))):(a!==ms&&(t=Error(r(423),{cause:a}),rl(Nt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Nt(a,n),i=$s(e.stateNode,a,i),_s(e,i),Le!==4&&(Le=2)),!1;var s=Error(r(520),{cause:a});if(s=Nt(s,n),Cl===null?Cl=[s]:Cl.push(s),Le!==4&&(Le=2),t===null)return!0;a=Nt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=$s(n.stateNode,a,e),_s(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Cn===null||!Cn.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ud(i),Hd(i,e,n,a),_s(n,i),!1}n=n.return}while(n!==null);return!1}var Fs=Error(r(461)),Qe=!1;function Pe(e,t,n,a){t.child=e===null?Go(t,null,n,a):ea(t,e.child,n,a)}function Bd(e,t,n,a,i){n=n.render;var s=t.ref;if("ref"in a){var d={};for(var m in a)m!=="ref"&&(d[m]=a[m])}else d=a;return Fn(t),a=ks(e,t,n,d,s,i),m=zs(),e!==null&&!Qe?(Ms(e,t,i),en(e,t,i)):(ge&&m&&fs(t),t.flags|=1,Pe(e,t,a,i),t.child)}function Ld(e,t,n,a,i){if(e===null){var s=n.type;return typeof s=="function"&&!rs(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,qd(e,t,s,a,i)):(e=ji(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!lc(e,i)){var d=s.memoizedProps;if(n=n.compare,n=n!==null?n:ul,n(d,a)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Kt(s,a),e.ref=t.ref,e.return=t,t.child=e}function qd(e,t,n,a,i){if(e!==null){var s=e.memoizedProps;if(ul(s,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=s,lc(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return Ws(e,t,n,a,i)}function Gd(e,t,n,a){var i=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~s}else a=0,t.child=null;return Yd(e,t,s,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_i(t,s!==null?s.cachePool:null),s!==null?Xo(t,s):ws(),Qo(t);else return a=t.lanes=536870912,Yd(e,t,s!==null?s.baseLanes|n:n,n,a)}else s!==null?(_i(t,s.cachePool),Xo(t,s),Tn(),t.memoizedState=null):(e!==null&&_i(t,null),ws(),Tn());return Pe(e,t,i,n),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 Yd(e,t,n,a,i){var s=js();return s=s===null?null:{parent:Ve._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&_i(t,null),ws(),Qo(t),e!==null&&Ta(e,t,a,!0),t.childLanes=i,null}function Gi(e,t){return t=Vi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vd(e,t,n){return ea(t,e.child,null,n),e=Gi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function lg(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(a.mode==="hidden")return e=Gi(t,a),t.lanes=536870912,jl(null,e);if(As(t),(e=Ae)?(e=nh(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=No(e),n.return=t,t.child=n,We=t,Ae=null)):e=null,e===null)throw vn(t);return t.lanes=536870912,null}return Gi(t,a)}var s=e.memoizedState;if(s!==null){var d=s.dehydrated;if(As(t),i)if(t.flags&256)t.flags&=-257,t=Vd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Qe||Ta(e,t,n,!1),i=(n&e.childLanes)!==0,Qe||i){if(a=we,a!==null&&(d=zr(a,n),d!==0&&d!==s.retryLane))throw s.retryLane=d,Zn(e,d),ft(a,e,d),Fs;Ii(),t=Vd(e,t,n)}else e=s.treeContext,Ae=kt(d.nextSibling),We=t,ge=!0,yn=null,At=!1,e!==null&&Ao(t,e),t=Gi(t,a),t.flags|=4096;return t}return e=Kt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Yi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ws(e,t,n,a,i){return Fn(t),n=ks(e,t,n,a,void 0,i),a=zs(),e!==null&&!Qe?(Ms(e,t,i),en(e,t,i)):(ge&&a&&fs(t),t.flags|=1,Pe(e,t,n,i),t.child)}function Xd(e,t,n,a,i,s){return Fn(t),t.updateQueue=null,n=Jo(t,a,n,i),Zo(e),a=zs(),e!==null&&!Qe?(Ms(e,t,s),en(e,t,s)):(ge&&a&&fs(t),t.flags|=1,Pe(e,t,n,s),t.child)}function Qd(e,t,n,a,i){if(Fn(t),t.stateNode===null){var s=ba,d=n.contextType;typeof d=="object"&&d!==null&&(s=Ie(d)),s=new n(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ks,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Es(t),d=n.contextType,s.context=typeof d=="object"&&d!==null?Ie(d):ba,s.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Js(t,n,d,a),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(d=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),d!==s.state&&Ks.enqueueReplaceState(s,s.state,null),gl(t,a,s,i),pl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var m=t.memoizedProps,b=na(n,m);s.props=b;var C=s.context,U=n.contextType;d=ba,typeof U=="object"&&U!==null&&(d=Ie(U));var Y=n.getDerivedStateFromProps;U=typeof Y=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||C!==d)&&kd(t,s,a,d),bn=!1;var A=t.memoizedState;s.state=A,gl(t,a,s,i),pl(),C=t.memoizedState,m||A!==C||bn?(typeof Y=="function"&&(Js(t,n,Y,a),C=t.memoizedState),(b=bn||Rd(t,n,b,a,A,C,d))?(U||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=C),s.props=a,s.state=C,s.context=d,a=b):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,Ts(e,t),d=t.memoizedProps,U=na(n,d),s.props=U,Y=t.pendingProps,A=s.context,C=n.contextType,b=ba,typeof C=="object"&&C!==null&&(b=Ie(C)),m=n.getDerivedStateFromProps,(C=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==Y||A!==b)&&kd(t,s,a,b),bn=!1,A=t.memoizedState,s.state=A,gl(t,a,s,i),pl();var O=t.memoizedState;d!==Y||A!==O||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(Js(t,n,m,a),O=t.memoizedState),(U=bn||Rd(t,n,U,a,A,O,b)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(C||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,O,b),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,O,b)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),s.props=a,s.state=O,s.context=b,a=U):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Yi(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=ea(t,e.child,null,i),t.child=ea(t,null,n,i)):Pe(e,t,n,i),t.memoizedState=s.state,e=t.child):e=en(e,t,i),e}function Zd(e,t,n,a){return Kn(),t.flags|=256,Pe(e,t,n,a),t.child}var Is={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ps(e){return{baseLanes:e,cachePool:Do()}}function ec(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=jt),e}function Jd(e,t,n){var a=t.pendingProps,i=!1,s=(t.flags&128)!==0,d;if((d=s)||(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(ge){if(i?En(t):Tn(),(e=Ae)?(e=nh(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=No(e),n.return=t,t.child=n,We=t,Ae=null)):e=null,e===null)throw vn(t);return Uc(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,i?(Tn(),i=t.mode,m=Vi({mode:"hidden",children:m},i),a=Jn(a,i,n,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,d,n),t.memoizedState=Is,jl(null,a)):(En(t),tc(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(s)t.flags&256?(En(t),t.flags&=-257,t=nc(e,t,n)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),m=a.fallback,i=t.mode,a=Vi({mode:"visible",children:a.children},i),m=Jn(m,i,n,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ea(t,e.child,null,n),a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,d,n),t.memoizedState=Is,t=jl(null,a));else if(En(t),Uc(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var C=d.dgst;d=C,a=Error(r(419)),a.stack="",a.digest=d,rl({value:a,source:null,stack:null}),t=nc(e,t,n)}else if(Qe||Ta(e,t,n,!1),d=(n&e.childLanes)!==0,Qe||d){if(d=we,d!==null&&(a=zr(d,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Zn(e,a),ft(d,e,a),Fs;Dc(m)||Ii(),t=nc(e,t,n)}else Dc(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ae=kt(m.nextSibling),We=t,ge=!0,yn=null,At=!1,e!==null&&Ao(t,e),t=tc(t,a.children),t.flags|=4096);return t}return i?(Tn(),m=a.fallback,i=t.mode,b=e.child,C=b.sibling,a=Kt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,C!==null?m=Kt(C,m):(m=Jn(m,i,n,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,jl(null,a),a=t.child,m=e.child.memoizedState,m===null?m=Ps(n):(i=m.cachePool,i!==null?(b=Ve._currentValue,i=i.parent!==b?{parent:b,pool:b}:i):i=Do(),m={baseLanes:m.baseLanes|n,cachePool:i}),a.memoizedState=m,a.childLanes=ec(e,d,n),t.memoizedState=Is,jl(e.child,a)):(En(t),n=e.child,e=n.sibling,n=Kt(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function tc(e,t){return t=Vi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vi(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function nc(e,t,n){return ea(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kd(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ys(e.return,t,n)}function ac(e,t,n,a,i,s){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:s}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=n,d.tailMode=i,d.treeForkCount=s)}function $d(e,t,n){var a=t.pendingProps,i=a.revealOrder,s=a.tail;a=a.children;var d=Ge.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,V(Ge,d),Pe(e,t,a,n),a=ge?cl:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kd(e,n,t);else if(e.tag===19)Kd(e,n,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(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ki(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ac(t,!1,i,n,s,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ki(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ac(t,!0,n,null,s,a);break;case"together":ac(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function en(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function ig(e,t,n){switch(t.tag){case 3:at(t,t.stateNode.containerInfo),xn(t,Ve,e.memoizedState.cache),Kn();break;case 27:case 5:Ja(t);break;case 4:at(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,As(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(En(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Jd(e,t,n):(En(t),e=en(e,t,n),e!==null?e.sibling:null);En(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ta(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return $d(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Ge,Ge.current),a)break;return null;case 22:return t.lanes=0,Gd(e,t,n,t.pendingProps);case 24:xn(t,Ve,e.memoizedState.cache)}return en(e,t,n)}function Fd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!lc(e,n)&&(t.flags&128)===0)return Qe=!1,ig(e,t,n);Qe=(e.flags&131072)!==0}else Qe=!1,ge&&(t.flags&1048576)!==0&&Co(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=In(t.elementType),t.type=e,typeof e=="function")rs(e)?(a=na(e,a),t.tag=1,t=Qd(null,t,e,a,n)):(t.tag=0,t=Ws(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===z){t.tag=11,t=Bd(null,t,e,a,n);break e}else if(i===X){t.tag=14,t=Ld(null,t,e,a,n);break e}}throw t=I(e)||e,Error(r(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=na(a,t.pendingProps),Qd(e,t,a,i,n);case 3:e:{if(at(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var s=t.memoizedState;i=s.element,Ts(e,t),gl(t,a,null,n);var d=t.memoizedState;if(a=d.cache,xn(t,Ve,a),a!==s.cache&&vs(t,[Ve],n,!0),pl(),a=d.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Zd(e,t,a,n);break e}else if(a!==i){i=Nt(Error(r(424)),t),rl(i),t=Zd(e,t,a,n);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(Ae=kt(e.firstChild),We=t,ge=!0,yn=null,At=!0,n=Go(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),a===i){t=en(e,t,n);break e}Pe(e,t,a,n)}t=t.child}return t;case 26:return Yi(e,t),e===null?(n=ch(t.type,null,t.pendingProps,null))?t.memoizedState=n:ge||(n=t.type,e=t.pendingProps,a=iu(ue.current).createElement(n),a[Fe]=t,a[ut]=e,et(a,n,e),Ke(a),t.stateNode=a):t.memoizedState=ch(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ja(t),e===null&&ge&&(a=t.stateNode=ih(t.type,t.pendingProps,ue.current),We=t,At=!0,i=Ae,zn(t.type)?(Hc=i,Ae=kt(a.firstChild)):Ae=i),Pe(e,t,t.pendingProps.children,n),Yi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((i=a=Ae)&&(a=Dg(a,t.type,t.pendingProps,At),a!==null?(t.stateNode=a,We=t,Ae=kt(a.firstChild),At=!1,i=!0):i=!1),i||vn(t)),Ja(t),i=t.type,s=t.pendingProps,d=e!==null?e.memoizedProps:null,a=s.children,zc(i,s)?a=null:d!==null&&zc(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=ks(e,t,Fp,null,null,n),Ul._currentValue=i),Yi(e,t),Pe(e,t,a,n),t.child;case 6:return e===null&&ge&&((e=n=Ae)&&(n=Ug(n,t.pendingProps,At),n!==null?(t.stateNode=n,We=t,Ae=null,e=!0):e=!1),e||vn(t)),null;case 13:return Jd(e,t,n);case 4:return at(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ea(t,null,a,n):Pe(e,t,a,n),t.child;case 11:return Bd(e,t,t.type,t.pendingProps,n);case 7:return Pe(e,t,t.pendingProps,n),t.child;case 8:return Pe(e,t,t.pendingProps.children,n),t.child;case 12:return Pe(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,xn(t,t.type,a.value),Pe(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Fn(t),i=Ie(i),a=a(i),t.flags|=1,Pe(e,t,a,n),t.child;case 14:return Ld(e,t,t.type,t.pendingProps,n);case 15:return qd(e,t,t.type,t.pendingProps,n);case 19:return $d(e,t,n);case 31:return lg(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return Fn(t),a=Ie(Ve),e===null?(i=js(),i===null&&(i=we,s=xs(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:a,cache:i},Es(t),xn(t,Ve,i)):((e.lanes&n)!==0&&(Ts(e,t),gl(t,null,null,n),pl()),i=e.memoizedState,s=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),xn(t,Ve,a)):(a=s.cache,xn(t,Ve,a),a!==i.cache&&vs(t,[Ve],n,!0))),Pe(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function tn(e){e.flags|=4}function ic(e,t,n,a,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(Tf())e.flags|=8192;else throw Pn=wi,Ss}else e.flags&=-16777217}function Wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hh(t))if(Tf())e.flags|=8192;else throw Pn=wi,Ss}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ar():536870912,e.lanes|=t,Ua|=t)}function Sl(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function ug(e,t,n){var a=t.pendingProps;switch(hs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(Ve),qe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ea(t)?tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps())),Re(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(tn(t),s!==null?(Re(t),Wd(t,s)):(Re(t),ic(t,i,null,a,n))):s?s!==e.memoizedState?(tn(t),Re(t),Wd(t,s)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&tn(t),Re(t),ic(t,i,e,a,n)),null;case 27:if(ti(t),n=ue.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Re(t),null}e=Q.current,Ea(t)?Ro(t):(e=ih(i,a,n),t.stateNode=e,tn(t))}return Re(t),null;case 5:if(ti(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Re(t),null}if(s=Q.current,Ea(t))Ro(t);else{var d=iu(ue.current);switch(s){case 1:s=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":s=d.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?d.createElement(i,{is:a.is}):d.createElement(i)}}s[Fe]=t,s[ut]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)s.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=s;e:switch(et(s,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&tn(t)}}return Re(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ue.current,Ea(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=We,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Kf(e.nodeValue,n)),e||vn(t,!0)}else e=iu(e).createTextNode(a),e[Fe]=t,t.stateNode=e}return Re(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ea(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Fe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else n=ps(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Re(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ea(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[Fe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else i=ps(),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=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Xi(t,t.updateQueue),Re(t),null);case 4:return qe(),e===null&&wc(t.stateNode.containerInfo),Re(t),null;case 10:return Wt(t.type),Re(t),null;case 19:if(N(Ge),a=t.memoizedState,a===null)return Re(t),null;if(i=(t.flags&128)!==0,s=a.rendering,s===null)if(i)Sl(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ki(e),s!==null){for(t.flags|=128,Sl(a,!1),e=s.updateQueue,t.updateQueue=e,Xi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return V(Ge,Ge.current&1|2),ge&&$t(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ht()>$i&&(t.flags|=128,i=!0,Sl(a,!1),t.lanes=4194304)}else{if(!i)if(e=ki(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),Sl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ge)return Re(t),null}else 2*ht()-a.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,i=!0,Sl(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ht(),e.sibling=null,n=Ge.current,V(Ge,i?n&1|2:n&1),ge&&$t(t,a.treeForkCount),e):(Re(t),null);case 22:case 23:return xt(t),Cs(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),n=t.updateQueue,n!==null&&Xi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&N(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Ve),Re(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function sg(e,t){switch(hs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(Ve),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ti(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(r(340));Kn()}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(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(Ge),null;case 4:return qe(),null;case 10:return Wt(t.type),null;case 22:case 23:return xt(t),Cs(),e!==null&&N(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Ve),null;case 25:return null;default:return null}}function Id(e,t){switch(hs(t),t.tag){case 3:Wt(Ve),qe();break;case 26:case 27:case 5:ti(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:N(Ge);break;case 10:Wt(t.type);break;case 22:case 23:xt(t),Cs(),e!==null&&N(Wn);break;case 24:Wt(Ve)}}function El(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var s=n.create,d=n.inst;a=s(),d.destroy=a}n=n.next}while(n!==i)}}catch(m){Ee(t,t.return,m)}}function _n(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var s=i.next;a=s;do{if((a.tag&e)===e){var d=a.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,i=t;var b=n,C=m;try{C()}catch(U){Ee(i,b,U)}}}a=a.next}while(a!==s)}}catch(U){Ee(t,t.return,U)}}function Pd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Vo(t,n)}catch(a){Ee(e,e.return,a)}}}function ef(e,t,n){n.props=na(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ee(e,t,a)}}function Tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){Ee(e,t,i)}}function qt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){Ee(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ee(e,t,i)}else n.current=null}function tf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){Ee(e,e.return,i)}}function uc(e,t,n){try{var a=e.stateNode;Ag(a,e.type,n,t),a[ut]=t}catch(i){Ee(e,e.return,i)}}function nf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nf(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&&zn(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 cc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function Qi(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qi(e,t,n),e=e.sibling;e!==null;)Qi(e,t,n),e=e.sibling}function af(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);et(t,a,n),t[Fe]=e,t[ut]=n}catch(s){Ee(e,e.return,s)}}var nn=!1,Ze=!1,rc=!1,lf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function cg(e,t){if(e=e.containerInfo,Rc=fu,e=go(e),ns(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var d=0,m=-1,b=-1,C=0,U=0,Y=e,A=null;t:for(;;){for(var O;Y!==n||i!==0&&Y.nodeType!==3||(m=d+i),Y!==s||a!==0&&Y.nodeType!==3||(b=d+a),Y.nodeType===3&&(d+=Y.nodeValue.length),(O=Y.firstChild)!==null;)A=Y,Y=O;for(;;){if(Y===e)break t;if(A===n&&++C===i&&(m=d),A===s&&++U===a&&(b=d),(O=Y.nextSibling)!==null)break;Y=A,A=Y.parentNode}Y=O}n=m===-1||b===-1?null:{start:m,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(kc={focusedElem:e,selectionRange:n},fu=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,s=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(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,i=s.memoizedProps,s=s.memoizedState,a=n.stateNode;try{var W=na(n.type,i);e=a.getSnapshotBeforeUpdate(W,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ee(n,n.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Oc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Oc(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}}function uf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),a&4&&El(5,n);break;case 1:if(ln(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){Ee(n,n.return,d)}else{var i=na(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ee(n,n.return,d)}}a&64&&Pd(n),a&512&&Tl(n,n.return);break;case 3:if(ln(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Vo(e,t)}catch(d){Ee(n,n.return,d)}}break;case 27:t===null&&a&4&&af(n);case 26:case 5:ln(e,n),t===null&&a&4&&tf(n),a&512&&Tl(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),a&4&&rf(e,n);break;case 13:ln(e,n),a&4&&of(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=yg.bind(null,n),Hg(e,n))));break;case 22:if(a=n.memoizedState!==null||nn,!a){t=t!==null&&t.memoizedState!==null||Ze,i=nn;var s=Ze;nn=a,(Ze=t)&&!s?un(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),nn=i,Ze=s}break;case 30:break;default:ln(e,n)}}function sf(e){var t=e.alternate;t!==null&&(e.alternate=null,sf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lu(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 ke=null,ct=!1;function an(e,t,n){for(n=n.child;n!==null;)cf(e,t,n),n=n.sibling}function cf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Ka,n)}catch{}switch(n.tag){case 26:Ze||qt(n,t),an(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ze||qt(n,t);var a=ke,i=ct;zn(n.type)&&(ke=n.stateNode,ct=!1),an(e,t,n),Ml(n.stateNode),ke=a,ct=i;break;case 5:Ze||qt(n,t);case 6:if(a=ke,i=ct,ke=null,an(e,t,n),ke=a,ct=i,ke!==null)if(ct)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(n.stateNode)}catch(s){Ee(n,t,s)}else try{ke.removeChild(n.stateNode)}catch(s){Ee(n,t,s)}break;case 18:ke!==null&&(ct?(e=ke,eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Xa(e)):eh(ke,n.stateNode));break;case 4:a=ke,i=ct,ke=n.stateNode.containerInfo,ct=!0,an(e,t,n),ke=a,ct=i;break;case 0:case 11:case 14:case 15:_n(2,n,t),Ze||_n(4,n,t),an(e,t,n);break;case 1:Ze||(qt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&ef(n,t,a)),an(e,t,n);break;case 21:an(e,t,n);break;case 22:Ze=(a=Ze)||n.memoizedState!==null,an(e,t,n),Ze=a;break;default:an(e,t,n)}}function rf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xa(e)}catch(n){Ee(t,t.return,n)}}}function of(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xa(e)}catch(n){Ee(t,t.return,n)}}function rg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lf),t;default:throw Error(r(435,e.tag))}}function Zi(e,t){var n=rg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=vg.bind(null,e,a);a.then(i,i)}})}function rt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],s=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(zn(m.type)){ke=m.stateNode,ct=!1;break e}break;case 5:ke=m.stateNode,ct=!1;break e;case 3:case 4:ke=m.stateNode.containerInfo,ct=!0;break e}m=m.return}if(ke===null)throw Error(r(160));cf(s,d,i),ke=null,ct=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)df(t,e),t=t.sibling}var Dt=null;function df(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ot(e),a&4&&(_n(3,e,e.return),El(3,e),_n(5,e,e.return));break;case 1:rt(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),a&64&&nn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=Dt;if(rt(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),a&4){var s=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":s=i.getElementsByTagName("title")[0],(!s||s[Wa]||s[Fe]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(a),i.head.insertBefore(s,i.querySelector("head > title"))),et(s,a,n),s[Fe]=e,Ke(s),a=s;break e;case"link":var d=dh("link","href",i).get(a+(n.href||""));if(d){for(var m=0;m<d.length;m++)if(s=d[m],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(m,1);break t}}s=i.createElement(a),et(s,a,n),i.head.appendChild(s);break;case"meta":if(d=dh("meta","content",i).get(a+(n.content||""))){for(m=0;m<d.length;m++)if(s=d[m],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(m,1);break t}}s=i.createElement(a),et(s,a,n),i.head.appendChild(s);break;default:throw Error(r(468,a))}s[Fe]=e,Ke(s),a=s}e.stateNode=a}else fh(i,e.type,e.stateNode);else e.stateNode=oh(i,a,e.memoizedProps);else s!==a?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,a===null?fh(i,e.type,e.stateNode):oh(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&uc(e,e.memoizedProps,n.memoizedProps)}break;case 27:rt(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),n!==null&&a&4&&uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(rt(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),e.flags&32){i=e.stateNode;try{ha(i,"")}catch(W){Ee(e,e.return,W)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,uc(e,i,n!==null?n.memoizedProps:i)),a&1024&&(rc=!0);break;case 6:if(rt(t,e),ot(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(W){Ee(e,e.return,W)}}break;case 3:if(cu=null,i=Dt,Dt=uu(t.containerInfo),rt(t,e),Dt=i,ot(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Xa(t.containerInfo)}catch(W){Ee(e,e.return,W)}rc&&(rc=!1,ff(e));break;case 4:a=Dt,Dt=uu(e.stateNode.containerInfo),rt(t,e),ot(e),Dt=a;break;case 12:rt(t,e),ot(e);break;case 31:rt(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 13:rt(t,e),ot(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ki=ht()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 22:i=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,C=nn,U=Ze;if(nn=C||i,Ze=U||b,rt(t,e),Ze=U,nn=C,ot(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||b||nn||Ze||aa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(s=b.stateNode,i)d=s.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var Y=b.memoizedProps.style,A=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(W){Ee(b,b.return,W)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=i?"":b.memoizedProps}catch(W){Ee(b,b.return,W)}}}else if(t.tag===18){if(n===null){b=t;try{var O=b.stateNode;i?th(O,!0):th(b.stateNode,!1)}catch(W){Ee(b,b.return,W)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Zi(e,n))));break;case 19:rt(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 30:break;case 21:break;default:rt(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(nf(a)){n=a;break}a=a.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var i=n.stateNode,s=sc(e);Qi(e,s,i);break;case 5:var d=n.stateNode;n.flags&32&&(ha(d,""),n.flags&=-33);var m=sc(e);Qi(e,m,d);break;case 3:case 4:var b=n.stateNode.containerInfo,C=sc(e);cc(e,C,b);break;default:throw Error(r(161))}}catch(U){Ee(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ff(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ff(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uf(e,t.alternate,t),t=t.sibling}function aa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_n(4,t,t.return),aa(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ef(t,t.return,n),aa(t);break;case 27:Ml(t.stateNode);case 26:case 5:qt(t,t.return),aa(t);break;case 22:t.memoizedState===null&&aa(t);break;case 30:aa(t);break;default:aa(t)}e=e.sibling}}function un(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,s=t,d=s.flags;switch(s.tag){case 0:case 11:case 15:un(i,s,n),El(4,s);break;case 1:if(un(i,s,n),a=s,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(C){Ee(a,a.return,C)}if(a=s,i=a.updateQueue,i!==null){var m=a.stateNode;try{var b=i.shared.hiddenCallbacks;if(b!==null)for(i.shared.hiddenCallbacks=null,i=0;i<b.length;i++)Yo(b[i],m)}catch(C){Ee(a,a.return,C)}}n&&d&64&&Pd(s),Tl(s,s.return);break;case 27:af(s);case 26:case 5:un(i,s,n),n&&a===null&&d&4&&tf(s),Tl(s,s.return);break;case 12:un(i,s,n);break;case 31:un(i,s,n),n&&d&4&&rf(i,s);break;case 13:un(i,s,n),n&&d&4&&of(i,s);break;case 22:s.memoizedState===null&&un(i,s,n),Tl(s,s.return);break;case 30:break;default:un(i,s,n)}t=t.sibling}}function oc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ol(n))}function dc(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 Ut(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hf(e,t,n,a),t=t.sibling}function hf(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ut(e,t,n,a),i&2048&&El(9,t);break;case 1:Ut(e,t,n,a);break;case 3:Ut(e,t,n,a),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){Ut(e,t,n,a),e=t.stateNode;try{var s=t.memoizedProps,d=s.id,m=s.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Ee(t,t.return,b)}}else Ut(e,t,n,a);break;case 31:Ut(e,t,n,a);break;case 13:Ut(e,t,n,a);break;case 23:break;case 22:s=t.stateNode,d=t.alternate,t.memoizedState!==null?s._visibility&2?Ut(e,t,n,a):_l(e,t):s._visibility&2?Ut(e,t,n,a):(s._visibility|=2,Ma(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&oc(d,t);break;case 24:Ut(e,t,n,a),i&2048&&dc(t.alternate,t);break;default:Ut(e,t,n,a)}}function Ma(e,t,n,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,d=t,m=n,b=a,C=d.flags;switch(d.tag){case 0:case 11:case 15:Ma(s,d,m,b,i),El(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?Ma(s,d,m,b,i):_l(s,d):(U._visibility|=2,Ma(s,d,m,b,i)),i&&C&2048&&oc(d.alternate,d);break;case 24:Ma(s,d,m,b,i),i&&C&2048&&dc(d.alternate,d);break;default:Ma(s,d,m,b,i)}t=t.sibling}}function _l(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:_l(n,a),i&2048&&oc(a.alternate,a);break;case 24:_l(n,a),i&2048&&dc(a.alternate,a);break;default:_l(n,a)}t=t.sibling}}var Nl=8192;function Oa(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)mf(e,t,n),e=e.sibling}function mf(e,t,n){switch(e.tag){case 26:Oa(e,t,n),e.flags&Nl&&e.memoizedState!==null&&$g(n,Dt,e.memoizedState,e.memoizedProps);break;case 5:Oa(e,t,n);break;case 3:case 4:var a=Dt;Dt=uu(e.stateNode.containerInfo),Oa(e,t,n),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Nl,Nl=16777216,Oa(e,t,n),Nl=a):Oa(e,t,n));break;default:Oa(e,t,n)}}function pf(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 wl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$e=a,yf(a,e)}pf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gf(e),e=e.sibling}function gf(e){switch(e.tag){case 0:case 11:case 15:wl(e),e.flags&2048&&_n(9,e,e.return);break;case 3:wl(e);break;case 12:wl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ji(e)):wl(e);break;default:wl(e)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$e=a,yf(a,e)}pf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_n(8,t,t.return),Ji(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ji(t));break;default:Ji(t)}e=e.sibling}}function yf(e,t){for(;$e!==null;){var n=$e;switch(n.tag){case 0:case 11:case 15:_n(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ol(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,$e=a;else e:for(n=e;$e!==null;){a=$e;var i=a.sibling,s=a.return;if(sf(a),a===n){$e=null;break e}if(i!==null){i.return=s,$e=i;break e}$e=s}}}var og={getCacheForType:function(e){var t=Ie(Ve),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ie(Ve).controller.signal}},dg=typeof WeakMap=="function"?WeakMap:Map,be=0,we=null,fe=null,me=0,Se=0,bt=null,Nn=!1,Da=!1,fc=!1,sn=0,Le=0,wn=0,la=0,hc=0,jt=0,Ua=0,Cl=null,dt=null,mc=!1,Ki=0,vf=0,$i=1/0,Fi=null,Cn=null,Je=0,An=null,Ha=null,cn=0,pc=0,gc=null,xf=null,Al=0,yc=null;function St(){return(be&2)!==0&&me!==0?me&-me:M.T!==null?Ec():Mr()}function bf(){if(jt===0)if((me&536870912)===0||ge){var e=li;li<<=1,(li&3932160)===0&&(li=262144),jt=e}else jt=536870912;return e=vt.current,e!==null&&(e.flags|=32),jt}function ft(e,t,n){(e===we&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Ba(e,0),Rn(e,me,jt,!1)),Fa(e,n),((be&2)===0||e!==we)&&(e===we&&((be&2)===0&&(la|=n),Le===4&&Rn(e,me,jt,!1)),Gt(e))}function jf(e,t,n){if((be&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$a(e,t),i=a?mg(e,t):xc(e,t,!0),s=a;do{if(i===0){Da&&!a&&Rn(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!fg(n)){i=xc(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)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=Cl;var b=m.current.memoizedState.isDehydrated;if(b&&(Ba(m,d).flags|=256),d=xc(m,d,!1),d!==2){if(fc&&!b){m.errorRecoveryDisabledLanes|=s,la|=s,i=4;break e}s=dt,dt=i,s!==null&&(dt===null?dt=s:dt.push.apply(dt,s))}i=d}if(s=!1,i!==2)continue}}if(i===1){Ba(e,0),Rn(e,t,0,!0);break}e:{switch(a=e,s=i,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Rn(a,t,jt,!Nn);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(i=Ki+300-ht(),10<i)){if(Rn(a,t,jt,!Nn),ui(a,0,!0)!==0)break e;cn=t,a.timeoutHandle=If(Sf.bind(null,a,n,dt,Fi,mc,t,jt,la,Ua,Nn,s,"Throttled",-0,0),i);break e}Sf(a,n,dt,Fi,mc,t,jt,la,Ua,Nn,s,null,-0,0)}}break}while(!0);Gt(e)}function Sf(e,t,n,a,i,s,d,m,b,C,U,Y,A,O){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},mf(t,s,Y);var W=(s&62914560)===s?Ki-ht():(s&4194048)===s?vf-ht():0;if(W=Fg(Y,W),W!==null){cn=s,e.cancelPendingCommit=W(Rf.bind(null,e,t,s,n,a,i,d,m,b,U,Y,null,A,O)),Rn(e,s,d,!C);return}}Rf(e,t,s,n,a,i,d,m,b)}function fg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],s=i.getSnapshot;i=i.value;try{if(!gt(s(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Rn(e,t,n,a){t&=~hc,t&=~la,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var s=31-pt(i),d=1<<s;a[s]=-1,i&=~d}n!==0&&Rr(e,n,t)}function Wi(){return(be&6)===0?(Rl(0),!1):!0}function vc(){if(fe!==null){if(Se===0)var e=fe.return;else e=fe,Ft=$n=null,Os(e),Ca=null,fl=0,e=fe;for(;e!==null;)Id(e.alternate,e),e=e.return;fe=null}}function Ba(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cn=0,vc(),we=e,fe=n=Kt(e.current,null),me=t,Se=0,bt=null,Nn=!1,Da=$a(e,t),fc=!1,Ua=jt=hc=la=wn=Le=0,dt=Cl=null,mc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-pt(a),s=1<<i;t|=e[i],a&=~s}return sn=t,vi(),n}function Ef(e,t){re=null,M.H=bl,t===wa||t===Ni?(t=Bo(),Se=3):t===Ss?(t=Bo(),Se=4):Se=t===Fs?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,fe===null&&(Le=1,qi(e,Nt(t,e.current)))}function Tf(){var e=vt.current;return e===null?!0:(me&4194048)===me?Rt===null:(me&62914560)===me||(me&536870912)!==0?e===Rt:!1}function _f(){var e=M.H;return M.H=bl,e===null?bl:e}function Nf(){var e=M.A;return M.A=og,e}function Ii(){Le=4,Nn||(me&4194048)!==me&&vt.current!==null||(Da=!0),(wn&134217727)===0&&(la&134217727)===0||we===null||Rn(we,me,jt,!1)}function xc(e,t,n){var a=be;be|=2;var i=_f(),s=Nf();(we!==e||me!==t)&&(Fi=null,Ba(e,t)),t=!1;var d=Le;e:do try{if(Se!==0&&fe!==null){var m=fe,b=bt;switch(Se){case 8:vc(),d=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var C=Se;if(Se=0,bt=null,La(e,m,b,C),n&&Da){d=0;break e}break;default:C=Se,Se=0,bt=null,La(e,m,b,C)}}hg(),d=Le;break}catch(U){Ef(e,U)}while(!0);return t&&e.shellSuspendCounter++,Ft=$n=null,be=a,M.H=i,M.A=s,fe===null&&(we=null,me=0,vi()),d}function hg(){for(;fe!==null;)wf(fe)}function mg(e,t){var n=be;be|=2;var a=_f(),i=Nf();we!==e||me!==t?(Fi=null,$i=ht()+500,Ba(e,t)):Da=$a(e,t);e:do try{if(Se!==0&&fe!==null){t=fe;var s=bt;t:switch(Se){case 1:Se=0,bt=null,La(e,t,s,1);break;case 2:case 9:if(Uo(s)){Se=0,bt=null,Cf(t);break}t=function(){Se!==2&&Se!==9||we!==e||(Se=7),Gt(e)},s.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:Uo(s)?(Se=0,bt=null,Cf(t)):(Se=0,bt=null,La(e,t,s,7));break;case 5:var d=null;switch(fe.tag){case 26:d=fe.memoizedState;case 5:case 27:var m=fe;if(d?hh(d):m.stateNode.complete){Se=0,bt=null;var b=m.sibling;if(b!==null)fe=b;else{var C=m.return;C!==null?(fe=C,Pi(C)):fe=null}break t}}Se=0,bt=null,La(e,t,s,5);break;case 6:Se=0,bt=null,La(e,t,s,6);break;case 8:vc(),Le=6;break e;default:throw Error(r(462))}}pg();break}catch(U){Ef(e,U)}while(!0);return Ft=$n=null,M.H=a,M.A=i,be=n,fe!==null?0:(we=null,me=0,vi(),Le)}function pg(){for(;fe!==null&&!Bm();)wf(fe)}function wf(e){var t=Fd(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?Pi(e):fe=t}function Cf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xd(n,t,t.pendingProps,t.type,void 0,me);break;case 11:t=Xd(n,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:Os(t);default:Id(n,t),t=fe=_o(t,sn),t=Fd(n,t,sn)}e.memoizedProps=e.pendingProps,t===null?Pi(e):fe=t}function La(e,t,n,a){Ft=$n=null,Os(t),Ca=null,fl=0;var i=t.return;try{if(ag(e,i,t,n,me)){Le=1,qi(e,Nt(n,e.current)),fe=null;return}}catch(s){if(i!==null)throw fe=i,s;Le=1,qi(e,Nt(n,e.current)),fe=null;return}t.flags&32768?(ge||a===1?e=!0:Da||(me&536870912)!==0?e=!1:(Nn=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Af(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){Af(t,Nn);return}e=t.return;var n=ug(t.alternate,t,sn);if(n!==null){fe=n;return}if(t=t.sibling,t!==null){fe=t;return}fe=t=e}while(t!==null);Le===0&&(Le=5)}function Af(e,t){do{var n=sg(e.alternate,e);if(n!==null){n.flags&=32767,fe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){fe=e;return}fe=e=n}while(e!==null);Le=6,fe=null}function Rf(e,t,n,a,i,s,d,m,b){e.cancelPendingCommit=null;do eu();while(Je!==0);if((be&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=ss,Km(e,n,s,d,m,b),e===we&&(fe=we=null,me=0),Ha=t,An=e,cn=n,pc=s,gc=i,xf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xg(ni,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,i=K.p,K.p=2,d=be,be|=4;try{cg(e,t,n)}finally{be=d,K.p=i,M.T=a}}Je=1,kf(),zf(),Mf()}}function kf(){if(Je===1){Je=0;var e=An,t=Ha,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var a=K.p;K.p=2;var i=be;be|=4;try{df(t,e);var s=kc,d=go(e.containerInfo),m=s.focusedElem,b=s.selectionRange;if(d!==m&&m&&m.ownerDocument&&po(m.ownerDocument.documentElement,m)){if(b!==null&&ns(m)){var C=b.start,U=b.end;if(U===void 0&&(U=C),"selectionStart"in m)m.selectionStart=C,m.selectionEnd=Math.min(U,m.value.length);else{var Y=m.ownerDocument||document,A=Y&&Y.defaultView||window;if(A.getSelection){var O=A.getSelection(),W=m.textContent.length,le=Math.min(b.start,W),Ne=b.end===void 0?le:Math.min(b.end,W);!O.extend&&le>Ne&&(d=Ne,Ne=le,le=d);var _=mo(m,le),T=mo(m,Ne);if(_&&T&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==T.node||O.focusOffset!==T.offset)){var w=Y.createRange();w.setStart(_.node,_.offset),O.removeAllRanges(),le>Ne?(O.addRange(w),O.extend(T.node,T.offset)):(w.setEnd(T.node,T.offset),O.addRange(w))}}}}for(Y=[],O=m;O=O.parentNode;)O.nodeType===1&&Y.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<Y.length;m++){var q=Y[m];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}fu=!!Rc,kc=Rc=null}finally{be=i,K.p=a,M.T=n}}e.current=t,Je=2}}function zf(){if(Je===2){Je=0;var e=An,t=Ha,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=M.T,M.T=null;var a=K.p;K.p=2;var i=be;be|=4;try{uf(e,t.alternate,t)}finally{be=i,K.p=a,M.T=n}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,Lm();var e=An,t=Ha,n=cn,a=xf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Ha=An=null,Of(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Cn=null),Hu(n),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Ka,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,i=K.p,K.p=2,M.T=null;try{for(var s=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];s(m.value,{componentStack:m.stack})}}finally{M.T=t,K.p=i}}(cn&3)!==0&&eu(),Gt(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===yc?Al++:(Al=0,yc=e):Al=0,Rl(0)}}function Of(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ol(t)))}function eu(){return kf(),zf(),Mf(),Df()}function Df(){if(Je!==5)return!1;var e=An,t=pc;pc=0;var n=Hu(cn),a=M.T,i=K.p;try{K.p=32>n?32:n,M.T=null,n=gc,gc=null;var s=An,d=cn;if(Je=0,Ha=An=null,cn=0,(be&6)!==0)throw Error(r(331));var m=be;if(be|=4,gf(s.current),hf(s,s.current,d,n),be=m,Rl(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ka,s)}catch{}return!0}finally{K.p=i,M.T=a,Of(e,t)}}function Uf(e,t,n){t=Nt(n,t),t=$s(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Fa(e,2),Gt(e))}function Ee(e,t,n){if(e.tag===3)Uf(e,e,n);else for(;t!==null;){if(t.tag===3){Uf(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Cn===null||!Cn.has(a))){e=Nt(n,e),n=Ud(2),a=Sn(t,n,2),a!==null&&(Hd(n,a,t,e),Fa(a,2),Gt(a));break}}t=t.return}}function bc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new dg;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(fc=!0,i.add(n),e=gg.bind(null,e,t,n),t.then(e,e))}function gg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,we===e&&(me&n)===n&&(Le===4||Le===3&&(me&62914560)===me&&300>ht()-Ki?(be&2)===0&&Ba(e,0):hc|=n,Ua===me&&(Ua=0)),Gt(e)}function Hf(e,t){t===0&&(t=Ar()),e=Zn(e,t),e!==null&&(Fa(e,t),Gt(e))}function yg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hf(e,n)}function vg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Hf(e,n)}function xg(e,t){return Mu(e,t)}var tu=null,qa=null,jc=!1,nu=!1,Sc=!1,kn=0;function Gt(e){e!==qa&&e.next===null&&(qa===null?tu=qa=e:qa=qa.next=e),nu=!0,jc||(jc=!0,jg())}function Rl(e,t){if(!Sc&&nu){Sc=!0;do for(var n=!1,a=tu;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var s=0;else{var d=a.suspendedLanes,m=a.pingedLanes;s=(1<<31-pt(42|e)+1)-1,s&=i&~(d&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,Gf(a,s))}else s=me,s=ui(a,a===we?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||$a(a,s)||(n=!0,Gf(a,s));a=a.next}while(n);Sc=!1}}function bg(){Bf()}function Bf(){nu=jc=!1;var e=0;kn!==0&&kg()&&(e=kn);for(var t=ht(),n=null,a=tu;a!==null;){var i=a.next,s=Lf(a,t);s===0?(a.next=null,n===null?tu=i:n.next=i,i===null&&(qa=n)):(n=a,(e!==0||(s&3)!==0)&&(nu=!0)),a=i}Je!==0&&Je!==5||Rl(e),kn!==0&&(kn=0)}function Lf(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var d=31-pt(s),m=1<<d,b=i[d];b===-1?((m&n)===0||(m&a)!==0)&&(i[d]=Jm(m,t)):b<=t&&(e.expiredLanes|=m),s&=~m}if(t=we,n=me,n=ui(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ou(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$a(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ou(a),Hu(n)){case 2:case 8:n=wr;break;case 32:n=ni;break;case 268435456:n=Cr;break;default:n=ni}return a=qf.bind(null,e),n=Mu(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ou(a),e.callbackPriority=2,e.callbackNode=null,2}function qf(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(eu()&&e.callbackNode!==n)return null;var a=me;return a=ui(e,e===we?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(jf(e,a,t),Lf(e,ht()),e.callbackNode!=null&&e.callbackNode===n?qf.bind(null,e):null)}function Gf(e,t){if(eu())return null;jf(e,t,!0)}function jg(){Mg(function(){(be&6)!==0?Mu(Nr,bg):Bf()})}function Ec(){if(kn===0){var e=_a;e===0&&(e=ai,ai<<=1,(ai&261888)===0&&(ai=256)),kn=e}return kn}function Yf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function Vf(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sg(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var s=Yf((i[ut]||null).action),d=a.submitter;d&&(t=(t=d[ut]||null)?Yf(t.formAction):d.getAttribute("formAction"),t!==null&&(s=t,d=null));var m=new mi("action","action",null,a,i);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(kn!==0){var b=d?Vf(i,d):new FormData(i);Vs(n,{pending:!0,data:b,method:i.method,action:s},null,b)}}else typeof s=="function"&&(m.preventDefault(),b=d?Vf(i,d):new FormData(i),Vs(n,{pending:!0,data:b,method:i.method,action:s},s,b))},currentTarget:i}]})}}for(var Tc=0;Tc<us.length;Tc++){var _c=us[Tc],Eg=_c.toLowerCase(),Tg=_c[0].toUpperCase()+_c.slice(1);Ot(Eg,"on"+Tg)}Ot(xo,"onAnimationEnd"),Ot(bo,"onAnimationIteration"),Ot(jo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(qp,"onTransitionRun"),Ot(Gp,"onTransitionStart"),Ot(Yp,"onTransitionCancel"),Ot(So,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kl="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(" "),_g=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kl));function Xf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,C=m.currentTarget;if(m=m.listener,b!==s&&i.isPropagationStopped())break e;s=m,i.currentTarget=C;try{s(i)}catch(U){yi(U)}i.currentTarget=null,s=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,C=m.currentTarget,m=m.listener,b!==s&&i.isPropagationStopped())break e;s=m,i.currentTarget=C;try{s(i)}catch(U){yi(U)}i.currentTarget=null,s=b}}}}function he(e,t){var n=t[Bu];n===void 0&&(n=t[Bu]=new Set);var a=e+"__bubble";n.has(a)||(Qf(t,e,2,!1),n.add(a))}function Nc(e,t,n){var a=0;t&&(a|=4),Qf(n,e,a,t)}var au="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[au]){e[au]=!0,Ur.forEach(function(n){n!=="selectionchange"&&(_g.has(n)||Nc(n,!1,e),Nc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[au]||(t[au]=!0,Nc("selectionchange",!1,t))}}function Qf(e,t,n,a){switch(bh(t)){case 2:var i=Pg;break;case 8:i=ey;break;default:i=Yc}n=i.bind(null,t,n,e),i=void 0,!Ju||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Cc(e,t,n,a,i){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var m=a.stateNode.containerInfo;if(m===i)break;if(d===4)for(d=a.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;m!==null;){if(d=ca(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){a=s=d;continue e}m=m.parentNode}}a=a.return}Kr(function(){var C=s,U=Qu(n),Y=[];e:{var A=Eo.get(e);if(A!==void 0){var O=mi,W=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":O=vp;break;case"focusin":W="focus",O=Wu;break;case"focusout":W="blur",O=Wu;break;case"beforeblur":case"afterblur":O=Wu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Wr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=up;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=jp;break;case xo:case bo:case jo:O=rp;break;case So:O=Ep;break;case"scroll":case"scrollend":O=lp;break;case"wheel":O=_p;break;case"copy":case"cut":case"paste":O=dp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Pr;break;case"toggle":case"beforetoggle":O=wp}var le=(t&4)!==0,Ne=!le&&(e==="scroll"||e==="scrollend"),_=le?A!==null?A+"Capture":null:A;le=[];for(var T=C,w;T!==null;){var q=T;if(w=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||w===null||_===null||(q=Pa(T,_),q!=null&&le.push(zl(T,q,w))),Ne)break;T=T.return}0<le.length&&(A=new O(A,W,null,n,U),Y.push({event:A,listeners:le}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",A&&n!==Xu&&(W=n.relatedTarget||n.fromElement)&&(ca(W)||W[sa]))break e;if((O||A)&&(A=U.window===U?U:(A=U.ownerDocument)?A.defaultView||A.parentWindow:window,O?(W=n.relatedTarget||n.toElement,O=C,W=W?ca(W):null,W!==null&&(Ne=h(W),le=W.tag,W!==Ne||le!==5&&le!==27&&le!==6)&&(W=null)):(O=null,W=C),O!==W)){if(le=Wr,q="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=Pr,q="onPointerLeave",_="onPointerEnter",T="pointer"),Ne=O==null?A:Ia(O),w=W==null?A:Ia(W),A=new le(q,T+"leave",O,n,U),A.target=Ne,A.relatedTarget=w,q=null,ca(U)===C&&(le=new le(_,T+"enter",W,n,U),le.target=w,le.relatedTarget=Ne,q=le),Ne=q,O&&W)t:{for(le=Ng,_=O,T=W,w=0,q=_;q;q=le(q))w++;q=0;for(var te=T;te;te=le(te))q++;for(;0<w-q;)_=le(_),w--;for(;0<q-w;)T=le(T),q--;for(;w--;){if(_===T||T!==null&&_===T.alternate){le=_;break t}_=le(_),T=le(T)}le=null}else le=null;O!==null&&Zf(Y,A,O,le,!1),W!==null&&Ne!==null&&Zf(Y,Ne,W,le,!0)}}e:{if(A=C?Ia(C):window,O=A.nodeName&&A.nodeName.toLowerCase(),O==="select"||O==="input"&&A.type==="file")var ve=so;else if(io(A))if(co)ve=Hp;else{ve=Dp;var P=Op}else O=A.nodeName,!O||O.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?C&&Vu(C.elementType)&&(ve=so):ve=Up;if(ve&&(ve=ve(e,C))){uo(Y,ve,n,U);break e}P&&P(e,A,C),e==="focusout"&&C&&A.type==="number"&&C.memoizedProps.value!=null&&Yu(A,"number",A.value)}switch(P=C?Ia(C):window,e){case"focusin":(io(P)||P.contentEditable==="true")&&(ya=P,as=C,sl=null);break;case"focusout":sl=as=ya=null;break;case"mousedown":ls=!0;break;case"contextmenu":case"mouseup":case"dragend":ls=!1,yo(Y,n,U);break;case"selectionchange":if(Lp)break;case"keydown":case"keyup":yo(Y,n,U)}var oe;if(Pu)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else ga?ao(e,n)&&(pe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(pe="onCompositionStart");pe&&(eo&&n.locale!=="ko"&&(ga||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&ga&&(oe=$r()):(pn=U,Ku="value"in pn?pn.value:pn.textContent,ga=!0)),P=lu(C,pe),0<P.length&&(pe=new Ir(pe,e,null,n,U),Y.push({event:pe,listeners:P}),oe?pe.data=oe:(oe=lo(n),oe!==null&&(pe.data=oe)))),(oe=Ap?Rp(e,n):kp(e,n))&&(pe=lu(C,"onBeforeInput"),0<pe.length&&(P=new Ir("onBeforeInput","beforeinput",null,n,U),Y.push({event:P,listeners:pe}),P.data=oe)),Sg(Y,e,C,n,U)}Xf(Y,t)})}function zl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lu(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=Pa(e,n),i!=null&&a.unshift(zl(e,i,s)),i=Pa(e,t),i!=null&&a.push(zl(e,i,s))),e.tag===3)return a;e=e.return}return[]}function Ng(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,a,i){for(var s=t._reactName,d=[];n!==null&&n!==a;){var m=n,b=m.alternate,C=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||C===null||(b=C,i?(C=Pa(n,s),C!=null&&d.unshift(zl(n,C,b))):i||(C=Pa(n,s),C!=null&&d.push(zl(n,C,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var wg=/\r\n?/g,Cg=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace(wg,`
|
|
49
|
+
`).replace(Cg,"")}function Kf(e,t){return t=Jf(t),Jf(e)===t}function _e(e,t,n,a,i,s){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ha(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ha(e,""+a);break;case"className":ci(e,"class",a);break;case"tabIndex":ci(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(e,n,a);break;case"style":Zr(e,a,s);break;case"data":if(t!=="object"){ci(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=oi(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 s=="function"&&(n==="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(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=oi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Zt);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=oi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":he("beforetoggle",e),he("toggle",e),si(e,"popover",a);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":si(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=np.get(n)||n,si(e,n,a))}}function Ac(e,t,n,a,i,s){switch(n){case"style":Zr(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof a=="string"?ha(e,a):(typeof a=="number"||typeof a=="bigint")&&ha(e,""+a);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hr.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),s=e[ut]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,i),typeof a=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):si(e,n,a)}}}function et(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var a=!1,i=!1,s;for(s in n)if(n.hasOwnProperty(s)){var d=n[s];if(d!=null)switch(s){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:_e(e,t,s,d,n,null)}}i&&_e(e,t,"srcSet",n.srcSet,n,null),a&&_e(e,t,"src",n.src,n,null);return;case"input":he("invalid",e);var m=s=d=i=null,b=null,C=null;for(a in n)if(n.hasOwnProperty(a)){var U=n[a];if(U!=null)switch(a){case"name":i=U;break;case"type":d=U;break;case"checked":b=U;break;case"defaultChecked":C=U;break;case"value":s=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:_e(e,t,a,U,n,null)}}Yr(e,s,m,b,C,d,i,!1);return;case"select":he("invalid",e),a=d=s=null;for(i in n)if(n.hasOwnProperty(i)&&(m=n[i],m!=null))switch(i){case"value":s=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:_e(e,t,i,m,n,null)}t=s,n=d,e.multiple=!!a,t!=null?fa(e,!!a,t,!1):n!=null&&fa(e,!!a,n,!0);return;case"textarea":he("invalid",e),s=i=a=null;for(d in n)if(n.hasOwnProperty(d)&&(m=n[d],m!=null))switch(d){case"value":a=m;break;case"defaultValue":i=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:_e(e,t,d,m,n,null)}Xr(e,a,i,s);return;case"option":for(b in n)if(n.hasOwnProperty(b)&&(a=n[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:_e(e,t,b,a,n,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(a=0;a<kl.length;a++)he(kl[a],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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(C in n)if(n.hasOwnProperty(C)&&(a=n[C],a!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:_e(e,t,C,a,n,null)}return;default:if(Vu(t)){for(U in n)n.hasOwnProperty(U)&&(a=n[U],a!==void 0&&Ac(e,t,U,a,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(a=n[m],a!=null&&_e(e,t,m,a,n,null))}function Ag(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,s=null,d=null,m=null,b=null,C=null,U=null;for(O in n){var Y=n[O];if(n.hasOwnProperty(O)&&Y!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=Y;default:a.hasOwnProperty(O)||_e(e,t,O,null,a,Y)}}for(var A in a){var O=a[A];if(Y=n[A],a.hasOwnProperty(A)&&(O!=null||Y!=null))switch(A){case"type":s=O;break;case"name":i=O;break;case"checked":C=O;break;case"defaultChecked":U=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==Y&&_e(e,t,A,O,a,Y)}}Gu(e,d,m,b,C,U,s,i);return;case"select":O=d=m=A=null;for(s in n)if(b=n[s],n.hasOwnProperty(s)&&b!=null)switch(s){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(s)||_e(e,t,s,null,a,b)}for(i in a)if(s=a[i],b=n[i],a.hasOwnProperty(i)&&(s!=null||b!=null))switch(i){case"value":A=s;break;case"defaultValue":m=s;break;case"multiple":d=s;default:s!==b&&_e(e,t,i,s,a,b)}t=m,n=d,a=O,A!=null?fa(e,!!n,A,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":O=A=null;for(m in n)if(i=n[m],n.hasOwnProperty(m)&&i!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,null,a,i)}for(d in a)if(i=a[d],s=n[d],a.hasOwnProperty(d)&&(i!=null||s!=null))switch(d){case"value":A=i;break;case"defaultValue":O=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==s&&_e(e,t,d,i,a,s)}Vr(e,A,O);return;case"option":for(var W in n)if(A=n[W],n.hasOwnProperty(W)&&A!=null&&!a.hasOwnProperty(W))switch(W){case"selected":e.selected=!1;break;default:_e(e,t,W,null,a,A)}for(b in a)if(A=a[b],O=n[b],a.hasOwnProperty(b)&&A!==O&&(A!=null||O!=null))switch(b){case"selected":e.selected=A&&typeof A!="function"&&typeof A!="symbol";break;default:_e(e,t,b,A,a,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in n)A=n[le],n.hasOwnProperty(le)&&A!=null&&!a.hasOwnProperty(le)&&_e(e,t,le,null,a,A);for(C in a)if(A=a[C],O=n[C],a.hasOwnProperty(C)&&A!==O&&(A!=null||O!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(137,t));break;default:_e(e,t,C,A,a,O)}return;default:if(Vu(t)){for(var Ne in n)A=n[Ne],n.hasOwnProperty(Ne)&&A!==void 0&&!a.hasOwnProperty(Ne)&&Ac(e,t,Ne,void 0,a,A);for(U in a)A=a[U],O=n[U],!a.hasOwnProperty(U)||A===O||A===void 0&&O===void 0||Ac(e,t,U,A,a,O);return}}for(var _ in n)A=n[_],n.hasOwnProperty(_)&&A!=null&&!a.hasOwnProperty(_)&&_e(e,t,_,null,a,A);for(Y in a)A=a[Y],O=n[Y],!a.hasOwnProperty(Y)||A===O||A==null&&O==null||_e(e,t,Y,A,a,O)}function $f(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Rg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],s=i.transferSize,d=i.initiatorType,m=i.duration;if(s&&m&&$f(d)){for(d=0,m=i.responseEnd,a+=1;a<n.length;a++){var b=n[a],C=b.startTime;if(C>m)break;var U=b.transferSize,Y=b.initiatorType;U&&$f(Y)&&(b=b.responseEnd,d+=U*(b<m?1:(m-C)/(b-C)))}if(--a,t+=8*(s+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 Rc=null,kc=null;function iu(e){return e.nodeType===9?e:e.ownerDocument}function Ff(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 Wf(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 zc(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 Mc=null;function kg(){var e=window.event;return e&&e.type==="popstate"?e===Mc?!1:(Mc=e,!0):(Mc=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,zg=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,Mg=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(Og)}:If;function Og(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function eh(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),Xa(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Ml(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ml(n);for(var s=n.firstChild;s;){var d=s.nextSibling,m=s.nodeName;s[Wa]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=d}}else n==="body"&&Ml(e.ownerDocument.body);n=i}while(n);Xa(t)}function th(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Oc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Oc(n),Lu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Dg(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Wa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==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(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Ug(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=kt(e.nextSibling),e===null))return null;return e}function nh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function Dc(e){return e.data==="$?"||e.data==="$~"}function Uc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Hg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function kt(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 Hc=null;function ah(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return kt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function ih(e,t,n){switch(t=iu(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ml(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lu(e)}var zt=new Map,uh=new Set;function uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=K.d;K.d={f:Bg,r:Lg,D:qg,C:Gg,L:Yg,m:Vg,X:Qg,S:Xg,M:Zg};function Bg(){var e=rn.f(),t=Wi();return e||t}function Lg(e){var t=ra(e);t!==null&&t.tag===5&&t.type==="form"?Sd(t):rn.r(e)}var Ga=typeof document>"u"?null:document;function sh(e,t,n){var a=Ga;if(a&&typeof t=="string"&&t){var i=Tt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),uh.has(i)||(uh.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),et(t,"link",e),Ke(t),a.head.appendChild(t)))}}function qg(e){rn.D(e),sh("dns-prefetch",e,null)}function Gg(e,t){rn.C(e,t),sh("preconnect",e,t)}function Yg(e,t,n){rn.L(e,t,n);var a=Ga;if(a&&e&&t){var i='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Tt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Tt(n.imageSizes)+'"]')):i+='[href="'+Tt(e)+'"]';var s=i;switch(t){case"style":s=Ya(e);break;case"script":s=Va(e)}zt.has(s)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zt.set(s,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ol(s))||t==="script"&&a.querySelector(Dl(s))||(t=a.createElement("link"),et(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Vg(e,t){rn.m(e,t);var n=Ga;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Tt(a)+'"][href="'+Tt(e)+'"]',s=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Va(e)}if(!zt.has(s)&&(e=v({rel:"modulepreload",href:e},t),zt.set(s,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Dl(s)))return}a=n.createElement("link"),et(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Xg(e,t,n){rn.S(e,t,n);var a=Ga;if(a&&e){var i=oa(a).hoistableStyles,s=Ya(e);t=t||"default";var d=i.get(s);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(Ol(s)))m.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(s))&&Bc(e,n);var b=d=a.createElement("link");Ke(b),et(b,"link",e),b._p=new Promise(function(C,U){b.onload=C,b.onerror=U}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,su(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},i.set(s,d)}}}function Qg(e,t){rn.X(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),s=a.get(i);s||(s=n.querySelector(Dl(i)),s||(e=v({src:e,async:!0},t),(t=zt.get(i))&&Lc(e,t),s=n.createElement("script"),Ke(s),et(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function Zg(e,t){rn.M(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),s=a.get(i);s||(s=n.querySelector(Dl(i)),s||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(i))&&Lc(e,t),s=n.createElement("script"),Ke(s),et(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function ch(e,t,n,a){var i=(i=ue.current)?uu(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ya(n.href),n=oa(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ya(n.href);var s=oa(i).hoistableStyles,d=s.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,d),(s=i.querySelector(Ol(e)))&&!s._p&&(d.instance=s,d.state.loading=5),zt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zt.set(e,n),s||Jg(i,e,n,d.state))),t&&a===null)throw Error(r(528,""));return d}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Va(n),n=oa(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ya(e){return'href="'+Tt(e)+'"'}function Ol(e){return'link[rel="stylesheet"]['+e+"]"}function rh(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Jg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),et(t,"link",n),Ke(t),e.head.appendChild(t))}function Va(e){return'[src="'+Tt(e)+'"]'}function Dl(e){return"script[async]"+e}function oh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Tt(n.href)+'"]');if(a)return t.instance=a,Ke(a),a;var i=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),et(a,"style",i),su(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ya(n.href);var s=e.querySelector(Ol(i));if(s)return t.state.loading|=4,t.instance=s,Ke(s),s;a=rh(n),(i=zt.get(i))&&Bc(a,i),s=(e.ownerDocument||e).createElement("link"),Ke(s);var d=s;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(s,"link",a),t.state.loading|=4,su(s,n.precedence,e),t.instance=s;case"script":return s=Va(n.src),(i=e.querySelector(Dl(s)))?(t.instance=i,Ke(i),i):(a=n,(i=zt.get(s))&&(a=v({},n),Lc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),et(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,su(a,n.precedence,e));return t.instance}function su(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,s=i,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)s=m;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cu=null;function dh(e,t,n){if(cu===null){var a=new Map,i=cu=new Map;i.set(n,a)}else i=cu,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var s=n[i];if(!(s[Wa]||s[Fe]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var d=s.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(s):a.set(d,[s])}}return a}function fh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Kg(e,t,n){if(n===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 hh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $g(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ya(a.href),s=t.querySelector(Ol(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ke(s);return}s=t.ownerDocument||t,a=rh(a),(i=zt.get(i))&&Bc(a,i),s=s.createElement("link"),Ke(s);var d=s;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(s,"link",a),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var qc=0;function Fg(e,t){return e.stylesheets&&e.count===0&&du(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&du(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&qc===0&&(qc=62500*Rg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&du(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>qc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ou=null;function du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ou=new Map,t.forEach(Wg,e),ou=null,ru.call(e))}function Wg(e,t){if(!(t.state.loading&4)){var n=ou.get(e);if(n)var a=n.get(null);else{n=new Map,ou.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var d=i[s];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),a=d)}a&&n.set(null,a)}i=t.instance,d=i.getAttribute("data-precedence"),s=n.get(d)||a,s===a&&n.set(null,i),n.set(d,i),this.count++,a=ru.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:B,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Ig(e,t,n,a,i,s,d,m,b){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=Du(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Du(0),this.hiddenUpdates=Du(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function mh(e,t,n,a,i,s,d,m,b,C,U,Y){return e=new Ig(e,t,n,d,b,C,U,Y,m),t=1,s===!0&&(t|=24),s=yt(3,null,null,t),e.current=s,s.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:n,cache:t},Es(s),e}function ph(e){return e?(e=ba,e):ba}function gh(e,t,n,a,i,s){i=ph(i),a.context===null?a.context=i:a.pendingContext=i,a=jn(t),a.payload={element:n},s=s===void 0?null:s,s!==null&&(a.callback=s),n=Sn(e,a,t),n!==null&&(ft(n,e,t),ml(n,e,t))}function yh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gc(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Zn(e,67108864);t!==null&&ft(t,e,67108864),Gc(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=St();t=Uu(t);var n=Zn(e,t);n!==null&&ft(n,e,t),Gc(e,t)}}var fu=!0;function Pg(e,t,n,a){var i=M.T;M.T=null;var s=K.p;try{K.p=2,Yc(e,t,n,a)}finally{K.p=s,M.T=i}}function ey(e,t,n,a){var i=M.T;M.T=null;var s=K.p;try{K.p=8,Yc(e,t,n,a)}finally{K.p=s,M.T=i}}function Yc(e,t,n,a){if(fu){var i=Vc(a);if(i===null)Cc(e,t,a,hu,n),jh(e,a);else if(ny(i,e,t,n,a))a.stopPropagation();else if(jh(e,a),t&4&&-1<ty.indexOf(e)){for(;i!==null;){var s=ra(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var d=Gn(s.pendingLanes);if(d!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-pt(d);m.entanglements[1]|=b,d&=~b}Gt(s),(be&6)===0&&($i=ht()+500,Rl(0))}}break;case 31:case 13:m=Zn(s,2),m!==null&&ft(m,s,2),Wi(),Gc(s,2)}if(s=Vc(a),s===null&&Cc(e,t,a,hu,n),s===i)break;i=s}i!==null&&a.stopPropagation()}else Cc(e,t,a,null,n)}}function Vc(e){return e=Qu(e),Xc(e)}var hu=null;function Xc(e){if(hu=null,e=ca(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=E(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hu=e,null}function bh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qm()){case Nr:return 2;case wr:return 8;case ni:case Gm:return 32;case Cr:return 268435456;default:return 32}default:return 32}}var Qc=!1,Mn=null,On=null,Dn=null,Hl=new Map,Bl=new Map,Un=[],ty="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 jh(e,t){switch(e){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function Ll(e,t,n,a,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ra(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ny(e,t,n,a,i){switch(t){case"focusin":return Mn=Ll(Mn,e,t,n,a,i),!0;case"dragenter":return On=Ll(On,e,t,n,a,i),!0;case"mouseover":return Dn=Ll(Dn,e,t,n,a,i),!0;case"pointerover":var s=i.pointerId;return Hl.set(s,Ll(Hl.get(s)||null,e,t,n,a,i)),!0;case"gotpointercapture":return s=i.pointerId,Bl.set(s,Ll(Bl.get(s)||null,e,t,n,a,i)),!0}return!1}function Sh(e){var t=ca(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,Or(e.priority,function(){xh(n)});return}}else if(t===31){if(t=E(n),t!==null){e.blockedOn=t,Or(e.priority,function(){xh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Xu=a,n.target.dispatchEvent(a),Xu=null}else return t=ra(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Eh(e,t,n){mu(e)&&n.delete(t)}function ay(){Qc=!1,Mn!==null&&mu(Mn)&&(Mn=null),On!==null&&mu(On)&&(On=null),Dn!==null&&mu(Dn)&&(Dn=null),Hl.forEach(Eh),Bl.forEach(Eh)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,ay)))}var gu=null;function Th(e){gu!==e&&(gu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){gu===e&&(gu=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(Xc(a||n)===null)continue;break}var s=ra(n);s!==null&&(e.splice(t,3),t-=3,Vs(s,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Xa(e){function t(b){return pu(b,e)}Mn!==null&&pu(Mn,e),On!==null&&pu(On,e),Dn!==null&&pu(Dn,e),Hl.forEach(t),Bl.forEach(t);for(var n=0;n<Un.length;n++){var a=Un[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)Sh(n),n.blockedOn===null&&Un.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],s=n[a+1],d=i[ut]||null;if(typeof s=="function")d||Th(n);else if(d){var m=null;if(s&&s.hasAttribute("formAction")){if(i=s,d=s[ut]||null)m=d.formAction;else if(Xc(i)!==null)continue}else m=d.action;typeof m=="function"?n[a+1]=m:(n.splice(a,3),a-=3),Th(n)}}}function _h(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Zc(e){this._internalRoot=e}yu.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,a=St();gh(n,a,e,t,null,null)},yu.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),Wi(),t[sa]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mr();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&Sh(e)}};var Nh=c.version;if(Nh!=="19.2.5")throw Error(r(527,Nh,"19.2.5"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var ly={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{Ka=vu.inject(ly),mt=vu}catch{}}return Gl.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,a="",i=zd,s=Md,d=Od;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=mh(e,1,!1,null,null,n,a,null,i,s,d,_h),e[sa]=t.current,wc(e),new Zc(t)},Gl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var a=!1,i="",s=zd,d=Md,m=Od,b=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=mh(e,1,!0,t,n??null,a,i,b,s,d,m,_h),t.context=ph(null),n=t.current,a=St(),a=Uu(a),i=jn(a),i.callback=null,Sn(n,i,a),n=a,t.current.lanes=n,Fa(t,n),Gt(t),e[sa]=t.current,wc(e),new yu(t)},Gl.version="19.2.5",Gl}var Uh;function my(){if(Uh)return $c.exports;Uh=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),$c.exports=hy(),$c.exports}var py=my();/**
|
|
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 Hh="popstate";function Bh(u){return typeof u=="object"&&u!=null&&"pathname"in u&&"search"in u&&"hash"in u&&"state"in u&&"key"in u}function gy(u={}){function c(r,f){var p;let h=(p=f.state)==null?void 0:p.masked,{pathname:g,search:E,hash:x}=h||r.location;return ir("",{pathname:g,search:E,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function o(r,f){return typeof f=="string"?f:Ql(f)}return vy(c,o,null,u)}function Oe(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Vt(u,c){if(!u){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function yy(){return Math.random().toString(36).substring(2,10)}function Lh(u,c){return{usr:u.state,key:u.key,idx:c,masked:u.unstable_mask?{pathname:u.pathname,search:u.search,hash:u.hash}:void 0}}function ir(u,c,o=null,r,f){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof c=="string"?Qa(c):c,state:o,key:c&&c.key||r||yy(),unstable_mask:f}}function Ql({pathname:u="/",search:c="",hash:o=""}){return c&&c!=="?"&&(u+=c.charAt(0)==="?"?c:"?"+c),o&&o!=="#"&&(u+=o.charAt(0)==="#"?o:"#"+o),u}function Qa(u){let c={};if(u){let o=u.indexOf("#");o>=0&&(c.hash=u.substring(o),u=u.substring(0,o));let r=u.indexOf("?");r>=0&&(c.search=u.substring(r),u=u.substring(0,r)),u&&(c.pathname=u)}return c}function vy(u,c,o,r={}){let{window:f=document.defaultView,v5Compat:h=!1}=r,g=f.history,E="POP",x=null,p=S();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function S(){return(g.state||{idx:null}).idx}function v(){E="POP";let D=S(),G=D==null?null:D-p;p=D,x&&x({action:E,location:k.location,delta:G})}function R(D,G){E="PUSH";let F=Bh(D)?D:ir(k.location,D,G);p=S()+1;let B=Lh(F,p),z=k.createHref(F.unstable_mask||F);try{g.pushState(B,"",z)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;f.location.assign(z)}h&&x&&x({action:E,location:k.location,delta:1})}function L(D,G){E="REPLACE";let F=Bh(D)?D:ir(k.location,D,G);p=S();let B=Lh(F,p),z=k.createHref(F.unstable_mask||F);g.replaceState(B,"",z),h&&x&&x({action:E,location:k.location,delta:0})}function H(D){return xy(D)}let k={get action(){return E},get location(){return u(f,g)},listen(D){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Hh,v),x=D,()=>{f.removeEventListener(Hh,v),x=null}},createHref(D){return c(f,D)},createURL:H,encodeLocation(D){let G=H(D);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:R,replace:L,go(D){return g.go(D)}};return k}function xy(u,c=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(o,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:Ql(u);return r=r.replace(/ $/,"%20"),!c&&r.startsWith("//")&&(r=o+r),new URL(r,o)}function am(u,c,o="/"){return by(u,c,o,!1)}function by(u,c,o,r){let f=typeof c=="string"?Qa(c):c,h=dn(f.pathname||"/",o);if(h==null)return null;let g=lm(u);jy(g);let E=null;for(let x=0;E==null&&x<g.length;++x){let p=zy(h);E=Ry(g[x],p,r)}return E}function lm(u,c=[],o=[],r="",f=!1){let h=(g,E,x=f,p)=>{let S={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:E,route:g};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(r)&&x)return;Oe(S.relativePath.startsWith(r),`Absolute route path "${S.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(r.length)}let v=Ht([r,S.relativePath]),R=o.concat(S);g.children&&g.children.length>0&&(Oe(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),lm(g.children,c,R,v,x)),!(g.path==null&&!g.index)&&c.push({path:v,score:Cy(v,g.index),routesMeta:R})};return u.forEach((g,E)=>{var x;if(g.path===""||!((x=g.path)!=null&&x.includes("?")))h(g,E);else for(let p of im(g.path))h(g,E,!0,p)}),c}function im(u){let c=u.split("/");if(c.length===0)return[];let[o,...r]=c,f=o.endsWith("?"),h=o.replace(/\?$/,"");if(r.length===0)return f?[h,""]:[h];let g=im(r.join("/")),E=[];return E.push(...g.map(x=>x===""?h:[h,x].join("/"))),f&&E.push(...g),E.map(x=>u.startsWith("/")&&x===""?"/":x)}function jy(u){u.sort((c,o)=>c.score!==o.score?o.score-c.score:Ay(c.routesMeta.map(r=>r.childrenIndex),o.routesMeta.map(r=>r.childrenIndex)))}var Sy=/^:[\w-]+$/,Ey=3,Ty=2,_y=1,Ny=10,wy=-2,qh=u=>u==="*";function Cy(u,c){let o=u.split("/"),r=o.length;return o.some(qh)&&(r+=wy),c&&(r+=Ty),o.filter(f=>!qh(f)).reduce((f,h)=>f+(Sy.test(h)?Ey:h===""?_y:Ny),r)}function Ay(u,c){return u.length===c.length&&u.slice(0,-1).every((r,f)=>r===c[f])?u[u.length-1]-c[c.length-1]:0}function Ry(u,c,o=!1){let{routesMeta:r}=u,f={},h="/",g=[];for(let E=0;E<r.length;++E){let x=r[E],p=E===r.length-1,S=h==="/"?c:c.slice(h.length)||"/",v=Su({path:x.relativePath,caseSensitive:x.caseSensitive,end:p},S),R=x.route;if(!v&&p&&o&&!r[r.length-1].route.index&&(v=Su({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},S)),!v)return null;Object.assign(f,v.params),g.push({params:f,pathname:Ht([h,v.pathname]),pathnameBase:Uy(Ht([h,v.pathnameBase])),route:R}),v.pathnameBase!=="/"&&(h=Ht([h,v.pathnameBase]))}return g}function Su(u,c){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[o,r]=ky(u.path,u.caseSensitive,u.end),f=c.match(o);if(!f)return null;let h=f[0],g=h.replace(/(.)\/+$/,"$1"),E=f.slice(1);return{params:r.reduce((p,{paramName:S,isOptional:v},R)=>{if(S==="*"){let H=E[R]||"";g=h.slice(0,h.length-H.length).replace(/(.)\/+$/,"$1")}const L=E[R];return v&&!L?p[S]=void 0:p[S]=(L||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:g,pattern:u}}function ky(u,c=!1,o=!0){Vt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],f="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,E,x,p,S)=>{if(r.push({paramName:E,isOptional:x!=null}),x){let v=S.charAt(p+g.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),f+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":u!==""&&u!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),r]}function zy(u){try{return u.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Vt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),u}}function dn(u,c){if(c==="/")return u;if(!u.toLowerCase().startsWith(c.toLowerCase()))return null;let o=c.endsWith("/")?c.length-1:c.length,r=u.charAt(o);return r&&r!=="/"?null:u.slice(o)||"/"}var My=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Oy(u,c="/"){let{pathname:o,search:r="",hash:f=""}=typeof u=="string"?Qa(u):u,h;return o?(o=sm(o),o.startsWith("/")?h=Gh(o.substring(1),"/"):h=Gh(o,c)):h=c,{pathname:h,search:Hy(r),hash:By(f)}}function Gh(u,c){let o=Eu(c).split("/");return u.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function Pc(u,c,o,r){return`Cannot include a '${u}' character in a manually specified \`to.${c}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Dy(u){return u.filter((c,o)=>o===0||c.route.path&&c.route.path.length>0)}function um(u){let c=Dy(u);return c.map((o,r)=>r===c.length-1?o.pathname:o.pathnameBase)}function dr(u,c,o,r=!1){let f;typeof u=="string"?f=Qa(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),Pc("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),Pc("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),Pc("#","search","hash",f)));let h=u===""||f.pathname==="",g=h?"/":f.pathname,E;if(g==null)E=o;else{let v=c.length-1;if(!r&&g.startsWith("..")){let R=g.split("/");for(;R[0]==="..";)R.shift(),v-=1;f.pathname=R.join("/")}E=v>=0?c[v]:"/"}let x=Oy(f,E),p=g&&g!=="/"&&g.endsWith("/"),S=(h||g===".")&&o.endsWith("/");return!x.pathname.endsWith("/")&&(p||S)&&(x.pathname+="/"),x}var sm=u=>u.replace(/\/\/+/g,"/"),Ht=u=>sm(u.join("/")),Eu=u=>u.replace(/\/+$/,""),Uy=u=>Eu(u).replace(/^\/*/,"/"),Hy=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,By=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,Ly=class{constructor(u,c,o,r=!1){this.status=u,this.statusText=c||"",this.internal=r,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function qy(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function Gy(u){let c=u.map(o=>o.route.path).filter(Boolean);return Ht(c)||"/"}var cm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rm(u,c){let o=u;if(typeof o!="string"||!My.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let r=o,f=!1;if(cm)try{let h=new URL(window.location.href),g=o.startsWith("//")?new URL(h.protocol+o):new URL(o),E=dn(g.pathname,c);g.origin===h.origin&&E!=null?o=E+g.search+g.hash:f=!0}catch{Vt(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var om=["POST","PUT","PATCH","DELETE"];new Set(om);var Yy=["GET",...om];new Set(Yy);var Za=y.createContext(null);Za.displayName="DataRouter";var _u=y.createContext(null);_u.displayName="DataRouterState";var dm=y.createContext(!1);function Vy(){return y.useContext(dm)}var fm=y.createContext({isTransitioning:!1});fm.displayName="ViewTransition";var Xy=y.createContext(new Map);Xy.displayName="Fetchers";var Qy=y.createContext(null);Qy.displayName="Await";var Mt=y.createContext(null);Mt.displayName="Navigation";var Kl=y.createContext(null);Kl.displayName="Location";var Xt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var fr=y.createContext(null);fr.displayName="RouteError";var hm="REACT_ROUTER_ERROR",Zy="REDIRECT",Jy="ROUTE_ERROR_RESPONSE";function Ky(u){if(u.startsWith(`${hm}:${Zy}:{`))try{let c=JSON.parse(u.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function $y(u){if(u.startsWith(`${hm}:${Jy}:{`))try{let c=JSON.parse(u.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new Ly(c.status,c.statusText,c.data)}catch{}}function Fy(u,{relative:c}={}){Oe($l(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:r}=y.useContext(Mt),{hash:f,pathname:h,search:g}=Wl(u,{relative:c}),E=h;return o!=="/"&&(E=h==="/"?o:Ht([o,h])),r.createHref({pathname:E,search:g,hash:f})}function $l(){return y.useContext(Kl)!=null}function fn(){return Oe($l(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Kl).location}var mm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pm(u){y.useContext(Mt).static||y.useLayoutEffect(u)}function Wy(){let{isDataRoute:u}=y.useContext(Xt);return u?ov():Iy()}function Iy(){Oe($l(),"useNavigate() may be used only in the context of a <Router> component.");let u=y.useContext(Za),{basename:c,navigator:o}=y.useContext(Mt),{matches:r}=y.useContext(Xt),{pathname:f}=fn(),h=JSON.stringify(um(r)),g=y.useRef(!1);return pm(()=>{g.current=!0}),y.useCallback((x,p={})=>{if(Vt(g.current,mm),!g.current)return;if(typeof x=="number"){o.go(x);return}let S=dr(x,JSON.parse(h),f,p.relative==="path");u==null&&c!=="/"&&(S.pathname=S.pathname==="/"?c:Ht([c,S.pathname])),(p.replace?o.replace:o.push)(S,p.state,p)},[c,o,h,f,u])}y.createContext(null);function Fl(){let{matches:u}=y.useContext(Xt),c=u[u.length-1];return(c==null?void 0:c.params)??{}}function Wl(u,{relative:c}={}){let{matches:o}=y.useContext(Xt),{pathname:r}=fn(),f=JSON.stringify(um(o));return y.useMemo(()=>dr(u,JSON.parse(f),r,c==="path"),[u,f,r,c])}function Py(u,c){return gm(u,c)}function gm(u,c,o){var D;Oe($l(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Mt),{matches:f}=y.useContext(Xt),h=f[f.length-1],g=h?h.params:{},E=h?h.pathname:"/",x=h?h.pathnameBase:"/",p=h&&h.route;{let G=p&&p.path||"";vm(E,!p||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${E}" (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=fn(),v;if(c){let G=typeof c=="string"?Qa(c):c;Oe(x==="/"||((D=G.pathname)==null?void 0:D.startsWith(x)),`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 "${x}" but pathname "${G.pathname}" was given in the \`location\` prop.`),v=G}else v=S;let R=v.pathname||"/",L=R;if(x!=="/"){let G=x.replace(/^\//,"").split("/");L="/"+R.replace(/^\//,"").split("/").slice(G.length).join("/")}let H=am(u,{pathname:L});Vt(p||H!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 k=lv(H&&H.map(G=>Object.assign({},G,{params:Object.assign({},g,G.params),pathname:Ht([x,r.encodeLocation?r.encodeLocation(G.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?x:Ht([x,r.encodeLocation?r.encodeLocation(G.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),f,o);return c&&k?y.createElement(Kl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},k):k}function ev(){let u=rv(),c=qy(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),o=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},h={padding:"2px 4px",backgroundColor:r},g=null;return console.error("Error handled by React Router default ErrorBoundary:",u),g=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:h},"ErrorBoundary")," or"," ",y.createElement("code",{style:h},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},c),o?y.createElement("pre",{style:f},o):null,g)}var tv=y.createElement(ev,null),ym=class extends y.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,c){return c.location!==u.location||c.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:c.error,location:c.location,revalidation:u.revalidation||c.revalidation}}componentDidCatch(u,c){this.props.onError?this.props.onError(u,c):console.error("React Router caught the following error during render",u)}render(){let u=this.state.error;if(this.context&&typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){const o=$y(u.digest);o&&(u=o)}let c=u!==void 0?y.createElement(Xt.Provider,{value:this.props.routeContext},y.createElement(fr.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?y.createElement(nv,{error:u},c):c}};ym.contextType=dm;var er=new WeakMap;function nv({children:u,error:c}){let{basename:o}=y.useContext(Mt);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let r=Ky(c.digest);if(r){let f=er.get(c);if(f)throw f;let h=rm(r.location,o);if(cm&&!er.get(c))if(h.isExternal||r.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:r.replace}));throw er.set(c,g),g}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return u}function av({routeContext:u,match:c,children:o}){let r=y.useContext(Za);return r&&r.static&&r.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=c.route.id),y.createElement(Xt.Provider,{value:u},o)}function lv(u,c=[],o){let r=o==null?void 0:o.state;if(u==null){if(!r)return null;if(r.errors)u=r.matches;else if(c.length===0&&!r.initialized&&r.matches.length>0)u=r.matches;else return null}let f=u,h=r==null?void 0:r.errors;if(h!=null){let S=f.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);Oe(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 g=!1,E=-1;if(o&&r){g=r.renderFallback;for(let S=0;S<f.length;S++){let v=f[S];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(E=S),v.route.id){let{loaderData:R,errors:L}=r,H=v.route.loader&&!R.hasOwnProperty(v.route.id)&&(!L||L[v.route.id]===void 0);if(v.route.lazy||H){o.isStatic&&(g=!0),E>=0?f=f.slice(0,E+1):f=[f[0]];break}}}}let x=o==null?void 0:o.onError,p=r&&x?(S,v)=>{var R,L;x(S,{location:r.location,params:((L=(R=r.matches)==null?void 0:R[0])==null?void 0:L.params)??{},unstable_pattern:Gy(r.matches),errorInfo:v})}:void 0;return f.reduceRight((S,v,R)=>{let L,H=!1,k=null,D=null;r&&(L=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||tv,g&&(E<0&&R===0?(vm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,D=null):E===R&&(H=!0,D=v.route.hydrateFallbackElement||null)));let G=c.concat(f.slice(0,R+1)),F=()=>{let B;return L?B=k:H?B=D:v.route.Component?B=y.createElement(v.route.Component,null):v.route.element?B=v.route.element:B=S,y.createElement(av,{match:v,routeContext:{outlet:S,matches:G,isDataRoute:r!=null},children:B})};return r&&(v.route.ErrorBoundary||v.route.errorElement||R===0)?y.createElement(ym,{location:r.location,revalidation:r.revalidation,component:k,error:L,children:F(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:p}):F()},null)}function hr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iv(u){let c=y.useContext(Za);return Oe(c,hr(u)),c}function uv(u){let c=y.useContext(_u);return Oe(c,hr(u)),c}function sv(u){let c=y.useContext(Xt);return Oe(c,hr(u)),c}function mr(u){let c=sv(u),o=c.matches[c.matches.length-1];return Oe(o.route.id,`${u} can only be used on routes that contain a unique "id"`),o.route.id}function cv(){return mr("useRouteId")}function rv(){var r;let u=y.useContext(fr),c=uv("useRouteError"),o=mr("useRouteError");return u!==void 0?u:(r=c.errors)==null?void 0:r[o]}function ov(){let{router:u}=iv("useNavigate"),c=mr("useNavigate"),o=y.useRef(!1);return pm(()=>{o.current=!0}),y.useCallback(async(f,h={})=>{Vt(o.current,mm),o.current&&(typeof f=="number"?await u.navigate(f):await u.navigate(f,{fromRouteId:c,...h}))},[u,c])}var Yh={};function vm(u,c,o){!c&&!Yh[u]&&(Yh[u]=!0,Vt(!1,o))}y.memo(dv);function dv({routes:u,future:c,state:o,isStatic:r,onError:f}){return gm(u,void 0,{state:o,isStatic:r,onError:f})}function nt(u){Oe(!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 fv({basename:u="/",children:c=null,location:o,navigationType:r="POP",navigator:f,static:h=!1,unstable_useTransitions:g}){Oe(!$l(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let E=u.replace(/^\/*/,"/"),x=y.useMemo(()=>({basename:E,navigator:f,static:h,unstable_useTransitions:g,future:{}}),[E,f,h,g]);typeof o=="string"&&(o=Qa(o));let{pathname:p="/",search:S="",hash:v="",state:R=null,key:L="default",unstable_mask:H}=o,k=y.useMemo(()=>{let D=dn(p,E);return D==null?null:{location:{pathname:D,search:S,hash:v,state:R,key:L,unstable_mask:H},navigationType:r}},[E,p,S,v,R,L,r,H]);return Vt(k!=null,`<Router basename="${E}"> is not able to match the URL "${p}${S}${v}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:y.createElement(Mt.Provider,{value:x},y.createElement(Kl.Provider,{children:c,value:k}))}function tr({children:u,location:c}){return Py(ur(u),c)}function ur(u,c=[]){let o=[];return y.Children.forEach(u,(r,f)=>{if(!y.isValidElement(r))return;let h=[...c,f];if(r.type===y.Fragment){o.push.apply(o,ur(r.props.children,h));return}Oe(r.type===nt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let g={id:r.props.id||h.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(g.children=ur(r.props.children,h)),o.push(g)}),o}var bu="get",ju="application/x-www-form-urlencoded";function Nu(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function hv(u){return Nu(u)&&u.tagName.toLowerCase()==="button"}function mv(u){return Nu(u)&&u.tagName.toLowerCase()==="form"}function pv(u){return Nu(u)&&u.tagName.toLowerCase()==="input"}function gv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function yv(u,c){return u.button===0&&(!c||c==="_self")&&!gv(u)}var xu=null;function vv(){if(xu===null)try{new FormData(document.createElement("form"),0),xu=!1}catch{xu=!0}return xu}var xv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nr(u){return u!=null&&!xv.has(u)?(Vt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ju}"`),null):u}function bv(u,c){let o,r,f,h,g;if(mv(u)){let E=u.getAttribute("action");r=E?dn(E,c):null,o=u.getAttribute("method")||bu,f=nr(u.getAttribute("enctype"))||ju,h=new FormData(u)}else if(hv(u)||pv(u)&&(u.type==="submit"||u.type==="image")){let E=u.form;if(E==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=u.getAttribute("formaction")||E.getAttribute("action");if(r=x?dn(x,c):null,o=u.getAttribute("formmethod")||E.getAttribute("method")||bu,f=nr(u.getAttribute("formenctype"))||nr(E.getAttribute("enctype"))||ju,h=new FormData(E,u),!vv()){let{name:p,type:S,value:v}=u;if(S==="image"){let R=p?`${p}.`:"";h.append(`${R}x`,"0"),h.append(`${R}y`,"0")}else p&&h.append(p,v)}}else{if(Nu(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=bu,r=null,f=ju,g=u}return h&&f==="text/plain"&&(g=h,h=void 0),{action:r,method:o.toLowerCase(),encType:f,formData:h,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pr(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function xm(u,c,o,r){let f=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${r}`:f.pathname=`${f.pathname}.${r}`:f.pathname==="/"?f.pathname=`_root.${r}`:c&&dn(f.pathname,c)==="/"?f.pathname=`${Eu(c)}/_root.${r}`:f.pathname=`${Eu(f.pathname)}.${r}`,f}async function jv(u,c){if(u.id in c)return c[u.id];try{let o=await import(u.module);return c[u.id]=o,o}catch(o){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Sv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Ev(u,c,o){let r=await Promise.all(u.map(async f=>{let h=c.routes[f.route.id];if(h){let g=await jv(h,o);return g.links?g.links():[]}return[]}));return wv(r.flat(1).filter(Sv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Vh(u,c,o,r,f,h){let g=(x,p)=>o[p]?x.route.id!==o[p].route.id:!0,E=(x,p)=>{var S;return o[p].pathname!==x.pathname||((S=o[p].route.path)==null?void 0:S.endsWith("*"))&&o[p].params["*"]!==x.params["*"]};return h==="assets"?c.filter((x,p)=>g(x,p)||E(x,p)):h==="data"?c.filter((x,p)=>{var v;let S=r.routes[x.route.id];if(!S||!S.hasLoader)return!1;if(g(x,p)||E(x,p))return!0;if(x.route.shouldRevalidate){let R=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((v=o[0])==null?void 0:v.params)||{},nextUrl:new URL(u,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function Tv(u,c,{includeHydrateFallback:o}={}){return _v(u.map(r=>{let f=c.routes[r.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function _v(u){return[...new Set(u)]}function Nv(u){let c={},o=Object.keys(u).sort();for(let r of o)c[r]=u[r];return c}function wv(u,c){let o=new Set;return new Set(c),u.reduce((r,f)=>{let h=JSON.stringify(Nv(f));return o.has(h)||(o.add(h),r.push({key:h,link:f})),r},[])}function gr(){let u=y.useContext(Za);return pr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Cv(){let u=y.useContext(_u);return pr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var yr=y.createContext(void 0);yr.displayName="FrameworkContext";function vr(){let u=y.useContext(yr);return pr(u,"You must render this element inside a <HydratedRouter> element"),u}function Av(u,c){let o=y.useContext(yr),[r,f]=y.useState(!1),[h,g]=y.useState(!1),{onFocus:E,onBlur:x,onMouseEnter:p,onMouseLeave:S,onTouchStart:v}=c,R=y.useRef(null);y.useEffect(()=>{if(u==="render"&&g(!0),u==="viewport"){let k=G=>{G.forEach(F=>{g(F.isIntersecting)})},D=new IntersectionObserver(k,{threshold:.5});return R.current&&D.observe(R.current),()=>{D.disconnect()}}},[u]),y.useEffect(()=>{if(r){let k=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(k)}}},[r]);let L=()=>{f(!0)},H=()=>{f(!1),g(!1)};return o?u!=="intent"?[h,R,{}]:[h,R,{onFocus:Yl(E,L),onBlur:Yl(x,H),onMouseEnter:Yl(p,L),onMouseLeave:Yl(S,H),onTouchStart:Yl(v,L)}]:[!1,R,{}]}function Yl(u,c){return o=>{u&&u(o),o.defaultPrevented||c(o)}}function Rv({page:u,...c}){let o=Vy(),{router:r}=gr(),f=y.useMemo(()=>am(r.routes,u,r.basename),[r.routes,u,r.basename]);return f?o?y.createElement(zv,{page:u,matches:f,...c}):y.createElement(Mv,{page:u,matches:f,...c}):null}function kv(u){let{manifest:c,routeModules:o}=vr(),[r,f]=y.useState([]);return y.useEffect(()=>{let h=!1;return Ev(u,c,o).then(g=>{h||f(g)}),()=>{h=!0}},[u,c,o]),r}function zv({page:u,matches:c,...o}){let r=fn(),{future:f}=vr(),{basename:h}=gr(),g=y.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let E=xm(u,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),x=!1,p=[];for(let S of c)typeof S.route.shouldRevalidate=="function"?x=!0:p.push(S.route.id);return x&&p.length>0&&E.searchParams.set("_routes",p.join(",")),[E.pathname+E.search]},[h,f.unstable_trailingSlashAwareDataRequests,u,r,c]);return y.createElement(y.Fragment,null,g.map(E=>y.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...o})))}function Mv({page:u,matches:c,...o}){let r=fn(),{future:f,manifest:h,routeModules:g}=vr(),{basename:E}=gr(),{loaderData:x,matches:p}=Cv(),S=y.useMemo(()=>Vh(u,c,p,h,r,"data"),[u,c,p,h,r]),v=y.useMemo(()=>Vh(u,c,p,h,r,"assets"),[u,c,p,h,r]),R=y.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let k=new Set,D=!1;if(c.forEach(F=>{var z;let B=h.routes[F.route.id];!B||!B.hasLoader||(!S.some(Z=>Z.route.id===F.route.id)&&F.route.id in x&&((z=g[F.route.id])!=null&&z.shouldRevalidate)||B.hasClientLoader?D=!0:k.add(F.route.id))}),k.size===0)return[];let G=xm(u,E,f.unstable_trailingSlashAwareDataRequests,"data");return D&&k.size>0&&G.searchParams.set("_routes",c.filter(F=>k.has(F.route.id)).map(F=>F.route.id).join(",")),[G.pathname+G.search]},[E,f.unstable_trailingSlashAwareDataRequests,x,r,h,S,c,u,g]),L=y.useMemo(()=>Tv(v,h),[v,h]),H=kv(v);return y.createElement(y.Fragment,null,R.map(k=>y.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...o})),L.map(k=>y.createElement("link",{key:k,rel:"modulepreload",href:k,...o})),H.map(({key:k,link:D})=>y.createElement("link",{key:k,nonce:o.nonce,...D,crossOrigin:D.crossOrigin??o.crossOrigin})))}function Ov(...u){return c=>{u.forEach(o=>{typeof o=="function"?o(c):o!=null&&(o.current=c)})}}var Dv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Dv&&(window.__reactRouterVersion="7.14.2")}catch{}function Uv({basename:u,children:c,unstable_useTransitions:o,window:r}){let f=y.useRef();f.current==null&&(f.current=gy({window:r,v5Compat:!0}));let h=f.current,[g,E]=y.useState({action:h.action,location:h.location}),x=y.useCallback(p=>{o===!1?E(p):y.startTransition(()=>E(p))},[o]);return y.useLayoutEffect(()=>h.listen(x),[h,x]),y.createElement(fv,{basename:u,children:c,location:g.location,navigationType:g.action,navigator:h,unstable_useTransitions:o})}var bm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Me=y.forwardRef(function({onClick:c,discover:o="render",prefetch:r="none",relative:f,reloadDocument:h,replace:g,unstable_mask:E,state:x,target:p,to:S,preventScrollReset:v,viewTransition:R,unstable_defaultShouldRevalidate:L,...H},k){let{basename:D,navigator:G,unstable_useTransitions:F}=y.useContext(Mt),B=typeof S=="string"&&bm.test(S),z=rm(S,D);S=z.to;let Z=Fy(S,{relative:f}),J=fn(),X=null;if(E){let ie=dr(E,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);D!=="/"&&(ie.pathname=ie.pathname==="/"?D:Ht([D,ie.pathname])),X=G.createHref(ie)}let[ee,ce,ze]=Av(r,H),Ue=qv(S,{replace:g,unstable_mask:E,state:x,target:p,preventScrollReset:v,relative:f,viewTransition:R,unstable_defaultShouldRevalidate:L,unstable_useTransitions:F});function He(ie){c&&c(ie),ie.defaultPrevented||Ue(ie)}let Ce=!(z.isExternal||h),I=y.createElement("a",{...H,...ze,href:(Ce?X:void 0)||z.absoluteURL||Z,onClick:Ce?He:c,ref:Ov(k,ce),target:p,"data-discover":!B&&o==="render"?"true":void 0});return ee&&!B?y.createElement(y.Fragment,null,I,y.createElement(Rv,{page:Z})):I});Me.displayName="Link";var Hv=y.forwardRef(function({"aria-current":c="page",caseSensitive:o=!1,className:r="",end:f=!1,style:h,to:g,viewTransition:E,children:x,...p},S){let v=Wl(g,{relative:p.relative}),R=fn(),L=y.useContext(_u),{navigator:H,basename:k}=y.useContext(Mt),D=L!=null&&Qv(v)&&E===!0,G=H.encodeLocation?H.encodeLocation(v).pathname:v.pathname,F=R.pathname,B=L&&L.navigation&&L.navigation.location?L.navigation.location.pathname:null;o||(F=F.toLowerCase(),B=B?B.toLowerCase():null,G=G.toLowerCase()),B&&k&&(B=dn(B,k)||B);const z=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let Z=F===G||!f&&F.startsWith(G)&&F.charAt(z)==="/",J=B!=null&&(B===G||!f&&B.startsWith(G)&&B.charAt(G.length)==="/"),X={isActive:Z,isPending:J,isTransitioning:D},ee=Z?c:void 0,ce;typeof r=="function"?ce=r(X):ce=[r,Z?"active":null,J?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let ze=typeof h=="function"?h(X):h;return y.createElement(Me,{...p,"aria-current":ee,className:ce,ref:S,style:ze,to:g,viewTransition:E},typeof x=="function"?x(X):x)});Hv.displayName="NavLink";var Bv=y.forwardRef(({discover:u="render",fetcherKey:c,navigate:o,reloadDocument:r,replace:f,state:h,method:g=bu,action:E,onSubmit:x,relative:p,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:R,...L},H)=>{let{unstable_useTransitions:k}=y.useContext(Mt),D=Vv(),G=Xv(E,{relative:p}),F=g.toLowerCase()==="get"?"get":"post",B=typeof E=="string"&&bm.test(E),z=Z=>{if(x&&x(Z),Z.defaultPrevented)return;Z.preventDefault();let J=Z.nativeEvent.submitter,X=(J==null?void 0:J.getAttribute("formmethod"))||g,ee=()=>D(J||Z.currentTarget,{fetcherKey:c,method:X,navigate:o,replace:f,state:h,relative:p,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:R});k&&o!==!1?y.startTransition(()=>ee()):ee()};return y.createElement("form",{ref:H,method:F,action:G,onSubmit:r?x:z,...L,"data-discover":!B&&u==="render"?"true":void 0})});Bv.displayName="Form";function Lv(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jm(u){let c=y.useContext(Za);return Oe(c,Lv(u)),c}function qv(u,{target:c,replace:o,unstable_mask:r,state:f,preventScrollReset:h,relative:g,viewTransition:E,unstable_defaultShouldRevalidate:x,unstable_useTransitions:p}={}){let S=Wy(),v=fn(),R=Wl(u,{relative:g});return y.useCallback(L=>{if(yv(L,c)){L.preventDefault();let H=o!==void 0?o:Ql(v)===Ql(R),k=()=>S(u,{replace:H,unstable_mask:r,state:f,preventScrollReset:h,relative:g,viewTransition:E,unstable_defaultShouldRevalidate:x});p?y.startTransition(()=>k()):k()}},[v,S,R,o,r,f,c,u,h,g,E,x,p])}var Gv=0,Yv=()=>`__${String(++Gv)}__`;function Vv(){let{router:u}=jm("useSubmit"),{basename:c}=y.useContext(Mt),o=cv(),r=u.fetch,f=u.navigate;return y.useCallback(async(h,g={})=>{let{action:E,method:x,encType:p,formData:S,body:v}=bv(h,c);if(g.navigate===!1){let R=g.fetcherKey||Yv();await r(R,o,g.action||E,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:S,body:v,formMethod:g.method||x,formEncType:g.encType||p,flushSync:g.flushSync})}else await f(g.action||E,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:S,body:v,formMethod:g.method||x,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:o,flushSync:g.flushSync,viewTransition:g.viewTransition})},[r,f,c,o])}function Xv(u,{relative:c}={}){let{basename:o}=y.useContext(Mt),r=y.useContext(Xt);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),h={...Wl(u||".",{relative:c})},g=fn();if(u==null){h.search=g.search;let E=new URLSearchParams(h.search),x=E.getAll("index");if(x.some(S=>S==="")){E.delete("index"),x.filter(v=>v).forEach(v=>E.append("index",v));let S=E.toString();h.search=S?`?${S}`:""}}return(!u||u===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:Ht([o,h.pathname])),Ql(h)}function Qv(u,{relative:c}={}){let o=y.useContext(fm);Oe(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=jm("useViewTransitionState"),f=Wl(u,{relative:c});if(!o.isTransitioning)return!1;let h=dn(o.currentLocation.pathname,r)||o.currentLocation.pathname,g=dn(o.nextLocation.pathname,r)||o.nextLocation.pathname;return Su(f.pathname,g)!=null||Su(f.pathname,h)!=null}const Sm=/^\/vault\/admin(?=\/|$)/,Em=/^\/vault\/([^/]+)\/admin(?=\/|$)/;function xr(){return typeof window>"u"?!1:Sm.test(window.location.pathname)}function Tm(){if(typeof window>"u"||xr())return null;const u=window.location.pathname.match(Em);if(!u)return null;try{return decodeURIComponent(u[1])}catch{return null}}function Zv(){if(typeof window>"u")return"";const u=window.location.pathname;if(Sm.test(u))return"/vault/admin";const c=u.match(Em);return c?`/vault/${c[1]}/admin`:u==="/admin"||u.startsWith("/admin/")?"/admin":""}let Bn=null,Yt=null,ia=null,on=null,Xh=!1;const Jv=.8,Kv=1e3,$v=3e4;function Fv(){if(typeof window>"u")return;const u=window.location.hash;if(!u||u.length<2)return;const c=new URLSearchParams(u.slice(1)),o=c.get("token");if(!o)return;Bn=o,Yt=null,c.delete("token");const r=c.toString(),f=r.length>0?`#${r}`:"",h=`${window.location.pathname}${window.location.search}${f}`;window.history.replaceState(null,"",h)}function br(){return Bn}function Wv(){Bn=null,Yt=null,on=null,wu()}async function Zl(u){if(typeof window>"u")return{kind:"network-error",message:"no window"};let c;try{c=await fetch(`/admin/vault-admin-token/${encodeURIComponent(u)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(r){return{kind:"network-error",message:r instanceof Error?r.message:String(r)}}if(c.status===401||c.status===403||c.status===404)return{kind:"auth-required",status:c.status};if(!c.ok)return{kind:"network-error",message:`hub returned ${c.status}`};let o;try{o=await c.json()}catch(r){return{kind:"network-error",message:r instanceof Error?r.message:"could not parse mint response"}}return typeof o.token!="string"||o.token.length===0?{kind:"network-error",message:"mint response missing token"}:(Bn=o.token,Yt=o.expires_at?Iv(o.expires_at):null,on=u,_m(),t0(),{kind:"ok",token:o.token})}function Iv(u){const c=Date.parse(u);return Number.isNaN(c)?null:c}async function sr(u){if(Bn){if(Yt===null||Yt>Date.now())return{kind:"ok",token:Bn};Bn=null,Yt=null,wu()}return Zl(u)}async function Pv(u){typeof window>"u"||Bn||await Zl(u).catch(()=>{})}function _m(){if(wu(),Yt===null||on===null||typeof document<"u"&&document.visibilityState==="hidden")return;const u=Date.now(),c=Yt-u;if(c<=0)return;const o=Math.max(Math.floor(c*Jv),Kv);ia=setTimeout(()=>{e0()},o)}function wu(){ia!==null&&(clearTimeout(ia),ia=null)}async function e0(){if(ia=null,on===null)return;const u=await Zl(on);u.kind!=="ok"&&(typeof console<"u"&&console.warn("[vault-admin-spa] proactive token refresh failed; will retry once",u),ia=setTimeout(()=>{ia=null,on!==null&&Zl(on).catch(()=>{})},$v))}function t0(){Xh||typeof document>"u"||(Xh=!0,document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){wu();return}if(on!==null){if(Yt!==null&&Yt<=Date.now()){Zl(on).catch(()=>{});return}_m()}}))}class de extends Error{constructor(c,o,r){super(o),this.status=c,this.errorType=r,this.name="HttpError"}}async function De(u,c,o={}){let r=br();if(!r){const p=await sr(u);if(p.kind!=="ok")throw new de(401,"no admin token — sign in to the hub to refresh");r=p.token}const{headers:f,...h}=o,g=p=>({accept:"application/json",...f??{},authorization:`Bearer ${p}`}),E=await fetch(c,{...h,headers:g(r)});if(E.status!==401)return E;Wv();const x=await sr(u);return x.kind!=="ok"?E:fetch(c,{...h,headers:g(x.token)})}async function Nm(){const u=await fetch("/vaults/list",{headers:{accept:"application/json"}});if(u.status===404)return[];if(!u.ok)throw new de(u.status,`vaults/list fetch failed: ${u.status}`);return(await u.json()).vaults??[]}async function n0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/`);if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function a0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror`);if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function wm(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await it(o));return await o.json()}async function l0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/run-now`,{method:"POST"});if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function i0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/push-now`,{method:"POST"});if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function jr(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth`);if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function u0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth`,{method:"DELETE"});if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function s0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/device-code`,{method:"POST"});if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function c0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/poll`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({polling_id:c})});if(!o.ok&&o.status!==404)throw new de(o.status,await it(o));return await o.json()}async function r0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/pat`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await it(o));return await o.json()}async function Cm(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/installations`);if(!c.ok){const{message:o,errorType:r}=await Sr(c);throw new de(c.status,o,r)}return await c.json()}async function Am(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/repos`);if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function o0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/create-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok){const{message:r,errorType:f}=await Sr(o);throw new de(o.status,r,f)}return await o.json()}async function d0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/auth/github/select-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await it(o));return await o.json()}async function f0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/mirror/import`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await it(o));return await o.json()}async function h0(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/embeddings`);if(!c.ok)throw new de(c.status,await it(c));return await c.json()}async function m0(u,c){const o=await De(u,`/vault/${encodeURIComponent(u)}/.parachute/embeddings`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:c})});if(!o.ok)throw new de(o.status,await it(o));return await o.json()}async function it(u){return(await Sr(u)).message}async function Sr(u){try{const c=await u.text(),o=JSON.parse(c),r=typeof o.error_type=="string"?o.error_type:void 0;if(o.error_description)return{message:o.error_description,errorType:r};if(o.message)return{message:o.message,errorType:r};if(o.error)return{message:o.error,errorType:r};if(c)return{message:c,errorType:r}}catch{}return{message:`${u.status} ${u.statusText}`}}function Rm(u){const c=u.split(".");if(c.length!==3)return null;try{const o=c[1].replace(/-/g,"+").replace(/_/g,"/"),r=o.length%4===0?"":"=".repeat(4-o.length%4),f=atob(o+r),h=JSON.parse(f);return h===null||typeof h!="object"?null:h}catch{return null}}function p0(u){if(!u)return[];const c=Rm(u);if(!c)return[];const o=c.scope;if(typeof o=="string"&&o.length>0)return o.split(/\s+/).filter(f=>f.length>0);const r=c.scopes;return Array.isArray(r)?r.filter(f=>typeof f=="string"&&f.length>0):[]}function Er(u){return p0(br()).includes(`vault:${u}:admin`)}function km(){const u=br();if(!u)return null;const c=Rm(u);if(!c)return null;const o=c.iss;return typeof o!="string"||o.length===0?null:o.replace(/\/$/,"")}let Vl=null,Xl=null;function g0(u){const c=Date.parse(u);return Number.isNaN(c)?null:c}async function y0(){if(typeof window>"u")return{kind:"network-error",message:"no window"};let u;try{u=await fetch("/admin/host-admin-token",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:String(o)}}if(u.status===403)return{kind:"forbidden"};if(u.status===401||u.status===404)return{kind:"auth-required",status:u.status};if(!u.ok)return{kind:"network-error",message:`hub returned ${u.status}`};let c;try{c=await u.json()}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:"could not parse host-admin mint response"}}return typeof c.token!="string"||c.token.length===0?{kind:"network-error",message:"host-admin mint response missing token"}:(Vl=c.token,Xl=c.expires_at?g0(c.expires_at):null,{kind:"ok",token:c.token})}async function Tu(){if(Vl){if(Xl===null||Xl>Date.now())return{kind:"ok",token:Vl};Vl=null,Xl=null}return y0()}function v0(){Vl=null,Xl=null}class Ln extends Error{constructor(c,o,r){super(o),this.status=c,this.disposition=r,this.name="HostAdminError"}}async function Il(u,c={}){let o;const r=await Tu();if(r.kind!=="ok")throw Qh(r);o=r.token;const{headers:f,...h}=c,g=p=>({accept:"application/json",...f??{},authorization:`Bearer ${p}`}),E=await fetch(u,{...h,headers:g(o)});if(E.status!==401)return E;v0();const x=await Tu();if(x.kind!=="ok")throw Qh(x);return fetch(u,{...h,headers:g(x.token)})}function Qh(u){return u.kind==="forbidden"?new Ln(403,"host-admin token mint forbidden — not the hub admin","forbidden"):u.kind==="auth-required"?new Ln(u.status,"no host-admin session — sign in to the hub to manage tokens","auth-required"):new Ln(0,u.message,"network-error")}function Jl(){if(typeof window>"u")return;const u=km();window.location.href=u?`${u}/account/`:"/account/"}async function x0(){let u;try{u=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}})}catch(f){return{kind:"error",message:f instanceof Error?f.message:String(f)}}if(u.status===404)return{kind:"no-hub"};if(!u.ok)return{kind:"error",message:`well-known fetch failed: ${u.status}`};let c;try{c=await u.json()}catch{return{kind:"no-hub"}}const o=Array.isArray(c.vaults)?c.vaults:[],r=[];for(const f of o){const h=f??{};typeof h.name=="string"&&r.push({name:h.name,url:typeof h.url=="string"?h.url:"",version:typeof h.version=="string"?h.version:"",...typeof h.managementUrl=="string"?{managementUrl:h.managementUrl}:{}})}return{kind:"ok",vaults:r}}async function b0(u){var E,x;const c=await fetch(`/admin/vault-admin-token/${encodeURIComponent(u)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!c.ok)throw new Error(`vault-admin-token mint failed: ${c.status}`);const o=await c.json();if(typeof o.token!="string"||o.token.length===0)throw new Error("vault-admin-token mint returned no token");const r=await fetch(`/vault/${encodeURIComponent(u)}/.parachute/usage`,{headers:{accept:"application/json",authorization:`Bearer ${o.token}`}});if(!r.ok)throw new Error(`usage fetch failed: ${r.status}`);const f=await r.json(),h=(E=f.counts)==null?void 0:E.notes,g=(x=f.bytes)==null?void 0:x.total;if(typeof h!="number"||typeof g!="number")throw new Error("usage report malformed");return{notes:h,totalBytes:g}}function j0(u){if(!Number.isFinite(u)||u<0)return"0 B";if(u<1024)return`${Math.round(u)} B`;const c=u/1024;if(c<1024)return`${Math.round(c)} KB`;const o=c/1024;return o<1024?`${o.toFixed(1)} MB`:`${(o/1024).toFixed(1)} GB`}const S0=/^[a-z0-9_-]+$/,E0=new Set(["list","new","assets","admin"]);function T0(u){return u.length===0?null:S0.test(u)?u.length<2||u.length>32?"Vault names must be 2–32 characters long.":E0.has(u)?`"${u}" is a reserved name.`:null:"Lowercase letters, numbers, hyphens, and underscores only."}class cr extends Error{constructor(c,o,r){super(o),this.status=c,this.code=r,this.name="VaultsApiError"}}async function zm(u){let c,o=`${u.status}`;try{const r=await u.json();typeof r.error=="string"&&(c=r.error),o=r.error_description??r.error??o}catch{}return new cr(u.status,o,c)}async function _0(u){const c=await Il("/vaults",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:u})});if(!c.ok)throw await zm(c);const o=await c.json(),r={name:o.name,url:o.url,version:o.version,created:c.status===201};return o.token&&(r.token=o.token),o.token_guidance&&(r.tokenGuidance=o.token_guidance),r}async function N0(u){const c=await Il(`/vaults/${encodeURIComponent(u)}`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:u})});if(!c.ok)throw await zm(c);const o=await c.json();return{name:o.name,cascade:o.cascade,warnings:o.warnings??[]}}const Zh=5e3;function ua({vaultName:u,status:c,onRecovered:o,ensure:r}){const f=c===403;if(y.useEffect(()=>{if(f)return;let x=!1,p=null;const S=async()=>{if(x||typeof document<"u"&&document.visibilityState!=="visible")return;const R=await(r?r():sr(u??""));if(!x){if(R.kind==="ok"){o();return}p=setTimeout(()=>void S(),Zh)}},v=()=>{typeof document>"u"||document.visibilityState==="visible"&&(p!==null&&(clearTimeout(p),p=null),S())};return p=setTimeout(()=>void S(),Zh),typeof document<"u"&&document.addEventListener("visibilitychange",v),()=>{x=!0,p!==null&&clearTimeout(p),typeof document<"u"&&document.removeEventListener("visibilitychange",v)}},[u,o,f,r]),f)return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:["You're signed in, but vault management is restricted to the hub admin."," ",l.jsx("a",{href:"/account/",children:"Go to your account →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"Ask the hub admin if you need access to manage this vault."})]});const h=w0(),g=`/login?next=${encodeURIComponent(h)}`,E=c===404?"This hub doesn't host a vault by that name.":"You're not signed in to the hub.";return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[E," ",l.jsx("a",{href:g,children:"Sign in to the hub →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"After signing in, this page will refresh automatically."})]})}function w0(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function C0(){const[u,c]=y.useState({kind:"loading"}),[o,r]=y.useState({kind:"checking"}),[f,h]=y.useState({}),[g,E]=y.useState({kind:"idle"}),[x,p]=y.useState(""),[S,v]=y.useState({kind:"idle"}),[R,L]=y.useState(0);y.useEffect(()=>{let B=!1;return x0().then(async z=>{if(!B){if(z.kind==="ok"){c({kind:"ok",vaults:z.vaults});return}if(z.kind==="no-hub"){const Z=await Nm().catch(()=>[]);if(B)return;c({kind:"no-hub",names:Z});return}c({kind:"error",message:z.message})}}),()=>{B=!0}},[R]),y.useEffect(()=>{if(u.kind!=="ok"||o.kind==="ok")return;let B=!1;return Tu().then(z=>{B||(z.kind==="ok"?r({kind:"ok"}):z.kind==="forbidden"?r({kind:"banner",status:403}):z.kind==="auth-required"?r({kind:"banner",status:z.status}):r({kind:"banner",status:null}))}),()=>{B=!0}},[u.kind]),y.useEffect(()=>{if(u.kind!=="ok")return;const B=u.vaults.map(Z=>Z.name);if(B.length===0)return;let z=!1;h(Z=>{const J={...Z};for(const X of B)J[X]||(J[X]={kind:"loading"});return J});for(const Z of B)b0(Z).then(J=>{z||h(X=>({...X,[Z]:{kind:"ok",usage:J}}))}).catch(()=>{z||h(J=>({...J,[Z]:{kind:"error"}}))});return()=>{z=!0}},[u]);const H=y.useCallback(()=>{r({kind:"ok"}),h({}),L(B=>B+1)},[]),k=T0(x);async function D(B){if(B.preventDefault(),!(x.length===0||k)){E({kind:"submitting"});try{const z=await _0(x);E({kind:"created",result:z}),p(""),L(Z=>Z+1)}catch(z){if(z instanceof Ln){if(z.disposition==="forbidden"){Jl();return}r({kind:"banner",status:z.status||null}),E({kind:"idle"});return}const Z=z instanceof cr?`${z.status}: ${z.message}`:z instanceof Error?z.message:String(z);E({kind:"error",message:Z})}}}async function G(B){v({kind:"deleting",name:B});try{const z=await N0(B);v({kind:"done",result:z}),h(Z=>{const J={...Z};return delete J[B],J}),L(Z=>Z+1)}catch(z){if(z instanceof Ln){if(z.disposition==="forbidden"){Jl();return}r({kind:"banner",status:z.status||null}),v({kind:"idle"});return}const Z=z instanceof cr||z instanceof Error?z.message:String(z);v({kind:"error",name:B,message:Z})}}if(u.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(u.kind==="no-hub")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsx("p",{style:{margin:"0 0 0.5rem"},children:"This page is being served directly by the vault daemon — there's no hub on this origin, so vault management (create / delete) isn't available here."}),l.jsxs("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:["The hub origin is the front door: open ",l.jsx("code",{children:"/vault/admin/"})," on your hub (port 1939 by default) to manage vaults. Read-only vault names below."]})]}),u.names.length>0?l.jsx("div",{style:{marginTop:"1rem"},children:u.names.map(B=>l.jsxs("a",{href:`/vault/${encodeURIComponent(B)}/admin/`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:B})})}),l.jsx("div",{className:"chev",children:"→"})]},B))}):null]});if(u.kind==="error")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:u.message})}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(B=>B+1),children:"Retry"})]});const F=o.kind==="ok";return l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsxs("h2",{children:["Vaults (",u.vaults.length,")"]})}),o.kind==="banner"?l.jsx(ua,{status:o.status,onRecovered:H,ensure:Tu}):null,l.jsxs("p",{className:"muted",children:["Vaults registered with this hub. ",l.jsx("strong",{children:"Manage"})," opens each vault's own admin page (a full page load — use your browser's back button to return here)."]}),S.kind==="done"?l.jsx(R0,{result:S.result,onDismiss:()=>v({kind:"idle"})}):null,u.vaults.length===0?l.jsxs("div",{className:"empty",children:["No vaults yet",F?" — create your first below.":"."]}):l.jsx("div",{style:{marginTop:"1rem"},children:u.vaults.map(B=>{const z=f[B.name],Z=(z==null?void 0:z.kind)==="ok"?`${z.usage.notes} ${z.usage.notes===1?"note":"notes"} · ${j0(z.usage.totalBytes)}`:(z==null?void 0:z.kind)==="loading"?"…":"—",J=S.kind==="confirming"&&S.name===B.name,X=S.kind==="deleting"&&S.name===B.name,ee=S.kind==="error"&&S.name===B.name?S.message:null;return l.jsxs("div",{className:"vault-row-group",children:[l.jsxs("div",{className:"vault-row",children:[l.jsxs("div",{className:"body",children:[l.jsxs("div",{className:"name",children:[l.jsx("code",{children:B.name}),B.version?l.jsxs("span",{className:"tag muted",title:"Vault version",children:[" ","v",B.version]}):null]}),l.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${B.name}`,children:Z}),ee?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:ee})}):null]}),l.jsxs("div",{className:"vault-row-actions",children:[l.jsx("a",{href:`/vault/${encodeURIComponent(B.name)}/admin/`,children:l.jsx("button",{type:"button",children:"Manage"})}),F?l.jsx("button",{type:"button",className:"secondary",disabled:X,onClick:()=>v(J?{kind:"idle"}:{kind:"confirming",name:B.name,typed:""}),children:X?"Deleting…":"Delete"}):null]})]}),J&&S.kind==="confirming"?l.jsxs("div",{className:"section",style:{marginTop:"0.5rem"},children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:["Deleting ",l.jsx("code",{children:B.name})," permanently destroys its notes and revokes every token, grant, assignment, and invite naming it. Type the vault name to confirm:"]}),l.jsxs("div",{className:"row",style:{display:"flex",gap:"0.5rem"},children:[l.jsx("input",{type:"text","aria-label":`Type ${B.name} to confirm deletion`,placeholder:B.name,value:S.typed,onChange:ce=>v({kind:"confirming",name:B.name,typed:ce.target.value})}),l.jsx("button",{type:"button",disabled:S.typed!==B.name,onClick:()=>void G(B.name),children:"Delete this vault"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Cancel"})]})]}):null]},B.name)})}),F?l.jsxs("div",{className:"section",style:{marginTop:"1.5rem"},children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Create a vault"}),g.kind==="created"?l.jsx(A0,{result:g.result,onDone:()=>E({kind:"idle"})}):l.jsxs("form",{onSubmit:B=>void D(B),children:[g.kind==="error"?l.jsxs("div",{className:"error-banner",style:{marginBottom:"0.5rem"},children:["Couldn't create vault: ",l.jsx("code",{children:g.message})]}):null,l.jsxs("div",{className:"row",style:{display:"flex",gap:"0.5rem"},children:[l.jsx("input",{id:"new-vault-name",type:"text","aria-label":"New vault name",value:x,onChange:B=>p(B.target.value),placeholder:"e.g. work, home, scratch",disabled:g.kind==="submitting"}),l.jsx("button",{type:"submit",disabled:x.length===0||!!k||g.kind==="submitting",children:g.kind==="submitting"?"Creating…":"Create vault"})]}),k?l.jsx("div",{className:"field-error",children:k}):l.jsxs("div",{className:"dim",style:{fontSize:"0.85rem",marginTop:"0.35rem"},children:["Lowercase letters, numbers, hyphens, underscores. Becomes the path under"," ",l.jsx("code",{children:"/vault/<name>"}),"."]})]})]}):null]})}function A0({result:u,onDone:c}){const[o,r]=y.useState(!1),f=async()=>{if(u.token)try{await navigator.clipboard.writeText(u.token),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return u.token?l.jsxs("div",{className:"mint-banner",children:[l.jsxs("h4",{style:{margin:"0 0 0.5rem"},children:["Vault ",l.jsx("code",{children:u.name})," created — access token (shown once)"]}),l.jsxs("p",{className:"muted",children:["A hub-issued JWT scoped ",l.jsxs("code",{children:["vault:",u.name,":admin"]}),". This is the only time it's shown — copy it somewhere safe. You don't need it for the OAuth connect path; for a header-auth token later, mint a scope-narrow one with"," ",l.jsxs("code",{children:["parachute auth mint-token --scope vault:",u.name,":read"]}),"."]}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{children:u.token}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>void f(),children:o?"Copied":"Copy"})]}),l.jsx("div",{className:"actions",style:{marginTop:"0.5rem"},children:l.jsx("button",{type:"button",onClick:c,children:"Done — I've saved the token"})})]}):u.created?l.jsxs("div",{className:"section",children:[l.jsxs("p",{children:["Vault ",l.jsx("code",{children:u.name})," was created",u.tokenGuidance?l.jsxs(l.Fragment,{children:[" ","— ",l.jsx("span",{className:"muted",children:u.tokenGuidance})]}):l.jsx("span",{className:"muted",children:" (no bootstrap token was minted)"}),". Connect over OAuth (no token needed), or mint a scope-narrow header-auth token with"," ",l.jsxs("code",{children:["parachute auth mint-token --scope vault:",u.name,":read"]}),"."]}),l.jsx("button",{type:"button",onClick:c,children:"Done"})]}):l.jsxs("div",{className:"section",children:[l.jsxs("p",{children:["Vault ",l.jsx("code",{children:u.name})," already existed; nothing new was created."]}),l.jsx("button",{type:"button",onClick:c,children:"Continue"})]})}function R0({result:u,onDismiss:c}){const o=u.cascade;return l.jsxs("div",{className:"section",role:"status",style:{marginTop:"0.75rem"},children:[l.jsxs("h3",{style:{margin:"0 0 0.5rem",fontSize:"1rem",fontWeight:500},children:["Vault ",l.jsx("code",{children:u.name})," deleted"]}),l.jsxs("ul",{style:{margin:"0 0 0.5rem"},children:[l.jsxs("li",{children:[o.tokens_revoked," token(s) revoked"]}),l.jsxs("li",{children:[o.grants_rewritten," grant(s) rewritten, ",o.grants_dropped," dropped"]}),l.jsxs("li",{children:[o.user_vaults_removed," user assignment(s) removed"]}),l.jsxs("li",{children:[o.invites_invalidated," invite(s) invalidated"]}),l.jsxs("li",{children:[o.connections_torn_down," connection(s) torn down"]}),l.jsxs("li",{children:["vault data ",o.vault_removed?"removed":"NOT removed","; module"," ",o.module_restarted?"restarted":"not restarted"]})]}),o.orphaned_channels.length>0?l.jsxs("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:["Orphaned channel(s) still reference this vault:"," ",o.orphaned_channels.map((r,f)=>l.jsxs("span",{children:[f>0?", ":"",l.jsx("code",{children:r})]},r))," ","— remove them from the channel module's own admin page."]}):null,u.warnings.length>0?l.jsx("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:u.warnings.map(r=>l.jsxs("div",{children:[l.jsx("code",{children:r.step}),": ",r.detail]},r.step))}):null,l.jsx("button",{type:"button",className:"secondary",onClick:c,children:"Dismiss"})]})}const k0="https://parachute.computer/install#connect-mcp-clients";function Mm(u,c){return`${u.replace(/\/+$/,"")}/vault/${encodeURIComponent(c)}/mcp`}function z0(u,c){return`claude mcp add --transport http parachute-${c} ${Mm(u,c)}`}function M0(){var u;return typeof window>"u"||!((u=window.location)!=null&&u.origin)?null:window.location.origin}function Jh({value:u,label:c="Copy"}){const[o,r]=y.useState(!1);return l.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(u).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},children:o?"Copied ✓":c})}function O0({vaultName:u,origin:c,tokensHref:o}){const r=c??M0(),f=r?Mm(r,u):`/vault/${encodeURIComponent(u)}/mcp`,h=r?z0(r,u):`claude mcp add --transport http parachute-${u} ${f}`;return l.jsxs("div",{className:"mcp-connect-card",children:[l.jsx("h3",{children:"Connect to your AI"}),l.jsxs("p",{className:"muted",children:["Connect an AI client — Claude.ai (add it as a connector), Claude Code, or any MCP client — to the ",l.jsx("code",{children:u})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),l.jsxs("div",{className:"mcp-field",children:[l.jsx("span",{className:"mcp-field-label",children:"MCP endpoint"}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{"data-testid":"mcp-endpoint",children:f}),l.jsx(Jh,{value:f})]}),l.jsx("p",{className:"dim",children:"Claude.ai / ChatGPT: add this URL as a custom connector. You'll sign in to this hub and approve access in the browser."})]}),l.jsxs("div",{className:"mcp-field",children:[l.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{"data-testid":"mcp-add-command",children:h}),l.jsx(Jh,{value:h})]}),l.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)."})]}),l.jsxs("p",{className:"dim",children:["Headless / CI / bearer-token clients that can't do browser OAuth: mint a scope-narrow hub token (",l.jsxs("code",{children:["vault:",u,":read vault:",u,":write"]})," — not admin) on the"," ",o?l.jsx(Me,{to:o,children:"Tokens page"}):l.jsx("span",{children:"Tokens page"})," and pass it as ",l.jsx("code",{children:'--header "Authorization: Bearer <token>"'}),"."]}),l.jsx("p",{className:"dim mcp-docs-link",children:l.jsx("a",{href:k0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]})}function Kh({vaultName:u}={}){const c=Fl(),o=u??c.name,r=u!==void 0,f=r?"/tokens":`/vault/${encodeURIComponent(o??"")}/tokens`,h=r?"/mirror":`/vault/${encodeURIComponent(o??"")}/mirror`,g=r?"/schema":`/vault/${encodeURIComponent(o??"")}/schema`,E=r?"/embeddings":`/vault/${encodeURIComponent(o??"")}/embeddings`,[x,p]=y.useState({kind:"loading"}),[S,v]=y.useState(0),R=y.useCallback(()=>v(k=>k+1),[]);if(y.useEffect(()=>{let k=!1;if(!o){p({kind:"missing"});return}return p({kind:"loading"}),n0(o).then(D=>{k||p({kind:"ok",vault:D})}).catch(D=>{if(k)return;if(D instanceof de){if(D.status===401||D.status===403){p({kind:"auth-required",status:D.status});return}if(D.status===404){p({kind:"missing"});return}p({kind:"error",message:`${D.status}: ${D.message}`});return}const G=D instanceof Error?D.message:String(D);p({kind:"error",message:G})}),()=>{k=!0}},[o,S]),x.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(x.kind==="auth-required")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:o})]}),l.jsx(ua,{vaultName:o??"",status:x.status,onRecovered:R}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]});if(x.kind==="missing")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault not found"}),l.jsxs("p",{className:"muted",children:["No vault named ",l.jsx("code",{children:o})," is registered on this server."]}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]});if(x.kind==="error")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:o})]}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:x.message})}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]});const{vault:L}=x,H=`/vault/${L.name}`;return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:L.name})]}),r?null:l.jsx(Me,{to:"/",className:"muted",children:"← All vaults"})]}),l.jsxs("div",{className:"kv section",children:[l.jsx("div",{children:"Name"}),l.jsx("div",{children:l.jsx("code",{children:L.name})}),L.description?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Description"}),l.jsx("div",{children:L.description})]}):null,l.jsx("div",{children:"Mount"}),l.jsx("div",{children:l.jsx("code",{children:H})}),L.createdAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Created"}),l.jsx("div",{children:l.jsx("code",{children:L.createdAt})})]}):null]}),l.jsx("div",{className:"section",children:l.jsx(O0,{vaultName:L.name,tokensHref:f})}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Stats"}),l.jsxs("div",{className:"stats",children:[l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Notes"}),l.jsx("div",{className:"value",children:L.stats.totalNotes})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Tags"}),l.jsx("div",{className:"value",children:L.stats.tagCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Attachments"}),l.jsx("div",{className:"value",children:L.stats.attachmentCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Links"}),l.jsx("div",{className:"value",children:L.stats.linkCount})]})]})]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Manage"}),l.jsxs("ul",{className:"manage-list",children:[l.jsxs("li",{children:[l.jsx(Me,{to:f,children:"Tokens →"}),l.jsx("span",{className:"dim",children:" mint, list, and revoke hub access tokens (JWTs)"})]}),l.jsxs("li",{children:[l.jsx(Me,{to:h,children:"Git backup →"}),l.jsx("span",{className:"dim",children:" mirror this vault to a git repository on a schedule, or on demand"})]}),l.jsxs("li",{children:[l.jsx(Me,{to:g,children:"Schema →"}),l.jsx("span",{className:"dim",children:" edit tag schemas — fields, indexing, hierarchy, strict validation"})]}),l.jsxs("li",{children:[l.jsx(Me,{to:E,children:"Semantic search →"}),l.jsx("span",{className:"dim",children:" turn embeddings on or off — rank notes by meaning, not just keywords"})]}),l.jsx(D0,{vaultName:L.name})]})]})]})}function D0({vaultName:u}){const c=km();if(!c)return l.jsxs("li",{children:[l.jsx("span",{children:"Permissions →"}),l.jsxs("span",{className:"dim",children:[" ","grants are managed on hub (the OAuth issuer); link will be live when hub ships its permissions UI."]})]});const o=`${c}/hub/permissions?vault=${encodeURIComponent(u)}`;return l.jsxs("li",{children:[l.jsx("a",{href:o,children:"Permissions →"}),l.jsxs("span",{className:"dim",children:[" ","grants are managed on hub (the OAuth issuer); link will be live when hub ships its permissions UI."]})]})}function $h({vaultName:u}={}){const c=Fl(),o=u??c.name,r=u!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,g]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return g({kind:"loading"}),h0(o).then(v=>{S||g({kind:"ok",settings:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){g({kind:"auth-required",status:v.status});return}const R=v instanceof Error?v.message:String(v);g({kind:"error",message:R})}),()=>{S=!0}},[o,E]);const p=y.useCallback(()=>x(S=>S+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Semantic search for ",l.jsx("code",{children:o})]}),l.jsx(Me,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(ua,{vaultName:o,status:h.status,onRecovered:p}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(U0,{vaultName:o,settings:h.settings,onSettings:S=>g({kind:"ok",settings:S})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Semantic search"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]})}function U0({vaultName:u,settings:c,onSettings:o}){const[r,f]=y.useState(c.enabled),[h,g]=y.useState(!1),[E,x]=y.useState(null),[p,S]=y.useState(!1),v=r!==c.enabled,R=y.useCallback(async()=>{g(!0),x(null),S(!1);try{const L=await m0(u,r);o(L),S(!0)}catch(L){x(L instanceof Error?L.message:String(L))}finally{g(!1)}},[u,r,o]);return l.jsxs("div",{children:[c.env_forced?l.jsxs("div",{className:"warn-banner",role:"status",children:["The ",l.jsx("code",{children:"EMBEDDINGS_ENABLED"})," environment variable is forcing semantic search"," ",l.jsx("strong",{children:c.env_override?"on":"off"}),". This setting is still saved, but the environment override wins until it's removed from ",l.jsx("code",{children:"~/.parachute/vault/.env"}),"."]}):null,c.restart_required?l.jsxs("div",{className:"info-banner",role:"status",children:[p?"Saved. ":"","Semantic search is currently ",l.jsx("strong",{children:c.active?"active":"off"})," in the running vault, but the saved setting wants it ",l.jsx("strong",{children:c.effective?"on":"off"}),"."," ",l.jsx("strong",{children:"Restart the vault to apply."})," The provider is loaded once at boot, so the change takes effect on the next restart."]}):p?l.jsxs("div",{className:"info-banner",role:"status",children:["Saved. Semantic search is ",l.jsx("strong",{children:c.active?"active":"off"}),"."]}):null,l.jsxs("div",{className:"section",children:[l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r,disabled:h,onChange:L=>{f(L.target.checked),S(!1)}}),l.jsx("span",{children:"Enable semantic search (embeddings)"})]}),l.jsxs("p",{className:"dim",style:{margin:"0.6rem 0 0"},children:["Semantic search ranks notes by meaning (",l.jsx("code",{children:"query-notes"})," with ",l.jsx("code",{children:"near_text"}),"), not just keywords. Enabling triggers a one-time model download (~",c.model_download_mb,"MB) on the first embed, then embeds every note on write and backfills existing notes in the background. This is a"," ",l.jsx("strong",{children:"host-wide"})," setting — it affects every vault on this server."]})]}),E?l.jsx("div",{className:"error-banner",style:{marginTop:"1rem"},children:l.jsx("code",{children:E})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:R,disabled:!v||h,children:h?"Saving…":r?"Enable semantic search":"Disable semantic search"})})]})}const H0=[{value:"events",label:"On change (default)"},{value:"manual",label:"Manual only"}],B0=[{id:"history",label:"History",subtext:"Local audit trail. Hidden under vault data. Events-driven.",apply:u=>({...u,enabled:!0,location:"internal",sync_mode:"events",auto_commit:!0,auto_push:!1})},{id:"live",label:"External folder mirror",subtext:"Visible folder. Open in Obsidian, push to GitHub. Events-driven.",apply:u=>({...u,enabled:!0,location:"external",sync_mode:"events",auto_commit:!0})},{id:"manual",label:"Manual Export",subtext:"Snapshot on demand. No auto-fire.",apply:u=>({...u,enabled:!0,location:"external",sync_mode:"manual",auto_commit:!0,auto_push:!1})}];function Fh({vaultName:u}={}){const c=Fl(),o=u??c.name,r=u!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,g]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return g({kind:"loading"}),a0(o).then(v=>{S||g({kind:"ok",snapshot:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){g({kind:"auth-required",status:v.status});return}const R=v instanceof Error?v.message:String(v);g({kind:"error",message:R})}),()=>{S=!0}},[o,E]);const p=y.useCallback(()=>x(S=>S+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Backup for ",l.jsx("code",{children:o})]}),l.jsx(Me,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(ua,{vaultName:o,status:h.status,onRecovered:p}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(L0,{vaultName:o,snapshot:h.snapshot,onRefresh:()=>x(S=>S+1),onSnapshot:S=>g({kind:"ok",snapshot:S})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Mirror"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]})}function L0({vaultName:u,snapshot:c,onRefresh:o,onSnapshot:r}){const f=Er(u),[h,g]=y.useState(null),[E,x]=y.useState(null);y.useEffect(()=>{if(!f)return;let v=!1;return jr(u).then(R=>{v||g(R)}).catch(R=>{v||x(R instanceof Error?R.message:String(R))}),()=>{v=!0}},[u,f]);const[p,S]=y.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(q0,{status:c.status,config:c.config,creds:h}),f?null:l.jsxs("div",{className:"warn-banner",children:["You're viewing this page with a read-only token. Saving config + manual run require ",l.jsxs("code",{children:["vault:",u,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to make changes.`]}),f?l.jsx(V0,{vaultName:u,creds:h,credsError:E,onCredsChanged:g,onCredsSaved:()=>{o()},onConfigChanged:o,locationIsExternal:c.config.location==="external"}):null,l.jsxs("div",{className:"section",children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>S(v=>!v),"aria-expanded":p,children:p?"Hide advanced settings":"Advanced settings"}),p?null:l.jsx("p",{className:"dim",style:{margin:"0.6rem 0 0"},children:"Manual exports, run-now, an external (Obsidian-visible) mirror folder, commit settings, and import-from-a-repo. Most owners never need these."})]}),p?l.jsxs(l.Fragment,{children:[l.jsx(G0,{status:c.status,config:c.config,creds:h,canRun:f&&c.status.enabled,vaultName:u,onSnapshot:r}),l.jsx(Y0,{vaultName:u,initial:c.config,readOnly:!f,creds:h,onSaved:v=>{r(v),o()}}),f?l.jsx(F0,{vaultName:u,creds:h}):null]}):null]})}function q0({status:u,config:c,creds:o}){var g;if(!c.enabled)return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsx("strong",{children:"Version history is off."})," This vault isn't saving a local history of changes right now. Open ",l.jsx("strong",{children:"Advanced settings"})," ","below to turn it back on."]});const r=!!(o!=null&&o.active_method),f=c.auto_push&&r,h=(o==null?void 0:o.active_method)==="github_oauth"?(g=o.github_oauth)==null?void 0:g.user_login:void 0;return l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"1rem"},children:[f?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"✓ Version history + backed up off this machine."})," ",h?l.jsxs(l.Fragment,{children:["Every change is saved locally and pushed to GitHub as"," ",l.jsxs("code",{children:["@",h]}),"."]}):l.jsx(l.Fragment,{children:"Every change is saved locally and pushed to your git remote automatically."})]}):l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"✓ Version history — on."})," Your vault automatically saves a full local history of every change. Want an off-machine copy too? Use ",l.jsx("strong",{children:"Back up to GitHub"})," below."]}),u.last_error?l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0"},children:["Heads up — the last backup pass reported an error. See"," ",l.jsx("strong",{children:"Advanced settings"})," below for details."]}):null]})}function G0({status:u,config:c,creds:o,canRun:r,vaultName:f,onSnapshot:h}){const g=c.enabled,[E,x]=y.useState(!1),[p,S]=y.useState(!1),[v,R]=y.useState(null),L=async()=>{x(!0),R(null);try{const G=await l0(f);h(G)}catch(G){R(G instanceof Error?G.message:String(G))}finally{x(!1)}},H=async()=>{S(!0),R(null);try{const G=await i0(f);h(G)}catch(G){R(G instanceof Error?G.message:String(G))}finally{S(!1)}},k=!!(o!=null&&o.active_method)||c.auto_push,D=!r||p||!k;return l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Status"}),l.jsxs("div",{className:"kv",children:[l.jsx("div",{children:"Enabled"}),l.jsx("div",{children:g?l.jsx("code",{children:"yes"}):l.jsx("code",{children:"no"})}),l.jsx("div",{children:"Watch loop"}),l.jsx("div",{children:u.watch_running?l.jsx("code",{children:"running"}):l.jsx("code",{children:"stopped"})}),l.jsx("div",{children:"Path"}),l.jsx("div",{children:u.mirror_path?l.jsx("code",{children:u.mirror_path}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last export"}),l.jsx("div",{children:u.last_export_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:u.last_export_at}),u.last_export_notes_count!==null?l.jsxs("span",{className:"dim",children:[" ","· ",u.last_export_notes_count," note",u.last_export_notes_count===1?"":"s"]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),l.jsx("div",{children:"Last commit"}),l.jsx("div",{children:u.last_commit_sha?l.jsx("code",{children:u.last_commit_sha.slice(0,10)}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last push"}),l.jsx("div",{children:u.last_push_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:u.last_push_at}),u.last_push_sha?l.jsxs("span",{className:"dim",children:[" ","· ",l.jsx("code",{children:u.last_push_sha.slice(0,10)})]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),u.commits_unpushed!==null&&u.commits_unpushed>0?l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsxs("div",{className:"dim",children:[u.commits_unpushed," commit",u.commits_unpushed===1?"":"s"," ready to push"]})]}):null]}),u.last_push_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last push failed:"})," ",l.jsx("code",{children:u.last_push_error})]}):null,u.last_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last error:"})," ",l.jsx("code",{children:u.last_error})]}):null,v?l.jsx("div",{className:"error-banner",style:{marginTop:"1rem"},children:l.jsx("code",{children:v})}):null,l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:L,disabled:!r||E,title:g?r?void 0:"Admin scope required to trigger a manual export.":"Enable the mirror first, then trigger a manual export.",children:E?"Running…":"Run export now"}),l.jsx("button",{type:"button",className:"secondary",onClick:H,disabled:D,title:g?r?k?void 0:"Wire credentials or turn on auto-push to push to a remote.":"Admin scope required to push.":"Enable the mirror first, then push.",children:p?"Pushing…":"Push now"})]})]})}function Y0({vaultName:u,initial:c,readOnly:o,creds:r,onSaved:f}){const[h,g]=y.useState(c),[E,x]=y.useState(!1),[p,S]=y.useState(!1),[v,R]=y.useState(null),[L,H]=y.useState(null),[k,D]=y.useState(0);y.useEffect(()=>{g(c)},[c]);const G=z=>{const Z=z.apply(h);g(Z)},F=z=>{g(Z=>({...Z,sync_mode:z}))},B=async z=>{if(z.preventDefault(),!o){S(!0),R(null),H(null);try{const Z=await wm(u,h);f(Z),D(J=>J+1),setTimeout(()=>D(0),3e3)}catch(Z){if(Z instanceof de){const J=Z.message;R(J);const X=J.toLowerCase();X.includes("external_path")?H("external_path"):X.includes("commit_template")?H("commit_template"):X.includes("safety_net_seconds")?H("safety_net_seconds"):X.includes("sync_mode")?H("sync_mode"):X.includes("auto_push")?H("auto_push"):X.includes("location")?H("location"):H(null)}else R(Z instanceof Error?Z.message:String(Z))}finally{S(!1)}}};return l.jsxs("form",{className:"section",onSubmit:B,children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Configuration"}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.enabled,disabled:o,onChange:z=>g(Z=>({...Z,enabled:z.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Enable mirror"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"Master switch. When off, no export / commit / push runs."})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Presets"}),l.jsxs("p",{className:"dim",style:{marginTop:0,marginBottom:"0.5rem",fontSize:"0.9em"},children:[l.jsx("strong",{children:"History"})," is the default every vault ships with — vault manages the history folder under its own data dir, no path to pick, no remote to configure. ",l.jsx("strong",{children:"External folder mirror"})," +"," ",l.jsx("strong",{children:"Manual Export"})," are for operators who want to point at a visible folder (Obsidian, GitHub)."]}),l.jsx("div",{className:"preset-grid",children:B0.map(z=>l.jsxs("button",{type:"button",className:"preset-card",disabled:o,onClick:()=>G(z),"aria-label":`Apply ${z.label} preset`,children:[l.jsx("strong",{children:z.label}),l.jsx("span",{className:"dim",children:z.subtext})]},z.id))})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Location"}),l.jsxs("div",{children:[l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"location",value:"internal",checked:h.location==="internal",disabled:o,onChange:()=>g(z=>({...z,location:"internal"}))}),l.jsxs("span",{children:["Internal ",l.jsx("span",{className:"dim",children:"— hidden under vault data dir"})]})]}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"location",value:"external",checked:h.location==="external",disabled:o,onChange:()=>g(z=>({...z,location:"external"}))}),l.jsxs("span",{children:["External ",l.jsx("span",{className:"dim",children:"— operator-picked path"})]})]})]})]}),h.location==="external"?l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"external-path",children:"External path"}),l.jsx("input",{id:"external-path",type:"text",value:h.external_path??"",disabled:o,onChange:z=>g(Z=>({...Z,external_path:z.target.value.length>0?z.target.value:null})),placeholder:"/Users/you/Documents/vault-mirror","aria-invalid":L==="external_path"}),l.jsxs("div",{className:"warn-banner",style:{marginTop:"0.5rem"},role:"alert",children:["Path must exist AND be a git repo (run ",l.jsx("code",{children:"git init"})," first if needed)."]})]}):null,l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"sync-mode-select",children:"Sync mode"}),l.jsx("select",{id:"sync-mode-select",value:h.sync_mode,disabled:o,onChange:z=>F(z.target.value),children:H0.map(z=>l.jsx("option",{value:z.value,children:z.label},z.value))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:h.sync_mode==="manual"?'No auto-fire. Exports only run when you click "Run export now" (or run `parachute-vault export` from the CLI).':"Every change to a note, tag, or attachment triggers an export within ~500ms. A background safety check runs hourly to catch anything missed."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_commit,disabled:o,onChange:z=>g(Z=>({...Z,auto_commit:z.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Commit after each export"]}),h.auto_commit?null:l.jsx("p",{className:"hint",style:{marginTop:"0.25rem",fontSize:"0.85em"},children:"Note: the export cursor still advances after each pass. Subsequent runs only re-export notes written since the last pass — even when triggered manually."})]}),h.location==="external"||r!=null&&r.active_method?l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_push,disabled:o,onChange:z=>g(Z=>({...Z,auto_push:z.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Push after each commit"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:"When credentials are configured, vault can push the mirror's commits to your remote regardless of whether the mirror folder lives under vault's data dir or somewhere visible."}),h.auto_push?r!=null&&r.active_method?l.jsxs("div",{className:"info-banner",style:{marginTop:"0.5rem"},role:"status",children:[r.active_method==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:["Will push to ",l.jsxs("code",{children:["@",r.github_oauth.user_login]})," on GitHub."]}):r.active_method==="pat"&&r.pat?l.jsxs(l.Fragment,{children:["Will push using saved credential: ",l.jsx("code",{children:r.pat.label}),"."]}):l.jsx(l.Fragment,{children:"Will push using saved credential."})," ","Failed pushes are logged but won't crash the export."]}):l.jsxs("div",{className:"warn-banner",style:{marginTop:"0.5rem"},role:"alert",children:["Auto-push needs git credentials. Either connect GitHub in the"," ",l.jsx("strong",{children:"Back up to GitHub"})," section above, or paste a Personal Access Token + remote URL there. Failed pushes are logged but won't crash the export."]}):null]}):null,l.jsx("div",{className:"form-row",children:l.jsxs("button",{type:"button",className:"secondary",onClick:()=>x(z=>!z),children:[E?"Hide":"Show"," advanced"]})}),E?l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"commit-template",children:"Commit template"}),l.jsx("input",{id:"commit-template",type:"text",value:h.commit_template,disabled:o,onChange:z=>g(Z=>({...Z,commit_template:z.target.value})),"aria-invalid":L==="commit_template"}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Supports ",l.jsx("code",{children:"{{date}}"}),", ",l.jsx("code",{children:"{{notes_changed}}"}),","," ",l.jsx("code",{children:"{{plural}}"}),", ",l.jsx("code",{children:"{{first_note_title}}"}),","," ",l.jsx("code",{children:"{{vault_name}}"}),"."]})]}):null,v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,k>0?l.jsx("div",{className:"mint-banner",style:{padding:"0.75rem 1rem",marginBottom:"1rem"},role:"status",children:"Saved."}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:o||p,children:p?"Saving…":"Save"})})]})}function V0({vaultName:u,creds:c,credsError:o,onCredsChanged:r,onCredsSaved:f,onConfigChanged:h,locationIsExternal:g}){var ye;const[E,x]=y.useState(!1),[p,S]=y.useState(!1),[v,R]=y.useState(!1),[L,H]=y.useState(!1),[k,D]=y.useState(null),[G,F]=y.useState(null),[B,z]=y.useState(null),[Z,J]=y.useState(!1),[X,ee]=y.useState(null),[ce,ze]=y.useState(null),[Ue,He]=y.useState(0),Ce=(c==null?void 0:c.active_method)==="github_oauth"&&!!c.github_oauth;y.useEffect(()=>{if(!Ce){ee(null),ze(null);return}let $=!1;return Cm(u).then(j=>{$||(ee(j),ze(null))}).catch(j=>{$||ze(j instanceof Error?j.message:String(j))}),()=>{$=!0}},[u,Ce,Ue]);const I=()=>He($=>$+1),ie=(c==null?void 0:c.active_method)!==null&&(c==null?void 0:c.active_method)!==void 0,M=async()=>{if(confirm("Disconnect git remote credentials? Auto-push will stop working until you reconnect.")){H(!0),D(null);try{const $=await u0(u);r($),z(null)}catch($){D($ instanceof Error?$.message:String($))}finally{H(!1)}}},K=async()=>{J(!0),D(null);try{await wm(u,{enabled:!0}),z(!0),h()}catch($){D($ instanceof Error?$.message:String($))}finally{J(!1)}},ne=()=>{x(!1),jr(u).then($=>r($)).catch(()=>{})};return l.jsxs("div",{className:"section",id:"git-remote-section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:ie?"Backed up to a git remote":"Back up to GitHub"}),l.jsx("p",{className:"dim",style:{marginTop:0},children:ie?l.jsxs(l.Fragment,{children:["Your vault pushes its history to an off-machine git remote. Credentials are stored on this server with ",l.jsx("code",{children:"0600"})," file permissions — never sent to GitHub or any third party."]}):l.jsxs(l.Fragment,{children:["Keep an off-machine copy: push your vault's history to GitHub (or any HTTPS git host). Credentials are stored on this server with"," ",l.jsx("code",{children:"0600"})," file permissions, never sent to a third party."]})}),!g&&!(c!=null&&c.active_method)?l.jsx("div",{className:"info-banner",style:{marginBottom:"0.75rem"},role:"status",children:"Internal mirrors live under the vault's data directory. To push them to a remote, paste a Personal Access Token + remote URL below — that wires the remote and turns on auto-push automatically."}):null,o?l.jsxs("div",{className:"error-banner",role:"alert",children:["Could not load credential status: ",l.jsx("code",{children:o})]}):null,ie?l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"Status"}),l.jsx("div",{children:(c==null?void 0:c.active_method)==="github_oauth"&&c.github_oauth?l.jsxs(l.Fragment,{children:["Connected to ",l.jsxs("code",{children:["@",c.github_oauth.user_login]})," on GitHub"]}):(c==null?void 0:c.active_method)==="pat"&&c.pat?l.jsxs(l.Fragment,{children:["Custom credential: ",l.jsx("code",{children:c.pat.label})]}):null}),(c==null?void 0:c.active_method)==="github_oauth"&&c.github_oauth?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Token"}),l.jsxs("div",{children:[l.jsx("code",{children:c.github_oauth.token_preview})," ",l.jsxs("span",{className:"dim",children:["· scope ",c.github_oauth.scope||"—"," · authorized"," ",c.github_oauth.authorized_at.slice(0,10)]})]})]}):null,(c==null?void 0:c.active_method)==="pat"&&c.pat?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Remote"}),l.jsx("div",{children:l.jsx("code",{children:c.pat.remote_url})}),l.jsx("div",{children:"Token"}),l.jsx("div",{children:l.jsx("code",{children:c.pat.token_preview})})]}):null]}):l.jsx("p",{className:"dim",children:"Not connected. Auto-push won't work until you connect. Personal Access Token is the universal path (works with GitHub, GitLab, Gitea, Bitbucket, anything that takes an HTTPS token); the GitHub shortcut just saves a step for GitHub users."}),Ce&&ce?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginBottom:"0.75rem"},children:["Couldn't check the GitHub App install state:"," ",l.jsx("code",{children:ce})," ",l.jsx("button",{type:"button",className:"secondary",onClick:I,children:"Retry"})]}):null,Ce&&!X&&!ce?l.jsx("p",{className:"dim",children:"Checking GitHub App installation…"}):null,Ce&&X&&!X.installed?l.jsx(Om,{install:X,onRecheck:I}):null,Ce&&X&&X.installed?l.jsxs("div",{style:{marginBottom:"0.75rem"},children:[l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"App installed on"}),l.jsx("div",{children:X.installations.map($=>l.jsxs("div",{children:[l.jsx("code",{children:$.account_login})," ",l.jsxs("span",{className:"dim",children:["(",$.account_type==="Organization"?"organization":"user"," ·"," ",$.repository_selection==="selected"?"Selected repos only":"All repos",")"]})]},$.id))})]}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>S(!0),children:"Choose repository…"}),l.jsx("a",{href:X.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]})]}):null,k?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:k})}):null,B===!0?l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"History is on ✓"})," — this vault keeps a local git history of every change, ready to push once a repository is wired."," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>z(null),"aria-label":"Dismiss history note",children:"Dismiss"})]}):null,B==="left_disabled"?l.jsxs("div",{className:"info-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"Version history is still off for this vault"})," (it was switched off earlier, so we didn't flip it behind your back). Backups push the vault's history — turn it on to start recording changes."," ",l.jsx("button",{type:"button",onClick:K,disabled:Z,children:Z?"Turning on…":"Turn on history now"})]}):null,B===!1?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginBottom:"0.75rem"},children:["We tried to turn on version history for this vault but it didn't start — see ",l.jsx("strong",{children:"Advanced settings → Status"})," for the error."]}):null,G?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Credentials saved."})," ",(()=>{const $=G,j=$.initial_push.fired&&$.initial_push.pushed?$.initial_push.sha:void 0,N=$.initial_push.fired&&!$.initial_push.pushed?$.initial_push.error:void 0;return $.auto_push_was_already_enabled?j?l.jsxs(l.Fragment,{children:["Auto-push was already on; just pushed"," ",l.jsx("code",{children:j.slice(0,10)}),"."]}):N?l.jsx(l.Fragment,{children:"Auto-push was already on; the push attempt failed — see Advanced settings → Status for details."}):l.jsx(l.Fragment,{children:"Auto-push was already on; nothing to push right now."}):$.auto_push_enabled?j?l.jsxs(l.Fragment,{children:["Auto-push enabled and the first push landed"," ",l.jsx("code",{children:j.slice(0,10)}),". Your next commit will push to the remote too."]}):N?l.jsx(l.Fragment,{children:"Auto-push enabled. The initial push attempt failed — see Advanced settings → Status for the error."}):l.jsx(l.Fragment,{children:"Auto-push enabled. Your next commit will push to the remote."}):l.jsx(l.Fragment,{children:"Credentials wired. Auto-push remains off; flip it on in Advanced settings → Configuration to push commits automatically."})})()," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>F(null),style:{marginLeft:"0.5rem"},"aria-label":"Dismiss",children:"Dismiss"})]}):null,l.jsx("div",{className:"actions",children:ie?l.jsx("button",{type:"button",className:"secondary",onClick:M,disabled:L,children:L?"Disconnecting…":"Disconnect"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>R(!0),children:"Use Personal Access Token"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>x(!0),children:"Connect GitHub (one-click for GitHub users)"})]})}),l.jsx(X0,{install:X}),E?l.jsx(Wh,{vaultName:u,mode:"connect",onClose:ne,onHistory:z,onConnected:($,j)=>{r($),j&&(F(j),f(j)),x(!1)}}):null,p&&Ce?l.jsx(Wh,{vaultName:u,mode:"choose-repo",initialLogin:((ye=c==null?void 0:c.github_oauth)==null?void 0:ye.user_login)??"",onClose:()=>S(!1),onHistory:z,onConnected:($,j)=>{r($),j&&(F(j),f(j)),S(!1)}}):null,v?l.jsx($0,{vaultName:u,onClose:()=>R(!1),onSaved:$=>{r($),F($),z($.history_enabled),f($),R(!1)}}):null]})}function Om({install:u,onRecheck:c}){return l.jsxs("div",{className:"info-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsxs("p",{style:{marginTop:0},children:[l.jsx("strong",{children:"Authorized ✓ — one step left: install the app so it can reach your repos."})," ","Authorizing told GitHub who you are; installing picks which repositories the app may touch. Until then it can't see any of your private repos."]}),l.jsxs("div",{className:"actions",style:{marginBottom:"0.5rem"},children:[l.jsx("a",{href:u.install_url,target:"_blank",rel:"noreferrer",style:{fontWeight:600},children:"Install on GitHub →"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,children:"I've installed it — check again"})]}),l.jsx("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:"Keeping vaults in an organization? Install the app on that org too — the same install link works for every account, as many times as you need."})]})}function X0({install:u}){const[c,o]=y.useState(!1);return l.jsxs("div",{style:{marginTop:"1rem"},children:[l.jsxs("p",{className:"dim",style:{marginBottom:"0.5rem",fontSize:"0.9em"},children:[u?u.app.is_shared_default?l.jsxs(l.Fragment,{children:["Using the shared Parachute GitHub App (",l.jsx("code",{children:u.app.slug}),")."]}):l.jsxs(l.Fragment,{children:["Using your own GitHub App (",l.jsx("code",{children:u.app.slug}),")."]}):l.jsx(l.Fragment,{children:'"Connect GitHub" uses the shared Parachute GitHub App by default.'})," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(r=>!r),"aria-expanded":c,children:c?"Hide":"Use your own GitHub App"})]}),c?l.jsxs("div",{className:"info-banner",role:"note",children:[l.jsx("p",{style:{marginTop:0},children:"You don't have to trust the shared app: register your own GitHub App and point this vault at it. Your tokens are then minted by an app only you control — your own rate-limit budget, your own blast radius. Taking responsibility for your own data is the point of self-hosting; this makes it one form away."}),l.jsxs("p",{style:{marginBottom:"0.35rem"},children:[l.jsx("strong",{children:"Register the app"})," (GitHub → Settings → Developer settings → GitHub Apps → New GitHub App):"]}),l.jsxs("ul",{style:{marginTop:0},children:[l.jsxs("li",{children:["Repository permissions: ",l.jsx("strong",{children:"Contents — Read and write"}),". Nothing else."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Enable Device Flow"}),' (checkbox under "Identifying and authorizing users").']}),l.jsxs("li",{children:[l.jsx("strong",{children:'Uncheck "Expire user authorization tokens"'})," — an unattended backup daemon can't babysit 8-hour tokens."]}),l.jsx("li",{children:"Webhook: inactive. Callback URL: anything (device flow ignores it)."}),l.jsxs("li",{children:[l.jsx("strong",{children:"Don't generate a private key"})," — Parachute never uses one, and an app with no key can't mint installation tokens behind your back. We recommend against creating one at all."]})]}),l.jsxs("p",{style:{marginBottom:"0.35rem"},children:[l.jsx("strong",{children:"Point this vault at it"})," — set both env vars as a pair in the vault's ",l.jsx("code",{children:".env"}),", then restart the vault:"]}),l.jsx("pre",{style:{margin:"0 0 0.5rem"},children:l.jsx("code",{children:`PARACHUTE_GITHUB_CLIENT_ID=<your app's client ID>
|
|
61
|
+
PARACHUTE_GITHUB_APP_SLUG=<your app's URL slug>`})}),l.jsx("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:"Both together — the client ID mints the tokens, the slug builds the install link; mixing apps breaks the connect flow. Then disconnect and reconnect GitHub here to mint tokens from your app."})]}):null]})}function Wh({vaultName:u,mode:c,initialLogin:o,onClose:r,onConnected:f,onHistory:h}){const[g,E]=y.useState(c==="choose-repo"?{kind:"probing",user:{login:o??""}}:{kind:"starting"}),[x,p]=y.useState(Date.now()),S=y.useRef(!1),v=g.kind==="polling";y.useEffect(()=>{if(!v)return;const k=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(k)},[v]),y.useEffect(()=>()=>{S.current=!0},[]),y.useEffect(()=>{if(g.kind!=="starting")return;let k=!1;return s0(u).then(D=>{k||E({kind:"polling",code:D,pollIntervalMs:Math.max(D.interval,1)*1e3,startedAt:Date.now()})}).catch(D=>{k||E({kind:"error",message:D instanceof Error?D.message:String(D)})}),()=>{k=!0}},[g.kind,u]),y.useEffect(()=>{if(g.kind!=="polling")return;S.current=!1;const k=g.code;let D=!1,G=null,F=g.pollIntervalMs;const B=async()=>{if(!(D||S.current))try{const z=await c0(u,k.polling_id);if(D)return;if(z.state==="granted"){h(z.history_enabled),E({kind:"probing",user:{login:z.user.login}});return}if(z.state==="denied"){E({kind:"error",message:"Authorization denied."});return}if(z.state==="expired"){E({kind:"error",message:"The device code expired. Try again."});return}z.state==="slow_down"&&(F=z.interval*1e3),G=setTimeout(B,F)}catch(z){if(D)return;E({kind:"error",message:z instanceof Error?z.message:String(z)})}};return G=setTimeout(B,F),()=>{D=!0,G&&clearTimeout(G)}},[g,u,h]),y.useEffect(()=>{if(g.kind!=="probing")return;const k=g.user;let D=!1;return Cm(u).then(G=>{D||E(G.installed?{kind:"picker",user:k,install:G}:{kind:"install-needed",user:k,install:G})}).catch(G=>{D||E({kind:"error",message:G instanceof Error?G.message:String(G)})}),()=>{D=!0}},[g,u]);const R=y.useCallback(k=>E({kind:"error",message:k}),[]),L=y.useCallback(()=>{E(k=>k.kind==="picker"?{kind:"probing",user:k.user}:k)},[]),H=async k=>{try{await navigator.clipboard.writeText(k)}catch{}};return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:c==="choose-repo"?"Choose a repository":"Connect GitHub"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Close"})]}),g.kind==="starting"?l.jsx("p",{className:"muted",children:"Requesting device code from GitHub…"}):null,g.kind==="polling"?l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Step 1."})," Open"," ",l.jsx("a",{href:g.code.verification_uri,target:"_blank",rel:"noreferrer",children:g.code.verification_uri})," ","in your browser."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Step 2."})," Enter this code:"]}),l.jsxs("div",{className:"device-code-row",children:[l.jsx("code",{className:"device-code",children:g.code.user_code}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>H(g.code.user_code),children:"Copy"})]}),l.jsxs("p",{className:"dim",children:["Waiting for authorization…"," ",Q0(g.code.expires_in,g.startedAt,x)]})]}):null,g.kind==="probing"?l.jsx("p",{className:"muted",children:"Checking where the app is installed…"}):null,g.kind==="install-needed"?l.jsx(Om,{install:g.install,onRecheck:()=>E({kind:"probing",user:g.user})}):null,g.kind==="picker"?l.jsx(J0,{vaultName:u,user:g.user,install:g.install,onPicked:async(k,D)=>{const G=await d0(u,{owner:k,name:D});h(G.history_enabled);const F=await jr(u);f(F,G)},onError:R,onNotInstalled:L}):null,g.kind==="error"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:g.message})}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>E(c==="choose-repo"?{kind:"probing",user:{login:o??""}}:{kind:"starting"}),children:"Try again"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Close"})]})]}):null]})})}function Q0(u,c,o){const r=Math.floor((o-c)/1e3),f=Math.max(0,u-r),h=Math.floor(f/60),g=f%60;return`${h}:${String(g).padStart(2,"0")} remaining`}function Z0(u){return u.account_type==="Organization"?`https://github.com/organizations/${encodeURIComponent(u.account_login)}/settings/installations/${u.id}`:`https://github.com/settings/installations/${u.id}`}function J0({vaultName:u,user:c,install:o,onPicked:r,onError:f,onNotInstalled:h}){const[g,E]=y.useState(null),[x,p]=y.useState(!1),[S,v]=y.useState(""),[R,L]=y.useState(null),[H,k]=y.useState(!1),[D,G]=y.useState(""),[F,B]=y.useState(!1),[z,Z]=y.useState(!1),[J,X]=y.useState(0);y.useEffect(()=>{let I=!1;return E(null),Am(u).then(ie=>{if(!I){if(!ie.installed){h();return}E(ie.repos),p(!!ie.truncated)}}).catch(ie=>{I||f(ie instanceof Error?ie.message:String(ie))}),()=>{I=!0}},[u,f,h,J]);const ee=(g??[]).filter(I=>S.length===0?!0:I.full_name.toLowerCase().includes(S.toLowerCase())),ce=[];for(const I of ee){const ie=ce[ce.length-1];if(ie&&ie.login===I.account_login)ie.repos.push(I);else{const M=ce.find(K=>K.login===I.account_login);M?M.repos.push(I):ce.push({login:I.account_login,repos:[I]})}}const ze=I=>o.installations.find(ie=>ie.account_login===I),Ue=async(I,ie)=>{L(`${I}/${ie}`);try{await r(I,ie)}catch(M){f(M instanceof Error?M.message:String(M))}finally{L(null)}},He=async()=>{if(D.trim().length!==0){k(!0);try{const I=await o0(u,{name:D.trim(),description:"Parachute Vault mirror",private:!0});await r(I.owner,I.name)}catch(I){I instanceof de&&I.errorType==="app_lacks_admin_permission"?Z(!0):f(I instanceof Error?I.message:String(I))}finally{k(!1)}}},Ce=o.app.is_shared_default||z;return l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:["Authorized as ",l.jsxs("code",{children:["@",c.login]}),". Pick a repository to push the mirror to:"]}),l.jsx("div",{className:"form-row",children:l.jsx("input",{type:"search",placeholder:"Filter by name…",value:S,onChange:I=>v(I.target.value)})}),x?l.jsx("p",{className:"muted",style:{fontSize:"0.85em"},children:"Showing the first 300 repos per account. Use the filter above to narrow down — or paste the clone URL directly via Personal Access Token if your repo isn't here."}):null,g===null?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,g!==null?l.jsxs("div",{className:"repo-list",children:[ee.length===0&&S.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',S,'".']}):null,ee.length===0&&S.length===0&&g.length===0?l.jsx("p",{className:"dim",children:`The app installation doesn't include any repos yet — pick some via "Change repo access on GitHub" below, then refresh.`}):null,ce.map(I=>{const ie=ze(I.login);return l.jsxs("div",{children:[l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0.25rem"},children:[l.jsx("strong",{children:I.login}),ie?l.jsxs(l.Fragment,{children:[" ","·"," ",ie.account_type==="Organization"?"organization":"user"," ","·"," ",ie.repository_selection==="selected"?"Selected repos only":"All repos"]}):null]}),I.repos.map(M=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>Ue(M.owner,M.name),disabled:R!==null,children:[l.jsxs("span",{children:[l.jsx("strong",{children:M.name}),M.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:M.updated_at.slice(0,10)})]},M.full_name))]},I.login)})]}):null,l.jsxs("div",{className:"actions",style:{marginTop:"0.75rem"},children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>X(I=>I+1),children:"Refresh list"}),l.jsx("a",{href:o.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]}),F?l.jsxs("div",{className:"form-row",style:{marginTop:"0.75rem"},children:[l.jsx("label",{htmlFor:"new-repo-name",children:"New repo name"}),l.jsx("input",{id:"new-repo-name",type:"text",value:D,placeholder:"my-vault-backup",onChange:I=>G(I.target.value)}),Ce?l.jsx(K0,{install:o,suggestedName:D.trim(),onRefresh:()=>X(I=>I+1)}):l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:He,disabled:H||D.trim().length===0,children:H?"Creating…":"Create"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>B(!1),disabled:H,children:"Cancel"})]})]}):l.jsx("div",{className:"actions",style:{marginTop:"0.75rem"},children:l.jsx("button",{type:"button",className:"secondary",onClick:()=>B(!0),children:"+ Create new private repo"})})]})}function K0({install:u,suggestedName:c,onRefresh:o}){const r=c.length>0?`https://github.com/new?name=${encodeURIComponent(c)}`:"https://github.com/new";return l.jsxs("div",{className:"info-banner",role:"note",style:{marginTop:"0.5rem"},children:[l.jsx("p",{style:{marginTop:0},children:u.app.is_shared_default?l.jsxs(l.Fragment,{children:["The Parachute app deliberately can't create repos for you (it only holds the ",l.jsx("em",{children:"Contents"})," permission — creating repos would need admin powers a backup doesn't deserve). Three quick steps instead:"]}):l.jsxs(l.Fragment,{children:["Your GitHub App doesn't have the ",l.jsx("em",{children:"Administration"})," permission needed to create repos. Three quick steps instead:"]})}),l.jsxs("ol",{style:{marginTop:0,marginBottom:"0.5rem"},children:[l.jsxs("li",{children:[l.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:"Create a new repo on GitHub →"})," ",l.jsx("span",{className:"dim",children:"(private; leave it empty — no README or .gitignore)"})]}),l.jsxs("li",{children:["Add it to the app's repo access:"," ",u.installations.length>0?u.installations.map((f,h)=>l.jsxs("span",{children:[h>0?" · ":null,l.jsxs("a",{href:Z0(f),target:"_blank",rel:"noreferrer",children:["configure on ",f.account_login," →"]})]},f.id)):l.jsx("a",{href:u.install_url,target:"_blank",rel:"noreferrer",children:"install the app →"})," ",l.jsx("span",{className:"dim",children:'(skip if the installation already grants "All repos")'})]}),l.jsxs("li",{children:["Come back and"," ",l.jsx("button",{type:"button",className:"secondary",onClick:o,children:"Refresh list"})," ","— then pick it."]})]})]})}function $0({vaultName:u,onClose:c,onSaved:o}){const[r,f]=y.useState(""),[h,g]=y.useState(""),[E,x]=y.useState(""),[p,S]=y.useState(!1),[v,R]=y.useState(null),L=async H=>{H.preventDefault(),S(!0),R(null);try{const k=await r0(u,{token:r.trim(),remote_url:h.trim(),label:E.trim()||void 0});o(k)}catch(k){R(k instanceof Error?k.message:String(k))}finally{S(!1)}};return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:"Use Personal Access Token"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:p,children:"Close"})]}),l.jsxs("p",{className:"dim",children:["Works for any provider that supports HTTPS push with a token in the URL (GitHub, GitLab, Codeberg, Gitea, …). The token is stored with"," ",l.jsx("code",{children:"0600"})," file perms on this server."]}),l.jsxs("form",{onSubmit:L,children:[l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-token",children:"Token"}),l.jsx("input",{id:"pat-token",type:"password",value:r,autoComplete:"off",onChange:H=>f(H.target.value),placeholder:"ghp_… or glpat-… or similar",required:!0})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-url",children:"Remote URL"}),l.jsx("input",{id:"pat-url",type:"url",value:h,onChange:H=>g(H.target.value),placeholder:"https://github.com/owner/repo.git",required:!0}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["We'll embed your token in the URL before saving (using GitHub's"," ",l.jsx("code",{children:"x-access-token"})," convention). The URL you see on disk will carry the token; ensure the file isn't shared."]})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-label",children:"Label (optional)"}),l.jsx("input",{id:"pat-label",type:"text",value:E,onChange:H=>x(H.target.value),placeholder:"GitHub PAT for backup"})]}),v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"submit",disabled:p,children:p?"Validating…":"Validate & save"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:p,children:"Cancel"})]})]})]})})}function F0({vaultName:u,creds:c}){const[o,r]=y.useState(""),[f,h]=y.useState("merge"),[g,E]=y.useState(!1),[x,p]=y.useState(""),[S,v]=y.useState(!0),[R,L]=y.useState({kind:"idle"}),[H,k]=y.useState(""),[D,G]=y.useState(!1),F=(c==null?void 0:c.active_method)==="github_oauth"&&c.github_oauth!==null,B=(c==null?void 0:c.active_method)!==null&&(c==null?void 0:c.active_method)!==void 0,z=f!=="replace"||H.trim()===u,Z=R.kind!=="running"&&o.trim().length>0&&z&&(!g||x.trim().length>0),J=async()=>{L({kind:"running",stage:"cloning"});let ee;g?ee={kind:"pat",token:x.trim()}:B?ee=null:ee={kind:"none"};try{const ce=window.setTimeout(()=>L(Ue=>Ue.kind==="running"?{kind:"running",stage:"importing"}:Ue),1500),ze=await f0(u,{remote_url:o.trim(),mode:f,credentials:ee,enable_sync:S});window.clearTimeout(ce),L({kind:"success",result:ze,remoteUrl:o.trim(),mode:f})}catch(ce){const ze=ce instanceof de?`${ce.status===409?"Already running. ":""}${ce.message}`:ce instanceof Error?ce.message:String(ce);L({kind:"error",message:ze})}},X=()=>{L({kind:"idle"}),k("")};return l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Import from a git repo"}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Pull a vault state from a remote git repo into ",l.jsx("strong",{children:"this"})," vault. Use this to load a vault someone has been mirroring, or to sync a vault between machines you control. The remote must be a Parachute vault export (created by ",l.jsx("code",{children:"parachute-vault export"})," or the mirror's export flow)."]}),l.jsxs("div",{className:"warn-banner",style:{marginBottom:"1rem"},role:"note",children:[l.jsx("strong",{children:"One vault per remote."})," Multiple vaults pushing to the same git repo isn't a supported shape — the last push wins, and vaults that diverge silently overwrite each other. Today's working pattern is one vault per remote. Active two-way sync is a future direction; for now, do exports from one place and imports as snapshots elsewhere."]}),R.kind==="success"?l.jsx(W0,{vaultName:u,result:R.result,remoteUrl:R.remoteUrl,mode:R.mode,onReset:X}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"import-remote-url",children:"Remote URL"}),l.jsx("input",{id:"import-remote-url",type:"text",value:o,placeholder:"https://github.com/aaron/my-vault.git",onChange:ee=>r(ee.target.value),disabled:R.kind==="running"}),F?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:["Or"," ",l.jsx("button",{type:"button",onClick:()=>G(!0),disabled:R.kind==="running",style:{background:"none",border:"none",padding:0,color:"var(--accent)",textDecoration:"underline",cursor:"pointer",fontSize:"inherit"},children:"pick from your GitHub repos"}),"."]}):null,!B&&!g?l.jsx("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:"No saved git credentials. The import will be unauthenticated — works for public repos; private repos will fail with a clear error. Use the one-time credential toggle below if needed."}):null]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Mode"}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"import-mode",value:"merge",checked:f==="merge",onChange:()=>{h("merge"),k("")},disabled:R.kind==="running"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Merge"})," ",l.jsxs("span",{className:"dim",children:["— upsert by id. Notes in the remote get created/updated; any notes that exist only locally ",l.jsx("strong",{children:"survive"}),"."]})]})]}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"import-mode",value:"replace",checked:f==="replace",onChange:()=>h("replace"),disabled:R.kind==="running"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Replace"})," ",l.jsxs("span",{className:"dim",children:["— wipe this vault first, then import. The remote becomes the new source of truth. ",l.jsx("strong",{children:"Destructive."})]})]})]})]}),f==="replace"?l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"error-banner",role:"alert",style:{marginBottom:"0.5rem"},children:[l.jsxs("strong",{children:['Replace will delete every note in vault "',u,'" before importing.']})," To confirm, type the vault name below:"]}),l.jsx("input",{id:"import-confirm-name",type:"text",value:H,placeholder:u,onChange:ee=>k(ee.target.value),disabled:R.kind==="running","aria-label":"Type vault name to confirm"})]}):null,l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:g,onChange:ee=>E(ee.target.checked),disabled:R.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"One-time credential for this import only"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"Use a different Personal Access Token just for this clone, without changing your saved credentials."}),g?l.jsx("input",{id:"import-per-call-pat",type:"password",value:x,placeholder:"ghp_… or similar",onChange:ee=>p(ee.target.value),disabled:R.kind==="running",autoComplete:"off",style:{marginTop:"0.5rem"}}):null]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:S,onChange:ee=>v(ee.target.checked),disabled:R.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"Also sync changes back to this repo"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"Pushes future changes to this repo automatically. Uses the access you provide above."})]}),R.kind==="error"?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:R.message})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:J,disabled:!Z,title:z?o.trim().length===0?"Provide a remote URL.":g&&x.trim().length===0?"Provide a token for one-time credential.":void 0:"Type the vault name to confirm Replace.",children:R.kind==="running"?R.stage==="cloning"?"Cloning…":"Importing…":"Start import"})})]}),D?l.jsx(I0,{vaultName:u,onClose:()=>G(!1),onPicked:ee=>{r(ee),G(!1)}}):null]})}function W0({vaultName:u,result:c,remoteUrl:o,mode:r,onReset:f}){return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"Import succeeded."})," Imported ",c.notes_imported," note",c.notes_imported===1?"":"s",", ",c.tags_imported," tag schema",c.tags_imported===1?"":"s",", ",c.attachments_imported," ","attachment",c.attachments_imported===1?"":"s",r==="replace"&&c.notes_deleted!==void 0?`, wiped ${c.notes_deleted} pre-existing note${c.notes_deleted===1?"":"s"}`:"","."]}),c.warnings.length>0?l.jsxs("details",{style:{marginBottom:"0.75rem"},children:[l.jsxs("summary",{children:[c.warnings.length," warning",c.warnings.length===1?"":"s"," ","(see details)"]}),l.jsx("ul",{style:{marginTop:"0.5rem"},children:c.warnings.map((h,g)=>l.jsx("li",{children:l.jsx("code",{style:{fontSize:"0.85em"},children:h})},g))})]}):null,c.sync_enabled?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Sync enabled."})," Changes to vault ",l.jsx("code",{children:u})," ","now push back to ",l.jsx("code",{children:o})," automatically."]}):c.sync_warning?l.jsxs("div",{className:"info-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsxs("p",{style:{marginTop:0},children:[l.jsx("strong",{children:"Sync not enabled."})," ",c.sync_warning]}),l.jsxs("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:["You can still set up Sync from the"," ",l.jsx("button",{type:"button",onClick:()=>{var h;return(h=document.getElementById("git-remote-section"))==null?void 0:h.scrollIntoView({behavior:"smooth",block:"start"})},style:{background:"none",border:"none",padding:0,color:"var(--accent)",textDecoration:"underline",cursor:"pointer",fontSize:"inherit"},children:"Git remote section"})," ","above."]})]}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",className:"secondary",onClick:f,children:"Run another import"})})]})}function I0({vaultName:u,onClose:c,onPicked:o}){const[r,f]=y.useState(null),[h,g]=y.useState(!1),[E,x]=y.useState(null),[p,S]=y.useState(""),[v,R]=y.useState(null);y.useEffect(()=>{let H=!1;return Am(u).then(k=>{if(!H){if(!k.installed){x(k.install_url),f([]);return}f(k.repos),g(!!k.truncated)}}).catch(k=>{H||R(k instanceof Error?k.message:String(k))}),()=>{H=!0}},[u]);const L=(r??[]).filter(H=>p.length===0?!0:H.full_name.toLowerCase().includes(p.toLowerCase()));return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:"Pick a repo to import from"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,children:"Close"})]}),v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,E?l.jsxs("div",{className:"info-banner",role:"status",children:["The Parachute GitHub App isn't installed on any of your accounts yet, so there are no repos to list."," ",l.jsx("a",{href:E,target:"_blank",rel:"noreferrer",children:"Install it on GitHub →"})," ","then reopen this picker."]}):null,l.jsx("div",{className:"form-row",children:l.jsx("input",{type:"search",placeholder:"Filter by name…",value:p,onChange:H=>S(H.target.value)})}),h?l.jsx("p",{className:"muted",style:{fontSize:"0.85em"},children:"Showing the first 300 repos per account. Use the filter above to narrow down."}):null,r===null&&!v?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,r!==null?l.jsxs("div",{className:"repo-list",children:[L.length===0&&p.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',p,'".']}):null,L.length===0&&p.length===0&&r.length===0&&!E?l.jsx("p",{className:"dim",children:"The app installation doesn't include any repos."}):null,L.map(H=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>o(H.clone_url),children:[l.jsxs("span",{children:[l.jsx("strong",{children:H.name}),H.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:H.updated_at.slice(0,10)})]},H.full_name))]}):null]})})}const P0=["string","integer","number","boolean","array","object","reference"],rr=new Set(["string","integer","boolean","reference"]),Pl=u=>`/vault/${encodeURIComponent(u)}/api/tags`;async function ei(u){try{const c=await u.text(),o=JSON.parse(c);return o.message||o.error||c||`${u.status}`}catch{return`${u.status} ${u.statusText}`}}async function ex(u){const c=await De(u,`${Pl(u)}?include_schema=true`);if(!c.ok)throw new de(c.status,await ei(c));return await c.json()}async function tx(u,c){const o=await De(u,`${Pl(u)}/${encodeURIComponent(c)}`);if(o.status===404)return null;if(!o.ok)throw new de(o.status,await ei(o));return await o.json()}async function nx(u,c){const o=await De(u,`${Pl(u)}/${encodeURIComponent(c)}/effective`);if(!o.ok)throw new de(o.status,await ei(o));return await o.json()}async function ax(u,c,o){const r=await De(u,`${Pl(u)}/${encodeURIComponent(c)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(o)});if(!r.ok)throw new de(r.status,await ei(r));return await r.json()}async function lx(u,c,o){const r=await De(u,`${Pl(u)}/${encodeURIComponent(c)}/conformance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fields:o})});if(!r.ok)throw new de(r.status,await ei(r));return await r.json()}function Ih({vaultName:u}={}){const c=Fl(),o=u??c.name,f=u!==void 0?"/":`/vault/${encodeURIComponent(o??"")}`,[h,g]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[p,S]=y.useState(null);y.useEffect(()=>{let L=!1;if(o)return g({kind:"loading"}),ex(o).then(H=>{L||g({kind:"ok",tags:H})}).catch(H=>{if(!L){if(H instanceof de&&(H.status===401||H.status===403)){g({kind:"auth-required",status:H.status});return}g({kind:"error",message:H instanceof Error?H.message:String(H)})}}),()=>{L=!0}},[o,E]);const v=y.useCallback(()=>x(L=>L+1),[]),R=y.useCallback(()=>x(L=>L+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Schema for ",l.jsx("code",{children:o})]}),l.jsx(Me,{to:f,className:"muted",children:"← Vault detail"})]}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Tag schemas declare the metadata fields notes carry, which fields are indexed (queryable), and the tag hierarchy. Edits write the live schema directly — the same data an AI sees through ",l.jsx("code",{children:"update-tag"}),"."]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(ua,{vaultName:o,status:h.status,onRecovered:v}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsxs("div",{className:"schema-layout",children:[l.jsx(ux,{tags:h.tags,selected:p,onSelect:S}),p?l.jsx(ox,{vaultName:o,tag:p,allTags:h.tags,onSaved:R},p):l.jsx("div",{className:"schema-detail",children:l.jsx("p",{className:"muted",children:"Select a tag to view or edit its schema."})})]}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Schema"}),l.jsx("p",{className:"muted",children:"Missing vault name."})]})}function ix(u){const c=u.fields??{},o=Object.values(c);return{hasSchema:u.description!==null&&u.description!==void 0||o.length>0,indexed:o.filter(r=>r.indexed===!0).length,strict:o.some(r=>r.strict===!0)}}function ux({tags:u,selected:c,onSelect:o}){const r=y.useMemo(()=>[...u].sort((f,h)=>f.name.localeCompare(h.name)),[u]);return l.jsx("div",{className:"schema-taglist",role:"navigation","aria-label":"Tags",children:l.jsxs("ul",{className:"tag-list",children:[r.map(f=>{const h=ix(f);return l.jsx("li",{children:l.jsxs("button",{type:"button",className:`tag-list-item${c===f.name?" selected":""}`,onClick:()=>o(f.name),"aria-current":c===f.name,children:[l.jsx("code",{className:"tag-name",children:f.name}),l.jsxs("span",{className:"tag-meta",children:[l.jsx("span",{className:"dim",children:f.count}),h.hasSchema?l.jsx("span",{className:"badge",children:"schema"}):null,h.indexed>0?l.jsxs("span",{className:"badge",children:[h.indexed," indexed"]}):null,h.strict?l.jsx("span",{className:"badge badge-strict",children:"strict"}):null]})]})},f.name)}),r.length===0?l.jsx("li",{className:"muted",children:"No tags yet."}):null]})})}let sx=0;function Dm(){return`row-${sx++}`}function cx(u){return u?Object.entries(u).map(([c,o])=>({key:Dm(),name:c,spec:{...o}})):[]}function Ph(u){const c={};for(const o of u){const r=o.name.trim();if(!r)continue;const f={};o.spec.type&&(f.type=o.spec.type),o.spec.enum&&o.spec.enum.length>0&&(f.enum=o.spec.enum),o.spec.required&&(f.required=!0),o.spec.cardinality==="many"&&(f.cardinality="many"),o.spec.indexed&&(f.indexed=!0),o.spec.strict&&(f.strict=!0),o.spec.description&&o.spec.description.trim().length>0&&(f.description=o.spec.description.trim()),c[r]=f}return c}const rx=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;function ox({vaultName:u,tag:c,allTags:o,onSaved:r}){const f=Er(u),[h,g]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;return g({kind:"loading"}),Promise.all([tx(u,c),nx(u,c)]).then(([v,R])=>{if(S)return;g({kind:"ok",record:v??{name:c,count:0,description:null,fields:null,relationships:null,parent_names:null,created_at:null,updated_at:null},effective:R})}).catch(v=>{if(!S){if(v instanceof de&&(v.status===401||v.status===403)){g({kind:"auth-required",status:v.status});return}g({kind:"error",message:v instanceof Error?v.message:String(v)})}}),()=>{S=!0}},[u,c,E]);const p=y.useCallback(()=>x(S=>S+1),[]);return h.kind==="loading"?l.jsx("div",{className:"schema-detail",children:l.jsxs("p",{className:"muted",children:["Loading ",c,"…"]})}):h.kind==="auth-required"?l.jsx("div",{className:"schema-detail",children:l.jsx(ua,{vaultName:u,status:h.status,onRecovered:p})}):h.kind==="error"?l.jsx("div",{className:"schema-detail",children:l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})})}):l.jsx(dx,{vaultName:u,tag:c,record:h.record,effective:h.effective,allTags:o,isAdmin:f,onSaved:()=>{x(S=>S+1),r()}})}function dx({vaultName:u,tag:c,record:o,effective:r,allTags:f,isAdmin:h,onSaved:g}){const[E,x]=y.useState(o.description??""),[p,S]=y.useState(()=>cx(o.fields)),[v,R]=y.useState(o.parent_names??[]),[L,H]=y.useState(!1),[k,D]=y.useState(null),[G,F]=y.useState(0),[B,z]=y.useState(null),[Z,J]=y.useState(!1),[X,ee]=y.useState(!1),ce=y.useMemo(()=>{const N=new Map;for(const V of r.indexed_fields)N.set(V.name,V);return N},[r.indexed_fields]),ze=y.useMemo(()=>f.map(N=>N.name).filter(N=>N!==c).sort((N,V)=>N.localeCompare(V)),[f,c]),Ue=y.useMemo(()=>{var Q;const N=new Map(f.map(ae=>[ae.name,ae])),V=[];for(const ae of v){const ue=N.get(ae);(Q=ue==null?void 0:ue.parent_names)!=null&&Q.includes(c)&&V.push(ae)}return V},[v,f,c]),He=y.useMemo(()=>{const N=new Set(Object.entries(o.fields??{}).filter(([,Q])=>Q.indexed===!0).map(([Q])=>Q)),V=new Set(p.filter(Q=>Q.spec.indexed&&Q.name.trim()).map(Q=>Q.name.trim()));for(const Q of V)if(!N.has(Q))return!0;for(const Q of N)if(!V.has(Q))return!0;return!1},[p,o.fields]),Ce=y.useMemo(()=>gx(p),[p]),I=()=>{z(null),ee(!1)},ie=(N,V,Q)=>{S(ae=>ae.map(ue=>ue.key===N?{...ue,name:Q!==void 0?Q:ue.name,spec:{...ue.spec,...V}}:ue)),I()},M=()=>{S(N=>[...N,{key:Dm(),name:"",spec:{type:"string"}}]),I()},K=N=>{S(V=>V.filter(Q=>Q.key!==N)),I()},ne=N=>{R(V=>V.includes(N)?V.filter(Q=>Q!==N):[...V,N]),I()},ye=async()=>{H(!0),D(null);try{const N=Ph(p);await ax(u,c,{description:E.trim().length>0?E.trim():null,fields:Object.keys(N).length>0?N:null,replace_fields:!0,parent_names:v.length>0?v:null}),F(V=>V+1),I(),setTimeout(()=>F(0),3e3),g()}catch(N){N instanceof de?D(N.message):D(N instanceof Error?N.message:String(N))}finally{H(!1)}},$=async N=>{if(N.preventDefault(),!!h){if(Ce.length>0){D(Ce[0]);return}if(D(null),B&&B.violating_notes>0||X){await ye();return}J(!0);try{const V=Ph(p),Q=await lx(u,c,V);if(Q.violating_notes>0){z(Q);return}I(),await ye()}catch(V){D(`Could not check existing notes for conformance (${V instanceof Error?V.message:String(V)}). Click Save again to apply anyway — strict fields are still enforced on write.`),z(null),ee(!0)}finally{J(!1)}}},j=!h;return l.jsxs("form",{className:"schema-detail",onSubmit:$,children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:l.jsx("code",{children:c})}),l.jsxs("span",{className:"dim",children:[o.count," note",o.count===1?"":"s"]})]}),j?l.jsxs("div",{className:"warn-banner",role:"status",children:["You're viewing with a read-only token. Saving requires"," ",l.jsxs("code",{children:["vault:",u,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin session to edit.`]}):null,l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"tag-description",children:"Description"}),l.jsx("textarea",{id:"tag-description",value:E,disabled:j,rows:2,onChange:N=>{x(N.target.value),I()},placeholder:"What this tag means + how to use it (sent to AI clients)."})]}),l.jsxs("fieldset",{className:"schema-fields",children:[l.jsx("legend",{children:"Fields"}),p.length===0?l.jsx("p",{className:"dim",children:"No fields declared. Add one to start a schema."}):null,p.map(N=>{var V;return l.jsx(fx,{row:N,readOnly:j,coDeclarers:N.spec.indexed?(((V=ce.get(N.name.trim()))==null?void 0:V.tags)??[]).filter(Q=>Q!==c):[],onChange:(Q,ae)=>ie(N.key,Q,ae),onRemove:()=>K(N.key)},N.key)}),j?null:l.jsx("button",{type:"button",className:"secondary",onClick:M,children:"+ Add field"})]}),l.jsxs("fieldset",{className:"schema-parents",children:[l.jsx("legend",{children:"Parents (hierarchy)"}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["A note on ",l.jsx("code",{children:c})," inherits the fields of every parent (and their ancestors). Queries for a parent also match this tag."]}),ze.length===0?l.jsx("p",{className:"dim",children:"No other tags to pick as parents yet."}):l.jsx("div",{className:"parent-grid",children:ze.map(N=>l.jsxs("label",{className:"parent-chip",children:[l.jsx("input",{type:"checkbox",checked:v.includes(N),disabled:j,onChange:()=>ne(N)}),l.jsx("code",{children:N})]},N))}),Ue.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginTop:"0.5rem"},children:["Cycle warning: ",l.jsx("code",{children:Ue.join(", ")})," already list(s) ",l.jsx("code",{children:c})," as a parent. A cycle is tolerated at runtime but is almost always a config bug."]}):null]}),l.jsx(hx,{tag:c,effective:r}),l.jsx(mx,{catalog:r.indexed_fields,tag:c}),Ce.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsx("strong",{children:"Fix before saving:"}),l.jsx("ul",{style:{margin:"0.4rem 0 0"},children:Ce.map(N=>l.jsx("li",{children:N},N))})]}):null,He&&!j?l.jsxs("div",{className:"info-banner",role:"status",children:["This save changes which fields are indexed. Vault will rebuild the backing column + index (an ",l.jsx("code",{children:"ALTER TABLE"})," / index build) — on a large vault this can take a moment."]}):null,B&&B.violating_notes>0?l.jsx(px,{report:B,tag:c}):null,k?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:k})}):null,G>0?l.jsx("div",{className:"mint-banner",style:{padding:"0.75rem 1rem",margin:"1rem 0"},role:"status",children:"Saved."}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:j||L||Z,children:L?"Saving…":Z?"Checking existing notes…":B&&B.violating_notes>0||X?"Save anyway":"Save"})})]})}function fx({row:u,readOnly:c,coDeclarers:o,onChange:r,onRemove:f}){const{name:h,spec:g}=u,E=rr.has(g.type??""),x=(g.enum??[]).join(", ");return l.jsxs("div",{className:"field-row",children:[l.jsxs("div",{className:"field-row-main",children:[l.jsx("input",{"aria-label":"Field name",className:"field-name-input",type:"text",value:h,disabled:c,placeholder:"field_name",onChange:p=>r({},p.target.value)}),l.jsxs("select",{"aria-label":"Field type",value:g.type??"",disabled:c,onChange:p=>{const S=p.target.value||void 0,v={type:S};S&&!rr.has(S)&&(v.indexed=!1),r(v)},children:[l.jsx("option",{value:"",children:"(any)"}),P0.map(p=>l.jsx("option",{value:p,children:p},p))]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:g.required===!0,disabled:c,onChange:p=>r({required:p.target.checked})}),"required"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:g.cardinality==="many",disabled:c,onChange:p=>r({cardinality:p.target.checked?"many":"one"})}),"many"]}),l.jsxs("label",{className:"field-flag",title:E?void 0:"Only string / integer / boolean fields can be indexed",children:[l.jsx("input",{type:"checkbox",checked:g.indexed===!0,disabled:c||!E,onChange:p=>r({indexed:p.target.checked})}),"indexed"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:g.strict===!0,disabled:c,onChange:p=>r({strict:p.target.checked})}),"strict"]}),c?null:l.jsx("button",{type:"button",className:"secondary field-remove",onClick:f,"aria-label":`Remove field ${h||"(unnamed)"}`,children:"✕"})]}),l.jsxs("div",{className:"field-row-extra",children:[l.jsx("input",{"aria-label":"Enum values (comma-separated)",type:"text",className:"field-enum-input",value:x,disabled:c,placeholder:"enum values (comma-separated, optional)",onChange:p=>{const S=p.target.value.split(",").map(v=>v.trim()).filter(v=>v.length>0);r({enum:S})}}),l.jsx("input",{"aria-label":"Field description",type:"text",className:"field-desc-input",value:g.description??"",disabled:c,placeholder:"description (optional)",onChange:p=>r({description:p.target.value})})]}),o.length>0?l.jsxs("p",{className:"dim field-codeclarers",children:["Also indexed by: ",o.map(p=>l.jsx("code",{children:p},p)),". Type + indexed are global across all of these — change them together."]}):null]})}function hx({tag:u,effective:c}){const o=new Set(Object.keys(c.fields??{})),r=Object.entries(c.effective_fields);return l.jsxs("div",{className:"schema-effective section",children:[l.jsx("h4",{style:{margin:"0 0 0.5rem"},children:"Effective fields (what a note actually gets)"}),c.effective_parents.length>0?l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Inherits from: ",c.effective_parents.map(f=>l.jsx("code",{children:f},f))]}):l.jsxs("p",{className:"dim",style:{marginTop:0},children:["No parents — effective fields are just ",l.jsx("code",{children:u}),"'s own."]}),r.length===0?l.jsx("p",{className:"dim",children:"No fields (own or inherited)."}):l.jsxs("table",{className:"schema-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Field"}),l.jsx("th",{children:"Type"}),l.jsx("th",{children:"Source"}),l.jsx("th",{children:"Flags"})]})}),l.jsx("tbody",{children:r.map(([f,h])=>{const g=!o.has(f),E=[h.required?"required":null,h.cardinality==="many"?"many":null,h.strict?"strict":null,h.enum&&h.enum.length>0?`enum[${h.enum.length}]`:null].filter(Boolean);return l.jsxs("tr",{children:[l.jsx("td",{children:l.jsx("code",{children:f})}),l.jsx("td",{children:h.type??l.jsx("span",{className:"dim",children:"any"})}),l.jsx("td",{children:g?l.jsx("span",{className:"badge",children:"inherited"}):l.jsx("span",{className:"dim",children:"own"})}),l.jsx("td",{children:E.length>0?E.join(", "):l.jsx("span",{className:"dim",children:"—"})})]},f)})})]})]})}function mx({catalog:u,tag:c}){return l.jsxs("div",{className:"schema-catalog section",children:[l.jsx("h4",{style:{margin:"0 0 0.5rem"},children:"Indexed fields (what's queryable)"}),u.length===0?l.jsx("p",{className:"dim",children:"No indexed fields in this vault yet."}):l.jsxs("table",{className:"schema-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Field"}),l.jsx("th",{children:"Type"}),l.jsx("th",{children:"Declared by"})]})}),l.jsx("tbody",{children:u.map(o=>l.jsxs("tr",{className:o.tags.includes(c)?"row-this-tag":void 0,children:[l.jsx("td",{children:l.jsx("code",{children:o.name})}),l.jsx("td",{children:o.type}),l.jsx("td",{children:o.tags.map(r=>l.jsx("code",{className:r===c?"tag-self":void 0,children:r},r))})]},o.name))})]})]})}function px({report:u,tag:c}){return l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsxs("strong",{children:[u.violating_notes," existing note",u.violating_notes===1?"":"s"," violate this schema."]})," ","They'll be REJECTED on their next write once you tighten"," ",l.jsx("code",{children:u.checked_fields.join(", ")}),".",l.jsx("p",{style:{margin:"0.5rem 0"},children:"Migrate the existing data first with the CLI:"}),l.jsx("pre",{style:{margin:"0 0 0.5rem",whiteSpace:"pre-wrap"},children:l.jsxs("code",{children:["parachute-vault schema migrate-field ",c," <field> --transform …"]})}),u.sample.length>0?l.jsxs("details",{children:[l.jsxs("summary",{children:["Examples (",u.sample.length," of ",u.violating_notes,")"]}),l.jsx("ul",{style:{margin:"0.4rem 0 0"},children:u.sample.map(o=>l.jsxs("li",{children:[l.jsx("code",{children:o.path??o.id}),": ",o.fields.map(r=>r.reason).join(", ")]},o.id))})]}):null,l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0",fontSize:"0.9em"},children:["Click ",l.jsx("strong",{children:"Save anyway"})," to apply the schema regardless — these notes stay readable but reject on edit until migrated."]})]})}function gx(u){const c=[],o=new Set;for(const r of u){const f=r.name.trim();if(f){if(o.has(f)){c.push(`Duplicate field name "${f}".`);continue}o.add(f),r.spec.indexed&&!rx.test(f)&&c.push(`"${f}" can't be indexed — indexed field names must start with a letter or underscore and contain only letters, digits, underscores (max 63 chars).`),r.spec.indexed&&r.spec.type&&!rr.has(r.spec.type)&&c.push(`"${f}" is indexed but type "${r.spec.type}" can't be indexed (use string / integer / boolean).`)}}return c}const yx=[30,90,180,365],em=90,vx=1440*60;function xx(u){if(!u)return null;const c=u.scoped_tags;if(!Array.isArray(c))return null;const o=c.filter(r=>typeof r=="string"&&r.length>0);return o.length>0?o:null}function bx(u){return{jti:u.jti,label:u.subject,scopes:Array.isArray(u.scopes)?u.scopes:[],scoped_tags:xx(u.permissions),expires_at:u.expires_at??null,revoked_at:u.revoked_at??null,created_at:u.created_at}}async function jx(u,c){const o={scope:`vault:${u}:${c.verb}`,expires_in:c.ttlDays*vx,subject:c.label};c.scopedTags.length>0&&(o.permissions={scoped_tags:c.scopedTags});const r=await Il("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)});if(!r.ok)throw new de(r.status,await Cu(r));const f=await r.json();return{jti:f.jti,token:f.token,scope:f.scope,expires_at:f.expires_at??null}}async function Sx(u){const c=`vault:${u}:`,o=[];let r=null;for(let f=0;f<1e3;f++){const h=new URLSearchParams({revoked:"all"});r&&h.set("cursor",r);const g=await Il(`/api/auth/tokens?${h.toString()}`);if(!g.ok)throw new de(g.status,await Cu(g));const E=await g.json(),x=Array.isArray(E.tokens)?E.tokens:[];if(o.push(...x),r=E.next_cursor??null,!r)break}return o.filter(f=>Array.isArray(f.scopes)&&f.scopes.some(h=>h.startsWith(c))).map(bx)}async function Ex(u){const c=await Il("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jti:u})});if(!c.ok)throw new de(c.status,await Cu(c))}async function Tx(u){const c=await De(u,`/vault/${encodeURIComponent(u)}/api/tags`);if(!c.ok)throw new de(c.status,await Cu(c));const o=await c.json();return Array.isArray(o)?o:[]}async function Cu(u){try{const c=await u.text(),o=JSON.parse(c);if(o.error_description)return o.error_description;if(o.message)return o.message;if(o.error)return o.error;if(c)return c}catch{}return`${u.status} ${u.statusText}`}const _x=["read","write","admin"],Nx={30:"30 days",90:"90 days",180:"180 days",365:"1 year (max)"};function wx(u){return u instanceof Ln?u.disposition==="forbidden"?(Jl(),{kind:"auth-required",status:403}):u.disposition==="auth-required"?{kind:"auth-required",status:u.status}:{kind:"error",message:u.message}:u instanceof de&&(u.status===401||u.status===403)?{kind:"auth-required",status:u.status}:{kind:"error",message:u instanceof Error?u.message:String(u)}}function tm({vaultName:u}={}){const c=Fl(),o=u??c.name,r=u!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,g]=y.useState({kind:"loading"}),[E,x]=y.useState(null),[p,S]=y.useState(null),[v,R]=y.useState(0);y.useEffect(()=>{let k=!1;if(o)return g({kind:"loading"}),Sx(o).then(D=>{k||g({kind:"ok",tokens:D})}).catch(D=>{k||g(wx(D))}),()=>{k=!0}},[o,v]);const L=y.useCallback(()=>R(k=>k+1),[]);if(y.useEffect(()=>{if(!E)return;const k=D=>{D.preventDefault(),D.returnValue=""};return window.addEventListener("beforeunload",k),()=>window.removeEventListener("beforeunload",k)},[E]),!o)return l.jsxs("div",{children:[l.jsx("h2",{children:"Tokens"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),r?null:l.jsx(Me,{to:"/",children:"← Back to vaults"})]});const H=Er(o);return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Tokens for ",l.jsx("code",{children:o})]}),l.jsx(Me,{to:f,className:"muted",children:"← Vault detail"})]}),H?null:l.jsxs("div",{className:"warn-banner",children:["You're viewing this page with a read-only token. Mint and revoke require"," ",l.jsxs("code",{children:["vault:",o,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to manage tokens.`]}),E?l.jsx(Cx,{result:E,onDismiss:()=>x(null)}):null,h.kind==="ok"&&H&&!E?l.jsx(Ax,{vaultName:o,onMinted:k=>{x(k),R(D=>D+1)}}):null,l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Existing tokens"}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(ua,{vaultName:o,status:h.status,onRecovered:L}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(Rx,{tokens:h.tokens,allowRevoke:H,confirmingJti:p,onAskConfirm:S,onRevoked:()=>{S(null),R(k=>k+1)}}):null]})]})}function Cx({result:u,onDismiss:c}){const[o,r]=y.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(u.token),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return l.jsxs("div",{className:"mint-banner",children:[l.jsx("h3",{children:"New token (shown once)"}),l.jsx("p",{className:"muted",children:"This is the only time the vault will show this token. Copy it now and store it somewhere safe — a password manager, the operator's notes, paraclaw's secrets store. If you lose it, revoke it and mint a new one."}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{children:u.token}),l.jsx("button",{type:"button",onClick:f,className:"secondary",children:o?"Copied":"Copy"})]}),l.jsx("p",{className:"warn",children:"⚠ Don't dismiss this banner until you've saved the token."}),l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:c,children:"Done — I've saved the token"})})]})}function Ax({vaultName:u,onMinted:c}){const[o,r]=y.useState(""),[f,h]=y.useState("admin"),[g,E]=y.useState(em),[x,p]=y.useState(!1),[S,v]=y.useState(null),[R,L]=y.useState([]),[H,k]=y.useState(null),[D,G]=y.useState(new Set);y.useEffect(()=>{let J=!1;return Tx(u).then(X=>{if(J)return;const ee=X.map(ce=>ce.name).filter(ce=>!ce.includes("/")).sort();L(ee)}).catch(X=>{J||k(X instanceof Error?X.message:String(X))}),()=>{J=!0}},[u]);const F=o.trim(),B=F.length===0,z=J=>{G(X=>{const ee=new Set(X);return ee.has(J)?ee.delete(J):ee.add(J),ee})},Z=async J=>{if(J.preventDefault(),B){v("label required — give the token a recognizable name");return}p(!0),v(null);try{const X=await jx(u,{verb:f,label:F,scopedTags:[...D],ttlDays:g});c(X),r(""),h("admin"),E(em),G(new Set)}catch(X){if(X instanceof Ln&&X.disposition==="forbidden"){Jl();return}v(X instanceof Error?X.message:String(X))}finally{p(!1)}};return l.jsxs("form",{onSubmit:Z,className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Mint a token"}),l.jsx("p",{className:"dim",style:{margin:"0 0 0.85rem"},children:"Issues a hub-signed token (JWT) scoped to this vault. Store it like a password — it's shown once and can't be re-displayed."}),S?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:S})}):null,l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{htmlFor:"mint-label",children:["Label ",l.jsx("span",{className:"dim",children:"(required)"})]}),l.jsx("input",{id:"mint-label",type:"text",value:o,onChange:J=>r(J.target.value),placeholder:"e.g. ci, paraclaw-prod, my-laptop",maxLength:120,required:!0})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"mint-scope",children:"Scope"}),l.jsx("select",{id:"mint-scope",value:f,onChange:J=>h(J.target.value),children:_x.map(J=>l.jsx("option",{value:J,children:J==="read"?"read — query notes only":J==="write"?"write — query + create/update notes":"admin — full control (incl. token mgmt)"},J))}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Issued as ",l.jsxs("code",{children:["vault:",u,":",f]}),". Lower scopes inherit narrower powers."]})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"mint-ttl",children:"Expires after"}),l.jsx("select",{id:"mint-ttl",value:g,onChange:J=>E(Number(J.target.value)),children:yx.map(J=>l.jsx("option",{value:J,children:Nx[J]??`${J} days`},J))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"The token stops working after this. Rotate before it lapses."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:["Tag scope ",l.jsx("span",{className:"dim",children:"(optional)"})]}),H?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Couldn't load tags: ",l.jsx("code",{children:H}),". Token will be unscoped."]}):R.length===0?l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"No root tags in this vault yet — token will see the full vault."}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"tag-picker",children:R.map(J=>l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:D.has(J),onChange:()=>z(J)}),l.jsx("code",{children:J})]},J))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:D.size===0?"Nothing selected — token sees the full vault (unscoped).":`Token limited to: ${[...D].join(", ")}. Sub-tags (e.g. health/food) are reachable when their root is selected.`})]})]}),l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:x||B,children:x?"Minting…":"Mint token"})})]})}function Rx({tokens:u,allowRevoke:c,confirmingJti:o,onAskConfirm:r,onRevoked:f}){return u.length===0?l.jsx("p",{className:"muted",children:"No tokens yet. Mint one above to get started."}):l.jsx("div",{className:"token-list",children:u.map(h=>l.jsx(kx,{token:h,allowRevoke:c,confirming:o===h.jti,onAskConfirm:r,onRevoked:f},h.jti))})}function kx({token:u,allowRevoke:c,confirming:o,onAskConfirm:r,onRevoked:f}){const[h,g]=y.useState(!1),[E,x]=y.useState(null),p=u.revoked_at!==null,S=async()=>{g(!0),x(null);try{await Ex(u.jti),f()}catch(v){if(v instanceof Ln&&v.disposition==="forbidden"){Jl();return}x(v instanceof Error?v.message:String(v)),g(!1)}};return l.jsxs("div",{className:"token-row",children:[l.jsxs("div",{className:"body",children:[l.jsxs("div",{className:"name",children:[l.jsx("strong",{children:u.label??"(unlabeled)"}),l.jsx("code",{className:"dim",children:u.jti}),p?l.jsx("code",{className:"scope-tag",title:"This token has been revoked and no longer works.",children:"revoked"}):null]}),l.jsxs("div",{className:"meta",children:[l.jsx("span",{className:"dim",children:"scopes:"})," ",u.scopes.length>0?u.scopes.map(v=>l.jsx("code",{className:"scope-tag",children:v},v)):l.jsx("span",{className:"dim",children:"(none)"})]}),u.scoped_tags&&u.scoped_tags.length>0?l.jsxs("div",{className:"meta",children:[l.jsx("span",{className:"dim",children:"tags:"})," ",u.scoped_tags.map(v=>l.jsxs("code",{className:"scope-tag tag-pill",children:["#",v]},v))]}):null,l.jsxs("div",{className:"meta dim",children:["created ",u.created_at,u.expires_at?` · expires ${u.expires_at}`:"",p&&u.revoked_at?` · revoked ${u.revoked_at}`:""]}),E?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:E})}):null]}),c&&!p?o?l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:S,disabled:h,children:h?"Revoking…":"Confirm revoke"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>r(null),disabled:h,children:"Cancel"})]}):l.jsx("button",{type:"button",className:"secondary",onClick:()=>r(u.jti),children:"Revoke"}):null]})}function zx(){const[u,c]=y.useState({kind:"loading"});return y.useEffect(()=>{let o=!1;return Nm().then(r=>{o||c({kind:"ok",vaults:r})}).catch(r=>{if(o)return;const f=r instanceof de?`${r.status}: ${r.message}`:r instanceof Error?r.message:String(r);c({kind:"error",message:f})}),()=>{o=!0}},[]),u.kind==="loading"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]}):u.kind==="error"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:u.message})})]}):u.vaults.length===0?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsxs("div",{className:"empty",children:["No vaults yet. Run ",l.jsx("code",{children:"parachute-vault create <name>"})," on the host to create one."]})]}):l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsx("h2",{children:"Vaults"})}),u.vaults.map(o=>l.jsxs(Me,{to:`/vault/${o}`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:o})})}),l.jsx("div",{className:"chev",children:"→"})]},o))]})}function Mx(){const u=xr(),c=u?null:Tm();return l.jsxs("div",{className:"page",children:[l.jsxs("nav",{className:"nav",children:[l.jsxs(Me,{to:"/",className:"brand",children:["Parachute Vault ",l.jsx("span",{className:"sub",children:"admin"})]}),c?l.jsx(Me,{to:"/",children:l.jsx("code",{children:c})}):l.jsx(Me,{to:"/",children:"Vaults"})]}),u?l.jsxs(tr,{children:[l.jsx(nt,{path:"/",element:l.jsx(C0,{})}),l.jsx(nt,{path:"*",element:l.jsx(ar,{})})]}):c?l.jsxs(tr,{children:[l.jsx(nt,{path:"/",element:l.jsx(Kh,{vaultName:c})}),l.jsx(nt,{path:"/tokens",element:l.jsx(tm,{vaultName:c})}),l.jsx(nt,{path:"/mirror",element:l.jsx(Fh,{vaultName:c})}),l.jsx(nt,{path:"/schema",element:l.jsx(Ih,{vaultName:c})}),l.jsx(nt,{path:"/embeddings",element:l.jsx($h,{vaultName:c})}),l.jsx(nt,{path:"*",element:l.jsx(ar,{})})]}):l.jsxs(tr,{children:[l.jsx(nt,{path:"/",element:l.jsx(zx,{})}),l.jsx(nt,{path:"/vault/:name",element:l.jsx(Kh,{})}),l.jsx(nt,{path:"/vault/:name/tokens",element:l.jsx(tm,{})}),l.jsx(nt,{path:"/vault/:name/mirror",element:l.jsx(Fh,{})}),l.jsx(nt,{path:"/vault/:name/schema",element:l.jsx(Ih,{})}),l.jsx(nt,{path:"/vault/:name/embeddings",element:l.jsx($h,{})}),l.jsx(nt,{path:"*",element:l.jsx(ar,{})})]})]})}function ar(){return l.jsxs("div",{className:"empty",children:["404 — back to ",l.jsx(Me,{to:"/",children:"vault"}),"."]})}Fv();const Um=document.getElementById("root");if(!Um)throw new Error("#root not found");function lr(){py.createRoot(Um).render(l.jsx(y.StrictMode,{children:l.jsx(Uv,{basename:Zv(),children:l.jsx(Mx,{})})}))}const nm=Tm();!xr()&&nm?Pv(nm).then(lr,lr):lr();
|