@openparachute/vault 0.7.8 → 0.7.9-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/src/mcp-manifest.ts +3 -3
- package/core/src/notes.ts +20 -10
- package/core/src/schema.ts +1 -1
- package/core/src/types.ts +5 -2
- package/package.json +1 -1
- package/src/attribution-threading.test.ts +295 -5
- package/src/auth.ts +107 -3
- package/src/live-match.test.ts +17 -0
- package/src/live-match.ts +6 -2
- package/src/mcp-tools.ts +14 -8
- package/src/release-plan.test.ts +302 -0
- package/src/routes.ts +19 -2
- package/src/routing.ts +8 -3
- package/src/vault.test.ts +73 -0
- package/web/ui/dist/assets/{index-g3_KwmRE.js → index-xHUke-uy.js} +9 -9
- package/web/ui/dist/index.html +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var wh;function cy(){if(wh)return Gl;wh=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,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:o,key:p,ref:f!==void 0?f:null,props:h}}return Gl.Fragment=r,Gl.jsx=c,Gl.jsxs=c,Gl}var
|
|
9
|
+
*/var wh;function cy(){if(wh)return Gl;wh=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,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:o,key:p,ref:f!==void 0?f:null,props:h}}return Gl.Fragment=r,Gl.jsx=c,Gl.jsxs=c,Gl}var kh;function oy(){return kh||(kh=1,Kr.exports=cy()),Kr.exports}var l=oy(),$r={exports:{}},re={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Ch;function dy(){if(Ch)return re;Ch=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),N=Symbol.iterator;function G(S){return S===null||typeof S!="object"?null:(S=N&&S[N]||S["@@iterator"],typeof S=="function"?S:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,z={};function M(S,k,V){this.props=S,this.context=k,this.refs=z,this.updater=V||D}M.prototype.isReactComponent={},M.prototype.setState=function(S,k){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,k,"setState")},M.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function F(){}F.prototype=M.prototype;function L(S,k,V){this.props=S,this.context=k,this.refs=z,this.updater=V||D}var U=L.prototype=new F;U.constructor=L,w(U,M.prototype),U.isPureReactComponent=!0;var J=Array.isArray;function K(){}var X={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function fe(S,k,V){var Q=V.ref;return{$$typeof:s,type:S,key:k,ref:Q!==void 0?Q:null,props:V}}function He(S,k){return fe(S.type,k,S.props)}function Me(S){return typeof S=="object"&&S!==null&&S.$$typeof===s}function Oe(S){var k={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(V){return k[V]})}var ie=/\/+/g;function $(S,k){return typeof S=="object"&&S!==null&&S.key!=null?Oe(""+S.key):k.toString(36)}function te(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(K,K):(S.status="pending",S.then(function(k){S.status==="pending"&&(S.status="fulfilled",S.value=k)},function(k){S.status==="pending"&&(S.status="rejected",S.reason=k)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function O(S,k,V,Q,ae){var se=typeof S;(se==="undefined"||se==="boolean")&&(S=null);var Se=!1;if(S===null)Se=!0;else switch(se){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(S.$$typeof){case s:case r:Se=!0;break;case j:return Se=S._init,O(Se(S._payload),k,V,Q,ae)}}if(Se)return ae=ae(S),Se=Q===""?"."+$(S,0):Q,J(ae)?(V="",Se!=null&&(V=Se.replace(ie,"$&/")+"/"),O(ae,k,V,"",function(Ka){return Ka})):ae!=null&&(Me(ae)&&(ae=He(ae,V+(ae.key==null||S&&S.key===ae.key?"":(""+ae.key).replace(ie,"$&/")+"/")+Se)),k.push(ae)),1;Se=0;var lt=Q===""?".":Q+":";if(J(S))for(var qe=0;qe<S.length;qe++)Q=S[qe],se=lt+$(Q,qe),Se+=O(Q,k,V,se,ae);else if(qe=G(S),typeof qe=="function")for(S=qe.call(S),qe=0;!(Q=S.next()).done;)Q=Q.value,se=lt+$(Q,qe++),Se+=O(Q,k,V,se,ae);else if(se==="object"){if(typeof S.then=="function")return O(te(S),k,V,Q,ae);throw k=String(S),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Z(S,k,V){if(S==null)return S;var Q=[],ae=0;return O(S,Q,"","",function(se){return k.call(V,se,ae++)}),Q}function ne(S){if(S._status===-1){var k=S._result;k=k(),k.then(function(V){(S._status===0||S._status===-1)&&(S._status=1,S._result=V)},function(V){(S._status===0||S._status===-1)&&(S._status=2,S._result=V)}),S._status===-1&&(S._status=0,S._result=k)}if(S._status===1)return S._result.default;throw S._result}var ve=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},W={map:Z,forEach:function(S,k,V){Z(S,function(){k.apply(this,arguments)},V)},count:function(S){var k=0;return Z(S,function(){k++}),k},toArray:function(S){return Z(S,function(k){return k})||[]},only:function(S){if(!Me(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return re.Activity=v,re.Children=W,re.Component=M,re.Fragment=c,re.Profiler=f,re.PureComponent=L,re.StrictMode=o,re.Suspense=x,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,re.__COMPILER_RUNTIME={__proto__:null,c:function(S){return X.H.useMemoCache(S)}},re.cache=function(S){return function(){return S.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(S,k,V){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var Q=w({},S.props),ae=S.key;if(k!=null)for(se in k.key!==void 0&&(ae=""+k.key),k)!ue.call(k,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&k.ref===void 0||(Q[se]=k[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(S.type,ae,Q)},re.createContext=function(S){return S={$$typeof:p,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},re.createElement=function(S,k,V){var Q,ae={},se=null;if(k!=null)for(Q in k.key!==void 0&&(se=""+k.key),k)ue.call(k,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ae[Q]=k[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(S&&S.defaultProps)for(Q in Se=S.defaultProps,Se)ae[Q]===void 0&&(ae[Q]=Se[Q]);return fe(S,se,ae)},re.createRef=function(){return{current:null}},re.forwardRef=function(S){return{$$typeof:E,render:S}},re.isValidElement=Me,re.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ne}},re.memo=function(S,k){return{$$typeof:g,type:S,compare:k===void 0?null:k}},re.startTransition=function(S){var k=X.T,V={};X.T=V;try{var Q=S(),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{k!==null&&V.types!==null&&(k.types=V.types),X.T=k}},re.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},re.use=function(S){return X.H.use(S)},re.useActionState=function(S,k,V){return X.H.useActionState(S,k,V)},re.useCallback=function(S,k){return X.H.useCallback(S,k)},re.useContext=function(S){return X.H.useContext(S)},re.useDebugValue=function(){},re.useDeferredValue=function(S,k){return X.H.useDeferredValue(S,k)},re.useEffect=function(S,k){return X.H.useEffect(S,k)},re.useEffectEvent=function(S){return X.H.useEffectEvent(S)},re.useId=function(){return X.H.useId()},re.useImperativeHandle=function(S,k,V){return X.H.useImperativeHandle(S,k,V)},re.useInsertionEffect=function(S,k){return X.H.useInsertionEffect(S,k)},re.useLayoutEffect=function(S,k){return X.H.useLayoutEffect(S,k)},re.useMemo=function(S,k){return X.H.useMemo(S,k)},re.useOptimistic=function(S,k){return X.H.useOptimistic(S,k)},re.useReducer=function(S,k,V){return X.H.useReducer(S,k,V)},re.useRef=function(S){return X.H.useRef(S)},re.useState=function(S){return X.H.useState(S)},re.useSyncExternalStore=function(S,k,V){return X.H.useSyncExternalStore(S,k,V)},re.useTransition=function(){return X.H.useTransition()},re.version="19.2.5",re}var Rh;function oc(){return Rh||(Rh=1,$r.exports=dy()),$r.exports}var y=oc(),Fr={exports:{}},Yl={},Wr={exports:{}},Ir={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Ah;function fy(){return Ah||(Ah=1,(function(s){function r(O,Z){var ne=O.length;O.push(Z);e:for(;0<ne;){var ve=ne-1>>>1,W=O[ve];if(0<f(W,Z))O[ve]=Z,O[ne]=W,ne=ve;else break e}}function c(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var Z=O[0],ne=O.pop();if(ne!==Z){O[0]=ne;e:for(var ve=0,W=O.length,S=W>>>1;ve<S;){var
|
|
25
|
+
*/var Ah;function fy(){return Ah||(Ah=1,(function(s){function r(O,Z){var ne=O.length;O.push(Z);e:for(;0<ne;){var ve=ne-1>>>1,W=O[ve];if(0<f(W,Z))O[ve]=Z,O[ne]=W,ne=ve;else break e}}function c(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var Z=O[0],ne=O.pop();if(ne!==Z){O[0]=ne;e:for(var ve=0,W=O.length,S=W>>>1;ve<S;){var k=2*(ve+1)-1,V=O[k],Q=k+1,ae=O[Q];if(0>f(V,ne))Q<W&&0>f(ae,V)?(O[ve]=ae,O[Q]=ne,ve=Q):(O[ve]=V,O[k]=ne,ve=k);else if(Q<W&&0>f(ae,ne))O[ve]=ae,O[Q]=ne,ve=Q;else break e}}return Z}function f(O,Z){var ne=O.sortIndex-Z.sortIndex;return ne!==0?ne:O.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=[],j=1,v=null,N=3,G=!1,D=!1,w=!1,z=!1,M=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function U(O){for(var Z=c(g);Z!==null;){if(Z.callback===null)o(g);else if(Z.startTime<=O)o(g),Z.sortIndex=Z.expirationTime,r(x,Z);else break;Z=c(g)}}function J(O){if(w=!1,U(O),!D)if(c(x)!==null)D=!0,K||(K=!0,Oe());else{var Z=c(g);Z!==null&&te(J,Z.startTime-O)}}var K=!1,X=-1,ue=5,fe=-1;function He(){return z?!0:!(s.unstable_now()-fe<ue)}function Me(){if(z=!1,K){var O=s.unstable_now();fe=O;var Z=!0;try{e:{D=!1,w&&(w=!1,F(X),X=-1),G=!0;var ne=N;try{t:{for(U(O),v=c(x);v!==null&&!(v.expirationTime>O&&He());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,N=v.priorityLevel;var W=ve(v.expirationTime<=O);if(O=s.unstable_now(),typeof W=="function"){v.callback=W,U(O),Z=!0;break t}v===c(x)&&o(x),U(O)}else o(x);v=c(x)}if(v!==null)Z=!0;else{var S=c(g);S!==null&&te(J,S.startTime-O),Z=!1}}break e}finally{v=null,N=ne,G=!1}Z=void 0}}finally{Z?Oe():K=!1}}}var Oe;if(typeof L=="function")Oe=function(){L(Me)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,$=ie.port2;ie.port1.onmessage=Me,Oe=function(){$.postMessage(null)}}else Oe=function(){M(Me,0)};function te(O,Z){X=M(function(){O(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(O){O.callback=null},s.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<O?Math.floor(1e3/O):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function(O){switch(N){case 1:case 2:case 3:var Z=3;break;default:Z=N}var ne=N;N=Z;try{return O()}finally{N=ne}},s.unstable_requestPaint=function(){z=!0},s.unstable_runWithPriority=function(O,Z){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var ne=N;N=O;try{return Z()}finally{N=ne}},s.unstable_scheduleCallback=function(O,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,O){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=ne+W,O={id:j++,callback:Z,priorityLevel:O,startTime:ne,expirationTime:W,sortIndex:-1},ne>ve?(O.sortIndex=ne,r(g,O),c(x)===null&&O===c(g)&&(w?(F(X),X=-1):w=!0,te(J,ne-ve))):(O.sortIndex=W,r(x,O),D||G||(D=!0,K||(K=!0,Oe()))),O},s.unstable_shouldYield=He,s.unstable_wrapCallback=function(O){var Z=N;return function(){var ne=N;N=Z;try{return O.apply(this,arguments)}finally{N=ne}}}})(Ir)),Ir}var zh;function hy(){return zh||(zh=1,Wr.exports=fy()),Wr.exports}var Pr={exports:{}},at={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Dh;function gy(){if(Dh)return Yl;Dh=1;var s=hy(),r=oc(),c=py();function o(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(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var 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(o(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(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,N=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),L=Symbol.for("react.context"),U=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"),Me=Symbol.iterator;function Oe(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||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 w:return"Fragment";case M:return"Profiler";case z:return"StrictMode";case J:return"Suspense";case K:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case L:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case U: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,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ve=[],W=-1;function S(e){return{current:e}}function
|
|
41
|
+
*/var Dh;function gy(){if(Dh)return Yl;Dh=1;var s=hy(),r=oc(),c=py();function o(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(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var 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(o(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(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,N=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),L=Symbol.for("react.context"),U=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"),Me=Symbol.iterator;function Oe(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||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 w:return"Fragment";case M:return"Profiler";case z:return"StrictMode";case J:return"Suspense";case K:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case L:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case U: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,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ve=[],W=-1;function S(e){return{current:e}}function k(e){0>W||(e.current=ve[W],ve[W]=null,W--)}function V(e,t){W++,ve[W]=e.current,e.current=t}var Q=S(null),ae=S(null),se=S(null),Se=S(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}}k(Q),V(Q,e)}function qe(){k(Q),k(ae),k(se)}function Ka(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&&(k(Q),k(ae)),Se.current===e&&(k(Se),Hl._currentValue=ne)}var Rs,Tc;function Gn(e){if(Rs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rs=t&&t[1]||"",Tc=-1<n.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+Rs+e+Tc}var As=!1;function zs(e,t){if(!e||As)return"";As=!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(H){var A=H}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(H){A=H}e.call(Y.prototype)}}else{try{throw Error()}catch(H){A=H}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(H){if(H&&A&&typeof H.stack=="string")return[H.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var b=d.split(`
|
|
44
44
|
`),R=m.split(`
|
|
45
45
|
`);for(i=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;i<R.length&&!R[i].includes("DetermineComponentFrameRoot");)i++;if(a===b.length||i===R.length)for(a=b.length-1,i=R.length-1;1<=a&&0<=i&&b[a]!==R[i];)i--;for(;1<=a&&0<=i;a--,i--)if(b[a]!==R[i]){if(a!==1||i!==1)do if(a--,i--,0>i||b[a]!==R[i]){var B=`
|
|
46
46
|
`+b[a].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=a&&0<=i);break}}}finally{As=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Gn(n):""}function qm(e,t){switch(e.tag){case 26:case 27:case 5:return Gn(e.type);case 16:return Gn("Lazy");case 13:return e.child!==t&&t!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return zs(e.type,!1);case 11:return zs(e.type.render,!1);case 1:return zs(e.type,!0);case 31:return Gn("Activity");default:return""}}function _c(e){try{var t="",n=null;do t+=qm(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
47
|
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var Ms=Object.prototype.hasOwnProperty,Os=s.unstable_scheduleCallback,Ds=s.unstable_cancelCallback,Gm=s.unstable_shouldYield,Ym=s.unstable_requestPaint,ht=s.unstable_now,Vm=s.unstable_getCurrentPriorityLevel,Nc=s.unstable_ImmediatePriority,wc=s.unstable_UserBlockingPriority,ni=s.unstable_NormalPriority,Xm=s.unstable_LowPriority,Cc=s.unstable_IdlePriority,Qm=s.log,Zm=s.unstable_setDisableYieldValue,$a=null,mt=null;function hn(e){if(typeof Qm=="function"&&Zm(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode($a,e)}catch{}}var pt=Math.clz32?Math.clz32:$m,Jm=Math.log,Km=Math.LN2;function $m(e){return e>>>=0,e===0?32:31-(Jm(e)/Km|0)|0}var ai=256,li=262144,ii=4194304;function Yn(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=Yn(a):(d&=m,d!==0?i=Yn(d):n||(n=m&~e,n!==0&&(i=Yn(n))))):(m=a&~u,m!==0?i=Yn(m):d!==0?i=Yn(d):n||(n=a&~e,n!==0&&(i=Yn(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 Fa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fm(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kc(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Us(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wm(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,R=e.hiddenUpdates;for(n=d&~n;0<n;){var B=31-pt(n),Y=1<<B;m[B]=0,b[B]=-1;var A=R[B];if(A!==null)for(R[B]=null,B=0;B<A.length;B++){var H=A[B];H!==null&&(H.lane&=-536870913)}n&=~Y}a!==0&&Rc(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function Rc(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 Ac(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 zc(e,t){var n=t&-t;return n=(n&42)!==0?1:Hs(n),(n&(e.suspendedLanes|t))!==0?0:n}function Hs(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 Bs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function Oc(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var mn=Math.random().toString(36).slice(2),Ie="__reactFiber$"+mn,st="__reactProps$"+mn,ua="__reactContainer$"+mn,Ls="__reactEvents$"+mn,Im="__reactListeners$"+mn,Pm="__reactHandles$"+mn,Dc="__reactResources$"+mn,Ia="__reactMarker$"+mn;function qs(e){delete e[Ie],delete e[st],delete e[Ls],delete e[Im],delete e[Pm]}function ra(e){var t=e[Ie];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ua]||n[Ie]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lh(e);e!==null;){if(n=e[Ie])return n;e=lh(e)}return t}e=n,n=e.parentNode}return null}function ca(e){if(e=e[Ie]||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 Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function oa(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Ia]=!0}var Uc=new Set,Hc={};function Vn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(Hc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var ep=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]*$"),Bc={},Lc={};function tp(e){return Ms.call(Lc,e)?!0:Ms.call(Bc,e)?!1:ep.test(e)?Lc[e]=!0:(Bc[e]=!0,!1)}function ui(e,t,n){if(tp(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 ri(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 qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function np(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 Gs(e){if(!e._valueTracker){var t=qc(e)?"checked":"value";e._valueTracker=np(e,t,""+e[t])}}function Gc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=qc(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ci(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 ap=/[\n"\\]/g;function Tt(e){return e.replace(ap,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ys(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?Vs(e,d,Et(t)):n!=null?Vs(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 Yc(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)){Gs(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),Gs(e)}function Vs(e,t,n){t==="number"&&ci(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 Vc(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 Xc(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(o(92));if(te(a)){if(1<a.length)throw Error(o(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),Gs(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 lp=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 Qc(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||lp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Zc(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(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&&Qc(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&Qc(e,u,t[u])}function Xs(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 ip=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"]]),sp=/^[\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 sp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Qs=null;function Zs(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 Jc(e){var t=ca(e);if(t&&(e=t.stateNode)){var n=e[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ys(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(o(90));Ys(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&&Gc(a)}break e;case"textarea":Vc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}}}var Js=!1;function Kc(e,t,n){if(Js)return e(t,n);Js=!0;try{var a=e(t);return a}finally{if(Js=!1,(ma!==null||pa!==null)&&(Wi(),ma&&(t=ma,e=pa,pa=ma=null,Jc(t),e)))for(t=0;t<e.length;t++)Jc(e[t])}}function el(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(o(231,t,typeof n));return n}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=!1;if(Jt)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Ks=!1}var pn=null,$s=null,di=null;function $c(){if(di)return di;var e,t=$s,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 Fc(){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:Fc,this.isPropagationStopped=Fc,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 Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=ut(Xn),nl=v({},Xn,{view:0,detail:0}),up=ut(nl),Fs,Ws,al,pi=v({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ps,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==al&&(al&&e.type==="mousemove"?(Fs=e.screenX-al.screenX,Ws=e.screenY-al.screenY):Ws=Fs=0,al=e),Fs)},movementY:function(e){return"movementY"in e?e.movementY:Ws}}),Wc=ut(pi),rp=v({},pi,{dataTransfer:0}),cp=ut(rp),op=v({},nl,{relatedTarget:0}),Is=ut(op),dp=v({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),fp=ut(dp),hp=v({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mp=ut(hp),pp=v({},Xn,{data:0}),Ic=ut(pp),gp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yp={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"},vp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vp[e])?!!t[e]:!1}function Ps(){return xp}var bp=v({},nl,{key:function(e){if(e.key){var t=gp[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"?yp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ps,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}}),jp=ut(bp),Sp=v({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pc=ut(Sp),Ep=v({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ps}),Tp=ut(Ep),_p=v({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Np=ut(_p),wp=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}),Cp=ut(wp),kp=v({},Xn,{newState:0,oldState:0}),Rp=ut(kp),Ap=[9,13,27,32],eu=Jt&&"CompositionEvent"in window,ll=null;Jt&&"documentMode"in document&&(ll=document.documentMode);var zp=Jt&&"TextEvent"in window&&!ll,eo=Jt&&(!eu||ll&&8<ll&&11>=ll),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 Mp(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 Op(e,t){if(ga)return e==="compositionend"||!eu&&ao(e,t)?(e=$c(),di=$s=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 Dp={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"?!!Dp[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 il=null,sl=null;function Up(e){Xf(e,0)}function gi(e){var t=Pa(e);if(Gc(t))return e}function uo(e,t){if(e==="change")return t}var ro=!1;if(Jt){var tu;if(Jt){var nu="oninput"in document;if(!nu){var co=document.createElement("div");co.setAttribute("oninput","return;"),nu=typeof co.oninput=="function"}tu=nu}else tu=!1;ro=tu&&(!document.documentMode||9<document.documentMode)}function oo(){il&&(il.detachEvent("onpropertychange",fo),sl=il=null)}function fo(e){if(e.propertyName==="value"&&gi(sl)){var t=[];so(t,sl,e,Zs(e)),Kc(Up,t)}}function Hp(e,t,n){e==="focusin"?(oo(),il=t,sl=n,il.attachEvent("onpropertychange",fo)):e==="focusout"&&oo()}function Bp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(sl)}function Lp(e,t){if(e==="click")return gi(t)}function qp(e,t){if(e==="input"||e==="change")return gi(t)}function Gp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Gp;function ul(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!Ms.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=ci(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=ci(e.document)}return t}function au(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 Yp=Jt&&"documentMode"in document&&11>=document.documentMode,ya=null,lu=null,rl=null,iu=!1;function yo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;iu||ya==null||ya!==ci(a)||(a=ya,"selectionStart"in a&&au(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}),rl&&ul(rl,a)||(rl=a,a=ls(lu,"onSelect"),0<a.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ya)))}function Qn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var va={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},su={},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 Zn(e){if(su[e])return su[e];if(!va[e])return e;var t=va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vo)return su[e]=t[n];return e}var xo=Zn("animationend"),bo=Zn("animationiteration"),jo=Zn("animationstart"),Vp=Zn("transitionrun"),Xp=Zn("transitionstart"),Qp=Zn("transitioncancel"),So=Zn("transitionend"),Eo=new Map,uu="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(" ");uu.push("scrollEnd");function Ot(e,t){Eo.set(e,t),Vn(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,ru=0;function vi(){for(var e=xa,t=ru=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,ru|=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 Jn(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<Rl)throw Rl=0,vr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function Zp(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 Zp(e,t,n,a)}function ou(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")ou(e)&&(d=1);else if(typeof e=="string")d=Wg(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 w:return Kn(n.children,i,u,t);case z:d=8,i|=24;break;case M:return e=yt(12,n,t,i|2),e.elementType=M,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 F:d=9;break e;case U:d=11;break e;case X:d=14;break e;case ue:d=16,a=null;break e}d=29,n=Error(o(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 Kn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function du(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 fu(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:_c(t)},wo.set(e,t),t)}return{value:e,source:t,stack:_c(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 hu(e){e.return!==null&&($t(e,1),Co(e,1,0))}function mu(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 ko(e,t){wt[Ct++]=Bt,wt[Ct++]=Lt,wt[Ct++]=gn,Bt=t.id,Lt=t.overflow,gn=e}var Pe=null,Ae=null,ye=!1,yn=null,kt=!1,pu=Error(o(519));function vn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(Nt(t,e)),pu}function Ro(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ie]=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<zl.length;n++)me(zl[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),Yc(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),Xc(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 Ao(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:kt=!1;return;case 27:case 3:kt=!0;return;default:Pe=Pe.return}}function Ea(e){if(e!==Pe)return!1;if(!ye)return Ao(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")||Mr(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),Ao(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ae=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ae=ah(e)}else t===27?(t=Ae,zn(e.type)?(e=Br,Br=null,Ae=e):Ae=t):Ae=Pe?At(e.stateNode.nextSibling):null;return!0}function $n(){Ae=Pe=null,ye=!1}function gu(){var e=yn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),yn=null),e}function ol(e){yn===null?yn=[e]:yn.push(e)}var yu=S(null),Fn=null,Ft=null;function xn(e,t,n){V(yu,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=yu.current,C(yu)}function vu(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 xu(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),vu(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(o(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),vu(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(o(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(o(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Hl):e=[Hl])}i=i.return}e!==null&&xu(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 Wn(e){Fn=e,Ft=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return zo(Fn,e)}function Ti(e,t){return Fn===null&&Wn(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(o(308));Ft=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ft=Ft.next=t;return n}var Jp=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()})}},Kp=s.unstable_scheduleCallback,$p=s.unstable_NormalPriority,Ve={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bu(){return{controller:new Jp,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&Kp($p,function(){e.controller.abort()})}var fl=null,ju=0,_a=0,Na=null;function Fp(e,t){if(fl===null){var n=fl=[];ju=0,_a=Tr(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ju++,t.then(Mo,Mo),t}function Mo(){if(--ju===0&&fl!==null){Na!==null&&(Na.status="fulfilled");var e=fl;fl=null,_a=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wp(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=O.S;O.S=function(e,t){vf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fp(e,t),Oo!==null&&Oo(e,t)};var In=S(null);function Su(){var e=In.current;return e!==null?e:Ce.pooledCache}function _i(e,t){t===null?V(In,In.current):V(In,t.pool)}function Do(){var e=Su();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(o(460)),Eu=Error(o(474)),Ni=Error(o(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(o(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 ea=t,wa}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ea=n,wa):n}}var ea=null;function Bo(){if(ea===null)throw Error(o(459));var e=ea;return ea=null,e}function Lo(e){if(e===wa||e===Ni)throw Error(o(483))}var Ca=null,hl=0;function Ci(e){var t=hl;return hl+=1,Ca===null&&(Ca=[]),Ho(Ca,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ki(e,t){throw t.$$typeof===N?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qo(e){function t(_,T){if(e){var k=_.deletions;k===null?(_.deletions=[T],_.flags|=16):k.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,k){return _.index=k,e?(k=_.alternate,k!==null?(k=k.index,k<T?(_.flags|=67108866,T):k):(_.flags|=67108866,T)):(_.flags|=1048576,T)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,T,k,q){return T===null||T.tag!==6?(T=du(k,_.mode,q),T.return=_,T):(T=i(T,k),T.return=_,T)}function b(_,T,k,q){var ee=k.type;return ee===w?B(_,T,k.props.children,q,k.key):T!==null&&(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Pn(ee)===T.type)?(T=i(T,k.props),ml(T,k),T.return=_,T):(T=ji(k.type,k.key,k.props,null,_.mode,q),ml(T,k),T.return=_,T)}function R(_,T,k,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==k.containerInfo||T.stateNode.implementation!==k.implementation?(T=fu(k,_.mode,q),T.return=_,T):(T=i(T,k.children||[]),T.return=_,T)}function B(_,T,k,q,ee){return T===null||T.tag!==7?(T=Kn(k,_.mode,q,ee),T.return=_,T):(T=i(T,k),T.return=_,T)}function Y(_,T,k){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=du(""+T,_.mode,k),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case G:return k=ji(T.type,T.key,T.props,null,_.mode,k),ml(k,T),k.return=_,k;case D:return T=fu(T,_.mode,k),T.return=_,T;case ue:return T=Pn(T),Y(_,T,k)}if(te(T)||Oe(T))return T=Kn(T,_.mode,k,null),T.return=_,T;if(typeof T.then=="function")return Y(_,Ci(T),k);if(T.$$typeof===L)return Y(_,Ti(_,T),k);ki(_,T)}return null}function A(_,T,k,q){var ee=T!==null?T.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ee!==null?null:m(_,T,""+k,q);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case G:return k.key===ee?b(_,T,k,q):null;case D:return k.key===ee?R(_,T,k,q):null;case ue:return k=Pn(k),A(_,T,k,q)}if(te(k)||Oe(k))return ee!==null?null:B(_,T,k,q,null);if(typeof k.then=="function")return A(_,T,Ci(k),q);if(k.$$typeof===L)return A(_,T,Ti(_,k),q);ki(_,k)}return null}function H(_,T,k,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(k)||null,m(T,_,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return _=_.get(q.key===null?k:q.key)||null,b(T,_,q,ee);case D:return _=_.get(q.key===null?k:q.key)||null,R(T,_,q,ee);case ue:return q=Pn(q),H(_,T,k,q,ee)}if(te(q)||Oe(q))return _=_.get(k)||null,B(T,_,q,ee,null);if(typeof q.then=="function")return H(_,T,k,Ci(q),ee);if(q.$$typeof===L)return H(_,T,k,Ti(T,q),ee);ki(T,q)}return null}function I(_,T,k,q){for(var ee=null,xe=null,P=T,de=T=0,ge=null;P!==null&&de<k.length;de++){P.index>de?(ge=P,P=null):ge=P.sibling;var be=A(_,P,k[de],q);if(be===null){P===null&&(P=ge);break}e&&P&&be.alternate===null&&t(_,P),T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be,P=ge}if(de===k.length)return n(_,P),ye&&$t(_,de),ee;if(P===null){for(;de<k.length;de++)P=Y(_,k[de],q),P!==null&&(T=u(P,T,de),xe===null?ee=P:xe.sibling=P,xe=P);return ye&&$t(_,de),ee}for(P=a(P);de<k.length;de++)ge=H(P,_,de,k[de],q),ge!==null&&(e&&ge.alternate!==null&&P.delete(ge.key===null?de:ge.key),T=u(ge,T,de),xe===null?ee=ge:xe.sibling=ge,xe=ge);return e&&P.forEach(function(Hn){return t(_,Hn)}),ye&&$t(_,de),ee}function le(_,T,k,q){if(k==null)throw Error(o(151));for(var ee=null,xe=null,P=T,de=T=0,ge=null,be=k.next();P!==null&&!be.done;de++,be=k.next()){P.index>de?(ge=P,P=null):ge=P.sibling;var Hn=A(_,P,be.value,q);if(Hn===null){P===null&&(P=ge);break}e&&P&&Hn.alternate===null&&t(_,P),T=u(Hn,T,de),xe===null?ee=Hn:xe.sibling=Hn,xe=Hn,P=ge}if(be.done)return n(_,P),ye&&$t(_,de),ee;if(P===null){for(;!be.done;de++,be=k.next())be=Y(_,be.value,q),be!==null&&(T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be);return ye&&$t(_,de),ee}for(P=a(P);!be.done;de++,be=k.next())be=H(P,_,de,be.value,q),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?de:be.key),T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be);return e&&P.forEach(function(ry){return t(_,ry)}),ye&&$t(_,de),ee}function we(_,T,k,q){if(typeof k=="object"&&k!==null&&k.type===w&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case G:e:{for(var ee=k.key;T!==null;){if(T.key===ee){if(ee=k.type,ee===w){if(T.tag===7){n(_,T.sibling),q=i(T,k.props.children),q.return=_,_=q;break e}}else if(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Pn(ee)===T.type){n(_,T.sibling),q=i(T,k.props),ml(q,k),q.return=_,_=q;break e}n(_,T);break}else t(_,T);T=T.sibling}k.type===w?(q=Kn(k.props.children,_.mode,q,k.key),q.return=_,_=q):(q=ji(k.type,k.key,k.props,null,_.mode,q),ml(q,k),q.return=_,_=q)}return d(_);case D:e:{for(ee=k.key;T!==null;){if(T.key===ee)if(T.tag===4&&T.stateNode.containerInfo===k.containerInfo&&T.stateNode.implementation===k.implementation){n(_,T.sibling),q=i(T,k.children||[]),q.return=_,_=q;break e}else{n(_,T);break}else t(_,T);T=T.sibling}q=fu(k,_.mode,q),q.return=_,_=q}return d(_);case ue:return k=Pn(k),we(_,T,k,q)}if(te(k))return I(_,T,k,q);if(Oe(k)){if(ee=Oe(k),typeof ee!="function")throw Error(o(150));return k=ee.call(k),le(_,T,k,q)}if(typeof k.then=="function")return we(_,T,Ci(k),q);if(k.$$typeof===L)return we(_,T,Ti(_,k),q);ki(_,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,T!==null&&T.tag===6?(n(_,T.sibling),q=i(T,k),q.return=_,_=q):(n(_,T),q=du(k,_.mode,q),q.return=_,_=q),d(_)):n(_,T)}return function(_,T,k,q){try{hl=0;var ee=we(_,T,k,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 ta=qo(!0),Go=qo(!1),bn=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _u(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 pl(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,Ac(e,n)}}function Nu(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 wu=!1;function gl(){if(wu){var e=Na;if(e!==null)throw e}}function yl(e,t,n,a){wu=!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,R=b.next;b.next=null,d===null?u=R:d.next=R,d=b;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==d&&(m===null?B.firstBaseUpdate=R:m.next=R,B.lastBaseUpdate=b))}if(u!==null){var Y=i.baseState;d=0,B=R=b=null,m=u;do{var A=m.lane&-536870913,H=A!==m.lane;if(H?(pe&A)===A:(a&A)===A){A!==0&&A===_a&&(wu=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,le=m;A=t;var we=n;switch(le.tag){case 1:if(I=le.payload,typeof I=="function"){Y=I.call(we,Y,A);break e}Y=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=le.payload,A=typeof I=="function"?I.call(we,Y,A):I,A==null)break e;Y=v({},Y,A);break e;case 2:bn=!0}}A=m.callback,A!==null&&(e.flags|=64,H&&(e.flags|=8192),H=i.callbacks,H===null?i.callbacks=[A]:H.push(A))}else H={lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(R=B=H,b=Y):B=B.next=H,d|=A;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;H=m,m=H.next,H.next=null,i.lastBaseUpdate=H,i.shared.pending=null}}while(!0);B===null&&(b=Y),i.baseState=b,i.firstBaseUpdate=R,i.lastBaseUpdate=B,u===null&&(i.shared.lanes=0),wn|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(o(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 ka=S(null),Ri=S(0);function Xo(e,t){e=un,V(Ri,e),V(ka,t),un=e|t.baseLanes}function Cu(){V(Ri,un),V(ka,ka.current)}function ku(){un=Ri.current,C(ka),C(Ri)}var vt=S(null),Rt=null;function En(e){var t=e.alternate;V(Ge,Ge.current&1),V(vt,e),Rt===null&&(t===null||ka.current!==null||t.memoizedState!==null)&&(Rt=e)}function Ru(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){C(vt),Rt===e&&(Rt=null),C(Ge)}var Ge=S(0);function Ai(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ur(n)||Hr(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,oe=null,_e=null,Xe=null,zi=!1,Ra=!1,na=!1,Mi=0,vl=0,Aa=null,Ip=0;function Be(){throw Error(o(321))}function Au(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 zu(e,t,n,a,i,u){return It=u,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Cd:Ju,na=!1,u=n(a,i),na=!1,Ra&&(u=Jo(t,n,a,i)),Zo(e),u}function Zo(e){O.H=jl;var t=_e!==null&&_e.next!==null;if(It=0,Xe=_e=oe=null,zi=!1,vl=0,Aa=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&Ei(e)&&(Qe=!0))}function Jo(e,t,n,a){oe=e;var i=0;do{if(Ra&&(Aa=null),vl=0,Ra=!1,25<=i)throw Error(o(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)}O.H=kd,u=t(n,a)}while(Ra);return u}function Pp(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?xl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(oe.flags|=1024),t}function Mu(){var e=Mi!==0;return Mi=0,e}function Ou(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Du(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=oe=null,Ra=!1,vl=Mi=0,Aa=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ye(){if(_e===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?oe.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw oe.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(e){var t=vl;return vl+=1,Aa===null&&(Aa=[]),e=Ho(Aa,e,t),t=oe,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Cd:Ju),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xl(e);if(e.$$typeof===L)return et(e)}throw Error(o(438,String(e)))}function Uu(e){var t=null,n=oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=oe.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(),oe.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 Hu(t,_e,e)}function Hu(e,t,n){var a=e.queue;if(a===null)throw Error(o(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,R=t,B=!1;do{var Y=R.lane&-536870913;if(Y!==R.lane?(pe&Y)===Y:(It&Y)===Y){var A=R.revertLane;if(A===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Y===_a&&(B=!0);else if((It&A)===A){R=R.next,A===_a&&(B=!0);continue}else Y={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=Y,d=u):b=b.next=Y,oe.lanes|=A,wn|=A;Y=R.action,na&&n(u,Y),u=R.hasEagerState?R.eagerState:n(u,Y)}else A={lane:Y,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=A,d=u):b=b.next=A,oe.lanes|=Y,wn|=Y;R=R.next}while(R!==null&&R!==t);if(b===null?d=u:b.next=m,!gt(u,e.memoizedState)&&(Qe=!0,B&&(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 Bu(e){var t=Ye(),n=t.queue;if(n===null)throw Error(o(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=oe,i=Ye(),u=ye;if(u){if(n===void 0)throw Error(o(407));n=n()}else n=t();var d=!gt((_e||i).memoizedState,n);if(d&&(i.memoizedState=n,Qe=!0),i=i.queue,Gu(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(o(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=oe.updateQueue,t===null?(t=Oi(),oe.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=Jn(e,2);t!==null&&ft(t,e,2)}function Lu(e){var t=it();if(typeof e=="function"){var n=e;if(e=n(),na){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,Hu(e,_e,typeof a=="function"?a:Pt)}function eg(e,t,n,a,i){if(Li(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};O.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=O.T,d={};O.T=d;try{var m=n(i,a),b=O.S;b!==null&&b(d,m),nd(e,t,m)}catch(R){qu(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),O.T=u}}else try{u=n(i,a),nd(e,t,u)}catch(R){qu(e,t,R)}}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 qu(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 qu(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=oe;if(ye){if(Ae){t:{for(var i=Ae,u=kt;i.nodeType!==8;){if(!u){i=null;break t}if(i=At(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Ae=At(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,oe,a),a.dispatch=n,a=Lu(!1),u=Zu.bind(null,oe,!1,a.queue),a=it(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=eg.bind(null,oe,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function ud(e){var t=Ye();return rd(t,_e,e)}function rd(e,t,n){if(t=Hu(e,t,id)[0],e=Ui(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=xl(t)}catch(d){throw d===wa?Ni:d}else a=t;t=Ye();var i=t.queue,u=i.dispatch;return n!==t.memoizedState&&(oe.flags|=2048,za(9,{destroy:void 0},tg.bind(null,i,n),null)),[a,u,e]}function tg(e,t){e.action=t}function cd(e){var t=Ye(),n=_e;if(n!==null)return rd(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=oe.updateQueue,t===null&&(t=Oi(),oe.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();oe.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&&Au(a,_e.memoizedState.deps)?i.memoizedState=za(t,u,n,a):(oe.flags|=e,i.memoizedState=za(1|t,u,n,a))}function dd(e,t){Hi(8390656,8,e,t)}function Gu(e,t){Bi(2048,8,e,t)}function ng(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=Oi(),oe.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 ng({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(o(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 Yu(){}function yd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Au(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&&Au(t,a[1]))return a[0];if(a=e(),na){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function Vu(e,t,n){return n===void 0||(It&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=bf(),oe.lanes|=e,wn|=e,n)}function xd(e,t,n,a){return gt(n,t)?n:ka.current!==null?(e=Vu(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(),oe.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=O.T,m={};O.T=m,Zu(e,!1,t,n);try{var b=i(),R=O.S;if(R!==null&&R(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var B=Wp(b,a);bl(e,t,B,St(e))}else bl(e,t,a,St(e))}catch(Y){bl(e,t,{then:function(){},status:"rejected",reason:Y},St())}finally{Z.p=u,d!==null&&m.types!==null&&(d.types=m.types),O.T=d}}function ag(){}function Xu(e,t,n,a){if(e.tag!==5)throw Error(o(476));var i=jd(e).queue;bd(e,i,t,ne,n===null?ag: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),bl(e,t.next.queue,{},St())}function Qu(){return et(Hl)}function Ed(){return Ye().memoizedState}function Td(){return Ye().memoizedState}function lg(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),pl(a,t,n)),t={cache:bu()},e.payload=t;return}t=t.return}}function ig(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();bl(e,t,n,a)}function bl(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 Zu(e,t,n,a){if(a={lane:2,revertLane:Tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(o(479))}else t=cu(e,n,a,2),t!==null&&ft(t,e,2)}function Li(e){var t=e.alternate;return e===oe||t!==null&&t===oe}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,Ac(e,n)}}var jl={readContext:et,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};jl.useEffectEvent=Be;var Cd={readContext:et,use:Di,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:et,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(na){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(na){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=ig.bind(null,oe,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Lu(e);var t=e.queue,n=_d.bind(null,oe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yu,useDeferredValue:function(e,t){var n=it();return Vu(n,e,t)},useTransition:function(){var e=Lu(!1);return e=bd.bind(null,oe,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=oe,i=it();if(ye){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ce===null)throw Error(o(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=Ip++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qu,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=Zu.bind(null,oe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uu,useCacheRefresh:function(){return it().memoizedState=lg.bind(null,oe)},useEffectEvent:function(e){var t=it(),n={impl:e};return t.memoizedState=n,function(){if((je&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ju={readContext:et,use:Di,useCallback:yd,useContext:et,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Ui,useRef:od,useState:function(){return Ui(Pt)},useDebugValue:Yu,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:xl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:ud,useActionState:ud,useOptimistic:function(e,t){var n=Ye();return ed(n,_e,e,t)},useMemoCache:Uu,useCacheRefresh:Td};Ju.useEffectEvent=fd;var kd={readContext:et,use:Di,useCallback:yd,useContext:et,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Bu,useRef:od,useState:function(){return Bu(Pt)},useDebugValue:Yu,useDeferredValue:function(e,t){var n=Ye();return _e===null?Vu(n,e,t):xd(n,_e.memoizedState,e,t)},useTransition:function(){var e=Bu(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:cd,useActionState:cd,useOptimistic:function(e,t){var n=Ye();return _e!==null?ed(n,_e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uu,useCacheRefresh:Td};kd.useEffectEvent=fd;function Ku(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 $u={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),pl(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),pl(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),pl(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?!ul(n,a)||!ul(i,u):!0}function Ad(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&&$u.enqueueReplaceState(t,t.state,null)}function aa(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 Fu(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 sg(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),jr(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)),jr(e,a,i)),!1}throw Error(o(435,n.tag))}return jr(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!==pu&&(e=Error(o(422),{cause:a}),ol(Nt(e,n)))):(a!==pu&&(t=Error(o(423),{cause:a}),ol(Nt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Nt(a,n),i=Fu(e.stateNode,a,i),Nu(e,i),Le!==4&&(Le=2)),!1;var u=Error(o(520),{cause:a});if(u=Nt(u,n),kl===null?kl=[u]:kl.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=Fu(n.stateNode,a,e),Nu(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),Nu(n,i),!1}n=n.return}while(n!==null);return!1}var Wu=Error(o(461)),Qe=!1;function tt(e,t,n,a){t.child=e===null?Go(t,null,n,a):ta(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 Wn(t),a=zu(e,t,n,d,u,i),m=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&m&&hu(t),t.flags|=1,tt(e,t,a,i),t.child)}function Ld(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!ou(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,!ir(e,i)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:ul,n(d,a)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Kt(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(ul(u,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=u,ir(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return Iu(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):Cu(),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),Cu(),Tn());return tt(e,t,i,n),t.child}function Sl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yd(e,t,n,a,i){var u=Su();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&_i(t,null),Cu(),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 ta(t,e.child,null,n),e=Gi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function ug(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,Sl(null,e);if(Ru(t),(e=Ae)?(e=nh(e,kt),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,Pe=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(Ru(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(o(558));else if(Qe||Ta(e,t,n,!1),i=(n&e.childLanes)!==0,Qe||i){if(a=Ce,a!==null&&(d=zc(a,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Jn(e,d),ft(a,e,d),Wu;Ii(),t=Vd(e,t,n)}else e=u.treeContext,Ae=At(d.nextSibling),Pe=t,ye=!0,yn=null,kt=!1,e!==null&&ko(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(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Iu(e,t,n,a,i){return Wn(t),n=zu(e,t,n,a,void 0,i),a=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&a&&hu(t),t.flags|=1,tt(e,t,n,i),t.child)}function Xd(e,t,n,a,i,u){return Wn(t),t.updateQueue=null,n=Jo(t,a,n,i),Zo(e),a=Mu(),e!==null&&!Qe?(Ou(e,t,u),en(e,t,u)):(ye&&a&&hu(t),t.flags|=1,tt(e,t,n,u),t.child)}function Qd(e,t,n,a,i){if(Wn(t),t.stateNode===null){var u=ba,d=n.contextType;typeof d=="object"&&d!==null&&(u=et(d)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=$u,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Tu(t),d=n.contextType,u.context=typeof d=="object"&&d!==null?et(d):ba,u.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Ku(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&&$u.enqueueReplaceState(u,u.state,null),yl(t,a,u,i),gl(),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=aa(n,m);u.props=b;var R=u.context,B=n.contextType;d=ba,typeof B=="object"&&B!==null&&(d=et(B));var Y=n.getDerivedStateFromProps;B=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||R!==d)&&Ad(t,u,a,d),bn=!1;var A=t.memoizedState;u.state=A,yl(t,a,u,i),gl(),R=t.memoizedState,m||A!==R||bn?(typeof Y=="function"&&(Ku(t,n,Y,a),R=t.memoizedState),(b=bn||Rd(t,n,b,a,A,R,d))?(B||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),u.props=a,u.state=R,u.context=d,a=b):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,_u(e,t),d=t.memoizedProps,B=aa(n,d),u.props=B,Y=t.pendingProps,A=u.context,R=n.contextType,b=ba,typeof R=="object"&&R!==null&&(b=et(R)),m=n.getDerivedStateFromProps,(R=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||A!==b)&&Ad(t,u,a,b),bn=!1,A=t.memoizedState,u.state=A,yl(t,a,u,i),gl();var H=t.memoizedState;d!==Y||A!==H||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(Ku(t,n,m,a),H=t.memoizedState),(B=bn||Rd(t,n,B,a,A,H,b)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,H,b),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,H,b)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=H),u.props=a,u.state=H,u.context=b,a=B):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===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=ta(t,e.child,null,i),t.child=ta(t,null,n,i)):tt(e,t,n,i),t.memoizedState=u.state,e=t.child):e=en(e,t,i),e}function Zd(e,t,n,a){return $n(),t.flags|=256,tt(e,t,n,a),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function er(e){return{baseLanes:e,cachePool:Do()}}function tr(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,kt),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,Pe=t,Ae=null)):e=null,e===null)throw vn(t);return Hr(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=Kn(a,i,n,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,Sl(null,a)):(En(t),nr(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=ar(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=Kn(m,i,n,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ta(t,e.child,null,n),a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,t=Sl(null,a));else if(En(t),Hr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var R=d.dgst;d=R,a=Error(o(419)),a.stack="",a.digest=d,ol({value:a,source:null,stack:null}),t=ar(e,t,n)}else if(Qe||Ta(e,t,n,!1),d=(n&e.childLanes)!==0,Qe||d){if(d=Ce,d!==null&&(a=zc(d,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Jn(e,a),ft(d,e,a),Wu;Ur(m)||Ii(),t=ar(e,t,n)}else Ur(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ae=At(m.nextSibling),Pe=t,ye=!0,yn=null,kt=!1,e!==null&&ko(t,e),t=nr(t,a.children),t.flags|=4096);return t}return i?(Tn(),m=a.fallback,i=t.mode,b=e.child,R=b.sibling,a=Kt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,R!==null?m=Kt(R,m):(m=Kn(m,i,n,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,Sl(null,a),a=t.child,m=e.child.memoizedState,m===null?m=er(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=tr(e,d,n),t.memoizedState=Pu,Sl(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 nr(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 ar(e,t,n){return ta(t,e.child,null,n),e=nr(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),vu(e.return,t,n)}function lr(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),tt(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&&Ai(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),lr(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&&Ai(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}lr(t,!0,n,null,u,a);break;case"together":lr(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(o(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 ir(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function rg(e,t,n){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),xn(t,Ve,e.memoizedState.cache),$n();break;case 27:case 5:Ka(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,Ru(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(!ir(e,n)&&(t.flags&128)===0)return Qe=!1,rg(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=Pn(t.elementType),t.type=e,typeof e=="function")ou(e)?(a=aa(e,a),t.tag=1,t=Qd(null,t,e,a,n)):(t.tag=0,t=Iu(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===U){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(o(306,t,""))}}return t;case 0:return Iu(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=aa(a,t.pendingProps),Qd(e,t,a,i,n);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,_u(e,t),yl(t,a,null,n);var d=t.memoizedState;if(a=d.cache,xn(t,Ve,a),a!==u.cache&&xu(t,[Ve],n,!0),gl(),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(o(424)),t),ol(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=At(e.firstChild),Pe=t,ye=!0,yn=null,kt=!0,n=Go(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($n(),a===i){t=en(e,t,n);break e}tt(e,t,a,n)}t=t.child}return t;case 26:return Yi(e,t),e===null?(n=rh(t.type,null,t.pendingProps,null))?t.memoizedState=n:ye||(n=t.type,e=t.pendingProps,a=is(se.current).createElement(n),a[Ie]=t,a[st]=e,nt(a,n,e),Ke(a),t.stateNode=a):t.memoizedState=rh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ka(t),e===null&&ye&&(a=t.stateNode=ih(t.type,t.pendingProps,se.current),Pe=t,kt=!0,i=Ae,zn(t.type)?(Br=i,Ae=At(a.firstChild)):Ae=i),tt(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=Bg(a,t.type,t.pendingProps,kt),a!==null?(t.stateNode=a,Pe=t,Ae=At(a.firstChild),kt=!1,i=!0):i=!1),i||vn(t)),Ka(t),i=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,a=u.children,Mr(i,u)?a=null:d!==null&&Mr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=zu(e,t,Pp,null,null,n),Hl._currentValue=i),Yi(e,t),tt(e,t,a,n),t.child;case 6:return e===null&&ye&&((e=n=Ae)&&(n=Lg(n,t.pendingProps,kt),n!==null?(t.stateNode=n,Pe=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=ta(t,null,a,n):tt(e,t,a,n),t.child;case 11:return Bd(e,t,t.type,t.pendingProps,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,xn(t,t.type,a.value),tt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Wn(t),i=et(i),a=a(i),t.flags|=1,tt(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 ug(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return Wn(t),a=et(Ve),e===null?(i=Su(),i===null&&(i=Ce,u=bu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},Tu(t),xn(t,Ve,i)):((e.lanes&n)!==0&&(_u(e,t),yl(t,null,null,n),gl()),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&&xu(t,[Ve],n,!0))),tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function tn(e){e.flags|=4}function sr(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 ea=wi,Eu}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 ea=wi,Eu}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?kc():536870912,e.lanes|=t,Ua|=t)}function El(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 ze(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 cg(e,t,n){var a=t.pendingProps;switch(mu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return 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,gu())),ze(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(tn(t),u!==null?(ze(t),Wd(t,u)):(ze(t),sr(t,i,null,a,n))):u?u!==e.memoizedState?(tn(t),ze(t),Wd(t,u)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&tn(t),ze(t),sr(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(o(166));return ze(t),null}e=Q.current,Ea(t)?Ro(t):(e=ih(i,a,n),t.stateNode=e,tn(t))}return ze(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(o(166));return ze(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[Ie]=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(nt(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 ze(t),sr(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(o(166));if(e=se.current,Ea(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=Pe,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Ie]=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[Ie]=t,t.stateNode=e}return ze(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(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ie]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=gu(),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(o(558))}return ze(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(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Ie]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else i=gu(),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),ze(t),null);case 4:return qe(),e===null&&Cr(t.stateNode.containerInfo),ze(t),null;case 10:return Wt(t.type),ze(t),null;case 19:if(C(Ge),a=t.memoizedState,a===null)return ze(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)El(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ai(e),u!==null){for(t.flags|=128,El(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,El(a,!1),t.lanes=4194304)}else{if(!i)if(e=Ai(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),El(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ye)return ze(t),null}else 2*ht()-a.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,i=!0,El(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):(ze(t),null);case 22:case 23:return xt(t),ku(),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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(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&&C(In),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Ve),ze(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function og(e,t){switch(mu(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(o(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(Ge),null;case 4:return qe(),null;case 10:return Wt(t.type),null;case 22:case 23:return xt(t),ku(),e!==null&&C(In),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(mu(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:C(Ge);break;case 10:Wt(t.type);break;case 22:case 23:xt(t),ku(),e!==null&&C(In);break;case 24:Wt(Ve)}}function Tl(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,R=m;try{R()}catch(B){Te(i,b,B)}}}a=a.next}while(a!==u)}}catch(B){Te(t,t.return,B)}}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=aa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Te(e,t,a)}}function _l(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 ur(e,t,n){try{var a=e.stateNode;zg(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 rr(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 cr(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(cr(e,t,n),e=e.sibling;e!==null;)cr(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]);nt(t,a,n),t[Ie]=e,t[st]=n}catch(u){Te(e,e.return,u)}}var nn=!1,Ze=!1,or=!1,lf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function dg(e,t){if(e=e.containerInfo,Ar=fs,e=go(e),au(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,R=0,B=0,Y=e,A=null;t:for(;;){for(var H;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),(H=Y.firstChild)!==null;)A=Y,Y=H;for(;;){if(Y===e)break t;if(A===n&&++R===i&&(m=d),A===u&&++B===a&&(b=d),(H=Y.nextSibling)!==null)break;Y=A,A=Y.parentNode}Y=H}n=m===-1||b===-1?null:{start:m,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(zr={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=aa(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)Dr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,$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&&Tl(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=aa(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&&_l(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&&_l(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),a&4&&cf(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=bg.bind(null,n),qg(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&&qs(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 De=null,rt=!1;function an(e,t,n){for(n=n.child;n!==null;)rf(e,t,n),n=n.sibling}function rf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount($a,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=De,i=rt;zn(n.type)&&(De=n.stateNode,rt=!1),an(e,t,n),Ol(n.stateNode),De=a,rt=i;break;case 5:Ze||qt(n,t);case 6:if(a=De,i=rt,De=null,an(e,t,n),De=a,rt=i,De!==null)if(rt)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(n.stateNode)}catch(u){Te(n,t,u)}else try{De.removeChild(n.stateNode)}catch(u){Te(n,t,u)}break;case 18:De!==null&&(rt?(e=De,eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Xa(e)):eh(De,n.stateNode));break;case 4:a=De,i=rt,De=n.stateNode.containerInfo,rt=!0,an(e,t,n),De=a,rt=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 cf(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 fg(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(o(435,e.tag))}}function Zi(e,t){var n=fg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=jg.bind(null,e,a);a.then(i,i)}})}function ct(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)){De=m.stateNode,rt=!1;break e}break;case 5:De=m.stateNode,rt=!1;break e;case 3:case 4:De=m.stateNode.containerInfo,rt=!0;break e}m=m.return}if(De===null)throw Error(o(160));rf(u,d,i),De=null,rt=!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:ct(t,e),ot(e),a&4&&(_n(3,e,e.return),Tl(3,e),_n(5,e,e.return));break;case 1:ct(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(ct(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[Ia]||u[Ie]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),nt(u,a,n),u[Ie]=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),nt(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),nt(u,a,n),i.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ie]=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&&ur(e,e.memoizedProps,n.memoizedProps)}break;case 27:ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),n!==null&&a&4&&ur(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ct(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,ur(e,i,n!==null?n.memoizedProps:i)),a&1024&&(or=!0);break;case 6:if(ct(t,e),ot(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(I){Te(e,e.return,I)}}break;case 3:if(rs=null,i=Dt,Dt=ss(t.containerInfo),ct(t,e),Dt=i,ot(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Xa(t.containerInfo)}catch(I){Te(e,e.return,I)}or&&(or=!1,ff(e));break;case 4:a=Dt,Dt=ss(e.stateNode.containerInfo),ct(t,e),ot(e),Dt=a;break;case 12:ct(t,e),ot(e);break;case 31:ct(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 13:ct(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,R=nn,B=Ze;if(nn=R||i,Ze=B||b,ct(t,e),Ze=B,nn=R,ot(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||b||nn||Ze||la(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,A=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).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 H=b.stateNode;i?th(H,!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:ct(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:ct(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(o(160));switch(n.tag){case 27:var i=n.stateNode,u=rr(e);Qi(e,u,i);break;case 5:var d=n.stateNode;n.flags&32&&(ha(d,""),n.flags&=-33);var m=rr(e);Qi(e,m,d);break;case 3:case 4:var b=n.stateNode.containerInfo,R=rr(e);cr(e,R,b);break;default:throw Error(o(161))}}catch(B){Te(e,e.return,B)}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 la(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),la(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ef(t,t.return,n),la(t);break;case 27:Ol(t.stateNode);case 26:case 5:qt(t,t.return),la(t);break;case 22:t.memoizedState===null&&la(t);break;case 30:la(t);break;default:la(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),Tl(4,u);break;case 1:if(sn(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(R){Te(a,a.return,R)}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(R){Te(a,a.return,R)}}n&&d&64&&Pd(u),_l(u,u.return);break;case 27:af(u);case 26:case 5:sn(i,u,n),n&&a===null&&d&4&&tf(u),_l(u,u.return);break;case 12:sn(i,u,n);break;case 31:sn(i,u,n),n&&d&4&&cf(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),_l(u,u.return);break;case 30:break;default:sn(i,u,n)}t=t.sibling}}function dr(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&&dl(n))}function fr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function 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&&Tl(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&&dl(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):Nl(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&&dr(d,t);break;case 24:Ut(e,t,n,a),i&2048&&fr(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,R=d.flags;switch(d.tag){case 0:case 11:case 15:Ma(u,d,m,b,i),Tl(8,d);break;case 23:break;case 22:var B=d.stateNode;d.memoizedState!==null?B._visibility&2?Ma(u,d,m,b,i):Nl(u,d):(B._visibility|=2,Ma(u,d,m,b,i)),i&&R&2048&&dr(d.alternate,d);break;case 24:Ma(u,d,m,b,i),i&&R&2048&&fr(d.alternate,d);break;default:Ma(u,d,m,b,i)}t=t.sibling}}function Nl(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:Nl(n,a),i&2048&&dr(a.alternate,a);break;case 24:Nl(n,a),i&2048&&fr(a.alternate,a);break;default:Nl(n,a)}t=t.sibling}}var wl=8192;function Oa(e,t,n){if(e.subtreeFlags&wl)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&wl&&e.memoizedState!==null&&Ig(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=wl,wl=16777216,Oa(e,t,n),wl=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 Cl(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:Cl(e),e.flags&2048&&_n(9,e,e.return);break;case 3:Cl(e);break;case 12:Cl(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)):Cl(e);break;default:Cl(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:dl(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 hg={getCacheForType:function(e){var t=et(Ve),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return et(Ve).controller.signal}},mg=typeof WeakMap=="function"?WeakMap:Map,je=0,Ce=null,he=null,pe=0,Ee=0,bt=null,Nn=!1,Da=!1,hr=!1,un=0,Le=0,wn=0,ia=0,mr=0,jt=0,Ua=0,kl=null,dt=null,pr=!1,Ki=0,vf=0,$i=1/0,Fi=null,Cn=null,Je=0,kn=null,Ha=null,rn=0,gr=0,yr=null,xf=null,Rl=0,vr=null;function St(){return(je&2)!==0&&pe!==0?pe&-pe:O.T!==null?Tr():Mc()}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)),Wa(e,n),((je&2)===0||e!==Ce)&&(e===Ce&&((je&2)===0&&(ia|=n),Le===4&&Rn(e,pe,jt,!1)),Gt(e))}function jf(e,t,n){if((je&6)!==0)throw Error(o(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Fa(e,t),i=a?yg(e,t):br(e,t,!0),u=a;do{if(i===0){Da&&!a&&Rn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!pg(n)){i=br(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=kl;var b=m.current.memoizedState.isDehydrated;if(b&&(Ba(m,d).flags|=256),d=br(m,d,!1),d!==2){if(hr&&!b){m.errorRecoveryDisabledLanes|=u,ia|=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(o(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(o(329))}if((t&62914560)===t&&(i=Ki+300-ht(),10<i)){if(Rn(a,t,jt,!Nn),si(a,0,!0)!==0)break e;rn=t,a.timeoutHandle=If(Sf.bind(null,a,n,dt,Fi,pr,t,jt,ia,Ua,Nn,u,"Throttled",-0,0),i);break e}Sf(a,n,dt,Fi,pr,t,jt,ia,Ua,Nn,u,null,-0,0)}}break}while(!0);Gt(e)}function Sf(e,t,n,a,i,u,d,m,b,R,B,Y,A,H){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=Pg(Y,I),I!==null){rn=u,e.cancelPendingCommit=I(Rf.bind(null,e,t,u,n,a,i,d,m,b,B,Y,null,A,H)),Rn(e,u,d,!R);return}}Rf(e,t,u,n,a,i,d,m,b)}function pg(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&=~mr,t&=~ia,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&&Rc(e,n,t)}function Wi(){return(je&6)===0?(Al(0),!1):!0}function xr(){if(he!==null){if(Ee===0)var e=he.return;else e=he,Ft=Fn=null,Du(e),Ca=null,hl=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,Dg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),rn=0,xr(),Ce=e,he=n=Kt(e.current,null),pe=t,Ee=0,bt=null,Nn=!1,Da=Fa(e,t),hr=!1,Ua=jt=mr=ia=wn=Le=0,dt=kl=null,pr=!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){oe=null,O.H=jl,t===wa||t===Ni?(t=Bo(),Ee=3):t===Eu?(t=Bo(),Ee=4):Ee=t===Wu?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=O.H;return O.H=jl,e===null?jl:e}function Nf(){var e=O.A;return O.A=hg,e}function Ii(){Le=4,Nn||(pe&4194048)!==pe&&vt.current!==null||(Da=!0),(wn&134217727)===0&&(ia&134217727)===0||Ce===null||Rn(Ce,pe,jt,!1)}function br(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:xr(),d=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var R=Ee;if(Ee=0,bt=null,La(e,m,b,R),n&&Da){d=0;break e}break;default:R=Ee,Ee=0,bt=null,La(e,m,b,R)}}gg(),d=Le;break}catch(B){Ef(e,B)}while(!0);return t&&e.shellSuspendCounter++,Ft=Fn=null,je=a,O.H=i,O.A=u,he===null&&(Ce=null,pe=0,vi()),d}function gg(){for(;he!==null;)wf(he)}function yg(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=Fa(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 R=m.return;R!==null?(he=R,Pi(R)):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:xr(),Le=6;break e;default:throw Error(o(462))}}vg();break}catch(B){Ef(e,B)}while(!0);return Ft=Fn=null,O.H=a,O.A=i,je=n,he!==null?0:(Ce=null,pe=0,vi(),Le)}function vg(){for(;he!==null&&!Gm();)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:Du(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=Fn=null,Du(t),Ca=null,hl=0;var i=t.return;try{if(sg(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))),kf(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){kf(t,Nn);return}e=t.return;var n=cg(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 kf(e,t){do{var n=og(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(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=ru,Wm(e,n,u,d,m,b),e===Ce&&(he=Ce=null,pe=0),Ha=t,kn=e,rn=n,gr=u,yr=i,xf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sg(ni,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null,i=Z.p,Z.p=2,d=je,je|=4;try{dg(e,t,n)}finally{je=d,Z.p=i,O.T=a}}Je=1,Af(),zf(),Mf()}}function Af(){if(Je===1){Je=0;var e=kn,t=Ha,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=O.T,O.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{df(t,e);var u=zr,d=go(e.containerInfo),m=u.focusedElem,b=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&po(m.ownerDocument.documentElement,m)){if(b!==null&&au(m)){var R=b.start,B=b.end;if(B===void 0&&(B=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(B,m.value.length);else{var Y=m.ownerDocument||document,A=Y&&Y.defaultView||window;if(A.getSelection){var H=A.getSelection(),I=m.textContent.length,le=Math.min(b.start,I),we=b.end===void 0?le:Math.min(b.end,I);!H.extend&&le>we&&(d=we,we=le,le=d);var _=mo(m,le),T=mo(m,we);if(_&&T&&(H.rangeCount!==1||H.anchorNode!==_.node||H.anchorOffset!==_.offset||H.focusNode!==T.node||H.focusOffset!==T.offset)){var k=Y.createRange();k.setStart(_.node,_.offset),H.removeAllRanges(),le>we?(H.addRange(k),H.extend(T.node,T.offset)):(k.setEnd(T.node,T.offset),H.addRange(k))}}}}for(Y=[],H=m;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.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=!!Ar,zr=Ar=null}finally{je=i,Z.p=a,O.T=n}}e.current=t,Je=2}}function zf(){if(Je===2){Je=0;var e=kn,t=Ha,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=O.T,O.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,O.T=n}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,Ym();var e=kn,t=Ha,n=rn,a=xf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Ha=kn=null,Of(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Cn=null),Bs(n),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot($a,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=O.T,i=Z.p,Z.p=2,O.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{O.T=t,Z.p=i}}(rn&3)!==0&&es(),Gt(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===vr?Rl++:(Rl=0,vr=e):Rl=0,Al(0)}}function Of(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function es(){return Af(),zf(),Mf(),Df()}function Df(){if(Je!==5)return!1;var e=kn,t=gr;gr=0;var n=Bs(rn),a=O.T,i=Z.p;try{Z.p=32>n?32:n,O.T=null,n=yr,yr=null;var u=kn,d=rn;if(Je=0,Ha=kn=null,rn=0,(je&6)!==0)throw Error(o(331));var m=je;if(je|=4,gf(u.current),hf(u,u.current,d,n),je=m,Al(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot($a,u)}catch{}return!0}finally{Z.p=i,O.T=a,Of(e,t)}}function Uf(e,t,n){t=Nt(n,t),t=Fu(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Wa(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),Wa(a,2),Gt(a));break}}t=t.return}}function jr(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new mg;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)||(hr=!0,i.add(n),e=xg.bind(null,e,t,n),t.then(e,e))}function xg(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):mr|=n,Ua===pe&&(Ua=0)),Gt(e)}function Hf(e,t){t===0&&(t=kc()),e=Jn(e,t),e!==null&&(Wa(e,t),Gt(e))}function bg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hf(e,n)}function jg(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(o(314))}a!==null&&a.delete(t),Hf(e,n)}function Sg(e,t){return Os(e,t)}var ts=null,qa=null,Sr=!1,ns=!1,Er=!1,An=0;function Gt(e){e!==qa&&e.next===null&&(qa===null?ts=qa=e:qa=qa.next=e),ns=!0,Sr||(Sr=!0,Tg())}function Al(e,t){if(!Er&&ns){Er=!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||Fa(a,u)||(n=!0,Gf(a,u));a=a.next}while(n);Er=!1}}function Eg(){Bf()}function Bf(){ns=Sr=!1;var e=0;An!==0&&Og()&&(e=An);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||Al(e),An!==0&&(An=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]=Fm(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&&Ds(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Fa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ds(a),Bs(n)){case 2:case 8:n=wc;break;case 32:n=ni;break;case 268435456:n=Cc;break;default:n=ni}return a=qf.bind(null,e),n=Os(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ds(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 Tg(){Ug(function(){(je&6)!==0?Os(Nc,Eg):Bf()})}function Tr(){if(An===0){var e=_a;e===0&&(e=ai,ai<<=1,(ai&261888)===0&&(ai=256)),An=e}return An}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 _g(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(An!==0){var b=d?Vf(i,d):new FormData(i);Xu(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),Xu(n,{pending:!0,data:b,method:i.method,action:u},u,b))},currentTarget:i}]})}}for(var _r=0;_r<uu.length;_r++){var Nr=uu[_r],Ng=Nr.toLowerCase(),wg=Nr[0].toUpperCase()+Nr.slice(1);Ot(Ng,"on"+wg)}Ot(xo,"onAnimationEnd"),Ot(bo,"onAnimationIteration"),Ot(jo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Vp,"onTransitionRun"),Ot(Xp,"onTransitionStart"),Ot(Qp,"onTransitionCancel"),Ot(So,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zl));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,R=m.currentTarget;if(m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,R=m.currentTarget,m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}}}}function me(e,t){var n=t[Ls];n===void 0&&(n=t[Ls]=new Set);var a=e+"__bubble";n.has(a)||(Qf(t,e,2,!1),n.add(a))}function wr(e,t,n){var a=0;t&&(a|=4),Qf(n,e,a,t)}var as="_reactListening"+Math.random().toString(36).slice(2);function Cr(e){if(!e[as]){e[as]=!0,Uc.forEach(function(n){n!=="selectionchange"&&(Cg.has(n)||wr(n,!1,e),wr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[as]||(t[as]=!0,wr("selectionchange",!1,t))}}function Qf(e,t,n,a){switch(bh(t)){case 2:var i=ny;break;case 8:i=ay;break;default:i=Vr}n=i.bind(null,t,n,e),i=void 0,!Ks||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 kr(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=ra(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}Kc(function(){var R=u,B=Zs(n),Y=[];e:{var A=Eo.get(e);if(A!==void 0){var H=mi,I=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":H=jp;break;case"focusin":I="focus",H=Is;break;case"focusout":I="blur",H=Is;break;case"beforeblur":case"afterblur":H=Is;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":H=Wc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=cp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=Tp;break;case xo:case bo:case jo:H=fp;break;case So:H=Np;break;case"scroll":case"scrollend":H=up;break;case"wheel":H=Cp;break;case"copy":case"cut":case"paste":H=mp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Pc;break;case"toggle":case"beforetoggle":H=Rp}var le=(t&4)!==0,we=!le&&(e==="scroll"||e==="scrollend"),_=le?A!==null?A+"Capture":null:A;le=[];for(var T=R,k;T!==null;){var q=T;if(k=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||k===null||_===null||(q=el(T,_),q!=null&&le.push(Ml(T,q,k))),we)break;T=T.return}0<le.length&&(A=new H(A,I,null,n,B),Y.push({event:A,listeners:le}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",A&&n!==Qs&&(I=n.relatedTarget||n.fromElement)&&(ra(I)||I[ua]))break e;if((H||A)&&(A=B.window===B?B:(A=B.ownerDocument)?A.defaultView||A.parentWindow:window,H?(I=n.relatedTarget||n.toElement,H=R,I=I?ra(I):null,I!==null&&(we=h(I),le=I.tag,I!==we||le!==5&&le!==27&&le!==6)&&(I=null)):(H=null,I=R),H!==I)){if(le=Wc,q="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=Pc,q="onPointerLeave",_="onPointerEnter",T="pointer"),we=H==null?A:Pa(H),k=I==null?A:Pa(I),A=new le(q,T+"leave",H,n,B),A.target=we,A.relatedTarget=k,q=null,ra(B)===R&&(le=new le(_,T+"enter",I,n,B),le.target=k,le.relatedTarget=we,q=le),we=q,H&&I)t:{for(le=kg,_=H,T=I,k=0,q=_;q;q=le(q))k++;q=0;for(var ee=T;ee;ee=le(ee))q++;for(;0<k-q;)_=le(_),k--;for(;0<q-k;)T=le(T),q--;for(;k--;){if(_===T||T!==null&&_===T.alternate){le=_;break t}_=le(_),T=le(T)}le=null}else le=null;H!==null&&Zf(Y,A,H,le,!1),I!==null&&we!==null&&Zf(Y,we,I,le,!0)}}e:{if(A=R?Pa(R):window,H=A.nodeName&&A.nodeName.toLowerCase(),H==="select"||H==="input"&&A.type==="file")var xe=uo;else if(io(A))if(ro)xe=qp;else{xe=Bp;var P=Hp}else H=A.nodeName,!H||H.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?R&&Xs(R.elementType)&&(xe=uo):xe=Lp;if(xe&&(xe=xe(e,R))){so(Y,xe,n,B);break e}P&&P(e,A,R),e==="focusout"&&R&&A.type==="number"&&R.memoizedProps.value!=null&&Vs(A,"number",A.value)}switch(P=R?Pa(R):window,e){case"focusin":(io(P)||P.contentEditable==="true")&&(ya=P,lu=R,rl=null);break;case"focusout":rl=lu=ya=null;break;case"mousedown":iu=!0;break;case"contextmenu":case"mouseup":case"dragend":iu=!1,yo(Y,n,B);break;case"selectionchange":if(Yp)break;case"keydown":case"keyup":yo(Y,n,B)}var de;if(eu)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&&(de=$c()):(pn=B,$s="value"in pn?pn.value:pn.textContent,ga=!0)),P=ls(R,ge),0<P.length&&(ge=new Ic(ge,e,null,n,B),Y.push({event:ge,listeners:P}),de?ge.data=de:(de=lo(n),de!==null&&(ge.data=de)))),(de=zp?Mp(e,n):Op(e,n))&&(ge=ls(R,"onBeforeInput"),0<ge.length&&(P=new Ic("onBeforeInput","beforeinput",null,n,B),Y.push({event:P,listeners:ge}),P.data=de)),_g(Y,e,R,n,B)}Xf(Y,t)})}function Ml(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=el(e,n),i!=null&&a.unshift(Ml(e,i,u)),i=el(e,t),i!=null&&a.push(Ml(e,i,u))),e.tag===3)return a;e=e.return}return[]}function kg(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,R=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||R===null||(b=R,i?(R=el(n,u),R!=null&&d.unshift(Ml(n,R,b))):i||(R=el(n,u),R!=null&&d.push(Ml(n,R,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Rg=/\r\n?/g,Ag=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace(Rg,`
|
|
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":ri(e,"class",a);break;case"tabIndex":ri(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,n,a);break;case"style":Zc(e,a,u);break;case"data":if(t!=="object"){ri(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(o(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(o(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=ip.get(n)||n,ui(e,n,a))}}function Rr(e,t,n,a,i,u){switch(n){case"style":Zc(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(o(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(!Hc.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 nt(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(o(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,R=null;for(a in n)if(n.hasOwnProperty(a)){var B=n[a];if(B!=null)switch(a){case"name":i=B;break;case"type":d=B;break;case"checked":b=B;break;case"defaultChecked":R=B;break;case"value":u=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:Ne(e,t,a,B,n,null)}}Yc(e,u,m,b,R,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(o(91));break;default:Ne(e,t,d,m,n,null)}Xc(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<zl.length;a++)me(zl[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(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ne(e,t,R,a,n,null)}return;default:if(Xs(t)){for(B in n)n.hasOwnProperty(B)&&(a=n[B],a!==void 0&&Rr(e,t,B,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 zg(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,R=null,B=null;for(H in n){var Y=n[H];if(n.hasOwnProperty(H)&&Y!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":b=Y;default:a.hasOwnProperty(H)||Ne(e,t,H,null,a,Y)}}for(var A in a){var H=a[A];if(Y=n[A],a.hasOwnProperty(A)&&(H!=null||Y!=null))switch(A){case"type":u=H;break;case"name":i=H;break;case"checked":R=H;break;case"defaultChecked":B=H;break;case"value":d=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:H!==Y&&Ne(e,t,A,H,a,Y)}}Ys(e,d,m,b,R,B,u,i);return;case"select":H=d=m=A=null;for(u in n)if(b=n[u],n.hasOwnProperty(u)&&b!=null)switch(u){case"value":break;case"multiple":H=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":A=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=H,A!=null?fa(e,!!n,A,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":H=A=null;for(m in n)if(i=n[m],n.hasOwnProperty(m)&&i!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default: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":A=i;break;case"defaultValue":H=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&Ne(e,t,d,i,a,u)}Vc(e,A,H);return;case"option":for(var I in n)if(A=n[I],n.hasOwnProperty(I)&&A!=null&&!a.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:Ne(e,t,I,null,a,A)}for(b in a)if(A=a[b],H=n[b],a.hasOwnProperty(b)&&A!==H&&(A!=null||H!=null))switch(b){case"selected":e.selected=A&&typeof A!="function"&&typeof A!="symbol";break;default:Ne(e,t,b,A,a,H)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in n)A=n[le],n.hasOwnProperty(le)&&A!=null&&!a.hasOwnProperty(le)&&Ne(e,t,le,null,a,A);for(R in a)if(A=a[R],H=n[R],a.hasOwnProperty(R)&&A!==H&&(A!=null||H!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,t));break;default:Ne(e,t,R,A,a,H)}return;default:if(Xs(t)){for(var we in n)A=n[we],n.hasOwnProperty(we)&&A!==void 0&&!a.hasOwnProperty(we)&&Rr(e,t,we,void 0,a,A);for(B in a)A=a[B],H=n[B],!a.hasOwnProperty(B)||A===H||A===void 0&&H===void 0||Rr(e,t,B,A,a,H);return}}for(var _ in n)A=n[_],n.hasOwnProperty(_)&&A!=null&&!a.hasOwnProperty(_)&&Ne(e,t,_,null,a,A);for(Y in a)A=a[Y],H=n[Y],!a.hasOwnProperty(Y)||A===H||A==null&&H==null||Ne(e,t,Y,A,a,H)}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 Mg(){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],R=b.startTime;if(R>m)break;var B=b.transferSize,Y=b.initiatorType;B&&$f(Y)&&(b=b.responseEnd,d+=B*(b<m?1:(m-R)/(b-R)))}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 Ar=null,zr=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 Mr(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 Or=null;function Og(){var e=window.event;return e&&e.type==="popstate"?e===Or?!1:(Or=e,!0):(Or=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,Dg=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,Ug=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(Hg)}:If;function Hg(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")Ol(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ol(n);for(var u=n.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Ia]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Ol(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 Dr(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":Dr(n),qs(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Bg(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[Ia])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=At(e.nextSibling),e===null)break}return null}function Lg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=At(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=At(e.nextSibling),e===null))return null;return e}function Ur(e){return e.data==="$?"||e.data==="$~"}function Hr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function qg(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 At(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 Br=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 At(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(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qs(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 cn=Z.d;Z.d={f:Gg,r:Yg,D:Vg,C:Xg,L:Qg,m:Zg,X:Kg,S:Jg,M:$g};function Gg(){var e=cn.f(),t=Wi();return e||t}function Yg(e){var t=ca(e);t!==null&&t.tag===5&&t.type==="form"?Sd(t):cn.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"),nt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Vg(e){cn.D(e),uh("dns-prefetch",e,null)}function Xg(e,t){cn.C(e,t),uh("preconnect",e,t)}function Qg(e,t,n){cn.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(Dl(u))||t==="script"&&a.querySelector(Ul(u))||(t=a.createElement("link"),nt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Zg(e,t){cn.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(Ul(u)))return}a=n.createElement("link"),nt(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Jg(e,t,n){cn.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(Dl(u)))m.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(u))&&Lr(e,n);var b=d=a.createElement("link");Ke(b),nt(b,"link",e),b._p=new Promise(function(R,B){b.onload=R,b.onerror=B}),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 Kg(e,t){cn.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(Ul(i)),u||(e=v({src:e,async:!0},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),nt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function $g(e,t){cn.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(Ul(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),nt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function rh(e,t,n,a){var i=(i=se.current)?ss(i):null;if(!i)throw Error(o(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(Dl(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||Fg(i,e,n,d.state))),t&&a===null)throw Error(o(528,""));return d}if(t&&a!==null)throw Error(o(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(o(444,e))}}function Ya(e){return'href="'+Tt(e)+'"'}function Dl(e){return'link[rel="stylesheet"]['+e+"]"}function ch(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Fg(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}),nt(t,"link",n),Ke(t),e.head.appendChild(t))}function Va(e){return'[src="'+Tt(e)+'"]'}function Ul(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),nt(a,"style",i),us(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ya(n.href);var u=e.querySelector(Dl(i));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;a=ch(n),(i=zt.get(i))&&Lr(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}),nt(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(Ul(u)))?(t.instance=i,Ke(i),i):(a=n,(i=zt.get(u))&&(a=v({},n),qr(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),nt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(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 Lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function dh(e,t,n){if(rs===null){var a=new Map,i=rs=new Map;i.set(n,a)}else i=rs,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[Ia]||u[Ie]||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 Wg(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 Ig(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(Dl(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,Ke(u);return}u=t.ownerDocument||t,a=ch(a),(i=zt.get(i))&&Lr(a,i),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),nt(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=cs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gr=0;function Pg(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&&Gr===0&&(Gr=62500*Mg());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>Gr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function cs(){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(ey,e),os=null,cs.call(e))}function ey(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=cs.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 Hl={$$typeof:L,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ty(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=Us(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Us(0),this.hiddenUpdates=Us(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,R,B,Y){return e=new ty(e,t,n,d,b,R,B,Y,m),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=bu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Tu(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),pl(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 Yr(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Jn(e,67108864);t!==null&&ft(t,e,67108864),Yr(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=St();t=Hs(t);var n=Jn(e,t);n!==null&&ft(n,e,t),Yr(e,t)}}var fs=!0;function ny(e,t,n,a){var i=O.T;O.T=null;var u=Z.p;try{Z.p=2,Vr(e,t,n,a)}finally{Z.p=u,O.T=i}}function ay(e,t,n,a){var i=O.T;O.T=null;var u=Z.p;try{Z.p=8,Vr(e,t,n,a)}finally{Z.p=u,O.T=i}}function Vr(e,t,n,a){if(fs){var i=Xr(a);if(i===null)kr(e,t,a,hs,n),jh(e,a);else if(iy(i,e,t,n,a))a.stopPropagation();else if(jh(e,a),t&4&&-1<ly.indexOf(e)){for(;i!==null;){var u=ca(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Yn(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,Al(0))}}break;case 31:case 13:m=Jn(u,2),m!==null&&ft(m,u,2),Wi(),Yr(u,2)}if(u=Xr(a),u===null&&kr(e,t,a,hs,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else kr(e,t,a,null,n)}}function Xr(e){return e=Zs(e),Qr(e)}var hs=null;function Qr(e){if(hs=null,e=ra(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(Vm()){case Nc:return 2;case wc:return 8;case ni:case Xm:return 32;case Cc:return 268435456;default:return 32}default:return 32}}var Zr=!1,Mn=null,On=null,Dn=null,Bl=new Map,Ll=new Map,Un=[],ly="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":Bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ll.delete(t.pointerId)}}function ql(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=ca(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function iy(e,t,n,a,i){switch(t){case"focusin":return Mn=ql(Mn,e,t,n,a,i),!0;case"dragenter":return On=ql(On,e,t,n,a,i),!0;case"mouseover":return Dn=ql(Dn,e,t,n,a,i),!0;case"pointerover":var u=i.pointerId;return Bl.set(u,ql(Bl.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Ll.set(u,ql(Ll.get(u)||null,e,t,n,a,i)),!0}return!1}function Sh(e){var t=ra(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,Oc(e.priority,function(){xh(n)});return}}else if(t===31){if(t=E(n),t!==null){e.blockedOn=t,Oc(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=Xr(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qs=a,n.target.dispatchEvent(a),Qs=null}else return t=ca(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Eh(e,t,n){ms(e)&&n.delete(t)}function sy(){Zr=!1,Mn!==null&&ms(Mn)&&(Mn=null),On!==null&&ms(On)&&(On=null),Dn!==null&&ms(Dn)&&(Dn=null),Bl.forEach(Eh),Ll.forEach(Eh)}function ps(e,t){e.blockedOn===t&&(e.blockedOn=null,Zr||(Zr=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,sy)))}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(Qr(a||n)===null)continue;break}var u=ca(n);u!==null&&(e.splice(t,3),t-=3,Xu(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),Bl.forEach(t),Ll.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(Qr(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 Jr(e){this._internalRoot=e}ys.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,a=St();gh(n,a,e,t,null,null)},ys.prototype.unmount=Jr.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=Mc();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=r.version;if(Nh!=="19.2.5")throw Error(o(527,Nh,"19.2.5"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var uy={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{$a=vs.inject(uy),mt=vs}catch{}}return Yl.createRoot=function(e,t){if(!f(e))throw Error(o(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,Cr(e),new Jr(t)},Yl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(o(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=Hs(a),i=jn(a),i.callback=null,Sn(n,i,a),n=a,t.current.lanes=n,Wa(t,n),Gt(t),e[ua]=t.current,Cr(e),new ys(t)},Yl.version="19.2.5",Yl}var Uh;function yy(){if(Uh)return Fr.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(r){console.error(r)}}return s(),Fr.exports=gy(),Fr.exports}var vy=yy();/**
|
|
48
|
+
`+a.stack}}var Ms=Object.prototype.hasOwnProperty,Os=s.unstable_scheduleCallback,Ds=s.unstable_cancelCallback,Gm=s.unstable_shouldYield,Ym=s.unstable_requestPaint,ht=s.unstable_now,Vm=s.unstable_getCurrentPriorityLevel,Nc=s.unstable_ImmediatePriority,wc=s.unstable_UserBlockingPriority,ni=s.unstable_NormalPriority,Xm=s.unstable_LowPriority,kc=s.unstable_IdlePriority,Qm=s.log,Zm=s.unstable_setDisableYieldValue,$a=null,mt=null;function hn(e){if(typeof Qm=="function"&&Zm(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode($a,e)}catch{}}var pt=Math.clz32?Math.clz32:$m,Jm=Math.log,Km=Math.LN2;function $m(e){return e>>>=0,e===0?32:31-(Jm(e)/Km|0)|0}var ai=256,li=262144,ii=4194304;function Yn(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=Yn(a):(d&=m,d!==0?i=Yn(d):n||(n=m&~e,n!==0&&(i=Yn(n))))):(m=a&~u,m!==0?i=Yn(m):d!==0?i=Yn(d):n||(n=a&~e,n!==0&&(i=Yn(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 Fa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fm(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cc(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Us(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wm(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,R=e.hiddenUpdates;for(n=d&~n;0<n;){var B=31-pt(n),Y=1<<B;m[B]=0,b[B]=-1;var A=R[B];if(A!==null)for(R[B]=null,B=0;B<A.length;B++){var H=A[B];H!==null&&(H.lane&=-536870913)}n&=~Y}a!==0&&Rc(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function Rc(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 Ac(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 zc(e,t){var n=t&-t;return n=(n&42)!==0?1:Hs(n),(n&(e.suspendedLanes|t))!==0?0:n}function Hs(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 Bs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function Oc(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var mn=Math.random().toString(36).slice(2),Ie="__reactFiber$"+mn,st="__reactProps$"+mn,ua="__reactContainer$"+mn,Ls="__reactEvents$"+mn,Im="__reactListeners$"+mn,Pm="__reactHandles$"+mn,Dc="__reactResources$"+mn,Ia="__reactMarker$"+mn;function qs(e){delete e[Ie],delete e[st],delete e[Ls],delete e[Im],delete e[Pm]}function ra(e){var t=e[Ie];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ua]||n[Ie]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lh(e);e!==null;){if(n=e[Ie])return n;e=lh(e)}return t}e=n,n=e.parentNode}return null}function ca(e){if(e=e[Ie]||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 Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function oa(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Ia]=!0}var Uc=new Set,Hc={};function Vn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(Hc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var ep=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]*$"),Bc={},Lc={};function tp(e){return Ms.call(Lc,e)?!0:Ms.call(Bc,e)?!1:ep.test(e)?Lc[e]=!0:(Bc[e]=!0,!1)}function ui(e,t,n){if(tp(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 ri(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 qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function np(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 Gs(e){if(!e._valueTracker){var t=qc(e)?"checked":"value";e._valueTracker=np(e,t,""+e[t])}}function Gc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=qc(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ci(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 ap=/[\n"\\]/g;function Tt(e){return e.replace(ap,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ys(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?Vs(e,d,Et(t)):n!=null?Vs(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 Yc(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)){Gs(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),Gs(e)}function Vs(e,t,n){t==="number"&&ci(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 Vc(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 Xc(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(o(92));if(te(a)){if(1<a.length)throw Error(o(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),Gs(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 lp=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 Qc(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||lp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Zc(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(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&&Qc(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&Qc(e,u,t[u])}function Xs(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 ip=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"]]),sp=/^[\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 sp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Qs=null;function Zs(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 Jc(e){var t=ca(e);if(t&&(e=t.stateNode)){var n=e[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ys(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(o(90));Ys(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&&Gc(a)}break e;case"textarea":Vc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}}}var Js=!1;function Kc(e,t,n){if(Js)return e(t,n);Js=!0;try{var a=e(t);return a}finally{if(Js=!1,(ma!==null||pa!==null)&&(Wi(),ma&&(t=ma,e=pa,pa=ma=null,Jc(t),e)))for(t=0;t<e.length;t++)Jc(e[t])}}function el(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(o(231,t,typeof n));return n}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=!1;if(Jt)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Ks=!1}var pn=null,$s=null,di=null;function $c(){if(di)return di;var e,t=$s,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 Fc(){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:Fc,this.isPropagationStopped=Fc,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 Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=ut(Xn),nl=v({},Xn,{view:0,detail:0}),up=ut(nl),Fs,Ws,al,pi=v({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ps,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==al&&(al&&e.type==="mousemove"?(Fs=e.screenX-al.screenX,Ws=e.screenY-al.screenY):Ws=Fs=0,al=e),Fs)},movementY:function(e){return"movementY"in e?e.movementY:Ws}}),Wc=ut(pi),rp=v({},pi,{dataTransfer:0}),cp=ut(rp),op=v({},nl,{relatedTarget:0}),Is=ut(op),dp=v({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),fp=ut(dp),hp=v({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mp=ut(hp),pp=v({},Xn,{data:0}),Ic=ut(pp),gp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yp={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"},vp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vp[e])?!!t[e]:!1}function Ps(){return xp}var bp=v({},nl,{key:function(e){if(e.key){var t=gp[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"?yp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ps,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}}),jp=ut(bp),Sp=v({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pc=ut(Sp),Ep=v({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ps}),Tp=ut(Ep),_p=v({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Np=ut(_p),wp=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}),kp=ut(wp),Cp=v({},Xn,{newState:0,oldState:0}),Rp=ut(Cp),Ap=[9,13,27,32],eu=Jt&&"CompositionEvent"in window,ll=null;Jt&&"documentMode"in document&&(ll=document.documentMode);var zp=Jt&&"TextEvent"in window&&!ll,eo=Jt&&(!eu||ll&&8<ll&&11>=ll),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 Mp(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 Op(e,t){if(ga)return e==="compositionend"||!eu&&ao(e,t)?(e=$c(),di=$s=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 Dp={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"?!!Dp[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 il=null,sl=null;function Up(e){Xf(e,0)}function gi(e){var t=Pa(e);if(Gc(t))return e}function uo(e,t){if(e==="change")return t}var ro=!1;if(Jt){var tu;if(Jt){var nu="oninput"in document;if(!nu){var co=document.createElement("div");co.setAttribute("oninput","return;"),nu=typeof co.oninput=="function"}tu=nu}else tu=!1;ro=tu&&(!document.documentMode||9<document.documentMode)}function oo(){il&&(il.detachEvent("onpropertychange",fo),sl=il=null)}function fo(e){if(e.propertyName==="value"&&gi(sl)){var t=[];so(t,sl,e,Zs(e)),Kc(Up,t)}}function Hp(e,t,n){e==="focusin"?(oo(),il=t,sl=n,il.attachEvent("onpropertychange",fo)):e==="focusout"&&oo()}function Bp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(sl)}function Lp(e,t){if(e==="click")return gi(t)}function qp(e,t){if(e==="input"||e==="change")return gi(t)}function Gp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Gp;function ul(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!Ms.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=ci(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=ci(e.document)}return t}function au(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 Yp=Jt&&"documentMode"in document&&11>=document.documentMode,ya=null,lu=null,rl=null,iu=!1;function yo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;iu||ya==null||ya!==ci(a)||(a=ya,"selectionStart"in a&&au(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}),rl&&ul(rl,a)||(rl=a,a=ls(lu,"onSelect"),0<a.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ya)))}function Qn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var va={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},su={},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 Zn(e){if(su[e])return su[e];if(!va[e])return e;var t=va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vo)return su[e]=t[n];return e}var xo=Zn("animationend"),bo=Zn("animationiteration"),jo=Zn("animationstart"),Vp=Zn("transitionrun"),Xp=Zn("transitionstart"),Qp=Zn("transitioncancel"),So=Zn("transitionend"),Eo=new Map,uu="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(" ");uu.push("scrollEnd");function Ot(e,t){Eo.set(e,t),Vn(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,ru=0;function vi(){for(var e=xa,t=ru=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,ru|=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 Jn(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<Rl)throw Rl=0,vr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function Zp(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 Zp(e,t,n,a)}function ou(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")ou(e)&&(d=1);else if(typeof e=="string")d=Wg(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 w:return Kn(n.children,i,u,t);case z:d=8,i|=24;break;case M:return e=yt(12,n,t,i|2),e.elementType=M,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 F:d=9;break e;case U:d=11;break e;case X:d=14;break e;case ue:d=16,a=null;break e}d=29,n=Error(o(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 Kn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function du(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 fu(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:_c(t)},wo.set(e,t),t)}return{value:e,source:t,stack:_c(t)}}var ja=[],Sa=0,Si=null,cl=0,wt=[],kt=0,gn=null,Bt=1,Lt="";function $t(e,t){ja[Sa++]=cl,ja[Sa++]=Si,Si=e,cl=t}function ko(e,t,n){wt[kt++]=Bt,wt[kt++]=Lt,wt[kt++]=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 hu(e){e.return!==null&&($t(e,1),ko(e,1,0))}function mu(e){for(;e===Si;)Si=ja[--Sa],ja[Sa]=null,cl=ja[--Sa],ja[Sa]=null;for(;e===gn;)gn=wt[--kt],wt[kt]=null,Lt=wt[--kt],wt[kt]=null,Bt=wt[--kt],wt[kt]=null}function Co(e,t){wt[kt++]=Bt,wt[kt++]=Lt,wt[kt++]=gn,Bt=t.id,Lt=t.overflow,gn=e}var Pe=null,Ae=null,ye=!1,yn=null,Ct=!1,pu=Error(o(519));function vn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(Nt(t,e)),pu}function Ro(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ie]=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<zl.length;n++)me(zl[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),Yc(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),Xc(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 Ao(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Ct=!1;return;case 27:case 3:Ct=!0;return;default:Pe=Pe.return}}function Ea(e){if(e!==Pe)return!1;if(!ye)return Ao(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")||Mr(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),Ao(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ae=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ae=ah(e)}else t===27?(t=Ae,zn(e.type)?(e=Br,Br=null,Ae=e):Ae=t):Ae=Pe?At(e.stateNode.nextSibling):null;return!0}function $n(){Ae=Pe=null,ye=!1}function gu(){var e=yn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),yn=null),e}function ol(e){yn===null?yn=[e]:yn.push(e)}var yu=S(null),Fn=null,Ft=null;function xn(e,t,n){V(yu,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=yu.current,k(yu)}function vu(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 xu(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),vu(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(o(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),vu(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(o(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(o(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Hl):e=[Hl])}i=i.return}e!==null&&xu(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 Wn(e){Fn=e,Ft=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return zo(Fn,e)}function Ti(e,t){return Fn===null&&Wn(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(o(308));Ft=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ft=Ft.next=t;return n}var Jp=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()})}},Kp=s.unstable_scheduleCallback,$p=s.unstable_NormalPriority,Ve={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bu(){return{controller:new Jp,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&Kp($p,function(){e.controller.abort()})}var fl=null,ju=0,_a=0,Na=null;function Fp(e,t){if(fl===null){var n=fl=[];ju=0,_a=Tr(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ju++,t.then(Mo,Mo),t}function Mo(){if(--ju===0&&fl!==null){Na!==null&&(Na.status="fulfilled");var e=fl;fl=null,_a=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wp(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=O.S;O.S=function(e,t){vf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fp(e,t),Oo!==null&&Oo(e,t)};var In=S(null);function Su(){var e=In.current;return e!==null?e:ke.pooledCache}function _i(e,t){t===null?V(In,In.current):V(In,t.pool)}function Do(){var e=Su();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(o(460)),Eu=Error(o(474)),Ni=Error(o(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=ke,e!==null&&100<e.shellSuspendCounter)throw Error(o(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 ea=t,wa}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ea=n,wa):n}}var ea=null;function Bo(){if(ea===null)throw Error(o(459));var e=ea;return ea=null,e}function Lo(e){if(e===wa||e===Ni)throw Error(o(483))}var ka=null,hl=0;function ki(e){var t=hl;return hl+=1,ka===null&&(ka=[]),Ho(ka,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ci(e,t){throw t.$$typeof===N?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qo(e){function t(_,T){if(e){var C=_.deletions;C===null?(_.deletions=[T],_.flags|=16):C.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,C){return _.index=C,e?(C=_.alternate,C!==null?(C=C.index,C<T?(_.flags|=67108866,T):C):(_.flags|=67108866,T)):(_.flags|=1048576,T)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,T,C,q){return T===null||T.tag!==6?(T=du(C,_.mode,q),T.return=_,T):(T=i(T,C),T.return=_,T)}function b(_,T,C,q){var ee=C.type;return ee===w?B(_,T,C.props.children,q,C.key):T!==null&&(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Pn(ee)===T.type)?(T=i(T,C.props),ml(T,C),T.return=_,T):(T=ji(C.type,C.key,C.props,null,_.mode,q),ml(T,C),T.return=_,T)}function R(_,T,C,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==C.containerInfo||T.stateNode.implementation!==C.implementation?(T=fu(C,_.mode,q),T.return=_,T):(T=i(T,C.children||[]),T.return=_,T)}function B(_,T,C,q,ee){return T===null||T.tag!==7?(T=Kn(C,_.mode,q,ee),T.return=_,T):(T=i(T,C),T.return=_,T)}function Y(_,T,C){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=du(""+T,_.mode,C),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case G:return C=ji(T.type,T.key,T.props,null,_.mode,C),ml(C,T),C.return=_,C;case D:return T=fu(T,_.mode,C),T.return=_,T;case ue:return T=Pn(T),Y(_,T,C)}if(te(T)||Oe(T))return T=Kn(T,_.mode,C,null),T.return=_,T;if(typeof T.then=="function")return Y(_,ki(T),C);if(T.$$typeof===L)return Y(_,Ti(_,T),C);Ci(_,T)}return null}function A(_,T,C,q){var ee=T!==null?T.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ee!==null?null:m(_,T,""+C,q);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case G:return C.key===ee?b(_,T,C,q):null;case D:return C.key===ee?R(_,T,C,q):null;case ue:return C=Pn(C),A(_,T,C,q)}if(te(C)||Oe(C))return ee!==null?null:B(_,T,C,q,null);if(typeof C.then=="function")return A(_,T,ki(C),q);if(C.$$typeof===L)return A(_,T,Ti(_,C),q);Ci(_,C)}return null}function H(_,T,C,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(C)||null,m(T,_,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return _=_.get(q.key===null?C:q.key)||null,b(T,_,q,ee);case D:return _=_.get(q.key===null?C:q.key)||null,R(T,_,q,ee);case ue:return q=Pn(q),H(_,T,C,q,ee)}if(te(q)||Oe(q))return _=_.get(C)||null,B(T,_,q,ee,null);if(typeof q.then=="function")return H(_,T,C,ki(q),ee);if(q.$$typeof===L)return H(_,T,C,Ti(T,q),ee);Ci(T,q)}return null}function I(_,T,C,q){for(var ee=null,xe=null,P=T,de=T=0,ge=null;P!==null&&de<C.length;de++){P.index>de?(ge=P,P=null):ge=P.sibling;var be=A(_,P,C[de],q);if(be===null){P===null&&(P=ge);break}e&&P&&be.alternate===null&&t(_,P),T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be,P=ge}if(de===C.length)return n(_,P),ye&&$t(_,de),ee;if(P===null){for(;de<C.length;de++)P=Y(_,C[de],q),P!==null&&(T=u(P,T,de),xe===null?ee=P:xe.sibling=P,xe=P);return ye&&$t(_,de),ee}for(P=a(P);de<C.length;de++)ge=H(P,_,de,C[de],q),ge!==null&&(e&&ge.alternate!==null&&P.delete(ge.key===null?de:ge.key),T=u(ge,T,de),xe===null?ee=ge:xe.sibling=ge,xe=ge);return e&&P.forEach(function(Hn){return t(_,Hn)}),ye&&$t(_,de),ee}function le(_,T,C,q){if(C==null)throw Error(o(151));for(var ee=null,xe=null,P=T,de=T=0,ge=null,be=C.next();P!==null&&!be.done;de++,be=C.next()){P.index>de?(ge=P,P=null):ge=P.sibling;var Hn=A(_,P,be.value,q);if(Hn===null){P===null&&(P=ge);break}e&&P&&Hn.alternate===null&&t(_,P),T=u(Hn,T,de),xe===null?ee=Hn:xe.sibling=Hn,xe=Hn,P=ge}if(be.done)return n(_,P),ye&&$t(_,de),ee;if(P===null){for(;!be.done;de++,be=C.next())be=Y(_,be.value,q),be!==null&&(T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be);return ye&&$t(_,de),ee}for(P=a(P);!be.done;de++,be=C.next())be=H(P,_,de,be.value,q),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?de:be.key),T=u(be,T,de),xe===null?ee=be:xe.sibling=be,xe=be);return e&&P.forEach(function(ry){return t(_,ry)}),ye&&$t(_,de),ee}function we(_,T,C,q){if(typeof C=="object"&&C!==null&&C.type===w&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case G:e:{for(var ee=C.key;T!==null;){if(T.key===ee){if(ee=C.type,ee===w){if(T.tag===7){n(_,T.sibling),q=i(T,C.props.children),q.return=_,_=q;break e}}else if(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Pn(ee)===T.type){n(_,T.sibling),q=i(T,C.props),ml(q,C),q.return=_,_=q;break e}n(_,T);break}else t(_,T);T=T.sibling}C.type===w?(q=Kn(C.props.children,_.mode,q,C.key),q.return=_,_=q):(q=ji(C.type,C.key,C.props,null,_.mode,q),ml(q,C),q.return=_,_=q)}return d(_);case D:e:{for(ee=C.key;T!==null;){if(T.key===ee)if(T.tag===4&&T.stateNode.containerInfo===C.containerInfo&&T.stateNode.implementation===C.implementation){n(_,T.sibling),q=i(T,C.children||[]),q.return=_,_=q;break e}else{n(_,T);break}else t(_,T);T=T.sibling}q=fu(C,_.mode,q),q.return=_,_=q}return d(_);case ue:return C=Pn(C),we(_,T,C,q)}if(te(C))return I(_,T,C,q);if(Oe(C)){if(ee=Oe(C),typeof ee!="function")throw Error(o(150));return C=ee.call(C),le(_,T,C,q)}if(typeof C.then=="function")return we(_,T,ki(C),q);if(C.$$typeof===L)return we(_,T,Ti(_,C),q);Ci(_,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,T!==null&&T.tag===6?(n(_,T.sibling),q=i(T,C),q.return=_,_=q):(n(_,T),q=du(C,_.mode,q),q.return=_,_=q),d(_)):n(_,T)}return function(_,T,C,q){try{hl=0;var ee=we(_,T,C,q);return ka=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 ta=qo(!0),Go=qo(!1),bn=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _u(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 pl(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,Ac(e,n)}}function Nu(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 wu=!1;function gl(){if(wu){var e=Na;if(e!==null)throw e}}function yl(e,t,n,a){wu=!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,R=b.next;b.next=null,d===null?u=R:d.next=R,d=b;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==d&&(m===null?B.firstBaseUpdate=R:m.next=R,B.lastBaseUpdate=b))}if(u!==null){var Y=i.baseState;d=0,B=R=b=null,m=u;do{var A=m.lane&-536870913,H=A!==m.lane;if(H?(pe&A)===A:(a&A)===A){A!==0&&A===_a&&(wu=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,le=m;A=t;var we=n;switch(le.tag){case 1:if(I=le.payload,typeof I=="function"){Y=I.call(we,Y,A);break e}Y=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=le.payload,A=typeof I=="function"?I.call(we,Y,A):I,A==null)break e;Y=v({},Y,A);break e;case 2:bn=!0}}A=m.callback,A!==null&&(e.flags|=64,H&&(e.flags|=8192),H=i.callbacks,H===null?i.callbacks=[A]:H.push(A))}else H={lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(R=B=H,b=Y):B=B.next=H,d|=A;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;H=m,m=H.next,H.next=null,i.lastBaseUpdate=H,i.shared.pending=null}}while(!0);B===null&&(b=Y),i.baseState=b,i.firstBaseUpdate=R,i.lastBaseUpdate=B,u===null&&(i.shared.lanes=0),wn|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(o(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 Ca=S(null),Ri=S(0);function Xo(e,t){e=un,V(Ri,e),V(Ca,t),un=e|t.baseLanes}function ku(){V(Ri,un),V(Ca,Ca.current)}function Cu(){un=Ri.current,k(Ca),k(Ri)}var vt=S(null),Rt=null;function En(e){var t=e.alternate;V(Ge,Ge.current&1),V(vt,e),Rt===null&&(t===null||Ca.current!==null||t.memoizedState!==null)&&(Rt=e)}function Ru(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){k(vt),Rt===e&&(Rt=null),k(Ge)}var Ge=S(0);function Ai(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ur(n)||Hr(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,oe=null,_e=null,Xe=null,zi=!1,Ra=!1,na=!1,Mi=0,vl=0,Aa=null,Ip=0;function Be(){throw Error(o(321))}function Au(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 zu(e,t,n,a,i,u){return It=u,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?kd:Ju,na=!1,u=n(a,i),na=!1,Ra&&(u=Jo(t,n,a,i)),Zo(e),u}function Zo(e){O.H=jl;var t=_e!==null&&_e.next!==null;if(It=0,Xe=_e=oe=null,zi=!1,vl=0,Aa=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&Ei(e)&&(Qe=!0))}function Jo(e,t,n,a){oe=e;var i=0;do{if(Ra&&(Aa=null),vl=0,Ra=!1,25<=i)throw Error(o(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)}O.H=Cd,u=t(n,a)}while(Ra);return u}function Pp(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?xl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(oe.flags|=1024),t}function Mu(){var e=Mi!==0;return Mi=0,e}function Ou(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Du(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=oe=null,Ra=!1,vl=Mi=0,Aa=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ye(){if(_e===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?oe.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw oe.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Xe===null?oe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(e){var t=vl;return vl+=1,Aa===null&&(Aa=[]),e=Ho(Aa,e,t),t=oe,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?kd:Ju),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xl(e);if(e.$$typeof===L)return et(e)}throw Error(o(438,String(e)))}function Uu(e){var t=null,n=oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=oe.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(),oe.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 Hu(t,_e,e)}function Hu(e,t,n){var a=e.queue;if(a===null)throw Error(o(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,R=t,B=!1;do{var Y=R.lane&-536870913;if(Y!==R.lane?(pe&Y)===Y:(It&Y)===Y){var A=R.revertLane;if(A===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Y===_a&&(B=!0);else if((It&A)===A){R=R.next,A===_a&&(B=!0);continue}else Y={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=Y,d=u):b=b.next=Y,oe.lanes|=A,wn|=A;Y=R.action,na&&n(u,Y),u=R.hasEagerState?R.eagerState:n(u,Y)}else A={lane:Y,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=A,d=u):b=b.next=A,oe.lanes|=Y,wn|=Y;R=R.next}while(R!==null&&R!==t);if(b===null?d=u:b.next=m,!gt(u,e.memoizedState)&&(Qe=!0,B&&(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 Bu(e){var t=Ye(),n=t.queue;if(n===null)throw Error(o(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=oe,i=Ye(),u=ye;if(u){if(n===void 0)throw Error(o(407));n=n()}else n=t();var d=!gt((_e||i).memoizedState,n);if(d&&(i.memoizedState=n,Qe=!0),i=i.queue,Gu(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),ke===null)throw Error(o(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=oe.updateQueue,t===null?(t=Oi(),oe.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=Jn(e,2);t!==null&&ft(t,e,2)}function Lu(e){var t=it();if(typeof e=="function"){var n=e;if(e=n(),na){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,Hu(e,_e,typeof a=="function"?a:Pt)}function eg(e,t,n,a,i){if(Li(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};O.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=O.T,d={};O.T=d;try{var m=n(i,a),b=O.S;b!==null&&b(d,m),nd(e,t,m)}catch(R){qu(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),O.T=u}}else try{u=n(i,a),nd(e,t,u)}catch(R){qu(e,t,R)}}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 qu(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 qu(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=ke.formState;if(n!==null){e:{var a=oe;if(ye){if(Ae){t:{for(var i=Ae,u=Ct;i.nodeType!==8;){if(!u){i=null;break t}if(i=At(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Ae=At(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,oe,a),a.dispatch=n,a=Lu(!1),u=Zu.bind(null,oe,!1,a.queue),a=it(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=eg.bind(null,oe,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function ud(e){var t=Ye();return rd(t,_e,e)}function rd(e,t,n){if(t=Hu(e,t,id)[0],e=Ui(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=xl(t)}catch(d){throw d===wa?Ni:d}else a=t;t=Ye();var i=t.queue,u=i.dispatch;return n!==t.memoizedState&&(oe.flags|=2048,za(9,{destroy:void 0},tg.bind(null,i,n),null)),[a,u,e]}function tg(e,t){e.action=t}function cd(e){var t=Ye(),n=_e;if(n!==null)return rd(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=oe.updateQueue,t===null&&(t=Oi(),oe.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();oe.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&&Au(a,_e.memoizedState.deps)?i.memoizedState=za(t,u,n,a):(oe.flags|=e,i.memoizedState=za(1|t,u,n,a))}function dd(e,t){Hi(8390656,8,e,t)}function Gu(e,t){Bi(2048,8,e,t)}function ng(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=Oi(),oe.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 ng({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(o(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 Yu(){}function yd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Au(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&&Au(t,a[1]))return a[0];if(a=e(),na){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function Vu(e,t,n){return n===void 0||(It&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=bf(),oe.lanes|=e,wn|=e,n)}function xd(e,t,n,a){return gt(n,t)?n:Ca.current!==null?(e=Vu(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(),oe.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=O.T,m={};O.T=m,Zu(e,!1,t,n);try{var b=i(),R=O.S;if(R!==null&&R(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var B=Wp(b,a);bl(e,t,B,St(e))}else bl(e,t,a,St(e))}catch(Y){bl(e,t,{then:function(){},status:"rejected",reason:Y},St())}finally{Z.p=u,d!==null&&m.types!==null&&(d.types=m.types),O.T=d}}function ag(){}function Xu(e,t,n,a){if(e.tag!==5)throw Error(o(476));var i=jd(e).queue;bd(e,i,t,ne,n===null?ag: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),bl(e,t.next.queue,{},St())}function Qu(){return et(Hl)}function Ed(){return Ye().memoizedState}function Td(){return Ye().memoizedState}function lg(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),pl(a,t,n)),t={cache:bu()},e.payload=t;return}t=t.return}}function ig(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();bl(e,t,n,a)}function bl(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),ke===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 Zu(e,t,n,a){if(a={lane:2,revertLane:Tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(o(479))}else t=cu(e,n,a,2),t!==null&&ft(t,e,2)}function Li(e){var t=e.alternate;return e===oe||t!==null&&t===oe}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,Ac(e,n)}}var jl={readContext:et,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};jl.useEffectEvent=Be;var kd={readContext:et,use:Di,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:et,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(na){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(na){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=ig.bind(null,oe,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Lu(e);var t=e.queue,n=_d.bind(null,oe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yu,useDeferredValue:function(e,t){var n=it();return Vu(n,e,t)},useTransition:function(){var e=Lu(!1);return e=bd.bind(null,oe,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=oe,i=it();if(ye){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),ke===null)throw Error(o(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=ke.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=Ip++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qu,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=Zu.bind(null,oe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uu,useCacheRefresh:function(){return it().memoizedState=lg.bind(null,oe)},useEffectEvent:function(e){var t=it(),n={impl:e};return t.memoizedState=n,function(){if((je&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ju={readContext:et,use:Di,useCallback:yd,useContext:et,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Ui,useRef:od,useState:function(){return Ui(Pt)},useDebugValue:Yu,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:xl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:ud,useActionState:ud,useOptimistic:function(e,t){var n=Ye();return ed(n,_e,e,t)},useMemoCache:Uu,useCacheRefresh:Td};Ju.useEffectEvent=fd;var Cd={readContext:et,use:Di,useCallback:yd,useContext:et,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Bu,useRef:od,useState:function(){return Bu(Pt)},useDebugValue:Yu,useDeferredValue:function(e,t){var n=Ye();return _e===null?Vu(n,e,t):xd(n,_e.memoizedState,e,t)},useTransition:function(){var e=Bu(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:cd,useActionState:cd,useOptimistic:function(e,t){var n=Ye();return _e!==null?ed(n,_e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uu,useCacheRefresh:Td};Cd.useEffectEvent=fd;function Ku(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 $u={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),pl(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),pl(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),pl(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?!ul(n,a)||!ul(i,u):!0}function Ad(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&&$u.enqueueReplaceState(t,t.state,null)}function aa(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 Fu(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"&&(kn===null?kn=new Set([this]):kn.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function sg(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),jr(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)),jr(e,a,i)),!1}throw Error(o(435,n.tag))}return jr(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!==pu&&(e=Error(o(422),{cause:a}),ol(Nt(e,n)))):(a!==pu&&(t=Error(o(423),{cause:a}),ol(Nt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Nt(a,n),i=Fu(e.stateNode,a,i),Nu(e,i),Le!==4&&(Le=2)),!1;var u=Error(o(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=Fu(n.stateNode,a,e),Nu(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"&&(kn===null||!kn.has(u))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ud(i),Hd(i,e,n,a),Nu(n,i),!1}n=n.return}while(n!==null);return!1}var Wu=Error(o(461)),Qe=!1;function tt(e,t,n,a){t.child=e===null?Go(t,null,n,a):ta(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 Wn(t),a=zu(e,t,n,d,u,i),m=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&m&&hu(t),t.flags|=1,tt(e,t,a,i),t.child)}function Ld(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!ou(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,!ir(e,i)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:ul,n(d,a)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Kt(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(ul(u,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=u,ir(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return Iu(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):ku(),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),ku(),Tn());return tt(e,t,i,n),t.child}function Sl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yd(e,t,n,a,i){var u=Su();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&_i(t,null),ku(),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 ta(t,e.child,null,n),e=Gi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function ug(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,Sl(null,e);if(Ru(t),(e=Ae)?(e=nh(e,Ct),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,Pe=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(Ru(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(o(558));else if(Qe||Ta(e,t,n,!1),i=(n&e.childLanes)!==0,Qe||i){if(a=ke,a!==null&&(d=zc(a,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Jn(e,d),ft(a,e,d),Wu;Ii(),t=Vd(e,t,n)}else e=u.treeContext,Ae=At(d.nextSibling),Pe=t,ye=!0,yn=null,Ct=!1,e!==null&&Co(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(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Iu(e,t,n,a,i){return Wn(t),n=zu(e,t,n,a,void 0,i),a=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&a&&hu(t),t.flags|=1,tt(e,t,n,i),t.child)}function Xd(e,t,n,a,i,u){return Wn(t),t.updateQueue=null,n=Jo(t,a,n,i),Zo(e),a=Mu(),e!==null&&!Qe?(Ou(e,t,u),en(e,t,u)):(ye&&a&&hu(t),t.flags|=1,tt(e,t,n,u),t.child)}function Qd(e,t,n,a,i){if(Wn(t),t.stateNode===null){var u=ba,d=n.contextType;typeof d=="object"&&d!==null&&(u=et(d)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=$u,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Tu(t),d=n.contextType,u.context=typeof d=="object"&&d!==null?et(d):ba,u.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Ku(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&&$u.enqueueReplaceState(u,u.state,null),yl(t,a,u,i),gl(),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=aa(n,m);u.props=b;var R=u.context,B=n.contextType;d=ba,typeof B=="object"&&B!==null&&(d=et(B));var Y=n.getDerivedStateFromProps;B=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||R!==d)&&Ad(t,u,a,d),bn=!1;var A=t.memoizedState;u.state=A,yl(t,a,u,i),gl(),R=t.memoizedState,m||A!==R||bn?(typeof Y=="function"&&(Ku(t,n,Y,a),R=t.memoizedState),(b=bn||Rd(t,n,b,a,A,R,d))?(B||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),u.props=a,u.state=R,u.context=d,a=b):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,_u(e,t),d=t.memoizedProps,B=aa(n,d),u.props=B,Y=t.pendingProps,A=u.context,R=n.contextType,b=ba,typeof R=="object"&&R!==null&&(b=et(R)),m=n.getDerivedStateFromProps,(R=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||A!==b)&&Ad(t,u,a,b),bn=!1,A=t.memoizedState,u.state=A,yl(t,a,u,i),gl();var H=t.memoizedState;d!==Y||A!==H||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(Ku(t,n,m,a),H=t.memoizedState),(B=bn||Rd(t,n,B,a,A,H,b)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,H,b),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,H,b)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=H),u.props=a,u.state=H,u.context=b,a=B):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&A===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=ta(t,e.child,null,i),t.child=ta(t,null,n,i)):tt(e,t,n,i),t.memoizedState=u.state,e=t.child):e=en(e,t,i),e}function Zd(e,t,n,a){return $n(),t.flags|=256,tt(e,t,n,a),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function er(e){return{baseLanes:e,cachePool:Do()}}function tr(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,Ct),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,Pe=t,Ae=null)):e=null,e===null)throw vn(t);return Hr(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=Kn(a,i,n,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,Sl(null,a)):(En(t),nr(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=ar(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=Kn(m,i,n,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ta(t,e.child,null,n),a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,t=Sl(null,a));else if(En(t),Hr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var R=d.dgst;d=R,a=Error(o(419)),a.stack="",a.digest=d,ol({value:a,source:null,stack:null}),t=ar(e,t,n)}else if(Qe||Ta(e,t,n,!1),d=(n&e.childLanes)!==0,Qe||d){if(d=ke,d!==null&&(a=zc(d,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Jn(e,a),ft(d,e,a),Wu;Ur(m)||Ii(),t=ar(e,t,n)}else Ur(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ae=At(m.nextSibling),Pe=t,ye=!0,yn=null,Ct=!1,e!==null&&Co(t,e),t=nr(t,a.children),t.flags|=4096);return t}return i?(Tn(),m=a.fallback,i=t.mode,b=e.child,R=b.sibling,a=Kt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,R!==null?m=Kt(R,m):(m=Kn(m,i,n,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,Sl(null,a),a=t.child,m=e.child.memoizedState,m===null?m=er(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=tr(e,d,n),t.memoizedState=Pu,Sl(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 nr(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 ar(e,t,n){return ta(t,e.child,null,n),e=nr(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),vu(e.return,t,n)}function lr(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),tt(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&&Ai(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),lr(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&&Ai(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}lr(t,!0,n,null,u,a);break;case"together":lr(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(o(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 ir(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function rg(e,t,n){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),xn(t,Ve,e.memoizedState.cache),$n();break;case 27:case 5:Ka(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,Ru(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(!ir(e,n)&&(t.flags&128)===0)return Qe=!1,rg(e,t,n);Qe=(e.flags&131072)!==0}else Qe=!1,ye&&(t.flags&1048576)!==0&&ko(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Pn(t.elementType),t.type=e,typeof e=="function")ou(e)?(a=aa(e,a),t.tag=1,t=Qd(null,t,e,a,n)):(t.tag=0,t=Iu(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===U){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(o(306,t,""))}}return t;case 0:return Iu(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=aa(a,t.pendingProps),Qd(e,t,a,i,n);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,_u(e,t),yl(t,a,null,n);var d=t.memoizedState;if(a=d.cache,xn(t,Ve,a),a!==u.cache&&xu(t,[Ve],n,!0),gl(),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(o(424)),t),ol(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=At(e.firstChild),Pe=t,ye=!0,yn=null,Ct=!0,n=Go(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($n(),a===i){t=en(e,t,n);break e}tt(e,t,a,n)}t=t.child}return t;case 26:return Yi(e,t),e===null?(n=rh(t.type,null,t.pendingProps,null))?t.memoizedState=n:ye||(n=t.type,e=t.pendingProps,a=is(se.current).createElement(n),a[Ie]=t,a[st]=e,nt(a,n,e),Ke(a),t.stateNode=a):t.memoizedState=rh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ka(t),e===null&&ye&&(a=t.stateNode=ih(t.type,t.pendingProps,se.current),Pe=t,Ct=!0,i=Ae,zn(t.type)?(Br=i,Ae=At(a.firstChild)):Ae=i),tt(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=Bg(a,t.type,t.pendingProps,Ct),a!==null?(t.stateNode=a,Pe=t,Ae=At(a.firstChild),Ct=!1,i=!0):i=!1),i||vn(t)),Ka(t),i=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,a=u.children,Mr(i,u)?a=null:d!==null&&Mr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=zu(e,t,Pp,null,null,n),Hl._currentValue=i),Yi(e,t),tt(e,t,a,n),t.child;case 6:return e===null&&ye&&((e=n=Ae)&&(n=Lg(n,t.pendingProps,Ct),n!==null?(t.stateNode=n,Pe=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=ta(t,null,a,n):tt(e,t,a,n),t.child;case 11:return Bd(e,t,t.type,t.pendingProps,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,xn(t,t.type,a.value),tt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Wn(t),i=et(i),a=a(i),t.flags|=1,tt(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 ug(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return Wn(t),a=et(Ve),e===null?(i=Su(),i===null&&(i=ke,u=bu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},Tu(t),xn(t,Ve,i)):((e.lanes&n)!==0&&(_u(e,t),yl(t,null,null,n),gl()),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&&xu(t,[Ve],n,!0))),tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function tn(e){e.flags|=4}function sr(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 ea=wi,Eu}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 ea=wi,Eu}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Cc():536870912,e.lanes|=t,Ua|=t)}function El(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 ze(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 cg(e,t,n){var a=t.pendingProps;switch(mu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return 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,gu())),ze(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(tn(t),u!==null?(ze(t),Wd(t,u)):(ze(t),sr(t,i,null,a,n))):u?u!==e.memoizedState?(tn(t),ze(t),Wd(t,u)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&tn(t),ze(t),sr(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(o(166));return ze(t),null}e=Q.current,Ea(t)?Ro(t):(e=ih(i,a,n),t.stateNode=e,tn(t))}return ze(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(o(166));return ze(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[Ie]=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(nt(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 ze(t),sr(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(o(166));if(e=se.current,Ea(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=Pe,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Ie]=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[Ie]=t,t.stateNode=e}return ze(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(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ie]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=gu(),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(o(558))}return ze(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(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Ie]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else i=gu(),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),ze(t),null);case 4:return qe(),e===null&&kr(t.stateNode.containerInfo),ze(t),null;case 10:return Wt(t.type),ze(t),null;case 19:if(k(Ge),a=t.memoizedState,a===null)return ze(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)El(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ai(e),u!==null){for(t.flags|=128,El(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,El(a,!1),t.lanes=4194304)}else{if(!i)if(e=Ai(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),El(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ye)return ze(t),null}else 2*ht()-a.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,i=!0,El(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):(ze(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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(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&&k(In),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Ve),ze(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function og(e,t){switch(mu(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(o(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(Ge),null;case 4:return qe(),null;case 10:return Wt(t.type),null;case 22:case 23:return xt(t),Cu(),e!==null&&k(In),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(mu(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:k(Ge);break;case 10:Wt(t.type);break;case 22:case 23:xt(t),Cu(),e!==null&&k(In);break;case 24:Wt(Ve)}}function Tl(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,R=m;try{R()}catch(B){Te(i,b,B)}}}a=a.next}while(a!==u)}}catch(B){Te(t,t.return,B)}}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=aa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Te(e,t,a)}}function _l(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 ur(e,t,n){try{var a=e.stateNode;zg(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 rr(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 cr(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(cr(e,t,n),e=e.sibling;e!==null;)cr(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]);nt(t,a,n),t[Ie]=e,t[st]=n}catch(u){Te(e,e.return,u)}}var nn=!1,Ze=!1,or=!1,lf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function dg(e,t){if(e=e.containerInfo,Ar=fs,e=go(e),au(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,R=0,B=0,Y=e,A=null;t:for(;;){for(var H;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),(H=Y.firstChild)!==null;)A=Y,Y=H;for(;;){if(Y===e)break t;if(A===n&&++R===i&&(m=d),A===u&&++B===a&&(b=d),(H=Y.nextSibling)!==null)break;Y=A,A=Y.parentNode}Y=H}n=m===-1||b===-1?null:{start:m,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(zr={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=aa(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)Dr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,$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&&Tl(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=aa(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&&_l(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&&_l(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),a&4&&cf(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=bg.bind(null,n),qg(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&&qs(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 De=null,rt=!1;function an(e,t,n){for(n=n.child;n!==null;)rf(e,t,n),n=n.sibling}function rf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount($a,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=De,i=rt;zn(n.type)&&(De=n.stateNode,rt=!1),an(e,t,n),Ol(n.stateNode),De=a,rt=i;break;case 5:Ze||qt(n,t);case 6:if(a=De,i=rt,De=null,an(e,t,n),De=a,rt=i,De!==null)if(rt)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(n.stateNode)}catch(u){Te(n,t,u)}else try{De.removeChild(n.stateNode)}catch(u){Te(n,t,u)}break;case 18:De!==null&&(rt?(e=De,eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Xa(e)):eh(De,n.stateNode));break;case 4:a=De,i=rt,De=n.stateNode.containerInfo,rt=!0,an(e,t,n),De=a,rt=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 cf(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 fg(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(o(435,e.tag))}}function Zi(e,t){var n=fg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=jg.bind(null,e,a);a.then(i,i)}})}function ct(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)){De=m.stateNode,rt=!1;break e}break;case 5:De=m.stateNode,rt=!1;break e;case 3:case 4:De=m.stateNode.containerInfo,rt=!0;break e}m=m.return}if(De===null)throw Error(o(160));rf(u,d,i),De=null,rt=!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:ct(t,e),ot(e),a&4&&(_n(3,e,e.return),Tl(3,e),_n(5,e,e.return));break;case 1:ct(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(ct(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[Ia]||u[Ie]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),nt(u,a,n),u[Ie]=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),nt(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),nt(u,a,n),i.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ie]=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&&ur(e,e.memoizedProps,n.memoizedProps)}break;case 27:ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),n!==null&&a&4&&ur(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ct(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,ur(e,i,n!==null?n.memoizedProps:i)),a&1024&&(or=!0);break;case 6:if(ct(t,e),ot(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(I){Te(e,e.return,I)}}break;case 3:if(rs=null,i=Dt,Dt=ss(t.containerInfo),ct(t,e),Dt=i,ot(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Xa(t.containerInfo)}catch(I){Te(e,e.return,I)}or&&(or=!1,ff(e));break;case 4:a=Dt,Dt=ss(e.stateNode.containerInfo),ct(t,e),ot(e),Dt=a;break;case 12:ct(t,e),ot(e);break;case 31:ct(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 13:ct(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,R=nn,B=Ze;if(nn=R||i,Ze=B||b,ct(t,e),Ze=B,nn=R,ot(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||b||nn||Ze||la(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,A=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).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 H=b.stateNode;i?th(H,!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:ct(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:ct(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(o(160));switch(n.tag){case 27:var i=n.stateNode,u=rr(e);Qi(e,u,i);break;case 5:var d=n.stateNode;n.flags&32&&(ha(d,""),n.flags&=-33);var m=rr(e);Qi(e,m,d);break;case 3:case 4:var b=n.stateNode.containerInfo,R=rr(e);cr(e,R,b);break;default:throw Error(o(161))}}catch(B){Te(e,e.return,B)}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 la(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),la(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ef(t,t.return,n),la(t);break;case 27:Ol(t.stateNode);case 26:case 5:qt(t,t.return),la(t);break;case 22:t.memoizedState===null&&la(t);break;case 30:la(t);break;default:la(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),Tl(4,u);break;case 1:if(sn(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(R){Te(a,a.return,R)}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(R){Te(a,a.return,R)}}n&&d&64&&Pd(u),_l(u,u.return);break;case 27:af(u);case 26:case 5:sn(i,u,n),n&&a===null&&d&4&&tf(u),_l(u,u.return);break;case 12:sn(i,u,n);break;case 31:sn(i,u,n),n&&d&4&&cf(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),_l(u,u.return);break;case 30:break;default:sn(i,u,n)}t=t.sibling}}function dr(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&&dl(n))}function fr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function 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&&Tl(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&&dl(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):Nl(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&&dr(d,t);break;case 24:Ut(e,t,n,a),i&2048&&fr(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,R=d.flags;switch(d.tag){case 0:case 11:case 15:Ma(u,d,m,b,i),Tl(8,d);break;case 23:break;case 22:var B=d.stateNode;d.memoizedState!==null?B._visibility&2?Ma(u,d,m,b,i):Nl(u,d):(B._visibility|=2,Ma(u,d,m,b,i)),i&&R&2048&&dr(d.alternate,d);break;case 24:Ma(u,d,m,b,i),i&&R&2048&&fr(d.alternate,d);break;default:Ma(u,d,m,b,i)}t=t.sibling}}function Nl(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:Nl(n,a),i&2048&&dr(a.alternate,a);break;case 24:Nl(n,a),i&2048&&fr(a.alternate,a);break;default:Nl(n,a)}t=t.sibling}}var wl=8192;function Oa(e,t,n){if(e.subtreeFlags&wl)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&wl&&e.memoizedState!==null&&Ig(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=wl,wl=16777216,Oa(e,t,n),wl=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 kl(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:kl(e),e.flags&2048&&_n(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ji(e)):kl(e);break;default:kl(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:dl(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 hg={getCacheForType:function(e){var t=et(Ve),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return et(Ve).controller.signal}},mg=typeof WeakMap=="function"?WeakMap:Map,je=0,ke=null,he=null,pe=0,Ee=0,bt=null,Nn=!1,Da=!1,hr=!1,un=0,Le=0,wn=0,ia=0,mr=0,jt=0,Ua=0,Cl=null,dt=null,pr=!1,Ki=0,vf=0,$i=1/0,Fi=null,kn=null,Je=0,Cn=null,Ha=null,rn=0,gr=0,yr=null,xf=null,Rl=0,vr=null;function St(){return(je&2)!==0&&pe!==0?pe&-pe:O.T!==null?Tr():Mc()}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===ke&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Ba(e,0),Rn(e,pe,jt,!1)),Wa(e,n),((je&2)===0||e!==ke)&&(e===ke&&((je&2)===0&&(ia|=n),Le===4&&Rn(e,pe,jt,!1)),Gt(e))}function jf(e,t,n){if((je&6)!==0)throw Error(o(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Fa(e,t),i=a?yg(e,t):br(e,t,!0),u=a;do{if(i===0){Da&&!a&&Rn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!pg(n)){i=br(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=br(m,d,!1),d!==2){if(hr&&!b){m.errorRecoveryDisabledLanes|=u,ia|=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(o(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(o(329))}if((t&62914560)===t&&(i=Ki+300-ht(),10<i)){if(Rn(a,t,jt,!Nn),si(a,0,!0)!==0)break e;rn=t,a.timeoutHandle=If(Sf.bind(null,a,n,dt,Fi,pr,t,jt,ia,Ua,Nn,u,"Throttled",-0,0),i);break e}Sf(a,n,dt,Fi,pr,t,jt,ia,Ua,Nn,u,null,-0,0)}}break}while(!0);Gt(e)}function Sf(e,t,n,a,i,u,d,m,b,R,B,Y,A,H){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=Pg(Y,I),I!==null){rn=u,e.cancelPendingCommit=I(Rf.bind(null,e,t,u,n,a,i,d,m,b,B,Y,null,A,H)),Rn(e,u,d,!R);return}}Rf(e,t,u,n,a,i,d,m,b)}function pg(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&=~mr,t&=~ia,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&&Rc(e,n,t)}function Wi(){return(je&6)===0?(Al(0),!1):!0}function xr(){if(he!==null){if(Ee===0)var e=he.return;else e=he,Ft=Fn=null,Du(e),ka=null,hl=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,Dg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),rn=0,xr(),ke=e,he=n=Kt(e.current,null),pe=t,Ee=0,bt=null,Nn=!1,Da=Fa(e,t),hr=!1,Ua=jt=mr=ia=wn=Le=0,dt=Cl=null,pr=!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){oe=null,O.H=jl,t===wa||t===Ni?(t=Bo(),Ee=3):t===Eu?(t=Bo(),Ee=4):Ee=t===Wu?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=O.H;return O.H=jl,e===null?jl:e}function Nf(){var e=O.A;return O.A=hg,e}function Ii(){Le=4,Nn||(pe&4194048)!==pe&&vt.current!==null||(Da=!0),(wn&134217727)===0&&(ia&134217727)===0||ke===null||Rn(ke,pe,jt,!1)}function br(e,t,n){var a=je;je|=2;var i=_f(),u=Nf();(ke!==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:xr(),d=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var R=Ee;if(Ee=0,bt=null,La(e,m,b,R),n&&Da){d=0;break e}break;default:R=Ee,Ee=0,bt=null,La(e,m,b,R)}}gg(),d=Le;break}catch(B){Ef(e,B)}while(!0);return t&&e.shellSuspendCounter++,Ft=Fn=null,je=a,O.H=i,O.A=u,he===null&&(ke=null,pe=0,vi()),d}function gg(){for(;he!==null;)wf(he)}function yg(e,t){var n=je;je|=2;var a=_f(),i=Nf();ke!==e||pe!==t?(Fi=null,$i=ht()+500,Ba(e,t)):Da=Fa(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,kf(t);break}t=function(){Ee!==2&&Ee!==9||ke!==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,kf(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 R=m.return;R!==null?(he=R,Pi(R)):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:xr(),Le=6;break e;default:throw Error(o(462))}}vg();break}catch(B){Ef(e,B)}while(!0);return Ft=Fn=null,O.H=a,O.A=i,je=n,he!==null?0:(ke=null,pe=0,vi(),Le)}function vg(){for(;he!==null&&!Gm();)wf(he)}function wf(e){var t=Fd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Pi(e):he=t}function kf(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:Du(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=Fn=null,Du(t),ka=null,hl=0;var i=t.return;try{if(sg(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))),Cf(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){Cf(t,Nn);return}e=t.return;var n=cg(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 Cf(e,t){do{var n=og(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(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=ru,Wm(e,n,u,d,m,b),e===ke&&(he=ke=null,pe=0),Ha=t,Cn=e,rn=n,gr=u,yr=i,xf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sg(ni,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null,i=Z.p,Z.p=2,d=je,je|=4;try{dg(e,t,n)}finally{je=d,Z.p=i,O.T=a}}Je=1,Af(),zf(),Mf()}}function Af(){if(Je===1){Je=0;var e=Cn,t=Ha,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=O.T,O.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{df(t,e);var u=zr,d=go(e.containerInfo),m=u.focusedElem,b=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&po(m.ownerDocument.documentElement,m)){if(b!==null&&au(m)){var R=b.start,B=b.end;if(B===void 0&&(B=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(B,m.value.length);else{var Y=m.ownerDocument||document,A=Y&&Y.defaultView||window;if(A.getSelection){var H=A.getSelection(),I=m.textContent.length,le=Math.min(b.start,I),we=b.end===void 0?le:Math.min(b.end,I);!H.extend&&le>we&&(d=we,we=le,le=d);var _=mo(m,le),T=mo(m,we);if(_&&T&&(H.rangeCount!==1||H.anchorNode!==_.node||H.anchorOffset!==_.offset||H.focusNode!==T.node||H.focusOffset!==T.offset)){var C=Y.createRange();C.setStart(_.node,_.offset),H.removeAllRanges(),le>we?(H.addRange(C),H.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),H.addRange(C))}}}}for(Y=[],H=m;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.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=!!Ar,zr=Ar=null}finally{je=i,Z.p=a,O.T=n}}e.current=t,Je=2}}function zf(){if(Je===2){Je=0;var e=Cn,t=Ha,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=O.T,O.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,O.T=n}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,Ym();var e=Cn,t=Ha,n=rn,a=xf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Ha=Cn=null,Of(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(kn=null),Bs(n),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot($a,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=O.T,i=Z.p,Z.p=2,O.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{O.T=t,Z.p=i}}(rn&3)!==0&&es(),Gt(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===vr?Rl++:(Rl=0,vr=e):Rl=0,Al(0)}}function Of(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function es(){return Af(),zf(),Mf(),Df()}function Df(){if(Je!==5)return!1;var e=Cn,t=gr;gr=0;var n=Bs(rn),a=O.T,i=Z.p;try{Z.p=32>n?32:n,O.T=null,n=yr,yr=null;var u=Cn,d=rn;if(Je=0,Ha=Cn=null,rn=0,(je&6)!==0)throw Error(o(331));var m=je;if(je|=4,gf(u.current),hf(u,u.current,d,n),je=m,Al(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot($a,u)}catch{}return!0}finally{Z.p=i,O.T=a,Of(e,t)}}function Uf(e,t,n){t=Nt(n,t),t=Fu(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Wa(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"&&(kn===null||!kn.has(a))){e=Nt(n,e),n=Ud(2),a=Sn(t,n,2),a!==null&&(Hd(n,a,t,e),Wa(a,2),Gt(a));break}}t=t.return}}function jr(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new mg;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)||(hr=!0,i.add(n),e=xg.bind(null,e,t,n),t.then(e,e))}function xg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(pe&n)===n&&(Le===4||Le===3&&(pe&62914560)===pe&&300>ht()-Ki?(je&2)===0&&Ba(e,0):mr|=n,Ua===pe&&(Ua=0)),Gt(e)}function Hf(e,t){t===0&&(t=Cc()),e=Jn(e,t),e!==null&&(Wa(e,t),Gt(e))}function bg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hf(e,n)}function jg(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(o(314))}a!==null&&a.delete(t),Hf(e,n)}function Sg(e,t){return Os(e,t)}var ts=null,qa=null,Sr=!1,ns=!1,Er=!1,An=0;function Gt(e){e!==qa&&e.next===null&&(qa===null?ts=qa=e:qa=qa.next=e),ns=!0,Sr||(Sr=!0,Tg())}function Al(e,t){if(!Er&&ns){Er=!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===ke?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Fa(a,u)||(n=!0,Gf(a,u));a=a.next}while(n);Er=!1}}function Eg(){Bf()}function Bf(){ns=Sr=!1;var e=0;An!==0&&Og()&&(e=An);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||Al(e),An!==0&&(An=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]=Fm(m,t)):b<=t&&(e.expiredLanes|=m),u&=~m}if(t=ke,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&&Ds(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Fa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ds(a),Bs(n)){case 2:case 8:n=wc;break;case 32:n=ni;break;case 268435456:n=kc;break;default:n=ni}return a=qf.bind(null,e),n=Os(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ds(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===ke?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 Tg(){Ug(function(){(je&6)!==0?Os(Nc,Eg):Bf()})}function Tr(){if(An===0){var e=_a;e===0&&(e=ai,ai<<=1,(ai&261888)===0&&(ai=256)),An=e}return An}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 _g(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(An!==0){var b=d?Vf(i,d):new FormData(i);Xu(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),Xu(n,{pending:!0,data:b,method:i.method,action:u},u,b))},currentTarget:i}]})}}for(var _r=0;_r<uu.length;_r++){var Nr=uu[_r],Ng=Nr.toLowerCase(),wg=Nr[0].toUpperCase()+Nr.slice(1);Ot(Ng,"on"+wg)}Ot(xo,"onAnimationEnd"),Ot(bo,"onAnimationIteration"),Ot(jo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Vp,"onTransitionRun"),Ot(Xp,"onTransitionStart"),Ot(Qp,"onTransitionCancel"),Ot(So,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="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(" "),kg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zl));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,R=m.currentTarget;if(m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,R=m.currentTarget,m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=R;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}}}}function me(e,t){var n=t[Ls];n===void 0&&(n=t[Ls]=new Set);var a=e+"__bubble";n.has(a)||(Qf(t,e,2,!1),n.add(a))}function wr(e,t,n){var a=0;t&&(a|=4),Qf(n,e,a,t)}var as="_reactListening"+Math.random().toString(36).slice(2);function kr(e){if(!e[as]){e[as]=!0,Uc.forEach(function(n){n!=="selectionchange"&&(kg.has(n)||wr(n,!1,e),wr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[as]||(t[as]=!0,wr("selectionchange",!1,t))}}function Qf(e,t,n,a){switch(bh(t)){case 2:var i=ny;break;case 8:i=ay;break;default:i=Vr}n=i.bind(null,t,n,e),i=void 0,!Ks||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 Cr(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=ra(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}Kc(function(){var R=u,B=Zs(n),Y=[];e:{var A=Eo.get(e);if(A!==void 0){var H=mi,I=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":H=jp;break;case"focusin":I="focus",H=Is;break;case"focusout":I="blur",H=Is;break;case"beforeblur":case"afterblur":H=Is;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":H=Wc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=cp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=Tp;break;case xo:case bo:case jo:H=fp;break;case So:H=Np;break;case"scroll":case"scrollend":H=up;break;case"wheel":H=kp;break;case"copy":case"cut":case"paste":H=mp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Pc;break;case"toggle":case"beforetoggle":H=Rp}var le=(t&4)!==0,we=!le&&(e==="scroll"||e==="scrollend"),_=le?A!==null?A+"Capture":null:A;le=[];for(var T=R,C;T!==null;){var q=T;if(C=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||C===null||_===null||(q=el(T,_),q!=null&&le.push(Ml(T,q,C))),we)break;T=T.return}0<le.length&&(A=new H(A,I,null,n,B),Y.push({event:A,listeners:le}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",A&&n!==Qs&&(I=n.relatedTarget||n.fromElement)&&(ra(I)||I[ua]))break e;if((H||A)&&(A=B.window===B?B:(A=B.ownerDocument)?A.defaultView||A.parentWindow:window,H?(I=n.relatedTarget||n.toElement,H=R,I=I?ra(I):null,I!==null&&(we=h(I),le=I.tag,I!==we||le!==5&&le!==27&&le!==6)&&(I=null)):(H=null,I=R),H!==I)){if(le=Wc,q="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=Pc,q="onPointerLeave",_="onPointerEnter",T="pointer"),we=H==null?A:Pa(H),C=I==null?A:Pa(I),A=new le(q,T+"leave",H,n,B),A.target=we,A.relatedTarget=C,q=null,ra(B)===R&&(le=new le(_,T+"enter",I,n,B),le.target=C,le.relatedTarget=we,q=le),we=q,H&&I)t:{for(le=Cg,_=H,T=I,C=0,q=_;q;q=le(q))C++;q=0;for(var ee=T;ee;ee=le(ee))q++;for(;0<C-q;)_=le(_),C--;for(;0<q-C;)T=le(T),q--;for(;C--;){if(_===T||T!==null&&_===T.alternate){le=_;break t}_=le(_),T=le(T)}le=null}else le=null;H!==null&&Zf(Y,A,H,le,!1),I!==null&&we!==null&&Zf(Y,we,I,le,!0)}}e:{if(A=R?Pa(R):window,H=A.nodeName&&A.nodeName.toLowerCase(),H==="select"||H==="input"&&A.type==="file")var xe=uo;else if(io(A))if(ro)xe=qp;else{xe=Bp;var P=Hp}else H=A.nodeName,!H||H.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?R&&Xs(R.elementType)&&(xe=uo):xe=Lp;if(xe&&(xe=xe(e,R))){so(Y,xe,n,B);break e}P&&P(e,A,R),e==="focusout"&&R&&A.type==="number"&&R.memoizedProps.value!=null&&Vs(A,"number",A.value)}switch(P=R?Pa(R):window,e){case"focusin":(io(P)||P.contentEditable==="true")&&(ya=P,lu=R,rl=null);break;case"focusout":rl=lu=ya=null;break;case"mousedown":iu=!0;break;case"contextmenu":case"mouseup":case"dragend":iu=!1,yo(Y,n,B);break;case"selectionchange":if(Yp)break;case"keydown":case"keyup":yo(Y,n,B)}var de;if(eu)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&&(de=$c()):(pn=B,$s="value"in pn?pn.value:pn.textContent,ga=!0)),P=ls(R,ge),0<P.length&&(ge=new Ic(ge,e,null,n,B),Y.push({event:ge,listeners:P}),de?ge.data=de:(de=lo(n),de!==null&&(ge.data=de)))),(de=zp?Mp(e,n):Op(e,n))&&(ge=ls(R,"onBeforeInput"),0<ge.length&&(P=new Ic("onBeforeInput","beforeinput",null,n,B),Y.push({event:P,listeners:ge}),P.data=de)),_g(Y,e,R,n,B)}Xf(Y,t)})}function Ml(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=el(e,n),i!=null&&a.unshift(Ml(e,i,u)),i=el(e,t),i!=null&&a.push(Ml(e,i,u))),e.tag===3)return a;e=e.return}return[]}function Cg(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,R=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||R===null||(b=R,i?(R=el(n,u),R!=null&&d.unshift(Ml(n,R,b))):i||(R=el(n,u),R!=null&&d.push(Ml(n,R,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Rg=/\r\n?/g,Ag=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace(Rg,`
|
|
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":ri(e,"class",a);break;case"tabIndex":ri(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,n,a);break;case"style":Zc(e,a,u);break;case"data":if(t!=="object"){ri(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(o(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(o(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=ip.get(n)||n,ui(e,n,a))}}function Rr(e,t,n,a,i,u){switch(n){case"style":Zc(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(o(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(!Hc.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 nt(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(o(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,R=null;for(a in n)if(n.hasOwnProperty(a)){var B=n[a];if(B!=null)switch(a){case"name":i=B;break;case"type":d=B;break;case"checked":b=B;break;case"defaultChecked":R=B;break;case"value":u=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:Ne(e,t,a,B,n,null)}}Yc(e,u,m,b,R,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(o(91));break;default:Ne(e,t,d,m,n,null)}Xc(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<zl.length;a++)me(zl[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(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ne(e,t,R,a,n,null)}return;default:if(Xs(t)){for(B in n)n.hasOwnProperty(B)&&(a=n[B],a!==void 0&&Rr(e,t,B,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 zg(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,R=null,B=null;for(H in n){var Y=n[H];if(n.hasOwnProperty(H)&&Y!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":b=Y;default:a.hasOwnProperty(H)||Ne(e,t,H,null,a,Y)}}for(var A in a){var H=a[A];if(Y=n[A],a.hasOwnProperty(A)&&(H!=null||Y!=null))switch(A){case"type":u=H;break;case"name":i=H;break;case"checked":R=H;break;case"defaultChecked":B=H;break;case"value":d=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:H!==Y&&Ne(e,t,A,H,a,Y)}}Ys(e,d,m,b,R,B,u,i);return;case"select":H=d=m=A=null;for(u in n)if(b=n[u],n.hasOwnProperty(u)&&b!=null)switch(u){case"value":break;case"multiple":H=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":A=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=H,A!=null?fa(e,!!n,A,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":H=A=null;for(m in n)if(i=n[m],n.hasOwnProperty(m)&&i!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default: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":A=i;break;case"defaultValue":H=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&Ne(e,t,d,i,a,u)}Vc(e,A,H);return;case"option":for(var I in n)if(A=n[I],n.hasOwnProperty(I)&&A!=null&&!a.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:Ne(e,t,I,null,a,A)}for(b in a)if(A=a[b],H=n[b],a.hasOwnProperty(b)&&A!==H&&(A!=null||H!=null))switch(b){case"selected":e.selected=A&&typeof A!="function"&&typeof A!="symbol";break;default:Ne(e,t,b,A,a,H)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in n)A=n[le],n.hasOwnProperty(le)&&A!=null&&!a.hasOwnProperty(le)&&Ne(e,t,le,null,a,A);for(R in a)if(A=a[R],H=n[R],a.hasOwnProperty(R)&&A!==H&&(A!=null||H!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,t));break;default:Ne(e,t,R,A,a,H)}return;default:if(Xs(t)){for(var we in n)A=n[we],n.hasOwnProperty(we)&&A!==void 0&&!a.hasOwnProperty(we)&&Rr(e,t,we,void 0,a,A);for(B in a)A=a[B],H=n[B],!a.hasOwnProperty(B)||A===H||A===void 0&&H===void 0||Rr(e,t,B,A,a,H);return}}for(var _ in n)A=n[_],n.hasOwnProperty(_)&&A!=null&&!a.hasOwnProperty(_)&&Ne(e,t,_,null,a,A);for(Y in a)A=a[Y],H=n[Y],!a.hasOwnProperty(Y)||A===H||A==null&&H==null||Ne(e,t,Y,A,a,H)}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 Mg(){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],R=b.startTime;if(R>m)break;var B=b.transferSize,Y=b.initiatorType;B&&$f(Y)&&(b=b.responseEnd,d+=B*(b<m?1:(m-R)/(b-R)))}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 Ar=null,zr=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 Mr(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 Or=null;function Og(){var e=window.event;return e&&e.type==="popstate"?e===Or?!1:(Or=e,!0):(Or=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,Dg=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,Ug=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(Hg)}:If;function Hg(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")Ol(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ol(n);for(var u=n.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Ia]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Ol(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 Dr(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":Dr(n),qs(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Bg(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[Ia])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=At(e.nextSibling),e===null)break}return null}function Lg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=At(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=At(e.nextSibling),e===null))return null;return e}function Ur(e){return e.data==="$?"||e.data==="$~"}function Hr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function qg(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 At(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 Br=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 At(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(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qs(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 cn=Z.d;Z.d={f:Gg,r:Yg,D:Vg,C:Xg,L:Qg,m:Zg,X:Kg,S:Jg,M:$g};function Gg(){var e=cn.f(),t=Wi();return e||t}function Yg(e){var t=ca(e);t!==null&&t.tag===5&&t.type==="form"?Sd(t):cn.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"),nt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Vg(e){cn.D(e),uh("dns-prefetch",e,null)}function Xg(e,t){cn.C(e,t),uh("preconnect",e,t)}function Qg(e,t,n){cn.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(Dl(u))||t==="script"&&a.querySelector(Ul(u))||(t=a.createElement("link"),nt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Zg(e,t){cn.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(Ul(u)))return}a=n.createElement("link"),nt(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Jg(e,t,n){cn.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(Dl(u)))m.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(u))&&Lr(e,n);var b=d=a.createElement("link");Ke(b),nt(b,"link",e),b._p=new Promise(function(R,B){b.onload=R,b.onerror=B}),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 Kg(e,t){cn.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(Ul(i)),u||(e=v({src:e,async:!0},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),nt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function $g(e,t){cn.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(Ul(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),nt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function rh(e,t,n,a){var i=(i=se.current)?ss(i):null;if(!i)throw Error(o(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(Dl(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||Fg(i,e,n,d.state))),t&&a===null)throw Error(o(528,""));return d}if(t&&a!==null)throw Error(o(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(o(444,e))}}function Ya(e){return'href="'+Tt(e)+'"'}function Dl(e){return'link[rel="stylesheet"]['+e+"]"}function ch(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Fg(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}),nt(t,"link",n),Ke(t),e.head.appendChild(t))}function Va(e){return'[src="'+Tt(e)+'"]'}function Ul(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),nt(a,"style",i),us(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ya(n.href);var u=e.querySelector(Dl(i));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;a=ch(n),(i=zt.get(i))&&Lr(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}),nt(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(Ul(u)))?(t.instance=i,Ke(i),i):(a=n,(i=zt.get(u))&&(a=v({},n),qr(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),nt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(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 Lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function dh(e,t,n){if(rs===null){var a=new Map,i=rs=new Map;i.set(n,a)}else i=rs,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[Ia]||u[Ie]||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 Wg(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 Ig(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(Dl(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,Ke(u);return}u=t.ownerDocument||t,a=ch(a),(i=zt.get(i))&&Lr(a,i),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),nt(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=cs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gr=0;function Pg(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&&Gr===0&&(Gr=62500*Mg());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>Gr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function cs(){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(ey,e),os=null,cs.call(e))}function ey(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=cs.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 Hl={$$typeof:L,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ty(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=Us(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Us(0),this.hiddenUpdates=Us(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,R,B,Y){return e=new ty(e,t,n,d,b,R,B,Y,m),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=bu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Tu(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),pl(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 Yr(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Jn(e,67108864);t!==null&&ft(t,e,67108864),Yr(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=St();t=Hs(t);var n=Jn(e,t);n!==null&&ft(n,e,t),Yr(e,t)}}var fs=!0;function ny(e,t,n,a){var i=O.T;O.T=null;var u=Z.p;try{Z.p=2,Vr(e,t,n,a)}finally{Z.p=u,O.T=i}}function ay(e,t,n,a){var i=O.T;O.T=null;var u=Z.p;try{Z.p=8,Vr(e,t,n,a)}finally{Z.p=u,O.T=i}}function Vr(e,t,n,a){if(fs){var i=Xr(a);if(i===null)Cr(e,t,a,hs,n),jh(e,a);else if(iy(i,e,t,n,a))a.stopPropagation();else if(jh(e,a),t&4&&-1<ly.indexOf(e)){for(;i!==null;){var u=ca(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Yn(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,Al(0))}}break;case 31:case 13:m=Jn(u,2),m!==null&&ft(m,u,2),Wi(),Yr(u,2)}if(u=Xr(a),u===null&&Cr(e,t,a,hs,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else Cr(e,t,a,null,n)}}function Xr(e){return e=Zs(e),Qr(e)}var hs=null;function Qr(e){if(hs=null,e=ra(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(Vm()){case Nc:return 2;case wc:return 8;case ni:case Xm:return 32;case kc:return 268435456;default:return 32}default:return 32}}var Zr=!1,Mn=null,On=null,Dn=null,Bl=new Map,Ll=new Map,Un=[],ly="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":Bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ll.delete(t.pointerId)}}function ql(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=ca(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function iy(e,t,n,a,i){switch(t){case"focusin":return Mn=ql(Mn,e,t,n,a,i),!0;case"dragenter":return On=ql(On,e,t,n,a,i),!0;case"mouseover":return Dn=ql(Dn,e,t,n,a,i),!0;case"pointerover":var u=i.pointerId;return Bl.set(u,ql(Bl.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Ll.set(u,ql(Ll.get(u)||null,e,t,n,a,i)),!0}return!1}function Sh(e){var t=ra(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,Oc(e.priority,function(){xh(n)});return}}else if(t===31){if(t=E(n),t!==null){e.blockedOn=t,Oc(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=Xr(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qs=a,n.target.dispatchEvent(a),Qs=null}else return t=ca(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Eh(e,t,n){ms(e)&&n.delete(t)}function sy(){Zr=!1,Mn!==null&&ms(Mn)&&(Mn=null),On!==null&&ms(On)&&(On=null),Dn!==null&&ms(Dn)&&(Dn=null),Bl.forEach(Eh),Ll.forEach(Eh)}function ps(e,t){e.blockedOn===t&&(e.blockedOn=null,Zr||(Zr=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,sy)))}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(Qr(a||n)===null)continue;break}var u=ca(n);u!==null&&(e.splice(t,3),t-=3,Xu(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),Bl.forEach(t),Ll.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(Qr(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 Jr(e){this._internalRoot=e}ys.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,a=St();gh(n,a,e,t,null,null)},ys.prototype.unmount=Jr.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=Mc();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=r.version;if(Nh!=="19.2.5")throw Error(o(527,Nh,"19.2.5"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var uy={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{$a=vs.inject(uy),mt=vs}catch{}}return Yl.createRoot=function(e,t){if(!f(e))throw Error(o(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,kr(e),new Jr(t)},Yl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(o(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=Hs(a),i=jn(a),i.callback=null,Sn(n,i,a),n=a,t.current.lanes=n,Wa(t,n),Gt(t),e[ua]=t.current,kr(e),new ys(t)},Yl.version="19.2.5",Yl}var Uh;function yy(){if(Uh)return Fr.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(r){console.error(r)}}return s(),Fr.exports=gy(),Fr.exports}var vy=yy();/**
|
|
50
50
|
* react-router v7.14.2
|
|
51
51
|
*
|
|
52
52
|
* Copyright (c) Remix Software Inc.
|
|
@@ -55,7 +55,7 @@ Error generating stack: `+a.message+`
|
|
|
55
55
|
* LICENSE.md file in the root directory of this source tree.
|
|
56
56
|
*
|
|
57
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 xy(s={}){function r(o,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:p,search:E,hash:x}=h||o.location;return sc("",{pathname:p,search:E,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function c(o,f){return typeof f=="string"?f:Zl(f)}return jy(r,c,null,s)}function Ue(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function Vt(s,r){if(!s){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function by(){return Math.random().toString(36).substring(2,10)}function Lh(s,r){return{usr:s.state,key:s.key,idx:r,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function sc(s,r,c=null,o,f){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof r=="string"?Qa(r):r,state:c,key:r&&r.key||o||by(),unstable_mask:f}}function Zl({pathname:s="/",search:r="",hash:c=""}){return r&&r!=="?"&&(s+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(s+=c.charAt(0)==="#"?c:"#"+c),s}function Qa(s){let r={};if(s){let c=s.indexOf("#");c>=0&&(r.hash=s.substring(c),s=s.substring(0,c));let o=s.indexOf("?");o>=0&&(r.search=s.substring(o),s=s.substring(0,o)),s&&(r.pathname=s)}return r}function jy(s,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,p=f.history,E="POP",x=null,g=j();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function j(){return(p.state||{idx:null}).idx}function v(){E="POP";let z=j(),M=z==null?null:z-g;g=z,x&&x({action:E,location:w.location,delta:M})}function N(z,M){E="PUSH";let F=Bh(z)?z:sc(w.location,z,M);g=j()+1;let L=Lh(F,g),U=w.createHref(F.unstable_mask||F);try{p.pushState(L,"",U)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(U)}h&&x&&x({action:E,location:w.location,delta:1})}function G(z,M){E="REPLACE";let F=Bh(z)?z:sc(w.location,z,M);g=j();let L=Lh(F,g),U=w.createHref(F.unstable_mask||F);p.replaceState(L,"",U),h&&x&&x({action:E,location:w.location,delta:0})}function D(z){return Sy(z)}let w={get action(){return E},get location(){return s(f,p)},listen(z){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Hh,v),x=z,()=>{f.removeEventListener(Hh,v),x=null}},createHref(z){return r(f,z)},createURL:D,encodeLocation(z){let M=D(z);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:N,replace:G,go(z){return p.go(z)}};return w}function Sy(s,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(c,"No window.location.(origin|href) available to create URL");let o=typeof s=="string"?s:Zl(s);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function im(s,r,c="/"){return Ey(s,r,c,!1)}function Ey(s,r,c,o){let f=typeof r=="string"?Qa(r):r,h=dn(f.pathname||"/",c);if(h==null)return null;let p=sm(s);Ty(p);let E=null;for(let x=0;E==null&&x<p.length;++x){let g=Dy(h);E=My(p[x],g,o)}return E}function sm(s,r=[],c=[],o="",f=!1){let h=(p,E,x=f,g)=>{let j={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:E,route:p};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(o)&&x)return;Ue(j.relativePath.startsWith(o),`Absolute route path "${j.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(o.length)}let v=Ht([o,j.relativePath]),N=c.concat(j);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}".`),sm(p.children,r,N,v,x)),!(p.path==null&&!p.index)&&r.push({path:v,score:Ay(v,p.index),routesMeta:N})};return s.forEach((p,E)=>{var x;if(p.path===""||!((x=p.path)!=null&&x.includes("?")))h(p,E);else for(let g of um(p.path))h(p,E,!0,g)}),r}function um(s){let r=s.split("/");if(r.length===0)return[];let[c,...o]=r,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let p=um(o.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 Ty(s){s.sort((r,c)=>r.score!==c.score?c.score-r.score:zy(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var _y=/^:[\w-]+$/,Ny=3,wy=2,Cy=1,ky=10,Ry=-2,qh=s=>s==="*";function Ay(s,r){let c=s.split("/"),o=c.length;return c.some(qh)&&(o+=Ry),r&&(o+=wy),c.filter(f=>!qh(f)).reduce((f,h)=>f+(_y.test(h)?Ny:h===""?Cy:ky),o)}function zy(s,r){return s.length===r.length&&s.slice(0,-1).every((o,f)=>o===r[f])?s[s.length-1]-r[r.length-1]:0}function My(s,r,c=!1){let{routesMeta:o}=s,f={},h="/",p=[];for(let E=0;E<o.length;++E){let x=o[E],g=E===o.length-1,j=h==="/"?r:r.slice(h.length)||"/",v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},j),N=x.route;if(!v&&g&&c&&!o[o.length-1].route.index&&(v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},j)),!v)return null;Object.assign(f,v.params),p.push({params:f,pathname:Ht([h,v.pathname]),pathnameBase:Ly(Ht([h,v.pathnameBase])),route:N}),v.pathnameBase!=="/"&&(h=Ht([h,v.pathnameBase]))}return p}function Ss(s,r){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[c,o]=Oy(s.path,s.caseSensitive,s.end),f=r.match(c);if(!f)return null;let h=f[0],p=h.replace(/(.)\/+$/,"$1"),E=f.slice(1);return{params:o.reduce((g,{paramName:j,isOptional:v},N)=>{if(j==="*"){let D=E[N]||"";p=h.slice(0,h.length-D.length).replace(/(.)\/+$/,"$1")}const G=E[N];return v&&!G?g[j]=void 0:g[j]=(G||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:p,pattern:s}}function Oy(s,r=!1,c=!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 o=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,E,x,g,j)=>{if(o.push({paramName:E,isOptional:x!=null}),x){let v=j.charAt(g+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(o.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function Dy(s){try{return s.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){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 (${r}).`),s}}function dn(s,r){if(r==="/")return s;if(!s.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=s.charAt(c);return o&&o!=="/"?null:s.slice(c)||"/"}var Uy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Hy(s,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof s=="string"?Qa(s):s,h;return c?(c=cm(c),c.startsWith("/")?h=Gh(c.substring(1),"/"):h=Gh(c,r)):h=r,{pathname:h,search:qy(o),hash:Gy(f)}}function Gh(s,r){let c=Es(r).split("/");return s.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function ec(s,r,c,o){return`Cannot include a '${s}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function By(s){return s.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function rm(s){let r=By(s);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function dc(s,r,c,o=!1){let f;typeof s=="string"?f=Qa(s):(f={...s},Ue(!f.pathname||!f.pathname.includes("?"),ec("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),ec("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),ec("#","search","hash",f)));let h=s===""||f.pathname==="",p=h?"/":f.pathname,E;if(p==null)E=c;else{let v=r.length-1;if(!o&&p.startsWith("..")){let N=p.split("/");for(;N[0]==="..";)N.shift(),v-=1;f.pathname=N.join("/")}E=v>=0?r[v]:"/"}let x=Hy(f,E),g=p&&p!=="/"&&p.endsWith("/"),j=(h||p===".")&&c.endsWith("/");return!x.pathname.endsWith("/")&&(g||j)&&(x.pathname+="/"),x}var cm=s=>s.replace(/\/\/+/g,"/"),Ht=s=>cm(s.join("/")),Es=s=>s.replace(/\/+$/,""),Ly=s=>Es(s).replace(/^\/*/,"/"),qy=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Gy=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Yy=class{constructor(s,r,c,o=!1){this.status=s,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Vy(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Xy(s){let r=s.map(c=>c.route.path).filter(Boolean);return Ht(r)||"/"}var om=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function dm(s,r){let c=s;if(typeof c!="string"||!Uy.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(om)try{let h=new URL(window.location.href),p=c.startsWith("//")?new URL(h.protocol+c):new URL(c),E=dn(p.pathname,r);p.origin===h.origin&&E!=null?c=E+p.search+p.hash:f=!0}catch{Vt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fm=["POST","PUT","PATCH","DELETE"];new Set(fm);var Qy=["GET",...fm];new Set(Qy);var Za=y.createContext(null);Za.displayName="DataRouter";var Ns=y.createContext(null);Ns.displayName="DataRouterState";var hm=y.createContext(!1);function Zy(){return y.useContext(hm)}var mm=y.createContext({isTransitioning:!1});mm.displayName="ViewTransition";var Jy=y.createContext(new Map);Jy.displayName="Fetchers";var Ky=y.createContext(null);Ky.displayName="Await";var Mt=y.createContext(null);Mt.displayName="Navigation";var $l=y.createContext(null);$l.displayName="Location";var Xt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var fc=y.createContext(null);fc.displayName="RouteError";var pm="REACT_ROUTER_ERROR",$y="REDIRECT",Fy="ROUTE_ERROR_RESPONSE";function Wy(s){if(s.startsWith(`${pm}:${$y}:{`))try{let r=JSON.parse(s.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Iy(s){if(s.startsWith(`${pm}:${Fy}:{`))try{let r=JSON.parse(s.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Yy(r.status,r.statusText,r.data)}catch{}}function Py(s,{relative:r}={}){Ue(Fl(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=y.useContext(Mt),{hash:f,pathname:h,search:p}=Wl(s,{relative:r}),E=h;return c!=="/"&&(E=h==="/"?c:Ht([c,h])),o.createHref({pathname:E,search:p,hash:f})}function Fl(){return y.useContext($l)!=null}function fn(){return Ue(Fl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext($l).location}var gm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ym(s){y.useContext(Mt).static||y.useLayoutEffect(s)}function ev(){let{isDataRoute:s}=y.useContext(Xt);return s?hv():tv()}function tv(){Ue(Fl(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(Za),{basename:r,navigator:c}=y.useContext(Mt),{matches:o}=y.useContext(Xt),{pathname:f}=fn(),h=JSON.stringify(rm(o)),p=y.useRef(!1);return ym(()=>{p.current=!0}),y.useCallback((x,g={})=>{if(Vt(p.current,gm),!p.current)return;if(typeof x=="number"){c.go(x);return}let j=dc(x,JSON.parse(h),f,g.relative==="path");s==null&&r!=="/"&&(j.pathname=j.pathname==="/"?r:Ht([r,j.pathname])),(g.replace?c.replace:c.push)(j,g.state,g)},[r,c,h,f,s])}y.createContext(null);function Ja(){let{matches:s}=y.useContext(Xt),r=s[s.length-1];return(r==null?void 0:r.params)??{}}function Wl(s,{relative:r}={}){let{matches:c}=y.useContext(Xt),{pathname:o}=fn(),f=JSON.stringify(rm(c));return y.useMemo(()=>dc(s,JSON.parse(f),o,r==="path"),[s,f,o,r])}function nv(s,r){return vm(s,r)}function vm(s,r,c){var z;Ue(Fl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=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 M=g&&g.path||"";bm(E,!g||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${E}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
58
|
+
*/var 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 xy(s={}){function r(o,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:p,search:E,hash:x}=h||o.location;return sc("",{pathname:p,search:E,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function c(o,f){return typeof f=="string"?f:Zl(f)}return jy(r,c,null,s)}function Ue(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function Vt(s,r){if(!s){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function by(){return Math.random().toString(36).substring(2,10)}function Lh(s,r){return{usr:s.state,key:s.key,idx:r,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function sc(s,r,c=null,o,f){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof r=="string"?Qa(r):r,state:c,key:r&&r.key||o||by(),unstable_mask:f}}function Zl({pathname:s="/",search:r="",hash:c=""}){return r&&r!=="?"&&(s+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(s+=c.charAt(0)==="#"?c:"#"+c),s}function Qa(s){let r={};if(s){let c=s.indexOf("#");c>=0&&(r.hash=s.substring(c),s=s.substring(0,c));let o=s.indexOf("?");o>=0&&(r.search=s.substring(o),s=s.substring(0,o)),s&&(r.pathname=s)}return r}function jy(s,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,p=f.history,E="POP",x=null,g=j();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function j(){return(p.state||{idx:null}).idx}function v(){E="POP";let z=j(),M=z==null?null:z-g;g=z,x&&x({action:E,location:w.location,delta:M})}function N(z,M){E="PUSH";let F=Bh(z)?z:sc(w.location,z,M);g=j()+1;let L=Lh(F,g),U=w.createHref(F.unstable_mask||F);try{p.pushState(L,"",U)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(U)}h&&x&&x({action:E,location:w.location,delta:1})}function G(z,M){E="REPLACE";let F=Bh(z)?z:sc(w.location,z,M);g=j();let L=Lh(F,g),U=w.createHref(F.unstable_mask||F);p.replaceState(L,"",U),h&&x&&x({action:E,location:w.location,delta:0})}function D(z){return Sy(z)}let w={get action(){return E},get location(){return s(f,p)},listen(z){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Hh,v),x=z,()=>{f.removeEventListener(Hh,v),x=null}},createHref(z){return r(f,z)},createURL:D,encodeLocation(z){let M=D(z);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:N,replace:G,go(z){return p.go(z)}};return w}function Sy(s,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(c,"No window.location.(origin|href) available to create URL");let o=typeof s=="string"?s:Zl(s);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function im(s,r,c="/"){return Ey(s,r,c,!1)}function Ey(s,r,c,o){let f=typeof r=="string"?Qa(r):r,h=dn(f.pathname||"/",c);if(h==null)return null;let p=sm(s);Ty(p);let E=null;for(let x=0;E==null&&x<p.length;++x){let g=Dy(h);E=My(p[x],g,o)}return E}function sm(s,r=[],c=[],o="",f=!1){let h=(p,E,x=f,g)=>{let j={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:E,route:p};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(o)&&x)return;Ue(j.relativePath.startsWith(o),`Absolute route path "${j.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(o.length)}let v=Ht([o,j.relativePath]),N=c.concat(j);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}".`),sm(p.children,r,N,v,x)),!(p.path==null&&!p.index)&&r.push({path:v,score:Ay(v,p.index),routesMeta:N})};return s.forEach((p,E)=>{var x;if(p.path===""||!((x=p.path)!=null&&x.includes("?")))h(p,E);else for(let g of um(p.path))h(p,E,!0,g)}),r}function um(s){let r=s.split("/");if(r.length===0)return[];let[c,...o]=r,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let p=um(o.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 Ty(s){s.sort((r,c)=>r.score!==c.score?c.score-r.score:zy(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var _y=/^:[\w-]+$/,Ny=3,wy=2,ky=1,Cy=10,Ry=-2,qh=s=>s==="*";function Ay(s,r){let c=s.split("/"),o=c.length;return c.some(qh)&&(o+=Ry),r&&(o+=wy),c.filter(f=>!qh(f)).reduce((f,h)=>f+(_y.test(h)?Ny:h===""?ky:Cy),o)}function zy(s,r){return s.length===r.length&&s.slice(0,-1).every((o,f)=>o===r[f])?s[s.length-1]-r[r.length-1]:0}function My(s,r,c=!1){let{routesMeta:o}=s,f={},h="/",p=[];for(let E=0;E<o.length;++E){let x=o[E],g=E===o.length-1,j=h==="/"?r:r.slice(h.length)||"/",v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},j),N=x.route;if(!v&&g&&c&&!o[o.length-1].route.index&&(v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},j)),!v)return null;Object.assign(f,v.params),p.push({params:f,pathname:Ht([h,v.pathname]),pathnameBase:Ly(Ht([h,v.pathnameBase])),route:N}),v.pathnameBase!=="/"&&(h=Ht([h,v.pathnameBase]))}return p}function Ss(s,r){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[c,o]=Oy(s.path,s.caseSensitive,s.end),f=r.match(c);if(!f)return null;let h=f[0],p=h.replace(/(.)\/+$/,"$1"),E=f.slice(1);return{params:o.reduce((g,{paramName:j,isOptional:v},N)=>{if(j==="*"){let D=E[N]||"";p=h.slice(0,h.length-D.length).replace(/(.)\/+$/,"$1")}const G=E[N];return v&&!G?g[j]=void 0:g[j]=(G||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:p,pattern:s}}function Oy(s,r=!1,c=!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 o=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,E,x,g,j)=>{if(o.push({paramName:E,isOptional:x!=null}),x){let v=j.charAt(g+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(o.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function Dy(s){try{return s.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){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 (${r}).`),s}}function dn(s,r){if(r==="/")return s;if(!s.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=s.charAt(c);return o&&o!=="/"?null:s.slice(c)||"/"}var Uy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Hy(s,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof s=="string"?Qa(s):s,h;return c?(c=cm(c),c.startsWith("/")?h=Gh(c.substring(1),"/"):h=Gh(c,r)):h=r,{pathname:h,search:qy(o),hash:Gy(f)}}function Gh(s,r){let c=Es(r).split("/");return s.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function ec(s,r,c,o){return`Cannot include a '${s}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function By(s){return s.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function rm(s){let r=By(s);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function dc(s,r,c,o=!1){let f;typeof s=="string"?f=Qa(s):(f={...s},Ue(!f.pathname||!f.pathname.includes("?"),ec("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),ec("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),ec("#","search","hash",f)));let h=s===""||f.pathname==="",p=h?"/":f.pathname,E;if(p==null)E=c;else{let v=r.length-1;if(!o&&p.startsWith("..")){let N=p.split("/");for(;N[0]==="..";)N.shift(),v-=1;f.pathname=N.join("/")}E=v>=0?r[v]:"/"}let x=Hy(f,E),g=p&&p!=="/"&&p.endsWith("/"),j=(h||p===".")&&c.endsWith("/");return!x.pathname.endsWith("/")&&(g||j)&&(x.pathname+="/"),x}var cm=s=>s.replace(/\/\/+/g,"/"),Ht=s=>cm(s.join("/")),Es=s=>s.replace(/\/+$/,""),Ly=s=>Es(s).replace(/^\/*/,"/"),qy=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Gy=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Yy=class{constructor(s,r,c,o=!1){this.status=s,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Vy(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Xy(s){let r=s.map(c=>c.route.path).filter(Boolean);return Ht(r)||"/"}var om=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function dm(s,r){let c=s;if(typeof c!="string"||!Uy.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(om)try{let h=new URL(window.location.href),p=c.startsWith("//")?new URL(h.protocol+c):new URL(c),E=dn(p.pathname,r);p.origin===h.origin&&E!=null?c=E+p.search+p.hash:f=!0}catch{Vt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fm=["POST","PUT","PATCH","DELETE"];new Set(fm);var Qy=["GET",...fm];new Set(Qy);var Za=y.createContext(null);Za.displayName="DataRouter";var Ns=y.createContext(null);Ns.displayName="DataRouterState";var hm=y.createContext(!1);function Zy(){return y.useContext(hm)}var mm=y.createContext({isTransitioning:!1});mm.displayName="ViewTransition";var Jy=y.createContext(new Map);Jy.displayName="Fetchers";var Ky=y.createContext(null);Ky.displayName="Await";var Mt=y.createContext(null);Mt.displayName="Navigation";var $l=y.createContext(null);$l.displayName="Location";var Xt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var fc=y.createContext(null);fc.displayName="RouteError";var pm="REACT_ROUTER_ERROR",$y="REDIRECT",Fy="ROUTE_ERROR_RESPONSE";function Wy(s){if(s.startsWith(`${pm}:${$y}:{`))try{let r=JSON.parse(s.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Iy(s){if(s.startsWith(`${pm}:${Fy}:{`))try{let r=JSON.parse(s.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Yy(r.status,r.statusText,r.data)}catch{}}function Py(s,{relative:r}={}){Ue(Fl(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=y.useContext(Mt),{hash:f,pathname:h,search:p}=Wl(s,{relative:r}),E=h;return c!=="/"&&(E=h==="/"?c:Ht([c,h])),o.createHref({pathname:E,search:p,hash:f})}function Fl(){return y.useContext($l)!=null}function fn(){return Ue(Fl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext($l).location}var gm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ym(s){y.useContext(Mt).static||y.useLayoutEffect(s)}function ev(){let{isDataRoute:s}=y.useContext(Xt);return s?hv():tv()}function tv(){Ue(Fl(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(Za),{basename:r,navigator:c}=y.useContext(Mt),{matches:o}=y.useContext(Xt),{pathname:f}=fn(),h=JSON.stringify(rm(o)),p=y.useRef(!1);return ym(()=>{p.current=!0}),y.useCallback((x,g={})=>{if(Vt(p.current,gm),!p.current)return;if(typeof x=="number"){c.go(x);return}let j=dc(x,JSON.parse(h),f,g.relative==="path");s==null&&r!=="/"&&(j.pathname=j.pathname==="/"?r:Ht([r,j.pathname])),(g.replace?c.replace:c.push)(j,g.state,g)},[r,c,h,f,s])}y.createContext(null);function Ja(){let{matches:s}=y.useContext(Xt),r=s[s.length-1];return(r==null?void 0:r.params)??{}}function Wl(s,{relative:r}={}){let{matches:c}=y.useContext(Xt),{pathname:o}=fn(),f=JSON.stringify(rm(c));return y.useMemo(()=>dc(s,JSON.parse(f),o,r==="path"),[s,f,o,r])}function nv(s,r){return vm(s,r)}function vm(s,r,c){var z;Ue(Fl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=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 M=g&&g.path||"";bm(E,!g||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${E}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
59
|
|
|
60
|
-
Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let j=fn(),v;if(r){let M=typeof r=="string"?Qa(r):r;Ue(x==="/"||((z=M.pathname)==null?void 0:z.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 "${M.pathname}" was given in the \`location\` prop.`),v=M}else v=j;let N=v.pathname||"/",G=N;if(x!=="/"){let M=x.replace(/^\//,"").split("/");G="/"+N.replace(/^\//,"").split("/").slice(M.length).join("/")}let D=im(s,{pathname:G});Vt(g||D!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.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 w=uv(D&&D.map(M=>Object.assign({},M,{params:Object.assign({},p,M.params),pathname:Ht([x,o.encodeLocation?o.encodeLocation(M.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?x:Ht([x,o.encodeLocation?o.encodeLocation(M.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),f,c);return r&&w?y.createElement($l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},w):w}function av(){let s=fv(),r=Vy(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),c=s instanceof Error?s.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},h={padding:"2px 4px",backgroundColor:o},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"}},r),c?y.createElement("pre",{style:f},c):null,p)}var lv=y.createElement(av,null),xm=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,r){return r.location!==s.location||r.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:r.error,location:r.location,revalidation:s.revalidation||r.revalidation}}componentDidCatch(s,r){this.props.onError?this.props.onError(s,r):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 c=Iy(s.digest);c&&(s=c)}let r=s!==void 0?y.createElement(Xt.Provider,{value:this.props.routeContext},y.createElement(fc.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(iv,{error:s},r):r}};xm.contextType=hm;var tc=new WeakMap;function iv({children:s,error:r}){let{basename:c}=y.useContext(Mt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Wy(r.digest);if(o){let f=tc.get(r);if(f)throw f;let h=dm(o.location,c);if(om&&!tc.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw tc.set(r,p),p}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return s}function sv({routeContext:s,match:r,children:c}){let o=y.useContext(Za);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Xt.Provider,{value:s},c)}function uv(s,r=[],c){let o=c==null?void 0:c.state;if(s==null){if(!o)return null;if(o.errors)s=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)s=o.matches;else return null}let f=s,h=o==null?void 0:o.errors;if(h!=null){let j=f.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);Ue(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let p=!1,E=-1;if(c&&o){p=o.renderFallback;for(let j=0;j<f.length;j++){let v=f[j];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(E=j),v.route.id){let{loaderData:N,errors:G}=o,D=v.route.loader&&!N.hasOwnProperty(v.route.id)&&(!G||G[v.route.id]===void 0);if(v.route.lazy||D){c.isStatic&&(p=!0),E>=0?f=f.slice(0,E+1):f=[f[0]];break}}}}let x=c==null?void 0:c.onError,g=o&&x?(j,v)=>{var N,G;x(j,{location:o.location,params:((G=(N=o.matches)==null?void 0:N[0])==null?void 0:G.params)??{},unstable_pattern:Xy(o.matches),errorInfo:v})}:void 0;return f.reduceRight((j,v,N)=>{let G,D=!1,w=null,z=null;o&&(G=h&&v.route.id?h[v.route.id]:void 0,w=v.route.errorElement||lv,p&&(E<0&&N===0?(bm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,z=null):E===N&&(D=!0,z=v.route.hydrateFallbackElement||null)));let M=r.concat(f.slice(0,N+1)),F=()=>{let L;return G?L=w:D?L=z:v.route.Component?L=y.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=j,y.createElement(sv,{match:v,routeContext:{outlet:j,matches:M,isDataRoute:o!=null},children:L})};return o&&(v.route.ErrorBoundary||v.route.errorElement||N===0)?y.createElement(xm,{location:o.location,revalidation:o.revalidation,component:w,error:G,children:F(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:g}):F()},null)}function hc(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rv(s){let r=y.useContext(Za);return Ue(r,hc(s)),r}function cv(s){let r=y.useContext(Ns);return Ue(r,hc(s)),r}function ov(s){let r=y.useContext(Xt);return Ue(r,hc(s)),r}function mc(s){let r=ov(s),c=r.matches[r.matches.length-1];return Ue(c.route.id,`${s} can only be used on routes that contain a unique "id"`),c.route.id}function dv(){return mc("useRouteId")}function fv(){var o;let s=y.useContext(fc),r=cv("useRouteError"),c=mc("useRouteError");return s!==void 0?s:(o=r.errors)==null?void 0:o[c]}function hv(){let{router:s}=rv("useNavigate"),r=mc("useNavigate"),c=y.useRef(!1);return ym(()=>{c.current=!0}),y.useCallback(async(f,h={})=>{Vt(c.current,gm),c.current&&(typeof f=="number"?await s.navigate(f):await s.navigate(f,{fromRouteId:r,...h}))},[s,r])}var Yh={};function bm(s,r,c){!r&&!Yh[s]&&(Yh[s]=!0,Vt(!1,c))}y.memo(mv);function mv({routes:s,future:r,state:c,isStatic:o,onError:f}){return vm(s,void 0,{state:c,isStatic:o,onError:f})}function Fe(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 pv({basename:s="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:p}){Ue(!Fl(),"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 c=="string"&&(c=Qa(c));let{pathname:g="/",search:j="",hash:v="",state:N=null,key:G="default",unstable_mask:D}=c,w=y.useMemo(()=>{let z=dn(g,E);return z==null?null:{location:{pathname:z,search:j,hash:v,state:N,key:G,unstable_mask:D},navigationType:o}},[E,g,j,v,N,G,o,D]);return Vt(w!=null,`<Router basename="${E}"> is not able to match the URL "${g}${j}${v}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:y.createElement(Mt.Provider,{value:x},y.createElement($l.Provider,{children:r,value:w}))}function nc({children:s,location:r}){return nv(uc(s),r)}function uc(s,r=[]){let c=[];return y.Children.forEach(s,(o,f)=>{if(!y.isValidElement(o))return;let h=[...r,f];if(o.type===y.Fragment){c.push.apply(c,uc(o.props.children,h));return}Ue(o.type===Fe,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ue(!o.props.index||!o.props.children,"An index route cannot have child routes.");let p={id:o.props.id||h.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(p.children=uc(o.props.children,h)),c.push(p)}),c}var bs="get",js="application/x-www-form-urlencoded";function ws(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function gv(s){return ws(s)&&s.tagName.toLowerCase()==="button"}function yv(s){return ws(s)&&s.tagName.toLowerCase()==="form"}function vv(s){return ws(s)&&s.tagName.toLowerCase()==="input"}function xv(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function bv(s,r){return s.button===0&&(!r||r==="_self")&&!xv(s)}var xs=null;function jv(){if(xs===null)try{new FormData(document.createElement("form"),0),xs=!1}catch{xs=!0}return xs}var Sv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(s){return s!=null&&!Sv.has(s)?(Vt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${js}"`),null):s}function Ev(s,r){let c,o,f,h,p;if(yv(s)){let E=s.getAttribute("action");o=E?dn(E,r):null,c=s.getAttribute("method")||bs,f=ac(s.getAttribute("enctype"))||js,h=new FormData(s)}else if(gv(s)||vv(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(o=x?dn(x,r):null,c=s.getAttribute("formmethod")||E.getAttribute("method")||bs,f=ac(s.getAttribute("formenctype"))||ac(E.getAttribute("enctype"))||js,h=new FormData(E,s),!jv()){let{name:g,type:j,value:v}=s;if(j==="image"){let N=g?`${g}.`:"";h.append(`${N}x`,"0"),h.append(`${N}y`,"0")}else g&&h.append(g,v)}}else{if(ws(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=bs,o=null,f=js,p=s}return h&&f==="text/plain"&&(p=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pc(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function jm(s,r,c,o){let f=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return c?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&dn(f.pathname,r)==="/"?f.pathname=`${Es(r)}/_root.${o}`:f.pathname=`${Es(f.pathname)}.${o}`,f}async function Tv(s,r){if(s.id in r)return r[s.id];try{let c=await import(s.module);return r[s.id]=c,c}catch(c){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _v(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 Nv(s,r,c){let o=await Promise.all(s.map(async f=>{let h=r.routes[f.route.id];if(h){let p=await Tv(h,c);return p.links?p.links():[]}return[]}));return Rv(o.flat(1).filter(_v).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Vh(s,r,c,o,f,h){let p=(x,g)=>c[g]?x.route.id!==c[g].route.id:!0,E=(x,g)=>{var j;return c[g].pathname!==x.pathname||((j=c[g].route.path)==null?void 0:j.endsWith("*"))&&c[g].params["*"]!==x.params["*"]};return h==="assets"?r.filter((x,g)=>p(x,g)||E(x,g)):h==="data"?r.filter((x,g)=>{var v;let j=o.routes[x.route.id];if(!j||!j.hasLoader)return!1;if(p(x,g)||E(x,g))return!0;if(x.route.shouldRevalidate){let N=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((v=c[0])==null?void 0:v.params)||{},nextUrl:new URL(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function wv(s,r,{includeHydrateFallback:c}={}){return Cv(s.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Cv(s){return[...new Set(s)]}function kv(s){let r={},c=Object.keys(s).sort();for(let o of c)r[o]=s[o];return r}function Rv(s,r){let c=new Set;return new Set(r),s.reduce((o,f)=>{let h=JSON.stringify(kv(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function gc(){let s=y.useContext(Za);return pc(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Av(){let s=y.useContext(Ns);return pc(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var yc=y.createContext(void 0);yc.displayName="FrameworkContext";function vc(){let s=y.useContext(yc);return pc(s,"You must render this element inside a <HydratedRouter> element"),s}function zv(s,r){let c=y.useContext(yc),[o,f]=y.useState(!1),[h,p]=y.useState(!1),{onFocus:E,onBlur:x,onMouseEnter:g,onMouseLeave:j,onTouchStart:v}=r,N=y.useRef(null);y.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let w=M=>{M.forEach(F=>{p(F.isIntersecting)})},z=new IntersectionObserver(w,{threshold:.5});return N.current&&z.observe(N.current),()=>{z.disconnect()}}},[s]),y.useEffect(()=>{if(o){let w=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(w)}}},[o]);let G=()=>{f(!0)},D=()=>{f(!1),p(!1)};return c?s!=="intent"?[h,N,{}]:[h,N,{onFocus:Vl(E,G),onBlur:Vl(x,D),onMouseEnter:Vl(g,G),onMouseLeave:Vl(j,D),onTouchStart:Vl(v,G)}]:[!1,N,{}]}function Vl(s,r){return c=>{s&&s(c),c.defaultPrevented||r(c)}}function Mv({page:s,...r}){let c=Zy(),{router:o}=gc(),f=y.useMemo(()=>im(o.routes,s,o.basename),[o.routes,s,o.basename]);return f?c?y.createElement(Dv,{page:s,matches:f,...r}):y.createElement(Uv,{page:s,matches:f,...r}):null}function Ov(s){let{manifest:r,routeModules:c}=vc(),[o,f]=y.useState([]);return y.useEffect(()=>{let h=!1;return Nv(s,r,c).then(p=>{h||f(p)}),()=>{h=!0}},[s,r,c]),o}function Dv({page:s,matches:r,...c}){let o=fn(),{future:f}=vc(),{basename:h}=gc(),p=y.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let E=jm(s,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),x=!1,g=[];for(let j of r)typeof j.route.shouldRevalidate=="function"?x=!0:g.push(j.route.id);return x&&g.length>0&&E.searchParams.set("_routes",g.join(",")),[E.pathname+E.search]},[h,f.unstable_trailingSlashAwareDataRequests,s,o,r]);return y.createElement(y.Fragment,null,p.map(E=>y.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...c})))}function Uv({page:s,matches:r,...c}){let o=fn(),{future:f,manifest:h,routeModules:p}=vc(),{basename:E}=gc(),{loaderData:x,matches:g}=Av(),j=y.useMemo(()=>Vh(s,r,g,h,o,"data"),[s,r,g,h,o]),v=y.useMemo(()=>Vh(s,r,g,h,o,"assets"),[s,r,g,h,o]),N=y.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let w=new Set,z=!1;if(r.forEach(F=>{var U;let L=h.routes[F.route.id];!L||!L.hasLoader||(!j.some(J=>J.route.id===F.route.id)&&F.route.id in x&&((U=p[F.route.id])!=null&&U.shouldRevalidate)||L.hasClientLoader?z=!0:w.add(F.route.id))}),w.size===0)return[];let M=jm(s,E,f.unstable_trailingSlashAwareDataRequests,"data");return z&&w.size>0&&M.searchParams.set("_routes",r.filter(F=>w.has(F.route.id)).map(F=>F.route.id).join(",")),[M.pathname+M.search]},[E,f.unstable_trailingSlashAwareDataRequests,x,o,h,j,r,s,p]),G=y.useMemo(()=>wv(v,h),[v,h]),D=Ov(v);return y.createElement(y.Fragment,null,N.map(w=>y.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...c})),G.map(w=>y.createElement("link",{key:w,rel:"modulepreload",href:w,...c})),D.map(({key:w,link:z})=>y.createElement("link",{key:w,nonce:c.nonce,...z,crossOrigin:z.crossOrigin??c.crossOrigin})))}function Hv(...s){return r=>{s.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var Bv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bv&&(window.__reactRouterVersion="7.14.2")}catch{}function Lv({basename:s,children:r,unstable_useTransitions:c,window:o}){let f=y.useRef();f.current==null&&(f.current=xy({window:o,v5Compat:!0}));let h=f.current,[p,E]=y.useState({action:h.action,location:h.location}),x=y.useCallback(g=>{c===!1?E(g):y.startTransition(()=>E(g))},[c]);return y.useLayoutEffect(()=>h.listen(x),[h,x]),y.createElement(pv,{basename:s,children:r,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:c})}var Sm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ke=y.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:p,unstable_mask:E,state:x,target:g,to:j,preventScrollReset:v,viewTransition:N,unstable_defaultShouldRevalidate:G,...D},w){let{basename:z,navigator:M,unstable_useTransitions:F}=y.useContext(Mt),L=typeof j=="string"&&Sm.test(j),U=dm(j,z);j=U.to;let J=Py(j,{relative:f}),K=fn(),X=null;if(E){let te=dc(E,[],K.unstable_mask?K.unstable_mask.pathname:"/",!0);z!=="/"&&(te.pathname=te.pathname==="/"?z:Ht([z,te.pathname])),X=M.createHref(te)}let[ue,fe,He]=zv(o,D),Me=Vv(j,{replace:p,unstable_mask:E,state:x,target:g,preventScrollReset:v,relative:f,viewTransition:N,unstable_defaultShouldRevalidate:G,unstable_useTransitions:F});function Oe(te){r&&r(te),te.defaultPrevented||Me(te)}let ie=!(U.isExternal||h),$=y.createElement("a",{...D,...He,href:(ie?X:void 0)||U.absoluteURL||J,onClick:ie?Oe:r,ref:Hv(w,fe),target:g,"data-discover":!L&&c==="render"?"true":void 0});return ue&&!L?y.createElement(y.Fragment,null,$,y.createElement(Mv,{page:J})):$});ke.displayName="Link";var qv=y.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:p,viewTransition:E,children:x,...g},j){let v=Wl(p,{relative:g.relative}),N=fn(),G=y.useContext(Ns),{navigator:D,basename:w}=y.useContext(Mt),z=G!=null&&Kv(v)&&E===!0,M=D.encodeLocation?D.encodeLocation(v).pathname:v.pathname,F=N.pathname,L=G&&G.navigation&&G.navigation.location?G.navigation.location.pathname:null;c||(F=F.toLowerCase(),L=L?L.toLowerCase():null,M=M.toLowerCase()),L&&w&&(L=dn(L,w)||L);const U=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let J=F===M||!f&&F.startsWith(M)&&F.charAt(U)==="/",K=L!=null&&(L===M||!f&&L.startsWith(M)&&L.charAt(M.length)==="/"),X={isActive:J,isPending:K,isTransitioning:z},ue=J?r:void 0,fe;typeof o=="function"?fe=o(X):fe=[o,J?"active":null,K?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let He=typeof h=="function"?h(X):h;return y.createElement(ke,{...g,"aria-current":ue,className:fe,ref:j,style:He,to:p,viewTransition:E},typeof x=="function"?x(X):x)});qv.displayName="NavLink";var Gv=y.forwardRef(({discover:s="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:p=bs,action:E,onSubmit:x,relative:g,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:N,...G},D)=>{let{unstable_useTransitions:w}=y.useContext(Mt),z=Zv(),M=Jv(E,{relative:g}),F=p.toLowerCase()==="get"?"get":"post",L=typeof E=="string"&&Sm.test(E),U=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=()=>z(K||J.currentTarget,{fetcherKey:r,method:X,navigate:c,replace:f,state:h,relative:g,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:N});w&&c!==!1?y.startTransition(()=>ue()):ue()};return y.createElement("form",{ref:D,method:F,action:M,onSubmit:o?x:U,...G,"data-discover":!L&&s==="render"?"true":void 0})});Gv.displayName="Form";function Yv(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Em(s){let r=y.useContext(Za);return Ue(r,Yv(s)),r}function Vv(s,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x,unstable_useTransitions:g}={}){let j=ev(),v=fn(),N=Wl(s,{relative:p});return y.useCallback(G=>{if(bv(G,r)){G.preventDefault();let D=c!==void 0?c:Zl(v)===Zl(N),w=()=>j(s,{replace:D,unstable_mask:o,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x});g?y.startTransition(()=>w()):w()}},[v,j,N,c,o,f,r,s,h,p,E,x,g])}var Xv=0,Qv=()=>`__${String(++Xv)}__`;function Zv(){let{router:s}=Em("useSubmit"),{basename:r}=y.useContext(Mt),c=dv(),o=s.fetch,f=s.navigate;return y.useCallback(async(h,p={})=>{let{action:E,method:x,encType:g,formData:j,body:v}=Ev(h,r);if(p.navigate===!1){let N=p.fetcherKey||Qv();await o(N,c,p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:j,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:j,body:v,formMethod:p.method||x,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:c,flushSync:p.flushSync,viewTransition:p.viewTransition})},[o,f,r,c])}function Jv(s,{relative:r}={}){let{basename:c}=y.useContext(Mt),o=y.useContext(Xt);Ue(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Wl(s||".",{relative:r})},p=fn();if(s==null){h.search=p.search;let E=new URLSearchParams(h.search),x=E.getAll("index");if(x.some(j=>j==="")){E.delete("index"),x.filter(v=>v).forEach(v=>E.append("index",v));let j=E.toString();h.search=j?`?${j}`:""}}return(!s||s===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:Ht([c,h.pathname])),Zl(h)}function Kv(s,{relative:r}={}){let c=y.useContext(mm);Ue(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Em("useViewTransitionState"),f=Wl(s,{relative:r});if(!c.isTransitioning)return!1;let h=dn(c.currentLocation.pathname,o)||c.currentLocation.pathname,p=dn(c.nextLocation.pathname,o)||c.nextLocation.pathname;return Ss(f.pathname,p)!=null||Ss(f.pathname,h)!=null}const Tm=/^\/vault\/admin(?=\/|$)/,_m=/^\/vault\/([^/]+)\/admin(?=\/|$)/;function xc(){return typeof window>"u"?!1:Tm.test(window.location.pathname)}function Nm(){if(typeof window>"u"||xc())return null;const s=window.location.pathname.match(_m);if(!s)return null;try{return decodeURIComponent(s[1])}catch{return null}}function $v(){if(typeof window>"u")return"";const s=window.location.pathname;if(Tm.test(s))return"/vault/admin";const r=s.match(_m);return r?`/vault/${r[1]}/admin`:s==="/admin"||s.startsWith("/admin/")?"/admin":""}let Bn=null,Yt=null,sa=null,on=null,Xh=!1;const Fv=.8,Wv=1e3,Iv=3e4;function Pv(){if(typeof window>"u")return;const s=window.location.hash;if(!s||s.length<2)return;const r=new URLSearchParams(s.slice(1)),c=r.get("token");if(!c)return;Bn=c,Yt=null,r.delete("token");const o=r.toString(),f=o.length>0?`#${o}`:"",h=`${window.location.pathname}${window.location.search}${f}`;window.history.replaceState(null,"",h)}function bc(){return Bn}function e0(){Bn=null,Yt=null,on=null,Cs()}async function Jl(s){if(typeof window>"u")return{kind:"network-error",message:"no window"};let r;try{r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:String(o)}}if(r.status===401||r.status===403||r.status===404)return{kind:"auth-required",status:r.status};if(!r.ok)return{kind:"network-error",message:`hub returned ${r.status}`};let c;try{c=await r.json()}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:"could not parse mint response"}}return typeof c.token!="string"||c.token.length===0?{kind:"network-error",message:"mint response missing token"}:(Bn=c.token,Yt=c.expires_at?t0(c.expires_at):null,on=s,wm(),l0(),{kind:"ok",token:c.token})}function t0(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function Ts(s){if(Bn){if(Yt===null||Yt>Date.now())return{kind:"ok",token:Bn};Bn=null,Yt=null,Cs()}return Jl(s)}async function n0(s){typeof window>"u"||Bn||await Jl(s).catch(()=>{})}function wm(){if(Cs(),Yt===null||on===null||typeof document<"u"&&document.visibilityState==="hidden")return;const s=Date.now(),r=Yt-s;if(r<=0)return;const c=Math.max(Math.floor(r*Fv),Wv);sa=setTimeout(()=>{a0()},c)}function Cs(){sa!==null&&(clearTimeout(sa),sa=null)}async function a0(){if(sa=null,on===null)return;const s=await Jl(on);s.kind!=="ok"&&(typeof console<"u"&&console.warn("[vault-admin-spa] proactive token refresh failed; will retry once",s),sa=setTimeout(()=>{sa=null,on!==null&&Jl(on).catch(()=>{})},Iv))}function l0(){Xh||typeof document>"u"||(Xh=!0,document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){Cs();return}if(on!==null){if(Yt!==null&&Yt<=Date.now()){Jl(on).catch(()=>{});return}wm()}}))}class ce extends Error{constructor(r,c,o){super(c),this.status=r,this.errorType=o,this.name="HttpError"}}async function Re(s,r,c={}){let o=bc();if(!o){const g=await Ts(s);if(g.kind!=="ok")throw new ce(401,"no admin token — sign in to the hub to refresh");o=g.token}const{headers:f,...h}=c,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(r,{...h,headers:p(o)});if(E.status!==401)return E;e0();const x=await Ts(s);return x.kind!=="ok"?E:fetch(r,{...h,headers:p(x.token)})}async function Cm(){const s=await fetch("/vaults/list",{headers:{accept:"application/json"}});if(s.status===404)return[];if(!s.ok)throw new ce(s.status,`vaults/list fetch failed: ${s.status}`);return(await s.json()).vaults??[]}async function i0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function s0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function km(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function u0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/run-now`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function r0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/push-now`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function jc(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function c0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`,{method:"DELETE"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function o0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/device-code`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function d0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/poll`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({polling_id:r})});if(!c.ok&&c.status!==404)throw new ce(c.status,await We(c));return await c.json()}async function f0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/pat`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function Rm(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/installations`);if(!r.ok){const{message:c,errorType:o}=await Sc(r);throw new ce(r.status,c,o)}return await r.json()}async function Am(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/repos`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function h0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/create-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok){const{message:o,errorType:f}=await Sc(c);throw new ce(c.status,o,f)}return await c.json()}async function m0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/select-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function p0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(c.ok)return{attached:!1,job:await c.json()};if(c.status===409){const o=await c.text();let f,h=o;try{const p=JSON.parse(o);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 zm(s,f)};throw new ce(409,h,"concurrent_import")}throw new ce(c.status,await We(c))}async function zm(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import/${encodeURIComponent(r)}`);if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function g0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/transcription`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function y0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/transcription`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function v0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function x0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:r})});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function We(s){return(await Sc(s)).message}async function Sc(s){try{const r=await s.text(),c=JSON.parse(r),o=typeof c.error_type=="string"?c.error_type:void 0;if(c.error_description)return{message:c.error_description,errorType:o};if(c.message)return{message:c.message,errorType:o};if(c.error)return{message:c.error,errorType:o};if(r)return{message:r,errorType:o}}catch{}return{message:`${s.status} ${s.statusText}`}}function Mm(s){const r=s.split(".");if(r.length!==3)return null;try{const c=r[1].replace(/-/g,"+").replace(/_/g,"/"),o=c.length%4===0?"":"=".repeat(4-c.length%4),f=atob(c+o),h=JSON.parse(f);return h===null||typeof h!="object"?null:h}catch{return null}}function b0(s){if(!s)return[];const r=Mm(s);if(!r)return[];const c=r.scope;if(typeof c=="string"&&c.length>0)return c.split(/\s+/).filter(f=>f.length>0);const o=r.scopes;return Array.isArray(o)?o.filter(f=>typeof f=="string"&&f.length>0):[]}function Ec(s){return b0(bc()).includes(`vault:${s}:admin`)}function Om(){const s=bc();if(!s)return null;const r=Mm(s);if(!r)return null;const c=r.iss;return typeof c!="string"||c.length===0?null:c.replace(/\/$/,"")}let Xl=null,Ql=null;function j0(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function S0(){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(c){return{kind:"network-error",message:c instanceof Error?c.message:String(c)}}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 r;try{r=await s.json()}catch(c){return{kind:"network-error",message:c instanceof Error?c.message:"could not parse host-admin mint response"}}return typeof r.token!="string"||r.token.length===0?{kind:"network-error",message:"host-admin mint response missing token"}:(Xl=r.token,Ql=r.expires_at?j0(r.expires_at):null,{kind:"ok",token:r.token})}async function _s(){if(Xl){if(Ql===null||Ql>Date.now())return{kind:"ok",token:Xl};Xl=null,Ql=null}return S0()}function E0(){Xl=null,Ql=null}class Ln extends Error{constructor(r,c,o){super(c),this.status=r,this.disposition=o,this.name="HostAdminError"}}async function Il(s,r={}){let c;const o=await _s();if(o.kind!=="ok")throw Qh(o);c=o.token;const{headers:f,...h}=r,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(s,{...h,headers:p(c)});if(E.status!==401)return E;E0();const x=await _s();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 Kl(){if(typeof window>"u")return;const s=Om();window.location.href=s?`${s}/account/`:"/account/"}async function T0(){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 r;try{r=await s.json()}catch{return{kind:"no-hub"}}const c=Array.isArray(r.vaults)?r.vaults:[],o=[];for(const f of c){const h=f??{};typeof h.name=="string"&&o.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:o}}async function _0(s){var E,x;const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!r.ok)throw new Error(`vault-admin-token mint failed: ${r.status}`);const c=await r.json();if(typeof c.token!="string"||c.token.length===0)throw new Error("vault-admin-token mint returned no token");const o=await fetch(`/vault/${encodeURIComponent(s)}/.parachute/usage`,{headers:{accept:"application/json",authorization:`Bearer ${c.token}`}});if(!o.ok)throw new Error(`usage fetch failed: ${o.status}`);const f=await o.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 N0(s){if(!Number.isFinite(s)||s<0)return"0 B";if(s<1024)return`${Math.round(s)} B`;const r=s/1024;if(r<1024)return`${Math.round(r)} KB`;const c=r/1024;return c<1024?`${c.toFixed(1)} MB`:`${(c/1024).toFixed(1)} GB`}const w0=/^[a-z0-9_-]+$/,C0=new Set(["list","new","assets","admin"]);function k0(s){return s.length===0?null:w0.test(s)?s.length<2||s.length>32?"Vault names must be 2–32 characters long.":C0.has(s)?`"${s}" is a reserved name.`:null:"Lowercase letters, numbers, hyphens, and underscores only."}class rc extends Error{constructor(r,c,o){super(c),this.status=r,this.code=o,this.name="VaultsApiError"}}async function Dm(s){let r,c=`${s.status}`;try{const o=await s.json();typeof o.error=="string"&&(r=o.error),c=o.error_description??o.error??c}catch{}return new rc(s.status,c,r)}async function R0(s){const r=await Il("/vaults",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:s})});if(!r.ok)throw await Dm(r);const c=await r.json(),o={name:c.name,url:c.url,version:c.version,created:r.status===201};return c.token&&(o.token=c.token),c.token_guidance&&(o.tokenGuidance=c.token_guidance),o}async function A0(s){const r=await Il(`/vaults/${encodeURIComponent(s)}`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:s})});if(!r.ok)throw await Dm(r);const c=await r.json();return{name:c.name,cascade:c.cascade,warnings:c.warnings??[]}}const Zh=5e3,z0=3e4;function qn({vaultName:s,status:r,onRecovered:c,ensure:o,serverMessage:f}){const h=r===403,[p,E]=y.useState("probing");if(y.useEffect(()=>{if(h)return;let v=!1;return(async()=>{const N=await(o?o():Ts(s??""));v||E(N.kind==="ok"?"token-rejected":"signed-out")})(),()=>{v=!0}},[s,o,h]),y.useEffect(()=>{if(h||p==="probing")return;let v=!1,N=null;const G=p==="token-rejected"?z0:Zh,D=async()=>{if(v||typeof document<"u"&&document.visibilityState!=="visible")return;if(p==="token-rejected"){c(),N=setTimeout(()=>void D(),G);return}const z=await(o?o():Ts(s??""));if(!v){if(z.kind==="ok"){c();return}N=setTimeout(()=>void D(),G)}},w=()=>{typeof document>"u"||document.visibilityState==="visible"&&(N!==null&&(clearTimeout(N),N=null),D())};return N=setTimeout(()=>void D(),Zh),typeof document<"u"&&document.addEventListener("visibilitychange",w),()=>{v=!0,N!==null&&clearTimeout(N),typeof document<"u"&&document.removeEventListener("visibilitychange",w)}},[s,c,h,o,p]),h)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."})]});if(p==="token-rejected")return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"You're signed in, but this vault rejected the request."})," ","That's a problem on the server, not with your session — signing in again won't change it."]}),f?l.jsx("p",{className:"dim",style:{margin:"0 0 0.5rem",fontSize:"0.85rem",fontFamily:"var(--mono, monospace)"},children:f}):null,l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"Retrying every 30 seconds. If it persists, check the vault's logs — this usually means the vault can't reach the hub it validates tokens against."})]});const x=M0(),g=`/login?next=${encodeURIComponent(x)}`,j=r===404?"This hub doesn't host a vault by that name.":"You're not signed in to the hub.";return p==="probing"?l.jsx("div",{className:"warn-banner",role:"status",children:l.jsx("p",{style:{margin:0},children:"Checking your session…"})}):l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[j," ",l.jsx("a",{href:g,children:"Sign in to the hub →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"After signing in, this page will refresh automatically."})]})}function M0(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function O0(){const[s,r]=y.useState({kind:"loading"}),[c,o]=y.useState({kind:"checking"}),[f,h]=y.useState({}),[p,E]=y.useState({kind:"idle"}),[x,g]=y.useState(""),[j,v]=y.useState({kind:"idle"}),[N,G]=y.useState(0);y.useEffect(()=>{let L=!1;return T0().then(async U=>{if(!L){if(U.kind==="ok"){r({kind:"ok",vaults:U.vaults});return}if(U.kind==="no-hub"){const J=await Cm().catch(()=>[]);if(L)return;r({kind:"no-hub",names:J});return}r({kind:"error",message:U.message})}}),()=>{L=!0}},[N]),y.useEffect(()=>{if(s.kind!=="ok"||c.kind==="ok")return;let L=!1;return _s().then(U=>{L||(U.kind==="ok"?o({kind:"ok"}):U.kind==="forbidden"?o({kind:"banner",status:403}):U.kind==="auth-required"?o({kind:"banner",status:U.status}):o({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 U=!1;h(J=>{const K={...J};for(const X of L)K[X]||(K[X]={kind:"loading"});return K});for(const J of L)_0(J).then(K=>{U||h(X=>({...X,[J]:{kind:"ok",usage:K}}))}).catch(()=>{U||h(K=>({...K,[J]:{kind:"error"}}))});return()=>{U=!0}},[s]);const D=y.useCallback(()=>{o({kind:"ok"}),h({}),G(L=>L+1)},[]),w=k0(x);async function z(L){if(L.preventDefault(),!(x.length===0||w)){E({kind:"submitting"});try{const U=await R0(x);E({kind:"created",result:U}),g(""),G(J=>J+1)}catch(U){if(U instanceof Ln){if(U.disposition==="forbidden"){Kl();return}o({kind:"banner",status:U.status||null}),E({kind:"idle"});return}const J=U instanceof rc?`${U.status}: ${U.message}`:U instanceof Error?U.message:String(U);E({kind:"error",message:J})}}}async function M(L){v({kind:"deleting",name:L});try{const U=await A0(L);v({kind:"done",result:U}),h(J=>{const K={...J};return delete K[L],K}),G(J=>J+1)}catch(U){if(U instanceof Ln){if(U.disposition==="forbidden"){Kl();return}o({kind:"banner",status:U.status||null}),v({kind:"idle"});return}const J=U instanceof rc||U instanceof Error?U.message:String(U);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:()=>G(L=>L+1),children:"Retry"})]});const F=c.kind==="ok";return l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsxs("h2",{children:["Vaults (",s.vaults.length,")"]})}),c.kind==="banner"?l.jsx(qn,{status:c.status,onRecovered:D,ensure:_s}):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)."]}),j.kind==="done"?l.jsx(U0,{result:j.result,onDismiss:()=>v({kind:"idle"})}):null,s.vaults.length===0?l.jsxs("div",{className:"empty",children:["No vaults yet",F?" — create your first below.":"."]}):l.jsx("div",{style:{marginTop:"1rem"},children:s.vaults.map(L=>{const U=f[L.name],J=(U==null?void 0:U.kind)==="ok"?`${U.usage.notes} ${U.usage.notes===1?"note":"notes"} · ${N0(U.usage.totalBytes)}`:(U==null?void 0:U.kind)==="loading"?"…":"—",K=j.kind==="confirming"&&j.name===L.name,X=j.kind==="deleting"&&j.name===L.name,ue=j.kind==="error"&&j.name===L.name?j.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"})}),F?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&&j.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:j.typed,onChange:fe=>v({kind:"confirming",name:L.name,typed:fe.target.value})}),l.jsx("button",{type:"button",disabled:j.typed!==L.name,onClick:()=>void M(L.name),children:"Delete this vault"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Cancel"})]})]}):null]},L.name)})}),F?l.jsxs("div",{className:"section",style:{marginTop:"1.5rem"},children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Create a vault"}),p.kind==="created"?l.jsx(D0,{result:p.result,onDone:()=>E({kind:"idle"})}):l.jsxs("form",{onSubmit:L=>void z(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||!!w||p.kind==="submitting",children:p.kind==="submitting"?"Creating…":"Create vault"})]}),w?l.jsx("div",{className:"field-error",children:w}):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 D0({result:s,onDone:r}){const[c,o]=y.useState(!1),f=async()=>{if(s.token)try{await navigator.clipboard.writeText(s.token),o(!0),setTimeout(()=>o(!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:c?"Copied":"Copy"})]}),l.jsx("div",{className:"actions",style:{marginTop:"0.5rem"},children:l.jsx("button",{type:"button",onClick:r,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:r,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:r,children:"Continue"})]})}function U0({result:s,onDismiss:r}){const c=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:[c.tokens_revoked," token(s) revoked"]}),l.jsxs("li",{children:[c.grants_rewritten," grant(s) rewritten, ",c.grants_dropped," dropped"]}),l.jsxs("li",{children:[c.user_vaults_removed," user assignment(s) removed"]}),l.jsxs("li",{children:[c.invites_invalidated," invite(s) invalidated"]}),l.jsxs("li",{children:[c.connections_torn_down," connection(s) torn down"]}),l.jsxs("li",{children:["vault data ",c.vault_removed?"removed":"NOT removed","; module"," ",c.module_restarted?"restarted":"not restarted"]})]}),c.orphaned_channels.length>0?l.jsxs("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:["Orphaned channel(s) still reference this vault:"," ",c.orphaned_channels.map((o,f)=>l.jsxs("span",{children:[f>0?", ":"",l.jsx("code",{children:o})]},o))," ","— 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(o=>l.jsxs("div",{children:[l.jsx("code",{children:o.step}),": ",o.detail]},o.step))}):null,l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})]})}const H0="https://parachute.computer/install#connect-mcp-clients";function Um(s,r){return`${s.replace(/\/+$/,"")}/vault/${encodeURIComponent(r)}/mcp`}function B0(s,r){return`claude mcp add --transport http parachute-${r} ${Um(s,r)}`}function L0(){var s;return typeof window>"u"||!((s=window.location)!=null&&s.origin)?null:window.location.origin}function Jh({value:s,label:r="Copy"}){const[c,o]=y.useState(!1);return l.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(s).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function q0({vaultName:s,origin:r,tokensHref:c}){const o=r??L0(),f=o?Um(o,s):`/vault/${encodeURIComponent(s)}/mcp`,h=o?B0(o,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"," ",c?l.jsx(ke,{to:c,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:H0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]})}function Kh({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/tokens":`/vault/${encodeURIComponent(c??"")}/tokens`,h=o?"/mirror":`/vault/${encodeURIComponent(c??"")}/mirror`,p=o?"/schema":`/vault/${encodeURIComponent(c??"")}/schema`,E=o?"/embeddings":`/vault/${encodeURIComponent(c??"")}/embeddings`,x=o?"/transcription":`/vault/${encodeURIComponent(c??"")}/transcription`,[g,j]=y.useState({kind:"loading"}),[v,N]=y.useState(0),G=y.useCallback(()=>N(z=>z+1),[]);if(y.useEffect(()=>{let z=!1;if(!c){j({kind:"missing"});return}return j({kind:"loading"}),i0(c).then(M=>{z||j({kind:"ok",vault:M})}).catch(M=>{if(z)return;if(M instanceof ce){if(M.status===401||M.status===403){j({kind:"auth-required",status:M.status,message:M.message});return}if(M.status===404){j({kind:"missing"});return}j({kind:"error",message:`${M.status}: ${M.message}`});return}const F=M instanceof Error?M.message:String(M);j({kind:"error",message:F})}),()=>{z=!0}},[c,v]),g.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(g.kind==="auth-required")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:c})]}),l.jsx(qn,{vaultName:c??"",status:g.status,serverMessage:g.message,onRecovered:G}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]});if(g.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:c})," is registered on this server."]}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]});if(g.kind==="error")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:c})]}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:g.message})}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]});const{vault:D}=g,w=`/vault/${D.name}`;return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:D.name})]}),o?null:l.jsx(ke,{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:D.name})}),D.description?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Description"}),l.jsx("div",{children:D.description})]}):null,l.jsx("div",{children:"Mount"}),l.jsx("div",{children:l.jsx("code",{children:w})}),D.createdAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Created"}),l.jsx("div",{children:l.jsx("code",{children:D.createdAt})})]}):null]}),l.jsx("div",{className:"section",children:l.jsx(q0,{vaultName:D.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:D.stats.totalNotes})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Tags"}),l.jsx("div",{className:"value",children:D.stats.tagCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Attachments"}),l.jsx("div",{className:"value",children:D.stats.attachmentCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Links"}),l.jsx("div",{className:"value",children:D.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(ke,{to:f,children:"Tokens →"}),l.jsx("span",{className:"dim",children:" mint, list, and revoke hub access tokens (JWTs)"})]}),l.jsxs("li",{children:[l.jsx(ke,{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(ke,{to:p,children:"Schema →"}),l.jsx("span",{className:"dim",children:" edit tag schemas — fields, indexing, hierarchy, strict validation"})]}),l.jsx("li",{children:l.jsx(ke,{to:E,children:"Semantic search →"})}),l.jsxs("li",{children:[l.jsx(ke,{to:x,children:"Transcription →"}),l.jsx("span",{className:"dim",children:" turn embeddings on or off — rank notes by meaning, not just keywords"})]}),l.jsx(G0,{vaultName:D.name})]})]})]})}function G0({vaultName:s}){const r=Om();if(!r)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 c=`${r}/hub/permissions?vault=${encodeURIComponent(s)}`;return l.jsxs("li",{children:[l.jsx("a",{href:c,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 r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;if(c)return p({kind:"loading"}),v0(c).then(v=>{j||p({kind:"ok",settings:v})}).catch(v=>{if(j)return;if(v instanceof ce&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{j=!0}},[c,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Semantic search for ",l.jsx("code",{children:c})]}),l.jsx(ke,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(qn,{vaultName:c,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(Y0,{vaultName:c,settings:h.settings,onSettings:j=>p({kind:"ok",settings:j})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Semantic search"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]})}function Y0({vaultName:s,settings:r,onSettings:c}){const[o,f]=y.useState(r.enabled),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,j]=y.useState(!1),v=o!==r.enabled,N=y.useCallback(async()=>{p(!0),x(null),j(!1);try{const G=await x0(s,o);c(G),j(!0)}catch(G){x(G instanceof Error?G.message:String(G))}finally{p(!1)}},[s,o,c]);return l.jsxs("div",{children:[r.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:r.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,r.restart_required?l.jsxs("div",{className:"info-banner",role:"status",children:[g?"Saved. ":"","Semantic search is currently ",l.jsx("strong",{children:r.active?"active":"off"})," in the running vault, but the saved setting wants it ",l.jsx("strong",{children:r.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:r.active?"active":"off"}),"."]}):null,l.jsxs("div",{className:"section",children:[l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:o,disabled:h,onChange:G=>{f(G.target.checked),j(!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 (~",r.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:N,disabled:!v||h,children:h?"Saving…":o?"Enable semantic search":"Disable semantic search"})})]})}function Fh({command:s}){const[r,c]=y.useState(!1);return l.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",marginTop:"0.5rem"},children:[l.jsx("code",{style:{flex:1,padding:"0.5rem 0.65rem",background:"var(--bg-subtle, rgba(0,0,0,0.05))",borderRadius:4,fontSize:"0.9em",overflowX:"auto"},children:s}),l.jsx("button",{type:"button",onClick:()=>{var o;(o=navigator.clipboard)==null||o.writeText(s).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)},()=>{})},children:r?"Copied":"Copy"})]})}function Wh({vaultName:s}={}){const r=Ja(),c=s??r.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=y.useCallback(()=>x(z=>z+1),[]);y.useEffect(()=>{let z=!1;if(c)return p({kind:"loading"}),g0(c).then(M=>{z||p({kind:"ok",settings:M})}).catch(M=>{if(!z){if(M instanceof ce&&(M.status===401||M.status===403)){p({kind:"auth-required",status:M.status,message:M.message});return}p({kind:"error",message:M instanceof Error?M.message:String(M)})}}),()=>{z=!0}},[c,E]);const D=async z=>{if(c){j(!0),N(null);try{const M=await y0(c,z);p({kind:"ok",settings:M})}catch(M){N(M instanceof Error?M.message:String(M))}finally{j(!1)}}};if(h.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(h.kind==="auth-required")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx(qn,{vaultName:c??"",status:h.status,serverMessage:h.message,onRecovered:G}),l.jsx(ke,{to:f,children:"← Back"})]});if(h.kind==="error")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("div",{className:"error-banner",role:"alert",children:h.message}),l.jsx(ke,{to:f,children:"← Back"})]});const w=h.settings;return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("p",{className:"muted",children:"Turns voice recordings into text, locally — the audio never leaves this machine."}),w.ready&&w.active?l.jsxs("div",{className:"ok-banner",role:"status",children:[l.jsx("strong",{children:"Working."})," Audio you record is being transcribed",w.model?` with ${w.model.label}`:"","."]}):w.ready&&w.restart_required?l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"Ready, but not running yet."})," Everything needed is installed; the vault picked up its transcription setup at boot, so it needs a restart to use this."]}),l.jsx(Fh,{command:"parachute restart vault"})]}):l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"Not transcribing."})," Audio will still upload and be stored — it just won't be turned into text until this is set up."]}),w.reason?l.jsx("p",{className:"dim",style:{margin:"0 0 0.5rem",fontSize:"0.9em"},children:w.reason}):null,w.fix_command?l.jsx(Fh,{command:w.fix_command}):null]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.75rem",fontSize:"1rem",fontWeight:500},children:"What's on this machine"}),l.jsxs("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"auto 1fr",gap:"0.4rem 1rem"},children:[l.jsx("dt",{className:"dim",children:"Provider"}),l.jsx("dd",{style:{margin:0},children:l.jsx("code",{children:w.provider})}),l.jsx("dt",{className:"dim",children:w.binary.name}),l.jsx("dd",{style:{margin:0},children:w.binary.path?l.jsx("code",{children:w.binary.path}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"dim",children:"not found"}),l.jsxs("details",{style:{marginTop:"0.35rem"},children:[l.jsx("summary",{className:"dim",style:{fontSize:"0.85em"},children:"Where we looked"}),l.jsx("ul",{style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:w.binary.searched.map(z=>l.jsx("li",{children:l.jsx("code",{children:z})},z))}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:["Installed somewhere else? Set ",l.jsx("code",{children:"WHISPER_CPP_BIN_DIR"})," to that directory."]})]})]})}),l.jsx("dt",{className:"dim",children:"ffmpeg"}),l.jsx("dd",{style:{margin:0},children:w.ffmpeg.path?l.jsx("code",{children:w.ffmpeg.path}):l.jsx("span",{className:"dim",children:"not found — required, since recordings arrive as webm and have to be transcoded"})}),l.jsx("dt",{className:"dim",children:"Model"}),l.jsx("dd",{style:{margin:0},children:w.model?l.jsxs(l.Fragment,{children:[w.model.label," ",l.jsxs("span",{className:"dim",children:["(",w.model.size_mb," MB",w.model.installed?", downloaded":", not downloaded",")"]})]}):l.jsxs("span",{className:"dim",children:[l.jsx("code",{children:w.model_id})," isn't a known model"]})})]})]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.35rem",fontSize:"1rem",fontWeight:500},children:"Model"}),l.jsxs("p",{className:"dim",style:{margin:"0 0 0.75rem",fontSize:"0.9em"},children:["Bigger is more accurate and slower. Picking one here saves the choice — run"," ",l.jsx("code",{children:"parachute-vault transcription install"})," to download it."]}),v?l.jsx("div",{className:"error-banner",role:"alert",style:{marginBottom:"0.5rem"},children:v}):null,l.jsx("div",{style:{display:"grid",gap:"0.4rem"},children:w.available_models.map(z=>l.jsxs("label",{className:"radio-row",style:{display:"flex",gap:"0.6rem",alignItems:"flex-start"},children:[l.jsx("input",{type:"radio",name:"transcription-model",value:z.id,checked:z.id===w.model_id,disabled:g,onChange:()=>void D({model_id:z.id,provider:"whisper-cpp"}),style:{width:"auto",marginTop:"0.25rem"}}),l.jsxs("span",{children:[l.jsx("strong",{children:z.label})," ",l.jsxs("span",{className:"dim",children:["· ",z.size_mb," MB",z.installed?" · downloaded":""]}),l.jsx("br",{}),l.jsx("span",{className:"dim",style:{fontSize:"0.85em"},children:z.note})]})]},z.id))})]}),l.jsx("p",{style:{marginTop:"1.25rem"},children:l.jsx(ke,{to:f,children:"← Back"})})]})}const V0=[{value:"events",label:"On change (default)"},{value:"manual",label:"Manual only"}],X0=[{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 Ih({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;if(c)return p({kind:"loading"}),s0(c).then(v=>{j||p({kind:"ok",snapshot:v})}).catch(v=>{if(j)return;if(v instanceof ce&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{j=!0}},[c,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Backup for ",l.jsx("code",{children:c})]}),l.jsx(ke,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(qn,{vaultName:c,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:c,snapshot:h.snapshot,onRefresh:()=>x(j=>j+1),onSnapshot:j=>p({kind:"ok",snapshot:j})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Mirror"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]})}function Q0({vaultName:s,snapshot:r,onRefresh:c,onSnapshot:o}){const f=Ec(s),[h,p]=y.useState(null),[E,x]=y.useState(null);y.useEffect(()=>{if(!f)return;let v=!1;return jc(s).then(N=>{v||p(N)}).catch(N=>{v||x(N instanceof Error?N.message:String(N))}),()=>{v=!0}},[s,f]);const[g,j]=y.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(Z0,{status:r.status,config:r.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($0,{vaultName:s,creds:h,credsError:E,onCredsChanged:p,onCredsSaved:()=>{c()},onConfigChanged:c,locationIsExternal:r.config.location==="external"}):null,l.jsxs("div",{className:"section",children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>j(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(J0,{status:r.status,config:r.config,creds:h,canRun:f&&r.status.enabled,vaultName:s,onSnapshot:o}),l.jsx(K0,{vaultName:s,initial:r.config,readOnly:!f,creds:h,onSaved:v=>{o(v),c()}}),f?l.jsx(ix,{vaultName:s,creds:h}):null]}):null]})}function Z0({status:s,config:r,creds:c}){var p;if(!r.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 o=!!(c!=null&&c.active_method),f=r.auto_push&&o,h=(c==null?void 0:c.active_method)==="github_oauth"?(p=c.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 J0({status:s,config:r,creds:c,canRun:o,vaultName:f,onSnapshot:h}){const p=r.enabled,[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=async()=>{x(!0),N(null);try{const M=await u0(f);h(M)}catch(M){N(M instanceof Error?M.message:String(M))}finally{x(!1)}},D=async()=>{j(!0),N(null);try{const M=await r0(f);h(M)}catch(M){N(M instanceof Error?M.message:String(M))}finally{j(!1)}},w=!!(c!=null&&c.active_method)||r.auto_push,z=!o||g||!w;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:G,disabled:!o||E,title:p?o?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:D,disabled:z,title:p?o?w?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 K0({vaultName:s,initial:r,readOnly:c,creds:o,onSaved:f}){const[h,p]=y.useState(r),[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(null),[G,D]=y.useState(null),[w,z]=y.useState(0);y.useEffect(()=>{p(r)},[r]);const M=U=>{const J=U.apply(h);p(J)},F=U=>{p(J=>({...J,sync_mode:U}))},L=async U=>{if(U.preventDefault(),!c){j(!0),N(null),D(null);try{const J=await km(s,h);f(J),z(K=>K+1),setTimeout(()=>z(0),3e3)}catch(J){if(J instanceof ce){const K=J.message;N(K);const X=K.toLowerCase();X.includes("external_path")?D("external_path"):X.includes("commit_template")?D("commit_template"):X.includes("safety_net_seconds")?D("safety_net_seconds"):X.includes("sync_mode")?D("sync_mode"):X.includes("auto_push")?D("auto_push"):X.includes("location")?D("location"):D(null)}else N(J instanceof Error?J.message:String(J))}finally{j(!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:c,onChange:U=>p(J=>({...J,enabled:U.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:X0.map(U=>l.jsxs("button",{type:"button",className:"preset-card",disabled:c,onClick:()=>M(U),"aria-label":`Apply ${U.label} preset`,children:[l.jsx("strong",{children:U.label}),l.jsx("span",{className:"dim",children:U.subtext})]},U.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:c,onChange:()=>p(U=>({...U,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:c,onChange:()=>p(U=>({...U,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:c,onChange:U=>p(J=>({...J,external_path:U.target.value.length>0?U.target.value:null})),placeholder:"/Users/you/Documents/vault-mirror","aria-invalid":G==="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:c,onChange:U=>F(U.target.value),children:V0.map(U=>l.jsx("option",{value:U.value,children:U.label},U.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:c,onChange:U=>p(J=>({...J,auto_commit:U.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"||o!=null&&o.active_method?l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_push,disabled:c,onChange:U=>p(J=>({...J,auto_push:U.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?o!=null&&o.active_method?l.jsxs("div",{className:"info-banner",style:{marginTop:"0.5rem"},role:"status",children:[o.active_method==="github_oauth"&&o.github_oauth?l.jsxs(l.Fragment,{children:["Will push to ",l.jsxs("code",{children:["@",o.github_oauth.user_login]})," on GitHub."]}):o.active_method==="pat"&&o.pat?l.jsxs(l.Fragment,{children:["Will push using saved credential: ",l.jsx("code",{children:o.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(U=>!U),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:c,onChange:U=>p(J=>({...J,commit_template:U.target.value})),"aria-invalid":G==="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,w>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:c||g,children:g?"Saving…":"Save"})})]})}function $0({vaultName:s,creds:r,credsError:c,onCredsChanged:o,onCredsSaved:f,onConfigChanged:h,locationIsExternal:p}){var ve;const[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(!1),[G,D]=y.useState(!1),[w,z]=y.useState(null),[M,F]=y.useState(null),[L,U]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(null),[fe,He]=y.useState(null),[Me,Oe]=y.useState(0),ie=(r==null?void 0:r.active_method)==="github_oauth"&&!!r.github_oauth;y.useEffect(()=>{if(!ie){ue(null),He(null);return}let W=!1;return Rm(s).then(S=>{W||(ue(S),He(null))}).catch(S=>{W||He(S instanceof Error?S.message:String(S))}),()=>{W=!0}},[s,ie,Me]);const $=()=>Oe(W=>W+1),te=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,O=async()=>{if(confirm("Disconnect git remote credentials? Auto-push will stop working until you reconnect.")){D(!0),z(null);try{const W=await c0(s);o(W),U(null)}catch(W){z(W instanceof Error?W.message:String(W))}finally{D(!1)}}},Z=async()=>{K(!0),z(null);try{await km(s,{enabled:!0}),U(!0),h()}catch(W){z(W instanceof Error?W.message:String(W))}finally{K(!1)}},ne=()=>{x(!1),jc(s).then(W=>o(W)).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&&!(r!=null&&r.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,c?l.jsxs("div",{className:"error-banner",role:"alert",children:["Could not load credential status: ",l.jsx("code",{children:c})]}):null,te?l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"Status"}),l.jsx("div",{children:(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:["Connected to ",l.jsxs("code",{children:["@",r.github_oauth.user_login]})," on GitHub"]}):(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:["Custom credential: ",l.jsx("code",{children:r.pat.label})]}):null}),(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Token"}),l.jsxs("div",{children:[l.jsx("code",{children:r.github_oauth.token_preview})," ",l.jsxs("span",{className:"dim",children:["· scope ",r.github_oauth.scope||"—"," · authorized"," ",r.github_oauth.authorized_at.slice(0,10)]})]})]}):null,(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Remote"}),l.jsx("div",{children:l.jsx("code",{children:r.pat.remote_url})}),l.jsx("div",{children:"Token"}),l.jsx("div",{children:l.jsx("code",{children:r.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(Hm,{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(W=>l.jsxs("div",{children:[l.jsx("code",{children:W.account_login})," ",l.jsxs("span",{className:"dim",children:["(",W.account_type==="Organization"?"organization":"user"," ·"," ",W.repository_selection==="selected"?"Selected repos only":"All repos",")"]})]},W.id))})]}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>j(!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,w?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:w})}):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:()=>U(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,M?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Credentials saved."})," ",(()=>{const W=M,S=W.initial_push.fired&&W.initial_push.pushed?W.initial_push.sha:void 0,C=W.initial_push.fired&&!W.initial_push.pushed?W.initial_push.error:void 0;return W.auto_push_was_already_enabled?S?l.jsxs(l.Fragment,{children:["Auto-push was already on; just pushed"," ",l.jsx("code",{children:S.slice(0,10)}),"."]}):C?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."}):W.auto_push_enabled?S?l.jsxs(l.Fragment,{children:["Auto-push enabled and the first push landed"," ",l.jsx("code",{children:S.slice(0,10)}),". Your next commit will push to the remote too."]}):C?l.jsx(l.Fragment,{children:"Auto-push enabled. The initial push attempt failed — see Advanced settings → Status for the error."}):l.jsx(l.Fragment,{children:"Auto-push enabled. Your next commit will push to the remote."}):l.jsx(l.Fragment,{children:"Credentials wired. Auto-push remains off; flip it on in Advanced settings → Configuration to push commits automatically."})})()," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>F(null),style:{marginLeft:"0.5rem"},"aria-label":"Dismiss",children:"Dismiss"})]}):null,l.jsx("div",{className:"actions",children:te?l.jsx("button",{type:"button",className:"secondary",onClick:O,disabled:G,children:G?"Disconnecting…":"Disconnect"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>N(!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(F0,{install:X}),E?l.jsx(Ph,{vaultName:s,mode:"connect",onClose:ne,onHistory:U,onConnected:(W,S)=>{o(W),S&&(F(S),f(S)),x(!1)}}):null,g&&ie?l.jsx(Ph,{vaultName:s,mode:"choose-repo",initialLogin:((ve=r==null?void 0:r.github_oauth)==null?void 0:ve.user_login)??"",onClose:()=>j(!1),onHistory:U,onConnected:(W,S)=>{o(W),S&&(F(S),f(S)),j(!1)}}):null,v?l.jsx(tx,{vaultName:s,onClose:()=>N(!1),onSaved:W=>{o(W),F(W),U(W.history_enabled),f(W),N(!1)}}):null]})}function Hm({install:s,onRecheck:r}){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:r,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 F0({install:s}){const[r,c]=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:()=>c(o=>!o),"aria-expanded":r,children:r?"Hide":"Use your own GitHub App"})]}),r?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 Ph({vaultName:s,mode:r,initialLogin:c,onClose:o,onConnected:f,onHistory:h}){const[p,E]=y.useState(r==="choose-repo"?{kind:"probing",user:{login:c??""}}:{kind:"starting"}),[x,g]=y.useState(Date.now()),j=y.useRef(!1),v=p.kind==="polling";y.useEffect(()=>{if(!v)return;const w=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(w)},[v]),y.useEffect(()=>()=>{j.current=!0},[]),y.useEffect(()=>{if(p.kind!=="starting")return;let w=!1;return o0(s).then(z=>{w||E({kind:"polling",code:z,pollIntervalMs:Math.max(z.interval,1)*1e3,startedAt:Date.now()})}).catch(z=>{w||E({kind:"error",message:z instanceof Error?z.message:String(z)})}),()=>{w=!0}},[p.kind,s]),y.useEffect(()=>{if(p.kind!=="polling")return;j.current=!1;const w=p.code;let z=!1,M=null,F=p.pollIntervalMs;const L=async()=>{if(!(z||j.current))try{const U=await d0(s,w.polling_id);if(z)return;if(U.state==="granted"){h(U.history_enabled),E({kind:"probing",user:{login:U.user.login}});return}if(U.state==="denied"){E({kind:"error",message:"Authorization denied."});return}if(U.state==="expired"){E({kind:"error",message:"The device code expired. Try again."});return}U.state==="slow_down"&&(F=U.interval*1e3),M=setTimeout(L,F)}catch(U){if(z)return;E({kind:"error",message:U instanceof Error?U.message:String(U)})}};return M=setTimeout(L,F),()=>{z=!0,M&&clearTimeout(M)}},[p,s,h]),y.useEffect(()=>{if(p.kind!=="probing")return;const w=p.user;let z=!1;return Rm(s).then(M=>{z||E(M.installed?{kind:"picker",user:w,install:M}:{kind:"install-needed",user:w,install:M})}).catch(M=>{z||E({kind:"error",message:M instanceof Error?M.message:String(M)})}),()=>{z=!0}},[p,s]);const N=y.useCallback(w=>E({kind:"error",message:w}),[]),G=y.useCallback(()=>{E(w=>w.kind==="picker"?{kind:"probing",user:w.user}:w)},[]),D=async w=>{try{await navigator.clipboard.writeText(w)}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:r==="choose-repo"?"Choose a repository":"Connect GitHub"}),l.jsx("button",{type:"button",className:"secondary",onClick:o,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:()=>D(p.code.user_code),children:"Copy"})]}),l.jsxs("p",{className:"dim",children:["Waiting for authorization…"," ",W0(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(Hm,{install:p.install,onRecheck:()=>E({kind:"probing",user:p.user})}):null,p.kind==="picker"?l.jsx(P0,{vaultName:s,user:p.user,install:p.install,onPicked:async(w,z)=>{const M=await m0(s,{owner:w,name:z});h(M.history_enabled);const F=await jc(s);f(F,M)},onError:N,onNotInstalled:G}):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(r==="choose-repo"?{kind:"probing",user:{login:c??""}}:{kind:"starting"}),children:"Try again"}),l.jsx("button",{type:"button",className:"secondary",onClick:o,children:"Close"})]})]}):null]})})}function W0(s,r,c){const o=Math.floor((c-r)/1e3),f=Math.max(0,s-o),h=Math.floor(f/60),p=f%60;return`${h}:${String(p).padStart(2,"0")} remaining`}function I0(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 P0({vaultName:s,user:r,install:c,onPicked:o,onError:f,onNotInstalled:h}){const[p,E]=y.useState(null),[x,g]=y.useState(!1),[j,v]=y.useState(""),[N,G]=y.useState(null),[D,w]=y.useState(!1),[z,M]=y.useState(""),[F,L]=y.useState(!1),[U,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($=>j.length===0?!0:$.full_name.toLowerCase().includes(j.toLowerCase())),fe=[];for(const $ of ue){const te=fe[fe.length-1];if(te&&te.login===$.account_login)te.repos.push($);else{const O=fe.find(Z=>Z.login===$.account_login);O?O.repos.push($):fe.push({login:$.account_login,repos:[$]})}}const He=$=>c.installations.find(te=>te.account_login===$),Me=async($,te)=>{G(`${$}/${te}`);try{await o($,te)}catch(O){f(O instanceof Error?O.message:String(O))}finally{G(null)}},Oe=async()=>{if(z.trim().length!==0){w(!0);try{const $=await h0(s,{name:z.trim(),description:"Parachute Vault mirror",private:!0});await o($.owner,$.name)}catch($){$ instanceof ce&&$.errorType==="app_lacks_admin_permission"?J(!0):f($ instanceof Error?$.message:String($))}finally{w(!1)}}},ie=c.app.is_shared_default||U;return l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:["Authorized as ",l.jsxs("code",{children:["@",r.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:j,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&&j.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',j,'".']}):null,ue.length===0&&j.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(O=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>Me(O.owner,O.name),disabled:N!==null,children:[l.jsxs("span",{children:[l.jsx("strong",{children:O.name}),O.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:O.updated_at.slice(0,10)})]},O.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:c.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]}),F?l.jsxs("div",{className:"form-row",style:{marginTop:"0.75rem"},children:[l.jsx("label",{htmlFor:"new-repo-name",children:"New repo name"}),l.jsx("input",{id:"new-repo-name",type:"text",value:z,placeholder:"my-vault-backup",onChange:$=>M($.target.value)}),ie?l.jsx(ex,{install:c,suggestedName:z.trim(),onRefresh:()=>X($=>$+1)}):l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:Oe,disabled:D||z.trim().length===0,children:D?"Creating…":"Create"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!1),disabled:D,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 ex({install:s,suggestedName:r,onRefresh:c}){const o=r.length>0?`https://github.com/new?name=${encodeURIComponent(r)}`:"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:o,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:I0(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:c,children:"Refresh list"})," ","— then pick it."]})]})]})}function tx({vaultName:s,onClose:r,onSaved:c}){const[o,f]=y.useState(""),[h,p]=y.useState(""),[E,x]=y.useState(""),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=async D=>{D.preventDefault(),j(!0),N(null);try{const w=await f0(s,{token:o.trim(),remote_url:h.trim(),label:E.trim()||void 0});c(w)}catch(w){N(w instanceof Error?w.message:String(w))}finally{j(!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:r,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:G,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:o,autoComplete:"off",onChange:D=>f(D.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:D=>p(D.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:D=>x(D.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:r,disabled:g,children:"Cancel"})]})]})]})})}const nx=1500,ax={cloning:"Cloning the repo…",importing:"Importing notes into this vault…",syncing:"Setting up sync back to this repo…"};function lx(s){const r=Math.max(0,Math.floor(s/1e3)),c=Math.floor(r/60),o=r%60;return c>0?`${c}m ${o}s`:`${o}s`}function ix({vaultName:s,creds:r}){const[c,o]=y.useState(""),[f,h]=y.useState("merge"),[p,E]=y.useState(!1),[x,g]=y.useState(""),[j,v]=y.useState(!1),[N,G]=y.useState({kind:"idle"}),[D,w]=y.useState(""),[z,M]=y.useState(!1),F=(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth!==null,L=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,U=f!=="replace"||D.trim()===s,J=N.kind!=="running"&&c.trim().length>0&&U&&(!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 p0(s,{remote_url:c.trim(),mode:f,credentials:ie,enable_sync:j});G({kind:"running",stage:$.stage,detail:$.detail,jobId:$.job_id,startedAt:Date.parse($.started_at)||Date.now()})}catch($){const te=$ instanceof Error?$.message:String($);G({kind:"error",message:te})}},[X,ue]=y.useState(0),fe=N.kind==="running"?N.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=N.kind,Me=N.kind==="running"?N.jobId:null;y.useEffect(()=>{if(He!=="running"||!Me)return;let ie=!1,$=null;const te=async()=>{var O;if(!ie){try{const Z=await zm(s,Me);if(ie)return;if(Z.status==="running")G({kind:"running",stage:Z.stage,detail:Z.detail,jobId:Me,startedAt:fe});else if(Z.status==="succeeded"&&Z.result){G({kind:"success",result:Z.result,remoteUrl:c.trim(),mode:f});return}else{G({kind:"error",message:((O=Z.error)==null?void 0:O.message)??"The import failed for an unknown reason."});return}}catch(Z){if(ie)return;if(Z instanceof ce&&Z.status===404){G({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(),nx)}};return te(),()=>{ie=!0,$!==null&&window.clearTimeout($)}},[He,Me,s]);const Oe=()=>{G({kind:"idle"}),w("")};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."]}),N.kind==="success"?l.jsx(sx,{vaultName:s,result:N.result,remoteUrl:N.remoteUrl,mode:N.mode,onReset:Oe}):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:c,placeholder:"https://github.com/aaron/my-vault.git",onChange:ie=>o(ie.target.value),disabled:N.kind==="running"}),F?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:["Or"," ",l.jsx("button",{type:"button",onClick:()=>M(!0),disabled:N.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"),w("")},disabled:N.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:N.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:D,placeholder:s,onChange:ie=>w(ie.target.value),disabled:N.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:N.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:N.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:j,onChange:ie=>v(ie.target.checked),disabled:N.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:j?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."]})})]}),N.kind==="error"?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:N.message})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:K,disabled:!J,title:U?c.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:N.kind==="running"?"Importing…":"Start import"})}),N.kind==="running"?l.jsxs("div",{className:"form-row","aria-live":"polite",children:[l.jsxs("p",{style:{margin:"0 0 0.25rem"},children:[ax[N.stage]," ",l.jsxs("span",{className:"dim",children:["(",lx(X),")"]})]}),N.detail?l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85em",fontFamily:"var(--mono, monospace)"},children:N.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]}),z?l.jsx(ux,{vaultName:s,onClose:()=>M(!1),onPicked:ie=>{o(ie),M(!1)}}):null]})}function sx({vaultName:s,result:r,remoteUrl:c,mode:o,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 ",r.notes_imported," note",r.notes_imported===1?"":"s",", ",r.tags_imported," tag schema",r.tags_imported===1?"":"s",", ",r.attachments_imported," ","attachment",r.attachments_imported===1?"":"s",o==="replace"&&r.notes_deleted!==void 0?`, wiped ${r.notes_deleted} pre-existing note${r.notes_deleted===1?"":"s"}`:"","."]}),r.warnings.length>0?l.jsxs("details",{style:{marginBottom:"0.75rem"},children:[l.jsxs("summary",{children:[r.warnings.length," warning",r.warnings.length===1?"":"s"," ","(see details)"]}),l.jsx("ul",{style:{marginTop:"0.5rem"},children:r.warnings.map((h,p)=>l.jsx("li",{children:l.jsx("code",{style:{fontSize:"0.85em"},children:h})},p))})]}):null,r.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:c})," automatically."]}):r.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."})," ",r.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 ux({vaultName:s,onClose:r,onPicked:c}){const[o,f]=y.useState(null),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,j]=y.useState(""),[v,N]=y.useState(null);y.useEffect(()=>{let D=!1;return Am(s).then(w=>{if(!D){if(!w.installed){x(w.install_url),f([]);return}f(w.repos),p(!!w.truncated)}}).catch(w=>{D||N(w instanceof Error?w.message:String(w))}),()=>{D=!0}},[s]);const G=(o??[]).filter(D=>g.length===0?!0:D.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:r,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:D=>j(D.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,o===null&&!v?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,o!==null?l.jsxs("div",{className:"repo-list",children:[G.length===0&&g.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',g,'".']}):null,G.length===0&&g.length===0&&o.length===0&&!E?l.jsx("p",{className:"dim",children:"The app installation doesn't include any repos."}):null,G.map(D=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>c(D.clone_url),children:[l.jsxs("span",{children:[l.jsx("strong",{children:D.name}),D.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:D.updated_at.slice(0,10)})]},D.full_name))]}):null]})})}const rx=["string","integer","number","boolean","array","object","reference"],cc=new Set(["string","integer","boolean","reference"]),Pl=s=>`/vault/${encodeURIComponent(s)}/api/tags`;async function ei(s){try{const r=await s.text(),c=JSON.parse(r);return c.message||c.error||r||`${s.status}`}catch{return`${s.status} ${s.statusText}`}}async function cx(s){const r=await Re(s,`${Pl(s)}?include_schema=true`);if(!r.ok)throw new ce(r.status,await ei(r));return await r.json()}async function ox(s,r){const c=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}`);if(c.status===404)return null;if(!c.ok)throw new ce(c.status,await ei(c));return await c.json()}async function dx(s,r){const c=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}/effective`);if(!c.ok)throw new ce(c.status,await ei(c));return await c.json()}async function fx(s,r,c){const o=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new ce(o.status,await ei(o));return await o.json()}async function hx(s,r,c){const o=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}/conformance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fields:c})});if(!o.ok)throw new ce(o.status,await ei(o));return await o.json()}function em({vaultName:s}={}){const r=Ja(),c=s??r.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,j]=y.useState(null);y.useEffect(()=>{let G=!1;if(c)return p({kind:"loading"}),cx(c).then(D=>{G||p({kind:"ok",tags:D})}).catch(D=>{if(!G){if(D instanceof ce&&(D.status===401||D.status===403)){p({kind:"auth-required",status:D.status});return}p({kind:"error",message:D instanceof Error?D.message:String(D)})}}),()=>{G=!0}},[c,E]);const v=y.useCallback(()=>x(G=>G+1),[]),N=y.useCallback(()=>x(G=>G+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Schema for ",l.jsx("code",{children:c})]}),l.jsx(ke,{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(qn,{vaultName:c,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(px,{tags:h.tags,selected:g,onSelect:j}),g?l.jsx(xx,{vaultName:c,tag:g,allTags:h.tags,onSaved:N},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 mx(s){const r=s.fields??{},c=Object.values(r);return{hasSchema:s.description!==null&&s.description!==void 0||c.length>0,indexed:c.filter(o=>o.indexed===!0).length,strict:c.some(o=>o.strict===!0)}}function px({tags:s,selected:r,onSelect:c}){const o=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:[o.map(f=>{const h=mx(f);return l.jsx("li",{children:l.jsxs("button",{type:"button",className:`tag-list-item${r===f.name?" selected":""}`,onClick:()=>c(f.name),"aria-current":r===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)}),o.length===0?l.jsx("li",{className:"muted",children:"No tags yet."}):null]})})}let gx=0;function Bm(){return`row-${gx++}`}function yx(s){return s?Object.entries(s).map(([r,c])=>({key:Bm(),name:r,spec:{...c}})):[]}function tm(s){const r={};for(const c of s){const o=c.name.trim();if(!o)continue;const f={};c.spec.type&&(f.type=c.spec.type),c.spec.enum&&c.spec.enum.length>0&&(f.enum=c.spec.enum),c.spec.required&&(f.required=!0),c.spec.cardinality==="many"&&(f.cardinality="many"),c.spec.indexed&&(f.indexed=!0),c.spec.strict&&(f.strict=!0),c.spec.description&&c.spec.description.trim().length>0&&(f.description=c.spec.description.trim()),r[o]=f}return r}const vx=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;function xx({vaultName:s,tag:r,allTags:c,onSaved:o}){const f=Ec(s),[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;return p({kind:"loading"}),Promise.all([ox(s,r),dx(s,r)]).then(([v,N])=>{if(j)return;p({kind:"ok",record:v??{name:r,count:0,description:null,fields:null,relationships:null,parent_names:null,created_at:null,updated_at:null},effective:N})}).catch(v=>{if(!j){if(v instanceof ce&&(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)})}}),()=>{j=!0}},[s,r,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return h.kind==="loading"?l.jsx("div",{className:"schema-detail",children:l.jsxs("p",{className:"muted",children:["Loading ",r,"…"]})}):h.kind==="auth-required"?l.jsx("div",{className:"schema-detail",children:l.jsx(qn,{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(bx,{vaultName:s,tag:r,record:h.record,effective:h.effective,allTags:c,isAdmin:f,onSaved:()=>{x(j=>j+1),o()}})}function bx({vaultName:s,tag:r,record:c,effective:o,allTags:f,isAdmin:h,onSaved:p}){const[E,x]=y.useState(c.description??""),[g,j]=y.useState(()=>yx(c.fields)),[v,N]=y.useState(c.parent_names??[]),[G,D]=y.useState(!1),[w,z]=y.useState(null),[M,F]=y.useState(0),[L,U]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(!1),fe=y.useMemo(()=>{const C=new Map;for(const V of o.indexed_fields)C.set(V.name,V);return C},[o.indexed_fields]),He=y.useMemo(()=>f.map(C=>C.name).filter(C=>C!==r).sort((C,V)=>C.localeCompare(V)),[f,r]),Me=y.useMemo(()=>{var Q;const C=new Map(f.map(ae=>[ae.name,ae])),V=[];for(const ae of v){const se=C.get(ae);(Q=se==null?void 0:se.parent_names)!=null&&Q.includes(r)&&V.push(ae)}return V},[v,f,r]),Oe=y.useMemo(()=>{const C=new Set(Object.entries(c.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(!C.has(Q))return!0;for(const Q of C)if(!V.has(Q))return!0;return!1},[g,c.fields]),ie=y.useMemo(()=>_x(g),[g]),$=()=>{U(null),ue(!1)},te=(C,V,Q)=>{j(ae=>ae.map(se=>se.key===C?{...se,name:Q!==void 0?Q:se.name,spec:{...se.spec,...V}}:se)),$()},O=()=>{j(C=>[...C,{key:Bm(),name:"",spec:{type:"string"}}]),$()},Z=C=>{j(V=>V.filter(Q=>Q.key!==C)),$()},ne=C=>{N(V=>V.includes(C)?V.filter(Q=>Q!==C):[...V,C]),$()},ve=async()=>{D(!0),z(null);try{const C=tm(g);await fx(s,r,{description:E.trim().length>0?E.trim():null,fields:Object.keys(C).length>0?C:null,replace_fields:!0,parent_names:v.length>0?v:null}),F(V=>V+1),$(),setTimeout(()=>F(0),3e3),p()}catch(C){C instanceof ce?z(C.message):z(C instanceof Error?C.message:String(C))}finally{D(!1)}},W=async C=>{if(C.preventDefault(),!!h){if(ie.length>0){z(ie[0]);return}if(z(null),L&&L.violating_notes>0||X){await ve();return}K(!0);try{const V=tm(g),Q=await hx(s,r,V);if(Q.violating_notes>0){U(Q);return}$(),await ve()}catch(V){z(`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.`),U(null),ue(!0)}finally{K(!1)}}},S=!h;return l.jsxs("form",{className:"schema-detail",onSubmit:W,children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:l.jsx("code",{children:r})}),l.jsxs("span",{className:"dim",children:[c.count," note",c.count===1?"":"s"]})]}),S?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:S,rows:2,onChange:C=>{x(C.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(C=>{var V;return l.jsx(jx,{row:C,readOnly:S,coDeclarers:C.spec.indexed?(((V=fe.get(C.name.trim()))==null?void 0:V.tags)??[]).filter(Q=>Q!==r):[],onChange:(Q,ae)=>te(C.key,Q,ae),onRemove:()=>Z(C.key)},C.key)}),S?null:l.jsx("button",{type:"button",className:"secondary",onClick:O,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:r})," 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(C=>l.jsxs("label",{className:"parent-chip",children:[l.jsx("input",{type:"checkbox",checked:v.includes(C),disabled:S,onChange:()=>ne(C)}),l.jsx("code",{children:C})]},C))}),Me.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginTop:"0.5rem"},children:["Cycle warning: ",l.jsx("code",{children:Me.join(", ")})," already list(s) ",l.jsx("code",{children:r})," as a parent. A cycle is tolerated at runtime but is almost always a config bug."]}):null]}),l.jsx(Sx,{tag:r,effective:o}),l.jsx(Ex,{catalog:o.indexed_fields,tag:r}),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(C=>l.jsx("li",{children:C},C))})]}):null,Oe&&!S?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(Tx,{report:L,tag:r}):null,w?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:w})}):null,M>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:S||G||J,children:G?"Saving…":J?"Checking existing notes…":L&&L.violating_notes>0||X?"Save anyway":"Save"})})]})}function jx({row:s,readOnly:r,coDeclarers:c,onChange:o,onRemove:f}){const{name:h,spec:p}=s,E=cc.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:r,placeholder:"field_name",onChange:g=>o({},g.target.value)}),l.jsxs("select",{"aria-label":"Field type",value:p.type??"",disabled:r,onChange:g=>{const j=g.target.value||void 0,v={type:j};j&&!cc.has(j)&&(v.indexed=!1),o(v)},children:[l.jsx("option",{value:"",children:"(any)"}),rx.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:r,onChange:g=>o({required:g.target.checked})}),"required"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.cardinality==="many",disabled:r,onChange:g=>o({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:r||!E,onChange:g=>o({indexed:g.target.checked})}),"indexed"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.strict===!0,disabled:r,onChange:g=>o({strict:g.target.checked})}),"strict"]}),r?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:r,placeholder:"enum values (comma-separated, optional)",onChange:g=>{const j=g.target.value.split(",").map(v=>v.trim()).filter(v=>v.length>0);o({enum:j})}}),l.jsx("input",{"aria-label":"Field description",type:"text",className:"field-desc-input",value:p.description??"",disabled:r,placeholder:"description (optional)",onChange:g=>o({description:g.target.value})})]}),c.length>0?l.jsxs("p",{className:"dim field-codeclarers",children:["Also indexed by: ",c.map(g=>l.jsx("code",{children:g},g)),". Type + indexed are global across all of these — change them together."]}):null]})}function Sx({tag:s,effective:r}){const c=new Set(Object.keys(r.fields??{})),o=Object.entries(r.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)"}),r.effective_parents.length>0?l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Inherits from: ",r.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."]}),o.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:o.map(([f,h])=>{const p=!c.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 Ex({catalog:s,tag:r}){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(c=>l.jsxs("tr",{className:c.tags.includes(r)?"row-this-tag":void 0,children:[l.jsx("td",{children:l.jsx("code",{children:c.name})}),l.jsx("td",{children:c.type}),l.jsx("td",{children:c.tags.map(o=>l.jsx("code",{className:o===r?"tag-self":void 0,children:o},o))})]},c.name))})]})]})}function Tx({report:s,tag:r}){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 ",r," <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(c=>l.jsxs("li",{children:[l.jsx("code",{children:c.path??c.id}),": ",c.fields.map(o=>o.reason).join(", ")]},c.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 _x(s){const r=[],c=new Set;for(const o of s){const f=o.name.trim();if(f){if(c.has(f)){r.push(`Duplicate field name "${f}".`);continue}c.add(f),o.spec.indexed&&!vx.test(f)&&r.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).`),o.spec.indexed&&o.spec.type&&!cc.has(o.spec.type)&&r.push(`"${f}" is indexed but type "${o.spec.type}" can't be indexed (use string / integer / boolean).`)}}return r}const Nx=[30,90,180,365],nm=90,wx=1440*60;function Cx(s){if(!s)return null;const r=s.scoped_tags;if(!Array.isArray(r))return null;const c=r.filter(o=>typeof o=="string"&&o.length>0);return c.length>0?c:null}function kx(s){return{jti:s.jti,label:s.subject,scopes:Array.isArray(s.scopes)?s.scopes:[],scoped_tags:Cx(s.permissions),expires_at:s.expires_at??null,revoked_at:s.revoked_at??null,created_at:s.created_at}}async function Rx(s,r){const c={scope:`vault:${s}:${r.verb}`,expires_in:r.ttlDays*wx,subject:r.label};r.scopedTags.length>0&&(c.permissions={scoped_tags:r.scopedTags});const o=await Il("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new ce(o.status,await ks(o));const f=await o.json();return{jti:f.jti,token:f.token,scope:f.scope,expires_at:f.expires_at??null}}async function Ax(s){const r=`vault:${s}:`,c=[];let o=null;for(let f=0;f<1e3;f++){const h=new URLSearchParams({revoked:"all"});o&&h.set("cursor",o);const p=await Il(`/api/auth/tokens?${h.toString()}`);if(!p.ok)throw new ce(p.status,await ks(p));const E=await p.json(),x=Array.isArray(E.tokens)?E.tokens:[];if(c.push(...x),o=E.next_cursor??null,!o)break}return c.filter(f=>Array.isArray(f.scopes)&&f.scopes.some(h=>h.startsWith(r))).map(kx)}async function zx(s){const r=await Il("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jti:s})});if(!r.ok)throw new ce(r.status,await ks(r))}async function Mx(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/api/tags`);if(!r.ok)throw new ce(r.status,await ks(r));const c=await r.json();return Array.isArray(c)?c:[]}async function ks(s){try{const r=await s.text(),c=JSON.parse(r);if(c.error_description)return c.error_description;if(c.message)return c.message;if(c.error)return c.error;if(r)return r}catch{}return`${s.status} ${s.statusText}`}const Ox=["read","write","admin"],Dx={30:"30 days",90:"90 days",180:"180 days",365:"1 year (max)"};function Ux(s){return s instanceof Ln?s.disposition==="forbidden"?(Kl(),{kind:"auth-required",status:403}):s.disposition==="auth-required"?{kind:"auth-required",status:s.status}:{kind:"error",message:s.message}:s instanceof ce&&(s.status===401||s.status===403)?{kind:"auth-required",status:s.status}:{kind:"error",message:s instanceof Error?s.message:String(s)}}function am({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(null),[g,j]=y.useState(null),[v,N]=y.useState(0);y.useEffect(()=>{let w=!1;if(c)return p({kind:"loading"}),Ax(c).then(z=>{w||p({kind:"ok",tokens:z})}).catch(z=>{w||p(Ux(z))}),()=>{w=!0}},[c,v]);const G=y.useCallback(()=>N(w=>w+1),[]);if(y.useEffect(()=>{if(!E)return;const w=z=>{z.preventDefault(),z.returnValue=""};return window.addEventListener("beforeunload",w),()=>window.removeEventListener("beforeunload",w)},[E]),!c)return l.jsxs("div",{children:[l.jsx("h2",{children:"Tokens"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(ke,{to:"/",children:"← Back to vaults"})]});const D=Ec(c);return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Tokens for ",l.jsx("code",{children:c})]}),l.jsx(ke,{to:f,className:"muted",children:"← Vault detail"})]}),D?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:",c,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to manage tokens.`]}),E?l.jsx(Hx,{result:E,onDismiss:()=>x(null)}):null,h.kind==="ok"&&D&&!E?l.jsx(Bx,{vaultName:c,onMinted:w=>{x(w),N(z=>z+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(qn,{vaultName:c,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(Lx,{tokens:h.tokens,allowRevoke:D,confirmingJti:g,onAskConfirm:j,onRevoked:()=>{j(null),N(w=>w+1)}}):null]})]})}function Hx({result:s,onDismiss:r}){const[c,o]=y.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(s.token),o(!0),setTimeout(()=>o(!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:c?"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:r,children:"Done — I've saved the token"})})]})}function Bx({vaultName:s,onMinted:r}){const[c,o]=y.useState(""),[f,h]=y.useState("admin"),[p,E]=y.useState(nm),[x,g]=y.useState(!1),[j,v]=y.useState(null),[N,G]=y.useState([]),[D,w]=y.useState(null),[z,M]=y.useState(new Set);y.useEffect(()=>{let K=!1;return Mx(s).then(X=>{if(K)return;const ue=X.map(fe=>fe.name).filter(fe=>!fe.includes("/")).sort();G(ue)}).catch(X=>{K||w(X instanceof Error?X.message:String(X))}),()=>{K=!0}},[s]);const F=c.trim(),L=F.length===0,U=K=>{M(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 Rx(s,{verb:f,label:F,scopedTags:[...z],ttlDays:p});r(X),o(""),h("admin"),E(nm),M(new Set)}catch(X){if(X instanceof Ln&&X.disposition==="forbidden"){Kl();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."}),j?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:j})}):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:c,onChange:K=>o(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:Ox.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:Nx.map(K=>l.jsx("option",{value:K,children:Dx[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)"})]}),D?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Couldn't load tags: ",l.jsx("code",{children:D}),". Token will be unscoped."]}):N.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:N.map(K=>l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:z.has(K),onChange:()=>U(K)}),l.jsx("code",{children:K})]},K))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:z.size===0?"Nothing selected — token sees the full vault (unscoped).":`Token limited to: ${[...z].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 Lx({tokens:s,allowRevoke:r,confirmingJti:c,onAskConfirm:o,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(qx,{token:h,allowRevoke:r,confirming:c===h.jti,onAskConfirm:o,onRevoked:f},h.jti))})}function qx({token:s,allowRevoke:r,confirming:c,onAskConfirm:o,onRevoked:f}){const[h,p]=y.useState(!1),[E,x]=y.useState(null),g=s.revoked_at!==null,j=async()=>{p(!0),x(null);try{await zx(s.jti),f()}catch(v){if(v instanceof Ln&&v.disposition==="forbidden"){Kl();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]}),r&&!g?c?l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:j,disabled:h,children:h?"Revoking…":"Confirm revoke"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(null),disabled:h,children:"Cancel"})]}):l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(s.jti),children:"Revoke"}):null]})}function Gx(){const[s,r]=y.useState({kind:"loading"});return y.useEffect(()=>{let c=!1;return Cm().then(o=>{c||r({kind:"ok",vaults:o})}).catch(o=>{if(c)return;const f=o instanceof ce?`${o.status}: ${o.message}`:o instanceof Error?o.message:String(o);r({kind:"error",message:f})}),()=>{c=!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(c=>l.jsxs(ke,{to:`/vault/${c}`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:c})})}),l.jsx("div",{className:"chev",children:"→"})]},c))]})}function Yx(){const s=xc(),r=s?null:Nm();return l.jsxs("div",{className:"page",children:[l.jsxs("nav",{className:"nav",children:[l.jsxs(ke,{to:"/",className:"brand",children:["Parachute Vault ",l.jsx("span",{className:"sub",children:"admin"})]}),r?l.jsx(ke,{to:"/",children:l.jsx("code",{children:r})}):l.jsx(ke,{to:"/",children:"Vaults"})]}),s?l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(O0,{})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]}):r?l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(Kh,{vaultName:r})}),l.jsx(Fe,{path:"/tokens",element:l.jsx(am,{vaultName:r})}),l.jsx(Fe,{path:"/mirror",element:l.jsx(Ih,{vaultName:r})}),l.jsx(Fe,{path:"/schema",element:l.jsx(em,{vaultName:r})}),l.jsx(Fe,{path:"/embeddings",element:l.jsx($h,{vaultName:r})}),l.jsx(Fe,{path:"/transcription",element:l.jsx(Wh,{vaultName:r})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]}):l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(Gx,{})}),l.jsx(Fe,{path:"/vault/:name",element:l.jsx(Kh,{})}),l.jsx(Fe,{path:"/vault/:name/tokens",element:l.jsx(am,{})}),l.jsx(Fe,{path:"/vault/:name/mirror",element:l.jsx(Ih,{})}),l.jsx(Fe,{path:"/vault/:name/schema",element:l.jsx(em,{})}),l.jsx(Fe,{path:"/vault/:name/embeddings",element:l.jsx($h,{})}),l.jsx(Fe,{path:"/vault/:name/transcription",element:l.jsx(Wh,{})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]})]})}function lc(){return l.jsxs("div",{className:"empty",children:["404 — back to ",l.jsx(ke,{to:"/",children:"vault"}),"."]})}Pv();const Lm=document.getElementById("root");if(!Lm)throw new Error("#root not found");function ic(){vy.createRoot(Lm).render(l.jsx(y.StrictMode,{children:l.jsx(Lv,{basename:$v(),children:l.jsx(Yx,{})})}))}const lm=Nm();!xc()&&lm?n0(lm).then(ic,ic):ic();
|
|
60
|
+
Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let j=fn(),v;if(r){let M=typeof r=="string"?Qa(r):r;Ue(x==="/"||((z=M.pathname)==null?void 0:z.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 "${M.pathname}" was given in the \`location\` prop.`),v=M}else v=j;let N=v.pathname||"/",G=N;if(x!=="/"){let M=x.replace(/^\//,"").split("/");G="/"+N.replace(/^\//,"").split("/").slice(M.length).join("/")}let D=im(s,{pathname:G});Vt(g||D!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.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 w=uv(D&&D.map(M=>Object.assign({},M,{params:Object.assign({},p,M.params),pathname:Ht([x,o.encodeLocation?o.encodeLocation(M.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?x:Ht([x,o.encodeLocation?o.encodeLocation(M.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),f,c);return r&&w?y.createElement($l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},w):w}function av(){let s=fv(),r=Vy(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),c=s instanceof Error?s.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},h={padding:"2px 4px",backgroundColor:o},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"}},r),c?y.createElement("pre",{style:f},c):null,p)}var lv=y.createElement(av,null),xm=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,r){return r.location!==s.location||r.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:r.error,location:r.location,revalidation:s.revalidation||r.revalidation}}componentDidCatch(s,r){this.props.onError?this.props.onError(s,r):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 c=Iy(s.digest);c&&(s=c)}let r=s!==void 0?y.createElement(Xt.Provider,{value:this.props.routeContext},y.createElement(fc.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(iv,{error:s},r):r}};xm.contextType=hm;var tc=new WeakMap;function iv({children:s,error:r}){let{basename:c}=y.useContext(Mt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Wy(r.digest);if(o){let f=tc.get(r);if(f)throw f;let h=dm(o.location,c);if(om&&!tc.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw tc.set(r,p),p}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return s}function sv({routeContext:s,match:r,children:c}){let o=y.useContext(Za);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Xt.Provider,{value:s},c)}function uv(s,r=[],c){let o=c==null?void 0:c.state;if(s==null){if(!o)return null;if(o.errors)s=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)s=o.matches;else return null}let f=s,h=o==null?void 0:o.errors;if(h!=null){let j=f.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);Ue(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let p=!1,E=-1;if(c&&o){p=o.renderFallback;for(let j=0;j<f.length;j++){let v=f[j];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(E=j),v.route.id){let{loaderData:N,errors:G}=o,D=v.route.loader&&!N.hasOwnProperty(v.route.id)&&(!G||G[v.route.id]===void 0);if(v.route.lazy||D){c.isStatic&&(p=!0),E>=0?f=f.slice(0,E+1):f=[f[0]];break}}}}let x=c==null?void 0:c.onError,g=o&&x?(j,v)=>{var N,G;x(j,{location:o.location,params:((G=(N=o.matches)==null?void 0:N[0])==null?void 0:G.params)??{},unstable_pattern:Xy(o.matches),errorInfo:v})}:void 0;return f.reduceRight((j,v,N)=>{let G,D=!1,w=null,z=null;o&&(G=h&&v.route.id?h[v.route.id]:void 0,w=v.route.errorElement||lv,p&&(E<0&&N===0?(bm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,z=null):E===N&&(D=!0,z=v.route.hydrateFallbackElement||null)));let M=r.concat(f.slice(0,N+1)),F=()=>{let L;return G?L=w:D?L=z:v.route.Component?L=y.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=j,y.createElement(sv,{match:v,routeContext:{outlet:j,matches:M,isDataRoute:o!=null},children:L})};return o&&(v.route.ErrorBoundary||v.route.errorElement||N===0)?y.createElement(xm,{location:o.location,revalidation:o.revalidation,component:w,error:G,children:F(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:g}):F()},null)}function hc(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rv(s){let r=y.useContext(Za);return Ue(r,hc(s)),r}function cv(s){let r=y.useContext(Ns);return Ue(r,hc(s)),r}function ov(s){let r=y.useContext(Xt);return Ue(r,hc(s)),r}function mc(s){let r=ov(s),c=r.matches[r.matches.length-1];return Ue(c.route.id,`${s} can only be used on routes that contain a unique "id"`),c.route.id}function dv(){return mc("useRouteId")}function fv(){var o;let s=y.useContext(fc),r=cv("useRouteError"),c=mc("useRouteError");return s!==void 0?s:(o=r.errors)==null?void 0:o[c]}function hv(){let{router:s}=rv("useNavigate"),r=mc("useNavigate"),c=y.useRef(!1);return ym(()=>{c.current=!0}),y.useCallback(async(f,h={})=>{Vt(c.current,gm),c.current&&(typeof f=="number"?await s.navigate(f):await s.navigate(f,{fromRouteId:r,...h}))},[s,r])}var Yh={};function bm(s,r,c){!r&&!Yh[s]&&(Yh[s]=!0,Vt(!1,c))}y.memo(mv);function mv({routes:s,future:r,state:c,isStatic:o,onError:f}){return vm(s,void 0,{state:c,isStatic:o,onError:f})}function Fe(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 pv({basename:s="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:p}){Ue(!Fl(),"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 c=="string"&&(c=Qa(c));let{pathname:g="/",search:j="",hash:v="",state:N=null,key:G="default",unstable_mask:D}=c,w=y.useMemo(()=>{let z=dn(g,E);return z==null?null:{location:{pathname:z,search:j,hash:v,state:N,key:G,unstable_mask:D},navigationType:o}},[E,g,j,v,N,G,o,D]);return Vt(w!=null,`<Router basename="${E}"> is not able to match the URL "${g}${j}${v}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:y.createElement(Mt.Provider,{value:x},y.createElement($l.Provider,{children:r,value:w}))}function nc({children:s,location:r}){return nv(uc(s),r)}function uc(s,r=[]){let c=[];return y.Children.forEach(s,(o,f)=>{if(!y.isValidElement(o))return;let h=[...r,f];if(o.type===y.Fragment){c.push.apply(c,uc(o.props.children,h));return}Ue(o.type===Fe,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ue(!o.props.index||!o.props.children,"An index route cannot have child routes.");let p={id:o.props.id||h.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(p.children=uc(o.props.children,h)),c.push(p)}),c}var bs="get",js="application/x-www-form-urlencoded";function ws(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function gv(s){return ws(s)&&s.tagName.toLowerCase()==="button"}function yv(s){return ws(s)&&s.tagName.toLowerCase()==="form"}function vv(s){return ws(s)&&s.tagName.toLowerCase()==="input"}function xv(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function bv(s,r){return s.button===0&&(!r||r==="_self")&&!xv(s)}var xs=null;function jv(){if(xs===null)try{new FormData(document.createElement("form"),0),xs=!1}catch{xs=!0}return xs}var Sv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(s){return s!=null&&!Sv.has(s)?(Vt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${js}"`),null):s}function Ev(s,r){let c,o,f,h,p;if(yv(s)){let E=s.getAttribute("action");o=E?dn(E,r):null,c=s.getAttribute("method")||bs,f=ac(s.getAttribute("enctype"))||js,h=new FormData(s)}else if(gv(s)||vv(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(o=x?dn(x,r):null,c=s.getAttribute("formmethod")||E.getAttribute("method")||bs,f=ac(s.getAttribute("formenctype"))||ac(E.getAttribute("enctype"))||js,h=new FormData(E,s),!jv()){let{name:g,type:j,value:v}=s;if(j==="image"){let N=g?`${g}.`:"";h.append(`${N}x`,"0"),h.append(`${N}y`,"0")}else g&&h.append(g,v)}}else{if(ws(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=bs,o=null,f=js,p=s}return h&&f==="text/plain"&&(p=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pc(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function jm(s,r,c,o){let f=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return c?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&dn(f.pathname,r)==="/"?f.pathname=`${Es(r)}/_root.${o}`:f.pathname=`${Es(f.pathname)}.${o}`,f}async function Tv(s,r){if(s.id in r)return r[s.id];try{let c=await import(s.module);return r[s.id]=c,c}catch(c){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _v(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 Nv(s,r,c){let o=await Promise.all(s.map(async f=>{let h=r.routes[f.route.id];if(h){let p=await Tv(h,c);return p.links?p.links():[]}return[]}));return Rv(o.flat(1).filter(_v).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Vh(s,r,c,o,f,h){let p=(x,g)=>c[g]?x.route.id!==c[g].route.id:!0,E=(x,g)=>{var j;return c[g].pathname!==x.pathname||((j=c[g].route.path)==null?void 0:j.endsWith("*"))&&c[g].params["*"]!==x.params["*"]};return h==="assets"?r.filter((x,g)=>p(x,g)||E(x,g)):h==="data"?r.filter((x,g)=>{var v;let j=o.routes[x.route.id];if(!j||!j.hasLoader)return!1;if(p(x,g)||E(x,g))return!0;if(x.route.shouldRevalidate){let N=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((v=c[0])==null?void 0:v.params)||{},nextUrl:new URL(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function wv(s,r,{includeHydrateFallback:c}={}){return kv(s.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function kv(s){return[...new Set(s)]}function Cv(s){let r={},c=Object.keys(s).sort();for(let o of c)r[o]=s[o];return r}function Rv(s,r){let c=new Set;return new Set(r),s.reduce((o,f)=>{let h=JSON.stringify(Cv(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function gc(){let s=y.useContext(Za);return pc(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Av(){let s=y.useContext(Ns);return pc(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var yc=y.createContext(void 0);yc.displayName="FrameworkContext";function vc(){let s=y.useContext(yc);return pc(s,"You must render this element inside a <HydratedRouter> element"),s}function zv(s,r){let c=y.useContext(yc),[o,f]=y.useState(!1),[h,p]=y.useState(!1),{onFocus:E,onBlur:x,onMouseEnter:g,onMouseLeave:j,onTouchStart:v}=r,N=y.useRef(null);y.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let w=M=>{M.forEach(F=>{p(F.isIntersecting)})},z=new IntersectionObserver(w,{threshold:.5});return N.current&&z.observe(N.current),()=>{z.disconnect()}}},[s]),y.useEffect(()=>{if(o){let w=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(w)}}},[o]);let G=()=>{f(!0)},D=()=>{f(!1),p(!1)};return c?s!=="intent"?[h,N,{}]:[h,N,{onFocus:Vl(E,G),onBlur:Vl(x,D),onMouseEnter:Vl(g,G),onMouseLeave:Vl(j,D),onTouchStart:Vl(v,G)}]:[!1,N,{}]}function Vl(s,r){return c=>{s&&s(c),c.defaultPrevented||r(c)}}function Mv({page:s,...r}){let c=Zy(),{router:o}=gc(),f=y.useMemo(()=>im(o.routes,s,o.basename),[o.routes,s,o.basename]);return f?c?y.createElement(Dv,{page:s,matches:f,...r}):y.createElement(Uv,{page:s,matches:f,...r}):null}function Ov(s){let{manifest:r,routeModules:c}=vc(),[o,f]=y.useState([]);return y.useEffect(()=>{let h=!1;return Nv(s,r,c).then(p=>{h||f(p)}),()=>{h=!0}},[s,r,c]),o}function Dv({page:s,matches:r,...c}){let o=fn(),{future:f}=vc(),{basename:h}=gc(),p=y.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let E=jm(s,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),x=!1,g=[];for(let j of r)typeof j.route.shouldRevalidate=="function"?x=!0:g.push(j.route.id);return x&&g.length>0&&E.searchParams.set("_routes",g.join(",")),[E.pathname+E.search]},[h,f.unstable_trailingSlashAwareDataRequests,s,o,r]);return y.createElement(y.Fragment,null,p.map(E=>y.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...c})))}function Uv({page:s,matches:r,...c}){let o=fn(),{future:f,manifest:h,routeModules:p}=vc(),{basename:E}=gc(),{loaderData:x,matches:g}=Av(),j=y.useMemo(()=>Vh(s,r,g,h,o,"data"),[s,r,g,h,o]),v=y.useMemo(()=>Vh(s,r,g,h,o,"assets"),[s,r,g,h,o]),N=y.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let w=new Set,z=!1;if(r.forEach(F=>{var U;let L=h.routes[F.route.id];!L||!L.hasLoader||(!j.some(J=>J.route.id===F.route.id)&&F.route.id in x&&((U=p[F.route.id])!=null&&U.shouldRevalidate)||L.hasClientLoader?z=!0:w.add(F.route.id))}),w.size===0)return[];let M=jm(s,E,f.unstable_trailingSlashAwareDataRequests,"data");return z&&w.size>0&&M.searchParams.set("_routes",r.filter(F=>w.has(F.route.id)).map(F=>F.route.id).join(",")),[M.pathname+M.search]},[E,f.unstable_trailingSlashAwareDataRequests,x,o,h,j,r,s,p]),G=y.useMemo(()=>wv(v,h),[v,h]),D=Ov(v);return y.createElement(y.Fragment,null,N.map(w=>y.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...c})),G.map(w=>y.createElement("link",{key:w,rel:"modulepreload",href:w,...c})),D.map(({key:w,link:z})=>y.createElement("link",{key:w,nonce:c.nonce,...z,crossOrigin:z.crossOrigin??c.crossOrigin})))}function Hv(...s){return r=>{s.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var Bv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bv&&(window.__reactRouterVersion="7.14.2")}catch{}function Lv({basename:s,children:r,unstable_useTransitions:c,window:o}){let f=y.useRef();f.current==null&&(f.current=xy({window:o,v5Compat:!0}));let h=f.current,[p,E]=y.useState({action:h.action,location:h.location}),x=y.useCallback(g=>{c===!1?E(g):y.startTransition(()=>E(g))},[c]);return y.useLayoutEffect(()=>h.listen(x),[h,x]),y.createElement(pv,{basename:s,children:r,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:c})}var Sm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=y.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:p,unstable_mask:E,state:x,target:g,to:j,preventScrollReset:v,viewTransition:N,unstable_defaultShouldRevalidate:G,...D},w){let{basename:z,navigator:M,unstable_useTransitions:F}=y.useContext(Mt),L=typeof j=="string"&&Sm.test(j),U=dm(j,z);j=U.to;let J=Py(j,{relative:f}),K=fn(),X=null;if(E){let te=dc(E,[],K.unstable_mask?K.unstable_mask.pathname:"/",!0);z!=="/"&&(te.pathname=te.pathname==="/"?z:Ht([z,te.pathname])),X=M.createHref(te)}let[ue,fe,He]=zv(o,D),Me=Vv(j,{replace:p,unstable_mask:E,state:x,target:g,preventScrollReset:v,relative:f,viewTransition:N,unstable_defaultShouldRevalidate:G,unstable_useTransitions:F});function Oe(te){r&&r(te),te.defaultPrevented||Me(te)}let ie=!(U.isExternal||h),$=y.createElement("a",{...D,...He,href:(ie?X:void 0)||U.absoluteURL||J,onClick:ie?Oe:r,ref:Hv(w,fe),target:g,"data-discover":!L&&c==="render"?"true":void 0});return ue&&!L?y.createElement(y.Fragment,null,$,y.createElement(Mv,{page:J})):$});Ce.displayName="Link";var qv=y.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:p,viewTransition:E,children:x,...g},j){let v=Wl(p,{relative:g.relative}),N=fn(),G=y.useContext(Ns),{navigator:D,basename:w}=y.useContext(Mt),z=G!=null&&Kv(v)&&E===!0,M=D.encodeLocation?D.encodeLocation(v).pathname:v.pathname,F=N.pathname,L=G&&G.navigation&&G.navigation.location?G.navigation.location.pathname:null;c||(F=F.toLowerCase(),L=L?L.toLowerCase():null,M=M.toLowerCase()),L&&w&&(L=dn(L,w)||L);const U=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let J=F===M||!f&&F.startsWith(M)&&F.charAt(U)==="/",K=L!=null&&(L===M||!f&&L.startsWith(M)&&L.charAt(M.length)==="/"),X={isActive:J,isPending:K,isTransitioning:z},ue=J?r:void 0,fe;typeof o=="function"?fe=o(X):fe=[o,J?"active":null,K?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let He=typeof h=="function"?h(X):h;return y.createElement(Ce,{...g,"aria-current":ue,className:fe,ref:j,style:He,to:p,viewTransition:E},typeof x=="function"?x(X):x)});qv.displayName="NavLink";var Gv=y.forwardRef(({discover:s="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:p=bs,action:E,onSubmit:x,relative:g,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:N,...G},D)=>{let{unstable_useTransitions:w}=y.useContext(Mt),z=Zv(),M=Jv(E,{relative:g}),F=p.toLowerCase()==="get"?"get":"post",L=typeof E=="string"&&Sm.test(E),U=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=()=>z(K||J.currentTarget,{fetcherKey:r,method:X,navigate:c,replace:f,state:h,relative:g,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:N});w&&c!==!1?y.startTransition(()=>ue()):ue()};return y.createElement("form",{ref:D,method:F,action:M,onSubmit:o?x:U,...G,"data-discover":!L&&s==="render"?"true":void 0})});Gv.displayName="Form";function Yv(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Em(s){let r=y.useContext(Za);return Ue(r,Yv(s)),r}function Vv(s,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x,unstable_useTransitions:g}={}){let j=ev(),v=fn(),N=Wl(s,{relative:p});return y.useCallback(G=>{if(bv(G,r)){G.preventDefault();let D=c!==void 0?c:Zl(v)===Zl(N),w=()=>j(s,{replace:D,unstable_mask:o,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x});g?y.startTransition(()=>w()):w()}},[v,j,N,c,o,f,r,s,h,p,E,x,g])}var Xv=0,Qv=()=>`__${String(++Xv)}__`;function Zv(){let{router:s}=Em("useSubmit"),{basename:r}=y.useContext(Mt),c=dv(),o=s.fetch,f=s.navigate;return y.useCallback(async(h,p={})=>{let{action:E,method:x,encType:g,formData:j,body:v}=Ev(h,r);if(p.navigate===!1){let N=p.fetcherKey||Qv();await o(N,c,p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:j,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:j,body:v,formMethod:p.method||x,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:c,flushSync:p.flushSync,viewTransition:p.viewTransition})},[o,f,r,c])}function Jv(s,{relative:r}={}){let{basename:c}=y.useContext(Mt),o=y.useContext(Xt);Ue(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Wl(s||".",{relative:r})},p=fn();if(s==null){h.search=p.search;let E=new URLSearchParams(h.search),x=E.getAll("index");if(x.some(j=>j==="")){E.delete("index"),x.filter(v=>v).forEach(v=>E.append("index",v));let j=E.toString();h.search=j?`?${j}`:""}}return(!s||s===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:Ht([c,h.pathname])),Zl(h)}function Kv(s,{relative:r}={}){let c=y.useContext(mm);Ue(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Em("useViewTransitionState"),f=Wl(s,{relative:r});if(!c.isTransitioning)return!1;let h=dn(c.currentLocation.pathname,o)||c.currentLocation.pathname,p=dn(c.nextLocation.pathname,o)||c.nextLocation.pathname;return Ss(f.pathname,p)!=null||Ss(f.pathname,h)!=null}const Tm=/^\/vault\/admin(?=\/|$)/,_m=/^\/vault\/([^/]+)\/admin(?=\/|$)/;function xc(){return typeof window>"u"?!1:Tm.test(window.location.pathname)}function Nm(){if(typeof window>"u"||xc())return null;const s=window.location.pathname.match(_m);if(!s)return null;try{return decodeURIComponent(s[1])}catch{return null}}function $v(){if(typeof window>"u")return"";const s=window.location.pathname;if(Tm.test(s))return"/vault/admin";const r=s.match(_m);return r?`/vault/${r[1]}/admin`:s==="/admin"||s.startsWith("/admin/")?"/admin":""}let Bn=null,Yt=null,sa=null,on=null,Xh=!1;const Fv=.8,Wv=1e3,Iv=3e4;function Pv(){if(typeof window>"u")return;const s=window.location.hash;if(!s||s.length<2)return;const r=new URLSearchParams(s.slice(1)),c=r.get("token");if(!c)return;Bn=c,Yt=null,r.delete("token");const o=r.toString(),f=o.length>0?`#${o}`:"",h=`${window.location.pathname}${window.location.search}${f}`;window.history.replaceState(null,"",h)}function bc(){return Bn}function e0(){Bn=null,Yt=null,on=null,ks()}async function Jl(s){if(typeof window>"u")return{kind:"network-error",message:"no window"};let r;try{r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:String(o)}}if(r.status===401||r.status===403||r.status===404)return{kind:"auth-required",status:r.status};if(!r.ok)return{kind:"network-error",message:`hub returned ${r.status}`};let c;try{c=await r.json()}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:"could not parse mint response"}}return typeof c.token!="string"||c.token.length===0?{kind:"network-error",message:"mint response missing token"}:(Bn=c.token,Yt=c.expires_at?t0(c.expires_at):null,on=s,wm(),l0(),{kind:"ok",token:c.token})}function t0(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function Ts(s){if(Bn){if(Yt===null||Yt>Date.now())return{kind:"ok",token:Bn};Bn=null,Yt=null,ks()}return Jl(s)}async function n0(s){typeof window>"u"||Bn||await Jl(s).catch(()=>{})}function wm(){if(ks(),Yt===null||on===null||typeof document<"u"&&document.visibilityState==="hidden")return;const s=Date.now(),r=Yt-s;if(r<=0)return;const c=Math.max(Math.floor(r*Fv),Wv);sa=setTimeout(()=>{a0()},c)}function ks(){sa!==null&&(clearTimeout(sa),sa=null)}async function a0(){if(sa=null,on===null)return;const s=await Jl(on);s.kind!=="ok"&&(typeof console<"u"&&console.warn("[vault-admin-spa] proactive token refresh failed; will retry once",s),sa=setTimeout(()=>{sa=null,on!==null&&Jl(on).catch(()=>{})},Iv))}function l0(){Xh||typeof document>"u"||(Xh=!0,document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ks();return}if(on!==null){if(Yt!==null&&Yt<=Date.now()){Jl(on).catch(()=>{});return}wm()}}))}class ce extends Error{constructor(r,c,o){super(c),this.status=r,this.errorType=o,this.name="HttpError"}}async function Re(s,r,c={}){let o=bc();if(!o){const g=await Ts(s);if(g.kind!=="ok")throw new ce(401,"no admin token — sign in to the hub to refresh");o=g.token}const{headers:f,...h}=c,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(r,{...h,headers:p(o)});if(E.status!==401)return E;e0();const x=await Ts(s);return x.kind!=="ok"?E:fetch(r,{...h,headers:p(x.token)})}async function km(){const s=await fetch("/vaults/list",{headers:{accept:"application/json"}});if(s.status===404)return[];if(!s.ok)throw new ce(s.status,`vaults/list fetch failed: ${s.status}`);return(await s.json()).vaults??[]}async function i0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function s0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function Cm(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function u0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/run-now`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function r0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/push-now`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function jc(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function c0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`,{method:"DELETE"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function o0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/device-code`,{method:"POST"});if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function d0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/poll`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({polling_id:r})});if(!c.ok&&c.status!==404)throw new ce(c.status,await We(c));return await c.json()}async function f0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/pat`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function Rm(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/installations`);if(!r.ok){const{message:c,errorType:o}=await Sc(r);throw new ce(r.status,c,o)}return await r.json()}async function Am(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/repos`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function h0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/create-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok){const{message:o,errorType:f}=await Sc(c);throw new ce(c.status,o,f)}return await c.json()}async function m0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/select-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function p0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(c.ok)return{attached:!1,job:await c.json()};if(c.status===409){const o=await c.text();let f,h=o;try{const p=JSON.parse(o);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 zm(s,f)};throw new ce(409,h,"concurrent_import")}throw new ce(c.status,await We(c))}async function zm(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import/${encodeURIComponent(r)}`);if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function g0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/transcription`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function y0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/transcription`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function v0(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`);if(!r.ok)throw new ce(r.status,await We(r));return await r.json()}async function x0(s,r){const c=await Re(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:r})});if(!c.ok)throw new ce(c.status,await We(c));return await c.json()}async function We(s){return(await Sc(s)).message}async function Sc(s){try{const r=await s.text(),c=JSON.parse(r),o=typeof c.error_type=="string"?c.error_type:void 0;if(c.error_description)return{message:c.error_description,errorType:o};if(c.message)return{message:c.message,errorType:o};if(c.error)return{message:c.error,errorType:o};if(r)return{message:r,errorType:o}}catch{}return{message:`${s.status} ${s.statusText}`}}function Mm(s){const r=s.split(".");if(r.length!==3)return null;try{const c=r[1].replace(/-/g,"+").replace(/_/g,"/"),o=c.length%4===0?"":"=".repeat(4-c.length%4),f=atob(c+o),h=JSON.parse(f);return h===null||typeof h!="object"?null:h}catch{return null}}function b0(s){if(!s)return[];const r=Mm(s);if(!r)return[];const c=r.scope;if(typeof c=="string"&&c.length>0)return c.split(/\s+/).filter(f=>f.length>0);const o=r.scopes;return Array.isArray(o)?o.filter(f=>typeof f=="string"&&f.length>0):[]}function Ec(s){return b0(bc()).includes(`vault:${s}:admin`)}function Om(){const s=bc();if(!s)return null;const r=Mm(s);if(!r)return null;const c=r.iss;return typeof c!="string"||c.length===0?null:c.replace(/\/$/,"")}let Xl=null,Ql=null;function j0(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function S0(){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(c){return{kind:"network-error",message:c instanceof Error?c.message:String(c)}}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 r;try{r=await s.json()}catch(c){return{kind:"network-error",message:c instanceof Error?c.message:"could not parse host-admin mint response"}}return typeof r.token!="string"||r.token.length===0?{kind:"network-error",message:"host-admin mint response missing token"}:(Xl=r.token,Ql=r.expires_at?j0(r.expires_at):null,{kind:"ok",token:r.token})}async function _s(){if(Xl){if(Ql===null||Ql>Date.now())return{kind:"ok",token:Xl};Xl=null,Ql=null}return S0()}function E0(){Xl=null,Ql=null}class Ln extends Error{constructor(r,c,o){super(c),this.status=r,this.disposition=o,this.name="HostAdminError"}}async function Il(s,r={}){let c;const o=await _s();if(o.kind!=="ok")throw Qh(o);c=o.token;const{headers:f,...h}=r,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(s,{...h,headers:p(c)});if(E.status!==401)return E;E0();const x=await _s();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 Kl(){if(typeof window>"u")return;const s=Om();window.location.href=s?`${s}/account/`:"/account/"}async function T0(){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 r;try{r=await s.json()}catch{return{kind:"no-hub"}}const c=Array.isArray(r.vaults)?r.vaults:[],o=[];for(const f of c){const h=f??{};typeof h.name=="string"&&o.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:o}}async function _0(s){var E,x;const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!r.ok)throw new Error(`vault-admin-token mint failed: ${r.status}`);const c=await r.json();if(typeof c.token!="string"||c.token.length===0)throw new Error("vault-admin-token mint returned no token");const o=await fetch(`/vault/${encodeURIComponent(s)}/.parachute/usage`,{headers:{accept:"application/json",authorization:`Bearer ${c.token}`}});if(!o.ok)throw new Error(`usage fetch failed: ${o.status}`);const f=await o.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 N0(s){if(!Number.isFinite(s)||s<0)return"0 B";if(s<1024)return`${Math.round(s)} B`;const r=s/1024;if(r<1024)return`${Math.round(r)} KB`;const c=r/1024;return c<1024?`${c.toFixed(1)} MB`:`${(c/1024).toFixed(1)} GB`}const w0=/^[a-z0-9_-]+$/,k0=new Set(["list","new","assets","admin"]);function C0(s){return s.length===0?null:w0.test(s)?s.length<2||s.length>32?"Vault names must be 2–32 characters long.":k0.has(s)?`"${s}" is a reserved name.`:null:"Lowercase letters, numbers, hyphens, and underscores only."}class rc extends Error{constructor(r,c,o){super(c),this.status=r,this.code=o,this.name="VaultsApiError"}}async function Dm(s){let r,c=`${s.status}`;try{const o=await s.json();typeof o.error=="string"&&(r=o.error),c=o.error_description??o.error??c}catch{}return new rc(s.status,c,r)}async function R0(s){const r=await Il("/vaults",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:s})});if(!r.ok)throw await Dm(r);const c=await r.json(),o={name:c.name,url:c.url,version:c.version,created:r.status===201};return c.token&&(o.token=c.token),c.token_guidance&&(o.tokenGuidance=c.token_guidance),o}async function A0(s){const r=await Il(`/vaults/${encodeURIComponent(s)}`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:s})});if(!r.ok)throw await Dm(r);const c=await r.json();return{name:c.name,cascade:c.cascade,warnings:c.warnings??[]}}const Zh=5e3,z0=3e4;function qn({vaultName:s,status:r,onRecovered:c,ensure:o,serverMessage:f}){const h=r===403,[p,E]=y.useState("probing");if(y.useEffect(()=>{if(h)return;let v=!1;return(async()=>{const N=await(o?o():Ts(s??""));v||E(N.kind==="ok"?"token-rejected":"signed-out")})(),()=>{v=!0}},[s,o,h]),y.useEffect(()=>{if(h||p==="probing")return;let v=!1,N=null;const G=p==="token-rejected"?z0:Zh,D=async()=>{if(v||typeof document<"u"&&document.visibilityState!=="visible")return;if(p==="token-rejected"){c(),N=setTimeout(()=>void D(),G);return}const z=await(o?o():Ts(s??""));if(!v){if(z.kind==="ok"){c();return}N=setTimeout(()=>void D(),G)}},w=()=>{typeof document>"u"||document.visibilityState==="visible"&&(N!==null&&(clearTimeout(N),N=null),D())};return N=setTimeout(()=>void D(),Zh),typeof document<"u"&&document.addEventListener("visibilitychange",w),()=>{v=!0,N!==null&&clearTimeout(N),typeof document<"u"&&document.removeEventListener("visibilitychange",w)}},[s,c,h,o,p]),h)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."})]});if(p==="token-rejected")return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"You're signed in, but this vault rejected the request."})," ","That's a problem on the server, not with your session — signing in again won't change it."]}),f?l.jsx("p",{className:"dim",style:{margin:"0 0 0.5rem",fontSize:"0.85rem",fontFamily:"var(--mono, monospace)"},children:f}):null,l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"Retrying every 30 seconds. If it persists, check the vault's logs — this usually means the vault can't reach the hub it validates tokens against."})]});const x=M0(),g=`/login?next=${encodeURIComponent(x)}`,j=r===404?"This hub doesn't host a vault by that name.":"You're not signed in to the hub.";return p==="probing"?l.jsx("div",{className:"warn-banner",role:"status",children:l.jsx("p",{style:{margin:0},children:"Checking your session…"})}):l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[j," ",l.jsx("a",{href:g,children:"Sign in to the hub →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"After signing in, this page will refresh automatically."})]})}function M0(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function O0(){const[s,r]=y.useState({kind:"loading"}),[c,o]=y.useState({kind:"checking"}),[f,h]=y.useState({}),[p,E]=y.useState({kind:"idle"}),[x,g]=y.useState(""),[j,v]=y.useState({kind:"idle"}),[N,G]=y.useState(0);y.useEffect(()=>{let L=!1;return T0().then(async U=>{if(!L){if(U.kind==="ok"){r({kind:"ok",vaults:U.vaults});return}if(U.kind==="no-hub"){const J=await km().catch(()=>[]);if(L)return;r({kind:"no-hub",names:J});return}r({kind:"error",message:U.message})}}),()=>{L=!0}},[N]),y.useEffect(()=>{if(s.kind!=="ok"||c.kind==="ok")return;let L=!1;return _s().then(U=>{L||(U.kind==="ok"?o({kind:"ok"}):U.kind==="forbidden"?o({kind:"banner",status:403}):U.kind==="auth-required"?o({kind:"banner",status:U.status}):o({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 U=!1;h(J=>{const K={...J};for(const X of L)K[X]||(K[X]={kind:"loading"});return K});for(const J of L)_0(J).then(K=>{U||h(X=>({...X,[J]:{kind:"ok",usage:K}}))}).catch(()=>{U||h(K=>({...K,[J]:{kind:"error"}}))});return()=>{U=!0}},[s]);const D=y.useCallback(()=>{o({kind:"ok"}),h({}),G(L=>L+1)},[]),w=C0(x);async function z(L){if(L.preventDefault(),!(x.length===0||w)){E({kind:"submitting"});try{const U=await R0(x);E({kind:"created",result:U}),g(""),G(J=>J+1)}catch(U){if(U instanceof Ln){if(U.disposition==="forbidden"){Kl();return}o({kind:"banner",status:U.status||null}),E({kind:"idle"});return}const J=U instanceof rc?`${U.status}: ${U.message}`:U instanceof Error?U.message:String(U);E({kind:"error",message:J})}}}async function M(L){v({kind:"deleting",name:L});try{const U=await A0(L);v({kind:"done",result:U}),h(J=>{const K={...J};return delete K[L],K}),G(J=>J+1)}catch(U){if(U instanceof Ln){if(U.disposition==="forbidden"){Kl();return}o({kind:"banner",status:U.status||null}),v({kind:"idle"});return}const J=U instanceof rc||U instanceof Error?U.message:String(U);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:()=>G(L=>L+1),children:"Retry"})]});const F=c.kind==="ok";return l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsxs("h2",{children:["Vaults (",s.vaults.length,")"]})}),c.kind==="banner"?l.jsx(qn,{status:c.status,onRecovered:D,ensure:_s}):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)."]}),j.kind==="done"?l.jsx(U0,{result:j.result,onDismiss:()=>v({kind:"idle"})}):null,s.vaults.length===0?l.jsxs("div",{className:"empty",children:["No vaults yet",F?" — create your first below.":"."]}):l.jsx("div",{style:{marginTop:"1rem"},children:s.vaults.map(L=>{const U=f[L.name],J=(U==null?void 0:U.kind)==="ok"?`${U.usage.notes} ${U.usage.notes===1?"note":"notes"} · ${N0(U.usage.totalBytes)}`:(U==null?void 0:U.kind)==="loading"?"…":"—",K=j.kind==="confirming"&&j.name===L.name,X=j.kind==="deleting"&&j.name===L.name,ue=j.kind==="error"&&j.name===L.name?j.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"})}),F?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&&j.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:j.typed,onChange:fe=>v({kind:"confirming",name:L.name,typed:fe.target.value})}),l.jsx("button",{type:"button",disabled:j.typed!==L.name,onClick:()=>void M(L.name),children:"Delete this vault"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Cancel"})]})]}):null]},L.name)})}),F?l.jsxs("div",{className:"section",style:{marginTop:"1.5rem"},children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Create a vault"}),p.kind==="created"?l.jsx(D0,{result:p.result,onDone:()=>E({kind:"idle"})}):l.jsxs("form",{onSubmit:L=>void z(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||!!w||p.kind==="submitting",children:p.kind==="submitting"?"Creating…":"Create vault"})]}),w?l.jsx("div",{className:"field-error",children:w}):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 D0({result:s,onDone:r}){const[c,o]=y.useState(!1),f=async()=>{if(s.token)try{await navigator.clipboard.writeText(s.token),o(!0),setTimeout(()=>o(!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"]}),", shown only this once."," ",s.tokenGuidance??"It is short-lived — don't bank it as a durable credential. You don't need it for the OAuth connect path."," ","For a durable header-auth token, 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:c?"Copied":"Copy"})]}),l.jsx("div",{className:"actions",style:{marginTop:"0.5rem"},children:l.jsx("button",{type:"button",onClick:r,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:r,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:r,children:"Continue"})]})}function U0({result:s,onDismiss:r}){const c=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:[c.tokens_revoked," token(s) revoked"]}),l.jsxs("li",{children:[c.grants_rewritten," grant(s) rewritten, ",c.grants_dropped," dropped"]}),l.jsxs("li",{children:[c.user_vaults_removed," user assignment(s) removed"]}),l.jsxs("li",{children:[c.invites_invalidated," invite(s) invalidated"]}),l.jsxs("li",{children:[c.connections_torn_down," connection(s) torn down"]}),l.jsxs("li",{children:["vault data ",c.vault_removed?"removed":"NOT removed","; module"," ",c.module_restarted?"restarted":"not restarted"]})]}),c.orphaned_channels.length>0?l.jsxs("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:["Orphaned channel(s) still reference this vault:"," ",c.orphaned_channels.map((o,f)=>l.jsxs("span",{children:[f>0?", ":"",l.jsx("code",{children:o})]},o))," ","— 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(o=>l.jsxs("div",{children:[l.jsx("code",{children:o.step}),": ",o.detail]},o.step))}):null,l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})]})}const H0="https://parachute.computer/install#connect-mcp-clients";function Um(s,r){return`${s.replace(/\/+$/,"")}/vault/${encodeURIComponent(r)}/mcp`}function B0(s,r){return`claude mcp add --transport http parachute-${r} ${Um(s,r)}`}function L0(){var s;return typeof window>"u"||!((s=window.location)!=null&&s.origin)?null:window.location.origin}function Jh({value:s,label:r="Copy"}){const[c,o]=y.useState(!1);return l.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(s).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function q0({vaultName:s,origin:r,tokensHref:c}){const o=r??L0(),f=o?Um(o,s):`/vault/${encodeURIComponent(s)}/mcp`,h=o?B0(o,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"," ",c?l.jsx(Ce,{to:c,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:H0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]})}function Kh({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/tokens":`/vault/${encodeURIComponent(c??"")}/tokens`,h=o?"/mirror":`/vault/${encodeURIComponent(c??"")}/mirror`,p=o?"/schema":`/vault/${encodeURIComponent(c??"")}/schema`,E=o?"/embeddings":`/vault/${encodeURIComponent(c??"")}/embeddings`,x=o?"/transcription":`/vault/${encodeURIComponent(c??"")}/transcription`,[g,j]=y.useState({kind:"loading"}),[v,N]=y.useState(0),G=y.useCallback(()=>N(z=>z+1),[]);if(y.useEffect(()=>{let z=!1;if(!c){j({kind:"missing"});return}return j({kind:"loading"}),i0(c).then(M=>{z||j({kind:"ok",vault:M})}).catch(M=>{if(z)return;if(M instanceof ce){if(M.status===401||M.status===403){j({kind:"auth-required",status:M.status,message:M.message});return}if(M.status===404){j({kind:"missing"});return}j({kind:"error",message:`${M.status}: ${M.message}`});return}const F=M instanceof Error?M.message:String(M);j({kind:"error",message:F})}),()=>{z=!0}},[c,v]),g.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(g.kind==="auth-required")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:c})]}),l.jsx(qn,{vaultName:c??"",status:g.status,serverMessage:g.message,onRecovered:G}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]});if(g.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:c})," is registered on this server."]}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]});if(g.kind==="error")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:c})]}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:g.message})}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]});const{vault:D}=g,w=`/vault/${D.name}`;return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:D.name})]}),o?null:l.jsx(Ce,{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:D.name})}),D.description?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Description"}),l.jsx("div",{children:D.description})]}):null,l.jsx("div",{children:"Mount"}),l.jsx("div",{children:l.jsx("code",{children:w})}),D.createdAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Created"}),l.jsx("div",{children:l.jsx("code",{children:D.createdAt})})]}):null]}),l.jsx("div",{className:"section",children:l.jsx(q0,{vaultName:D.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:D.stats.totalNotes})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Tags"}),l.jsx("div",{className:"value",children:D.stats.tagCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Attachments"}),l.jsx("div",{className:"value",children:D.stats.attachmentCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Links"}),l.jsx("div",{className:"value",children:D.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(Ce,{to:f,children:"Tokens →"}),l.jsx("span",{className:"dim",children:" mint, list, and revoke hub access tokens (JWTs)"})]}),l.jsxs("li",{children:[l.jsx(Ce,{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(Ce,{to:p,children:"Schema →"}),l.jsx("span",{className:"dim",children:" edit tag schemas — fields, indexing, hierarchy, strict validation"})]}),l.jsx("li",{children:l.jsx(Ce,{to:E,children:"Semantic search →"})}),l.jsxs("li",{children:[l.jsx(Ce,{to:x,children:"Transcription →"}),l.jsx("span",{className:"dim",children:" turn embeddings on or off — rank notes by meaning, not just keywords"})]}),l.jsx(G0,{vaultName:D.name})]})]})]})}function G0({vaultName:s}){const r=Om();if(!r)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 c=`${r}/hub/permissions?vault=${encodeURIComponent(s)}`;return l.jsxs("li",{children:[l.jsx("a",{href:c,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 r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;if(c)return p({kind:"loading"}),v0(c).then(v=>{j||p({kind:"ok",settings:v})}).catch(v=>{if(j)return;if(v instanceof ce&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{j=!0}},[c,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Semantic search for ",l.jsx("code",{children:c})]}),l.jsx(Ce,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(qn,{vaultName:c,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(Y0,{vaultName:c,settings:h.settings,onSettings:j=>p({kind:"ok",settings:j})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Semantic search"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]})}function Y0({vaultName:s,settings:r,onSettings:c}){const[o,f]=y.useState(r.enabled),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,j]=y.useState(!1),v=o!==r.enabled,N=y.useCallback(async()=>{p(!0),x(null),j(!1);try{const G=await x0(s,o);c(G),j(!0)}catch(G){x(G instanceof Error?G.message:String(G))}finally{p(!1)}},[s,o,c]);return l.jsxs("div",{children:[r.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:r.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,r.restart_required?l.jsxs("div",{className:"info-banner",role:"status",children:[g?"Saved. ":"","Semantic search is currently ",l.jsx("strong",{children:r.active?"active":"off"})," in the running vault, but the saved setting wants it ",l.jsx("strong",{children:r.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:r.active?"active":"off"}),"."]}):null,l.jsxs("div",{className:"section",children:[l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:o,disabled:h,onChange:G=>{f(G.target.checked),j(!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 (~",r.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:N,disabled:!v||h,children:h?"Saving…":o?"Enable semantic search":"Disable semantic search"})})]})}function Fh({command:s}){const[r,c]=y.useState(!1);return l.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",marginTop:"0.5rem"},children:[l.jsx("code",{style:{flex:1,padding:"0.5rem 0.65rem",background:"var(--bg-subtle, rgba(0,0,0,0.05))",borderRadius:4,fontSize:"0.9em",overflowX:"auto"},children:s}),l.jsx("button",{type:"button",onClick:()=>{var o;(o=navigator.clipboard)==null||o.writeText(s).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)},()=>{})},children:r?"Copied":"Copy"})]})}function Wh({vaultName:s}={}){const r=Ja(),c=s??r.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=y.useCallback(()=>x(z=>z+1),[]);y.useEffect(()=>{let z=!1;if(c)return p({kind:"loading"}),g0(c).then(M=>{z||p({kind:"ok",settings:M})}).catch(M=>{if(!z){if(M instanceof ce&&(M.status===401||M.status===403)){p({kind:"auth-required",status:M.status,message:M.message});return}p({kind:"error",message:M instanceof Error?M.message:String(M)})}}),()=>{z=!0}},[c,E]);const D=async z=>{if(c){j(!0),N(null);try{const M=await y0(c,z);p({kind:"ok",settings:M})}catch(M){N(M instanceof Error?M.message:String(M))}finally{j(!1)}}};if(h.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(h.kind==="auth-required")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx(qn,{vaultName:c??"",status:h.status,serverMessage:h.message,onRecovered:G}),l.jsx(Ce,{to:f,children:"← Back"})]});if(h.kind==="error")return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("div",{className:"error-banner",role:"alert",children:h.message}),l.jsx(Ce,{to:f,children:"← Back"})]});const w=h.settings;return l.jsxs("div",{children:[l.jsx("h2",{children:"Transcription"}),l.jsx("p",{className:"muted",children:"Turns voice recordings into text, locally — the audio never leaves this machine."}),w.ready&&w.active?l.jsxs("div",{className:"ok-banner",role:"status",children:[l.jsx("strong",{children:"Working."})," Audio you record is being transcribed",w.model?` with ${w.model.label}`:"","."]}):w.ready&&w.restart_required?l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"Ready, but not running yet."})," Everything needed is installed; the vault picked up its transcription setup at boot, so it needs a restart to use this."]}),l.jsx(Fh,{command:"parachute restart vault"})]}):l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"Not transcribing."})," Audio will still upload and be stored — it just won't be turned into text until this is set up."]}),w.reason?l.jsx("p",{className:"dim",style:{margin:"0 0 0.5rem",fontSize:"0.9em"},children:w.reason}):null,w.fix_command?l.jsx(Fh,{command:w.fix_command}):null]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.75rem",fontSize:"1rem",fontWeight:500},children:"What's on this machine"}),l.jsxs("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"auto 1fr",gap:"0.4rem 1rem"},children:[l.jsx("dt",{className:"dim",children:"Provider"}),l.jsx("dd",{style:{margin:0},children:l.jsx("code",{children:w.provider})}),l.jsx("dt",{className:"dim",children:w.binary.name}),l.jsx("dd",{style:{margin:0},children:w.binary.path?l.jsx("code",{children:w.binary.path}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"dim",children:"not found"}),l.jsxs("details",{style:{marginTop:"0.35rem"},children:[l.jsx("summary",{className:"dim",style:{fontSize:"0.85em"},children:"Where we looked"}),l.jsx("ul",{style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:w.binary.searched.map(z=>l.jsx("li",{children:l.jsx("code",{children:z})},z))}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:["Installed somewhere else? Set ",l.jsx("code",{children:"WHISPER_CPP_BIN_DIR"})," to that directory."]})]})]})}),l.jsx("dt",{className:"dim",children:"ffmpeg"}),l.jsx("dd",{style:{margin:0},children:w.ffmpeg.path?l.jsx("code",{children:w.ffmpeg.path}):l.jsx("span",{className:"dim",children:"not found — required, since recordings arrive as webm and have to be transcoded"})}),l.jsx("dt",{className:"dim",children:"Model"}),l.jsx("dd",{style:{margin:0},children:w.model?l.jsxs(l.Fragment,{children:[w.model.label," ",l.jsxs("span",{className:"dim",children:["(",w.model.size_mb," MB",w.model.installed?", downloaded":", not downloaded",")"]})]}):l.jsxs("span",{className:"dim",children:[l.jsx("code",{children:w.model_id})," isn't a known model"]})})]})]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.35rem",fontSize:"1rem",fontWeight:500},children:"Model"}),l.jsxs("p",{className:"dim",style:{margin:"0 0 0.75rem",fontSize:"0.9em"},children:["Bigger is more accurate and slower. Picking one here saves the choice — run"," ",l.jsx("code",{children:"parachute-vault transcription install"})," to download it."]}),v?l.jsx("div",{className:"error-banner",role:"alert",style:{marginBottom:"0.5rem"},children:v}):null,l.jsx("div",{style:{display:"grid",gap:"0.4rem"},children:w.available_models.map(z=>l.jsxs("label",{className:"radio-row",style:{display:"flex",gap:"0.6rem",alignItems:"flex-start"},children:[l.jsx("input",{type:"radio",name:"transcription-model",value:z.id,checked:z.id===w.model_id,disabled:g,onChange:()=>void D({model_id:z.id,provider:"whisper-cpp"}),style:{width:"auto",marginTop:"0.25rem"}}),l.jsxs("span",{children:[l.jsx("strong",{children:z.label})," ",l.jsxs("span",{className:"dim",children:["· ",z.size_mb," MB",z.installed?" · downloaded":""]}),l.jsx("br",{}),l.jsx("span",{className:"dim",style:{fontSize:"0.85em"},children:z.note})]})]},z.id))})]}),l.jsx("p",{style:{marginTop:"1.25rem"},children:l.jsx(Ce,{to:f,children:"← Back"})})]})}const V0=[{value:"events",label:"On change (default)"},{value:"manual",label:"Manual only"}],X0=[{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 Ih({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;if(c)return p({kind:"loading"}),s0(c).then(v=>{j||p({kind:"ok",snapshot:v})}).catch(v=>{if(j)return;if(v instanceof ce&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{j=!0}},[c,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Backup for ",l.jsx("code",{children:c})]}),l.jsx(Ce,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(qn,{vaultName:c,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:c,snapshot:h.snapshot,onRefresh:()=>x(j=>j+1),onSnapshot:j=>p({kind:"ok",snapshot:j})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Mirror"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]})}function Q0({vaultName:s,snapshot:r,onRefresh:c,onSnapshot:o}){const f=Ec(s),[h,p]=y.useState(null),[E,x]=y.useState(null);y.useEffect(()=>{if(!f)return;let v=!1;return jc(s).then(N=>{v||p(N)}).catch(N=>{v||x(N instanceof Error?N.message:String(N))}),()=>{v=!0}},[s,f]);const[g,j]=y.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(Z0,{status:r.status,config:r.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($0,{vaultName:s,creds:h,credsError:E,onCredsChanged:p,onCredsSaved:()=>{c()},onConfigChanged:c,locationIsExternal:r.config.location==="external"}):null,l.jsxs("div",{className:"section",children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>j(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(J0,{status:r.status,config:r.config,creds:h,canRun:f&&r.status.enabled,vaultName:s,onSnapshot:o}),l.jsx(K0,{vaultName:s,initial:r.config,readOnly:!f,creds:h,onSaved:v=>{o(v),c()}}),f?l.jsx(ix,{vaultName:s,creds:h}):null]}):null]})}function Z0({status:s,config:r,creds:c}){var p;if(!r.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 o=!!(c!=null&&c.active_method),f=r.auto_push&&o,h=(c==null?void 0:c.active_method)==="github_oauth"?(p=c.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 J0({status:s,config:r,creds:c,canRun:o,vaultName:f,onSnapshot:h}){const p=r.enabled,[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=async()=>{x(!0),N(null);try{const M=await u0(f);h(M)}catch(M){N(M instanceof Error?M.message:String(M))}finally{x(!1)}},D=async()=>{j(!0),N(null);try{const M=await r0(f);h(M)}catch(M){N(M instanceof Error?M.message:String(M))}finally{j(!1)}},w=!!(c!=null&&c.active_method)||r.auto_push,z=!o||g||!w;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:G,disabled:!o||E,title:p?o?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:D,disabled:z,title:p?o?w?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 K0({vaultName:s,initial:r,readOnly:c,creds:o,onSaved:f}){const[h,p]=y.useState(r),[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(null),[G,D]=y.useState(null),[w,z]=y.useState(0);y.useEffect(()=>{p(r)},[r]);const M=U=>{const J=U.apply(h);p(J)},F=U=>{p(J=>({...J,sync_mode:U}))},L=async U=>{if(U.preventDefault(),!c){j(!0),N(null),D(null);try{const J=await Cm(s,h);f(J),z(K=>K+1),setTimeout(()=>z(0),3e3)}catch(J){if(J instanceof ce){const K=J.message;N(K);const X=K.toLowerCase();X.includes("external_path")?D("external_path"):X.includes("commit_template")?D("commit_template"):X.includes("safety_net_seconds")?D("safety_net_seconds"):X.includes("sync_mode")?D("sync_mode"):X.includes("auto_push")?D("auto_push"):X.includes("location")?D("location"):D(null)}else N(J instanceof Error?J.message:String(J))}finally{j(!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:c,onChange:U=>p(J=>({...J,enabled:U.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:X0.map(U=>l.jsxs("button",{type:"button",className:"preset-card",disabled:c,onClick:()=>M(U),"aria-label":`Apply ${U.label} preset`,children:[l.jsx("strong",{children:U.label}),l.jsx("span",{className:"dim",children:U.subtext})]},U.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:c,onChange:()=>p(U=>({...U,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:c,onChange:()=>p(U=>({...U,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:c,onChange:U=>p(J=>({...J,external_path:U.target.value.length>0?U.target.value:null})),placeholder:"/Users/you/Documents/vault-mirror","aria-invalid":G==="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:c,onChange:U=>F(U.target.value),children:V0.map(U=>l.jsx("option",{value:U.value,children:U.label},U.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:c,onChange:U=>p(J=>({...J,auto_commit:U.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"||o!=null&&o.active_method?l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_push,disabled:c,onChange:U=>p(J=>({...J,auto_push:U.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?o!=null&&o.active_method?l.jsxs("div",{className:"info-banner",style:{marginTop:"0.5rem"},role:"status",children:[o.active_method==="github_oauth"&&o.github_oauth?l.jsxs(l.Fragment,{children:["Will push to ",l.jsxs("code",{children:["@",o.github_oauth.user_login]})," on GitHub."]}):o.active_method==="pat"&&o.pat?l.jsxs(l.Fragment,{children:["Will push using saved credential: ",l.jsx("code",{children:o.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(U=>!U),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:c,onChange:U=>p(J=>({...J,commit_template:U.target.value})),"aria-invalid":G==="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,w>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:c||g,children:g?"Saving…":"Save"})})]})}function $0({vaultName:s,creds:r,credsError:c,onCredsChanged:o,onCredsSaved:f,onConfigChanged:h,locationIsExternal:p}){var ve;const[E,x]=y.useState(!1),[g,j]=y.useState(!1),[v,N]=y.useState(!1),[G,D]=y.useState(!1),[w,z]=y.useState(null),[M,F]=y.useState(null),[L,U]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(null),[fe,He]=y.useState(null),[Me,Oe]=y.useState(0),ie=(r==null?void 0:r.active_method)==="github_oauth"&&!!r.github_oauth;y.useEffect(()=>{if(!ie){ue(null),He(null);return}let W=!1;return Rm(s).then(S=>{W||(ue(S),He(null))}).catch(S=>{W||He(S instanceof Error?S.message:String(S))}),()=>{W=!0}},[s,ie,Me]);const $=()=>Oe(W=>W+1),te=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,O=async()=>{if(confirm("Disconnect git remote credentials? Auto-push will stop working until you reconnect.")){D(!0),z(null);try{const W=await c0(s);o(W),U(null)}catch(W){z(W instanceof Error?W.message:String(W))}finally{D(!1)}}},Z=async()=>{K(!0),z(null);try{await Cm(s,{enabled:!0}),U(!0),h()}catch(W){z(W instanceof Error?W.message:String(W))}finally{K(!1)}},ne=()=>{x(!1),jc(s).then(W=>o(W)).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&&!(r!=null&&r.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,c?l.jsxs("div",{className:"error-banner",role:"alert",children:["Could not load credential status: ",l.jsx("code",{children:c})]}):null,te?l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"Status"}),l.jsx("div",{children:(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:["Connected to ",l.jsxs("code",{children:["@",r.github_oauth.user_login]})," on GitHub"]}):(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:["Custom credential: ",l.jsx("code",{children:r.pat.label})]}):null}),(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Token"}),l.jsxs("div",{children:[l.jsx("code",{children:r.github_oauth.token_preview})," ",l.jsxs("span",{className:"dim",children:["· scope ",r.github_oauth.scope||"—"," · authorized"," ",r.github_oauth.authorized_at.slice(0,10)]})]})]}):null,(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Remote"}),l.jsx("div",{children:l.jsx("code",{children:r.pat.remote_url})}),l.jsx("div",{children:"Token"}),l.jsx("div",{children:l.jsx("code",{children:r.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(Hm,{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(W=>l.jsxs("div",{children:[l.jsx("code",{children:W.account_login})," ",l.jsxs("span",{className:"dim",children:["(",W.account_type==="Organization"?"organization":"user"," ·"," ",W.repository_selection==="selected"?"Selected repos only":"All repos",")"]})]},W.id))})]}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>j(!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,w?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:w})}):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:()=>U(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,M?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Credentials saved."})," ",(()=>{const W=M,S=W.initial_push.fired&&W.initial_push.pushed?W.initial_push.sha:void 0,k=W.initial_push.fired&&!W.initial_push.pushed?W.initial_push.error:void 0;return W.auto_push_was_already_enabled?S?l.jsxs(l.Fragment,{children:["Auto-push was already on; just pushed"," ",l.jsx("code",{children:S.slice(0,10)}),"."]}):k?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."}):W.auto_push_enabled?S?l.jsxs(l.Fragment,{children:["Auto-push enabled and the first push landed"," ",l.jsx("code",{children:S.slice(0,10)}),". Your next commit will push to the remote too."]}):k?l.jsx(l.Fragment,{children:"Auto-push enabled. The initial push attempt failed — see Advanced settings → Status for the error."}):l.jsx(l.Fragment,{children:"Auto-push enabled. Your next commit will push to the remote."}):l.jsx(l.Fragment,{children:"Credentials wired. Auto-push remains off; flip it on in Advanced settings → Configuration to push commits automatically."})})()," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>F(null),style:{marginLeft:"0.5rem"},"aria-label":"Dismiss",children:"Dismiss"})]}):null,l.jsx("div",{className:"actions",children:te?l.jsx("button",{type:"button",className:"secondary",onClick:O,disabled:G,children:G?"Disconnecting…":"Disconnect"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>N(!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(F0,{install:X}),E?l.jsx(Ph,{vaultName:s,mode:"connect",onClose:ne,onHistory:U,onConnected:(W,S)=>{o(W),S&&(F(S),f(S)),x(!1)}}):null,g&&ie?l.jsx(Ph,{vaultName:s,mode:"choose-repo",initialLogin:((ve=r==null?void 0:r.github_oauth)==null?void 0:ve.user_login)??"",onClose:()=>j(!1),onHistory:U,onConnected:(W,S)=>{o(W),S&&(F(S),f(S)),j(!1)}}):null,v?l.jsx(tx,{vaultName:s,onClose:()=>N(!1),onSaved:W=>{o(W),F(W),U(W.history_enabled),f(W),N(!1)}}):null]})}function Hm({install:s,onRecheck:r}){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:r,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 F0({install:s}){const[r,c]=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:()=>c(o=>!o),"aria-expanded":r,children:r?"Hide":"Use your own GitHub App"})]}),r?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 Ph({vaultName:s,mode:r,initialLogin:c,onClose:o,onConnected:f,onHistory:h}){const[p,E]=y.useState(r==="choose-repo"?{kind:"probing",user:{login:c??""}}:{kind:"starting"}),[x,g]=y.useState(Date.now()),j=y.useRef(!1),v=p.kind==="polling";y.useEffect(()=>{if(!v)return;const w=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(w)},[v]),y.useEffect(()=>()=>{j.current=!0},[]),y.useEffect(()=>{if(p.kind!=="starting")return;let w=!1;return o0(s).then(z=>{w||E({kind:"polling",code:z,pollIntervalMs:Math.max(z.interval,1)*1e3,startedAt:Date.now()})}).catch(z=>{w||E({kind:"error",message:z instanceof Error?z.message:String(z)})}),()=>{w=!0}},[p.kind,s]),y.useEffect(()=>{if(p.kind!=="polling")return;j.current=!1;const w=p.code;let z=!1,M=null,F=p.pollIntervalMs;const L=async()=>{if(!(z||j.current))try{const U=await d0(s,w.polling_id);if(z)return;if(U.state==="granted"){h(U.history_enabled),E({kind:"probing",user:{login:U.user.login}});return}if(U.state==="denied"){E({kind:"error",message:"Authorization denied."});return}if(U.state==="expired"){E({kind:"error",message:"The device code expired. Try again."});return}U.state==="slow_down"&&(F=U.interval*1e3),M=setTimeout(L,F)}catch(U){if(z)return;E({kind:"error",message:U instanceof Error?U.message:String(U)})}};return M=setTimeout(L,F),()=>{z=!0,M&&clearTimeout(M)}},[p,s,h]),y.useEffect(()=>{if(p.kind!=="probing")return;const w=p.user;let z=!1;return Rm(s).then(M=>{z||E(M.installed?{kind:"picker",user:w,install:M}:{kind:"install-needed",user:w,install:M})}).catch(M=>{z||E({kind:"error",message:M instanceof Error?M.message:String(M)})}),()=>{z=!0}},[p,s]);const N=y.useCallback(w=>E({kind:"error",message:w}),[]),G=y.useCallback(()=>{E(w=>w.kind==="picker"?{kind:"probing",user:w.user}:w)},[]),D=async w=>{try{await navigator.clipboard.writeText(w)}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:r==="choose-repo"?"Choose a repository":"Connect GitHub"}),l.jsx("button",{type:"button",className:"secondary",onClick:o,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:()=>D(p.code.user_code),children:"Copy"})]}),l.jsxs("p",{className:"dim",children:["Waiting for authorization…"," ",W0(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(Hm,{install:p.install,onRecheck:()=>E({kind:"probing",user:p.user})}):null,p.kind==="picker"?l.jsx(P0,{vaultName:s,user:p.user,install:p.install,onPicked:async(w,z)=>{const M=await m0(s,{owner:w,name:z});h(M.history_enabled);const F=await jc(s);f(F,M)},onError:N,onNotInstalled:G}):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(r==="choose-repo"?{kind:"probing",user:{login:c??""}}:{kind:"starting"}),children:"Try again"}),l.jsx("button",{type:"button",className:"secondary",onClick:o,children:"Close"})]})]}):null]})})}function W0(s,r,c){const o=Math.floor((c-r)/1e3),f=Math.max(0,s-o),h=Math.floor(f/60),p=f%60;return`${h}:${String(p).padStart(2,"0")} remaining`}function I0(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 P0({vaultName:s,user:r,install:c,onPicked:o,onError:f,onNotInstalled:h}){const[p,E]=y.useState(null),[x,g]=y.useState(!1),[j,v]=y.useState(""),[N,G]=y.useState(null),[D,w]=y.useState(!1),[z,M]=y.useState(""),[F,L]=y.useState(!1),[U,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($=>j.length===0?!0:$.full_name.toLowerCase().includes(j.toLowerCase())),fe=[];for(const $ of ue){const te=fe[fe.length-1];if(te&&te.login===$.account_login)te.repos.push($);else{const O=fe.find(Z=>Z.login===$.account_login);O?O.repos.push($):fe.push({login:$.account_login,repos:[$]})}}const He=$=>c.installations.find(te=>te.account_login===$),Me=async($,te)=>{G(`${$}/${te}`);try{await o($,te)}catch(O){f(O instanceof Error?O.message:String(O))}finally{G(null)}},Oe=async()=>{if(z.trim().length!==0){w(!0);try{const $=await h0(s,{name:z.trim(),description:"Parachute Vault mirror",private:!0});await o($.owner,$.name)}catch($){$ instanceof ce&&$.errorType==="app_lacks_admin_permission"?J(!0):f($ instanceof Error?$.message:String($))}finally{w(!1)}}},ie=c.app.is_shared_default||U;return l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:["Authorized as ",l.jsxs("code",{children:["@",r.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:j,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&&j.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',j,'".']}):null,ue.length===0&&j.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(O=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>Me(O.owner,O.name),disabled:N!==null,children:[l.jsxs("span",{children:[l.jsx("strong",{children:O.name}),O.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:O.updated_at.slice(0,10)})]},O.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:c.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]}),F?l.jsxs("div",{className:"form-row",style:{marginTop:"0.75rem"},children:[l.jsx("label",{htmlFor:"new-repo-name",children:"New repo name"}),l.jsx("input",{id:"new-repo-name",type:"text",value:z,placeholder:"my-vault-backup",onChange:$=>M($.target.value)}),ie?l.jsx(ex,{install:c,suggestedName:z.trim(),onRefresh:()=>X($=>$+1)}):l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:Oe,disabled:D||z.trim().length===0,children:D?"Creating…":"Create"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!1),disabled:D,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 ex({install:s,suggestedName:r,onRefresh:c}){const o=r.length>0?`https://github.com/new?name=${encodeURIComponent(r)}`:"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:o,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:I0(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:c,children:"Refresh list"})," ","— then pick it."]})]})]})}function tx({vaultName:s,onClose:r,onSaved:c}){const[o,f]=y.useState(""),[h,p]=y.useState(""),[E,x]=y.useState(""),[g,j]=y.useState(!1),[v,N]=y.useState(null),G=async D=>{D.preventDefault(),j(!0),N(null);try{const w=await f0(s,{token:o.trim(),remote_url:h.trim(),label:E.trim()||void 0});c(w)}catch(w){N(w instanceof Error?w.message:String(w))}finally{j(!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:r,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:G,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:o,autoComplete:"off",onChange:D=>f(D.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:D=>p(D.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:D=>x(D.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:r,disabled:g,children:"Cancel"})]})]})]})})}const nx=1500,ax={cloning:"Cloning the repo…",importing:"Importing notes into this vault…",syncing:"Setting up sync back to this repo…"};function lx(s){const r=Math.max(0,Math.floor(s/1e3)),c=Math.floor(r/60),o=r%60;return c>0?`${c}m ${o}s`:`${o}s`}function ix({vaultName:s,creds:r}){const[c,o]=y.useState(""),[f,h]=y.useState("merge"),[p,E]=y.useState(!1),[x,g]=y.useState(""),[j,v]=y.useState(!1),[N,G]=y.useState({kind:"idle"}),[D,w]=y.useState(""),[z,M]=y.useState(!1),F=(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth!==null,L=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,U=f!=="replace"||D.trim()===s,J=N.kind!=="running"&&c.trim().length>0&&U&&(!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 p0(s,{remote_url:c.trim(),mode:f,credentials:ie,enable_sync:j});G({kind:"running",stage:$.stage,detail:$.detail,jobId:$.job_id,startedAt:Date.parse($.started_at)||Date.now()})}catch($){const te=$ instanceof Error?$.message:String($);G({kind:"error",message:te})}},[X,ue]=y.useState(0),fe=N.kind==="running"?N.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=N.kind,Me=N.kind==="running"?N.jobId:null;y.useEffect(()=>{if(He!=="running"||!Me)return;let ie=!1,$=null;const te=async()=>{var O;if(!ie){try{const Z=await zm(s,Me);if(ie)return;if(Z.status==="running")G({kind:"running",stage:Z.stage,detail:Z.detail,jobId:Me,startedAt:fe});else if(Z.status==="succeeded"&&Z.result){G({kind:"success",result:Z.result,remoteUrl:c.trim(),mode:f});return}else{G({kind:"error",message:((O=Z.error)==null?void 0:O.message)??"The import failed for an unknown reason."});return}}catch(Z){if(ie)return;if(Z instanceof ce&&Z.status===404){G({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(),nx)}};return te(),()=>{ie=!0,$!==null&&window.clearTimeout($)}},[He,Me,s]);const Oe=()=>{G({kind:"idle"}),w("")};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."]}),N.kind==="success"?l.jsx(sx,{vaultName:s,result:N.result,remoteUrl:N.remoteUrl,mode:N.mode,onReset:Oe}):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:c,placeholder:"https://github.com/aaron/my-vault.git",onChange:ie=>o(ie.target.value),disabled:N.kind==="running"}),F?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:["Or"," ",l.jsx("button",{type:"button",onClick:()=>M(!0),disabled:N.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"),w("")},disabled:N.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:N.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:D,placeholder:s,onChange:ie=>w(ie.target.value),disabled:N.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:N.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:N.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:j,onChange:ie=>v(ie.target.checked),disabled:N.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:j?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."]})})]}),N.kind==="error"?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:N.message})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:K,disabled:!J,title:U?c.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:N.kind==="running"?"Importing…":"Start import"})}),N.kind==="running"?l.jsxs("div",{className:"form-row","aria-live":"polite",children:[l.jsxs("p",{style:{margin:"0 0 0.25rem"},children:[ax[N.stage]," ",l.jsxs("span",{className:"dim",children:["(",lx(X),")"]})]}),N.detail?l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85em",fontFamily:"var(--mono, monospace)"},children:N.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]}),z?l.jsx(ux,{vaultName:s,onClose:()=>M(!1),onPicked:ie=>{o(ie),M(!1)}}):null]})}function sx({vaultName:s,result:r,remoteUrl:c,mode:o,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 ",r.notes_imported," note",r.notes_imported===1?"":"s",", ",r.tags_imported," tag schema",r.tags_imported===1?"":"s",", ",r.attachments_imported," ","attachment",r.attachments_imported===1?"":"s",o==="replace"&&r.notes_deleted!==void 0?`, wiped ${r.notes_deleted} pre-existing note${r.notes_deleted===1?"":"s"}`:"","."]}),r.warnings.length>0?l.jsxs("details",{style:{marginBottom:"0.75rem"},children:[l.jsxs("summary",{children:[r.warnings.length," warning",r.warnings.length===1?"":"s"," ","(see details)"]}),l.jsx("ul",{style:{marginTop:"0.5rem"},children:r.warnings.map((h,p)=>l.jsx("li",{children:l.jsx("code",{style:{fontSize:"0.85em"},children:h})},p))})]}):null,r.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:c})," automatically."]}):r.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."})," ",r.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 ux({vaultName:s,onClose:r,onPicked:c}){const[o,f]=y.useState(null),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,j]=y.useState(""),[v,N]=y.useState(null);y.useEffect(()=>{let D=!1;return Am(s).then(w=>{if(!D){if(!w.installed){x(w.install_url),f([]);return}f(w.repos),p(!!w.truncated)}}).catch(w=>{D||N(w instanceof Error?w.message:String(w))}),()=>{D=!0}},[s]);const G=(o??[]).filter(D=>g.length===0?!0:D.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:r,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:D=>j(D.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,o===null&&!v?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,o!==null?l.jsxs("div",{className:"repo-list",children:[G.length===0&&g.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',g,'".']}):null,G.length===0&&g.length===0&&o.length===0&&!E?l.jsx("p",{className:"dim",children:"The app installation doesn't include any repos."}):null,G.map(D=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>c(D.clone_url),children:[l.jsxs("span",{children:[l.jsx("strong",{children:D.name}),D.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:D.updated_at.slice(0,10)})]},D.full_name))]}):null]})})}const rx=["string","integer","number","boolean","array","object","reference"],cc=new Set(["string","integer","boolean","reference"]),Pl=s=>`/vault/${encodeURIComponent(s)}/api/tags`;async function ei(s){try{const r=await s.text(),c=JSON.parse(r);return c.message||c.error||r||`${s.status}`}catch{return`${s.status} ${s.statusText}`}}async function cx(s){const r=await Re(s,`${Pl(s)}?include_schema=true`);if(!r.ok)throw new ce(r.status,await ei(r));return await r.json()}async function ox(s,r){const c=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}`);if(c.status===404)return null;if(!c.ok)throw new ce(c.status,await ei(c));return await c.json()}async function dx(s,r){const c=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}/effective`);if(!c.ok)throw new ce(c.status,await ei(c));return await c.json()}async function fx(s,r,c){const o=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new ce(o.status,await ei(o));return await o.json()}async function hx(s,r,c){const o=await Re(s,`${Pl(s)}/${encodeURIComponent(r)}/conformance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fields:c})});if(!o.ok)throw new ce(o.status,await ei(o));return await o.json()}function em({vaultName:s}={}){const r=Ja(),c=s??r.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,j]=y.useState(null);y.useEffect(()=>{let G=!1;if(c)return p({kind:"loading"}),cx(c).then(D=>{G||p({kind:"ok",tags:D})}).catch(D=>{if(!G){if(D instanceof ce&&(D.status===401||D.status===403)){p({kind:"auth-required",status:D.status});return}p({kind:"error",message:D instanceof Error?D.message:String(D)})}}),()=>{G=!0}},[c,E]);const v=y.useCallback(()=>x(G=>G+1),[]),N=y.useCallback(()=>x(G=>G+1),[]);return c?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Schema for ",l.jsx("code",{children:c})]}),l.jsx(Ce,{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(qn,{vaultName:c,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(px,{tags:h.tags,selected:g,onSelect:j}),g?l.jsx(xx,{vaultName:c,tag:g,allTags:h.tags,onSaved:N},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 mx(s){const r=s.fields??{},c=Object.values(r);return{hasSchema:s.description!==null&&s.description!==void 0||c.length>0,indexed:c.filter(o=>o.indexed===!0).length,strict:c.some(o=>o.strict===!0)}}function px({tags:s,selected:r,onSelect:c}){const o=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:[o.map(f=>{const h=mx(f);return l.jsx("li",{children:l.jsxs("button",{type:"button",className:`tag-list-item${r===f.name?" selected":""}`,onClick:()=>c(f.name),"aria-current":r===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)}),o.length===0?l.jsx("li",{className:"muted",children:"No tags yet."}):null]})})}let gx=0;function Bm(){return`row-${gx++}`}function yx(s){return s?Object.entries(s).map(([r,c])=>({key:Bm(),name:r,spec:{...c}})):[]}function tm(s){const r={};for(const c of s){const o=c.name.trim();if(!o)continue;const f={};c.spec.type&&(f.type=c.spec.type),c.spec.enum&&c.spec.enum.length>0&&(f.enum=c.spec.enum),c.spec.required&&(f.required=!0),c.spec.cardinality==="many"&&(f.cardinality="many"),c.spec.indexed&&(f.indexed=!0),c.spec.strict&&(f.strict=!0),c.spec.description&&c.spec.description.trim().length>0&&(f.description=c.spec.description.trim()),r[o]=f}return r}const vx=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;function xx({vaultName:s,tag:r,allTags:c,onSaved:o}){const f=Ec(s),[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let j=!1;return p({kind:"loading"}),Promise.all([ox(s,r),dx(s,r)]).then(([v,N])=>{if(j)return;p({kind:"ok",record:v??{name:r,count:0,description:null,fields:null,relationships:null,parent_names:null,created_at:null,updated_at:null},effective:N})}).catch(v=>{if(!j){if(v instanceof ce&&(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)})}}),()=>{j=!0}},[s,r,E]);const g=y.useCallback(()=>x(j=>j+1),[]);return h.kind==="loading"?l.jsx("div",{className:"schema-detail",children:l.jsxs("p",{className:"muted",children:["Loading ",r,"…"]})}):h.kind==="auth-required"?l.jsx("div",{className:"schema-detail",children:l.jsx(qn,{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(bx,{vaultName:s,tag:r,record:h.record,effective:h.effective,allTags:c,isAdmin:f,onSaved:()=>{x(j=>j+1),o()}})}function bx({vaultName:s,tag:r,record:c,effective:o,allTags:f,isAdmin:h,onSaved:p}){const[E,x]=y.useState(c.description??""),[g,j]=y.useState(()=>yx(c.fields)),[v,N]=y.useState(c.parent_names??[]),[G,D]=y.useState(!1),[w,z]=y.useState(null),[M,F]=y.useState(0),[L,U]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(!1),fe=y.useMemo(()=>{const k=new Map;for(const V of o.indexed_fields)k.set(V.name,V);return k},[o.indexed_fields]),He=y.useMemo(()=>f.map(k=>k.name).filter(k=>k!==r).sort((k,V)=>k.localeCompare(V)),[f,r]),Me=y.useMemo(()=>{var Q;const k=new Map(f.map(ae=>[ae.name,ae])),V=[];for(const ae of v){const se=k.get(ae);(Q=se==null?void 0:se.parent_names)!=null&&Q.includes(r)&&V.push(ae)}return V},[v,f,r]),Oe=y.useMemo(()=>{const k=new Set(Object.entries(c.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(!k.has(Q))return!0;for(const Q of k)if(!V.has(Q))return!0;return!1},[g,c.fields]),ie=y.useMemo(()=>_x(g),[g]),$=()=>{U(null),ue(!1)},te=(k,V,Q)=>{j(ae=>ae.map(se=>se.key===k?{...se,name:Q!==void 0?Q:se.name,spec:{...se.spec,...V}}:se)),$()},O=()=>{j(k=>[...k,{key:Bm(),name:"",spec:{type:"string"}}]),$()},Z=k=>{j(V=>V.filter(Q=>Q.key!==k)),$()},ne=k=>{N(V=>V.includes(k)?V.filter(Q=>Q!==k):[...V,k]),$()},ve=async()=>{D(!0),z(null);try{const k=tm(g);await fx(s,r,{description:E.trim().length>0?E.trim():null,fields:Object.keys(k).length>0?k:null,replace_fields:!0,parent_names:v.length>0?v:null}),F(V=>V+1),$(),setTimeout(()=>F(0),3e3),p()}catch(k){k instanceof ce?z(k.message):z(k instanceof Error?k.message:String(k))}finally{D(!1)}},W=async k=>{if(k.preventDefault(),!!h){if(ie.length>0){z(ie[0]);return}if(z(null),L&&L.violating_notes>0||X){await ve();return}K(!0);try{const V=tm(g),Q=await hx(s,r,V);if(Q.violating_notes>0){U(Q);return}$(),await ve()}catch(V){z(`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.`),U(null),ue(!0)}finally{K(!1)}}},S=!h;return l.jsxs("form",{className:"schema-detail",onSubmit:W,children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:l.jsx("code",{children:r})}),l.jsxs("span",{className:"dim",children:[c.count," note",c.count===1?"":"s"]})]}),S?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:S,rows:2,onChange:k=>{x(k.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(k=>{var V;return l.jsx(jx,{row:k,readOnly:S,coDeclarers:k.spec.indexed?(((V=fe.get(k.name.trim()))==null?void 0:V.tags)??[]).filter(Q=>Q!==r):[],onChange:(Q,ae)=>te(k.key,Q,ae),onRemove:()=>Z(k.key)},k.key)}),S?null:l.jsx("button",{type:"button",className:"secondary",onClick:O,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:r})," 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(k=>l.jsxs("label",{className:"parent-chip",children:[l.jsx("input",{type:"checkbox",checked:v.includes(k),disabled:S,onChange:()=>ne(k)}),l.jsx("code",{children:k})]},k))}),Me.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginTop:"0.5rem"},children:["Cycle warning: ",l.jsx("code",{children:Me.join(", ")})," already list(s) ",l.jsx("code",{children:r})," as a parent. A cycle is tolerated at runtime but is almost always a config bug."]}):null]}),l.jsx(Sx,{tag:r,effective:o}),l.jsx(Ex,{catalog:o.indexed_fields,tag:r}),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(k=>l.jsx("li",{children:k},k))})]}):null,Oe&&!S?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(Tx,{report:L,tag:r}):null,w?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:w})}):null,M>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:S||G||J,children:G?"Saving…":J?"Checking existing notes…":L&&L.violating_notes>0||X?"Save anyway":"Save"})})]})}function jx({row:s,readOnly:r,coDeclarers:c,onChange:o,onRemove:f}){const{name:h,spec:p}=s,E=cc.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:r,placeholder:"field_name",onChange:g=>o({},g.target.value)}),l.jsxs("select",{"aria-label":"Field type",value:p.type??"",disabled:r,onChange:g=>{const j=g.target.value||void 0,v={type:j};j&&!cc.has(j)&&(v.indexed=!1),o(v)},children:[l.jsx("option",{value:"",children:"(any)"}),rx.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:r,onChange:g=>o({required:g.target.checked})}),"required"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.cardinality==="many",disabled:r,onChange:g=>o({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:r||!E,onChange:g=>o({indexed:g.target.checked})}),"indexed"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.strict===!0,disabled:r,onChange:g=>o({strict:g.target.checked})}),"strict"]}),r?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:r,placeholder:"enum values (comma-separated, optional)",onChange:g=>{const j=g.target.value.split(",").map(v=>v.trim()).filter(v=>v.length>0);o({enum:j})}}),l.jsx("input",{"aria-label":"Field description",type:"text",className:"field-desc-input",value:p.description??"",disabled:r,placeholder:"description (optional)",onChange:g=>o({description:g.target.value})})]}),c.length>0?l.jsxs("p",{className:"dim field-codeclarers",children:["Also indexed by: ",c.map(g=>l.jsx("code",{children:g},g)),". Type + indexed are global across all of these — change them together."]}):null]})}function Sx({tag:s,effective:r}){const c=new Set(Object.keys(r.fields??{})),o=Object.entries(r.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)"}),r.effective_parents.length>0?l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Inherits from: ",r.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."]}),o.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:o.map(([f,h])=>{const p=!c.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 Ex({catalog:s,tag:r}){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(c=>l.jsxs("tr",{className:c.tags.includes(r)?"row-this-tag":void 0,children:[l.jsx("td",{children:l.jsx("code",{children:c.name})}),l.jsx("td",{children:c.type}),l.jsx("td",{children:c.tags.map(o=>l.jsx("code",{className:o===r?"tag-self":void 0,children:o},o))})]},c.name))})]})]})}function Tx({report:s,tag:r}){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 ",r," <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(c=>l.jsxs("li",{children:[l.jsx("code",{children:c.path??c.id}),": ",c.fields.map(o=>o.reason).join(", ")]},c.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 _x(s){const r=[],c=new Set;for(const o of s){const f=o.name.trim();if(f){if(c.has(f)){r.push(`Duplicate field name "${f}".`);continue}c.add(f),o.spec.indexed&&!vx.test(f)&&r.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).`),o.spec.indexed&&o.spec.type&&!cc.has(o.spec.type)&&r.push(`"${f}" is indexed but type "${o.spec.type}" can't be indexed (use string / integer / boolean).`)}}return r}const Nx=[30,90,180,365],nm=90,wx=1440*60;function kx(s){if(!s)return null;const r=s.scoped_tags;if(!Array.isArray(r))return null;const c=r.filter(o=>typeof o=="string"&&o.length>0);return c.length>0?c:null}function Cx(s){return{jti:s.jti,label:s.subject,scopes:Array.isArray(s.scopes)?s.scopes:[],scoped_tags:kx(s.permissions),expires_at:s.expires_at??null,revoked_at:s.revoked_at??null,created_at:s.created_at}}async function Rx(s,r){const c={scope:`vault:${s}:${r.verb}`,expires_in:r.ttlDays*wx,subject:r.label};r.scopedTags.length>0&&(c.permissions={scoped_tags:r.scopedTags});const o=await Il("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)});if(!o.ok)throw new ce(o.status,await Cs(o));const f=await o.json();return{jti:f.jti,token:f.token,scope:f.scope,expires_at:f.expires_at??null}}async function Ax(s){const r=`vault:${s}:`,c=[];let o=null;for(let f=0;f<1e3;f++){const h=new URLSearchParams({revoked:"all"});o&&h.set("cursor",o);const p=await Il(`/api/auth/tokens?${h.toString()}`);if(!p.ok)throw new ce(p.status,await Cs(p));const E=await p.json(),x=Array.isArray(E.tokens)?E.tokens:[];if(c.push(...x),o=E.next_cursor??null,!o)break}return c.filter(f=>Array.isArray(f.scopes)&&f.scopes.some(h=>h.startsWith(r))).map(Cx)}async function zx(s){const r=await Il("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jti:s})});if(!r.ok)throw new ce(r.status,await Cs(r))}async function Mx(s){const r=await Re(s,`/vault/${encodeURIComponent(s)}/api/tags`);if(!r.ok)throw new ce(r.status,await Cs(r));const c=await r.json();return Array.isArray(c)?c:[]}async function Cs(s){try{const r=await s.text(),c=JSON.parse(r);if(c.error_description)return c.error_description;if(c.message)return c.message;if(c.error)return c.error;if(r)return r}catch{}return`${s.status} ${s.statusText}`}const Ox=["read","write","admin"],Dx={30:"30 days",90:"90 days",180:"180 days",365:"1 year (max)"};function Ux(s){return s instanceof Ln?s.disposition==="forbidden"?(Kl(),{kind:"auth-required",status:403}):s.disposition==="auth-required"?{kind:"auth-required",status:s.status}:{kind:"error",message:s.message}:s instanceof ce&&(s.status===401||s.status===403)?{kind:"auth-required",status:s.status}:{kind:"error",message:s instanceof Error?s.message:String(s)}}function am({vaultName:s}={}){const r=Ja(),c=s??r.name,o=s!==void 0,f=o?"/":`/vault/${encodeURIComponent(c??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(null),[g,j]=y.useState(null),[v,N]=y.useState(0);y.useEffect(()=>{let w=!1;if(c)return p({kind:"loading"}),Ax(c).then(z=>{w||p({kind:"ok",tokens:z})}).catch(z=>{w||p(Ux(z))}),()=>{w=!0}},[c,v]);const G=y.useCallback(()=>N(w=>w+1),[]);if(y.useEffect(()=>{if(!E)return;const w=z=>{z.preventDefault(),z.returnValue=""};return window.addEventListener("beforeunload",w),()=>window.removeEventListener("beforeunload",w)},[E]),!c)return l.jsxs("div",{children:[l.jsx("h2",{children:"Tokens"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),o?null:l.jsx(Ce,{to:"/",children:"← Back to vaults"})]});const D=Ec(c);return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Tokens for ",l.jsx("code",{children:c})]}),l.jsx(Ce,{to:f,className:"muted",children:"← Vault detail"})]}),D?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:",c,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to manage tokens.`]}),E?l.jsx(Hx,{result:E,onDismiss:()=>x(null)}):null,h.kind==="ok"&&D&&!E?l.jsx(Bx,{vaultName:c,onMinted:w=>{x(w),N(z=>z+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(qn,{vaultName:c,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(Lx,{tokens:h.tokens,allowRevoke:D,confirmingJti:g,onAskConfirm:j,onRevoked:()=>{j(null),N(w=>w+1)}}):null]})]})}function Hx({result:s,onDismiss:r}){const[c,o]=y.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(s.token),o(!0),setTimeout(()=>o(!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:c?"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:r,children:"Done — I've saved the token"})})]})}function Bx({vaultName:s,onMinted:r}){const[c,o]=y.useState(""),[f,h]=y.useState("admin"),[p,E]=y.useState(nm),[x,g]=y.useState(!1),[j,v]=y.useState(null),[N,G]=y.useState([]),[D,w]=y.useState(null),[z,M]=y.useState(new Set);y.useEffect(()=>{let K=!1;return Mx(s).then(X=>{if(K)return;const ue=X.map(fe=>fe.name).filter(fe=>!fe.includes("/")).sort();G(ue)}).catch(X=>{K||w(X instanceof Error?X.message:String(X))}),()=>{K=!0}},[s]);const F=c.trim(),L=F.length===0,U=K=>{M(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 Rx(s,{verb:f,label:F,scopedTags:[...z],ttlDays:p});r(X),o(""),h("admin"),E(nm),M(new Set)}catch(X){if(X instanceof Ln&&X.disposition==="forbidden"){Kl();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."}),j?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:j})}):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:c,onChange:K=>o(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:Ox.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:Nx.map(K=>l.jsx("option",{value:K,children:Dx[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)"})]}),D?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Couldn't load tags: ",l.jsx("code",{children:D}),". Token will be unscoped."]}):N.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:N.map(K=>l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:z.has(K),onChange:()=>U(K)}),l.jsx("code",{children:K})]},K))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:z.size===0?"Nothing selected — token sees the full vault (unscoped).":`Token limited to: ${[...z].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 Lx({tokens:s,allowRevoke:r,confirmingJti:c,onAskConfirm:o,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(qx,{token:h,allowRevoke:r,confirming:c===h.jti,onAskConfirm:o,onRevoked:f},h.jti))})}function qx({token:s,allowRevoke:r,confirming:c,onAskConfirm:o,onRevoked:f}){const[h,p]=y.useState(!1),[E,x]=y.useState(null),g=s.revoked_at!==null,j=async()=>{p(!0),x(null);try{await zx(s.jti),f()}catch(v){if(v instanceof Ln&&v.disposition==="forbidden"){Kl();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]}),r&&!g?c?l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:j,disabled:h,children:h?"Revoking…":"Confirm revoke"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(null),disabled:h,children:"Cancel"})]}):l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(s.jti),children:"Revoke"}):null]})}function Gx(){const[s,r]=y.useState({kind:"loading"});return y.useEffect(()=>{let c=!1;return km().then(o=>{c||r({kind:"ok",vaults:o})}).catch(o=>{if(c)return;const f=o instanceof ce?`${o.status}: ${o.message}`:o instanceof Error?o.message:String(o);r({kind:"error",message:f})}),()=>{c=!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(c=>l.jsxs(Ce,{to:`/vault/${c}`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:c})})}),l.jsx("div",{className:"chev",children:"→"})]},c))]})}function Yx(){const s=xc(),r=s?null:Nm();return l.jsxs("div",{className:"page",children:[l.jsxs("nav",{className:"nav",children:[l.jsxs(Ce,{to:"/",className:"brand",children:["Parachute Vault ",l.jsx("span",{className:"sub",children:"admin"})]}),r?l.jsx(Ce,{to:"/",children:l.jsx("code",{children:r})}):l.jsx(Ce,{to:"/",children:"Vaults"})]}),s?l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(O0,{})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]}):r?l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(Kh,{vaultName:r})}),l.jsx(Fe,{path:"/tokens",element:l.jsx(am,{vaultName:r})}),l.jsx(Fe,{path:"/mirror",element:l.jsx(Ih,{vaultName:r})}),l.jsx(Fe,{path:"/schema",element:l.jsx(em,{vaultName:r})}),l.jsx(Fe,{path:"/embeddings",element:l.jsx($h,{vaultName:r})}),l.jsx(Fe,{path:"/transcription",element:l.jsx(Wh,{vaultName:r})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]}):l.jsxs(nc,{children:[l.jsx(Fe,{path:"/",element:l.jsx(Gx,{})}),l.jsx(Fe,{path:"/vault/:name",element:l.jsx(Kh,{})}),l.jsx(Fe,{path:"/vault/:name/tokens",element:l.jsx(am,{})}),l.jsx(Fe,{path:"/vault/:name/mirror",element:l.jsx(Ih,{})}),l.jsx(Fe,{path:"/vault/:name/schema",element:l.jsx(em,{})}),l.jsx(Fe,{path:"/vault/:name/embeddings",element:l.jsx($h,{})}),l.jsx(Fe,{path:"/vault/:name/transcription",element:l.jsx(Wh,{})}),l.jsx(Fe,{path:"*",element:l.jsx(lc,{})})]})]})}function lc(){return l.jsxs("div",{className:"empty",children:["404 — back to ",l.jsx(Ce,{to:"/",children:"vault"}),"."]})}Pv();const Lm=document.getElementById("root");if(!Lm)throw new Error("#root not found");function ic(){vy.createRoot(Lm).render(l.jsx(y.StrictMode,{children:l.jsx(Lv,{basename:$v(),children:l.jsx(Yx,{})})}))}const lm=Nm();!xc()&&lm?n0(lm).then(ic,ic):ic();
|