@openparachute/vault 0.7.4 → 0.7.5-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.ts +113 -1
- package/src/mirror-import-jobs.ts +197 -0
- package/src/mirror-import.test.ts +102 -2
- package/src/mirror-import.ts +182 -22
- package/src/mirror-routes.test.ts +222 -3
- package/src/mirror-routes.ts +228 -86
- package/src/routing.ts +22 -6
- package/src/server.ts +62 -1
- package/src/transcription/install-whisper-cpp.test.ts +228 -0
- package/src/transcription/install-whisper-cpp.ts +219 -0
- package/src/transcription/install-whisper-exec.test.ts +244 -0
- package/src/transcription/install-whisper-exec.ts +237 -0
- package/src/transcription/models.test.ts +87 -0
- package/src/transcription/models.ts +191 -0
- package/src/transcription/providers/whisper-cpp.test.ts +218 -0
- package/src/transcription/providers/whisper-cpp.ts +241 -0
- package/src/transcription/resolve-binary.test.ts +131 -0
- package/src/transcription/resolve-binary.ts +111 -0
- package/src/transcription/select.ts +26 -3
- package/web/ui/dist/assets/index-CD4kPSY9.js +61 -0
- package/web/ui/dist/index.html +1 -1
- package/web/ui/dist/assets/index-NvwxfZcu.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 p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).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 s=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(r,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+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:s,type:r,key:p,ref:f!==void 0?f:null,props:h}}return ql.Fragment=c,ql.jsx=o,ql.jsxs=o,ql}var Ch;function cy(){return Ch||(Ch=1,Jc.exports=uy()),Jc.exports}var l=cy(),Kc={exports:{}},ce={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ah;function ry(){if(Ah)return ce;Ah=1;var s=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"),p=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),C=Symbol.iterator;function H(j){return j===null||typeof j!="object"?null:(j=C&&j[C]||j["@@iterator"],typeof j=="function"?j:null)}var B={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||B}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 W(){}W.prototype=G.prototype;function L(j,N,V){this.props=j,this.context=N,this.refs=D,this.updater=V||B}var M=L.prototype=new W;M.constructor=L,k(M,G.prototype),M.isPureReactComponent=!0;var J=Array.isArray;function K(){}var X={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function fe(j,N,V){var Q=V.ref;return{$$typeof:s,type:j,key:N,ref:Q!==void 0?Q:null,props:V}}function He(j,N){return fe(j.type,N,j.props)}function ke(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function ze(j){var N={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return N[V]})}var ie=/\/+/g;function $(j,N){return typeof j=="object"&&j!==null&&j.key!=null?ze(""+j.key):N.toString(36)}function te(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(K,K):(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 z(j,N,V,Q,ae){var se=typeof j;(se==="undefined"||se==="boolean")&&(j=null);var Se=!1;if(j===null)Se=!0;else switch(se){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(j.$$typeof){case s:case c:Se=!0;break;case S:return Se=j._init,z(Se(j._payload),N,V,Q,ae)}}if(Se)return ae=ae(j),Se=Q===""?"."+$(j,0):Q,J(ae)?(V="",Se!=null&&(V=Se.replace(ie,"$&/")+"/"),z(ae,N,V,"",function(Ja){return Ja})):ae!=null&&(ke(ae)&&(ae=He(ae,V+(ae.key==null||j&&j.key===ae.key?"":(""+ae.key).replace(ie,"$&/")+"/")+Se)),N.push(ae)),1;Se=0;var lt=Q===""?".":Q+":";if(J(j))for(var qe=0;qe<j.length;qe++)Q=j[qe],se=lt+$(Q,qe),Se+=z(Q,N,V,se,ae);else if(qe=H(j),typeof qe=="function")for(j=qe.call(j),qe=0;!(Q=j.next()).done;)Q=Q.value,se=lt+$(Q,qe++),Se+=z(Q,N,V,se,ae);else if(se==="object"){if(typeof j.then=="function")return z(te(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 Se}function Z(j,N,V){if(j==null)return j;var Q=[],ae=0;return z(j,Q,"","",function(se){return N.call(V,se,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 ve=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)},F={map:Z,forEach:function(j,N,V){Z(j,function(){N.apply(this,arguments)},V)},count:function(j){var N=0;return Z(j,function(){N++}),N},toArray:function(j){return Z(j,function(N){return N})||[]},only:function(j){if(!ke(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ce.Activity=v,ce.Children=F,ce.Component=G,ce.Fragment=o,ce.Profiler=f,ce.PureComponent=L,ce.StrictMode=r,ce.Suspense=x,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ce.__COMPILER_RUNTIME={__proto__:null,c:function(j){return X.H.useMemoCache(j)}},ce.cache=function(j){return function(){return j.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.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(se in N.key!==void 0&&(ae=""+N.key),N)!ue.call(N,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&N.ref===void 0||(Q[se]=N[se]);var se=arguments.length-2;if(se===1)Q.children=V;else if(1<se){for(var Se=Array(se),lt=0;lt<se;lt++)Se[lt]=arguments[lt+2];Q.children=Se}return fe(j.type,ae,Q)},ce.createContext=function(j){return j={$$typeof:p,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:h,_context:j},j},ce.createElement=function(j,N,V){var Q,ae={},se=null;if(N!=null)for(Q in N.key!==void 0&&(se=""+N.key),N)ue.call(N,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ae[Q]=N[Q]);var Se=arguments.length-2;if(Se===1)ae.children=V;else if(1<Se){for(var lt=Array(Se),qe=0;qe<Se;qe++)lt[qe]=arguments[qe+2];ae.children=lt}if(j&&j.defaultProps)for(Q in Se=j.defaultProps,Se)ae[Q]===void 0&&(ae[Q]=Se[Q]);return fe(j,se,ae)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(j){return{$$typeof:E,render:j}},ce.isValidElement=ke,ce.lazy=function(j){return{$$typeof:S,_payload:{_status:-1,_result:j},_init:ne}},ce.memo=function(j,N){return{$$typeof:g,type:j,compare:N===void 0?null:N}},ce.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(K,ve)}catch(se){ve(se)}finally{N!==null&&V.types!==null&&(N.types=V.types),X.T=N}},ce.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ce.use=function(j){return X.H.use(j)},ce.useActionState=function(j,N,V){return X.H.useActionState(j,N,V)},ce.useCallback=function(j,N){return X.H.useCallback(j,N)},ce.useContext=function(j){return X.H.useContext(j)},ce.useDebugValue=function(){},ce.useDeferredValue=function(j,N){return X.H.useDeferredValue(j,N)},ce.useEffect=function(j,N){return X.H.useEffect(j,N)},ce.useEffectEvent=function(j){return X.H.useEffectEvent(j)},ce.useId=function(){return X.H.useId()},ce.useImperativeHandle=function(j,N,V){return X.H.useImperativeHandle(j,N,V)},ce.useInsertionEffect=function(j,N){return X.H.useInsertionEffect(j,N)},ce.useLayoutEffect=function(j,N){return X.H.useLayoutEffect(j,N)},ce.useMemo=function(j,N){return X.H.useMemo(j,N)},ce.useOptimistic=function(j,N){return X.H.useOptimistic(j,N)},ce.useReducer=function(j,N,V){return X.H.useReducer(j,N,V)},ce.useRef=function(j){return X.H.useRef(j)},ce.useState=function(j){return X.H.useState(j)},ce.useSyncExternalStore=function(j,N,V){return X.H.useSyncExternalStore(j,N,V)},ce.useTransition=function(){return X.H.useTransition()},ce.version="19.2.5",ce}var Rh;function or(){return Rh||(Rh=1,Kc.exports=ry()),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 oy(){return kh||(kh=1,(function(s){function c(z,Z){var ne=z.length;z.push(Z);e:for(;0<ne;){var ve=ne-1>>>1,F=z[ve];if(0<f(F,Z))z[ve]=Z,z[ne]=F,ne=ve;else break e}}function o(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var Z=z[0],ne=z.pop();if(ne!==Z){z[0]=ne;e:for(var ve=0,F=z.length,j=F>>>1;ve<j;){var N=2*(ve+1)-1,V=z[N],Q=N+1,ae=z[Q];if(0>f(V,ne))Q<F&&0>f(ae,V)?(z[ve]=ae,z[Q]=ne,ve=Q):(z[ve]=V,z[N]=ne,ve=N);else if(Q<F&&0>f(ae,ne))z[ve]=ae,z[Q]=ne,ve=Q;else break e}}return Z}function f(z,Z){var ne=z.sortIndex-Z.sortIndex;return ne!==0?ne:z.id-Z.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var p=Date,E=p.now();s.unstable_now=function(){return p.now()-E}}var x=[],g=[],S=1,v=null,C=3,H=!1,B=!1,k=!1,D=!1,G=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function M(z){for(var Z=o(g);Z!==null;){if(Z.callback===null)r(g);else if(Z.startTime<=z)r(g),Z.sortIndex=Z.expirationTime,c(x,Z);else break;Z=o(g)}}function J(z){if(k=!1,M(z),!B)if(o(x)!==null)B=!0,K||(K=!0,ze());else{var Z=o(g);Z!==null&&te(J,Z.startTime-z)}}var K=!1,X=-1,ue=5,fe=-1;function He(){return D?!0:!(s.unstable_now()-fe<ue)}function ke(){if(D=!1,K){var z=s.unstable_now();fe=z;var Z=!0;try{e:{B=!1,k&&(k=!1,W(X),X=-1),H=!0;var ne=C;try{t:{for(M(z),v=o(x);v!==null&&!(v.expirationTime>z&&He());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,C=v.priorityLevel;var F=ve(v.expirationTime<=z);if(z=s.unstable_now(),typeof F=="function"){v.callback=F,M(z),Z=!0;break t}v===o(x)&&r(x),M(z)}else r(x);v=o(x)}if(v!==null)Z=!0;else{var j=o(g);j!==null&&te(J,j.startTime-z),Z=!1}}break e}finally{v=null,C=ne,H=!1}Z=void 0}}finally{Z?ze():K=!1}}}var ze;if(typeof L=="function")ze=function(){L(ke)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,$=ie.port2;ie.port1.onmessage=ke,ze=function(){$.postMessage(null)}}else ze=function(){G(ke,0)};function te(z,Z){X=G(function(){z(s.unstable_now())},Z)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return C},s.unstable_next=function(z){switch(C){case 1:case 2:case 3:var Z=3;break;default:Z=C}var ne=C;C=Z;try{return z()}finally{C=ne}},s.unstable_requestPaint=function(){D=!0},s.unstable_runWithPriority=function(z,Z){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ne=C;C=z;try{return Z()}finally{C=ne}},s.unstable_scheduleCallback=function(z,Z,ne){var ve=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ve+ne:ve):ne=ve,z){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=ne+F,z={id:S++,callback:Z,priorityLevel:z,startTime:ne,expirationTime:F,sortIndex:-1},ne>ve?(z.sortIndex=ne,c(g,z),o(x)===null&&z===o(g)&&(k?(W(X),X=-1):k=!0,te(J,ne-ve))):(z.sortIndex=F,c(x,z),B||H||(B=!0,K||(K=!0,ze()))),z},s.unstable_shouldYield=He,s.unstable_wrapCallback=function(z){var Z=C;return function(){var ne=C;C=Z;try{return z.apply(this,arguments)}finally{C=ne}}}})(Wc)),Wc}var zh;function dy(){return zh||(zh=1,Fc.exports=oy()),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 fy(){if(Mh)return tt;Mh=1;var s=or();function c(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+g+" 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,g,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:v==null?null:""+v,children:x,containerInfo:g,implementation:S}}var p=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,tt.createPortal=function(x,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(c(299));return h(x,g,null,S)},tt.flushSync=function(x){var g=p.T,S=r.p;try{if(p.T=null,r.p=2,x)return x()}finally{p.T=g,r.p=S,r.d.f()}},tt.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(x,g))},tt.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},tt.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var S=g.as,v=E(S,g.crossOrigin),C=typeof g.integrity=="string"?g.integrity:void 0,H=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;S==="style"?r.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:C,fetchPriority:H}):S==="script"&&r.d.X(x,{crossOrigin:v,integrity:C,fetchPriority:H,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},tt.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var S=E(g.as,g.crossOrigin);r.d.M(x,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(x)},tt.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var S=g.as,v=E(S,g.crossOrigin);r.d.L(x,S,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},tt.preloadModule=function(x,g){if(typeof x=="string")if(g){var S=E(g.as,g.crossOrigin);r.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(x)},tt.requestFormReset=function(x){r.d.r(x)},tt.unstable_batchedUpdates=function(x,g){return x(g)},tt.useFormState=function(x,g,S){return p.H.useFormState(x,g,S)},tt.useFormStatus=function(){return p.H.useHostTransitionStatus()},tt.version="19.2.5",tt}var Oh;function hy(){if(Oh)return Ic.exports;Oh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),Ic.exports=fy(),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 my(){if(Dh)return Gl;Dh=1;var s=dy(),c=or(),o=hy();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 p(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 g(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 u=i.alternate;if(u===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===n)return x(i),e;if(u===a)return x(i),t;u=u.sibling}throw Error(r(188))}if(n.return!==a.return)n=i,a=u;else{for(var d=!1,m=i.child;m;){if(m===n){d=!0,n=i,a=u;break}if(m===a){d=!0,a=i,n=u;break}m=m.sibling}if(!d){for(m=u.child;m;){if(m===n){d=!0,n=u,a=i;break}if(m===a){d=!0,a=u,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,C=Symbol.for("react.element"),H=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),He=Symbol.for("react.memo_cache_sentinel"),ke=Symbol.iterator;function ze(e){return e===null||typeof e!="object"?null:(e=ke&&e[ke]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?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 J:return"Suspense";case K:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case L:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case M: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:$(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var te=Array.isArray,z=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ve=[],F=-1;function j(e){return{current:e}}function N(e){0>F||(e.current=ve[F],ve[F]=null,F--)}function V(e,t){F++,ve[F]=e.current,e.current=t}var Q=j(null),ae=j(null),se=j(null),Se=j(null);function lt(e,t){switch(V(se,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(se)}function Ja(e){e.memoizedState!==null&&V(Se,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)),Se.current===e&&(N(Se),Ul._currentValue=ne)}var As,Tr;function qn(e){if(As===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);As=t&&t[1]||"",Tr=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+As+e+Tr}var Rs=!1;function ks(e,t){if(!e||Rs)return"";Rs=!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 R=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){R=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){R=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.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 u=a.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var b=d.split(`
|
|
44
|
+
`),A=m.split(`
|
|
45
|
+
`);for(i=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;if(a===b.length||i===A.length)for(a=b.length-1,i=A.length-1;1<=a&&0<=i&&b[a]!==A[i];)i--;for(;1<=a&&0<=i;a--,i--)if(b[a]!==A[i]){if(a!==1||i!==1)do if(a--,i--,0>i||b[a]!==A[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{Rs=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function Bm(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 ks(e.type,!1);case 11:return ks(e.type.render,!1);case 1:return ks(e.type,!0);case 31:return qn("Activity");default:return""}}function _r(e){try{var t="",n=null;do t+=Bm(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var zs=Object.prototype.hasOwnProperty,Ms=s.unstable_scheduleCallback,Os=s.unstable_cancelCallback,Lm=s.unstable_shouldYield,qm=s.unstable_requestPaint,ht=s.unstable_now,Gm=s.unstable_getCurrentPriorityLevel,Nr=s.unstable_ImmediatePriority,wr=s.unstable_UserBlockingPriority,ni=s.unstable_NormalPriority,Ym=s.unstable_LowPriority,Cr=s.unstable_IdlePriority,Vm=s.log,Xm=s.unstable_setDisableYieldValue,Ka=null,mt=null;function hn(e){if(typeof Vm=="function"&&Xm(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ka,e)}catch{}}var pt=Math.clz32?Math.clz32:Jm,Qm=Math.log,Zm=Math.LN2;function Jm(e){return e>>>=0,e===0?32:31-(Qm(e)/Zm|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 si(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~u,a!==0?i=Gn(a):(d&=m,d!==0?i=Gn(d):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~u,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&u)===0&&(u=i&-i,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:i}function $a(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Km(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 Ds(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 $m(e,t,n,a,i,u){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,A=e.hiddenUpdates;for(n=d&~n;0<n;){var U=31-pt(n),Y=1<<U;m[U]=0,b[U]=-1;var R=A[U];if(R!==null)for(A[U]=null,U=0;U<R.length;U++){var O=R[U];O!==null&&(O.lane&=-536870913)}n&=~Y}a!==0&&Rr(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(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:Us(n),(n&(e.suspendedLanes|t))!==0?0:n}function Us(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 Hs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mr(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function Or(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var mn=Math.random().toString(36).slice(2),Fe="__reactFiber$"+mn,st="__reactProps$"+mn,ua="__reactContainer$"+mn,Bs="__reactEvents$"+mn,Fm="__reactListeners$"+mn,Wm="__reactHandles$"+mn,Dr="__reactResources$"+mn,Wa="__reactMarker$"+mn;function Ls(e){delete e[Fe],delete e[st],delete e[Bs],delete e[Fm],delete e[Wm]}function ca(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ua]||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[ua]){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 Im=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 Pm(e){return zs.call(Lr,e)?!0:zs.call(Br,e)?!1:Im.test(e)?Lr[e]=!0:(Br[e]=!0,!1)}function ui(e,t,n){if(Pm(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 ep(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,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){n=""+d,u.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 qs(e){if(!e._valueTracker){var t=qr(e)?"checked":"value";e._valueTracker=ep(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 tp=/[\n"\\]/g;function Tt(e){return e.replace(tp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,n,a,i,u,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Ys(e,d,Et(t)):n!=null?Ys(e,d,Et(n)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Et(m):e.removeAttribute("name")}function Yr(e,t,n,a,i,u,d,m){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){qs(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),qs(e)}function Ys(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(te(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),qs(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 np=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||np.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 u in t)t.hasOwnProperty(u)&&Qr(e,u,t[u])}function Vs(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 ap=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"]]),lp=/^[\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 lp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Xs=null;function Qs(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[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gs(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[st]||null;if(!i)throw Error(r(90));Gs(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 Zs=!1;function Kr(e,t,n){if(Zs)return e(t,n);Zs=!0;try{var a=e(t);return a}finally{if(Zs=!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[st]||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"),Js=!1;if(Jt)try{var el={};Object.defineProperty(el,"passive",{get:function(){Js=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Js=!1}var pn=null,Ks=null,di=null;function $r(){if(di)return di;var e,t=Ks,n=t.length,a,i="value"in pn?pn.value:pn.textContent,u=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[u-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 ut(e){function t(n,a,i,u,d){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.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=ut(Vn),tl=v({},Vn,{view:0,detail:0}),ip=ut(tl),$s,Fs,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:Is,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"?($s=e.screenX-nl.screenX,Fs=e.screenY-nl.screenY):Fs=$s=0,nl=e),$s)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),Wr=ut(pi),sp=v({},pi,{dataTransfer:0}),up=ut(sp),cp=v({},tl,{relatedTarget:0}),Ws=ut(cp),rp=v({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),op=ut(rp),dp=v({},Vn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fp=ut(dp),hp=v({},Vn,{data:0}),Ir=ut(hp),mp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pp={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"},gp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gp[e])?!!t[e]:!1}function Is(){return yp}var vp=v({},tl,{key:function(e){if(e.key){var t=mp[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"?pp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Is,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}}),xp=ut(vp),bp=v({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pr=ut(bp),jp=v({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Is}),Sp=ut(jp),Ep=v({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tp=ut(Ep),_p=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}),Np=ut(_p),wp=v({},Vn,{newState:0,oldState:0}),Cp=ut(wp),Ap=[9,13,27,32],Ps=Jt&&"CompositionEvent"in window,al=null;Jt&&"documentMode"in document&&(al=document.documentMode);var Rp=Jt&&"TextEvent"in window&&!al,eo=Jt&&(!Ps||al&&8<al&&11>=al),to=" ",no=!1;function ao(e,t){switch(e){case"keyup":return Ap.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 kp(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 zp(e,t){if(ga)return e==="compositionend"||!Ps&&ao(e,t)?(e=$r(),di=Ks=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 Mp={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"?!!Mp[e.type]:t==="textarea"}function so(e,t,n,a){ma?pa?pa.push(a):pa=[a]:ma=a,t=ls(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 Op(e){Xf(e,0)}function gi(e){var t=Ia(e);if(Gr(t))return e}function uo(e,t){if(e==="change")return t}var co=!1;if(Jt){var eu;if(Jt){var tu="oninput"in document;if(!tu){var ro=document.createElement("div");ro.setAttribute("oninput","return;"),tu=typeof ro.oninput=="function"}eu=tu}else eu=!1;co=eu&&(!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=[];so(t,il,e,Qs(e)),Kr(Op,t)}}function Dp(e,t,n){e==="focusin"?(oo(),ll=t,il=n,ll.attachEvent("onpropertychange",fo)):e==="focusout"&&oo()}function Up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(il)}function Hp(e,t){if(e==="click")return gi(t)}function Bp(e,t){if(e==="input"||e==="change")return gi(t)}function Lp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Lp;function sl(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(!zs.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 nu(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 qp=Jt&&"documentMode"in document&&11>=document.documentMode,ya=null,au=null,ul=null,lu=!1;function yo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lu||ya==null||ya!==ri(a)||(a=ya,"selectionStart"in a&&nu(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}),ul&&sl(ul,a)||(ul=a,a=ls(au,"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")},iu={},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(iu[e])return iu[e];if(!va[e])return e;var t=va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vo)return iu[e]=t[n];return e}var xo=Qn("animationend"),bo=Qn("animationiteration"),jo=Qn("animationstart"),Gp=Qn("transitionrun"),Yp=Qn("transitionstart"),Vp=Qn("transitioncancel"),So=Qn("transitionend"),Eo=new Map,su="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(" ");su.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,uu=0;function vi(){for(var e=xa,t=uu=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 u=_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}u!==0&&To(n,i,u)}}function xi(e,t,n,a){_t[xa++]=e,_t[xa++]=t,_t[xa++]=n,_t[xa++]=a,uu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cu(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,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-pt(n),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),u):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 Xp(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 Xp(e,t,n,a)}function ru(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,u){var d=0;if(a=e,typeof e=="function")ru(e)&&(d=1);else if(typeof e=="string")d=$g(e,n,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=yt(31,n,t,i),e.elementType=fe,e.lanes=u,e;case k:return Jn(n.children,i,u,t);case D:d=8,i|=24;break;case G:return e=yt(12,n,t,i|2),e.elementType=G,e.lanes=u,e;case J:return e=yt(13,n,t,i),e.elementType=J,e.lanes=u,e;case K:return e=yt(19,n,t,i),e.elementType=K,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:d=10;break e;case W:d=9;break e;case M:d=11;break e;case X:d=14;break e;case ue: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=u,t}function Jn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function ou(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 du(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 u=32-pt(t)+i;if(30<u){var d=i-i%5;u=(a&(1<<d)-1).toString(32),a>>=d,i-=d,Bt=1<<32-pt(t)+i|n<<i|a,Lt=u+e}else Bt=1<<u|n<<i|a,Lt=e}function fu(e){e.return!==null&&($t(e,1),Co(e,1,0))}function hu(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,ye=!1,yn=null,At=!1,mu=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)),mu}function Ro(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[st]=a,n){case"dialog":me("cancel",t),me("close",t);break;case"iframe":case"object":case"embed":me("load",t);break;case"video":case"audio":for(n=0;n<kl.length;n++)me(kl[n],t);break;case"source":me("error",t);break;case"img":case"image":case"link":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"input":me("invalid",t),Yr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":me("invalid",t);break;case"textarea":me("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&&(me("beforetoggle",t),me("toggle",t)),a.onScroll!=null&&me("scroll",t),a.onScrollEnd!=null&&me("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(!ye)return ko(e),ye=!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,ye=!1}function pu(){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 gu=j(null),$n=null,Ft=null;function xn(e,t,n){V(gu,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=gu.current,N(gu)}function yu(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 vu(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var d=i.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=i;for(var b=0;b<t.length;b++)if(m.context===t[b]){u.lanes|=n,m=u.alternate,m!==null&&(m.lanes|=n),yu(u.return,n,e),a||(d=null);break e}u=m.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(r(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),yu(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,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(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===Se.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&&vu(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 Qp=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()})}},Zp=s.unstable_scheduleCallback,Jp=s.unstable_NormalPriority,Ve={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xu(){return{controller:new Qp,data:new Map,refCount:0}}function ol(e){e.refCount--,e.refCount===0&&Zp(Jp,function(){e.controller.abort()})}var dl=null,bu=0,_a=0,Na=null;function Kp(e,t){if(dl===null){var n=dl=[];bu=0,_a=Ec(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return bu++,t.then(Mo,Mo),t}function Mo(){if(--bu===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 $p(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=z.S;z.S=function(e,t){vf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Kp(e,t),Oo!==null&&Oo(e,t)};var Wn=j(null);function ju(){var e=Wn.current;return e!==null?e:Ce.pooledCache}function _i(e,t){t===null?V(Wn,Wn.current):V(Wn,t.pool)}function Do(){var e=ju();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(r(460)),Su=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=Ce,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===C?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 u(_,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=ou(w,_.mode,q),T.return=_,T):(T=i(T,w),T.return=_,T)}function b(_,T,w,q){var ee=w.type;return ee===k?U(_,T,w.props.children,q,w.key):T!==null&&(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&In(ee)===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 A(_,T,w,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==w.containerInfo||T.stateNode.implementation!==w.implementation?(T=du(w,_.mode,q),T.return=_,T):(T=i(T,w.children||[]),T.return=_,T)}function U(_,T,w,q,ee){return T===null||T.tag!==7?(T=Jn(w,_.mode,q,ee),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=ou(""+T,_.mode,w),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case H:return w=ji(T.type,T.key,T.props,null,_.mode,w),hl(w,T),w.return=_,w;case B:return T=du(T,_.mode,w),T.return=_,T;case ue:return T=In(T),Y(_,T,w)}if(te(T)||ze(T))return T=Jn(T,_.mode,w,null),T.return=_,T;if(typeof T.then=="function")return Y(_,Ci(T),w);if(T.$$typeof===L)return Y(_,Ti(_,T),w);Ai(_,T)}return null}function R(_,T,w,q){var ee=T!==null?T.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return ee!==null?null:m(_,T,""+w,q);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case H:return w.key===ee?b(_,T,w,q):null;case B:return w.key===ee?A(_,T,w,q):null;case ue:return w=In(w),R(_,T,w,q)}if(te(w)||ze(w))return ee!==null?null:U(_,T,w,q,null);if(typeof w.then=="function")return R(_,T,Ci(w),q);if(w.$$typeof===L)return R(_,T,Ti(_,w),q);Ai(_,w)}return null}function O(_,T,w,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(w)||null,m(T,_,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case H:return _=_.get(q.key===null?w:q.key)||null,b(T,_,q,ee);case B:return _=_.get(q.key===null?w:q.key)||null,A(T,_,q,ee);case ue:return q=In(q),O(_,T,w,q,ee)}if(te(q)||ze(q))return _=_.get(w)||null,U(T,_,q,ee,null);if(typeof q.then=="function")return O(_,T,w,Ci(q),ee);if(q.$$typeof===L)return O(_,T,w,Ti(T,q),ee);Ai(T,q)}return null}function I(_,T,w,q){for(var ee=null,xe=null,P=T,oe=T=0,ge=null;P!==null&&oe<w.length;oe++){P.index>oe?(ge=P,P=null):ge=P.sibling;var be=R(_,P,w[oe],q);if(be===null){P===null&&(P=ge);break}e&&P&&be.alternate===null&&t(_,P),T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be,P=ge}if(oe===w.length)return n(_,P),ye&&$t(_,oe),ee;if(P===null){for(;oe<w.length;oe++)P=Y(_,w[oe],q),P!==null&&(T=u(P,T,oe),xe===null?ee=P:xe.sibling=P,xe=P);return ye&&$t(_,oe),ee}for(P=a(P);oe<w.length;oe++)ge=O(P,_,oe,w[oe],q),ge!==null&&(e&&ge.alternate!==null&&P.delete(ge.key===null?oe:ge.key),T=u(ge,T,oe),xe===null?ee=ge:xe.sibling=ge,xe=ge);return e&&P.forEach(function(Hn){return t(_,Hn)}),ye&&$t(_,oe),ee}function le(_,T,w,q){if(w==null)throw Error(r(151));for(var ee=null,xe=null,P=T,oe=T=0,ge=null,be=w.next();P!==null&&!be.done;oe++,be=w.next()){P.index>oe?(ge=P,P=null):ge=P.sibling;var Hn=R(_,P,be.value,q);if(Hn===null){P===null&&(P=ge);break}e&&P&&Hn.alternate===null&&t(_,P),T=u(Hn,T,oe),xe===null?ee=Hn:xe.sibling=Hn,xe=Hn,P=ge}if(be.done)return n(_,P),ye&&$t(_,oe),ee;if(P===null){for(;!be.done;oe++,be=w.next())be=Y(_,be.value,q),be!==null&&(T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be);return ye&&$t(_,oe),ee}for(P=a(P);!be.done;oe++,be=w.next())be=O(P,_,oe,be.value,q),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?oe:be.key),T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be);return e&&P.forEach(function(sy){return t(_,sy)}),ye&&$t(_,oe),ee}function we(_,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 H:e:{for(var ee=w.key;T!==null;){if(T.key===ee){if(ee=w.type,ee===k){if(T.tag===7){n(_,T.sibling),q=i(T,w.props.children),q.return=_,_=q;break e}}else if(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&In(ee)===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 B:e:{for(ee=w.key;T!==null;){if(T.key===ee)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=du(w,_.mode,q),q.return=_,_=q}return d(_);case ue:return w=In(w),we(_,T,w,q)}if(te(w))return I(_,T,w,q);if(ze(w)){if(ee=ze(w),typeof ee!="function")throw Error(r(150));return w=ee.call(w),le(_,T,w,q)}if(typeof w.then=="function")return we(_,T,Ci(w),q);if(w.$$typeof===L)return we(_,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=ou(w,_.mode,q),q.return=_,_=q),d(_)):n(_,T)}return function(_,T,w,q){try{fl=0;var ee=we(_,T,w,q);return Ca=null,ee}catch(P){if(P===wa||P===Ni)throw P;var xe=yt(29,P,null,_.mode);return xe.lanes=q,xe.return=_,xe}finally{}}}var ea=qo(!0),Go=qo(!1),bn=!1;function Eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(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,(je&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 _u(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?i=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?i=u=t:u=u.next=t}else i=u=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,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 Nu=!1;function pl(){if(Nu){var e=Na;if(e!==null)throw e}}function gl(e,t,n,a){Nu=!1;var i=e.updateQueue;bn=!1;var u=i.firstBaseUpdate,d=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var b=m,A=b.next;b.next=null,d===null?u=A:d.next=A,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=A:m.next=A,U.lastBaseUpdate=b))}if(u!==null){var Y=i.baseState;d=0,U=A=b=null,m=u;do{var R=m.lane&-536870913,O=R!==m.lane;if(O?(pe&R)===R:(a&R)===R){R!==0&&R===_a&&(Nu=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,le=m;R=t;var we=n;switch(le.tag){case 1:if(I=le.payload,typeof I=="function"){Y=I.call(we,Y,R);break e}Y=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=le.payload,R=typeof I=="function"?I.call(we,Y,R):I,R==null)break e;Y=v({},Y,R);break e;case 2:bn=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=i.callbacks,O===null?i.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(A=U=O,b=Y):U=U.next=O,d|=R;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=A,i.lastBaseUpdate=U,u===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=un,V(Ri,e),V(Aa,t),un=e|t.baseLanes}function wu(){V(Ri,un),V(Aa,Aa.current)}function Cu(){un=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 Au(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,_e=null,Xe=null,zi=!1,Ra=!1,ta=!1,Mi=0,yl=0,ka=null,Fp=0;function Be(){throw Error(r(321))}function Ru(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 ku(e,t,n,a,i,u){return It=u,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Cd:Zu,ta=!1,u=n(a,i),ta=!1,Ra&&(u=Jo(t,n,a,i)),Zo(e),u}function Zo(e){z.H=bl;var t=_e!==null&&_e.next!==null;if(It=0,Xe=_e=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=_e=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=Ad,u=t(n,a)}while(Ra);return u}function Wp(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(re.flags|=1024),t}function zu(){var e=Mi!==0;return Mi=0,e}function Mu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ou(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=_e=re=null,Ra=!1,yl=Mi=0,ka=null}function it(){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(_e===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?re.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw re.alternate===null?Error(r(467)):Error(r(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.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,z.H=t===null||t.memoizedState===null?Cd:Zu),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vl(e);if(e.$$typeof===L)return Ie(e)}throw Error(r(438,String(e)))}function Du(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]=He;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=Ye();return Uu(t,_e,e)}function Uu(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var d=i.next;i.next=u.next,u.next=d}t.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var m=d=null,b=null,A=t,U=!1;do{var Y=A.lane&-536870913;if(Y!==A.lane?(pe&Y)===Y:(It&Y)===Y){var R=A.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),Y===_a&&(U=!0);else if((It&R)===R){A=A.next,R===_a&&(U=!0);continue}else Y={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=Y,d=u):b=b.next=Y,re.lanes|=R,wn|=R;Y=A.action,ta&&n(u,Y),u=A.hasEagerState?A.eagerState:n(u,Y)}else R={lane:Y,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=R,d=u):b=b.next=R,re.lanes|=Y,wn|=Y;A=A.next}while(A!==null&&A!==t);if(b===null?d=u:b.next=m,!gt(u,e.memoizedState)&&(Qe=!0,U&&(n=Na,n!==null)))throw n;e.memoizedState=u,e.baseState=d,e.baseQueue=b,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Hu(e){var t=Ye(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,u=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do u=e(u,d.action),d=d.next;while(d!==i);gt(u,t.memoizedState)||(Qe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function Ko(e,t,n){var a=re,i=Ye(),u=ye;if(u){if(n===void 0)throw Error(r(407));n=n()}else n=t();var d=!gt((_e||i).memoizedState,n);if(d&&(i.memoizedState=n,Qe=!0),i=i.queue,qu(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),Ce===null)throw Error(r(349));u||(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 Bu(e){var t=it();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,Uu(e,_e,typeof a=="function"?a:Pt)}function Ip(e,t,n,a,i){if(Li(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};z.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,td(t,u)):(u.next=n.next,t.pending=n.next=u)}}function td(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var u=z.T,d={};z.T=d;try{var m=n(i,a),b=z.S;b!==null&&b(d,m),nd(e,t,m)}catch(A){Lu(e,t,A)}finally{u!==null&&d.types!==null&&(u.types=d.types),z.T=u}}else try{u=n(i,a),nd(e,t,u)}catch(A){Lu(e,t,A)}}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 Lu(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 Lu(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 sd(e,t){if(ye){var n=Ce.formState;if(n!==null){e:{var a=re;if(ye){if(Ae){t:{for(var i=Ae,u=At;i.nodeType!==8;){if(!u){i=null;break t}if(i=kt(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="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=it(),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=Bu(!1),u=Qu.bind(null,re,!1,a.queue),a=it(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=Ip.bind(null,re,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function ud(e){var t=Ye();return cd(t,_e,e)}function cd(e,t,n){if(t=Uu(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,u=i.dispatch;return n!==t.memoizedState&&(re.flags|=2048,za(9,{destroy:void 0},Pp.bind(null,i,n),null)),[a,u,e]}function Pp(e,t){e.action=t}function rd(e){var t=Ye(),n=_e;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=it();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 u=i.memoizedState.inst;_e!==null&&a!==null&&Ru(a,_e.memoizedState.deps)?i.memoizedState=za(t,u,n,a):(re.flags|=e,i.memoizedState=za(1|t,u,n,a))}function dd(e,t){Hi(8390656,8,e,t)}function qu(e,t){Bi(2048,8,e,t)}function eg(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 eg({ref:t,nextImpl:e}),function(){if((je&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 Gu(){}function yd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Ru(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&&Ru(t,a[1]))return a[0];if(a=e(),ta){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function Yu(e,t,n){return n===void 0||(It&1073741824)!==0&&(pe&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=Yu(e,n,a),gt(e,t)||(Qe=!0),e):(It&42)===0||(It&1073741824)!==0&&(pe&261930)===0?(Qe=!0,e.memoizedState=n):(e=bf(),re.lanes|=e,wn|=e,t)}function bd(e,t,n,a,i){var u=Z.p;Z.p=u!==0&&8>u?u:8;var d=z.T,m={};z.T=m,Qu(e,!1,t,n);try{var b=i(),A=z.S;if(A!==null&&A(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=$p(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{Z.p=u,d!==null&&m.types!==null&&(d.types=m.types),z.T=d}}function tg(){}function Vu(e,t,n,a){if(e.tag!==5)throw Error(r(476));var i=jd(e).queue;bd(e,i,t,ne,n===null?tg: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 Xu(){return Ie(Ul)}function Ed(){return Ye().memoizedState}function Td(){return Ye().memoizedState}function ng(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:xu()},e.payload=t;return}t=t.return}}function ag(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=cu(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 u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,m=u(d,n);if(i.hasEagerState=!0,i.eagerState=m,gt(m,d))return xi(e,t,i,0),Ce===null&&vi(),!1}catch{}finally{}if(n=cu(e,t,i,a),n!==null)return ft(n,e,a),wd(n,t,a),!0}return!1}function Qu(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=cu(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 it().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=it();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=it();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=ag.bind(null,re,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Bu(e);var t=e.queue,n=_d.bind(null,re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gu,useDeferredValue:function(e,t){var n=it();return Yu(n,e,t)},useTransition:function(){var e=Bu(!1);return e=bd.bind(null,re,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=re,i=it();if(ye){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ce===null)throw Error(r(349));(pe&127)!==0||$o(a,t,n)}i.memoizedState=n;var u={value:n,getSnapshot:t};return i.queue=u,dd(Wo.bind(null,a,u,e),[e]),a.flags|=2048,za(9,{destroy:void 0},Fo.bind(null,a,u,n,t),null),n},useId:function(){var e=it(),t=Ce.identifierPrefix;if(ye){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=Fp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xu,useFormState:sd,useActionState:sd,useOptimistic:function(e){var t=it();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qu.bind(null,re,!0,n),n.dispatch=t,[e,t]},useMemoCache:Du,useCacheRefresh:function(){return it().memoizedState=ng.bind(null,re)},useEffectEvent:function(e){var t=it(),n={impl:e};return t.memoizedState=n,function(){if((je&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Zu={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:qu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Ui,useRef:od,useState:function(){return Ui(Pt)},useDebugValue:Gu,useDeferredValue:function(e,t){var n=Ye();return xd(n,_e.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:Xu,useFormState:ud,useActionState:ud,useOptimistic:function(e,t){var n=Ye();return ed(n,_e,e,t)},useMemoCache:Du,useCacheRefresh:Td};Zu.useEffectEvent=fd;var Ad={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:qu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Hu,useRef:od,useState:function(){return Hu(Pt)},useDebugValue:Gu,useDeferredValue:function(e,t){var n=Ye();return _e===null?Yu(n,e,t):xd(n,_e.memoizedState,e,t)},useTransition:function(){var e=Hu(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Xu,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var n=Ye();return _e!==null?ed(n,_e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Du,useCacheRefresh:Td};Ad.useEffectEvent=fd;function Ju(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 Ku={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,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,d):t.prototype&&t.prototype.isPureReactComponent?!sl(n,a)||!sl(i,u):!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&&Ku.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 $u(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 u=a.value;e.payload=function(){return i(u)},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 lg(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(ye)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==mu&&(e=Error(r(422),{cause:a}),rl(Nt(e,n)))):(a!==mu&&(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=$u(e.stateNode,a,i),_u(e,i),Le!==4&&(Le=2)),!1;var u=Error(r(520),{cause:a});if(u=Nt(u,n),Cl===null?Cl=[u]:Cl.push(u),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=$u(n.stateNode,a,e),_u(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Cn===null||!Cn.has(u))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ud(i),Hd(i,e,n,a),_u(n,i),!1}n=n.return}while(n!==null);return!1}var Fu=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 u=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=ku(e,t,n,d,u,i),m=zu(),e!==null&&!Qe?(Mu(e,t,i),en(e,t,i)):(ye&&m&&fu(t),t.flags|=1,Pe(e,t,a,i),t.child)}function Ld(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!ru(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,qd(e,t,u,a,i)):(e=ji(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!lc(e,i)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:sl,n(d,a)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Kt(u,a),e.ref=t.ref,e.return=t,t.child=e}function qd(e,t,n,a,i){if(e!==null){var u=e.memoizedProps;if(sl(u,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=u,lc(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return Wu(e,t,n,a,i)}function Gd(e,t,n,a){var i=a.children,u=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(u=u!==null?u.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&~u}else a=0,t.child=null;return Yd(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_i(t,u!==null?u.cachePool:null),u!==null?Xo(t,u):wu(),Qo(t);else return a=t.lanes=536870912,Yd(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(_i(t,u.cachePool),Xo(t,u),Tn(),t.memoizedState=null):(e!==null&&_i(t,null),wu(),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 u=ju();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&_i(t,null),wu(),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 ig(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(a.mode==="hidden")return e=Gi(t,a),t.lanes=536870912,jl(null,e);if(Au(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 u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Au(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=Ce,a!==null&&(d=zr(a,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Zn(e,d),ft(a,e,d),Fu;Ii(),t=Vd(e,t,n)}else e=u.treeContext,Ae=kt(d.nextSibling),We=t,ye=!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 Wu(e,t,n,a,i){return Fn(t),n=ku(e,t,n,a,void 0,i),a=zu(),e!==null&&!Qe?(Mu(e,t,i),en(e,t,i)):(ye&&a&&fu(t),t.flags|=1,Pe(e,t,n,i),t.child)}function Xd(e,t,n,a,i,u){return Fn(t),t.updateQueue=null,n=Jo(t,a,n,i),Zo(e),a=zu(),e!==null&&!Qe?(Mu(e,t,u),en(e,t,u)):(ye&&a&&fu(t),t.flags|=1,Pe(e,t,n,u),t.child)}function Qd(e,t,n,a,i){if(Fn(t),t.stateNode===null){var u=ba,d=n.contextType;typeof d=="object"&&d!==null&&(u=Ie(d)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ku,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Eu(t),d=n.contextType,u.context=typeof d=="object"&&d!==null?Ie(d):ba,u.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Ju(t,n,d,a),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&Ku.enqueueReplaceState(u,u.state,null),gl(t,a,u,i),pl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,b=na(n,m);u.props=b;var A=u.context,U=n.contextType;d=ba,typeof U=="object"&&U!==null&&(d=Ie(U));var Y=n.getDerivedStateFromProps;U=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||A!==d)&&kd(t,u,a,d),bn=!1;var R=t.memoizedState;u.state=R,gl(t,a,u,i),pl(),A=t.memoizedState,m||R!==A||bn?(typeof Y=="function"&&(Ju(t,n,Y,a),A=t.memoizedState),(b=bn||Rd(t,n,b,a,R,A,d))?(U||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),u.props=a,u.state=A,u.context=d,a=b):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Tu(e,t),d=t.memoizedProps,U=na(n,d),u.props=U,Y=t.pendingProps,R=u.context,A=n.contextType,b=ba,typeof A=="object"&&A!==null&&(b=Ie(A)),m=n.getDerivedStateFromProps,(A=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||R!==b)&&kd(t,u,a,b),bn=!1,R=t.memoizedState,u.state=R,gl(t,a,u,i),pl();var O=t.memoizedState;d!==Y||R!==O||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(Ju(t,n,m,a),O=t.memoizedState),(U=bn||Rd(t,n,U,a,R,O,b)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(A||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,O,b),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,O,b)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),u.props=a,u.state=O,u.context=b,a=U):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Yi(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.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=u.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 Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pu(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,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){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=Pu(n),a.childLanes=ec(e,d,n),t.memoizedState=Iu,jl(null,a)):(En(t),tc(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(u)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=Pu(n),a.childLanes=ec(e,d,n),t.memoizedState=Iu,t=jl(null,a));else if(En(t),Uc(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var A=d.dgst;d=A,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=Ce,d!==null&&(a=zr(d,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Zn(e,a),ft(d,e,a),Fu;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,ye=!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,A=b.sibling,a=Kt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,A!==null?m=Kt(A,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=Pu(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=Iu,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),yu(e.return,t,n)}function ac(e,t,n,a,i,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=n,d.tailMode=i,d.treeForkCount=u)}function $d(e,t,n){var a=t.pendingProps,i=a.revealOrder,u=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=ye?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,u,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,u,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 sg(e,t,n){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),xn(t,Ve,e.memoizedState.cache),Kn();break;case 27:case 5:Ja(t);break;case 4:lt(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,Au(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,sg(e,t,n);Qe=(e.flags&131072)!==0}else Qe=!1,ye&&(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")ru(e)?(a=na(e,a),t.tag=1,t=Qd(null,t,e,a,n)):(t.tag=0,t=Wu(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===M){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=$(e)||e,Error(r(306,t,""))}}return t;case 0:return Wu(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(lt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,Tu(e,t),gl(t,a,null,n);var d=t.memoizedState;if(a=d.cache,xn(t,Ve,a),a!==u.cache&&vu(t,[Ve],n,!0),pl(),a=d.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,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,ye=!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:ye||(n=t.type,e=t.pendingProps,a=is(se.current).createElement(n),a[Fe]=t,a[st]=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&&ye&&(a=t.stateNode=ih(t.type,t.pendingProps,se.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&&ye&&((i=a=Ae)&&(a=Ug(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,u=t.pendingProps,d=e!==null?e.memoizedProps:null,a=u.children,zc(i,u)?a=null:d!==null&&zc(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=ku(e,t,Wp,null,null,n),Ul._currentValue=i),Yi(e,t),Pe(e,t,a,n),t.child;case 6:return e===null&&ye&&((e=n=Ae)&&(n=Hg(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 lt(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 ig(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return Fn(t),a=Ie(Ve),e===null?(i=ju(),i===null&&(i=Ce,u=xu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},Eu(t),xn(t,Ve,i)):((e.lanes&n)!==0&&(Tu(e,t),gl(t,null,null,n),pl()),i=e.memoizedState,u=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=u.cache,xn(t,Ve,a),a!==i.cache&&vu(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,Su}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,Su}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(!ye)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(hu(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,pu())),Re(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(tn(t),u!==null?(Re(t),Wd(t,u)):(Re(t),ic(t,i,null,a,n))):u?u!==e.memoizedState?(tn(t),Re(t),Wd(t,u)):(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=se.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(u=Q.current,Ea(t))Ro(t);else{var d=is(se.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?d.createElement(i,{is:a.is}):d.createElement(i)}}u[Fe]=t,u[st]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=u;e:switch(et(u,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=se.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=is(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=pu(),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=pu(),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),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==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,u=a.rendering,u===null)if(i)Sl(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ki(e),u!==null){for(t.flags|=128,Sl(a,!1),e=u.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),ye&&$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(u),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"&&!u.alternate&&!ye)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?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}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),ye&&$t(t,a.treeForkCount),e):(Re(t),null);case 22:case 23:return xt(t),Cu(),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 cg(e,t){switch(hu(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),Cu(),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(hu(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),Cu(),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 u=n.create,d=n.inst;a=u(),d.destroy=a}n=n.next}while(n!==i)}}catch(m){Te(t,t.return,m)}}function _n(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;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,A=m;try{A()}catch(U){Te(i,b,U)}}}a=a.next}while(a!==u)}}catch(U){Te(t,t.return,U)}}function Pd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Vo(t,n)}catch(a){Te(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){Te(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){Te(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){Te(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){Te(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){Te(e,e.return,i)}}function sc(e,t,n){try{var a=e.stateNode;Rg(a,e.type,n,t),a[st]=t}catch(i){Te(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 uc(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[st]=n}catch(u){Te(e,e.return,u)}}var nn=!1,Ze=!1,rc=!1,lf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function rg(e,t){if(e=e.containerInfo,Rc=fs,e=go(e),nu(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,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var d=0,m=-1,b=-1,A=0,U=0,Y=e,R=null;t:for(;;){for(var O;Y!==n||i!==0&&Y.nodeType!==3||(m=d+i),Y!==u||a!==0&&Y.nodeType!==3||(b=d+a),Y.nodeType===3&&(d+=Y.nodeValue.length),(O=Y.firstChild)!==null;)R=Y,Y=O;for(;;){if(Y===e)break t;if(R===n&&++A===i&&(m=d),R===u&&++U===a&&(b=d),(O=Y.nextSibling)!==null)break;Y=R,R=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},fs=!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,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(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&&u!==null){e=void 0,n=t,i=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var I=na(n.type,i);e=a.getSnapshotBeforeUpdate(I,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(le){Te(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 sf(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){Te(n,n.return,d)}else{var i=na(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Te(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){Te(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=vg.bind(null,n),Bg(e,n))));break;case 22:if(a=n.memoizedState!==null||nn,!a){t=t!==null&&t.memoizedState!==null||Ze,i=nn;var u=Ze;nn=a,(Ze=t)&&!u?sn(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),nn=i,Ze=u}break;case 30:break;default:ln(e,n)}}function uf(e){var t=e.alternate;t!==null&&(e.alternate=null,uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ls(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 Me=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=Me,i=ct;zn(n.type)&&(Me=n.stateNode,ct=!1),an(e,t,n),Ml(n.stateNode),Me=a,ct=i;break;case 5:Ze||qt(n,t);case 6:if(a=Me,i=ct,Me=null,an(e,t,n),Me=a,ct=i,Me!==null)if(ct)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(n.stateNode)}catch(u){Te(n,t,u)}else try{Me.removeChild(n.stateNode)}catch(u){Te(n,t,u)}break;case 18:Me!==null&&(ct?(e=Me,eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Xa(e)):eh(Me,n.stateNode));break;case 4:a=Me,i=ct,Me=n.stateNode.containerInfo,ct=!0,an(e,t,n),Me=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){Te(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){Te(t,t.return,n)}}function og(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=og(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=xg.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],u=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(zn(m.type)){Me=m.stateNode,ct=!1;break e}break;case 5:Me=m.stateNode,ct=!1;break e;case 3:case 4:Me=m.stateNode.containerInfo,ct=!0;break e}m=m.return}if(Me===null)throw Error(r(160));cf(u,d,i),Me=null,ct=!1,u=i.alternate,u!==null&&(u.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 u=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":u=i.getElementsByTagName("title")[0],(!u||u[Wa]||u[Fe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),et(u,a,n),u[Fe]=e,Ke(u),a=u;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(u=d[m],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(m,1);break t}}u=i.createElement(a),et(u,a,n),i.head.appendChild(u);break;case"meta":if(d=dh("meta","content",i).get(a+(n.content||""))){for(m=0;m<d.length;m++)if(u=d[m],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(m,1);break t}}u=i.createElement(a),et(u,a,n),i.head.appendChild(u);break;default:throw Error(r(468,a))}u[Fe]=e,Ke(u),a=u}e.stateNode=a}else fh(i,e.type,e.stateNode);else e.stateNode=oh(i,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?fh(i,e.type,e.stateNode):oh(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&sc(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&&sc(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(I){Te(e,e.return,I)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,sc(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(I){Te(e,e.return,I)}}break;case 3:if(cs=null,i=Dt,Dt=ss(t.containerInfo),rt(t,e),Dt=i,ot(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Xa(t.containerInfo)}catch(I){Te(e,e.return,I)}rc&&(rc=!1,ff(e));break;case 4:a=Dt,Dt=ss(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,A=nn,U=Ze;if(nn=A||i,Ze=U||b,rt(t,e),Ze=U,nn=A,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(u=b.stateNode,i)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var Y=b.memoizedProps.style,R=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(I){Te(b,b.return,I)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=i?"":b.memoizedProps}catch(I){Te(b,b.return,I)}}}else if(t.tag===18){if(n===null){b=t;try{var O=b.stateNode;i?th(O,!0):th(b.stateNode,!1)}catch(I){Te(b,b.return,I)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;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,u=uc(e);Qi(e,u,i);break;case 5:var d=n.stateNode;n.flags&32&&(ha(d,""),n.flags&=-33);var m=uc(e);Qi(e,m,d);break;case 3:case 4:var b=n.stateNode.containerInfo,A=uc(e);cc(e,A,b);break;default:throw Error(r(161))}}catch(U){Te(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;)sf(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 sn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:sn(i,u,n),El(4,u);break;case 1:if(sn(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(A){Te(a,a.return,A)}if(a=u,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(A){Te(a,a.return,A)}}n&&d&64&&Pd(u),Tl(u,u.return);break;case 27:af(u);case 26:case 5:sn(i,u,n),n&&a===null&&d&4&&tf(u),Tl(u,u.return);break;case 12:sn(i,u,n);break;case 31:sn(i,u,n),n&&d&4&&rf(i,u);break;case 13:sn(i,u,n),n&&d&4&&of(i,u);break;case 22:u.memoizedState===null&&sn(i,u,n),Tl(u,u.return);break;case 30:break;default:sn(i,u,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 u=t.memoizedProps,d=u.id,m=u.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Te(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:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Ut(e,t,n,a):_l(e,t):u._visibility&2?Ut(e,t,n,a):(u._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 u=e,d=t,m=n,b=a,A=d.flags;switch(d.tag){case 0:case 11:case 15:Ma(u,d,m,b,i),El(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?Ma(u,d,m,b,i):_l(u,d):(U._visibility|=2,Ma(u,d,m,b,i)),i&&A&2048&&oc(d.alternate,d);break;case 24:Ma(u,d,m,b,i),i&&A&2048&&dc(d.alternate,d);break;default:Ma(u,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&&Fg(n,Dt,e.memoizedState,e.memoizedProps);break;case 5:Oa(e,t,n);break;case 3:case 4:var a=Dt;Dt=ss(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,u=a.return;if(uf(a),a===n){$e=null;break e}if(i!==null){i.return=u,$e=i;break e}$e=u}}}var dg={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}},fg=typeof WeakMap=="function"?WeakMap:Map,je=0,Ce=null,he=null,pe=0,Ee=0,bt=null,Nn=!1,Da=!1,fc=!1,un=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(je&2)!==0&&pe!==0?pe&-pe:z.T!==null?Ec():Mr()}function bf(){if(jt===0)if((pe&536870912)===0||ye){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===Ce&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Ba(e,0),Rn(e,pe,jt,!1)),Fa(e,n),((je&2)===0||e!==Ce)&&(e===Ce&&((je&2)===0&&(la|=n),Le===4&&Rn(e,pe,jt,!1)),Gt(e))}function jf(e,t,n){if((je&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$a(e,t),i=a?pg(e,t):xc(e,t,!0),u=a;do{if(i===0){Da&&!a&&Rn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!hg(n)){i=xc(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;i=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|=u,la|=u,i=4;break e}u=dt,dt=i,u!==null&&(dt===null?dt=u:dt.push.apply(dt,u))}i=d}if(u=!1,i!==2)continue}}if(i===1){Ba(e,0),Rn(e,t,0,!0);break}e:{switch(a=e,u=i,u){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),si(a,0,!0)!==0)break e;cn=t,a.timeoutHandle=If(Sf.bind(null,a,n,dt,Fi,mc,t,jt,la,Ua,Nn,u,"Throttled",-0,0),i);break e}Sf(a,n,dt,Fi,mc,t,jt,la,Ua,Nn,u,null,-0,0)}}break}while(!0);Gt(e)}function Sf(e,t,n,a,i,u,d,m,b,A,U,Y,R,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,u,Y);var I=(u&62914560)===u?Ki-ht():(u&4194048)===u?vf-ht():0;if(I=Wg(Y,I),I!==null){cn=u,e.cancelPendingCommit=I(Rf.bind(null,e,t,u,n,a,i,d,m,b,U,Y,null,R,O)),Rn(e,u,d,!A);return}}Rf(e,t,u,n,a,i,d,m,b)}function hg(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],u=i.getSnapshot;i=i.value;try{if(!gt(u(),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 u=31-pt(i),d=1<<u;a[u]=-1,i&=~d}n!==0&&Rr(e,n,t)}function Wi(){return(je&6)===0?(Rl(0),!1):!0}function vc(){if(he!==null){if(Ee===0)var e=he.return;else e=he,Ft=$n=null,Ou(e),Ca=null,fl=0,e=he;for(;e!==null;)Id(e.alternate,e),e=e.return;he=null}}function Ba(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Mg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cn=0,vc(),Ce=e,he=n=Kt(e.current,null),pe=t,Ee=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),u=1<<i;t|=e[i],a&=~u}return un=t,vi(),n}function Ef(e,t){re=null,z.H=bl,t===wa||t===Ni?(t=Bo(),Ee=3):t===Su?(t=Bo(),Ee=4):Ee=t===Fu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,he===null&&(Le=1,qi(e,Nt(t,e.current)))}function Tf(){var e=vt.current;return e===null?!0:(pe&4194048)===pe?Rt===null:(pe&62914560)===pe||(pe&536870912)!==0?e===Rt:!1}function _f(){var e=z.H;return z.H=bl,e===null?bl:e}function Nf(){var e=z.A;return z.A=dg,e}function Ii(){Le=4,Nn||(pe&4194048)!==pe&&vt.current!==null||(Da=!0),(wn&134217727)===0&&(la&134217727)===0||Ce===null||Rn(Ce,pe,jt,!1)}function xc(e,t,n){var a=je;je|=2;var i=_f(),u=Nf();(Ce!==e||pe!==t)&&(Fi=null,Ba(e,t)),t=!1;var d=Le;e:do try{if(Ee!==0&&he!==null){var m=he,b=bt;switch(Ee){case 8:vc(),d=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var A=Ee;if(Ee=0,bt=null,La(e,m,b,A),n&&Da){d=0;break e}break;default:A=Ee,Ee=0,bt=null,La(e,m,b,A)}}mg(),d=Le;break}catch(U){Ef(e,U)}while(!0);return t&&e.shellSuspendCounter++,Ft=$n=null,je=a,z.H=i,z.A=u,he===null&&(Ce=null,pe=0,vi()),d}function mg(){for(;he!==null;)wf(he)}function pg(e,t){var n=je;je|=2;var a=_f(),i=Nf();Ce!==e||pe!==t?(Fi=null,$i=ht()+500,Ba(e,t)):Da=$a(e,t);e:do try{if(Ee!==0&&he!==null){t=he;var u=bt;t:switch(Ee){case 1:Ee=0,bt=null,La(e,t,u,1);break;case 2:case 9:if(Uo(u)){Ee=0,bt=null,Cf(t);break}t=function(){Ee!==2&&Ee!==9||Ce!==e||(Ee=7),Gt(e)},u.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Uo(u)?(Ee=0,bt=null,Cf(t)):(Ee=0,bt=null,La(e,t,u,7));break;case 5:var d=null;switch(he.tag){case 26:d=he.memoizedState;case 5:case 27:var m=he;if(d?hh(d):m.stateNode.complete){Ee=0,bt=null;var b=m.sibling;if(b!==null)he=b;else{var A=m.return;A!==null?(he=A,Pi(A)):he=null}break t}}Ee=0,bt=null,La(e,t,u,5);break;case 6:Ee=0,bt=null,La(e,t,u,6);break;case 8:vc(),Le=6;break e;default:throw Error(r(462))}}gg();break}catch(U){Ef(e,U)}while(!0);return Ft=$n=null,z.H=a,z.A=i,je=n,he!==null?0:(Ce=null,pe=0,vi(),Le)}function gg(){for(;he!==null&&!Lm();)wf(he)}function wf(e){var t=Fd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Pi(e):he=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,pe);break;case 11:t=Xd(n,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Ou(t);default:Id(n,t),t=he=_o(t,un),t=Fd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?Pi(e):he=t}function La(e,t,n,a){Ft=$n=null,Ou(t),Ca=null,fl=0;var i=t.return;try{if(lg(e,i,t,n,pe)){Le=1,qi(e,Nt(n,e.current)),he=null;return}}catch(u){if(i!==null)throw he=i,u;Le=1,qi(e,Nt(n,e.current)),he=null;return}t.flags&32768?(ye||a===1?e=!0:Da||(pe&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,un);if(n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);Le===0&&(Le=5)}function Af(e,t){do{var n=cg(e.alternate,e);if(n!==null){n.flags&=32767,he=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=n}while(e!==null);Le=6,he=null}function Rf(e,t,n,a,i,u,d,m,b){e.cancelPendingCommit=null;do es();while(Je!==0);if((je&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=uu,$m(e,n,u,d,m,b),e===Ce&&(he=Ce=null,pe=0),Ha=t,An=e,cn=n,pc=u,gc=i,xf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,bg(ni,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,i=Z.p,Z.p=2,d=je,je|=4;try{rg(e,t,n)}finally{je=d,Z.p=i,z.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=z.T,z.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{df(t,e);var u=kc,d=go(e.containerInfo),m=u.focusedElem,b=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&po(m.ownerDocument.documentElement,m)){if(b!==null&&nu(m)){var A=b.start,U=b.end;if(U===void 0&&(U=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(U,m.value.length);else{var Y=m.ownerDocument||document,R=Y&&Y.defaultView||window;if(R.getSelection){var O=R.getSelection(),I=m.textContent.length,le=Math.min(b.start,I),we=b.end===void 0?le:Math.min(b.end,I);!O.extend&&le>we&&(d=we,we=le,le=d);var _=mo(m,le),T=mo(m,we);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>we?(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}}fs=!!Rc,kc=Rc=null}finally{je=i,Z.p=a,z.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=z.T,z.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{sf(e,t.alternate,t)}finally{je=i,Z.p=a,z.T=n}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,qm();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),Hs(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=z.T,i=Z.p,Z.p=2,z.T=null;try{for(var u=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];u(m.value,{componentStack:m.stack})}}finally{z.T=t,Z.p=i}}(cn&3)!==0&&es(),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 es(){return kf(),zf(),Mf(),Df()}function Df(){if(Je!==5)return!1;var e=An,t=pc;pc=0;var n=Hs(cn),a=z.T,i=Z.p;try{Z.p=32>n?32:n,z.T=null,n=gc,gc=null;var u=An,d=cn;if(Je=0,Ha=An=null,cn=0,(je&6)!==0)throw Error(r(331));var m=je;if(je|=4,gf(u.current),hf(u,u.current,d,n),je=m,Rl(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ka,u)}catch{}return!0}finally{Z.p=i,z.T=a,Of(e,t)}}function Uf(e,t,n){t=Nt(n,t),t=$u(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Fa(e,2),Gt(e))}function Te(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 fg;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=yg.bind(null,e,t,n),t.then(e,e))}function yg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ce===e&&(pe&n)===n&&(Le===4||Le===3&&(pe&62914560)===pe&&300>ht()-Ki?(je&2)===0&&Ba(e,0):hc|=n,Ua===pe&&(Ua=0)),Gt(e)}function Hf(e,t){t===0&&(t=Ar()),e=Zn(e,t),e!==null&&(Fa(e,t),Gt(e))}function vg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hf(e,n)}function xg(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 bg(e,t){return Ms(e,t)}var ts=null,qa=null,jc=!1,ns=!1,Sc=!1,kn=0;function Gt(e){e!==qa&&e.next===null&&(qa===null?ts=qa=e:qa=qa.next=e),ns=!0,jc||(jc=!0,Sg())}function Rl(e,t){if(!Sc&&ns){Sc=!0;do for(var n=!1,a=ts;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var d=a.suspendedLanes,m=a.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=i&~(d&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Gf(a,u))}else u=pe,u=si(a,a===Ce?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||$a(a,u)||(n=!0,Gf(a,u));a=a.next}while(n);Sc=!1}}function jg(){Bf()}function Bf(){ns=jc=!1;var e=0;kn!==0&&zg()&&(e=kn);for(var t=ht(),n=null,a=ts;a!==null;){var i=a.next,u=Lf(a,t);u===0?(a.next=null,n===null?ts=i:n.next=i,i===null&&(qa=n)):(n=a,(e!==0||(u&3)!==0)&&(ns=!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,u=e.pendingLanes&-62914561;0<u;){var d=31-pt(u),m=1<<d,b=i[d];b===-1?((m&n)===0||(m&a)!==0)&&(i[d]=Km(m,t)):b<=t&&(e.expiredLanes|=m),u&=~m}if(t=Ce,n=pe,n=si(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Os(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&&Os(a),Hs(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=Ms(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Os(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(es()&&e.callbackNode!==n)return null;var a=pe;return a=si(e,e===Ce?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(es())return null;jf(e,t,!0)}function Sg(){Og(function(){(je&6)!==0?Ms(Nr,jg):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 Eg(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var u=Yf((i[st]||null).action),d=a.submitter;d&&(t=(t=d[st]||null)?Yf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=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);Vu(n,{pending:!0,data:b,method:i.method,action:u},null,b)}}else typeof u=="function"&&(m.preventDefault(),b=d?Vf(i,d):new FormData(i),Vu(n,{pending:!0,data:b,method:i.method,action:u},u,b))},currentTarget:i}]})}}for(var Tc=0;Tc<su.length;Tc++){var _c=su[Tc],Tg=_c.toLowerCase(),_g=_c[0].toUpperCase()+_c.slice(1);Ot(Tg,"on"+_g)}Ot(xo,"onAnimationEnd"),Ot(bo,"onAnimationIteration"),Ot(jo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Gp,"onTransitionRun"),Ot(Yp,"onTransitionStart"),Ot(Vp,"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(" "),Ng=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 u=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,A=m.currentTarget;if(m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=A;try{u(i)}catch(U){yi(U)}i.currentTarget=null,u=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,A=m.currentTarget,m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=A;try{u(i)}catch(U){yi(U)}i.currentTarget=null,u=b}}}}function me(e,t){var n=t[Bs];n===void 0&&(n=t[Bs]=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 as="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[as]){e[as]=!0,Ur.forEach(function(n){n!=="selectionchange"&&(Ng.has(n)||Nc(n,!1,e),Nc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[as]||(t[as]=!0,Nc("selectionchange",!1,t))}}function Qf(e,t,n,a){switch(bh(t)){case 2:var i=ey;break;case 8:i=ty;break;default:i=Yc}n=i.bind(null,t,n,e),i=void 0,!Js||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 u=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=u=d;continue e}m=m.parentNode}}a=a.return}Kr(function(){var A=u,U=Qs(n),Y=[];e:{var R=Eo.get(e);if(R!==void 0){var O=mi,I=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":O=xp;break;case"focusin":I="focus",O=Ws;break;case"focusout":I="blur",O=Ws;break;case"beforeblur":case"afterblur":O=Ws;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=Sp;break;case xo:case bo:case jo:O=op;break;case So:O=Tp;break;case"scroll":case"scrollend":O=ip;break;case"wheel":O=Np;break;case"copy":case"cut":case"paste":O=fp;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=Cp}var le=(t&4)!==0,we=!le&&(e==="scroll"||e==="scrollend"),_=le?R!==null?R+"Capture":null:R;le=[];for(var T=A,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))),we)break;T=T.return}0<le.length&&(R=new O(R,I,null,n,U),Y.push({event:R,listeners:le}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&n!==Xs&&(I=n.relatedTarget||n.fromElement)&&(ca(I)||I[ua]))break e;if((O||R)&&(R=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,O?(I=n.relatedTarget||n.toElement,O=A,I=I?ca(I):null,I!==null&&(we=h(I),le=I.tag,I!==we||le!==5&&le!==27&&le!==6)&&(I=null)):(O=null,I=A),O!==I)){if(le=Wr,q="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=Pr,q="onPointerLeave",_="onPointerEnter",T="pointer"),we=O==null?R:Ia(O),w=I==null?R:Ia(I),R=new le(q,T+"leave",O,n,U),R.target=we,R.relatedTarget=w,q=null,ca(U)===A&&(le=new le(_,T+"enter",I,n,U),le.target=w,le.relatedTarget=we,q=le),we=q,O&&I)t:{for(le=wg,_=O,T=I,w=0,q=_;q;q=le(q))w++;q=0;for(var ee=T;ee;ee=le(ee))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,R,O,le,!1),I!==null&&we!==null&&Zf(Y,we,I,le,!0)}}e:{if(R=A?Ia(A):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var xe=uo;else if(io(R))if(co)xe=Bp;else{xe=Up;var P=Dp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?A&&Vs(A.elementType)&&(xe=uo):xe=Hp;if(xe&&(xe=xe(e,A))){so(Y,xe,n,U);break e}P&&P(e,R,A),e==="focusout"&&A&&R.type==="number"&&A.memoizedProps.value!=null&&Ys(R,"number",R.value)}switch(P=A?Ia(A):window,e){case"focusin":(io(P)||P.contentEditable==="true")&&(ya=P,au=A,ul=null);break;case"focusout":ul=au=ya=null;break;case"mousedown":lu=!0;break;case"contextmenu":case"mouseup":case"dragend":lu=!1,yo(Y,n,U);break;case"selectionchange":if(qp)break;case"keydown":case"keyup":yo(Y,n,U)}var oe;if(Ps)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else ga?ao(e,n)&&(ge="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ge="onCompositionStart");ge&&(eo&&n.locale!=="ko"&&(ga||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&ga&&(oe=$r()):(pn=U,Ks="value"in pn?pn.value:pn.textContent,ga=!0)),P=ls(A,ge),0<P.length&&(ge=new Ir(ge,e,null,n,U),Y.push({event:ge,listeners:P}),oe?ge.data=oe:(oe=lo(n),oe!==null&&(ge.data=oe)))),(oe=Rp?kp(e,n):zp(e,n))&&(ge=ls(A,"onBeforeInput"),0<ge.length&&(P=new Ir("onBeforeInput","beforeinput",null,n,U),Y.push({event:P,listeners:ge}),P.data=oe)),Eg(Y,e,A,n,U)}Xf(Y,t)})}function zl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ls(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Pa(e,n),i!=null&&a.unshift(zl(e,i,u)),i=Pa(e,t),i!=null&&a.push(zl(e,i,u))),e.tag===3)return a;e=e.return}return[]}function wg(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 u=t._reactName,d=[];n!==null&&n!==a;){var m=n,b=m.alternate,A=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||A===null||(b=A,i?(A=Pa(n,u),A!=null&&d.unshift(zl(n,A,b))):i||(A=Pa(n,u),A!=null&&d.push(zl(n,A,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Cg=/\r\n?/g,Ag=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace(Cg,`
|
|
49
|
+
`).replace(Ag,"")}function Kf(e,t){return t=Jf(t),Jf(e)===t}function Ne(e,t,n,a,i,u){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,u);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 u=="function"&&(n==="formAction"?(t!=="input"&&Ne(e,t,"name",i.name,i,null),Ne(e,t,"formEncType",i.formEncType,i,null),Ne(e,t,"formMethod",i.formMethod,i,null),Ne(e,t,"formTarget",i.formTarget,i,null)):(Ne(e,t,"encType",i.encType,i,null),Ne(e,t,"method",i.method,i,null),Ne(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&&me("scroll",e);break;case"onScrollEnd":a!=null&&me("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":me("beforetoggle",e),me("toggle",e),ui(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":ui(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=ap.get(n)||n,ui(e,n,a))}}function Ac(e,t,n,a,i,u){switch(n){case"style":Zr(e,a,u);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&&me("scroll",e);break;case"onScrollEnd":a!=null&&me("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),u=e[st]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof a=="function")){typeof u!="function"&&u!==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,""):ui(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":me("error",e),me("load",e);var a=!1,i=!1,u;for(u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ne(e,t,u,d,n,null)}}i&&Ne(e,t,"srcSet",n.srcSet,n,null),a&&Ne(e,t,"src",n.src,n,null);return;case"input":me("invalid",e);var m=u=d=i=null,b=null,A=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":A=U;break;case"value":u=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ne(e,t,a,U,n,null)}}Yr(e,u,m,b,A,d,i,!1);return;case"select":me("invalid",e),a=d=u=null;for(i in n)if(n.hasOwnProperty(i)&&(m=n[i],m!=null))switch(i){case"value":u=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:Ne(e,t,i,m,n,null)}t=u,n=d,e.multiple=!!a,t!=null?fa(e,!!a,t,!1):n!=null&&fa(e,!!a,n,!0);return;case"textarea":me("invalid",e),u=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":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Ne(e,t,d,m,n,null)}Xr(e,a,i,u);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:Ne(e,t,b,a,n,null)}return;case"dialog":me("beforetoggle",e),me("toggle",e),me("cancel",e),me("close",e);break;case"iframe":case"object":me("load",e);break;case"video":case"audio":for(a=0;a<kl.length;a++)me(kl[a],e);break;case"image":me("error",e),me("load",e);break;case"details":me("toggle",e);break;case"embed":case"source":case"link":me("error",e),me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in n)if(n.hasOwnProperty(A)&&(a=n[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ne(e,t,A,a,n,null)}return;default:if(Vs(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&&Ne(e,t,m,a,n,null))}function Rg(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,u=null,d=null,m=null,b=null,A=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)||Ne(e,t,O,null,a,Y)}}for(var R in a){var O=a[R];if(Y=n[R],a.hasOwnProperty(R)&&(O!=null||Y!=null))switch(R){case"type":u=O;break;case"name":i=O;break;case"checked":A=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&&Ne(e,t,R,O,a,Y)}}Gs(e,d,m,b,A,U,u,i);return;case"select":O=d=m=R=null;for(u in n)if(b=n[u],n.hasOwnProperty(u)&&b!=null)switch(u){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(u)||Ne(e,t,u,null,a,b)}for(i in a)if(u=a[i],b=n[i],a.hasOwnProperty(i)&&(u!=null||b!=null))switch(i){case"value":R=u;break;case"defaultValue":m=u;break;case"multiple":d=u;default:u!==b&&Ne(e,t,i,u,a,b)}t=m,n=d,a=O,R!=null?fa(e,!!n,R,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":O=R=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:Ne(e,t,m,null,a,i)}for(d in a)if(i=a[d],u=n[d],a.hasOwnProperty(d)&&(i!=null||u!=null))switch(d){case"value":R=i;break;case"defaultValue":O=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==u&&Ne(e,t,d,i,a,u)}Vr(e,R,O);return;case"option":for(var I in n)if(R=n[I],n.hasOwnProperty(I)&&R!=null&&!a.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:Ne(e,t,I,null,a,R)}for(b in a)if(R=a[b],O=n[b],a.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null))switch(b){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:Ne(e,t,b,R,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)R=n[le],n.hasOwnProperty(le)&&R!=null&&!a.hasOwnProperty(le)&&Ne(e,t,le,null,a,R);for(A in a)if(R=a[A],O=n[A],a.hasOwnProperty(A)&&R!==O&&(R!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Ne(e,t,A,R,a,O)}return;default:if(Vs(t)){for(var we in n)R=n[we],n.hasOwnProperty(we)&&R!==void 0&&!a.hasOwnProperty(we)&&Ac(e,t,we,void 0,a,R);for(U in a)R=a[U],O=n[U],!a.hasOwnProperty(U)||R===O||R===void 0&&O===void 0||Ac(e,t,U,R,a,O);return}}for(var _ in n)R=n[_],n.hasOwnProperty(_)&&R!=null&&!a.hasOwnProperty(_)&&Ne(e,t,_,null,a,R);for(Y in a)R=a[Y],O=n[Y],!a.hasOwnProperty(Y)||R===O||R==null&&O==null||Ne(e,t,Y,R,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 kg(){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],u=i.transferSize,d=i.initiatorType,m=i.duration;if(u&&m&&$f(d)){for(d=0,m=i.responseEnd,a+=1;a<n.length;a++){var b=n[a],A=b.startTime;if(A>m)break;var U=b.transferSize,Y=b.initiatorType;U&&$f(Y)&&(b=b.responseEnd,d+=U*(b<m?1:(m-A)/(b-A)))}if(--a,t+=8*(u+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rc=null,kc=null;function is(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 zg(){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,Mg=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,Og=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(Dg)}:If;function Dg(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 u=n.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Wa]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=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),Ls(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Ug(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(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Hg(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 Bg(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=is(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]);Ls(e)}var zt=new Map,sh=new Set;function ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=Z.d;Z.d={f:Lg,r:qg,D:Gg,C:Yg,L:Vg,m:Xg,X:Zg,S:Qg,M:Jg};function Lg(){var e=rn.f(),t=Wi();return e||t}function qg(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 uh(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+'"]'),sh.has(i)||(sh.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 Gg(e){rn.D(e),uh("dns-prefetch",e,null)}function Yg(e,t){rn.C(e,t),uh("preconnect",e,t)}function Vg(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 u=i;switch(t){case"style":u=Ya(e);break;case"script":u=Va(e)}zt.has(u)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zt.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ol(u))||t==="script"&&a.querySelector(Dl(u))||(t=a.createElement("link"),et(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Xg(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)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Va(e)}if(!zt.has(u)&&(e=v({rel:"modulepreload",href:e},t),zt.set(u,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Dl(u)))return}a=n.createElement("link"),et(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Qg(e,t,n){rn.S(e,t,n);var a=Ga;if(a&&e){var i=oa(a).hoistableStyles,u=Ya(e);t=t||"default";var d=i.get(u);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(Ol(u)))m.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(u))&&Bc(e,n);var b=d=a.createElement("link");Ke(b),et(b,"link",e),b._p=new Promise(function(A,U){b.onload=A,b.onerror=U}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,us(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},i.set(u,d)}}}function Zg(e,t){rn.X(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),u=a.get(i);u||(u=n.querySelector(Dl(i)),u||(e=v({src:e,async:!0},t),(t=zt.get(i))&&Lc(e,t),u=n.createElement("script"),Ke(u),et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Jg(e,t){rn.M(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),u=a.get(i);u||(u=n.querySelector(Dl(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(i))&&Lc(e,t),u=n.createElement("script"),Ke(u),et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function ch(e,t,n,a){var i=(i=se.current)?ss(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 u=oa(i).hoistableStyles,d=u.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=i.querySelector(Ol(e)))&&!u._p&&(d.instance=u,d.state.loading=5),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),u||Kg(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 Kg(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),us(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ya(n.href);var u=e.querySelector(Ol(i));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;a=rh(n),(i=zt.get(i))&&Bc(a,i),u=(e.ownerDocument||e).createElement("link"),Ke(u);var d=u;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(u,"link",a),t.state.loading|=4,us(u,n.precedence,e),t.instance=u;case"script":return u=Va(n.src),(i=e.querySelector(Dl(u)))?(t.instance=i,Ke(i),i):(a=n,(i=zt.get(u))&&(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,us(a,n.precedence,e));return t.instance}function us(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)u=m;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.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 cs=null;function dh(e,t,n){if(cs===null){var a=new Map,i=cs=new Map;i.set(n,a)}else i=cs,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 u=n[i];if(!(u[Wa]||u[Fe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(u):a.set(d,[u])}}return a}function fh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function $g(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 Fg(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),u=t.querySelector(Ol(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,Ke(u);return}u=t.ownerDocument||t,a=rh(a),(i=zt.get(i))&&Bc(a,i),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=rs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var qc=0;function Wg(e,t){return e.stylesheets&&e.count===0&&ds(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&ds(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&qc===0&&(qc=62500*kg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ds(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>qc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function rs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ds(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var os=null;function ds(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,os=new Map,t.forEach(Ig,e),os=null,rs.call(e))}function Ig(e,t){if(!(t.state.loading&4)){var n=os.get(e);if(n)var a=n.get(null);else{n=new Map,os.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var d=i[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),a=d)}a&&n.set(null,a)}i=t.instance,d=i.getAttribute("data-precedence"),u=n.get(d)||a,u===a&&n.set(null,i),n.set(d,i),this.count++,a=rs.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:L,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Pg(e,t,n,a,i,u,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=Ds(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ds(0),this.hiddenUpdates=Ds(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function mh(e,t,n,a,i,u,d,m,b,A,U,Y){return e=new Pg(e,t,n,d,b,A,U,Y,m),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=xu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Eu(u),e}function ph(e){return e?(e=ba,e):ba}function gh(e,t,n,a,i,u){i=ph(i),a.context===null?a.context=i:a.pendingContext=i,a=jn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),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=Us(t);var n=Zn(e,t);n!==null&&ft(n,e,t),Gc(e,t)}}var fs=!0;function ey(e,t,n,a){var i=z.T;z.T=null;var u=Z.p;try{Z.p=2,Yc(e,t,n,a)}finally{Z.p=u,z.T=i}}function ty(e,t,n,a){var i=z.T;z.T=null;var u=Z.p;try{Z.p=8,Yc(e,t,n,a)}finally{Z.p=u,z.T=i}}function Yc(e,t,n,a){if(fs){var i=Vc(a);if(i===null)Cc(e,t,a,hs,n),jh(e,a);else if(ay(i,e,t,n,a))a.stopPropagation();else if(jh(e,a),t&4&&-1<ny.indexOf(e)){for(;i!==null;){var u=ra(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Gn(u.pendingLanes);if(d!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-pt(d);m.entanglements[1]|=b,d&=~b}Gt(u),(je&6)===0&&($i=ht()+500,Rl(0))}}break;case 31:case 13:m=Zn(u,2),m!==null&&ft(m,u,2),Wi(),Gc(u,2)}if(u=Vc(a),u===null&&Cc(e,t,a,hs,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else Cc(e,t,a,null,n)}}function Vc(e){return e=Qs(e),Xc(e)}var hs=null;function Xc(e){if(hs=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=p(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 hs=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(Gm()){case Nr:return 2;case wr:return 8;case ni:case Ym: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=[],ny="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,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,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 ay(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 u=i.pointerId;return Hl.set(u,Ll(Hl.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Bl.set(u,Ll(Bl.get(u)||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=p(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 ms(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);Xs=a,n.target.dispatchEvent(a),Xs=null}else return t=ra(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Eh(e,t,n){ms(e)&&n.delete(t)}function ly(){Qc=!1,Mn!==null&&ms(Mn)&&(Mn=null),On!==null&&ms(On)&&(On=null),Dn!==null&&ms(Dn)&&(Dn=null),Hl.forEach(Eh),Bl.forEach(Eh)}function ps(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,ly)))}var gs=null;function Th(e){gs!==e&&(gs=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){gs===e&&(gs=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 u=ra(n);u!==null&&(e.splice(t,3),t-=3,Vu(u,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Xa(e){function t(b){return ps(b,e)}Mn!==null&&ps(Mn,e),On!==null&&ps(On,e),Dn!==null&&ps(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],u=n[a+1],d=i[st]||null;if(typeof u=="function")d||Th(n);else if(d){var m=null;if(u&&u.hasAttribute("formAction")){if(i=u,d=u[st]||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(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var 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}ys.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)},ys.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[ua]=null}};function ys(e){this._internalRoot=e}ys.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"));Z.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=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var iy={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{Ka=vs.inject(iy),mt=vs}catch{}}return Gl.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,a="",i=zd,u=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&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=mh(e,1,!1,null,null,n,a,null,i,u,d,_h),e[ua]=t.current,wc(e),new Zc(t)},Gl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var a=!1,i="",u=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&&(u=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,u,d,m,_h),t.context=ph(null),n=t.current,a=St(),a=Us(a),i=jn(a),i.callback=null,Sn(n,i,a),n=a,t.current.lanes=n,Fa(t,n),Gt(t),e[ua]=t.current,wc(e),new ys(t)},Gl.version="19.2.5",Gl}var Uh;function py(){if(Uh)return $c.exports;Uh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),$c.exports=my(),$c.exports}var gy=py();/**
|
|
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(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function yy(s={}){function c(r,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:p,search:E,hash:x}=h||r.location;return ir("",{pathname:p,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 xy(c,o,null,s)}function Ue(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function Vt(s,c){if(!s){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function vy(){return Math.random().toString(36).substring(2,10)}function Lh(s,c){return{usr:s.state,key:s.key,idx:c,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function ir(s,c,o=null,r,f){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof c=="string"?Qa(c):c,state:o,key:c&&c.key||r||vy(),unstable_mask:f}}function Ql({pathname:s="/",search:c="",hash:o=""}){return c&&c!=="?"&&(s+=c.charAt(0)==="?"?c:"?"+c),o&&o!=="#"&&(s+=o.charAt(0)==="#"?o:"#"+o),s}function Qa(s){let c={};if(s){let o=s.indexOf("#");o>=0&&(c.hash=s.substring(o),s=s.substring(0,o));let r=s.indexOf("?");r>=0&&(c.search=s.substring(r),s=s.substring(0,r)),s&&(c.pathname=s)}return c}function xy(s,c,o,r={}){let{window:f=document.defaultView,v5Compat:h=!1}=r,p=f.history,E="POP",x=null,g=S();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function S(){return(p.state||{idx:null}).idx}function v(){E="POP";let D=S(),G=D==null?null:D-g;g=D,x&&x({action:E,location:k.location,delta:G})}function C(D,G){E="PUSH";let W=Bh(D)?D:ir(k.location,D,G);g=S()+1;let L=Lh(W,g),M=k.createHref(W.unstable_mask||W);try{p.pushState(L,"",M)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(M)}h&&x&&x({action:E,location:k.location,delta:1})}function H(D,G){E="REPLACE";let W=Bh(D)?D:ir(k.location,D,G);g=S();let L=Lh(W,g),M=k.createHref(W.unstable_mask||W);p.replaceState(L,"",M),h&&x&&x({action:E,location:k.location,delta:0})}function B(D){return by(D)}let k={get action(){return E},get location(){return s(f,p)},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:B,encodeLocation(D){let G=B(D);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:C,replace:H,go(D){return p.go(D)}};return k}function by(s,c=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(o,"No window.location.(origin|href) available to create URL");let r=typeof s=="string"?s:Ql(s);return r=r.replace(/ $/,"%20"),!c&&r.startsWith("//")&&(r=o+r),new URL(r,o)}function am(s,c,o="/"){return jy(s,c,o,!1)}function jy(s,c,o,r){let f=typeof c=="string"?Qa(c):c,h=dn(f.pathname||"/",o);if(h==null)return null;let p=lm(s);Sy(p);let E=null;for(let x=0;E==null&&x<p.length;++x){let g=My(h);E=ky(p[x],g,r)}return E}function lm(s,c=[],o=[],r="",f=!1){let h=(p,E,x=f,g)=>{let S={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:E,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(r)&&x)return;Ue(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]),C=o.concat(S);p.children&&p.children.length>0&&(Ue(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),lm(p.children,c,C,v,x)),!(p.path==null&&!p.index)&&c.push({path:v,score:Ay(v,p.index),routesMeta:C})};return s.forEach((p,E)=>{var x;if(p.path===""||!((x=p.path)!=null&&x.includes("?")))h(p,E);else for(let g of im(p.path))h(p,E,!0,g)}),c}function im(s){let c=s.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 p=im(r.join("/")),E=[];return E.push(...p.map(x=>x===""?h:[h,x].join("/"))),f&&E.push(...p),E.map(x=>s.startsWith("/")&&x===""?"/":x)}function Sy(s){s.sort((c,o)=>c.score!==o.score?o.score-c.score:Ry(c.routesMeta.map(r=>r.childrenIndex),o.routesMeta.map(r=>r.childrenIndex)))}var Ey=/^:[\w-]+$/,Ty=3,_y=2,Ny=1,wy=10,Cy=-2,qh=s=>s==="*";function Ay(s,c){let o=s.split("/"),r=o.length;return o.some(qh)&&(r+=Cy),c&&(r+=_y),o.filter(f=>!qh(f)).reduce((f,h)=>f+(Ey.test(h)?Ty:h===""?Ny:wy),r)}function Ry(s,c){return s.length===c.length&&s.slice(0,-1).every((r,f)=>r===c[f])?s[s.length-1]-c[c.length-1]:0}function ky(s,c,o=!1){let{routesMeta:r}=s,f={},h="/",p=[];for(let E=0;E<r.length;++E){let x=r[E],g=E===r.length-1,S=h==="/"?c:c.slice(h.length)||"/",v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},S),C=x.route;if(!v&&g&&o&&!r[r.length-1].route.index&&(v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},S)),!v)return null;Object.assign(f,v.params),p.push({params:f,pathname:Ht([h,v.pathname]),pathnameBase:Hy(Ht([h,v.pathnameBase])),route:C}),v.pathnameBase!=="/"&&(h=Ht([h,v.pathnameBase]))}return p}function Ss(s,c){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[o,r]=zy(s.path,s.caseSensitive,s.end),f=c.match(o);if(!f)return null;let h=f[0],p=h.replace(/(.)\/+$/,"$1"),E=f.slice(1);return{params:r.reduce((g,{paramName:S,isOptional:v},C)=>{if(S==="*"){let B=E[C]||"";p=h.slice(0,h.length-B.length).replace(/(.)\/+$/,"$1")}const H=E[C];return v&&!H?g[S]=void 0:g[S]=(H||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:p,pattern:s}}function zy(s,c=!1,o=!0){Vt(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let r=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,E,x,g,S)=>{if(r.push({paramName:E,isOptional:x!=null}),x){let v=S.charAt(g+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(r.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),r]}function My(s){try{return s.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Vt(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),s}}function dn(s,c){if(c==="/")return s;if(!s.toLowerCase().startsWith(c.toLowerCase()))return null;let o=c.endsWith("/")?c.length-1:c.length,r=s.charAt(o);return r&&r!=="/"?null:s.slice(o)||"/"}var Oy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Dy(s,c="/"){let{pathname:o,search:r="",hash:f=""}=typeof s=="string"?Qa(s):s,h;return o?(o=um(o),o.startsWith("/")?h=Gh(o.substring(1),"/"):h=Gh(o,c)):h=c,{pathname:h,search:By(r),hash:Ly(f)}}function Gh(s,c){let o=Es(c).split("/");return s.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function Pc(s,c,o,r){return`Cannot include a '${s}' 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 Uy(s){return s.filter((c,o)=>o===0||c.route.path&&c.route.path.length>0)}function sm(s){let c=Uy(s);return c.map((o,r)=>r===c.length-1?o.pathname:o.pathnameBase)}function dr(s,c,o,r=!1){let f;typeof s=="string"?f=Qa(s):(f={...s},Ue(!f.pathname||!f.pathname.includes("?"),Pc("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),Pc("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),Pc("#","search","hash",f)));let h=s===""||f.pathname==="",p=h?"/":f.pathname,E;if(p==null)E=o;else{let v=c.length-1;if(!r&&p.startsWith("..")){let C=p.split("/");for(;C[0]==="..";)C.shift(),v-=1;f.pathname=C.join("/")}E=v>=0?c[v]:"/"}let x=Dy(f,E),g=p&&p!=="/"&&p.endsWith("/"),S=(h||p===".")&&o.endsWith("/");return!x.pathname.endsWith("/")&&(g||S)&&(x.pathname+="/"),x}var um=s=>s.replace(/\/\/+/g,"/"),Ht=s=>um(s.join("/")),Es=s=>s.replace(/\/+$/,""),Hy=s=>Es(s).replace(/^\/*/,"/"),By=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Ly=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,qy=class{constructor(s,c,o,r=!1){this.status=s,this.statusText=c||"",this.internal=r,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Gy(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Yy(s){let c=s.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(s,c){let o=s;if(typeof o!="string"||!Oy.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),p=o.startsWith("//")?new URL(h.protocol+o):new URL(o),E=dn(p.pathname,c);p.origin===h.origin&&E!=null?o=E+p.search+p.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 Vy=["GET",...om];new Set(Vy);var Za=y.createContext(null);Za.displayName="DataRouter";var _s=y.createContext(null);_s.displayName="DataRouterState";var dm=y.createContext(!1);function Xy(){return y.useContext(dm)}var fm=y.createContext({isTransitioning:!1});fm.displayName="ViewTransition";var Qy=y.createContext(new Map);Qy.displayName="Fetchers";var Zy=y.createContext(null);Zy.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",Jy="REDIRECT",Ky="ROUTE_ERROR_RESPONSE";function $y(s){if(s.startsWith(`${hm}:${Jy}:{`))try{let c=JSON.parse(s.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 Fy(s){if(s.startsWith(`${hm}:${Ky}:{`))try{let c=JSON.parse(s.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new qy(c.status,c.statusText,c.data)}catch{}}function Wy(s,{relative:c}={}){Ue($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:p}=Wl(s,{relative:c}),E=h;return o!=="/"&&(E=h==="/"?o:Ht([o,h])),r.createHref({pathname:E,search:p,hash:f})}function $l(){return y.useContext(Kl)!=null}function fn(){return Ue($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(s){y.useContext(Mt).static||y.useLayoutEffect(s)}function Iy(){let{isDataRoute:s}=y.useContext(Xt);return s?dv():Py()}function Py(){Ue($l(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(Za),{basename:c,navigator:o}=y.useContext(Mt),{matches:r}=y.useContext(Xt),{pathname:f}=fn(),h=JSON.stringify(sm(r)),p=y.useRef(!1);return pm(()=>{p.current=!0}),y.useCallback((x,g={})=>{if(Vt(p.current,mm),!p.current)return;if(typeof x=="number"){o.go(x);return}let S=dr(x,JSON.parse(h),f,g.relative==="path");s==null&&c!=="/"&&(S.pathname=S.pathname==="/"?c:Ht([c,S.pathname])),(g.replace?o.replace:o.push)(S,g.state,g)},[c,o,h,f,s])}y.createContext(null);function Fl(){let{matches:s}=y.useContext(Xt),c=s[s.length-1];return(c==null?void 0:c.params)??{}}function Wl(s,{relative:c}={}){let{matches:o}=y.useContext(Xt),{pathname:r}=fn(),f=JSON.stringify(sm(o));return y.useMemo(()=>dr(s,JSON.parse(f),r,c==="path"),[s,f,r,c])}function ev(s,c){return gm(s,c)}function gm(s,c,o){var D;Ue($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],p=h?h.params:{},E=h?h.pathname:"/",x=h?h.pathnameBase:"/",g=h&&h.route;{let G=g&&g.path||"";vm(E,!g||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;Ue(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 C=v.pathname||"/",H=C;if(x!=="/"){let G=x.replace(/^\//,"").split("/");H="/"+C.replace(/^\//,"").split("/").slice(G.length).join("/")}let B=am(s,{pathname:H});Vt(g||B!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(B==null||B[B.length-1].route.element!==void 0||B[B.length-1].route.Component!==void 0||B[B.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=iv(B&&B.map(G=>Object.assign({},G,{params:Object.assign({},p,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 tv(){let s=ov(),c=Gy(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),o=s instanceof Error?s.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},h={padding:"2px 4px",backgroundColor:r},p=null;return console.error("Error handled by React Router default ErrorBoundary:",s),p=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,p)}var nv=y.createElement(tv,null),ym=class extends y.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,c){return c.location!==s.location||c.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:c.error,location:c.location,revalidation:s.revalidation||c.revalidation}}componentDidCatch(s,c){this.props.onError?this.props.onError(s,c):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const o=Fy(s.digest);o&&(s=o)}let c=s!==void 0?y.createElement(Xt.Provider,{value:this.props.routeContext},y.createElement(fr.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(av,{error:s},c):c}};ym.contextType=dm;var er=new WeakMap;function av({children:s,error:c}){let{basename:o}=y.useContext(Mt);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let r=$y(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 p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:r.replace}));throw er.set(c,p),p}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return s}function lv({routeContext:s,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:s},o)}function iv(s,c=[],o){let r=o==null?void 0:o.state;if(s==null){if(!r)return null;if(r.errors)s=r.matches;else if(c.length===0&&!r.initialized&&r.matches.length>0)s=r.matches;else return null}let f=s,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);Ue(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 p=!1,E=-1;if(o&&r){p=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:C,errors:H}=r,B=v.route.loader&&!C.hasOwnProperty(v.route.id)&&(!H||H[v.route.id]===void 0);if(v.route.lazy||B){o.isStatic&&(p=!0),E>=0?f=f.slice(0,E+1):f=[f[0]];break}}}}let x=o==null?void 0:o.onError,g=r&&x?(S,v)=>{var C,H;x(S,{location:r.location,params:((H=(C=r.matches)==null?void 0:C[0])==null?void 0:H.params)??{},unstable_pattern:Yy(r.matches),errorInfo:v})}:void 0;return f.reduceRight((S,v,C)=>{let H,B=!1,k=null,D=null;r&&(H=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||nv,p&&(E<0&&C===0?(vm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),B=!0,D=null):E===C&&(B=!0,D=v.route.hydrateFallbackElement||null)));let G=c.concat(f.slice(0,C+1)),W=()=>{let L;return H?L=k:B?L=D:v.route.Component?L=y.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=S,y.createElement(lv,{match:v,routeContext:{outlet:S,matches:G,isDataRoute:r!=null},children:L})};return r&&(v.route.ErrorBoundary||v.route.errorElement||C===0)?y.createElement(ym,{location:r.location,revalidation:r.revalidation,component:k,error:H,children:W(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:g}):W()},null)}function hr(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sv(s){let c=y.useContext(Za);return Ue(c,hr(s)),c}function uv(s){let c=y.useContext(_s);return Ue(c,hr(s)),c}function cv(s){let c=y.useContext(Xt);return Ue(c,hr(s)),c}function mr(s){let c=cv(s),o=c.matches[c.matches.length-1];return Ue(o.route.id,`${s} can only be used on routes that contain a unique "id"`),o.route.id}function rv(){return mr("useRouteId")}function ov(){var r;let s=y.useContext(fr),c=uv("useRouteError"),o=mr("useRouteError");return s!==void 0?s:(r=c.errors)==null?void 0:r[o]}function dv(){let{router:s}=sv("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 s.navigate(f):await s.navigate(f,{fromRouteId:c,...h}))},[s,c])}var Yh={};function vm(s,c,o){!c&&!Yh[s]&&(Yh[s]=!0,Vt(!1,o))}y.memo(fv);function fv({routes:s,future:c,state:o,isStatic:r,onError:f}){return gm(s,void 0,{state:o,isStatic:r,onError:f})}function nt(s){Ue(!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 hv({basename:s="/",children:c=null,location:o,navigationType:r="POP",navigator:f,static:h=!1,unstable_useTransitions:p}){Ue(!$l(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let E=s.replace(/^\/*/,"/"),x=y.useMemo(()=>({basename:E,navigator:f,static:h,unstable_useTransitions:p,future:{}}),[E,f,h,p]);typeof o=="string"&&(o=Qa(o));let{pathname:g="/",search:S="",hash:v="",state:C=null,key:H="default",unstable_mask:B}=o,k=y.useMemo(()=>{let D=dn(g,E);return D==null?null:{location:{pathname:D,search:S,hash:v,state:C,key:H,unstable_mask:B},navigationType:r}},[E,g,S,v,C,H,r,B]);return Vt(k!=null,`<Router basename="${E}"> is not able to match the URL "${g}${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:s,location:c}){return ev(sr(s),c)}function sr(s,c=[]){let o=[];return y.Children.forEach(s,(r,f)=>{if(!y.isValidElement(r))return;let h=[...c,f];if(r.type===y.Fragment){o.push.apply(o,sr(r.props.children,h));return}Ue(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>`),Ue(!r.props.index||!r.props.children,"An index route cannot have child routes.");let p={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&&(p.children=sr(r.props.children,h)),o.push(p)}),o}var bs="get",js="application/x-www-form-urlencoded";function Ns(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function mv(s){return Ns(s)&&s.tagName.toLowerCase()==="button"}function pv(s){return Ns(s)&&s.tagName.toLowerCase()==="form"}function gv(s){return Ns(s)&&s.tagName.toLowerCase()==="input"}function yv(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function vv(s,c){return s.button===0&&(!c||c==="_self")&&!yv(s)}var xs=null;function xv(){if(xs===null)try{new FormData(document.createElement("form"),0),xs=!1}catch{xs=!0}return xs}var bv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nr(s){return s!=null&&!bv.has(s)?(Vt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${js}"`),null):s}function jv(s,c){let o,r,f,h,p;if(pv(s)){let E=s.getAttribute("action");r=E?dn(E,c):null,o=s.getAttribute("method")||bs,f=nr(s.getAttribute("enctype"))||js,h=new FormData(s)}else if(mv(s)||gv(s)&&(s.type==="submit"||s.type==="image")){let E=s.form;if(E==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=s.getAttribute("formaction")||E.getAttribute("action");if(r=x?dn(x,c):null,o=s.getAttribute("formmethod")||E.getAttribute("method")||bs,f=nr(s.getAttribute("formenctype"))||nr(E.getAttribute("enctype"))||js,h=new FormData(E,s),!xv()){let{name:g,type:S,value:v}=s;if(S==="image"){let C=g?`${g}.`:"";h.append(`${C}x`,"0"),h.append(`${C}y`,"0")}else g&&h.append(g,v)}}else{if(Ns(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=bs,r=null,f=js,p=s}return h&&f==="text/plain"&&(p=h,h=void 0),{action:r,method:o.toLowerCase(),encType:f,formData:h,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pr(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function xm(s,c,o,r){let f=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;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=`${Es(c)}/_root.${r}`:f.pathname=`${Es(f.pathname)}.${r}`,f}async function Sv(s,c){if(s.id in c)return c[s.id];try{let o=await import(s.module);return c[s.id]=o,o}catch(o){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ev(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Tv(s,c,o){let r=await Promise.all(s.map(async f=>{let h=c.routes[f.route.id];if(h){let p=await Sv(h,o);return p.links?p.links():[]}return[]}));return Cv(r.flat(1).filter(Ev).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Vh(s,c,o,r,f,h){let p=(x,g)=>o[g]?x.route.id!==o[g].route.id:!0,E=(x,g)=>{var S;return o[g].pathname!==x.pathname||((S=o[g].route.path)==null?void 0:S.endsWith("*"))&&o[g].params["*"]!==x.params["*"]};return h==="assets"?c.filter((x,g)=>p(x,g)||E(x,g)):h==="data"?c.filter((x,g)=>{var v;let S=r.routes[x.route.id];if(!S||!S.hasLoader)return!1;if(p(x,g)||E(x,g))return!0;if(x.route.shouldRevalidate){let C=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(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function _v(s,c,{includeHydrateFallback:o}={}){return Nv(s.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 Nv(s){return[...new Set(s)]}function wv(s){let c={},o=Object.keys(s).sort();for(let r of o)c[r]=s[r];return c}function Cv(s,c){let o=new Set;return new Set(c),s.reduce((r,f)=>{let h=JSON.stringify(wv(f));return o.has(h)||(o.add(h),r.push({key:h,link:f})),r},[])}function gr(){let s=y.useContext(Za);return pr(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Av(){let s=y.useContext(_s);return pr(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var yr=y.createContext(void 0);yr.displayName="FrameworkContext";function vr(){let s=y.useContext(yr);return pr(s,"You must render this element inside a <HydratedRouter> element"),s}function Rv(s,c){let o=y.useContext(yr),[r,f]=y.useState(!1),[h,p]=y.useState(!1),{onFocus:E,onBlur:x,onMouseEnter:g,onMouseLeave:S,onTouchStart:v}=c,C=y.useRef(null);y.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let k=G=>{G.forEach(W=>{p(W.isIntersecting)})},D=new IntersectionObserver(k,{threshold:.5});return C.current&&D.observe(C.current),()=>{D.disconnect()}}},[s]),y.useEffect(()=>{if(r){let k=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(k)}}},[r]);let H=()=>{f(!0)},B=()=>{f(!1),p(!1)};return o?s!=="intent"?[h,C,{}]:[h,C,{onFocus:Yl(E,H),onBlur:Yl(x,B),onMouseEnter:Yl(g,H),onMouseLeave:Yl(S,B),onTouchStart:Yl(v,H)}]:[!1,C,{}]}function Yl(s,c){return o=>{s&&s(o),o.defaultPrevented||c(o)}}function kv({page:s,...c}){let o=Xy(),{router:r}=gr(),f=y.useMemo(()=>am(r.routes,s,r.basename),[r.routes,s,r.basename]);return f?o?y.createElement(Mv,{page:s,matches:f,...c}):y.createElement(Ov,{page:s,matches:f,...c}):null}function zv(s){let{manifest:c,routeModules:o}=vr(),[r,f]=y.useState([]);return y.useEffect(()=>{let h=!1;return Tv(s,c,o).then(p=>{h||f(p)}),()=>{h=!0}},[s,c,o]),r}function Mv({page:s,matches:c,...o}){let r=fn(),{future:f}=vr(),{basename:h}=gr(),p=y.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let E=xm(s,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),x=!1,g=[];for(let S of c)typeof S.route.shouldRevalidate=="function"?x=!0:g.push(S.route.id);return x&&g.length>0&&E.searchParams.set("_routes",g.join(",")),[E.pathname+E.search]},[h,f.unstable_trailingSlashAwareDataRequests,s,r,c]);return y.createElement(y.Fragment,null,p.map(E=>y.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...o})))}function Ov({page:s,matches:c,...o}){let r=fn(),{future:f,manifest:h,routeModules:p}=vr(),{basename:E}=gr(),{loaderData:x,matches:g}=Av(),S=y.useMemo(()=>Vh(s,c,g,h,r,"data"),[s,c,g,h,r]),v=y.useMemo(()=>Vh(s,c,g,h,r,"assets"),[s,c,g,h,r]),C=y.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let k=new Set,D=!1;if(c.forEach(W=>{var M;let L=h.routes[W.route.id];!L||!L.hasLoader||(!S.some(J=>J.route.id===W.route.id)&&W.route.id in x&&((M=p[W.route.id])!=null&&M.shouldRevalidate)||L.hasClientLoader?D=!0:k.add(W.route.id))}),k.size===0)return[];let G=xm(s,E,f.unstable_trailingSlashAwareDataRequests,"data");return D&&k.size>0&&G.searchParams.set("_routes",c.filter(W=>k.has(W.route.id)).map(W=>W.route.id).join(",")),[G.pathname+G.search]},[E,f.unstable_trailingSlashAwareDataRequests,x,r,h,S,c,s,p]),H=y.useMemo(()=>_v(v,h),[v,h]),B=zv(v);return y.createElement(y.Fragment,null,C.map(k=>y.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...o})),H.map(k=>y.createElement("link",{key:k,rel:"modulepreload",href:k,...o})),B.map(({key:k,link:D})=>y.createElement("link",{key:k,nonce:o.nonce,...D,crossOrigin:D.crossOrigin??o.crossOrigin})))}function Dv(...s){return c=>{s.forEach(o=>{typeof o=="function"?o(c):o!=null&&(o.current=c)})}}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Uv&&(window.__reactRouterVersion="7.14.2")}catch{}function Hv({basename:s,children:c,unstable_useTransitions:o,window:r}){let f=y.useRef();f.current==null&&(f.current=yy({window:r,v5Compat:!0}));let h=f.current,[p,E]=y.useState({action:h.action,location:h.location}),x=y.useCallback(g=>{o===!1?E(g):y.startTransition(()=>E(g))},[o]);return y.useLayoutEffect(()=>h.listen(x),[h,x]),y.createElement(hv,{basename:s,children:c,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:o})}var bm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=y.forwardRef(function({onClick:c,discover:o="render",prefetch:r="none",relative:f,reloadDocument:h,replace:p,unstable_mask:E,state:x,target:g,to:S,preventScrollReset:v,viewTransition:C,unstable_defaultShouldRevalidate:H,...B},k){let{basename:D,navigator:G,unstable_useTransitions:W}=y.useContext(Mt),L=typeof S=="string"&&bm.test(S),M=rm(S,D);S=M.to;let J=Wy(S,{relative:f}),K=fn(),X=null;if(E){let te=dr(E,[],K.unstable_mask?K.unstable_mask.pathname:"/",!0);D!=="/"&&(te.pathname=te.pathname==="/"?D:Ht([D,te.pathname])),X=G.createHref(te)}let[ue,fe,He]=Rv(r,B),ke=Gv(S,{replace:p,unstable_mask:E,state:x,target:g,preventScrollReset:v,relative:f,viewTransition:C,unstable_defaultShouldRevalidate:H,unstable_useTransitions:W});function ze(te){c&&c(te),te.defaultPrevented||ke(te)}let ie=!(M.isExternal||h),$=y.createElement("a",{...B,...He,href:(ie?X:void 0)||M.absoluteURL||J,onClick:ie?ze:c,ref:Dv(k,fe),target:g,"data-discover":!L&&o==="render"?"true":void 0});return ue&&!L?y.createElement(y.Fragment,null,$,y.createElement(kv,{page:J})):$});De.displayName="Link";var Bv=y.forwardRef(function({"aria-current":c="page",caseSensitive:o=!1,className:r="",end:f=!1,style:h,to:p,viewTransition:E,children:x,...g},S){let v=Wl(p,{relative:g.relative}),C=fn(),H=y.useContext(_s),{navigator:B,basename:k}=y.useContext(Mt),D=H!=null&&Zv(v)&&E===!0,G=B.encodeLocation?B.encodeLocation(v).pathname:v.pathname,W=C.pathname,L=H&&H.navigation&&H.navigation.location?H.navigation.location.pathname:null;o||(W=W.toLowerCase(),L=L?L.toLowerCase():null,G=G.toLowerCase()),L&&k&&(L=dn(L,k)||L);const M=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let J=W===G||!f&&W.startsWith(G)&&W.charAt(M)==="/",K=L!=null&&(L===G||!f&&L.startsWith(G)&&L.charAt(G.length)==="/"),X={isActive:J,isPending:K,isTransitioning:D},ue=J?c:void 0,fe;typeof r=="function"?fe=r(X):fe=[r,J?"active":null,K?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let He=typeof h=="function"?h(X):h;return y.createElement(De,{...g,"aria-current":ue,className:fe,ref:S,style:He,to:p,viewTransition:E},typeof x=="function"?x(X):x)});Bv.displayName="NavLink";var Lv=y.forwardRef(({discover:s="render",fetcherKey:c,navigate:o,reloadDocument:r,replace:f,state:h,method:p=bs,action:E,onSubmit:x,relative:g,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:C,...H},B)=>{let{unstable_useTransitions:k}=y.useContext(Mt),D=Xv(),G=Qv(E,{relative:g}),W=p.toLowerCase()==="get"?"get":"post",L=typeof E=="string"&&bm.test(E),M=J=>{if(x&&x(J),J.defaultPrevented)return;J.preventDefault();let K=J.nativeEvent.submitter,X=(K==null?void 0:K.getAttribute("formmethod"))||p,ue=()=>D(K||J.currentTarget,{fetcherKey:c,method:X,navigate:o,replace:f,state:h,relative:g,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:C});k&&o!==!1?y.startTransition(()=>ue()):ue()};return y.createElement("form",{ref:B,method:W,action:G,onSubmit:r?x:M,...H,"data-discover":!L&&s==="render"?"true":void 0})});Lv.displayName="Form";function qv(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jm(s){let c=y.useContext(Za);return Ue(c,qv(s)),c}function Gv(s,{target:c,replace:o,unstable_mask:r,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x,unstable_useTransitions:g}={}){let S=Iy(),v=fn(),C=Wl(s,{relative:p});return y.useCallback(H=>{if(vv(H,c)){H.preventDefault();let B=o!==void 0?o:Ql(v)===Ql(C),k=()=>S(s,{replace:B,unstable_mask:r,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x});g?y.startTransition(()=>k()):k()}},[v,S,C,o,r,f,c,s,h,p,E,x,g])}var Yv=0,Vv=()=>`__${String(++Yv)}__`;function Xv(){let{router:s}=jm("useSubmit"),{basename:c}=y.useContext(Mt),o=rv(),r=s.fetch,f=s.navigate;return y.useCallback(async(h,p={})=>{let{action:E,method:x,encType:g,formData:S,body:v}=jv(h,c);if(p.navigate===!1){let C=p.fetcherKey||Vv();await r(C,o,p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||x,formEncType:p.encType||g,flushSync:p.flushSync})}else await f(p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||x,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:o,flushSync:p.flushSync,viewTransition:p.viewTransition})},[r,f,c,o])}function Qv(s,{relative:c}={}){let{basename:o}=y.useContext(Mt),r=y.useContext(Xt);Ue(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),h={...Wl(s||".",{relative:c})},p=fn();if(s==null){h.search=p.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(!s||s===".")&&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 Zv(s,{relative:c}={}){let o=y.useContext(fm);Ue(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(s,{relative:c});if(!o.isTransitioning)return!1;let h=dn(o.currentLocation.pathname,r)||o.currentLocation.pathname,p=dn(o.nextLocation.pathname,r)||o.nextLocation.pathname;return Ss(f.pathname,p)!=null||Ss(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 s=window.location.pathname.match(Em);if(!s)return null;try{return decodeURIComponent(s[1])}catch{return null}}function Jv(){if(typeof window>"u")return"";const s=window.location.pathname;if(Sm.test(s))return"/vault/admin";const c=s.match(Em);return c?`/vault/${c[1]}/admin`:s==="/admin"||s.startsWith("/admin/")?"/admin":""}let Bn=null,Yt=null,ia=null,on=null,Xh=!1;const Kv=.8,$v=1e3,Fv=3e4;function Wv(){if(typeof window>"u")return;const s=window.location.hash;if(!s||s.length<2)return;const c=new URLSearchParams(s.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 Iv(){Bn=null,Yt=null,on=null,ws()}async function Zl(s){if(typeof window>"u")return{kind:"network-error",message:"no window"};let c;try{c=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{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?Pv(o.expires_at):null,on=s,_m(),n0(),{kind:"ok",token:o.token})}function Pv(s){const c=Date.parse(s);return Number.isNaN(c)?null:c}async function ur(s){if(Bn){if(Yt===null||Yt>Date.now())return{kind:"ok",token:Bn};Bn=null,Yt=null,ws()}return Zl(s)}async function e0(s){typeof window>"u"||Bn||await Zl(s).catch(()=>{})}function _m(){if(ws(),Yt===null||on===null||typeof document<"u"&&document.visibilityState==="hidden")return;const s=Date.now(),c=Yt-s;if(c<=0)return;const o=Math.max(Math.floor(c*Kv),$v);ia=setTimeout(()=>{t0()},o)}function ws(){ia!==null&&(clearTimeout(ia),ia=null)}async function t0(){if(ia=null,on===null)return;const s=await Zl(on);s.kind!=="ok"&&(typeof console<"u"&&console.warn("[vault-admin-spa] proactive token refresh failed; will retry once",s),ia=setTimeout(()=>{ia=null,on!==null&&Zl(on).catch(()=>{})},Fv))}function n0(){Xh||typeof document>"u"||(Xh=!0,document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ws();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 Oe(s,c,o={}){let r=br();if(!r){const g=await ur(s);if(g.kind!=="ok")throw new de(401,"no admin token — sign in to the hub to refresh");r=g.token}const{headers:f,...h}=o,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(c,{...h,headers:p(r)});if(E.status!==401)return E;Iv();const x=await ur(s);return x.kind!=="ok"?E:fetch(c,{...h,headers:p(x.token)})}async function Nm(){const s=await fetch("/vaults/list",{headers:{accept:"application/json"}});if(s.status===404)return[];if(!s.ok)throw new de(s.status,`vaults/list fetch failed: ${s.status}`);return(await s.json()).vaults??[]}async function a0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/`);if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function l0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`);if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function wm(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function i0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/run-now`,{method:"POST"});if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function s0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/push-now`,{method:"POST"});if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function jr(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`);if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function u0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`,{method:"DELETE"});if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function c0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/device-code`,{method:"POST"});if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function r0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.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 at(o));return await o.json()}async function o0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/pat`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function Cm(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.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(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/repos`);if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function d0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.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 f0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.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 at(o));return await o.json()}async function h0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(o.ok)return{attached:!1,job:await o.json()};if(o.status===409){const r=await o.text();let f,h=r;try{const p=JSON.parse(r);typeof p.job_id=="string"&&p.job_id.length>0&&(f=p.job_id),p.message&&(h=p.message)}catch{}if(f)return{attached:!0,job:await Rm(s,f)};throw new de(409,h,"concurrent_import")}throw new de(o.status,await at(o))}async function Rm(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import/${encodeURIComponent(c)}`);if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function m0(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`);if(!c.ok)throw new de(c.status,await at(c));return await c.json()}async function p0(s,c){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:c})});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function at(s){return(await Sr(s)).message}async function Sr(s){try{const c=await s.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:`${s.status} ${s.statusText}`}}function km(s){const c=s.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 g0(s){if(!s)return[];const c=km(s);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(s){return g0(br()).includes(`vault:${s}:admin`)}function zm(){const s=br();if(!s)return null;const c=km(s);if(!c)return null;const o=c.iss;return typeof o!="string"||o.length===0?null:o.replace(/\/$/,"")}let Vl=null,Xl=null;function y0(s){const c=Date.parse(s);return Number.isNaN(c)?null:c}async function v0(){if(typeof window>"u")return{kind:"network-error",message:"no window"};let s;try{s=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(s.status===403)return{kind:"forbidden"};if(s.status===401||s.status===404)return{kind:"auth-required",status:s.status};if(!s.ok)return{kind:"network-error",message:`hub returned ${s.status}`};let c;try{c=await s.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?y0(c.expires_at):null,{kind:"ok",token:c.token})}async function Ts(){if(Vl){if(Xl===null||Xl>Date.now())return{kind:"ok",token:Vl};Vl=null,Xl=null}return v0()}function x0(){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(s,c={}){let o;const r=await Ts();if(r.kind!=="ok")throw Qh(r);o=r.token;const{headers:f,...h}=c,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(s,{...h,headers:p(o)});if(E.status!==401)return E;x0();const x=await Ts();if(x.kind!=="ok")throw Qh(x);return fetch(s,{...h,headers:p(x.token)})}function Qh(s){return s.kind==="forbidden"?new Ln(403,"host-admin token mint forbidden — not the hub admin","forbidden"):s.kind==="auth-required"?new Ln(s.status,"no host-admin session — sign in to the hub to manage tokens","auth-required"):new Ln(0,s.message,"network-error")}function Jl(){if(typeof window>"u")return;const s=zm();window.location.href=s?`${s}/account/`:"/account/"}async function b0(){let s;try{s=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}})}catch(f){return{kind:"error",message:f instanceof Error?f.message:String(f)}}if(s.status===404)return{kind:"no-hub"};if(!s.ok)return{kind:"error",message:`well-known fetch failed: ${s.status}`};let c;try{c=await s.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 j0(s){var E,x;const c=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{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(s)}/.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,p=(x=f.bytes)==null?void 0:x.total;if(typeof h!="number"||typeof p!="number")throw new Error("usage report malformed");return{notes:h,totalBytes:p}}function S0(s){if(!Number.isFinite(s)||s<0)return"0 B";if(s<1024)return`${Math.round(s)} B`;const c=s/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 E0=/^[a-z0-9_-]+$/,T0=new Set(["list","new","assets","admin"]);function _0(s){return s.length===0?null:E0.test(s)?s.length<2||s.length>32?"Vault names must be 2–32 characters long.":T0.has(s)?`"${s}" 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 Mm(s){let c,o=`${s.status}`;try{const r=await s.json();typeof r.error=="string"&&(c=r.error),o=r.error_description??r.error??o}catch{}return new cr(s.status,o,c)}async function N0(s){const c=await Il("/vaults",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:s})});if(!c.ok)throw await Mm(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 w0(s){const c=await Il(`/vaults/${encodeURIComponent(s)}`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:s})});if(!c.ok)throw await Mm(c);const o=await c.json();return{name:o.name,cascade:o.cascade,warnings:o.warnings??[]}}const Zh=5e3;function sa({vaultName:s,status:c,onRecovered:o,ensure:r}){const f=c===403;if(y.useEffect(()=>{if(f)return;let x=!1,g=null;const S=async()=>{if(x||typeof document<"u"&&document.visibilityState!=="visible")return;const C=await(r?r():ur(s??""));if(!x){if(C.kind==="ok"){o();return}g=setTimeout(()=>void S(),Zh)}},v=()=>{typeof document>"u"||document.visibilityState==="visible"&&(g!==null&&(clearTimeout(g),g=null),S())};return g=setTimeout(()=>void S(),Zh),typeof document<"u"&&document.addEventListener("visibilitychange",v),()=>{x=!0,g!==null&&clearTimeout(g),typeof document<"u"&&document.removeEventListener("visibilitychange",v)}},[s,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=C0(),p=`/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:p,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 C0(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function A0(){const[s,c]=y.useState({kind:"loading"}),[o,r]=y.useState({kind:"checking"}),[f,h]=y.useState({}),[p,E]=y.useState({kind:"idle"}),[x,g]=y.useState(""),[S,v]=y.useState({kind:"idle"}),[C,H]=y.useState(0);y.useEffect(()=>{let L=!1;return b0().then(async M=>{if(!L){if(M.kind==="ok"){c({kind:"ok",vaults:M.vaults});return}if(M.kind==="no-hub"){const J=await Nm().catch(()=>[]);if(L)return;c({kind:"no-hub",names:J});return}c({kind:"error",message:M.message})}}),()=>{L=!0}},[C]),y.useEffect(()=>{if(s.kind!=="ok"||o.kind==="ok")return;let L=!1;return Ts().then(M=>{L||(M.kind==="ok"?r({kind:"ok"}):M.kind==="forbidden"?r({kind:"banner",status:403}):M.kind==="auth-required"?r({kind:"banner",status:M.status}):r({kind:"banner",status:null}))}),()=>{L=!0}},[s.kind]),y.useEffect(()=>{if(s.kind!=="ok")return;const L=s.vaults.map(J=>J.name);if(L.length===0)return;let M=!1;h(J=>{const K={...J};for(const X of L)K[X]||(K[X]={kind:"loading"});return K});for(const J of L)j0(J).then(K=>{M||h(X=>({...X,[J]:{kind:"ok",usage:K}}))}).catch(()=>{M||h(K=>({...K,[J]:{kind:"error"}}))});return()=>{M=!0}},[s]);const B=y.useCallback(()=>{r({kind:"ok"}),h({}),H(L=>L+1)},[]),k=_0(x);async function D(L){if(L.preventDefault(),!(x.length===0||k)){E({kind:"submitting"});try{const M=await N0(x);E({kind:"created",result:M}),g(""),H(J=>J+1)}catch(M){if(M instanceof Ln){if(M.disposition==="forbidden"){Jl();return}r({kind:"banner",status:M.status||null}),E({kind:"idle"});return}const J=M instanceof cr?`${M.status}: ${M.message}`:M instanceof Error?M.message:String(M);E({kind:"error",message:J})}}}async function G(L){v({kind:"deleting",name:L});try{const M=await w0(L);v({kind:"done",result:M}),h(J=>{const K={...J};return delete K[L],K}),H(J=>J+1)}catch(M){if(M instanceof Ln){if(M.disposition==="forbidden"){Jl();return}r({kind:"banner",status:M.status||null}),v({kind:"idle"});return}const J=M instanceof cr||M instanceof Error?M.message:String(M);v({kind:"error",name:L,message:J})}}if(s.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(s.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."]})]}),s.names.length>0?l.jsx("div",{style:{marginTop:"1rem"},children:s.names.map(L=>l.jsxs("a",{href:`/vault/${encodeURIComponent(L)}/admin/`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:L})})}),l.jsx("div",{className:"chev",children:"→"})]},L))}):null]});if(s.kind==="error")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:s.message})}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>H(L=>L+1),children:"Retry"})]});const W=o.kind==="ok";return l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsxs("h2",{children:["Vaults (",s.vaults.length,")"]})}),o.kind==="banner"?l.jsx(sa,{status:o.status,onRecovered:B,ensure:Ts}):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(k0,{result:S.result,onDismiss:()=>v({kind:"idle"})}):null,s.vaults.length===0?l.jsxs("div",{className:"empty",children:["No vaults yet",W?" — create your first below.":"."]}):l.jsx("div",{style:{marginTop:"1rem"},children:s.vaults.map(L=>{const M=f[L.name],J=(M==null?void 0:M.kind)==="ok"?`${M.usage.notes} ${M.usage.notes===1?"note":"notes"} · ${S0(M.usage.totalBytes)}`:(M==null?void 0:M.kind)==="loading"?"…":"—",K=S.kind==="confirming"&&S.name===L.name,X=S.kind==="deleting"&&S.name===L.name,ue=S.kind==="error"&&S.name===L.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:L.name}),L.version?l.jsxs("span",{className:"tag muted",title:"Vault version",children:[" ","v",L.version]}):null]}),l.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${L.name}`,children:J}),ue?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:ue})}):null]}),l.jsxs("div",{className:"vault-row-actions",children:[l.jsx("a",{href:`/vault/${encodeURIComponent(L.name)}/admin/`,children:l.jsx("button",{type:"button",children:"Manage"})}),W?l.jsx("button",{type:"button",className:"secondary",disabled:X,onClick:()=>v(K?{kind:"idle"}:{kind:"confirming",name:L.name,typed:""}),children:X?"Deleting…":"Delete"}):null]})]}),K&&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:L.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 ${L.name} to confirm deletion`,placeholder:L.name,value:S.typed,onChange:fe=>v({kind:"confirming",name:L.name,typed:fe.target.value})}),l.jsx("button",{type:"button",disabled:S.typed!==L.name,onClick:()=>void G(L.name),children:"Delete this vault"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Cancel"})]})]}):null]},L.name)})}),W?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"}),p.kind==="created"?l.jsx(R0,{result:p.result,onDone:()=>E({kind:"idle"})}):l.jsxs("form",{onSubmit:L=>void D(L),children:[p.kind==="error"?l.jsxs("div",{className:"error-banner",style:{marginBottom:"0.5rem"},children:["Couldn't create vault: ",l.jsx("code",{children:p.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:L=>g(L.target.value),placeholder:"e.g. work, home, scratch",disabled:p.kind==="submitting"}),l.jsx("button",{type:"submit",disabled:x.length===0||!!k||p.kind==="submitting",children:p.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 R0({result:s,onDone:c}){const[o,r]=y.useState(!1),f=async()=>{if(s.token)try{await navigator.clipboard.writeText(s.token),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return s.token?l.jsxs("div",{className:"mint-banner",children:[l.jsxs("h4",{style:{margin:"0 0 0.5rem"},children:["Vault ",l.jsx("code",{children:s.name})," created — access token (shown once)"]}),l.jsxs("p",{className:"muted",children:["A hub-issued JWT scoped ",l.jsxs("code",{children:["vault:",s.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:",s.name,":read"]}),"."]}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{children:s.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"})})]}):s.created?l.jsxs("div",{className:"section",children:[l.jsxs("p",{children:["Vault ",l.jsx("code",{children:s.name})," was created",s.tokenGuidance?l.jsxs(l.Fragment,{children:[" ","— ",l.jsx("span",{className:"muted",children:s.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:",s.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:s.name})," already existed; nothing new was created."]}),l.jsx("button",{type:"button",onClick:c,children:"Continue"})]})}function k0({result:s,onDismiss:c}){const o=s.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:s.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,s.warnings.length>0?l.jsx("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:s.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 z0="https://parachute.computer/install#connect-mcp-clients";function Om(s,c){return`${s.replace(/\/+$/,"")}/vault/${encodeURIComponent(c)}/mcp`}function M0(s,c){return`claude mcp add --transport http parachute-${c} ${Om(s,c)}`}function O0(){var s;return typeof window>"u"||!((s=window.location)!=null&&s.origin)?null:window.location.origin}function Jh({value:s,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(s).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},children:o?"Copied ✓":c})}function D0({vaultName:s,origin:c,tokensHref:o}){const r=c??O0(),f=r?Om(r,s):`/vault/${encodeURIComponent(s)}/mcp`,h=r?M0(r,s):`claude mcp add --transport http parachute-${s} ${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:s})," 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:",s,":read vault:",s,":write"]})," — not admin) on the"," ",o?l.jsx(De,{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:z0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]})}function Kh({vaultName:s}={}){const c=Fl(),o=s??c.name,r=s!==void 0,f=r?"/tokens":`/vault/${encodeURIComponent(o??"")}/tokens`,h=r?"/mirror":`/vault/${encodeURIComponent(o??"")}/mirror`,p=r?"/schema":`/vault/${encodeURIComponent(o??"")}/schema`,E=r?"/embeddings":`/vault/${encodeURIComponent(o??"")}/embeddings`,[x,g]=y.useState({kind:"loading"}),[S,v]=y.useState(0),C=y.useCallback(()=>v(k=>k+1),[]);if(y.useEffect(()=>{let k=!1;if(!o){g({kind:"missing"});return}return g({kind:"loading"}),a0(o).then(D=>{k||g({kind:"ok",vault:D})}).catch(D=>{if(k)return;if(D instanceof de){if(D.status===401||D.status===403){g({kind:"auth-required",status:D.status});return}if(D.status===404){g({kind:"missing"});return}g({kind:"error",message:`${D.status}: ${D.message}`});return}const G=D instanceof Error?D.message:String(D);g({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(sa,{vaultName:o??"",status:x.status,onRecovered:C}),r?null:l.jsx(De,{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(De,{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(De,{to:"/",children:"← Back to vaults"})]});const{vault:H}=x,B=`/vault/${H.name}`;return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:H.name})]}),r?null:l.jsx(De,{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:H.name})}),H.description?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Description"}),l.jsx("div",{children:H.description})]}):null,l.jsx("div",{children:"Mount"}),l.jsx("div",{children:l.jsx("code",{children:B})}),H.createdAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Created"}),l.jsx("div",{children:l.jsx("code",{children:H.createdAt})})]}):null]}),l.jsx("div",{className:"section",children:l.jsx(D0,{vaultName:H.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:H.stats.totalNotes})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Tags"}),l.jsx("div",{className:"value",children:H.stats.tagCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Attachments"}),l.jsx("div",{className:"value",children:H.stats.attachmentCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Links"}),l.jsx("div",{className:"value",children:H.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(De,{to:f,children:"Tokens →"}),l.jsx("span",{className:"dim",children:" mint, list, and revoke hub access tokens (JWTs)"})]}),l.jsxs("li",{children:[l.jsx(De,{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(De,{to:p,children:"Schema →"}),l.jsx("span",{className:"dim",children:" edit tag schemas — fields, indexing, hierarchy, strict validation"})]}),l.jsxs("li",{children:[l.jsx(De,{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(U0,{vaultName:H.name})]})]})]})}function U0({vaultName:s}){const c=zm();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(s)}`;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:s}={}){const c=Fl(),o=s??c.name,r=s!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return p({kind:"loading"}),m0(o).then(v=>{S||p({kind:"ok",settings:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const C=v instanceof Error?v.message:String(v);p({kind:"error",message:C})}),()=>{S=!0}},[o,E]);const g=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(De,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:g}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(H0,{vaultName:o,settings:h.settings,onSettings:S=>p({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(De,{to:"/",children:"← Back to vaults"})]})}function H0({vaultName:s,settings:c,onSettings:o}){const[r,f]=y.useState(c.enabled),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,S]=y.useState(!1),v=r!==c.enabled,C=y.useCallback(async()=>{p(!0),x(null),S(!1);try{const H=await p0(s,r);o(H),S(!0)}catch(H){x(H instanceof Error?H.message:String(H))}finally{p(!1)}},[s,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:[g?"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."]}):g?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:H=>{f(H.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:C,disabled:!v||h,children:h?"Saving…":r?"Enable semantic search":"Disable semantic search"})})]})}const B0=[{value:"events",label:"On change (default)"},{value:"manual",label:"Manual only"}],L0=[{id:"history",label:"History",subtext:"Local audit trail. Hidden under vault data. Events-driven.",apply:s=>({...s,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:s=>({...s,enabled:!0,location:"external",sync_mode:"events",auto_commit:!0})},{id:"manual",label:"Manual Export",subtext:"Snapshot on demand. No auto-fire.",apply:s=>({...s,enabled:!0,location:"external",sync_mode:"manual",auto_commit:!0,auto_push:!1})}];function Fh({vaultName:s}={}){const c=Fl(),o=s??c.name,r=s!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return p({kind:"loading"}),l0(o).then(v=>{S||p({kind:"ok",snapshot:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const C=v instanceof Error?v.message:String(v);p({kind:"error",message:C})}),()=>{S=!0}},[o,E]);const g=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(De,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:g}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(q0,{vaultName:o,snapshot:h.snapshot,onRefresh:()=>x(S=>S+1),onSnapshot:S=>p({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(De,{to:"/",children:"← Back to vaults"})]})}function q0({vaultName:s,snapshot:c,onRefresh:o,onSnapshot:r}){const f=Er(s),[h,p]=y.useState(null),[E,x]=y.useState(null);y.useEffect(()=>{if(!f)return;let v=!1;return jr(s).then(C=>{v||p(C)}).catch(C=>{v||x(C instanceof Error?C.message:String(C))}),()=>{v=!0}},[s,f]);const[g,S]=y.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(G0,{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:",s,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to make changes.`]}),f?l.jsx(X0,{vaultName:s,creds:h,credsError:E,onCredsChanged:p,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":g,children:g?"Hide advanced settings":"Advanced settings"}),g?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."})]}),g?l.jsxs(l.Fragment,{children:[l.jsx(Y0,{status:c.status,config:c.config,creds:h,canRun:f&&c.status.enabled,vaultName:s,onSnapshot:r}),l.jsx(V0,{vaultName:s,initial:c.config,readOnly:!f,creds:h,onSaved:v=>{r(v),o()}}),f?l.jsx(ex,{vaultName:s,creds:h}):null]}):null]})}function G0({status:s,config:c,creds:o}){var p;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"?(p=o.github_oauth)==null?void 0:p.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."]}),s.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 Y0({status:s,config:c,creds:o,canRun:r,vaultName:f,onSnapshot:h}){const p=c.enabled,[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,C]=y.useState(null),H=async()=>{x(!0),C(null);try{const G=await i0(f);h(G)}catch(G){C(G instanceof Error?G.message:String(G))}finally{x(!1)}},B=async()=>{S(!0),C(null);try{const G=await s0(f);h(G)}catch(G){C(G instanceof Error?G.message:String(G))}finally{S(!1)}},k=!!(o!=null&&o.active_method)||c.auto_push,D=!r||g||!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:p?l.jsx("code",{children:"yes"}):l.jsx("code",{children:"no"})}),l.jsx("div",{children:"Watch loop"}),l.jsx("div",{children:s.watch_running?l.jsx("code",{children:"running"}):l.jsx("code",{children:"stopped"})}),l.jsx("div",{children:"Path"}),l.jsx("div",{children:s.mirror_path?l.jsx("code",{children:s.mirror_path}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last export"}),l.jsx("div",{children:s.last_export_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:s.last_export_at}),s.last_export_notes_count!==null?l.jsxs("span",{className:"dim",children:[" ","· ",s.last_export_notes_count," note",s.last_export_notes_count===1?"":"s"]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),l.jsx("div",{children:"Last commit"}),l.jsx("div",{children:s.last_commit_sha?l.jsx("code",{children:s.last_commit_sha.slice(0,10)}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last push"}),l.jsx("div",{children:s.last_push_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:s.last_push_at}),s.last_push_sha?l.jsxs("span",{className:"dim",children:[" ","· ",l.jsx("code",{children:s.last_push_sha.slice(0,10)})]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),s.commits_unpushed!==null&&s.commits_unpushed>0?l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsxs("div",{className:"dim",children:[s.commits_unpushed," commit",s.commits_unpushed===1?"":"s"," ready to push"]})]}):null]}),s.last_push_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last push failed:"})," ",l.jsx("code",{children:s.last_push_error})]}):null,s.last_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last error:"})," ",l.jsx("code",{children:s.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:H,disabled:!r||E,title:p?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:B,disabled:D,title:p?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:g?"Pushing…":"Push now"})]})]})}function V0({vaultName:s,initial:c,readOnly:o,creds:r,onSaved:f}){const[h,p]=y.useState(c),[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,C]=y.useState(null),[H,B]=y.useState(null),[k,D]=y.useState(0);y.useEffect(()=>{p(c)},[c]);const G=M=>{const J=M.apply(h);p(J)},W=M=>{p(J=>({...J,sync_mode:M}))},L=async M=>{if(M.preventDefault(),!o){S(!0),C(null),B(null);try{const J=await wm(s,h);f(J),D(K=>K+1),setTimeout(()=>D(0),3e3)}catch(J){if(J instanceof de){const K=J.message;C(K);const X=K.toLowerCase();X.includes("external_path")?B("external_path"):X.includes("commit_template")?B("commit_template"):X.includes("safety_net_seconds")?B("safety_net_seconds"):X.includes("sync_mode")?B("sync_mode"):X.includes("auto_push")?B("auto_push"):X.includes("location")?B("location"):B(null)}else C(J instanceof Error?J.message:String(J))}finally{S(!1)}}};return l.jsxs("form",{className:"section",onSubmit:L,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:M=>p(J=>({...J,enabled:M.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:L0.map(M=>l.jsxs("button",{type:"button",className:"preset-card",disabled:o,onClick:()=>G(M),"aria-label":`Apply ${M.label} preset`,children:[l.jsx("strong",{children:M.label}),l.jsx("span",{className:"dim",children:M.subtext})]},M.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:()=>p(M=>({...M,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:()=>p(M=>({...M,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:M=>p(J=>({...J,external_path:M.target.value.length>0?M.target.value:null})),placeholder:"/Users/you/Documents/vault-mirror","aria-invalid":H==="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:M=>W(M.target.value),children:B0.map(M=>l.jsx("option",{value:M.value,children:M.label},M.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:M=>p(J=>({...J,auto_commit:M.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:M=>p(J=>({...J,auto_push:M.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(M=>!M),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:M=>p(J=>({...J,commit_template:M.target.value})),"aria-invalid":H==="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||g,children:g?"Saving…":"Save"})})]})}function X0({vaultName:s,creds:c,credsError:o,onCredsChanged:r,onCredsSaved:f,onConfigChanged:h,locationIsExternal:p}){var ve;const[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,C]=y.useState(!1),[H,B]=y.useState(!1),[k,D]=y.useState(null),[G,W]=y.useState(null),[L,M]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(null),[fe,He]=y.useState(null),[ke,ze]=y.useState(0),ie=(c==null?void 0:c.active_method)==="github_oauth"&&!!c.github_oauth;y.useEffect(()=>{if(!ie){ue(null),He(null);return}let F=!1;return Cm(s).then(j=>{F||(ue(j),He(null))}).catch(j=>{F||He(j instanceof Error?j.message:String(j))}),()=>{F=!0}},[s,ie,ke]);const $=()=>ze(F=>F+1),te=(c==null?void 0:c.active_method)!==null&&(c==null?void 0:c.active_method)!==void 0,z=async()=>{if(confirm("Disconnect git remote credentials? Auto-push will stop working until you reconnect.")){B(!0),D(null);try{const F=await u0(s);r(F),M(null)}catch(F){D(F instanceof Error?F.message:String(F))}finally{B(!1)}}},Z=async()=>{K(!0),D(null);try{await wm(s,{enabled:!0}),M(!0),h()}catch(F){D(F instanceof Error?F.message:String(F))}finally{K(!1)}},ne=()=>{x(!1),jr(s).then(F=>r(F)).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:te?"Backed up to a git remote":"Back up to GitHub"}),l.jsx("p",{className:"dim",style:{marginTop:0},children:te?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."]})}),!p&&!(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,te?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."}),ie&&fe?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:fe})," ",l.jsx("button",{type:"button",className:"secondary",onClick:$,children:"Retry"})]}):null,ie&&!X&&!fe?l.jsx("p",{className:"dim",children:"Checking GitHub App installation…"}):null,ie&&X&&!X.installed?l.jsx(Dm,{install:X,onRecheck:$}):null,ie&&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(F=>l.jsxs("div",{children:[l.jsx("code",{children:F.account_login})," ",l.jsxs("span",{className:"dim",children:["(",F.account_type==="Organization"?"organization":"user"," ·"," ",F.repository_selection==="selected"?"Selected repos only":"All repos",")"]})]},F.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,L===!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:()=>M(null),"aria-label":"Dismiss history note",children:"Dismiss"})]}):null,L==="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:Z,disabled:J,children:J?"Turning on…":"Turn on history now"})]}):null,L===!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 F=G,j=F.initial_push.fired&&F.initial_push.pushed?F.initial_push.sha:void 0,N=F.initial_push.fired&&!F.initial_push.pushed?F.initial_push.error:void 0;return F.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."}):F.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:()=>W(null),style:{marginLeft:"0.5rem"},"aria-label":"Dismiss",children:"Dismiss"})]}):null,l.jsx("div",{className:"actions",children:te?l.jsx("button",{type:"button",className:"secondary",onClick:z,disabled:H,children:H?"Disconnecting…":"Disconnect"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>C(!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(Q0,{install:X}),E?l.jsx(Wh,{vaultName:s,mode:"connect",onClose:ne,onHistory:M,onConnected:(F,j)=>{r(F),j&&(W(j),f(j)),x(!1)}}):null,g&&ie?l.jsx(Wh,{vaultName:s,mode:"choose-repo",initialLogin:((ve=c==null?void 0:c.github_oauth)==null?void 0:ve.user_login)??"",onClose:()=>S(!1),onHistory:M,onConnected:(F,j)=>{r(F),j&&(W(j),f(j)),S(!1)}}):null,v?l.jsx(F0,{vaultName:s,onClose:()=>C(!1),onSaved:F=>{r(F),W(F),M(F.history_enabled),f(F),C(!1)}}):null]})}function Dm({install:s,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:s.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 Q0({install:s}){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:[s?s.app.is_shared_default?l.jsxs(l.Fragment,{children:["Using the shared Parachute GitHub App (",l.jsx("code",{children:s.app.slug}),")."]}):l.jsxs(l.Fragment,{children:["Using your own GitHub App (",l.jsx("code",{children:s.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:s,mode:c,initialLogin:o,onClose:r,onConnected:f,onHistory:h}){const[p,E]=y.useState(c==="choose-repo"?{kind:"probing",user:{login:o??""}}:{kind:"starting"}),[x,g]=y.useState(Date.now()),S=y.useRef(!1),v=p.kind==="polling";y.useEffect(()=>{if(!v)return;const k=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(k)},[v]),y.useEffect(()=>()=>{S.current=!0},[]),y.useEffect(()=>{if(p.kind!=="starting")return;let k=!1;return c0(s).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}},[p.kind,s]),y.useEffect(()=>{if(p.kind!=="polling")return;S.current=!1;const k=p.code;let D=!1,G=null,W=p.pollIntervalMs;const L=async()=>{if(!(D||S.current))try{const M=await r0(s,k.polling_id);if(D)return;if(M.state==="granted"){h(M.history_enabled),E({kind:"probing",user:{login:M.user.login}});return}if(M.state==="denied"){E({kind:"error",message:"Authorization denied."});return}if(M.state==="expired"){E({kind:"error",message:"The device code expired. Try again."});return}M.state==="slow_down"&&(W=M.interval*1e3),G=setTimeout(L,W)}catch(M){if(D)return;E({kind:"error",message:M instanceof Error?M.message:String(M)})}};return G=setTimeout(L,W),()=>{D=!0,G&&clearTimeout(G)}},[p,s,h]),y.useEffect(()=>{if(p.kind!=="probing")return;const k=p.user;let D=!1;return Cm(s).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}},[p,s]);const C=y.useCallback(k=>E({kind:"error",message:k}),[]),H=y.useCallback(()=>{E(k=>k.kind==="picker"?{kind:"probing",user:k.user}:k)},[]),B=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"})]}),p.kind==="starting"?l.jsx("p",{className:"muted",children:"Requesting device code from GitHub…"}):null,p.kind==="polling"?l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Step 1."})," Open"," ",l.jsx("a",{href:p.code.verification_uri,target:"_blank",rel:"noreferrer",children:p.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:p.code.user_code}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>B(p.code.user_code),children:"Copy"})]}),l.jsxs("p",{className:"dim",children:["Waiting for authorization…"," ",Z0(p.code.expires_in,p.startedAt,x)]})]}):null,p.kind==="probing"?l.jsx("p",{className:"muted",children:"Checking where the app is installed…"}):null,p.kind==="install-needed"?l.jsx(Dm,{install:p.install,onRecheck:()=>E({kind:"probing",user:p.user})}):null,p.kind==="picker"?l.jsx(K0,{vaultName:s,user:p.user,install:p.install,onPicked:async(k,D)=>{const G=await f0(s,{owner:k,name:D});h(G.history_enabled);const W=await jr(s);f(W,G)},onError:C,onNotInstalled:H}):null,p.kind==="error"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:p.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 Z0(s,c,o){const r=Math.floor((o-c)/1e3),f=Math.max(0,s-r),h=Math.floor(f/60),p=f%60;return`${h}:${String(p).padStart(2,"0")} remaining`}function J0(s){return s.account_type==="Organization"?`https://github.com/organizations/${encodeURIComponent(s.account_login)}/settings/installations/${s.id}`:`https://github.com/settings/installations/${s.id}`}function K0({vaultName:s,user:c,install:o,onPicked:r,onError:f,onNotInstalled:h}){const[p,E]=y.useState(null),[x,g]=y.useState(!1),[S,v]=y.useState(""),[C,H]=y.useState(null),[B,k]=y.useState(!1),[D,G]=y.useState(""),[W,L]=y.useState(!1),[M,J]=y.useState(!1),[K,X]=y.useState(0);y.useEffect(()=>{let $=!1;return E(null),Am(s).then(te=>{if(!$){if(!te.installed){h();return}E(te.repos),g(!!te.truncated)}}).catch(te=>{$||f(te instanceof Error?te.message:String(te))}),()=>{$=!0}},[s,f,h,K]);const ue=(p??[]).filter($=>S.length===0?!0:$.full_name.toLowerCase().includes(S.toLowerCase())),fe=[];for(const $ of ue){const te=fe[fe.length-1];if(te&&te.login===$.account_login)te.repos.push($);else{const z=fe.find(Z=>Z.login===$.account_login);z?z.repos.push($):fe.push({login:$.account_login,repos:[$]})}}const He=$=>o.installations.find(te=>te.account_login===$),ke=async($,te)=>{H(`${$}/${te}`);try{await r($,te)}catch(z){f(z instanceof Error?z.message:String(z))}finally{H(null)}},ze=async()=>{if(D.trim().length!==0){k(!0);try{const $=await d0(s,{name:D.trim(),description:"Parachute Vault mirror",private:!0});await r($.owner,$.name)}catch($){$ instanceof de&&$.errorType==="app_lacks_admin_permission"?J(!0):f($ instanceof Error?$.message:String($))}finally{k(!1)}}},ie=o.app.is_shared_default||M;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:$=>v($.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,p===null?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,p!==null?l.jsxs("div",{className:"repo-list",children:[ue.length===0&&S.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',S,'".']}):null,ue.length===0&&S.length===0&&p.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,fe.map($=>{const te=He($.login);return l.jsxs("div",{children:[l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0.25rem"},children:[l.jsx("strong",{children:$.login}),te?l.jsxs(l.Fragment,{children:[" ","·"," ",te.account_type==="Organization"?"organization":"user"," ","·"," ",te.repository_selection==="selected"?"Selected repos only":"All repos"]}):null]}),$.repos.map(z=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>ke(z.owner,z.name),disabled:C!==null,children:[l.jsxs("span",{children:[l.jsx("strong",{children:z.name}),z.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:z.updated_at.slice(0,10)})]},z.full_name))]},$.login)})]}):null,l.jsxs("div",{className:"actions",style:{marginTop:"0.75rem"},children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>X($=>$+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 →"})]}),W?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:$=>G($.target.value)}),ie?l.jsx($0,{install:o,suggestedName:D.trim(),onRefresh:()=>X($=>$+1)}):l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:ze,disabled:B||D.trim().length===0,children:B?"Creating…":"Create"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!1),disabled:B,children:"Cancel"})]})]}):l.jsx("div",{className:"actions",style:{marginTop:"0.75rem"},children:l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!0),children:"+ Create new private repo"})})]})}function $0({install:s,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:s.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:"," ",s.installations.length>0?s.installations.map((f,h)=>l.jsxs("span",{children:[h>0?" · ":null,l.jsxs("a",{href:J0(f),target:"_blank",rel:"noreferrer",children:["configure on ",f.account_login," →"]})]},f.id)):l.jsx("a",{href:s.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 F0({vaultName:s,onClose:c,onSaved:o}){const[r,f]=y.useState(""),[h,p]=y.useState(""),[E,x]=y.useState(""),[g,S]=y.useState(!1),[v,C]=y.useState(null),H=async B=>{B.preventDefault(),S(!0),C(null);try{const k=await o0(s,{token:r.trim(),remote_url:h.trim(),label:E.trim()||void 0});o(k)}catch(k){C(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:g,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:H,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:B=>f(B.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:B=>p(B.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:B=>x(B.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:g,children:g?"Validating…":"Validate & save"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:g,children:"Cancel"})]})]})]})})}const W0=1500,I0={cloning:"Cloning the repo…",importing:"Importing notes into this vault…",syncing:"Setting up sync back to this repo…"};function P0(s){const c=Math.max(0,Math.floor(s/1e3)),o=Math.floor(c/60),r=c%60;return o>0?`${o}m ${r}s`:`${r}s`}function ex({vaultName:s,creds:c}){const[o,r]=y.useState(""),[f,h]=y.useState("merge"),[p,E]=y.useState(!1),[x,g]=y.useState(""),[S,v]=y.useState(!1),[C,H]=y.useState({kind:"idle"}),[B,k]=y.useState(""),[D,G]=y.useState(!1),W=(c==null?void 0:c.active_method)==="github_oauth"&&c.github_oauth!==null,L=(c==null?void 0:c.active_method)!==null&&(c==null?void 0:c.active_method)!==void 0,M=f!=="replace"||B.trim()===s,J=C.kind!=="running"&&o.trim().length>0&&M&&(!p||x.trim().length>0),K=async()=>{let ie;p?ie={kind:"pat",token:x.trim()}:L?ie=null:ie={kind:"none"};try{const{job:$}=await h0(s,{remote_url:o.trim(),mode:f,credentials:ie,enable_sync:S});H({kind:"running",stage:$.stage,detail:$.detail,jobId:$.job_id,startedAt:Date.parse($.started_at)||Date.now()})}catch($){const te=$ instanceof Error?$.message:String($);H({kind:"error",message:te})}},[X,ue]=y.useState(0),fe=C.kind==="running"?C.startedAt:0;y.useEffect(()=>{if(!fe){ue(0);return}ue(Date.now()-fe);const ie=window.setInterval(()=>ue(Date.now()-fe),1e3);return()=>window.clearInterval(ie)},[fe]);const He=C.kind,ke=C.kind==="running"?C.jobId:null;y.useEffect(()=>{if(He!=="running"||!ke)return;let ie=!1,$=null;const te=async()=>{var z;if(!ie){try{const Z=await Rm(s,ke);if(ie)return;if(Z.status==="running")H({kind:"running",stage:Z.stage,detail:Z.detail,jobId:ke,startedAt:fe});else if(Z.status==="succeeded"&&Z.result){H({kind:"success",result:Z.result,remoteUrl:o.trim(),mode:f});return}else{H({kind:"error",message:((z=Z.error)==null?void 0:z.message)??"The import failed for an unknown reason."});return}}catch(Z){if(ie)return;if(Z instanceof de&&Z.status===404){H({kind:"error",message:"Lost track of this import — the vault restarted while it was running. Check the vault's contents, then retry (merge mode is safe to re-run)."});return}}$=window.setTimeout(()=>void te(),W0)}};return te(),()=>{ie=!0,$!==null&&window.clearTimeout($)}},[He,ke,s]);const ze=()=>{H({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."]}),C.kind==="success"?l.jsx(tx,{vaultName:s,result:C.result,remoteUrl:C.remoteUrl,mode:C.mode,onReset:ze}):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:ie=>r(ie.target.value),disabled:C.kind==="running"}),W?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:C.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,p?l.jsx("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:"Using the one-time token below. It's used for this clone only — not saved, and not used for backup."}):L?l.jsxs("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:["Using your saved git credentials to ",l.jsx("strong",{children:"read"})," this repo. Reading doesn't change them, and doesn't back anything up."]}):l.jsxs("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:["No saved git credentials — the import will be unauthenticated. Fine for a public repo; a private one will fail with a clear error. For a private repo, use the one-time token below —"," ",l.jsx("strong",{children:"you don't need to set up backup in order to import"}),"."]})]}),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:C.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:C.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 "',s,'" before importing.']})," To confirm, type the vault name below:"]}),l.jsx("input",{id:"import-confirm-name",type:"text",value:B,placeholder:s,onChange:ie=>k(ie.target.value),disabled:C.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:p,onChange:ie=>E(ie.target.checked),disabled:C.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"Use a one-time token for this import"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"A read-only Personal Access Token is enough. It's used for this clone and then discarded — never saved, never used to push."}),p?l.jsx("input",{id:"import-per-call-pat",type:"password",value:x,placeholder:"ghp_… or similar",onChange:ie=>g(ie.target.value),disabled:C.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:ie=>v(ie.target.checked),disabled:C.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"After importing, also back this vault up to the same repo"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:S?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"This vault will start pushing to that repo."})," If another machine already backs up there, leave this off — set backup up separately once you've checked the import looks right."]}):l.jsxs(l.Fragment,{children:["Off by default. The import only ",l.jsx("strong",{children:"reads"})," the repo — nothing is written back to it, and your existing backup settings are left alone."]})})]}),C.kind==="error"?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:C.message})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:K,disabled:!J,title:M?o.trim().length===0?"Provide a remote URL.":p&&x.trim().length===0?"Provide a token for one-time credential.":void 0:"Type the vault name to confirm Replace.",children:C.kind==="running"?"Importing…":"Start import"})}),C.kind==="running"?l.jsxs("div",{className:"form-row","aria-live":"polite",children:[l.jsxs("p",{style:{margin:"0 0 0.25rem"},children:[I0[C.stage]," ",l.jsxs("span",{className:"dim",children:["(",P0(X),")"]})]}),C.detail?l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85em",fontFamily:"var(--mono, monospace)"},children:C.detail}):null,l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"Large vaults can take a while. This keeps running on the server — you can leave this page and come back."})]}):null]}),D?l.jsx(nx,{vaultName:s,onClose:()=>G(!1),onPicked:ie=>{r(ie),G(!1)}}):null]})}function tx({vaultName:s,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,p)=>l.jsx("li",{children:l.jsx("code",{style:{fontSize:"0.85em"},children:h})},p))})]}):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:s})," ","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 nx({vaultName:s,onClose:c,onPicked:o}){const[r,f]=y.useState(null),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,S]=y.useState(""),[v,C]=y.useState(null);y.useEffect(()=>{let B=!1;return Am(s).then(k=>{if(!B){if(!k.installed){x(k.install_url),f([]);return}f(k.repos),p(!!k.truncated)}}).catch(k=>{B||C(k instanceof Error?k.message:String(k))}),()=>{B=!0}},[s]);const H=(r??[]).filter(B=>g.length===0?!0:B.full_name.toLowerCase().includes(g.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:g,onChange:B=>S(B.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:[H.length===0&&g.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',g,'".']}):null,H.length===0&&g.length===0&&r.length===0&&!E?l.jsx("p",{className:"dim",children:"The app installation doesn't include any repos."}):null,H.map(B=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>o(B.clone_url),children:[l.jsxs("span",{children:[l.jsx("strong",{children:B.name}),B.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:B.updated_at.slice(0,10)})]},B.full_name))]}):null]})})}const ax=["string","integer","number","boolean","array","object","reference"],rr=new Set(["string","integer","boolean","reference"]),Pl=s=>`/vault/${encodeURIComponent(s)}/api/tags`;async function ei(s){try{const c=await s.text(),o=JSON.parse(c);return o.message||o.error||c||`${s.status}`}catch{return`${s.status} ${s.statusText}`}}async function lx(s){const c=await Oe(s,`${Pl(s)}?include_schema=true`);if(!c.ok)throw new de(c.status,await ei(c));return await c.json()}async function ix(s,c){const o=await Oe(s,`${Pl(s)}/${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 sx(s,c){const o=await Oe(s,`${Pl(s)}/${encodeURIComponent(c)}/effective`);if(!o.ok)throw new de(o.status,await ei(o));return await o.json()}async function ux(s,c,o){const r=await Oe(s,`${Pl(s)}/${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 cx(s,c,o){const r=await Oe(s,`${Pl(s)}/${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:s}={}){const c=Fl(),o=s??c.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,S]=y.useState(null);y.useEffect(()=>{let H=!1;if(o)return p({kind:"loading"}),lx(o).then(B=>{H||p({kind:"ok",tags:B})}).catch(B=>{if(!H){if(B instanceof de&&(B.status===401||B.status===403)){p({kind:"auth-required",status:B.status});return}p({kind:"error",message:B instanceof Error?B.message:String(B)})}}),()=>{H=!0}},[o,E]);const v=y.useCallback(()=>x(H=>H+1),[]),C=y.useCallback(()=>x(H=>H+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(De,{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(sa,{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(ox,{tags:h.tags,selected:g,onSelect:S}),g?l.jsx(mx,{vaultName:o,tag:g,allTags:h.tags,onSaved:C},g):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 rx(s){const c=s.fields??{},o=Object.values(c);return{hasSchema:s.description!==null&&s.description!==void 0||o.length>0,indexed:o.filter(r=>r.indexed===!0).length,strict:o.some(r=>r.strict===!0)}}function ox({tags:s,selected:c,onSelect:o}){const r=y.useMemo(()=>[...s].sort((f,h)=>f.name.localeCompare(h.name)),[s]);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=rx(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 dx=0;function Um(){return`row-${dx++}`}function fx(s){return s?Object.entries(s).map(([c,o])=>({key:Um(),name:c,spec:{...o}})):[]}function Ph(s){const c={};for(const o of s){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 hx=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;function mx({vaultName:s,tag:c,allTags:o,onSaved:r}){const f=Er(s),[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;return p({kind:"loading"}),Promise.all([ix(s,c),sx(s,c)]).then(([v,C])=>{if(S)return;p({kind:"ok",record:v??{name:c,count:0,description:null,fields:null,relationships:null,parent_names:null,created_at:null,updated_at:null},effective:C})}).catch(v=>{if(!S){if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}p({kind:"error",message:v instanceof Error?v.message:String(v)})}}),()=>{S=!0}},[s,c,E]);const g=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(sa,{vaultName:s,status:h.status,onRecovered:g})}):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(px,{vaultName:s,tag:c,record:h.record,effective:h.effective,allTags:o,isAdmin:f,onSaved:()=>{x(S=>S+1),r()}})}function px({vaultName:s,tag:c,record:o,effective:r,allTags:f,isAdmin:h,onSaved:p}){const[E,x]=y.useState(o.description??""),[g,S]=y.useState(()=>fx(o.fields)),[v,C]=y.useState(o.parent_names??[]),[H,B]=y.useState(!1),[k,D]=y.useState(null),[G,W]=y.useState(0),[L,M]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(!1),fe=y.useMemo(()=>{const N=new Map;for(const V of r.indexed_fields)N.set(V.name,V);return N},[r.indexed_fields]),He=y.useMemo(()=>f.map(N=>N.name).filter(N=>N!==c).sort((N,V)=>N.localeCompare(V)),[f,c]),ke=y.useMemo(()=>{var Q;const N=new Map(f.map(ae=>[ae.name,ae])),V=[];for(const ae of v){const se=N.get(ae);(Q=se==null?void 0:se.parent_names)!=null&&Q.includes(c)&&V.push(ae)}return V},[v,f,c]),ze=y.useMemo(()=>{const N=new Set(Object.entries(o.fields??{}).filter(([,Q])=>Q.indexed===!0).map(([Q])=>Q)),V=new Set(g.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},[g,o.fields]),ie=y.useMemo(()=>bx(g),[g]),$=()=>{M(null),ue(!1)},te=(N,V,Q)=>{S(ae=>ae.map(se=>se.key===N?{...se,name:Q!==void 0?Q:se.name,spec:{...se.spec,...V}}:se)),$()},z=()=>{S(N=>[...N,{key:Um(),name:"",spec:{type:"string"}}]),$()},Z=N=>{S(V=>V.filter(Q=>Q.key!==N)),$()},ne=N=>{C(V=>V.includes(N)?V.filter(Q=>Q!==N):[...V,N]),$()},ve=async()=>{B(!0),D(null);try{const N=Ph(g);await ux(s,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}),W(V=>V+1),$(),setTimeout(()=>W(0),3e3),p()}catch(N){N instanceof de?D(N.message):D(N instanceof Error?N.message:String(N))}finally{B(!1)}},F=async N=>{if(N.preventDefault(),!!h){if(ie.length>0){D(ie[0]);return}if(D(null),L&&L.violating_notes>0||X){await ve();return}K(!0);try{const V=Ph(g),Q=await cx(s,c,V);if(Q.violating_notes>0){M(Q);return}$(),await ve()}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.`),M(null),ue(!0)}finally{K(!1)}}},j=!h;return l.jsxs("form",{className:"schema-detail",onSubmit:F,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:",s,":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),$()},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"}),g.length===0?l.jsx("p",{className:"dim",children:"No fields declared. Add one to start a schema."}):null,g.map(N=>{var V;return l.jsx(gx,{row:N,readOnly:j,coDeclarers:N.spec.indexed?(((V=fe.get(N.name.trim()))==null?void 0:V.tags)??[]).filter(Q=>Q!==c):[],onChange:(Q,ae)=>te(N.key,Q,ae),onRemove:()=>Z(N.key)},N.key)}),j?null:l.jsx("button",{type:"button",className:"secondary",onClick:z,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."]}),He.length===0?l.jsx("p",{className:"dim",children:"No other tags to pick as parents yet."}):l.jsx("div",{className:"parent-grid",children:He.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))}),ke.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginTop:"0.5rem"},children:["Cycle warning: ",l.jsx("code",{children:ke.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(yx,{tag:c,effective:r}),l.jsx(vx,{catalog:r.indexed_fields,tag:c}),ie.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:ie.map(N=>l.jsx("li",{children:N},N))})]}):null,ze&&!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,L&&L.violating_notes>0?l.jsx(xx,{report:L,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||H||J,children:H?"Saving…":J?"Checking existing notes…":L&&L.violating_notes>0||X?"Save anyway":"Save"})})]})}function gx({row:s,readOnly:c,coDeclarers:o,onChange:r,onRemove:f}){const{name:h,spec:p}=s,E=rr.has(p.type??""),x=(p.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:g=>r({},g.target.value)}),l.jsxs("select",{"aria-label":"Field type",value:p.type??"",disabled:c,onChange:g=>{const S=g.target.value||void 0,v={type:S};S&&!rr.has(S)&&(v.indexed=!1),r(v)},children:[l.jsx("option",{value:"",children:"(any)"}),ax.map(g=>l.jsx("option",{value:g,children:g},g))]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.required===!0,disabled:c,onChange:g=>r({required:g.target.checked})}),"required"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.cardinality==="many",disabled:c,onChange:g=>r({cardinality:g.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:p.indexed===!0,disabled:c||!E,onChange:g=>r({indexed:g.target.checked})}),"indexed"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.strict===!0,disabled:c,onChange:g=>r({strict:g.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:g=>{const S=g.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:p.description??"",disabled:c,placeholder:"description (optional)",onChange:g=>r({description:g.target.value})})]}),o.length>0?l.jsxs("p",{className:"dim field-codeclarers",children:["Also indexed by: ",o.map(g=>l.jsx("code",{children:g},g)),". Type + indexed are global across all of these — change them together."]}):null]})}function yx({tag:s,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:s}),"'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 p=!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:p?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 vx({catalog:s,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)"}),s.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:s.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 xx({report:s,tag:c}){return l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsxs("strong",{children:[s.violating_notes," existing note",s.violating_notes===1?"":"s"," violate this schema."]})," ","They'll be REJECTED on their next write once you tighten"," ",l.jsx("code",{children:s.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 …"]})}),s.sample.length>0?l.jsxs("details",{children:[l.jsxs("summary",{children:["Examples (",s.sample.length," of ",s.violating_notes,")"]}),l.jsx("ul",{style:{margin:"0.4rem 0 0"},children:s.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 bx(s){const c=[],o=new Set;for(const r of s){const f=r.name.trim();if(f){if(o.has(f)){c.push(`Duplicate field name "${f}".`);continue}o.add(f),r.spec.indexed&&!hx.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 jx=[30,90,180,365],em=90,Sx=1440*60;function Ex(s){if(!s)return null;const c=s.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 Tx(s){return{jti:s.jti,label:s.subject,scopes:Array.isArray(s.scopes)?s.scopes:[],scoped_tags:Ex(s.permissions),expires_at:s.expires_at??null,revoked_at:s.revoked_at??null,created_at:s.created_at}}async function _x(s,c){const o={scope:`vault:${s}:${c.verb}`,expires_in:c.ttlDays*Sx,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 Cs(r));const f=await r.json();return{jti:f.jti,token:f.token,scope:f.scope,expires_at:f.expires_at??null}}async function Nx(s){const c=`vault:${s}:`,o=[];let r=null;for(let f=0;f<1e3;f++){const h=new URLSearchParams({revoked:"all"});r&&h.set("cursor",r);const p=await Il(`/api/auth/tokens?${h.toString()}`);if(!p.ok)throw new de(p.status,await Cs(p));const E=await p.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(Tx)}async function wx(s){const c=await Il("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jti:s})});if(!c.ok)throw new de(c.status,await Cs(c))}async function Cx(s){const c=await Oe(s,`/vault/${encodeURIComponent(s)}/api/tags`);if(!c.ok)throw new de(c.status,await Cs(c));const o=await c.json();return Array.isArray(o)?o:[]}async function Cs(s){try{const c=await s.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`${s.status} ${s.statusText}`}const Ax=["read","write","admin"],Rx={30:"30 days",90:"90 days",180:"180 days",365:"1 year (max)"};function kx(s){return s instanceof Ln?s.disposition==="forbidden"?(Jl(),{kind:"auth-required",status:403}):s.disposition==="auth-required"?{kind:"auth-required",status:s.status}:{kind:"error",message:s.message}:s instanceof de&&(s.status===401||s.status===403)?{kind:"auth-required",status:s.status}:{kind:"error",message:s instanceof Error?s.message:String(s)}}function tm({vaultName:s}={}){const c=Fl(),o=s??c.name,r=s!==void 0,f=r?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(null),[g,S]=y.useState(null),[v,C]=y.useState(0);y.useEffect(()=>{let k=!1;if(o)return p({kind:"loading"}),Nx(o).then(D=>{k||p({kind:"ok",tokens:D})}).catch(D=>{k||p(kx(D))}),()=>{k=!0}},[o,v]);const H=y.useCallback(()=>C(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(De,{to:"/",children:"← Back to vaults"})]});const B=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(De,{to:f,className:"muted",children:"← Vault detail"})]}),B?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(zx,{result:E,onDismiss:()=>x(null)}):null,h.kind==="ok"&&B&&!E?l.jsx(Mx,{vaultName:o,onMinted:k=>{x(k),C(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(sa,{vaultName:o,status:h.status,onRecovered:H}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(Ox,{tokens:h.tokens,allowRevoke:B,confirmingJti:g,onAskConfirm:S,onRevoked:()=>{S(null),C(k=>k+1)}}):null]})]})}function zx({result:s,onDismiss:c}){const[o,r]=y.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(s.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:s.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 Mx({vaultName:s,onMinted:c}){const[o,r]=y.useState(""),[f,h]=y.useState("admin"),[p,E]=y.useState(em),[x,g]=y.useState(!1),[S,v]=y.useState(null),[C,H]=y.useState([]),[B,k]=y.useState(null),[D,G]=y.useState(new Set);y.useEffect(()=>{let K=!1;return Cx(s).then(X=>{if(K)return;const ue=X.map(fe=>fe.name).filter(fe=>!fe.includes("/")).sort();H(ue)}).catch(X=>{K||k(X instanceof Error?X.message:String(X))}),()=>{K=!0}},[s]);const W=o.trim(),L=W.length===0,M=K=>{G(X=>{const ue=new Set(X);return ue.has(K)?ue.delete(K):ue.add(K),ue})},J=async K=>{if(K.preventDefault(),L){v("label required — give the token a recognizable name");return}g(!0),v(null);try{const X=await _x(s,{verb:f,label:W,scopedTags:[...D],ttlDays:p});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{g(!1)}};return l.jsxs("form",{onSubmit:J,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:K=>r(K.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:K=>h(K.target.value),children:Ax.map(K=>l.jsx("option",{value:K,children:K==="read"?"read — query notes only":K==="write"?"write — query + create/update notes":"admin — full control (incl. token mgmt)"},K))}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Issued as ",l.jsxs("code",{children:["vault:",s,":",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:p,onChange:K=>E(Number(K.target.value)),children:jx.map(K=>l.jsx("option",{value:K,children:Rx[K]??`${K} days`},K))}),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)"})]}),B?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Couldn't load tags: ",l.jsx("code",{children:B}),". Token will be unscoped."]}):C.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:C.map(K=>l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:D.has(K),onChange:()=>M(K)}),l.jsx("code",{children:K})]},K))}),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||L,children:x?"Minting…":"Mint token"})})]})}function Ox({tokens:s,allowRevoke:c,confirmingJti:o,onAskConfirm:r,onRevoked:f}){return s.length===0?l.jsx("p",{className:"muted",children:"No tokens yet. Mint one above to get started."}):l.jsx("div",{className:"token-list",children:s.map(h=>l.jsx(Dx,{token:h,allowRevoke:c,confirming:o===h.jti,onAskConfirm:r,onRevoked:f},h.jti))})}function Dx({token:s,allowRevoke:c,confirming:o,onAskConfirm:r,onRevoked:f}){const[h,p]=y.useState(!1),[E,x]=y.useState(null),g=s.revoked_at!==null,S=async()=>{p(!0),x(null);try{await wx(s.jti),f()}catch(v){if(v instanceof Ln&&v.disposition==="forbidden"){Jl();return}x(v instanceof Error?v.message:String(v)),p(!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:s.label??"(unlabeled)"}),l.jsx("code",{className:"dim",children:s.jti}),g?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:"})," ",s.scopes.length>0?s.scopes.map(v=>l.jsx("code",{className:"scope-tag",children:v},v)):l.jsx("span",{className:"dim",children:"(none)"})]}),s.scoped_tags&&s.scoped_tags.length>0?l.jsxs("div",{className:"meta",children:[l.jsx("span",{className:"dim",children:"tags:"})," ",s.scoped_tags.map(v=>l.jsxs("code",{className:"scope-tag tag-pill",children:["#",v]},v))]}):null,l.jsxs("div",{className:"meta dim",children:["created ",s.created_at,s.expires_at?` · expires ${s.expires_at}`:"",g&&s.revoked_at?` · revoked ${s.revoked_at}`:""]}),E?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:E})}):null]}),c&&!g?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(s.jti),children:"Revoke"}):null]})}function Ux(){const[s,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}},[]),s.kind==="loading"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]}):s.kind==="error"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:s.message})})]}):s.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"})}),s.vaults.map(o=>l.jsxs(De,{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 Hx(){const s=xr(),c=s?null:Tm();return l.jsxs("div",{className:"page",children:[l.jsxs("nav",{className:"nav",children:[l.jsxs(De,{to:"/",className:"brand",children:["Parachute Vault ",l.jsx("span",{className:"sub",children:"admin"})]}),c?l.jsx(De,{to:"/",children:l.jsx("code",{children:c})}):l.jsx(De,{to:"/",children:"Vaults"})]}),s?l.jsxs(tr,{children:[l.jsx(nt,{path:"/",element:l.jsx(A0,{})}),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(Ux,{})}),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(De,{to:"/",children:"vault"}),"."]})}Wv();const Hm=document.getElementById("root");if(!Hm)throw new Error("#root not found");function lr(){gy.createRoot(Hm).render(l.jsx(y.StrictMode,{children:l.jsx(Hv,{basename:Jv(),children:l.jsx(Hx,{})})}))}const nm=Tm();!xr()&&nm?e0(nm).then(lr,lr):lr();
|