@mem-weave/server 0.2.3 → 0.3.0

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.
@@ -1,68 +0,0 @@
1
- var nd=e=>{throw TypeError(e)};var Ha=(e,t,n)=>t.has(e)||nd("Cannot "+n);var g=(e,t,n)=>(Ha(e,t,"read from private field"),n?n.call(e):t.get(e)),Q=(e,t,n)=>t.has(e)?nd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(Ha(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),G=(e,t,n)=>(Ha(e,t,"access private method"),n);var ls=(e,t,n,r)=>({set _(i){I(e,t,i,n)},get _(){return g(e,t,r)}});function oh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ch={exports:{}},xa={},dh={exports:{}},J={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Hl=Symbol.for("react.element"),xv=Symbol.for("react.portal"),_v=Symbol.for("react.fragment"),wv=Symbol.for("react.strict_mode"),Sv=Symbol.for("react.profiler"),Ev=Symbol.for("react.provider"),jv=Symbol.for("react.context"),Cv=Symbol.for("react.forward_ref"),kv=Symbol.for("react.suspense"),Nv=Symbol.for("react.memo"),Pv=Symbol.for("react.lazy"),rd=Symbol.iterator;function Rv(e){return e===null||typeof e!="object"?null:(e=rd&&e[rd]||e["@@iterator"],typeof e=="function"?e:null)}var fh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},hh=Object.assign,ph={};function Ii(e,t,n){this.props=e,this.context=t,this.refs=ph,this.updater=n||fh}Ii.prototype.isReactComponent={};Ii.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ii.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mh(){}mh.prototype=Ii.prototype;function Fu(e,t,n){this.props=e,this.context=t,this.refs=ph,this.updater=n||fh}var Iu=Fu.prototype=new mh;Iu.constructor=Fu;hh(Iu,Ii.prototype);Iu.isPureReactComponent=!0;var id=Array.isArray,vh=Object.prototype.hasOwnProperty,zu={current:null},yh={key:!0,ref:!0,__self:!0,__source:!0};function gh(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)vh.call(t,r)&&!yh.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),c=0;c<a;c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Hl,type:e,key:l,ref:s,props:i,_owner:zu.current}}function Tv(e,t){return{$$typeof:Hl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Au(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hl}function Lv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ld=/\/+/g;function Wa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Lv(""+e.key):t.toString(36)}function Ps(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Hl:case xv:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Wa(s,0):r,id(i)?(n="",e!=null&&(n=e.replace(ld,"$&/")+"/"),Ps(i,t,n,"",function(c){return c})):i!=null&&(Au(i)&&(i=Tv(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ld,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",id(e))for(var a=0;a<e.length;a++){l=e[a];var o=r+Wa(l,a);s+=Ps(l,t,n,o,i)}else if(o=Rv(e),typeof o=="function")for(e=o.call(e),a=0;!(l=e.next()).done;)l=l.value,o=r+Wa(l,a++),s+=Ps(l,t,n,o,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ss(e,t,n){if(e==null)return e;var r=[],i=0;return Ps(e,r,"","",function(l){return t.call(n,l,i++)}),r}function Mv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Rs={transition:null},Dv={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Rs,ReactCurrentOwner:zu};function xh(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:ss,forEach:function(e,t,n){ss(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ss(e,function(){t++}),t},toArray:function(e){return ss(e,function(t){return t})||[]},only:function(e){if(!Au(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=Ii;J.Fragment=_v;J.Profiler=Sv;J.PureComponent=Fu;J.StrictMode=wv;J.Suspense=kv;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dv;J.act=xh;J.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=hh({},e.props),i=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=zu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(o in t)vh.call(t,o)&&!yh.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&a!==void 0?a[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){a=Array(o);for(var c=0;c<o;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Hl,type:e.type,key:i,ref:l,props:r,_owner:s}};J.createContext=function(e){return e={$$typeof:jv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ev,_context:e},e.Consumer=e};J.createElement=gh;J.createFactory=function(e){var t=gh.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:Cv,render:e}};J.isValidElement=Au;J.lazy=function(e){return{$$typeof:Pv,_payload:{_status:-1,_result:e},_init:Mv}};J.memo=function(e,t){return{$$typeof:Nv,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=Rs.transition;Rs.transition={};try{e()}finally{Rs.transition=t}};J.unstable_act=xh;J.useCallback=function(e,t){return st.current.useCallback(e,t)};J.useContext=function(e){return st.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return st.current.useDeferredValue(e)};J.useEffect=function(e,t){return st.current.useEffect(e,t)};J.useId=function(){return st.current.useId()};J.useImperativeHandle=function(e,t,n){return st.current.useImperativeHandle(e,t,n)};J.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return st.current.useMemo(e,t)};J.useReducer=function(e,t,n){return st.current.useReducer(e,t,n)};J.useRef=function(e){return st.current.useRef(e)};J.useState=function(e){return st.current.useState(e)};J.useSyncExternalStore=function(e,t,n){return st.current.useSyncExternalStore(e,t,n)};J.useTransition=function(){return st.current.useTransition()};J.version="18.3.1";dh.exports=J;var C=dh.exports;const Ov=uh(C),Fv=oh({__proto__:null,default:Ov},[C]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Iv=C,zv=Symbol.for("react.element"),Av=Symbol.for("react.fragment"),Uv=Object.prototype.hasOwnProperty,$v=Iv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bv={key:!0,ref:!0,__self:!0,__source:!0};function _h(e,t,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Uv.call(t,r)&&!bv.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:zv,type:e,key:l,ref:s,props:i,_owner:$v.current}}xa.Fragment=Av;xa.jsx=_h;xa.jsxs=_h;ch.exports=xa;var u=ch.exports,wh={exports:{}},Ct={},Sh={exports:{}},Eh={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,H){var K=O.length;O.push(H);e:for(;0<K;){var he=K-1>>>1,pe=O[he];if(0<i(pe,H))O[he]=H,O[K]=pe,K=he;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var H=O[0],K=O.pop();if(K!==H){O[0]=K;e:for(var he=0,pe=O.length,Ft=pe>>>1;he<Ft;){var yt=2*(he+1)-1,Je=O[yt],Ze=yt+1,Nt=O[Ze];if(0>i(Je,K))Ze<pe&&0>i(Nt,Je)?(O[he]=Nt,O[Ze]=K,he=Ze):(O[he]=Je,O[yt]=K,he=yt);else if(Ze<pe&&0>i(Nt,K))O[he]=Nt,O[Ze]=K,he=Ze;else break e}}return H}function i(O,H){var K=O.sortIndex-H.sortIndex;return K!==0?K:O.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var o=[],c=[],h=1,d=null,p=3,m=!1,E=!1,_=!1,P=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(O){for(var H=n(c);H!==null;){if(H.callback===null)r(c);else if(H.startTime<=O)r(c),H.sortIndex=H.expirationTime,t(o,H);else break;H=n(c)}}function S(O){if(_=!1,y(O),!E)if(n(o)!==null)E=!0,Cn(R);else{var H=n(c);H!==null&&kn(S,H.startTime-O)}}function R(O,H){E=!1,_&&(_=!1,v(N),N=-1),m=!0;var K=p;try{for(y(H),d=n(o);d!==null&&(!(d.expirationTime>H)||O&&!Y());){var he=d.callback;if(typeof he=="function"){d.callback=null,p=d.priorityLevel;var pe=he(d.expirationTime<=H);H=e.unstable_now(),typeof pe=="function"?d.callback=pe:d===n(o)&&r(o),y(H)}else r(o);d=n(o)}if(d!==null)var Ft=!0;else{var yt=n(c);yt!==null&&kn(S,yt.startTime-H),Ft=!1}return Ft}finally{d=null,p=K,m=!1}}var D=!1,w=null,N=-1,z=5,M=-1;function Y(){return!(e.unstable_now()-M<z)}function se(){if(w!==null){var O=e.unstable_now();M=O;var H=!0;try{H=w(!0,O)}finally{H?Ce():(D=!1,w=null)}}else D=!1}var Ce;if(typeof f=="function")Ce=function(){f(se)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,We=ke.port2;ke.port1.onmessage=se,Ce=function(){We.postMessage(null)}}else Ce=function(){P(se,0)};function Cn(O){w=O,D||(D=!0,Ce())}function kn(O,H){N=P(function(){O(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){E||m||(E=!0,Cn(R))},e.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"):z=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var K=p;p=H;try{return O()}finally{p=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,H){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var K=p;p=O;try{return H()}finally{p=K}},e.unstable_scheduleCallback=function(O,H,K){var he=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?he+K:he):K=he,O){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=K+pe,O={id:h++,callback:H,priorityLevel:O,startTime:K,expirationTime:pe,sortIndex:-1},K>he?(O.sortIndex=K,t(c,O),n(o)===null&&O===n(c)&&(_?(v(N),N=-1):_=!0,kn(S,K-he))):(O.sortIndex=pe,t(o,O),E||m||(E=!0,Cn(R))),O},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(O){var H=p;return function(){var K=p;p=H;try{return O.apply(this,arguments)}finally{p=K}}}})(Eh);Sh.exports=Eh;var Bv=Sh.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Qv=C,jt=Bv;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var jh=new Set,xl={};function Qr(e,t){Pi(e,t),Pi(e+"Capture",t)}function Pi(e,t){for(xl[e]=t,e=0;e<t.length;e++)jh.add(t[e])}var gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eo=Object.prototype.hasOwnProperty,Vv=/^[: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]*$/,sd={},ad={};function Hv(e){return Eo.call(ad,e)?!0:Eo.call(sd,e)?!1:Vv.test(e)?ad[e]=!0:(sd[e]=!0,!1)}function Wv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kv(e,t,n,r){if(t===null||typeof t>"u"||Wv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function at(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new at(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new at(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){He[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uu=/[\-:]([a-z])/g;function $u(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Uu,$u);He[t]=new at(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Uu,$u);He[t]=new at(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Uu,$u);He[t]=new at(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function bu(e,t,n,r){var i=He.hasOwnProperty(t)?He[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kv(t,n,i,r)&&(n=null),r||i===null?Hv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var En=Qv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,as=Symbol.for("react.element"),Xr=Symbol.for("react.portal"),Jr=Symbol.for("react.fragment"),Bu=Symbol.for("react.strict_mode"),jo=Symbol.for("react.profiler"),Ch=Symbol.for("react.provider"),kh=Symbol.for("react.context"),Qu=Symbol.for("react.forward_ref"),Co=Symbol.for("react.suspense"),ko=Symbol.for("react.suspense_list"),Vu=Symbol.for("react.memo"),Dn=Symbol.for("react.lazy"),Nh=Symbol.for("react.offscreen"),od=Symbol.iterator;function Hi(e){return e===null||typeof e!="object"?null:(e=od&&e[od]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,Ka;function il(e){if(Ka===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ka=t&&t[1]||""}return`
34
- `+Ka+e}var qa=!1;function Ga(e,t){if(!e||qa)return"";qa=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
- `),l=r.stack.split(`
36
- `),s=i.length-1,a=l.length-1;1<=s&&0<=a&&i[s]!==l[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==l[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==l[a]){var o=`
37
- `+i[s].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=s&&0<=a);break}}}finally{qa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?il(e):""}function qv(e){switch(e.tag){case 5:return il(e.type);case 16:return il("Lazy");case 13:return il("Suspense");case 19:return il("SuspenseList");case 0:case 2:case 15:return e=Ga(e.type,!1),e;case 11:return e=Ga(e.type.render,!1),e;case 1:return e=Ga(e.type,!0),e;default:return""}}function No(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Xr:return"Portal";case jo:return"Profiler";case Bu:return"StrictMode";case Co:return"Suspense";case ko:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kh:return(e.displayName||"Context")+".Consumer";case Ch:return(e._context.displayName||"Context")+".Provider";case Qu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vu:return t=e.displayName||null,t!==null?t:No(e.type)||"Memo";case Dn:t=e._payload,e=e._init;try{return No(e(t))}catch{}}return null}function Gv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return No(t);case 8:return t===Bu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ir(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ph(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yv(e){var t=Ph(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function os(e){e._valueTracker||(e._valueTracker=Yv(e))}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ph(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bs(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}}function Po(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ud(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ir(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Th(e,t){t=t.checked,t!=null&&bu(e,"checked",t,!1)}function Ro(e,t){Th(e,t);var n=ir(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?To(e,t.type,n):t.hasOwnProperty("defaultValue")&&To(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function To(e,t,n){(t!=="number"||Bs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function ui(e,t,n,r){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&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ir(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(ll(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ir(n)}}function Lh(e,t){var n=ir(t.value),r=ir(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function fd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Mh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Mh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var us,Dh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(us=us||document.createElement("div"),us.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=us.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _l(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xv=["Webkit","ms","Moz","O"];Object.keys(cl).forEach(function(e){Xv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cl[t]=cl[e]})});function Oh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cl.hasOwnProperty(e)&&cl[e]?(""+t).trim():t+"px"}function Fh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Oh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Jv=je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Do(e,t){if(t){if(Jv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Oo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Fo=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Io=null,ci=null,di=null;function hd(e){if(e=ql(e)){if(typeof Io!="function")throw Error(L(280));var t=e.stateNode;t&&(t=ja(t),Io(e.stateNode,e.type,t))}}function Ih(e){ci?di?di.push(e):di=[e]:ci=e}function zh(){if(ci){var e=ci,t=di;if(di=ci=null,hd(e),t)for(e=0;e<t.length;e++)hd(t[e])}}function Ah(e,t){return e(t)}function Uh(){}var Ya=!1;function $h(e,t,n){if(Ya)return e(t,n);Ya=!0;try{return Ah(e,t,n)}finally{Ya=!1,(ci!==null||di!==null)&&(Uh(),zh())}}function wl(e,t){var n=e.stateNode;if(n===null)return null;var r=ja(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var zo=!1;if(gn)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){zo=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{zo=!1}function Zv(e,t,n,r,i,l,s,a,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var dl=!1,Qs=null,Vs=!1,Ao=null,ey={onError:function(e){dl=!0,Qs=e}};function ty(e,t,n,r,i,l,s,a,o){dl=!1,Qs=null,Zv.apply(ey,arguments)}function ny(e,t,n,r,i,l,s,a,o){if(ty.apply(this,arguments),dl){if(dl){var c=Qs;dl=!1,Qs=null}else throw Error(L(198));Vs||(Vs=!0,Ao=c)}}function Vr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function bh(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 pd(e){if(Vr(e)!==e)throw Error(L(188))}function ry(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return pd(i),e;if(l===r)return pd(i),t;l=l.sibling}throw Error(L(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=l;break}if(a===r){s=!0,r=i,n=l;break}a=a.sibling}if(!s){for(a=l.child;a;){if(a===n){s=!0,n=l,r=i;break}if(a===r){s=!0,r=l,n=i;break}a=a.sibling}if(!s)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function Bh(e){return e=ry(e),e!==null?Qh(e):null}function Qh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Qh(e);if(t!==null)return t;e=e.sibling}return null}var Vh=jt.unstable_scheduleCallback,md=jt.unstable_cancelCallback,iy=jt.unstable_shouldYield,ly=jt.unstable_requestPaint,Me=jt.unstable_now,sy=jt.unstable_getCurrentPriorityLevel,Wu=jt.unstable_ImmediatePriority,Hh=jt.unstable_UserBlockingPriority,Hs=jt.unstable_NormalPriority,ay=jt.unstable_LowPriority,Wh=jt.unstable_IdlePriority,_a=null,Jt=null;function oy(e){if(Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(_a,e,void 0,(e.current.flags&128)===128)}catch{}}var Bt=Math.clz32?Math.clz32:dy,uy=Math.log,cy=Math.LN2;function dy(e){return e>>>=0,e===0?32:31-(uy(e)/cy|0)|0}var cs=64,ds=4194304;function sl(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ws(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=sl(a):(l&=s,l!==0&&(r=sl(l)))}else s=n&~i,s!==0?r=sl(s):l!==0&&(r=sl(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Bt(t),i=1<<n,r|=e[n],t&=~i;return r}function fy(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hy(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Bt(l),a=1<<s,o=i[s];o===-1?(!(a&n)||a&r)&&(i[s]=fy(a,t)):o<=t&&(e.expiredLanes|=a),l&=~a}}function Uo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Kh(){var e=cs;return cs<<=1,!(cs&4194240)&&(cs=64),e}function Xa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bt(t),e[t]=n}function py(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Bt(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Ku(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var fe=0;function qh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Gh,qu,Yh,Xh,Jh,$o=!1,fs=[],Gn=null,Yn=null,Xn=null,Sl=new Map,El=new Map,Fn=[],my="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 submit".split(" ");function vd(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":Sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(t.pointerId)}}function Ki(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=ql(t),t!==null&&qu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function vy(e,t,n,r,i){switch(t){case"focusin":return Gn=Ki(Gn,e,t,n,r,i),!0;case"dragenter":return Yn=Ki(Yn,e,t,n,r,i),!0;case"mouseover":return Xn=Ki(Xn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return Sl.set(l,Ki(Sl.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,El.set(l,Ki(El.get(l)||null,e,t,n,r,i)),!0}return!1}function Zh(e){var t=xr(e.target);if(t!==null){var n=Vr(t);if(n!==null){if(t=n.tag,t===13){if(t=bh(n),t!==null){e.blockedOn=t,Jh(e.priority,function(){Yh(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 Ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Fo=r,n.target.dispatchEvent(r),Fo=null}else return t=ql(n),t!==null&&qu(t),e.blockedOn=n,!1;t.shift()}return!0}function yd(e,t,n){Ts(e)&&n.delete(t)}function yy(){$o=!1,Gn!==null&&Ts(Gn)&&(Gn=null),Yn!==null&&Ts(Yn)&&(Yn=null),Xn!==null&&Ts(Xn)&&(Xn=null),Sl.forEach(yd),El.forEach(yd)}function qi(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,yy)))}function jl(e){function t(i){return qi(i,e)}if(0<fs.length){qi(fs[0],e);for(var n=1;n<fs.length;n++){var r=fs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&qi(Gn,e),Yn!==null&&qi(Yn,e),Xn!==null&&qi(Xn,e),Sl.forEach(t),El.forEach(t),n=0;n<Fn.length;n++)r=Fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Fn.length&&(n=Fn[0],n.blockedOn===null);)Zh(n),n.blockedOn===null&&Fn.shift()}var fi=En.ReactCurrentBatchConfig,Ks=!0;function gy(e,t,n,r){var i=fe,l=fi.transition;fi.transition=null;try{fe=1,Gu(e,t,n,r)}finally{fe=i,fi.transition=l}}function xy(e,t,n,r){var i=fe,l=fi.transition;fi.transition=null;try{fe=4,Gu(e,t,n,r)}finally{fe=i,fi.transition=l}}function Gu(e,t,n,r){if(Ks){var i=bo(e,t,n,r);if(i===null)ao(e,t,r,qs,n),vd(e,r);else if(vy(i,e,t,n,r))r.stopPropagation();else if(vd(e,r),t&4&&-1<my.indexOf(e)){for(;i!==null;){var l=ql(i);if(l!==null&&Gh(l),l=bo(e,t,n,r),l===null&&ao(e,t,r,qs,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else ao(e,t,r,null,n)}}var qs=null;function bo(e,t,n,r){if(qs=null,e=Hu(r),e=xr(e),e!==null)if(t=Vr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=bh(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 qs=e,null}function ep(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sy()){case Wu:return 1;case Hh:return 4;case Hs:case ay:return 16;case Wh:return 536870912;default:return 16}default:return 16}}var Wn=null,Yu=null,Ls=null;function tp(){if(Ls)return Ls;var e,t=Yu,n=t.length,r,i="value"in Wn?Wn.value:Wn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[l-r];r++);return Ls=i.slice(e,1<r?1-r:void 0)}function Ms(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 hs(){return!0}function gd(){return!1}function kt(e){function t(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(l):l[a]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?hs:gd,this.isPropagationStopped=gd,this}return je(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=hs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),t}var zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xu=kt(zi),Kl=je({},zi,{view:0,detail:0}),_y=kt(Kl),Ja,Za,Gi,wa=je({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==Gi&&(Gi&&e.type==="mousemove"?(Ja=e.screenX-Gi.screenX,Za=e.screenY-Gi.screenY):Za=Ja=0,Gi=e),Ja)},movementY:function(e){return"movementY"in e?e.movementY:Za}}),xd=kt(wa),wy=je({},wa,{dataTransfer:0}),Sy=kt(wy),Ey=je({},Kl,{relatedTarget:0}),eo=kt(Ey),jy=je({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),Cy=kt(jy),ky=je({},zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ny=kt(ky),Py=je({},zi,{data:0}),_d=kt(Py),Ry={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ty={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"},Ly={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function My(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ly[e])?!!t[e]:!1}function Ju(){return My}var Dy=je({},Kl,{key:function(e){if(e.key){var t=Ry[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ty[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oy=kt(Dy),Fy=je({},wa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wd=kt(Fy),Iy=je({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),zy=kt(Iy),Ay=je({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uy=kt(Ay),$y=je({},wa,{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}),by=kt($y),By=[9,13,27,32],Zu=gn&&"CompositionEvent"in window,fl=null;gn&&"documentMode"in document&&(fl=document.documentMode);var Qy=gn&&"TextEvent"in window&&!fl,np=gn&&(!Zu||fl&&8<fl&&11>=fl),Sd=" ",Ed=!1;function rp(e,t){switch(e){case"keyup":return By.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ip(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function Vy(e,t){switch(e){case"compositionend":return ip(t);case"keypress":return t.which!==32?null:(Ed=!0,Sd);case"textInput":return e=t.data,e===Sd&&Ed?null:e;default:return null}}function Hy(e,t){if(Zr)return e==="compositionend"||!Zu&&rp(e,t)?(e=tp(),Ls=Yu=Wn=null,Zr=!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 np&&t.locale!=="ko"?null:t.data;default:return null}}var Wy={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 jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wy[e.type]:t==="textarea"}function lp(e,t,n,r){Ih(r),t=Gs(t,"onChange"),0<t.length&&(n=new Xu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hl=null,Cl=null;function Ky(e){vp(e,0)}function Sa(e){var t=ni(e);if(Rh(t))return e}function qy(e,t){if(e==="change")return t}var sp=!1;if(gn){var to;if(gn){var no="oninput"in document;if(!no){var Cd=document.createElement("div");Cd.setAttribute("oninput","return;"),no=typeof Cd.oninput=="function"}to=no}else to=!1;sp=to&&(!document.documentMode||9<document.documentMode)}function kd(){hl&&(hl.detachEvent("onpropertychange",ap),Cl=hl=null)}function ap(e){if(e.propertyName==="value"&&Sa(Cl)){var t=[];lp(t,Cl,e,Hu(e)),$h(Ky,t)}}function Gy(e,t,n){e==="focusin"?(kd(),hl=t,Cl=n,hl.attachEvent("onpropertychange",ap)):e==="focusout"&&kd()}function Yy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sa(Cl)}function Xy(e,t){if(e==="click")return Sa(t)}function Jy(e,t){if(e==="input"||e==="change")return Sa(t)}function Zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:Zy;function kl(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Eo.call(t,i)||!Vt(e[i],t[i]))return!1}return!0}function Nd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pd(e,t){var n=Nd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Nd(n)}}function op(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?op(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function up(){for(var e=window,t=Bs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bs(e.document)}return t}function ec(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")}function eg(e){var t=up(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&op(n.ownerDocument.documentElement,n)){if(r!==null&&ec(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Pd(n,l);var s=Pd(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var tg=gn&&"documentMode"in document&&11>=document.documentMode,ei=null,Bo=null,pl=null,Qo=!1;function Rd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qo||ei==null||ei!==Bs(r)||(r=ei,"selectionStart"in r&&ec(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),pl&&kl(pl,r)||(pl=r,r=Gs(Bo,"onSelect"),0<r.length&&(t=new Xu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ei)))}function ps(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ti={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionend:ps("Transition","TransitionEnd")},ro={},cp={};gn&&(cp=document.createElement("div").style,"AnimationEvent"in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),"TransitionEvent"in window||delete ti.transitionend.transition);function Ea(e){if(ro[e])return ro[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cp)return ro[e]=t[n];return e}var dp=Ea("animationend"),fp=Ea("animationiteration"),hp=Ea("animationstart"),pp=Ea("transitionend"),mp=new Map,Td="abort auxClick 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(" ");function sr(e,t){mp.set(e,t),Qr(t,[e])}for(var io=0;io<Td.length;io++){var lo=Td[io],ng=lo.toLowerCase(),rg=lo[0].toUpperCase()+lo.slice(1);sr(ng,"on"+rg)}sr(dp,"onAnimationEnd");sr(fp,"onAnimationIteration");sr(hp,"onAnimationStart");sr("dblclick","onDoubleClick");sr("focusin","onFocus");sr("focusout","onBlur");sr(pp,"onTransitionEnd");Pi("onMouseEnter",["mouseout","mouseover"]);Pi("onMouseLeave",["mouseout","mouseover"]);Pi("onPointerEnter",["pointerout","pointerover"]);Pi("onPointerLeave",["pointerout","pointerover"]);Qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var al="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(" "),ig=new Set("cancel close invalid load scroll toggle".split(" ").concat(al));function Ld(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ny(r,t,void 0,e),e.currentTarget=null}function vp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],o=a.instance,c=a.currentTarget;if(a=a.listener,o!==l&&i.isPropagationStopped())break e;Ld(i,a,c),l=o}else for(s=0;s<r.length;s++){if(a=r[s],o=a.instance,c=a.currentTarget,a=a.listener,o!==l&&i.isPropagationStopped())break e;Ld(i,a,c),l=o}}}if(Vs)throw e=Ao,Vs=!1,Ao=null,e}function ye(e,t){var n=t[qo];n===void 0&&(n=t[qo]=new Set);var r=e+"__bubble";n.has(r)||(yp(t,e,2,!1),n.add(r))}function so(e,t,n){var r=0;t&&(r|=4),yp(n,e,r,t)}var ms="_reactListening"+Math.random().toString(36).slice(2);function Nl(e){if(!e[ms]){e[ms]=!0,jh.forEach(function(n){n!=="selectionchange"&&(ig.has(n)||so(n,!1,e),so(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ms]||(t[ms]=!0,so("selectionchange",!1,t))}}function yp(e,t,n,r){switch(ep(t)){case 1:var i=gy;break;case 4:i=xy;break;default:i=Gu}n=i.bind(null,t,n,e),i=void 0,!zo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?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 ao(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var o=s.tag;if((o===3||o===4)&&(o=s.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;s=s.return}for(;a!==null;){if(s=xr(a),s===null)return;if(o=s.tag,o===5||o===6){r=l=s;continue e}a=a.parentNode}}r=r.return}$h(function(){var c=l,h=Hu(n),d=[];e:{var p=mp.get(e);if(p!==void 0){var m=Xu,E=e;switch(e){case"keypress":if(Ms(n)===0)break e;case"keydown":case"keyup":m=Oy;break;case"focusin":E="focus",m=eo;break;case"focusout":E="blur",m=eo;break;case"beforeblur":case"afterblur":m=eo;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":m=xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Sy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=zy;break;case dp:case fp:case hp:m=Cy;break;case pp:m=Uy;break;case"scroll":m=_y;break;case"wheel":m=by;break;case"copy":case"cut":case"paste":m=Ny;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=wd}var _=(t&4)!==0,P=!_&&e==="scroll",v=_?p!==null?p+"Capture":null:p;_=[];for(var f=c,y;f!==null;){y=f;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,v!==null&&(S=wl(f,v),S!=null&&_.push(Pl(f,S,y)))),P)break;f=f.return}0<_.length&&(p=new m(p,E,null,n,h),d.push({event:p,listeners:_}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==Fo&&(E=n.relatedTarget||n.fromElement)&&(xr(E)||E[xn]))break e;if((m||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,m?(E=n.relatedTarget||n.toElement,m=c,E=E?xr(E):null,E!==null&&(P=Vr(E),E!==P||E.tag!==5&&E.tag!==6)&&(E=null)):(m=null,E=c),m!==E)){if(_=xd,S="onMouseLeave",v="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(_=wd,S="onPointerLeave",v="onPointerEnter",f="pointer"),P=m==null?p:ni(m),y=E==null?p:ni(E),p=new _(S,f+"leave",m,n,h),p.target=P,p.relatedTarget=y,S=null,xr(h)===c&&(_=new _(v,f+"enter",E,n,h),_.target=y,_.relatedTarget=P,S=_),P=S,m&&E)t:{for(_=m,v=E,f=0,y=_;y;y=Gr(y))f++;for(y=0,S=v;S;S=Gr(S))y++;for(;0<f-y;)_=Gr(_),f--;for(;0<y-f;)v=Gr(v),y--;for(;f--;){if(_===v||v!==null&&_===v.alternate)break t;_=Gr(_),v=Gr(v)}_=null}else _=null;m!==null&&Md(d,p,m,_,!1),E!==null&&P!==null&&Md(d,P,E,_,!0)}}e:{if(p=c?ni(c):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var R=qy;else if(jd(p))if(sp)R=Jy;else{R=Yy;var D=Gy}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(R=Xy);if(R&&(R=R(e,c))){lp(d,R,n,h);break e}D&&D(e,p,c),e==="focusout"&&(D=p._wrapperState)&&D.controlled&&p.type==="number"&&To(p,"number",p.value)}switch(D=c?ni(c):window,e){case"focusin":(jd(D)||D.contentEditable==="true")&&(ei=D,Bo=c,pl=null);break;case"focusout":pl=Bo=ei=null;break;case"mousedown":Qo=!0;break;case"contextmenu":case"mouseup":case"dragend":Qo=!1,Rd(d,n,h);break;case"selectionchange":if(tg)break;case"keydown":case"keyup":Rd(d,n,h)}var w;if(Zu)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Zr?rp(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(np&&n.locale!=="ko"&&(Zr||N!=="onCompositionStart"?N==="onCompositionEnd"&&Zr&&(w=tp()):(Wn=h,Yu="value"in Wn?Wn.value:Wn.textContent,Zr=!0)),D=Gs(c,N),0<D.length&&(N=new _d(N,e,null,n,h),d.push({event:N,listeners:D}),w?N.data=w:(w=ip(n),w!==null&&(N.data=w)))),(w=Qy?Vy(e,n):Hy(e,n))&&(c=Gs(c,"onBeforeInput"),0<c.length&&(h=new _d("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:c}),h.data=w))}vp(d,t)})}function Pl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=wl(e,n),l!=null&&r.unshift(Pl(e,l,i)),l=wl(e,t),l!=null&&r.push(Pl(e,l,i))),e=e.return}return r}function Gr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Md(e,t,n,r,i){for(var l=t._reactName,s=[];n!==null&&n!==r;){var a=n,o=a.alternate,c=a.stateNode;if(o!==null&&o===r)break;a.tag===5&&c!==null&&(a=c,i?(o=wl(n,l),o!=null&&s.unshift(Pl(n,o,a))):i||(o=wl(n,l),o!=null&&s.push(Pl(n,o,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var lg=/\r\n?/g,sg=/\u0000|\uFFFD/g;function Dd(e){return(typeof e=="string"?e:""+e).replace(lg,`
38
- `).replace(sg,"")}function vs(e,t,n){if(t=Dd(t),Dd(e)!==t&&n)throw Error(L(425))}function Ys(){}var Vo=null,Ho=null;function Wo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ko=typeof setTimeout=="function"?setTimeout:void 0,ag=typeof clearTimeout=="function"?clearTimeout:void 0,Od=typeof Promise=="function"?Promise:void 0,og=typeof queueMicrotask=="function"?queueMicrotask:typeof Od<"u"?function(e){return Od.resolve(null).then(e).catch(ug)}:Ko;function ug(e){setTimeout(function(){throw e})}function oo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),jl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);jl(t)}function Jn(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==="$?")break;if(t==="/$")return null}}return e}function Fd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),Xt="__reactFiber$"+Ai,Rl="__reactProps$"+Ai,xn="__reactContainer$"+Ai,qo="__reactEvents$"+Ai,cg="__reactListeners$"+Ai,dg="__reactHandles$"+Ai;function xr(e){var t=e[Xt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xn]||n[Xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fd(e);e!==null;){if(n=e[Xt])return n;e=Fd(e)}return t}e=n,n=e.parentNode}return null}function ql(e){return e=e[Xt]||e[xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function ja(e){return e[Rl]||null}var Go=[],ri=-1;function ar(e){return{current:e}}function ge(e){0>ri||(e.current=Go[ri],Go[ri]=null,ri--)}function ve(e,t){ri++,Go[ri]=e.current,e.current=t}var lr={},Xe=ar(lr),pt=ar(!1),Fr=lr;function Ri(e,t){var n=e.type.contextTypes;if(!n)return lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return e=e.childContextTypes,e!=null}function Xs(){ge(pt),ge(Xe)}function Id(e,t,n){if(Xe.current!==lr)throw Error(L(168));ve(Xe,t),ve(pt,n)}function gp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,Gv(e)||"Unknown",i));return je({},n,r)}function Js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lr,Fr=Xe.current,ve(Xe,e),ve(pt,pt.current),!0}function zd(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=gp(e,t,Fr),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(Xe),ve(Xe,e)):ge(pt),ve(pt,n)}var on=null,Ca=!1,uo=!1;function xp(e){on===null?on=[e]:on.push(e)}function fg(e){Ca=!0,xp(e)}function or(){if(!uo&&on!==null){uo=!0;var e=0,t=fe;try{var n=on;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}on=null,Ca=!1}catch(i){throw on!==null&&(on=on.slice(e+1)),Vh(Wu,or),i}finally{fe=t,uo=!1}}return null}var ii=[],li=0,Zs=null,ea=0,Rt=[],Tt=0,Ir=null,hn=1,pn="";function mr(e,t){ii[li++]=ea,ii[li++]=Zs,Zs=e,ea=t}function _p(e,t,n){Rt[Tt++]=hn,Rt[Tt++]=pn,Rt[Tt++]=Ir,Ir=e;var r=hn;e=pn;var i=32-Bt(r)-1;r&=~(1<<i),n+=1;var l=32-Bt(t)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,hn=1<<32-Bt(t)+i|n<<i|r,pn=l+e}else hn=1<<l|n<<i|r,pn=e}function tc(e){e.return!==null&&(mr(e,1),_p(e,1,0))}function nc(e){for(;e===Zs;)Zs=ii[--li],ii[li]=null,ea=ii[--li],ii[li]=null;for(;e===Ir;)Ir=Rt[--Tt],Rt[Tt]=null,pn=Rt[--Tt],Rt[Tt]=null,hn=Rt[--Tt],Rt[Tt]=null}var Et=null,St=null,_e=!1,bt=null;function wp(e,t){var n=Lt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ad(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Et=e,St=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Et=e,St=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:hn,overflow:pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Lt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Et=e,St=null,!0):!1;default:return!1}}function Yo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xo(e){if(_e){var t=St;if(t){var n=t;if(!Ad(e,t)){if(Yo(e))throw Error(L(418));t=Jn(n.nextSibling);var r=Et;t&&Ad(e,t)?wp(r,n):(e.flags=e.flags&-4097|2,_e=!1,Et=e)}}else{if(Yo(e))throw Error(L(418));e.flags=e.flags&-4097|2,_e=!1,Et=e}}}function Ud(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Et=e}function ys(e){if(e!==Et)return!1;if(!_e)return Ud(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wo(e.type,e.memoizedProps)),t&&(t=St)){if(Yo(e))throw Sp(),Error(L(418));for(;t;)wp(e,t),t=Jn(t.nextSibling)}if(Ud(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){St=Jn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}St=null}}else St=Et?Jn(e.stateNode.nextSibling):null;return!0}function Sp(){for(var e=St;e;)e=Jn(e.nextSibling)}function Ti(){St=Et=null,_e=!1}function rc(e){bt===null?bt=[e]:bt.push(e)}var hg=En.ReactCurrentBatchConfig;function Yi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var a=i.refs;s===null?delete a[l]:a[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function gs(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $d(e){var t=e._init;return t(e._payload)}function Ep(e){function t(v,f){if(e){var y=v.deletions;y===null?(v.deletions=[f],v.flags|=16):y.push(f)}}function n(v,f){if(!e)return null;for(;f!==null;)t(v,f),f=f.sibling;return null}function r(v,f){for(v=new Map;f!==null;)f.key!==null?v.set(f.key,f):v.set(f.index,f),f=f.sibling;return v}function i(v,f){return v=nr(v,f),v.index=0,v.sibling=null,v}function l(v,f,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<f?(v.flags|=2,f):y):(v.flags|=2,f)):(v.flags|=1048576,f)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,f,y,S){return f===null||f.tag!==6?(f=yo(y,v.mode,S),f.return=v,f):(f=i(f,y),f.return=v,f)}function o(v,f,y,S){var R=y.type;return R===Jr?h(v,f,y.props.children,S,y.key):f!==null&&(f.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Dn&&$d(R)===f.type)?(S=i(f,y.props),S.ref=Yi(v,f,y),S.return=v,S):(S=Us(y.type,y.key,y.props,null,v.mode,S),S.ref=Yi(v,f,y),S.return=v,S)}function c(v,f,y,S){return f===null||f.tag!==4||f.stateNode.containerInfo!==y.containerInfo||f.stateNode.implementation!==y.implementation?(f=go(y,v.mode,S),f.return=v,f):(f=i(f,y.children||[]),f.return=v,f)}function h(v,f,y,S,R){return f===null||f.tag!==7?(f=Or(y,v.mode,S,R),f.return=v,f):(f=i(f,y),f.return=v,f)}function d(v,f,y){if(typeof f=="string"&&f!==""||typeof f=="number")return f=yo(""+f,v.mode,y),f.return=v,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case as:return y=Us(f.type,f.key,f.props,null,v.mode,y),y.ref=Yi(v,null,f),y.return=v,y;case Xr:return f=go(f,v.mode,y),f.return=v,f;case Dn:var S=f._init;return d(v,S(f._payload),y)}if(ll(f)||Hi(f))return f=Or(f,v.mode,y,null),f.return=v,f;gs(v,f)}return null}function p(v,f,y,S){var R=f!==null?f.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return R!==null?null:a(v,f,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case as:return y.key===R?o(v,f,y,S):null;case Xr:return y.key===R?c(v,f,y,S):null;case Dn:return R=y._init,p(v,f,R(y._payload),S)}if(ll(y)||Hi(y))return R!==null?null:h(v,f,y,S,null);gs(v,y)}return null}function m(v,f,y,S,R){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(y)||null,a(f,v,""+S,R);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case as:return v=v.get(S.key===null?y:S.key)||null,o(f,v,S,R);case Xr:return v=v.get(S.key===null?y:S.key)||null,c(f,v,S,R);case Dn:var D=S._init;return m(v,f,y,D(S._payload),R)}if(ll(S)||Hi(S))return v=v.get(y)||null,h(f,v,S,R,null);gs(f,S)}return null}function E(v,f,y,S){for(var R=null,D=null,w=f,N=f=0,z=null;w!==null&&N<y.length;N++){w.index>N?(z=w,w=null):z=w.sibling;var M=p(v,w,y[N],S);if(M===null){w===null&&(w=z);break}e&&w&&M.alternate===null&&t(v,w),f=l(M,f,N),D===null?R=M:D.sibling=M,D=M,w=z}if(N===y.length)return n(v,w),_e&&mr(v,N),R;if(w===null){for(;N<y.length;N++)w=d(v,y[N],S),w!==null&&(f=l(w,f,N),D===null?R=w:D.sibling=w,D=w);return _e&&mr(v,N),R}for(w=r(v,w);N<y.length;N++)z=m(w,v,N,y[N],S),z!==null&&(e&&z.alternate!==null&&w.delete(z.key===null?N:z.key),f=l(z,f,N),D===null?R=z:D.sibling=z,D=z);return e&&w.forEach(function(Y){return t(v,Y)}),_e&&mr(v,N),R}function _(v,f,y,S){var R=Hi(y);if(typeof R!="function")throw Error(L(150));if(y=R.call(y),y==null)throw Error(L(151));for(var D=R=null,w=f,N=f=0,z=null,M=y.next();w!==null&&!M.done;N++,M=y.next()){w.index>N?(z=w,w=null):z=w.sibling;var Y=p(v,w,M.value,S);if(Y===null){w===null&&(w=z);break}e&&w&&Y.alternate===null&&t(v,w),f=l(Y,f,N),D===null?R=Y:D.sibling=Y,D=Y,w=z}if(M.done)return n(v,w),_e&&mr(v,N),R;if(w===null){for(;!M.done;N++,M=y.next())M=d(v,M.value,S),M!==null&&(f=l(M,f,N),D===null?R=M:D.sibling=M,D=M);return _e&&mr(v,N),R}for(w=r(v,w);!M.done;N++,M=y.next())M=m(w,v,N,M.value,S),M!==null&&(e&&M.alternate!==null&&w.delete(M.key===null?N:M.key),f=l(M,f,N),D===null?R=M:D.sibling=M,D=M);return e&&w.forEach(function(se){return t(v,se)}),_e&&mr(v,N),R}function P(v,f,y,S){if(typeof y=="object"&&y!==null&&y.type===Jr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case as:e:{for(var R=y.key,D=f;D!==null;){if(D.key===R){if(R=y.type,R===Jr){if(D.tag===7){n(v,D.sibling),f=i(D,y.props.children),f.return=v,v=f;break e}}else if(D.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Dn&&$d(R)===D.type){n(v,D.sibling),f=i(D,y.props),f.ref=Yi(v,D,y),f.return=v,v=f;break e}n(v,D);break}else t(v,D);D=D.sibling}y.type===Jr?(f=Or(y.props.children,v.mode,S,y.key),f.return=v,v=f):(S=Us(y.type,y.key,y.props,null,v.mode,S),S.ref=Yi(v,f,y),S.return=v,v=S)}return s(v);case Xr:e:{for(D=y.key;f!==null;){if(f.key===D)if(f.tag===4&&f.stateNode.containerInfo===y.containerInfo&&f.stateNode.implementation===y.implementation){n(v,f.sibling),f=i(f,y.children||[]),f.return=v,v=f;break e}else{n(v,f);break}else t(v,f);f=f.sibling}f=go(y,v.mode,S),f.return=v,v=f}return s(v);case Dn:return D=y._init,P(v,f,D(y._payload),S)}if(ll(y))return E(v,f,y,S);if(Hi(y))return _(v,f,y,S);gs(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,f!==null&&f.tag===6?(n(v,f.sibling),f=i(f,y),f.return=v,v=f):(n(v,f),f=yo(y,v.mode,S),f.return=v,v=f),s(v)):n(v,f)}return P}var Li=Ep(!0),jp=Ep(!1),ta=ar(null),na=null,si=null,ic=null;function lc(){ic=si=na=null}function sc(e){var t=ta.current;ge(ta),e._currentValue=t}function Jo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function hi(e,t){na=e,ic=si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Dt(e){var t=e._currentValue;if(ic!==e)if(e={context:e,memoizedValue:t,next:null},si===null){if(na===null)throw Error(L(308));si=e,na.dependencies={lanes:0,firstContext:e}}else si=si.next=e;return t}var _r=null;function ac(e){_r===null?_r=[e]:_r.push(e)}function Cp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ac(t)):(n.next=i.next,i.next=n),t.interleaved=n,_n(e,r)}function _n(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var On=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,_n(e,n)}return i=r.interleaved,i===null?(t.next=t,ac(r)):(t.next=i.next,i.next=t),r.interleaved=t,_n(e,n)}function Ds(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ku(e,n)}}function bd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ra(e,t,n,r){var i=e.updateQueue;On=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var o=a,c=o.next;o.next=null,s===null?l=c:s.next=c,s=o;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=o))}if(l!==null){var d=i.baseState;s=0,h=c=o=null,a=l;do{var p=a.lane,m=a.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var E=e,_=a;switch(p=t,m=n,_.tag){case 1:if(E=_.payload,typeof E=="function"){d=E.call(m,d,p);break e}d=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=_.payload,p=typeof E=="function"?E.call(m,d,p):E,p==null)break e;d=je({},d,p);break e;case 2:On=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else m={eventTime:m,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=m,o=d):h=h.next=m,s|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(h===null&&(o=d),i.baseState=o,i.firstBaseUpdate=c,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Ar|=s,e.lanes=s,e.memoizedState=d}}function Bd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(L(191,i));i.call(r)}}}var Gl={},Zt=ar(Gl),Tl=ar(Gl),Ll=ar(Gl);function wr(e){if(e===Gl)throw Error(L(174));return e}function uc(e,t){switch(ve(Ll,t),ve(Tl,e),ve(Zt,Gl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mo(t,e)}ge(Zt),ve(Zt,t)}function Mi(){ge(Zt),ge(Tl),ge(Ll)}function Np(e){wr(Ll.current);var t=wr(Zt.current),n=Mo(t,e.type);t!==n&&(ve(Tl,e),ve(Zt,n))}function cc(e){Tl.current===e&&(ge(Zt),ge(Tl))}var Se=ar(0);function ia(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 co=[];function dc(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var Os=En.ReactCurrentDispatcher,fo=En.ReactCurrentBatchConfig,zr=0,Ee=null,Ie=null,$e=null,la=!1,ml=!1,Ml=0,pg=0;function Ke(){throw Error(L(321))}function fc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vt(e[n],t[n]))return!1;return!0}function hc(e,t,n,r,i,l){if(zr=l,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Os.current=e===null||e.memoizedState===null?gg:xg,e=n(r,i),ml){l=0;do{if(ml=!1,Ml=0,25<=l)throw Error(L(301));l+=1,$e=Ie=null,t.updateQueue=null,Os.current=_g,e=n(r,i)}while(ml)}if(Os.current=sa,t=Ie!==null&&Ie.next!==null,zr=0,$e=Ie=Ee=null,la=!1,t)throw Error(L(300));return e}function pc(){var e=Ml!==0;return Ml=0,e}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Ee.memoizedState=$e=e:$e=$e.next=e,$e}function Ot(){if(Ie===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=$e===null?Ee.memoizedState:$e.next;if(t!==null)$e=t,Ie=e;else{if(e===null)throw Error(L(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},$e===null?Ee.memoizedState=$e=e:$e=$e.next=e}return $e}function Dl(e,t){return typeof t=="function"?t(e):t}function ho(e){var t=Ot(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ie,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var a=s=null,o=null,c=l;do{var h=c.lane;if((zr&h)===h)o!==null&&(o=o.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};o===null?(a=o=d,s=r):o=o.next=d,Ee.lanes|=h,Ar|=h}c=c.next}while(c!==null&&c!==l);o===null?s=r:o.next=a,Vt(r,t.memoizedState)||(ht=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,Ee.lanes|=l,Ar|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function po(e){var t=Ot(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=e(l,s.action),s=s.next;while(s!==i);Vt(l,t.memoizedState)||(ht=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Pp(){}function Rp(e,t){var n=Ee,r=Ot(),i=t(),l=!Vt(r.memoizedState,i);if(l&&(r.memoizedState=i,ht=!0),r=r.queue,mc(Mp.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Ol(9,Lp.bind(null,n,r,i,t),void 0,null),be===null)throw Error(L(349));zr&30||Tp(n,t,i)}return i}function Tp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lp(e,t,n,r){t.value=n,t.getSnapshot=r,Dp(t)&&Op(e)}function Mp(e,t,n){return n(function(){Dp(t)&&Op(e)})}function Dp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vt(e,n)}catch{return!0}}function Op(e){var t=_n(e,1);t!==null&&Qt(t,e,1,-1)}function Qd(e){var t=Kt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:e},t.queue=e,e=e.dispatch=yg.bind(null,Ee,e),[t.memoizedState,e]}function Ol(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Fp(){return Ot().memoizedState}function Fs(e,t,n,r){var i=Kt();Ee.flags|=e,i.memoizedState=Ol(1|t,n,void 0,r===void 0?null:r)}function ka(e,t,n,r){var i=Ot();r=r===void 0?null:r;var l=void 0;if(Ie!==null){var s=Ie.memoizedState;if(l=s.destroy,r!==null&&fc(r,s.deps)){i.memoizedState=Ol(t,n,l,r);return}}Ee.flags|=e,i.memoizedState=Ol(1|t,n,l,r)}function Vd(e,t){return Fs(8390656,8,e,t)}function mc(e,t){return ka(2048,8,e,t)}function Ip(e,t){return ka(4,2,e,t)}function zp(e,t){return ka(4,4,e,t)}function Ap(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Up(e,t,n){return n=n!=null?n.concat([e]):null,ka(4,4,Ap.bind(null,t,e),n)}function vc(){}function $p(e,t){var n=Ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bp(e,t){var n=Ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Bp(e,t,n){return zr&21?(Vt(n,t)||(n=Kh(),Ee.lanes|=n,Ar|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=n)}function mg(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=fo.transition;fo.transition={};try{e(!1),t()}finally{fe=n,fo.transition=r}}function Qp(){return Ot().memoizedState}function vg(e,t,n){var r=tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vp(e))Hp(t,n);else if(n=Cp(e,t,n,r),n!==null){var i=lt();Qt(n,e,r,i),Wp(n,t,r)}}function yg(e,t,n){var r=tr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vp(e))Hp(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,a=l(s,n);if(i.hasEagerState=!0,i.eagerState=a,Vt(a,s)){var o=t.interleaved;o===null?(i.next=i,ac(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=Cp(e,t,i,r),n!==null&&(i=lt(),Qt(n,e,r,i),Wp(n,t,r))}}function Vp(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Hp(e,t){ml=la=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ku(e,n)}}var sa={readContext:Dt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},gg={readContext:Dt,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Vd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fs(4194308,4,Ap.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fs(4,2,e,t)},useMemo:function(e,t){var n=Kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Kt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vg.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:Qd,useDebugValue:vc,useDeferredValue:function(e){return Kt().memoizedState=e},useTransition:function(){var e=Qd(!1),t=e[0];return e=mg.bind(null,e[1]),Kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,i=Kt();if(_e){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),be===null)throw Error(L(349));zr&30||Tp(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Vd(Mp.bind(null,r,l,e),[e]),r.flags|=2048,Ol(9,Lp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Kt(),t=be.identifierPrefix;if(_e){var n=pn,r=hn;n=(r&~(1<<32-Bt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ml++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},xg={readContext:Dt,useCallback:$p,useContext:Dt,useEffect:mc,useImperativeHandle:Up,useInsertionEffect:Ip,useLayoutEffect:zp,useMemo:bp,useReducer:ho,useRef:Fp,useState:function(){return ho(Dl)},useDebugValue:vc,useDeferredValue:function(e){var t=Ot();return Bp(t,Ie.memoizedState,e)},useTransition:function(){var e=ho(Dl)[0],t=Ot().memoizedState;return[e,t]},useMutableSource:Pp,useSyncExternalStore:Rp,useId:Qp,unstable_isNewReconciler:!1},_g={readContext:Dt,useCallback:$p,useContext:Dt,useEffect:mc,useImperativeHandle:Up,useInsertionEffect:Ip,useLayoutEffect:zp,useMemo:bp,useReducer:po,useRef:Fp,useState:function(){return po(Dl)},useDebugValue:vc,useDeferredValue:function(e){var t=Ot();return Ie===null?t.memoizedState=e:Bp(t,Ie.memoizedState,e)},useTransition:function(){var e=po(Dl)[0],t=Ot().memoizedState;return[e,t]},useMutableSource:Pp,useSyncExternalStore:Rp,useId:Qp,unstable_isNewReconciler:!1};function zt(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Zo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Na={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lt(),i=tr(e),l=mn(r,i);l.payload=t,n!=null&&(l.callback=n),t=Zn(e,l,i),t!==null&&(Qt(t,e,i,r),Ds(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lt(),i=tr(e),l=mn(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Zn(e,l,i),t!==null&&(Qt(t,e,i,r),Ds(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lt(),r=tr(e),i=mn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zn(e,i,r),t!==null&&(Qt(t,e,r,n),Ds(t,e,r))}};function Hd(e,t,n,r,i,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!kl(n,r)||!kl(i,l):!0}function Kp(e,t,n){var r=!1,i=lr,l=t.contextType;return typeof l=="object"&&l!==null?l=Dt(l):(i=mt(t)?Fr:Xe.current,r=t.contextTypes,l=(r=r!=null)?Ri(e,i):lr),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Na,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Wd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Na.enqueueReplaceState(t,t.state,null)}function eu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},oc(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=Dt(l):(l=mt(t)?Fr:Xe.current,i.context=Ri(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Zo(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Na.enqueueReplaceState(i,i.state,null),ra(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Di(e,t){try{var n="",r=t;do n+=qv(r),r=r.return;while(r);var i=n}catch(l){i=`
39
- Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:i,digest:null}}function mo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function tu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wg=typeof WeakMap=="function"?WeakMap:Map;function qp(e,t,n){n=mn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oa||(oa=!0,du=r),tu(e,t)},n}function Gp(e,t,n){n=mn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){tu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){tu(e,t),typeof r!="function"&&(er===null?er=new Set([this]):er.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Kd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wg;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Fg.bind(null,e,t,n),t.then(e,e))}function qd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Gd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mn(-1,1),t.tag=2,Zn(n,t,1))),n.lanes|=1),e)}var Sg=En.ReactCurrentOwner,ht=!1;function nt(e,t,n,r){t.child=e===null?jp(t,null,n,r):Li(t,e.child,n,r)}function Yd(e,t,n,r,i){n=n.render;var l=t.ref;return hi(t,i),r=hc(e,t,n,r,l,i),n=pc(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wn(e,t,i)):(_e&&n&&tc(t),t.flags|=1,nt(e,t,r,i),t.child)}function Xd(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!jc(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Yp(e,t,l,r,i)):(e=Us(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:kl,n(s,r)&&e.ref===t.ref)return wn(e,t,i)}return t.flags|=1,e=nr(l,r),e.ref=t.ref,e.return=t,t.child=e}function Yp(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(kl(l,r)&&e.ref===t.ref)if(ht=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(ht=!0);else return t.lanes=e.lanes,wn(e,t,i)}return nu(e,t,n,r,i)}function Xp(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(oi,gt),gt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(oi,gt),gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ve(oi,gt),gt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ve(oi,gt),gt|=r;return nt(e,t,i,n),t.child}function Jp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nu(e,t,n,r,i){var l=mt(n)?Fr:Xe.current;return l=Ri(t,l),hi(t,i),n=hc(e,t,n,r,l,i),r=pc(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wn(e,t,i)):(_e&&r&&tc(t),t.flags|=1,nt(e,t,n,i),t.child)}function Jd(e,t,n,r,i){if(mt(n)){var l=!0;Js(t)}else l=!1;if(hi(t,i),t.stateNode===null)Is(e,t),Kp(t,n,r),eu(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var o=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Dt(c):(c=mt(n)?Fr:Xe.current,c=Ri(t,c));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||o!==c)&&Wd(t,s,r,c),On=!1;var p=t.memoizedState;s.state=p,ra(t,r,s,i),o=t.memoizedState,a!==r||p!==o||pt.current||On?(typeof h=="function"&&(Zo(t,n,h,r),o=t.memoizedState),(a=On||Hd(t,n,a,r,p,o,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),s.props=r,s.state=o,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,kp(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:zt(t.type,a),s.props=c,d=t.pendingProps,p=s.context,o=n.contextType,typeof o=="object"&&o!==null?o=Dt(o):(o=mt(n)?Fr:Xe.current,o=Ri(t,o));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||p!==o)&&Wd(t,s,r,o),On=!1,p=t.memoizedState,s.state=p,ra(t,r,s,i);var E=t.memoizedState;a!==d||p!==E||pt.current||On?(typeof m=="function"&&(Zo(t,n,m,r),E=t.memoizedState),(c=On||Hd(t,n,c,r,p,E,o)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,E,o),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,E,o)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),s.props=r,s.state=E,s.context=o,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return ru(e,t,n,r,l,i)}function ru(e,t,n,r,i,l){Jp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&zd(t,n,!1),wn(e,t,l);r=t.stateNode,Sg.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Li(t,e.child,null,l),t.child=Li(t,null,a,l)):nt(e,t,a,l),t.memoizedState=r.state,i&&zd(t,n,!0),t.child}function Zp(e){var t=e.stateNode;t.pendingContext?Id(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Id(e,t.context,!1),uc(e,t.containerInfo)}function Zd(e,t,n,r,i){return Ti(),rc(i),t.flags|=256,nt(e,t,n,r),t.child}var iu={dehydrated:null,treeContext:null,retryLane:0};function lu(e){return{baseLanes:e,cachePool:null,transitions:null}}function em(e,t,n){var r=t.pendingProps,i=Se.current,l=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ve(Se,i&1),e===null)return Xo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Ta(s,r,0,null),e=Or(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=lu(n),t.memoizedState=iu,e):yc(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Eg(e,t,s,r,a,i,n);if(l){l=r.fallback,s=t.mode,i=e.child,a=i.sibling;var o={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=nr(i,o),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?l=nr(a,l):(l=Or(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?lu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=iu,r}return l=e.child,e=l.sibling,r=nr(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yc(e,t){return t=Ta({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xs(e,t,n,r){return r!==null&&rc(r),Li(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Eg(e,t,n,r,i,l,s){if(n)return t.flags&256?(t.flags&=-257,r=mo(Error(L(422))),xs(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=Ta({mode:"visible",children:r.children},i,0,null),l=Or(l,i,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Li(t,e.child,null,s),t.child.memoizedState=lu(s),t.memoizedState=iu,l);if(!(t.mode&1))return xs(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,l=Error(L(419)),r=mo(l,r,void 0),xs(e,t,s,r)}if(a=(s&e.childLanes)!==0,ht||a){if(r=be,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,_n(e,i),Qt(r,e,i,-1))}return Ec(),r=mo(Error(L(421))),xs(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Ig.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,St=Jn(i.nextSibling),Et=t,_e=!0,bt=null,e!==null&&(Rt[Tt++]=hn,Rt[Tt++]=pn,Rt[Tt++]=Ir,hn=e.id,pn=e.overflow,Ir=t),t=yc(t,r.children),t.flags|=4096,t)}function ef(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jo(e.return,t,n)}function vo(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function tm(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(nt(e,t,r.children,n),r=Se.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ef(e,n,t);else if(e.tag===19)ef(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}r&=1}if(ve(Se,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ia(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vo(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ia(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vo(t,!0,n,null,l);break;case"together":vo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Is(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ar|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=nr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jg(e,t,n){switch(t.tag){case 3:Zp(t),Ti();break;case 5:Np(t);break;case 1:mt(t.type)&&Js(t);break;case 4:uc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ve(ta,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(Se,Se.current&1),t.flags|=128,null):n&t.child.childLanes?em(e,t,n):(ve(Se,Se.current&1),e=wn(e,t,n),e!==null?e.sibling:null);ve(Se,Se.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return tm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ve(Se,Se.current),r)break;return null;case 22:case 23:return t.lanes=0,Xp(e,t,n)}return wn(e,t,n)}var nm,su,rm,im;nm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};su=function(){};rm=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,wr(Zt.current);var l=null;switch(n){case"input":i=Po(e,i),r=Po(e,r),l=[];break;case"select":i=je({},i,{value:void 0}),r=je({},r,{value:void 0}),l=[];break;case"textarea":i=Lo(e,i),r=Lo(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ys)}Do(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(xl.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var o=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&o!==a&&(o!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||o&&o.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in o)o.hasOwnProperty(s)&&a[s]!==o[s]&&(n||(n={}),n[s]=o[s])}else n||(l||(l=[]),l.push(c,n)),n=o;else c==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,a=a?a.__html:void 0,o!=null&&a!==o&&(l=l||[]).push(c,o)):c==="children"?typeof o!="string"&&typeof o!="number"||(l=l||[]).push(c,""+o):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(xl.hasOwnProperty(c)?(o!=null&&c==="onScroll"&&ye("scroll",e),l||a===o||(l=[])):(l=l||[]).push(c,o))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};im=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xi(e,t){if(!_e)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Cg(e,t,n){var r=t.pendingProps;switch(nc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return mt(t.type)&&Xs(),qe(t),null;case 3:return r=t.stateNode,Mi(),ge(pt),ge(Xe),dc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ys(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(pu(bt),bt=null))),su(e,t),qe(t),null;case 5:cc(t);var i=wr(Ll.current);if(n=t.type,e!==null&&t.stateNode!=null)rm(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return qe(t),null}if(e=wr(Zt.current),ys(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Xt]=t,r[Rl]=l,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<al.length;i++)ye(al[i],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ud(r,l),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ye("invalid",r);break;case"textarea":dd(r,l),ye("invalid",r)}Do(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="children"?typeof a=="string"?r.textContent!==a&&(l.suppressHydrationWarning!==!0&&vs(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(l.suppressHydrationWarning!==!0&&vs(r.textContent,a,e),i=["children",""+a]):xl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&ye("scroll",r)}switch(n){case"input":os(r),cd(r,l,!0);break;case"textarea":os(r),fd(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Ys)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Mh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xt]=t,e[Rl]=r,nm(e,t,!1,!1),t.stateNode=e;e:{switch(s=Oo(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;i<al.length;i++)ye(al[i],e);i=r;break;case"source":ye("error",e),i=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),i=r;break;case"details":ye("toggle",e),i=r;break;case"input":ud(e,r),i=Po(e,r),ye("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=je({},r,{value:void 0}),ye("invalid",e);break;case"textarea":dd(e,r),i=Lo(e,r),ye("invalid",e);break;default:i=r}Do(n,i),a=i;for(l in a)if(a.hasOwnProperty(l)){var o=a[l];l==="style"?Fh(e,o):l==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Dh(e,o)):l==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&_l(e,o):typeof o=="number"&&_l(e,""+o):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(xl.hasOwnProperty(l)?o!=null&&l==="onScroll"&&ye("scroll",e):o!=null&&bu(e,l,o,s))}switch(n){case"input":os(e),cd(e,r,!1);break;case"textarea":os(e),fd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ir(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?ui(e,!!r.multiple,l,!1):r.defaultValue!=null&&ui(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ys)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return qe(t),null;case 6:if(e&&t.stateNode!=null)im(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=wr(Ll.current),wr(Zt.current),ys(t)){if(r=t.stateNode,n=t.memoizedProps,r[Xt]=t,(l=r.nodeValue!==n)&&(e=Et,e!==null))switch(e.tag){case 3:vs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vs(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xt]=t,t.stateNode=r}return qe(t),null;case 13:if(ge(Se),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&St!==null&&t.mode&1&&!(t.flags&128))Sp(),Ti(),t.flags|=98560,l=!1;else if(l=ys(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(L(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(L(317));l[Xt]=t}else Ti(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qe(t),l=!1}else bt!==null&&(pu(bt),bt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Se.current&1?Ae===0&&(Ae=3):Ec())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return Mi(),su(e,t),e===null&&Nl(t.stateNode.containerInfo),qe(t),null;case 10:return sc(t.type._context),qe(t),null;case 17:return mt(t.type)&&Xs(),qe(t),null;case 19:if(ge(Se),l=t.memoizedState,l===null)return qe(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)Xi(l,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ia(e),s!==null){for(t.flags|=128,Xi(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ve(Se,Se.current&1|2),t.child}e=e.sibling}l.tail!==null&&Me()>Oi&&(t.flags|=128,r=!0,Xi(l,!1),t.lanes=4194304)}else{if(!r)if(e=ia(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!_e)return qe(t),null}else 2*Me()-l.renderingStartTime>Oi&&n!==1073741824&&(t.flags|=128,r=!0,Xi(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Me(),t.sibling=null,n=Se.current,ve(Se,r?n&1|2:n&1),t):(qe(t),null);case 22:case 23:return Sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gt&1073741824&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function kg(e,t){switch(nc(t),t.tag){case 1:return mt(t.type)&&Xs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mi(),ge(pt),ge(Xe),dc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cc(t),null;case 13:if(ge(Se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(Se),null;case 4:return Mi(),null;case 10:return sc(t.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var _s=!1,Ye=!1,Ng=typeof WeakSet=="function"?WeakSet:Set,A=null;function ai(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function au(e,t,n){try{n()}catch(r){Te(e,t,r)}}var tf=!1;function Pg(e,t){if(Vo=Ks,e=up(),ec(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,a=-1,o=-1,c=0,h=0,d=e,p=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==l||r!==0&&d.nodeType!==3||(o=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===n&&++c===i&&(a=s),p===l&&++h===r&&(o=s),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}n=a===-1||o===-1?null:{start:a,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ho={focusedElem:e,selectionRange:n},Ks=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var _=E.memoizedProps,P=E.memoizedState,v=t.stateNode,f=v.getSnapshotBeforeUpdate(t.elementType===t.type?_:zt(t.type,_),P);v.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){Te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return E=tf,tf=!1,E}function vl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&au(t,n,l)}i=i.next}while(i!==r)}}function Pa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lm(e){var t=e.alternate;t!==null&&(e.alternate=null,lm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xt],delete t[Rl],delete t[qo],delete t[cg],delete t[dg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sm(e){return e.tag===5||e.tag===3||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sm(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.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 uu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ys));else if(r!==4&&(e=e.child,e!==null))for(uu(e,t,n),e=e.sibling;e!==null;)uu(e,t,n),e=e.sibling}function cu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cu(e,t,n),e=e.sibling;e!==null;)cu(e,t,n),e=e.sibling}var Qe=null,Ut=!1;function Rn(e,t,n){for(n=n.child;n!==null;)am(e,t,n),n=n.sibling}function am(e,t,n){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(_a,n)}catch{}switch(n.tag){case 5:Ye||ai(n,t);case 6:var r=Qe,i=Ut;Qe=null,Rn(e,t,n),Qe=r,Ut=i,Qe!==null&&(Ut?(e=Qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qe.removeChild(n.stateNode));break;case 18:Qe!==null&&(Ut?(e=Qe,n=n.stateNode,e.nodeType===8?oo(e.parentNode,n):e.nodeType===1&&oo(e,n),jl(e)):oo(Qe,n.stateNode));break;case 4:r=Qe,i=Ut,Qe=n.stateNode.containerInfo,Ut=!0,Rn(e,t,n),Qe=r,Ut=i;break;case 0:case 11:case 14:case 15:if(!Ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&au(n,t,s),i=i.next}while(i!==r)}Rn(e,t,n);break;case 1:if(!Ye&&(ai(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Te(n,t,a)}Rn(e,t,n);break;case 21:Rn(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,Rn(e,t,n),Ye=r):Rn(e,t,n);break;default:Rn(e,t,n)}}function rf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ng),t.forEach(function(r){var i=zg.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function It(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Qe=a.stateNode,Ut=!1;break e;case 3:Qe=a.stateNode.containerInfo,Ut=!0;break e;case 4:Qe=a.stateNode.containerInfo,Ut=!0;break e}a=a.return}if(Qe===null)throw Error(L(160));am(l,s,i),Qe=null,Ut=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(c){Te(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)om(t,e),t=t.sibling}function om(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(It(t,e),Wt(e),r&4){try{vl(3,e,e.return),Pa(3,e)}catch(_){Te(e,e.return,_)}try{vl(5,e,e.return)}catch(_){Te(e,e.return,_)}}break;case 1:It(t,e),Wt(e),r&512&&n!==null&&ai(n,n.return);break;case 5:if(It(t,e),Wt(e),r&512&&n!==null&&ai(n,n.return),e.flags&32){var i=e.stateNode;try{_l(i,"")}catch(_){Te(e,e.return,_)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,a=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{a==="input"&&l.type==="radio"&&l.name!=null&&Th(i,l),Oo(a,s);var c=Oo(a,l);for(s=0;s<o.length;s+=2){var h=o[s],d=o[s+1];h==="style"?Fh(i,d):h==="dangerouslySetInnerHTML"?Dh(i,d):h==="children"?_l(i,d):bu(i,h,d,c)}switch(a){case"input":Ro(i,l);break;case"textarea":Lh(i,l);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?ui(i,!!l.multiple,m,!1):p!==!!l.multiple&&(l.defaultValue!=null?ui(i,!!l.multiple,l.defaultValue,!0):ui(i,!!l.multiple,l.multiple?[]:"",!1))}i[Rl]=l}catch(_){Te(e,e.return,_)}}break;case 6:if(It(t,e),Wt(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(_){Te(e,e.return,_)}}break;case 3:if(It(t,e),Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jl(t.containerInfo)}catch(_){Te(e,e.return,_)}break;case 4:It(t,e),Wt(e);break;case 13:It(t,e),Wt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(_c=Me())),r&4&&rf(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Ye=(c=Ye)||h,It(t,e),Ye=c):It(t,e),Wt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(A=e,h=e.child;h!==null;){for(d=A=h;A!==null;){switch(p=A,m=p.child,p.tag){case 0:case 11:case 14:case 15:vl(4,p,p.return);break;case 1:ai(p,p.return);var E=p.stateNode;if(typeof E.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(_){Te(r,n,_)}}break;case 5:ai(p,p.return);break;case 22:if(p.memoizedState!==null){sf(d);continue}}m!==null?(m.return=p,A=m):sf(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{i=d.stateNode,c?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(a=d.stateNode,o=d.memoizedProps.style,s=o!=null&&o.hasOwnProperty("display")?o.display:null,a.style.display=Oh("display",s))}catch(_){Te(e,e.return,_)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(_){Te(e,e.return,_)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:It(t,e),Wt(e),r&4&&rf(e);break;case 21:break;default:It(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(sm(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(_l(i,""),r.flags&=-33);var l=nf(e);cu(e,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=nf(e);uu(e,a,s);break;default:throw Error(L(161))}}catch(o){Te(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rg(e,t,n){A=e,um(e)}function um(e,t,n){for(var r=(e.mode&1)!==0;A!==null;){var i=A,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||_s;if(!s){var a=i.alternate,o=a!==null&&a.memoizedState!==null||Ye;a=_s;var c=Ye;if(_s=s,(Ye=o)&&!c)for(A=i;A!==null;)s=A,o=s.child,s.tag===22&&s.memoizedState!==null?af(i):o!==null?(o.return=s,A=o):af(i);for(;l!==null;)A=l,um(l),l=l.sibling;A=i,_s=a,Ye=c}lf(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,A=l):lf(e)}}function lf(e){for(;A!==null;){var t=A;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ye||Pa(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ye)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:zt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Bd(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Bd(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&jl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Ye||t.flags&512&&ou(t)}catch(p){Te(t,t.return,p)}}if(t===e){A=null;break}if(n=t.sibling,n!==null){n.return=t.return,A=n;break}A=t.return}}function sf(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var n=t.sibling;if(n!==null){n.return=t.return,A=n;break}A=t.return}}function af(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Pa(4,t)}catch(o){Te(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){Te(t,i,o)}}var l=t.return;try{ou(t)}catch(o){Te(t,l,o)}break;case 5:var s=t.return;try{ou(t)}catch(o){Te(t,s,o)}}}catch(o){Te(t,t.return,o)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var Tg=Math.ceil,aa=En.ReactCurrentDispatcher,gc=En.ReactCurrentOwner,Mt=En.ReactCurrentBatchConfig,re=0,be=null,Fe=null,Ve=0,gt=0,oi=ar(0),Ae=0,Fl=null,Ar=0,Ra=0,xc=0,yl=null,ft=null,_c=0,Oi=1/0,an=null,oa=!1,du=null,er=null,ws=!1,Kn=null,ua=0,gl=0,fu=null,zs=-1,As=0;function lt(){return re&6?Me():zs!==-1?zs:zs=Me()}function tr(e){return e.mode&1?re&2&&Ve!==0?Ve&-Ve:hg.transition!==null?(As===0&&(As=Kh()),As):(e=fe,e!==0||(e=window.event,e=e===void 0?16:ep(e.type)),e):1}function Qt(e,t,n,r){if(50<gl)throw gl=0,fu=null,Error(L(185));Wl(e,n,r),(!(re&2)||e!==be)&&(e===be&&(!(re&2)&&(Ra|=n),Ae===4&&In(e,Ve)),vt(e,r),n===1&&re===0&&!(t.mode&1)&&(Oi=Me()+500,Ca&&or()))}function vt(e,t){var n=e.callbackNode;hy(e,t);var r=Ws(e,e===be?Ve:0);if(r===0)n!==null&&md(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&md(n),t===1)e.tag===0?fg(of.bind(null,e)):xp(of.bind(null,e)),og(function(){!(re&6)&&or()}),n=null;else{switch(qh(r)){case 1:n=Wu;break;case 4:n=Hh;break;case 16:n=Hs;break;case 536870912:n=Wh;break;default:n=Hs}n=ym(n,cm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function cm(e,t){if(zs=-1,As=0,re&6)throw Error(L(327));var n=e.callbackNode;if(pi()&&e.callbackNode!==n)return null;var r=Ws(e,e===be?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ca(e,r);else{t=r;var i=re;re|=2;var l=fm();(be!==e||Ve!==t)&&(an=null,Oi=Me()+500,Dr(e,t));do try{Dg();break}catch(a){dm(e,a)}while(!0);lc(),aa.current=l,re=i,Fe!==null?t=0:(be=null,Ve=0,t=Ae)}if(t!==0){if(t===2&&(i=Uo(e),i!==0&&(r=i,t=hu(e,i))),t===1)throw n=Fl,Dr(e,0),In(e,r),vt(e,Me()),n;if(t===6)In(e,r);else{if(i=e.current.alternate,!(r&30)&&!Lg(i)&&(t=ca(e,r),t===2&&(l=Uo(e),l!==0&&(r=l,t=hu(e,l))),t===1))throw n=Fl,Dr(e,0),In(e,r),vt(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:vr(e,ft,an);break;case 3:if(In(e,r),(r&130023424)===r&&(t=_c+500-Me(),10<t)){if(Ws(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ko(vr.bind(null,e,ft,an),t);break}vr(e,ft,an);break;case 4:if(In(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Bt(r);l=1<<s,s=t[s],s>i&&(i=s),r&=~l}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Tg(r/1960))-r,10<r){e.timeoutHandle=Ko(vr.bind(null,e,ft,an),r);break}vr(e,ft,an);break;case 5:vr(e,ft,an);break;default:throw Error(L(329))}}}return vt(e,Me()),e.callbackNode===n?cm.bind(null,e):null}function hu(e,t){var n=yl;return e.current.memoizedState.isDehydrated&&(Dr(e,t).flags|=256),e=ca(e,t),e!==2&&(t=ft,ft=n,t!==null&&pu(t)),e}function pu(e){ft===null?ft=e:ft.push.apply(ft,e)}function Lg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Vt(l(),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 In(e,t){for(t&=~xc,t&=~Ra,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bt(t),r=1<<n;e[n]=-1,t&=~r}}function of(e){if(re&6)throw Error(L(327));pi();var t=Ws(e,0);if(!(t&1))return vt(e,Me()),null;var n=ca(e,t);if(e.tag!==0&&n===2){var r=Uo(e);r!==0&&(t=r,n=hu(e,r))}if(n===1)throw n=Fl,Dr(e,0),In(e,t),vt(e,Me()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ft,an),vt(e,Me()),null}function wc(e,t){var n=re;re|=1;try{return e(t)}finally{re=n,re===0&&(Oi=Me()+500,Ca&&or())}}function Ur(e){Kn!==null&&Kn.tag===0&&!(re&6)&&pi();var t=re;re|=1;var n=Mt.transition,r=fe;try{if(Mt.transition=null,fe=1,e)return e()}finally{fe=r,Mt.transition=n,re=t,!(re&6)&&or()}}function Sc(){gt=oi.current,ge(oi)}function Dr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ag(n)),Fe!==null)for(n=Fe.return;n!==null;){var r=n;switch(nc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xs();break;case 3:Mi(),ge(pt),ge(Xe),dc();break;case 5:cc(r);break;case 4:Mi();break;case 13:ge(Se);break;case 19:ge(Se);break;case 10:sc(r.type._context);break;case 22:case 23:Sc()}n=n.return}if(be=e,Fe=e=nr(e.current,null),Ve=gt=t,Ae=0,Fl=null,xc=Ra=Ar=0,ft=yl=null,_r!==null){for(t=0;t<_r.length;t++)if(n=_r[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}_r=null}return e}function dm(e,t){do{var n=Fe;try{if(lc(),Os.current=sa,la){for(var r=Ee.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}la=!1}if(zr=0,$e=Ie=Ee=null,ml=!1,Ml=0,gc.current=null,n===null||n.return===null){Ae=1,Fl=t,Fe=null;break}e:{var l=e,s=n.return,a=n,o=t;if(t=Ve,a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=o,h=a,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=qd(s);if(m!==null){m.flags&=-257,Gd(m,s,a,l,t),m.mode&1&&Kd(l,c,t),t=m,o=c;var E=t.updateQueue;if(E===null){var _=new Set;_.add(o),t.updateQueue=_}else E.add(o);break e}else{if(!(t&1)){Kd(l,c,t),Ec();break e}o=Error(L(426))}}else if(_e&&a.mode&1){var P=qd(s);if(P!==null){!(P.flags&65536)&&(P.flags|=256),Gd(P,s,a,l,t),rc(Di(o,a));break e}}l=o=Di(o,a),Ae!==4&&(Ae=2),yl===null?yl=[l]:yl.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var v=qp(l,o,t);bd(l,v);break e;case 1:a=o;var f=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(er===null||!er.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var S=Gp(l,a,t);bd(l,S);break e}}l=l.return}while(l!==null)}pm(n)}catch(R){t=R,Fe===n&&n!==null&&(Fe=n=n.return);continue}break}while(!0)}function fm(){var e=aa.current;return aa.current=sa,e===null?sa:e}function Ec(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),be===null||!(Ar&268435455)&&!(Ra&268435455)||In(be,Ve)}function ca(e,t){var n=re;re|=2;var r=fm();(be!==e||Ve!==t)&&(an=null,Dr(e,t));do try{Mg();break}catch(i){dm(e,i)}while(!0);if(lc(),re=n,aa.current=r,Fe!==null)throw Error(L(261));return be=null,Ve=0,Ae}function Mg(){for(;Fe!==null;)hm(Fe)}function Dg(){for(;Fe!==null&&!iy();)hm(Fe)}function hm(e){var t=vm(e.alternate,e,gt);e.memoizedProps=e.pendingProps,t===null?pm(e):Fe=t,gc.current=null}function pm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=kg(n,t),n!==null){n.flags&=32767,Fe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,Fe=null;return}}else if(n=Cg(n,t,gt),n!==null){Fe=n;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);Ae===0&&(Ae=5)}function vr(e,t,n){var r=fe,i=Mt.transition;try{Mt.transition=null,fe=1,Og(e,t,n,r)}finally{Mt.transition=i,fe=r}return null}function Og(e,t,n,r){do pi();while(Kn!==null);if(re&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(py(e,l),e===be&&(Fe=be=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ws||(ws=!0,ym(Hs,function(){return pi(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Mt.transition,Mt.transition=null;var s=fe;fe=1;var a=re;re|=4,gc.current=null,Pg(e,n),om(n,e),eg(Ho),Ks=!!Vo,Ho=Vo=null,e.current=n,Rg(n),ly(),re=a,fe=s,Mt.transition=l}else e.current=n;if(ws&&(ws=!1,Kn=e,ua=i),l=e.pendingLanes,l===0&&(er=null),oy(n.stateNode),vt(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(oa)throw oa=!1,e=du,du=null,e;return ua&1&&e.tag!==0&&pi(),l=e.pendingLanes,l&1?e===fu?gl++:(gl=0,fu=e):gl=0,or(),null}function pi(){if(Kn!==null){var e=qh(ua),t=Mt.transition,n=fe;try{if(Mt.transition=null,fe=16>e?16:e,Kn===null)var r=!1;else{if(e=Kn,Kn=null,ua=0,re&6)throw Error(L(331));var i=re;for(re|=4,A=e.current;A!==null;){var l=A,s=l.child;if(A.flags&16){var a=l.deletions;if(a!==null){for(var o=0;o<a.length;o++){var c=a[o];for(A=c;A!==null;){var h=A;switch(h.tag){case 0:case 11:case 15:vl(8,h,l)}var d=h.child;if(d!==null)d.return=h,A=d;else for(;A!==null;){h=A;var p=h.sibling,m=h.return;if(lm(h),h===c){A=null;break}if(p!==null){p.return=m,A=p;break}A=m}}}var E=l.alternate;if(E!==null){var _=E.child;if(_!==null){E.child=null;do{var P=_.sibling;_.sibling=null,_=P}while(_!==null)}}A=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,A=s;else e:for(;A!==null;){if(l=A,l.flags&2048)switch(l.tag){case 0:case 11:case 15:vl(9,l,l.return)}var v=l.sibling;if(v!==null){v.return=l.return,A=v;break e}A=l.return}}var f=e.current;for(A=f;A!==null;){s=A;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,A=y;else e:for(s=f;A!==null;){if(a=A,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pa(9,a)}}catch(R){Te(a,a.return,R)}if(a===s){A=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,A=S;break e}A=a.return}}if(re=i,or(),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(_a,e)}catch{}r=!0}return r}finally{fe=n,Mt.transition=t}}return!1}function uf(e,t,n){t=Di(n,t),t=qp(e,t,1),e=Zn(e,t,1),t=lt(),e!==null&&(Wl(e,1,t),vt(e,t))}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 r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(er===null||!er.has(r))){e=Di(n,e),e=Gp(t,e,1),t=Zn(t,e,1),e=lt(),t!==null&&(Wl(t,1,e),vt(t,e));break}}t=t.return}}function Fg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=lt(),e.pingedLanes|=e.suspendedLanes&n,be===e&&(Ve&n)===n&&(Ae===4||Ae===3&&(Ve&130023424)===Ve&&500>Me()-_c?Dr(e,0):xc|=n),vt(e,t)}function mm(e,t){t===0&&(e.mode&1?(t=ds,ds<<=1,!(ds&130023424)&&(ds=4194304)):t=1);var n=lt();e=_n(e,t),e!==null&&(Wl(e,t,n),vt(e,n))}function Ig(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mm(e,n)}function zg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),mm(e,n)}var vm;vm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)ht=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ht=!1,jg(e,t,n);ht=!!(e.flags&131072)}else ht=!1,_e&&t.flags&1048576&&_p(t,ea,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Is(e,t),e=t.pendingProps;var i=Ri(t,Xe.current);hi(t,n),i=hc(null,t,r,e,i,n);var l=pc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(r)?(l=!0,Js(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,oc(t),i.updater=Na,t.stateNode=i,i._reactInternals=t,eu(t,r,e,n),t=ru(null,t,r,!0,l,n)):(t.tag=0,_e&&l&&tc(t),nt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Is(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ug(r),e=zt(r,e),i){case 0:t=nu(null,t,r,e,n);break e;case 1:t=Jd(null,t,r,e,n);break e;case 11:t=Yd(null,t,r,e,n);break e;case 14:t=Xd(null,t,r,zt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zt(r,i),nu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zt(r,i),Jd(e,t,r,i,n);case 3:e:{if(Zp(t),e===null)throw Error(L(387));r=t.pendingProps,l=t.memoizedState,i=l.element,kp(e,t),ra(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Di(Error(L(423)),t),t=Zd(e,t,r,n,i);break e}else if(r!==i){i=Di(Error(L(424)),t),t=Zd(e,t,r,n,i);break e}else for(St=Jn(t.stateNode.containerInfo.firstChild),Et=t,_e=!0,bt=null,n=jp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ti(),r===i){t=wn(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return Np(t),e===null&&Xo(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,Wo(r,i)?s=null:l!==null&&Wo(r,l)&&(t.flags|=32),Jp(e,t),nt(e,t,s,n),t.child;case 6:return e===null&&Xo(t),null;case 13:return em(e,t,n);case 4:return uc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zt(r,i),Yd(e,t,r,i,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,ve(ta,r._currentValue),r._currentValue=s,l!==null)if(Vt(l.value,s)){if(l.children===i.children&&!pt.current){t=wn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var o=a.firstContext;o!==null;){if(o.context===r){if(l.tag===1){o=mn(-1,n&-n),o.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?o.next=o:(o.next=h.next,h.next=o),c.pending=o}}l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Jo(l.return,n,t),a.lanes|=n;break}o=o.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(L(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Jo(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}nt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,hi(t,n),i=Dt(i),r=r(i),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,i=zt(r,t.pendingProps),i=zt(r.type,i),Xd(e,t,r,i,n);case 15:return Yp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zt(r,i),Is(e,t),t.tag=1,mt(r)?(e=!0,Js(t)):e=!1,hi(t,n),Kp(t,r,i),eu(t,r,i,n),ru(null,t,r,!0,e,n);case 19:return tm(e,t,n);case 22:return Xp(e,t,n)}throw Error(L(156,t.tag))};function ym(e,t){return Vh(e,t)}function Ag(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new Ag(e,t,n,r)}function jc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ug(e){if(typeof e=="function")return jc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qu)return 11;if(e===Vu)return 14}return 2}function nr(e,t){var n=e.alternate;return n===null?(n=Lt(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&14680064,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}function Us(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")jc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Jr:return Or(n.children,i,l,t);case Bu:s=8,i|=8;break;case jo:return e=Lt(12,n,t,i|2),e.elementType=jo,e.lanes=l,e;case Co:return e=Lt(13,n,t,i),e.elementType=Co,e.lanes=l,e;case ko:return e=Lt(19,n,t,i),e.elementType=ko,e.lanes=l,e;case Nh:return Ta(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ch:s=10;break e;case kh:s=9;break e;case Qu:s=11;break e;case Vu:s=14;break e;case Dn:s=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Lt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Or(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Ta(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=Nh,e.lanes=n,e.stateNode={isHidden:!1},e}function yo(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function go(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $g(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xa(0),this.expirationTimes=Xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xa(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Cc(e,t,n,r,i,l,s,a,o){return e=new $g(e,t,n,a,o),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Lt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},oc(l),e}function bg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function gm(e){if(!e)return lr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(mt(n))return gp(e,n,t)}return t}function xm(e,t,n,r,i,l,s,a,o){return e=Cc(n,r,!0,e,i,l,s,a,o),e.context=gm(null),n=e.current,r=lt(),i=tr(n),l=mn(r,i),l.callback=t??null,Zn(n,l,i),e.current.lanes=i,Wl(e,i,r),vt(e,r),e}function La(e,t,n,r){var i=t.current,l=lt(),s=tr(i);return n=gm(n),t.context===null?t.context=n:t.pendingContext=n,t=mn(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zn(i,t,s),e!==null&&(Qt(e,i,s,l),Ds(e,i,s)),s}function da(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kc(e,t){cf(e,t),(e=e.alternate)&&cf(e,t)}function Bg(){return null}var _m=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nc(e){this._internalRoot=e}Ma.prototype.render=Nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));La(e,t,null,null)};Ma.prototype.unmount=Nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ur(function(){La(null,e,null,null)}),t[xn]=null}};function Ma(e){this._internalRoot=e}Ma.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fn.length&&t!==0&&t<Fn[n].priority;n++);Fn.splice(n,0,e),n===0&&Zh(e)}};function Pc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Da(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function df(){}function Qg(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var c=da(s);l.call(c)}}var s=xm(t,r,e,0,null,!1,!1,"",df);return e._reactRootContainer=s,e[xn]=s.current,Nl(e.nodeType===8?e.parentNode:e),Ur(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=da(o);a.call(c)}}var o=Cc(e,0,!1,null,null,!1,!1,"",df);return e._reactRootContainer=o,e[xn]=o.current,Nl(e.nodeType===8?e.parentNode:e),Ur(function(){La(t,o,n,r)}),o}function Oa(e,t,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var a=i;i=function(){var o=da(s);a.call(o)}}La(t,s,e,i)}else s=Qg(n,t,e,i,r);return da(s)}Gh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sl(t.pendingLanes);n!==0&&(Ku(t,n|1),vt(t,Me()),!(re&6)&&(Oi=Me()+500,or()))}break;case 13:Ur(function(){var r=_n(e,1);if(r!==null){var i=lt();Qt(r,e,1,i)}}),kc(e,1)}};qu=function(e){if(e.tag===13){var t=_n(e,134217728);if(t!==null){var n=lt();Qt(t,e,134217728,n)}kc(e,134217728)}};Yh=function(e){if(e.tag===13){var t=tr(e),n=_n(e,t);if(n!==null){var r=lt();Qt(n,e,t,r)}kc(e,t)}};Xh=function(){return fe};Jh=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};Io=function(e,t,n){switch(t){case"input":if(Ro(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ja(r);if(!i)throw Error(L(90));Rh(r),Ro(r,i)}}}break;case"textarea":Lh(e,n);break;case"select":t=n.value,t!=null&&ui(e,!!n.multiple,t,!1)}};Ah=wc;Uh=Ur;var Vg={usingClientEntryPoint:!1,Events:[ql,ni,ja,Ih,zh,wc]},Ji={findFiberByHostInstance:xr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Hg={bundleType:Ji.bundleType,version:Ji.version,rendererPackageName:Ji.rendererPackageName,rendererConfig:Ji.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:En.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bh(e),e===null?null:e.stateNode},findFiberByHostInstance:Ji.findFiberByHostInstance||Bg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ss.isDisabled&&Ss.supportsFiber)try{_a=Ss.inject(Hg),Jt=Ss}catch{}}Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vg;Ct.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pc(t))throw Error(L(200));return bg(e,t,null,n)};Ct.createRoot=function(e,t){if(!Pc(e))throw Error(L(299));var n=!1,r="",i=_m;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Cc(e,1,!1,null,null,n,!1,r,i),e[xn]=t.current,Nl(e.nodeType===8?e.parentNode:e),new Nc(t)};Ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=Bh(t),e=e===null?null:e.stateNode,e};Ct.flushSync=function(e){return Ur(e)};Ct.hydrate=function(e,t,n){if(!Da(t))throw Error(L(200));return Oa(null,e,t,!0,n)};Ct.hydrateRoot=function(e,t,n){if(!Pc(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=_m;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=xm(t,null,e,1,n??null,i,!1,l,s),e[xn]=t.current,Nl(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ma(t)};Ct.render=function(e,t,n){if(!Da(t))throw Error(L(200));return Oa(null,e,t,!1,n)};Ct.unmountComponentAtNode=function(e){if(!Da(e))throw Error(L(40));return e._reactRootContainer?(Ur(function(){Oa(null,null,e,!1,function(){e._reactRootContainer=null,e[xn]=null})}),!0):!1};Ct.unstable_batchedUpdates=wc;Ct.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Da(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return Oa(e,t,n,!1,r)};Ct.version="18.3.1-next-f1338f8080-20240426";function wm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wm)}catch(e){console.error(e)}}wm(),wh.exports=Ct;var Rc=wh.exports;const Wg=uh(Rc),Kg=oh({__proto__:null,default:Wg},[Rc]);var Sm,ff=Rc;Sm=ff.createRoot,ff.hydrateRoot;var Ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jr,zn,mi,Xf,qg=(Xf=class extends Ui{constructor(){super();Q(this,jr);Q(this,zn);Q(this,mi);I(this,mi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){g(this,zn)||this.setEventListener(g(this,mi))}onUnsubscribe(){var t;this.hasListeners()||((t=g(this,zn))==null||t.call(this),I(this,zn,void 0))}setEventListener(t){var n;I(this,mi,t),(n=g(this,zn))==null||n.call(this),I(this,zn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){g(this,jr)!==t&&(I(this,jr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof g(this,jr)=="boolean"?g(this,jr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jr=new WeakMap,zn=new WeakMap,mi=new WeakMap,Xf),Tc=new qg,Gg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},An,Ou,Jf,Yg=(Jf=class{constructor(){Q(this,An,Gg);Q(this,Ou,!1)}setTimeoutProvider(e){I(this,An,e)}setTimeout(e,t){return g(this,An).setTimeout(e,t)}clearTimeout(e){g(this,An).clearTimeout(e)}setInterval(e,t){return g(this,An).setInterval(e,t)}clearInterval(e){g(this,An).clearInterval(e)}},An=new WeakMap,Ou=new WeakMap,Jf),Sr=new Yg;function Xg(e){setTimeout(e,0)}var Jg=typeof window>"u"||"Deno"in globalThis;function rt(){}function Zg(e,t){return typeof e=="function"?e(t):e}function mu(e){return typeof e=="number"&&e>=0&&e!==1/0}function Em(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e=="function"?e(t):e}function _t(e,t){return typeof e=="function"?e(t):e}function hf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==Lc(s,t.options))return!1}else if(!Il(t.queryKey,s))return!1}if(n!=="all"){const o=t.isActive();if(n==="active"&&!o||n==="inactive"&&o)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||l&&!l(t))}function pf(e,t){const{exact:n,status:r,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if($r(t.options.mutationKey)!==$r(l))return!1}else if(!Il(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Lc(e,t){return((t==null?void 0:t.queryKeyHashFn)||$r)(e)}function $r(e){return JSON.stringify(e,(t,n)=>vu(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Il(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Il(e[n],t[n])):!1}var e0=Object.prototype.hasOwnProperty;function jm(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=mf(e)&&mf(t);if(!r&&!(vu(e)&&vu(t)))return t;const l=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,o=r?new Array(a):{};let c=0;for(let h=0;h<a;h++){const d=r?h:s[h],p=e[d],m=t[d];if(p===m){o[d]=p,(r?h<l:e0.call(e,d))&&c++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){o[d]=m;continue}const E=jm(p,m,n+1);o[d]=E,E===p&&c++}return l===a&&c===l?e:o}function fa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function mf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vu(e){if(!vf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vf(e){return Object.prototype.toString.call(e)==="[object Object]"}function t0(e){return new Promise(t=>{Sr.setTimeout(t,e)})}function yu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?jm(e,t):t}function n0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function r0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Mc=Symbol();function Cm(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Mc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Dc(e,t){return typeof e=="function"?e(...t):!!e}function i0(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var zl=(()=>{let e=()=>Jg;return{isServer(){return e()},setIsServer(t){e=t}}})();function gu(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var l0=Xg;function s0(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=l0;const l=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(o=>{n(o)})})})};return{batch:a=>{let o;t++;try{o=a()}finally{t--,t||s()}return o},batchCalls:a=>(...o)=>{l(()=>{a(...o)})},schedule:l,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ze=s0(),vi,Un,yi,Zf,a0=(Zf=class extends Ui{constructor(){super();Q(this,vi,!0);Q(this,Un);Q(this,yi);I(this,yi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){g(this,Un)||this.setEventListener(g(this,yi))}onUnsubscribe(){var t;this.hasListeners()||((t=g(this,Un))==null||t.call(this),I(this,Un,void 0))}setEventListener(t){var n;I(this,yi,t),(n=g(this,Un))==null||n.call(this),I(this,Un,t(this.setOnline.bind(this)))}setOnline(t){g(this,vi)!==t&&(I(this,vi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return g(this,vi)}},vi=new WeakMap,Un=new WeakMap,yi=new WeakMap,Zf),ha=new a0;function o0(e){return Math.min(1e3*2**e,3e4)}function km(e){return(e??"online")==="online"?ha.isOnline():!0}var xu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Nm(e){let t=!1,n=0,r;const i=gu(),l=()=>i.status!=="pending",s=_=>{var P;if(!l()){const v=new xu(_);p(v),(P=e.onCancel)==null||P.call(e,v)}},a=()=>{t=!0},o=()=>{t=!1},c=()=>Tc.isFocused()&&(e.networkMode==="always"||ha.isOnline())&&e.canRun(),h=()=>km(e.networkMode)&&e.canRun(),d=_=>{l()||(r==null||r(),i.resolve(_))},p=_=>{l()||(r==null||r(),i.reject(_))},m=()=>new Promise(_=>{var P;r=v=>{(l()||c())&&_(v)},(P=e.onPause)==null||P.call(e)}).then(()=>{var _;r=void 0,l()||(_=e.onContinue)==null||_.call(e)}),E=()=>{if(l())return;let _;const P=n===0?e.initialPromise:void 0;try{_=P??e.fn()}catch(v){_=Promise.reject(v)}Promise.resolve(_).then(d).catch(v=>{var D;if(l())return;const f=e.retry??(zl.isServer()?0:3),y=e.retryDelay??o0,S=typeof y=="function"?y(n,v):y,R=f===!0||typeof f=="number"&&n<f||typeof f=="function"&&f(n,v);if(t||!R){p(v);return}n++,(D=e.onFail)==null||D.call(e,n,v),t0(S).then(()=>c()?void 0:m()).then(()=>{t?p(v):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:o,canStart:h,start:()=>(h()?E():m().then(E),i)}}var Cr,eh,Pm=(eh=class{constructor(){Q(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mu(this.gcTime)&&I(this,Cr,Sr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zl.isServer()?1/0:5*60*1e3))}clearGcTimeout(){g(this,Cr)!==void 0&&(Sr.clearTimeout(g(this,Cr)),I(this,Cr,void 0))}},Cr=new WeakMap,eh);function u0(e){return{onFetch:(t,n)=>{var h,d,p,m,E;const r=t.options,i=(p=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,l=((m=t.state.data)==null?void 0:m.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let a={pages:[],pageParams:[]},o=0;const c=async()=>{let _=!1;const P=y=>{i0(y,()=>t.signal,()=>_=!0)},v=Cm(t.options,t.fetchOptions),f=async(y,S,R)=>{if(_)return Promise.reject(t.signal.reason);if(S==null&&y.pages.length)return Promise.resolve(y);const w=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:S,direction:R?"backward":"forward",meta:t.options.meta};return P(Y),Y})(),N=await v(w),{maxPages:z}=t.options,M=R?r0:n0;return{pages:M(y.pages,N,z),pageParams:M(y.pageParams,S,z)}};if(i&&l.length){const y=i==="backward",S=y?c0:yf,R={pages:l,pageParams:s},D=S(r,R);a=await f(R,D,y)}else{const y=e??l.length;do{const S=o===0?s[0]??r.initialPageParam:yf(r,a);if(o>0&&S==null)break;a=await f(a,S),o++}while(o<y)}return a};t.options.persister?t.fetchFn=()=>{var _,P;return(P=(_=t.options).persister)==null?void 0:P.call(_,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function yf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function c0(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var gi,kr,xi,Pt,Nr,Ue,$l,Pr,xt,Rm,sn,th,d0=(th=class extends Pm{constructor(t){super();Q(this,xt);Q(this,gi);Q(this,kr);Q(this,xi);Q(this,Pt);Q(this,Nr);Q(this,Ue);Q(this,$l);Q(this,Pr);I(this,Pr,!1),I(this,$l,t.defaultOptions),this.setOptions(t.options),this.observers=[],I(this,Nr,t.client),I(this,Pt,g(this,Nr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,I(this,kr,xf(this.options)),this.state=t.state??g(this,kr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return g(this,gi)}get promise(){var t;return(t=g(this,Ue))==null?void 0:t.promise}setOptions(t){if(this.options={...g(this,$l),...t},t!=null&&t._type&&I(this,gi,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=xf(this.options);n.data!==void 0&&(this.setState(gf(n.data,n.dataUpdatedAt)),I(this,kr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&g(this,Pt).remove(this)}setData(t,n){const r=yu(this.state.data,t,this.options);return G(this,xt,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){G(this,xt,sn).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=g(this,Ue))==null?void 0:r.promise;return(i=g(this,Ue))==null||i.cancel(t),n?n.then(rt).catch(rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return g(this,kr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_t(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Em(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=g(this,Ue))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=g(this,Ue))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),g(this,Pt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(g(this,Ue)&&(g(this,Pr)||G(this,xt,Rm).call(this)?g(this,Ue).cancel({revert:!0}):g(this,Ue).cancelRetry()),this.scheduleGc()),g(this,Pt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||G(this,xt,sn).call(this,{type:"invalidate"})}async fetch(t,n){var c,h,d,p,m,E,_,P,v,f,y;if(this.state.fetchStatus!=="idle"&&((c=g(this,Ue))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(g(this,Ue))return g(this,Ue).continueRetry(),g(this,Ue).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(R=>R.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(I(this,Pr,!0),r.signal)})},l=()=>{const S=Cm(this.options,n),D=(()=>{const w={client:g(this,Nr),queryKey:this.queryKey,meta:this.meta};return i(w),w})();return I(this,Pr,!1),this.options.persister?this.options.persister(S,D,this):S(D)},a=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:g(this,Nr),state:this.state,fetchFn:l};return i(S),S})(),o=g(this,gi)==="infinite"?u0(this.options.pages):this.options.behavior;o==null||o.onFetch(a,this),I(this,xi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=a.fetchOptions)==null?void 0:h.meta))&&G(this,xt,sn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),I(this,Ue,Nm({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:S=>{S instanceof xu&&S.revert&&this.setState({...g(this,xi),fetchStatus:"idle"}),r.abort()},onFail:(S,R)=>{G(this,xt,sn).call(this,{type:"failed",failureCount:S,error:R})},onPause:()=>{G(this,xt,sn).call(this,{type:"pause"})},onContinue:()=>{G(this,xt,sn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const S=await g(this,Ue).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(m=(p=g(this,Pt).config).onSuccess)==null||m.call(p,S,this),(_=(E=g(this,Pt).config).onSettled)==null||_.call(E,S,this.state.error,this),S}catch(S){if(S instanceof xu){if(S.silent)return g(this,Ue).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw G(this,xt,sn).call(this,{type:"error",error:S}),(v=(P=g(this,Pt).config).onError)==null||v.call(P,S,this),(y=(f=g(this,Pt).config).onSettled)==null||y.call(f,this.state.data,S,this),S}finally{this.scheduleGc()}}},gi=new WeakMap,kr=new WeakMap,xi=new WeakMap,Pt=new WeakMap,Nr=new WeakMap,Ue=new WeakMap,$l=new WeakMap,Pr=new WeakMap,xt=new WeakSet,Rm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Tm(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...gf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return I(this,xi,t.manual?i:void 0),i;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),g(this,Pt).notify({query:this,type:"updated",action:t})})},th);function Tm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:km(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ut,te,bl,tt,Rr,_i,un,$n,Bl,wi,Si,Tr,Lr,bn,Ei,ue,ol,_u,wu,Su,Eu,ju,Cu,ku,Lm,nh,f0=(nh=class extends Ui{constructor(t,n){super();Q(this,ue);Q(this,ut);Q(this,te);Q(this,bl);Q(this,tt);Q(this,Rr);Q(this,_i);Q(this,un);Q(this,$n);Q(this,Bl);Q(this,wi);Q(this,Si);Q(this,Tr);Q(this,Lr);Q(this,bn);Q(this,Ei,new Set);this.options=n,I(this,ut,t),I(this,$n,null),I(this,un,gu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(g(this,te).addObserver(this),_f(g(this,te),this.options)?G(this,ue,ol).call(this):this.updateResult(),G(this,ue,Eu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nu(g(this,te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nu(g(this,te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,G(this,ue,ju).call(this),G(this,ue,Cu).call(this),g(this,te).removeObserver(this)}setOptions(t){const n=this.options,r=g(this,te);if(this.options=g(this,ut).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _t(this.options.enabled,g(this,te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");G(this,ue,ku).call(this),g(this,te).setOptions(this.options),n._defaulted&&!fa(this.options,n)&&g(this,ut).getQueryCache().notify({type:"observerOptionsUpdated",query:g(this,te),observer:this});const i=this.hasListeners();i&&wf(g(this,te),r,this.options,n)&&G(this,ue,ol).call(this),this.updateResult(),i&&(g(this,te)!==r||_t(this.options.enabled,g(this,te))!==_t(n.enabled,g(this,te))||rr(this.options.staleTime,g(this,te))!==rr(n.staleTime,g(this,te)))&&G(this,ue,_u).call(this);const l=G(this,ue,wu).call(this);i&&(g(this,te)!==r||_t(this.options.enabled,g(this,te))!==_t(n.enabled,g(this,te))||l!==g(this,bn))&&G(this,ue,Su).call(this,l)}getOptimisticResult(t){const n=g(this,ut).getQueryCache().build(g(this,ut),t),r=this.createResult(n,t);return p0(this,r)&&(I(this,tt,r),I(this,_i,this.options),I(this,Rr,g(this,te).state)),r}getCurrentResult(){return g(this,tt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&g(this,un).status==="pending"&&g(this,un).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){g(this,Ei).add(t)}getCurrentQuery(){return g(this,te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=g(this,ut).defaultQueryOptions(t),r=g(this,ut).getQueryCache().build(g(this,ut),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return G(this,ue,ol).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),g(this,tt)))}createResult(t,n){var z;const r=g(this,te),i=this.options,l=g(this,tt),s=g(this,Rr),a=g(this,_i),c=t!==r?t.state:g(this,bl),{state:h}=t;let d={...h},p=!1,m;if(n._optimisticResults){const M=this.hasListeners(),Y=!M&&_f(t,n),se=M&&wf(t,r,n,i);(Y||se)&&(d={...d,...Tm(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:_,status:P}=d;m=d.data;let v=!1;if(n.placeholderData!==void 0&&m===void 0&&P==="pending"){let M;l!=null&&l.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(M=l.data,v=!0):M=typeof n.placeholderData=="function"?n.placeholderData((z=g(this,Si))==null?void 0:z.state.data,g(this,Si)):n.placeholderData,M!==void 0&&(P="success",m=yu(l==null?void 0:l.data,M,n),p=!0)}if(n.select&&m!==void 0&&!v)if(l&&m===(s==null?void 0:s.data)&&n.select===g(this,Bl))m=g(this,wi);else try{I(this,Bl,n.select),m=n.select(m),m=yu(l==null?void 0:l.data,m,n),I(this,wi,m),I(this,$n,null)}catch(M){I(this,$n,M)}g(this,$n)&&(E=g(this,$n),m=g(this,wi),_=Date.now(),P="error");const f=d.fetchStatus==="fetching",y=P==="pending",S=P==="error",R=y&&f,D=m!==void 0,N={status:P,fetchStatus:d.fetchStatus,isPending:y,isSuccess:P==="success",isError:S,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:_,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:f,isRefetching:f&&!y,isLoadingError:S&&!D,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&D,isStale:Oc(t,n),refetch:this.refetch,promise:g(this,un),isEnabled:_t(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=N.data!==void 0,Y=N.status==="error"&&!M,se=We=>{Y?We.reject(N.error):M&&We.resolve(N.data)},Ce=()=>{const We=I(this,un,N.promise=gu());se(We)},ke=g(this,un);switch(ke.status){case"pending":t.queryHash===r.queryHash&&se(ke);break;case"fulfilled":(Y||N.data!==ke.value)&&Ce();break;case"rejected":(!Y||N.error!==ke.reason)&&Ce();break}}return N}updateResult(){const t=g(this,tt),n=this.createResult(g(this,te),this.options);if(I(this,Rr,g(this,te).state),I(this,_i,this.options),g(this,Rr).data!==void 0&&I(this,Si,g(this,te)),fa(n,t))return;I(this,tt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!g(this,Ei).size)return!0;const s=new Set(l??g(this,Ei));return this.options.throwOnError&&s.add("error"),Object.keys(g(this,tt)).some(a=>{const o=a;return g(this,tt)[o]!==t[o]&&s.has(o)})};G(this,ue,Lm).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&G(this,ue,Eu).call(this)}},ut=new WeakMap,te=new WeakMap,bl=new WeakMap,tt=new WeakMap,Rr=new WeakMap,_i=new WeakMap,un=new WeakMap,$n=new WeakMap,Bl=new WeakMap,wi=new WeakMap,Si=new WeakMap,Tr=new WeakMap,Lr=new WeakMap,bn=new WeakMap,Ei=new WeakMap,ue=new WeakSet,ol=function(t){G(this,ue,ku).call(this);let n=g(this,te).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rt)),n},_u=function(){G(this,ue,ju).call(this);const t=rr(this.options.staleTime,g(this,te));if(zl.isServer()||g(this,tt).isStale||!mu(t))return;const r=Em(g(this,tt).dataUpdatedAt,t)+1;I(this,Tr,Sr.setTimeout(()=>{g(this,tt).isStale||this.updateResult()},r))},wu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(g(this,te)):this.options.refetchInterval)??!1},Su=function(t){G(this,ue,Cu).call(this),I(this,bn,t),!(zl.isServer()||_t(this.options.enabled,g(this,te))===!1||!mu(g(this,bn))||g(this,bn)===0)&&I(this,Lr,Sr.setInterval(()=>{(this.options.refetchIntervalInBackground||Tc.isFocused())&&G(this,ue,ol).call(this)},g(this,bn)))},Eu=function(){G(this,ue,_u).call(this),G(this,ue,Su).call(this,G(this,ue,wu).call(this))},ju=function(){g(this,Tr)!==void 0&&(Sr.clearTimeout(g(this,Tr)),I(this,Tr,void 0))},Cu=function(){g(this,Lr)!==void 0&&(Sr.clearInterval(g(this,Lr)),I(this,Lr,void 0))},ku=function(){const t=g(this,ut).getQueryCache().build(g(this,ut),this.options);if(t===g(this,te))return;const n=g(this,te);I(this,te,t),I(this,bl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Lm=function(t){ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(g(this,tt))}),g(this,ut).getQueryCache().notify({query:g(this,te),type:"observerResultsUpdated"})})},nh);function h0(e,t){return _t(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&_t(t.retryOnMount,e)===!1)}function _f(e,t){return h0(e,t)||e.state.data!==void 0&&Nu(e,t,t.refetchOnMount)}function Nu(e,t,n){if(_t(t.enabled,e)!==!1&&rr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Oc(e,t)}return!1}function wf(e,t,n,r){return(e!==t||_t(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Oc(e,n)}function Oc(e,t){return _t(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function p0(e,t){return!fa(e.getCurrentResult(),t)}var Ql,qt,Ge,Mr,Gt,Ln,rh,m0=(rh=class extends Pm{constructor(t){super();Q(this,Gt);Q(this,Ql);Q(this,qt);Q(this,Ge);Q(this,Mr);I(this,Ql,t.client),this.mutationId=t.mutationId,I(this,Ge,t.mutationCache),I(this,qt,[]),this.state=t.state||Mm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){g(this,qt).includes(t)||(g(this,qt).push(t),this.clearGcTimeout(),g(this,Ge).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){I(this,qt,g(this,qt).filter(n=>n!==t)),this.scheduleGc(),g(this,Ge).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){g(this,qt).length||(this.state.status==="pending"?this.scheduleGc():g(this,Ge).remove(this))}continue(){var t;return((t=g(this,Mr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,o,c,h,d,p,m,E,_,P,v,f,y,S,R,D,w;const n=()=>{G(this,Gt,Ln).call(this,{type:"continue"})},r={client:g(this,Ql),meta:this.options.meta,mutationKey:this.options.mutationKey};I(this,Mr,Nm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,z)=>{G(this,Gt,Ln).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{G(this,Gt,Ln).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>g(this,Ge).canRun(this)}));const i=this.state.status==="pending",l=!g(this,Mr).canStart();try{if(i)n();else{G(this,Gt,Ln).call(this,{type:"pending",variables:t,isPaused:l}),g(this,Ge).config.onMutate&&await g(this,Ge).config.onMutate(t,this,r);const z=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t,r));z!==this.state.context&&G(this,Gt,Ln).call(this,{type:"pending",context:z,variables:t,isPaused:l})}const N=await g(this,Mr).start();return await((c=(o=g(this,Ge).config).onSuccess)==null?void 0:c.call(o,N,t,this.state.context,this,r)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,N,t,this.state.context,r)),await((m=(p=g(this,Ge).config).onSettled)==null?void 0:m.call(p,N,null,this.state.variables,this.state.context,this,r)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,N,null,t,this.state.context,r)),G(this,Gt,Ln).call(this,{type:"success",data:N}),N}catch(N){try{await((v=(P=g(this,Ge).config).onError)==null?void 0:v.call(P,N,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((y=(f=this.options).onError)==null?void 0:y.call(f,N,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((R=(S=g(this,Ge).config).onSettled)==null?void 0:R.call(S,void 0,N,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((w=(D=this.options).onSettled)==null?void 0:w.call(D,void 0,N,t,this.state.context,r))}catch(z){Promise.reject(z)}throw G(this,Gt,Ln).call(this,{type:"error",error:N}),N}finally{g(this,Ge).runNext(this)}}},Ql=new WeakMap,qt=new WeakMap,Ge=new WeakMap,Mr=new WeakMap,Gt=new WeakSet,Ln=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ze.batch(()=>{g(this,qt).forEach(r=>{r.onMutationUpdate(t)}),g(this,Ge).notify({mutation:this,type:"updated",action:t})})},rh);function Mm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cn,At,Vl,ih,v0=(ih=class extends Ui{constructor(t={}){super();Q(this,cn);Q(this,At);Q(this,Vl);this.config=t,I(this,cn,new Set),I(this,At,new Map),I(this,Vl,0)}build(t,n,r){const i=new m0({client:t,mutationCache:this,mutationId:++ls(this,Vl)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){g(this,cn).add(t);const n=Es(t);if(typeof n=="string"){const r=g(this,At).get(n);r?r.push(t):g(this,At).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(g(this,cn).delete(t)){const n=Es(t);if(typeof n=="string"){const r=g(this,At).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&g(this,At).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Es(t);if(typeof n=="string"){const r=g(this,At).get(n),i=r==null?void 0:r.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Es(t);if(typeof n=="string"){const i=(r=g(this,At).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ze.batch(()=>{g(this,cn).forEach(t=>{this.notify({type:"removed",mutation:t})}),g(this,cn).clear(),g(this,At).clear()})}getAll(){return Array.from(g(this,cn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>pf(n,r))}findAll(t={}){return this.getAll().filter(n=>pf(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(rt))))}},cn=new WeakMap,At=new WeakMap,Vl=new WeakMap,ih);function Es(e){var t;return(t=e.options.scope)==null?void 0:t.id}var dn,Bn,ct,fn,yn,$s,Pu,lh,y0=(lh=class extends Ui{constructor(n,r){super();Q(this,yn);Q(this,dn);Q(this,Bn);Q(this,ct);Q(this,fn);I(this,dn,n),this.setOptions(r),this.bindMethods(),G(this,yn,$s).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=g(this,dn).defaultMutationOptions(n),fa(this.options,r)||g(this,dn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:g(this,ct),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$r(r.mutationKey)!==$r(this.options.mutationKey)?this.reset():((i=g(this,ct))==null?void 0:i.state.status)==="pending"&&g(this,ct).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=g(this,ct))==null||n.removeObserver(this)}onMutationUpdate(n){G(this,yn,$s).call(this),G(this,yn,Pu).call(this,n)}getCurrentResult(){return g(this,Bn)}reset(){var n;(n=g(this,ct))==null||n.removeObserver(this),I(this,ct,void 0),G(this,yn,$s).call(this),G(this,yn,Pu).call(this)}mutate(n,r){var i;return I(this,fn,r),(i=g(this,ct))==null||i.removeObserver(this),I(this,ct,g(this,dn).getMutationCache().build(g(this,dn),this.options)),g(this,ct).addObserver(this),g(this,ct).execute(n)}},dn=new WeakMap,Bn=new WeakMap,ct=new WeakMap,fn=new WeakMap,yn=new WeakSet,$s=function(){var r;const n=((r=g(this,ct))==null?void 0:r.state)??Mm();I(this,Bn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Pu=function(n){ze.batch(()=>{var r,i,l,s,a,o,c,h;if(g(this,fn)&&this.hasListeners()){const d=g(this,Bn).variables,p=g(this,Bn).context,m={client:g(this,dn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=g(this,fn)).onSuccess)==null||i.call(r,n.data,d,p,m)}catch(E){Promise.reject(E)}try{(s=(l=g(this,fn)).onSettled)==null||s.call(l,n.data,null,d,p,m)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(o=(a=g(this,fn)).onError)==null||o.call(a,n.error,d,p,m)}catch(E){Promise.reject(E)}try{(h=(c=g(this,fn)).onSettled)==null||h.call(c,void 0,n.error,d,p,m)}catch(E){Promise.reject(E)}}}this.listeners.forEach(d=>{d(g(this,Bn))})})},lh),Yt,sh,g0=(sh=class extends Ui{constructor(t={}){super();Q(this,Yt);this.config=t,I(this,Yt,new Map)}build(t,n,r){const i=n.queryKey,l=n.queryHash??Lc(i,n);let s=this.get(l);return s||(s=new d0({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){g(this,Yt).has(t.queryHash)||(g(this,Yt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=g(this,Yt).get(t.queryHash);n&&(t.destroy(),n===t&&g(this,Yt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return g(this,Yt).get(t)}getAll(){return[...g(this,Yt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>hf(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yt=new WeakMap,sh),Re,Qn,Vn,ji,Ci,Hn,ki,Ni,ah,x0=(ah=class{constructor(e={}){Q(this,Re);Q(this,Qn);Q(this,Vn);Q(this,ji);Q(this,Ci);Q(this,Hn);Q(this,ki);Q(this,Ni);I(this,Re,e.queryCache||new g0),I(this,Qn,e.mutationCache||new v0),I(this,Vn,e.defaultOptions||{}),I(this,ji,new Map),I(this,Ci,new Map),I(this,Hn,0)}mount(){ls(this,Hn)._++,g(this,Hn)===1&&(I(this,ki,Tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),g(this,Re).onFocus())})),I(this,Ni,ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),g(this,Re).onOnline())})))}unmount(){var e,t;ls(this,Hn)._--,g(this,Hn)===0&&((e=g(this,ki))==null||e.call(this),I(this,ki,void 0),(t=g(this,Ni))==null||t.call(this),I(this,Ni,void 0))}isFetching(e){return g(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return g(this,Qn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=g(this,Re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=g(this,Re).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return g(this,Re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=g(this,Re).get(r.queryHash),l=i==null?void 0:i.state.data,s=Zg(t,l);if(s!==void 0)return g(this,Re).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>g(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=g(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=g(this,Re);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=g(this,Re);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>g(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rt).catch(rt)}invalidateQueries(e,t={}){return ze.batch(()=>(g(this,Re).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ze.batch(()=>g(this,Re).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(rt)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=g(this,Re).build(this,t);return n.isStaleByTime(rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rt).catch(rt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rt).catch(rt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ha.isOnline()?g(this,Qn).resumePausedMutations():Promise.resolve()}getQueryCache(){return g(this,Re)}getMutationCache(){return g(this,Qn)}getDefaultOptions(){return g(this,Vn)}setDefaultOptions(e){I(this,Vn,e)}setQueryDefaults(e,t){g(this,ji).set($r(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...g(this,ji).values()],n={};return t.forEach(r=>{Il(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){g(this,Ci).set($r(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...g(this,Ci).values()],n={};return t.forEach(r=>{Il(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...g(this,Vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Mc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...g(this,Vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){g(this,Re).clear(),g(this,Qn).clear()}},Re=new WeakMap,Qn=new WeakMap,Vn=new WeakMap,ji=new WeakMap,Ci=new WeakMap,Hn=new WeakMap,ki=new WeakMap,Ni=new WeakMap,ah),Dm=C.createContext(void 0),Yl=e=>{const t=C.useContext(Dm);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_0=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Dm.Provider,{value:e,children:t})),Om=C.createContext(!1),w0=()=>C.useContext(Om);Om.Provider;function S0(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var E0=C.createContext(S0()),j0=()=>C.useContext(E0),C0=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Dc(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},k0=e=>{C.useEffect(()=>{e.clearReset()},[e])},N0=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Dc(n,[e.error,r])),P0=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},R0=(e,t)=>e.isLoading&&e.isFetching&&!t,T0=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Sf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function L0(e,t,n){var m,E,_,P;const r=w0(),i=j0(),l=Yl(),s=l.defaultQueryOptions(e);(E=(m=l.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||E.call(m,s);const a=l.getQueryCache().get(s.queryHash),o=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":o?"optimistic":void 0,P0(s),C0(s,i,a),k0(i);const c=!l.getQueryCache().get(s.queryHash),[h]=C.useState(()=>new t(l,s)),d=h.getOptimisticResult(s),p=!r&&o;if(C.useSyncExternalStore(C.useCallback(v=>{const f=p?h.subscribe(ze.batchCalls(v)):rt;return h.updateResult(),f},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setOptions(s)},[s,h]),T0(s,d))throw Sf(s,h,i);if(N0({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw d.error;if((P=(_=l.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||P.call(_,s,d),s.experimental_prefetchInRender&&!zl.isServer()&&R0(d,r)){const v=c?Sf(s,h,i):a==null?void 0:a.promise;v==null||v.catch(rt).finally(()=>{h.updateResult()})}return s.notifyOnChangeProps?d:h.trackResult(d)}function en(e,t){return L0(e,f0)}function pa(e,t){const n=Yl(),[r]=C.useState(()=>new y0(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(s=>r.subscribe(ze.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=C.useCallback((s,a)=>{r.mutate(s,a).catch(rt)},[r]);if(i.error&&Dc(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}/**
41
- * @remix-run/router v1.23.3
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}var Oe;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Oe||(Oe={}));const Ef="popstate";function M0(e){e===void 0&&(e={});function t(r,i){let{pathname:l,search:s,hash:a}=r.location;return Al("",{pathname:l,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Br(i)}return O0(t,n,null,e)}function X(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function D0(){return Math.random().toString(36).substr(2,8)}function jf(e,t){return{usr:e.state,key:e.key,idx:t}}function Al(e,t,n,r){return n===void 0&&(n=null),xe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ur(t):t,{state:n,key:t&&t.key||r||D0()})}function Br(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ur(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function O0(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,s=i.history,a=Oe.Pop,o=null,c=h();c==null&&(c=0,s.replaceState(xe({},s.state,{idx:c}),""));function h(){return(s.state||{idx:null}).idx}function d(){a=Oe.Pop;let P=h(),v=P==null?null:P-c;c=P,o&&o({action:a,location:_.location,delta:v})}function p(P,v){a=Oe.Push;let f=Al(_.location,P,v);c=h()+1;let y=jf(f,c),S=_.createHref(f);try{s.pushState(y,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(S)}l&&o&&o({action:a,location:_.location,delta:1})}function m(P,v){a=Oe.Replace;let f=Al(_.location,P,v);c=h();let y=jf(f,c),S=_.createHref(f);s.replaceState(y,"",S),l&&o&&o({action:a,location:_.location,delta:0})}function E(P){let v=i.location.origin!=="null"?i.location.origin:i.location.href,f=typeof P=="string"?P:Br(P);return f=f.replace(/ $/,"%20"),X(v,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,v)}let _={get action(){return a},get location(){return e(i,s)},listen(P){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(Ef,d),o=P,()=>{i.removeEventListener(Ef,d),o=null}},createHref(P){return t(i,P)},createURL:E,encodeLocation(P){let v=E(P);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:m,go(P){return s.go(P)}};return _}var de;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(de||(de={}));const F0=new Set(["lazy","caseSensitive","path","id","index","children"]);function I0(e){return e.index===!0}function ma(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,l)=>{let s=[...n,String(l)],a=typeof i.id=="string"?i.id:s.join("-");if(X(i.index!==!0||!i.children,"Cannot specify children on an index route"),X(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),I0(i)){let o=xe({},i,t(i),{id:a});return r[a]=o,o}else{let o=xe({},i,t(i),{id:a,children:void 0});return r[a]=o,i.children&&(o.children=ma(i.children,t,s,r)),o}})}function yr(e,t,n){return n===void 0&&(n="/"),bs(e,t,n,!1)}function bs(e,t,n,r){let i=typeof t=="string"?ur(t):t,l=Sn(i.pathname||"/",n);if(l==null)return null;let s=Fm(e);A0(s);let a=null,o=G0(l);for(let c=0;a==null&&c<s.length;++c)a=K0(s[c],o,r);return a}function z0(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Fm(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(l,s,a)=>{let o={relativePath:a===void 0?l.path||"":a,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};o.relativePath.startsWith("/")&&(X(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(r.length));let c=vn([r,o.relativePath]),h=n.concat(o);l.children&&l.children.length>0&&(X(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Fm(l.children,t,h,c)),!(l.path==null&&!l.index)&&t.push({path:c,score:H0(c,l.index),routesMeta:h})};return e.forEach((l,s)=>{var a;if(l.path===""||!((a=l.path)!=null&&a.includes("?")))i(l,s);else for(let o of Im(l.path))i(l,s,o)}),t}function Im(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let s=Im(r.join("/")),a=[];return a.push(...s.map(o=>o===""?l:[l,o].join("/"))),i&&a.push(...s),a.map(o=>e.startsWith("/")&&o===""?"/":o)}function A0(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:W0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const U0=/^:[\w-]+$/,$0=3,b0=2,B0=1,Q0=10,V0=-2,Cf=e=>e==="*";function H0(e,t){let n=e.split("/"),r=n.length;return n.some(Cf)&&(r+=V0),t&&(r+=b0),n.filter(i=>!Cf(i)).reduce((i,l)=>i+(U0.test(l)?$0:l===""?B0:Q0),r)}function W0(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function K0(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},l="/",s=[];for(let a=0;a<r.length;++a){let o=r[a],c=a===r.length-1,h=l==="/"?t:t.slice(l.length)||"/",d=va({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},h),p=o.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=va({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},h)),!d)return null;Object.assign(i,d.params),s.push({params:i,pathname:vn([l,d.pathname]),pathnameBase:Z0(vn([l,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(l=vn([l,d.pathnameBase]))}return s}function va(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=q0(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],s=l.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,h,d)=>{let{paramName:p,isOptional:m}=h;if(p==="*"){let _=a[d]||"";s=l.slice(0,l.length-_.length).replace(/(.)\/+$/,"$1")}const E=a[d];return m&&!E?c[p]=void 0:c[p]=(E||"").replace(/%2F/g,"/"),c},{}),pathname:l,pathnameBase:s,pattern:e}}function q0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,o)=>(r.push({paramName:a,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function G0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Y0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X0=e=>Y0.test(e);function J0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ur(e):e,l;if(n)if(X0(n))l=n;else{if(n.includes("//")){let s=n;n=Fc(n),br(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?l=kf(n.substring(1),"/"):l=kf(n,t)}else l=t;return{pathname:l,search:e1(r),hash:t1(i)}}function kf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function zm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fa(e,t){let n=zm(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ia(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ur(e):(i=xe({},e),X(!i.pathname||!i.pathname.includes("?"),xo("?","pathname","search",i)),X(!i.pathname||!i.pathname.includes("#"),xo("#","pathname","hash",i)),X(!i.search||!i.search.includes("#"),xo("#","search","hash",i)));let l=e===""||i.pathname==="",s=l?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}a=d>=0?t[d]:"/"}let o=J0(i,a),c=s&&s!=="/"&&s.endsWith("/"),h=(l||s===".")&&n.endsWith("/");return!o.pathname.endsWith("/")&&(c||h)&&(o.pathname+="/"),o}const Fc=e=>e.replace(/\/\/+/g,"/"),vn=e=>Fc(e.join("/")),Z0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),e1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,t1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ya{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ul(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Am=["post","put","patch","delete"],n1=new Set(Am),r1=["get",...Am],i1=new Set(r1),l1=new Set([301,302,303,307,308]),s1=new Set([307,308]),_o={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},a1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ic=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o1=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Um="remix-router-transitions";function u1(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let x=e.detectErrorBoundary;i=j=>({hasErrorBoundary:x(j)})}else i=o1;let l={},s=ma(e.routes,i,void 0,l),a,o=e.basename||"/",c=e.dataStrategy||h1,h=e.patchRoutesOnNavigation,d=xe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,m=new Set,E=null,_=null,P=null,v=e.hydrationData!=null,f=yr(s,e.history.location,o),y=!1,S=null;if(f==null&&!h){let x=dt(404,{pathname:e.history.location.pathname}),{matches:j,route:k}=zf(s);f=j,S={[k.id]:x}}f&&!e.hydrationData&&ts(f,s,e.history.location.pathname).active&&(f=null);let R;if(f)if(f.some(x=>x.route.lazy))R=!1;else if(!f.some(x=>x.route.loader))R=!0;else if(d.v7_partialHydration){let x=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null;if(j){let k=f.findIndex(T=>j[T.route.id]!==void 0);R=f.slice(0,k+1).every(T=>!Tu(T.route,x,j))}else R=f.every(k=>!Tu(k.route,x,j))}else R=e.hydrationData!=null;else if(R=!1,f=[],d.v7_partialHydration){let x=ts(null,s,e.history.location.pathname);x.active&&x.matches&&(y=!0,f=x.matches)}let D,w={historyAction:e.history.action,location:e.history.location,matches:f,initialized:R,navigation:_o,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},N=Oe.Pop,z=!1,M,Y=!1,se=new Map,Ce=null,ke=!1,We=!1,Cn=[],kn=new Set,O=new Map,H=0,K=-1,he=new Map,pe=new Set,Ft=new Map,yt=new Map,Je=new Set,Ze=new Map,Nt=new Map,Jl;function nv(){if(p=e.history.listen(x=>{let{action:j,location:k,delta:T}=x;if(Jl){Jl(),Jl=void 0;return}br(Nt.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let F=Jc({currentLocation:w.location,nextLocation:k,historyAction:j});if(F&&T!=null){let V=new Promise(W=>{Jl=W});e.history.go(T*-1),es(F,{state:"blocked",location:k,proceed(){es(F,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),V.then(()=>e.history.go(T))},reset(){let W=new Map(w.blockers);W.set(F,Zi),et({blockers:W})}});return}return dr(j,k)}),n){N1(t,se);let x=()=>P1(t,se);t.addEventListener("pagehide",x),Ce=()=>t.removeEventListener("pagehide",x)}return w.initialized||dr(Oe.Pop,w.location,{initialHydration:!0}),D}function rv(){p&&p(),Ce&&Ce(),m.clear(),M&&M.abort(),w.fetchers.forEach((x,j)=>Zl(j)),w.blockers.forEach((x,j)=>Xc(j))}function iv(x){return m.add(x),()=>m.delete(x)}function et(x,j){j===void 0&&(j={}),w=xe({},w,x);let k=[],T=[];d.v7_fetcherPersist&&w.fetchers.forEach((F,V)=>{F.state==="idle"&&(Je.has(V)?T.push(V):k.push(V))}),Je.forEach(F=>{!w.fetchers.has(F)&&!O.has(F)&&T.push(F)}),[...m].forEach(F=>F(w,{deletedFetchers:T,viewTransitionOpts:j.viewTransitionOpts,flushSync:j.flushSync===!0})),d.v7_fetcherPersist?(k.forEach(F=>w.fetchers.delete(F)),T.forEach(F=>Zl(F))):T.forEach(F=>Je.delete(F))}function Hr(x,j,k){var T,F;let{flushSync:V}=k===void 0?{}:k,W=w.actionData!=null&&w.navigation.formMethod!=null&&$t(w.navigation.formMethod)&&w.navigation.state==="loading"&&((T=x.state)==null?void 0:T._isRedirect)!==!0,$;j.actionData?Object.keys(j.actionData).length>0?$=j.actionData:$=null:W?$=w.actionData:$=null;let b=j.loaderData?Ff(w.loaderData,j.loaderData,j.matches||[],j.errors):w.loaderData,U=w.blockers;U.size>0&&(U=new Map(U),U.forEach((ne,Be)=>U.set(Be,Zi)));let B=z===!0||w.navigation.formMethod!=null&&$t(w.navigation.formMethod)&&((F=x.state)==null?void 0:F._isRedirect)!==!0;a&&(s=a,a=void 0),ke||N===Oe.Pop||(N===Oe.Push?e.history.push(x,x.state):N===Oe.Replace&&e.history.replace(x,x.state));let q;if(N===Oe.Pop){let ne=se.get(w.location.pathname);ne&&ne.has(x.pathname)?q={currentLocation:w.location,nextLocation:x}:se.has(x.pathname)&&(q={currentLocation:x,nextLocation:w.location})}else if(Y){let ne=se.get(w.location.pathname);ne?ne.add(x.pathname):(ne=new Set([x.pathname]),se.set(w.location.pathname,ne)),q={currentLocation:w.location,nextLocation:x}}et(xe({},j,{actionData:$,loaderData:b,historyAction:N,location:x,initialized:!0,navigation:_o,revalidation:"idle",restoreScrollPosition:ed(x,j.matches||w.matches),preventScrollReset:B,blockers:U}),{viewTransitionOpts:q,flushSync:V===!0}),N=Oe.Pop,z=!1,Y=!1,ke=!1,We=!1,Cn=[]}async function Vc(x,j){if(typeof x=="number"){e.history.go(x);return}let k=Ru(w.location,w.matches,o,d.v7_prependBasename,x,d.v7_relativeSplatPath,j==null?void 0:j.fromRouteId,j==null?void 0:j.relative),{path:T,submission:F,error:V}=Nf(d.v7_normalizeFormMethod,!1,k,j),W=w.location,$=Al(w.location,T,j&&j.state);$=xe({},$,e.history.encodeLocation($));let b=j&&j.replace!=null?j.replace:void 0,U=Oe.Push;b===!0?U=Oe.Replace:b===!1||F!=null&&$t(F.formMethod)&&F.formAction===w.location.pathname+w.location.search&&(U=Oe.Replace);let B=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,q=(j&&j.flushSync)===!0,ne=Jc({currentLocation:W,nextLocation:$,historyAction:U});if(ne){es(ne,{state:"blocked",location:$,proceed(){es(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),Vc(x,j)},reset(){let Be=new Map(w.blockers);Be.set(ne,Zi),et({blockers:Be})}});return}return await dr(U,$,{submission:F,pendingError:V,preventScrollReset:B,replace:j&&j.replace,enableViewTransition:j&&j.viewTransition,flushSync:q})}function lv(){if(ba(),et({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){dr(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}dr(N||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:Y===!0})}}async function dr(x,j,k){M&&M.abort(),M=null,N=x,ke=(k&&k.startUninterruptedRevalidation)===!0,mv(w.location,w.matches),z=(k&&k.preventScrollReset)===!0,Y=(k&&k.enableViewTransition)===!0;let T=a||s,F=k&&k.overrideNavigation,V=k!=null&&k.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:yr(T,j,o),W=(k&&k.flushSync)===!0;if(V&&w.initialized&&!We&&x1(w.location,j)&&!(k&&k.submission&&$t(k.submission.formMethod))){Hr(j,{matches:V},{flushSync:W});return}let $=ts(V,T,j.pathname);if($.active&&$.matches&&(V=$.matches),!V){let{error:me,notFoundMatches:ae,route:Ne}=Ba(j.pathname);Hr(j,{matches:ae,loaderData:{},errors:{[Ne.id]:me}},{flushSync:W});return}M=new AbortController;let b=Yr(e.history,j,M.signal,k&&k.submission),U;if(k&&k.pendingError)U=[gr(V).route.id,{type:de.error,error:k.pendingError}];else if(k&&k.submission&&$t(k.submission.formMethod)){let me=await sv(b,j,k.submission,V,$.active,{replace:k.replace,flushSync:W});if(me.shortCircuited)return;if(me.pendingActionResult){let[ae,Ne]=me.pendingActionResult;if(wt(Ne)&&Ul(Ne.error)&&Ne.error.status===404){M=null,Hr(j,{matches:me.matches,loaderData:{},errors:{[ae]:Ne.error}});return}}V=me.matches||V,U=me.pendingActionResult,F=wo(j,k.submission),W=!1,$.active=!1,b=Yr(e.history,b.url,b.signal)}let{shortCircuited:B,matches:q,loaderData:ne,errors:Be}=await av(b,j,V,$.active,F,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,W,U);B||(M=null,Hr(j,xe({matches:q||V},If(U),{loaderData:ne,errors:Be})))}async function sv(x,j,k,T,F,V){V===void 0&&(V={}),ba();let W=C1(j,k);if(et({navigation:W},{flushSync:V.flushSync===!0}),F){let U=await ns(T,j.pathname,x.signal);if(U.type==="aborted")return{shortCircuited:!0};if(U.type==="error"){let B=gr(U.partialMatches).route.id;return{matches:U.partialMatches,pendingActionResult:[B,{type:de.error,error:U.error}]}}else if(U.matches)T=U.matches;else{let{notFoundMatches:B,error:q,route:ne}=Ba(j.pathname);return{matches:B,pendingActionResult:[ne.id,{type:de.error,error:q}]}}}let $,b=ul(T,j);if(!b.route.action&&!b.route.lazy)$={type:de.error,error:dt(405,{method:x.method,pathname:j.pathname,routeId:b.route.id})};else if($=(await bi("action",w,x,[b],T,null))[b.route.id],x.signal.aborted)return{shortCircuited:!0};if(Er($)){let U;return V&&V.replace!=null?U=V.replace:U=Mf($.response.headers.get("Location"),new URL(x.url),o,e.history)===w.location.pathname+w.location.search,await fr(x,$,!0,{submission:k,replace:U}),{shortCircuited:!0}}if(qn($))throw dt(400,{type:"defer-action"});if(wt($)){let U=gr(T,b.route.id);return(V&&V.replace)!==!0&&(N=Oe.Push),{matches:T,pendingActionResult:[U.route.id,$]}}return{matches:T,pendingActionResult:[b.route.id,$]}}async function av(x,j,k,T,F,V,W,$,b,U,B){let q=F||wo(j,V),ne=V||W||Uf(q),Be=!ke&&(!d.v7_partialHydration||!b);if(T){if(Be){let Pe=Hc(B);et(xe({navigation:q},Pe!==void 0?{actionData:Pe}:{}),{flushSync:U})}let ie=await ns(k,j.pathname,x.signal);if(ie.type==="aborted")return{shortCircuited:!0};if(ie.type==="error"){let Pe=gr(ie.partialMatches).route.id;return{matches:ie.partialMatches,loaderData:{},errors:{[Pe]:ie.error}}}else if(ie.matches)k=ie.matches;else{let{error:Pe,notFoundMatches:Kr,route:Vi}=Ba(j.pathname);return{matches:Kr,loaderData:{},errors:{[Vi.id]:Pe}}}}let me=a||s,[ae,Ne]=Rf(e.history,w,k,ne,j,d.v7_partialHydration&&b===!0,d.v7_skipActionErrorRevalidation,We,Cn,kn,Je,Ft,pe,me,o,B);if(Qa(ie=>!(k&&k.some(Pe=>Pe.route.id===ie))||ae&&ae.some(Pe=>Pe.route.id===ie)),K=++H,ae.length===0&&Ne.length===0){let ie=Gc();return Hr(j,xe({matches:k,loaderData:{},errors:B&&wt(B[1])?{[B[0]]:B[1].error}:null},If(B),ie?{fetchers:new Map(w.fetchers)}:{}),{flushSync:U}),{shortCircuited:!0}}if(Be){let ie={};if(!T){ie.navigation=q;let Pe=Hc(B);Pe!==void 0&&(ie.actionData=Pe)}Ne.length>0&&(ie.fetchers=ov(Ne)),et(ie,{flushSync:U})}Ne.forEach(ie=>{Pn(ie.key),ie.controller&&O.set(ie.key,ie.controller)});let Wr=()=>Ne.forEach(ie=>Pn(ie.key));M&&M.signal.addEventListener("abort",Wr);let{loaderResults:Bi,fetcherResults:ln}=await Wc(w,k,ae,Ne,x);if(x.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Wr),Ne.forEach(ie=>O.delete(ie.key));let Ht=js(Bi);if(Ht)return await fr(x,Ht.result,!0,{replace:$}),{shortCircuited:!0};if(Ht=js(ln),Ht)return pe.add(Ht.key),await fr(x,Ht.result,!0,{replace:$}),{shortCircuited:!0};let{loaderData:Va,errors:Qi}=Of(w,k,Bi,B,Ne,ln,Ze);Ze.forEach((ie,Pe)=>{ie.subscribe(Kr=>{(Kr||ie.done)&&Ze.delete(Pe)})}),d.v7_partialHydration&&b&&w.errors&&(Qi=xe({},w.errors,Qi));let hr=Gc(),rs=Yc(K),is=hr||rs||Ne.length>0;return xe({matches:k,loaderData:Va,errors:Qi},is?{fetchers:new Map(w.fetchers)}:{})}function Hc(x){if(x&&!wt(x[1]))return{[x[0]]:x[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ov(x){return x.forEach(j=>{let k=w.fetchers.get(j.key),T=el(void 0,k?k.data:void 0);w.fetchers.set(j.key,T)}),new Map(w.fetchers)}function uv(x,j,k,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Pn(x);let F=(T&&T.flushSync)===!0,V=a||s,W=Ru(w.location,w.matches,o,d.v7_prependBasename,k,d.v7_relativeSplatPath,j,T==null?void 0:T.relative),$=yr(V,W,o),b=ts($,V,W);if(b.active&&b.matches&&($=b.matches),!$){rn(x,j,dt(404,{pathname:W}),{flushSync:F});return}let{path:U,submission:B,error:q}=Nf(d.v7_normalizeFormMethod,!0,W,T);if(q){rn(x,j,q,{flushSync:F});return}let ne=ul($,U),Be=(T&&T.preventScrollReset)===!0;if(B&&$t(B.formMethod)){cv(x,j,U,ne,$,b.active,F,Be,B);return}Ft.set(x,{routeId:j,path:U}),dv(x,j,U,ne,$,b.active,F,Be,B)}async function cv(x,j,k,T,F,V,W,$,b){ba(),Ft.delete(x);function U(De){if(!De.route.action&&!De.route.lazy){let qr=dt(405,{method:b.formMethod,pathname:k,routeId:j});return rn(x,j,qr,{flushSync:W}),!0}return!1}if(!V&&U(T))return;let B=w.fetchers.get(x);Nn(x,k1(b,B),{flushSync:W});let q=new AbortController,ne=Yr(e.history,k,q.signal,b);if(V){let De=await ns(F,new URL(ne.url).pathname,ne.signal,x);if(De.type==="aborted")return;if(De.type==="error"){rn(x,j,De.error,{flushSync:W});return}else if(De.matches){if(F=De.matches,T=ul(F,k),U(T))return}else{rn(x,j,dt(404,{pathname:k}),{flushSync:W});return}}O.set(x,q);let Be=H,ae=(await bi("action",w,ne,[T],F,x))[T.route.id];if(ne.signal.aborted){O.get(x)===q&&O.delete(x);return}if(d.v7_fetcherPersist&&Je.has(x)){if(Er(ae)||wt(ae)){Nn(x,Mn(void 0));return}}else{if(Er(ae))if(O.delete(x),K>Be){Nn(x,Mn(void 0));return}else return pe.add(x),Nn(x,el(b)),fr(ne,ae,!1,{fetcherSubmission:b,preventScrollReset:$});if(wt(ae)){rn(x,j,ae.error);return}}if(qn(ae))throw dt(400,{type:"defer-action"});let Ne=w.navigation.location||w.location,Wr=Yr(e.history,Ne,q.signal),Bi=a||s,ln=w.navigation.state!=="idle"?yr(Bi,w.navigation.location,o):w.matches;X(ln,"Didn't find any matches after fetcher action");let Ht=++H;he.set(x,Ht);let Va=el(b,ae.data);w.fetchers.set(x,Va);let[Qi,hr]=Rf(e.history,w,ln,b,Ne,!1,d.v7_skipActionErrorRevalidation,We,Cn,kn,Je,Ft,pe,Bi,o,[T.route.id,ae]);hr.filter(De=>De.key!==x).forEach(De=>{let qr=De.key,td=w.fetchers.get(qr),gv=el(void 0,td?td.data:void 0);w.fetchers.set(qr,gv),Pn(qr),De.controller&&O.set(qr,De.controller)}),et({fetchers:new Map(w.fetchers)});let rs=()=>hr.forEach(De=>Pn(De.key));q.signal.addEventListener("abort",rs);let{loaderResults:is,fetcherResults:ie}=await Wc(w,ln,Qi,hr,Wr);if(q.signal.aborted)return;q.signal.removeEventListener("abort",rs),he.delete(x),O.delete(x),hr.forEach(De=>O.delete(De.key));let Pe=js(is);if(Pe)return fr(Wr,Pe.result,!1,{preventScrollReset:$});if(Pe=js(ie),Pe)return pe.add(Pe.key),fr(Wr,Pe.result,!1,{preventScrollReset:$});let{loaderData:Kr,errors:Vi}=Of(w,ln,is,void 0,hr,ie,Ze);if(w.fetchers.has(x)){let De=Mn(ae.data);w.fetchers.set(x,De)}Yc(Ht),w.navigation.state==="loading"&&Ht>K?(X(N,"Expected pending action"),M&&M.abort(),Hr(w.navigation.location,{matches:ln,loaderData:Kr,errors:Vi,fetchers:new Map(w.fetchers)})):(et({errors:Vi,loaderData:Ff(w.loaderData,Kr,ln,Vi),fetchers:new Map(w.fetchers)}),We=!1)}async function dv(x,j,k,T,F,V,W,$,b){let U=w.fetchers.get(x);Nn(x,el(b,U?U.data:void 0),{flushSync:W});let B=new AbortController,q=Yr(e.history,k,B.signal);if(V){let ae=await ns(F,new URL(q.url).pathname,q.signal,x);if(ae.type==="aborted")return;if(ae.type==="error"){rn(x,j,ae.error,{flushSync:W});return}else if(ae.matches)F=ae.matches,T=ul(F,k);else{rn(x,j,dt(404,{pathname:k}),{flushSync:W});return}}O.set(x,B);let ne=H,me=(await bi("loader",w,q,[T],F,x))[T.route.id];if(qn(me)&&(me=await zc(me,q.signal,!0)||me),O.get(x)===B&&O.delete(x),!q.signal.aborted){if(Je.has(x)){Nn(x,Mn(void 0));return}if(Er(me))if(K>ne){Nn(x,Mn(void 0));return}else{pe.add(x),await fr(q,me,!1,{preventScrollReset:$});return}if(wt(me)){rn(x,j,me.error);return}X(!qn(me),"Unhandled fetcher deferred data"),Nn(x,Mn(me.data))}}async function fr(x,j,k,T){let{submission:F,fetcherSubmission:V,preventScrollReset:W,replace:$}=T===void 0?{}:T;j.response.headers.has("X-Remix-Revalidate")&&(We=!0);let b=j.response.headers.get("Location");X(b,"Expected a Location header on the redirect Response"),b=Mf(b,new URL(x.url),o,e.history);let U=Al(w.location,b,{_isRedirect:!0});if(n){let ae=!1;if(j.response.headers.has("X-Remix-Reload-Document"))ae=!0;else if(Ic.test(b)){const Ne=e.history.createURL(b);ae=Ne.origin!==t.location.origin||Sn(Ne.pathname,o)==null}if(ae){$?t.location.replace(b):t.location.assign(b);return}}M=null;let B=$===!0||j.response.headers.has("X-Remix-Replace")?Oe.Replace:Oe.Push,{formMethod:q,formAction:ne,formEncType:Be}=w.navigation;!F&&!V&&q&&ne&&Be&&(F=Uf(w.navigation));let me=F||V;if(s1.has(j.response.status)&&me&&$t(me.formMethod))await dr(B,U,{submission:xe({},me,{formAction:b}),preventScrollReset:W||z,enableViewTransition:k?Y:void 0});else{let ae=wo(U,F);await dr(B,U,{overrideNavigation:ae,fetcherSubmission:V,preventScrollReset:W||z,enableViewTransition:k?Y:void 0})}}async function bi(x,j,k,T,F,V){let W,$={};try{W=await p1(c,x,j,k,T,F,V,l,i)}catch(b){return T.forEach(U=>{$[U.route.id]={type:de.error,error:b}}),$}for(let[b,U]of Object.entries(W))if(_1(U)){let B=U.result;$[b]={type:de.redirect,response:y1(B,k,b,F,o,d.v7_relativeSplatPath)}}else $[b]=await v1(U);return $}async function Wc(x,j,k,T,F){let V=x.matches,W=bi("loader",x,F,k,j,null),$=Promise.all(T.map(async B=>{if(B.matches&&B.match&&B.controller){let ne=(await bi("loader",x,Yr(e.history,B.path,B.controller.signal),[B.match],B.matches,B.key))[B.match.route.id];return{[B.key]:ne}}else return Promise.resolve({[B.key]:{type:de.error,error:dt(404,{pathname:B.path})}})})),b=await W,U=(await $).reduce((B,q)=>Object.assign(B,q),{});return await Promise.all([E1(j,b,F.signal,V,x.loaderData),j1(j,U,T)]),{loaderResults:b,fetcherResults:U}}function ba(){We=!0,Cn.push(...Qa()),Ft.forEach((x,j)=>{O.has(j)&&kn.add(j),Pn(j)})}function Nn(x,j,k){k===void 0&&(k={}),w.fetchers.set(x,j),et({fetchers:new Map(w.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function rn(x,j,k,T){T===void 0&&(T={});let F=gr(w.matches,j);Zl(x),et({errors:{[F.route.id]:k},fetchers:new Map(w.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Kc(x){return yt.set(x,(yt.get(x)||0)+1),Je.has(x)&&Je.delete(x),w.fetchers.get(x)||a1}function Zl(x){let j=w.fetchers.get(x);O.has(x)&&!(j&&j.state==="loading"&&he.has(x))&&Pn(x),Ft.delete(x),he.delete(x),pe.delete(x),d.v7_fetcherPersist&&Je.delete(x),kn.delete(x),w.fetchers.delete(x)}function fv(x){let j=(yt.get(x)||0)-1;j<=0?(yt.delete(x),Je.add(x),d.v7_fetcherPersist||Zl(x)):yt.set(x,j),et({fetchers:new Map(w.fetchers)})}function Pn(x){let j=O.get(x);j&&(j.abort(),O.delete(x))}function qc(x){for(let j of x){let k=Kc(j),T=Mn(k.data);w.fetchers.set(j,T)}}function Gc(){let x=[],j=!1;for(let k of pe){let T=w.fetchers.get(k);X(T,"Expected fetcher: "+k),T.state==="loading"&&(pe.delete(k),x.push(k),j=!0)}return qc(x),j}function Yc(x){let j=[];for(let[k,T]of he)if(T<x){let F=w.fetchers.get(k);X(F,"Expected fetcher: "+k),F.state==="loading"&&(Pn(k),he.delete(k),j.push(k))}return qc(j),j.length>0}function hv(x,j){let k=w.blockers.get(x)||Zi;return Nt.get(x)!==j&&Nt.set(x,j),k}function Xc(x){w.blockers.delete(x),Nt.delete(x)}function es(x,j){let k=w.blockers.get(x)||Zi;X(k.state==="unblocked"&&j.state==="blocked"||k.state==="blocked"&&j.state==="blocked"||k.state==="blocked"&&j.state==="proceeding"||k.state==="blocked"&&j.state==="unblocked"||k.state==="proceeding"&&j.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+j.state);let T=new Map(w.blockers);T.set(x,j),et({blockers:T})}function Jc(x){let{currentLocation:j,nextLocation:k,historyAction:T}=x;if(Nt.size===0)return;Nt.size>1&&br(!1,"A router only supports one blocker at a time");let F=Array.from(Nt.entries()),[V,W]=F[F.length-1],$=w.blockers.get(V);if(!($&&$.state==="proceeding")&&W({currentLocation:j,nextLocation:k,historyAction:T}))return V}function Ba(x){let j=dt(404,{pathname:x}),k=a||s,{matches:T,route:F}=zf(k);return Qa(),{notFoundMatches:T,route:F,error:j}}function Qa(x){let j=[];return Ze.forEach((k,T)=>{(!x||x(T))&&(k.cancel(),j.push(T),Ze.delete(T))}),j}function pv(x,j,k){if(E=x,P=j,_=k||null,!v&&w.navigation===_o){v=!0;let T=ed(w.location,w.matches);T!=null&&et({restoreScrollPosition:T})}return()=>{E=null,P=null,_=null}}function Zc(x,j){return _&&_(x,j.map(T=>z0(T,w.loaderData)))||x.key}function mv(x,j){if(E&&P){let k=Zc(x,j);E[k]=P()}}function ed(x,j){if(E){let k=Zc(x,j),T=E[k];if(typeof T=="number")return T}return null}function ts(x,j,k){if(h)if(x){if(Object.keys(x[0].params).length>0)return{active:!0,matches:bs(j,k,o,!0)}}else return{active:!0,matches:bs(j,k,o,!0)||[]};return{active:!1,matches:null}}async function ns(x,j,k,T){if(!h)return{type:"success",matches:x};let F=x;for(;;){let V=a==null,W=a||s,$=l;try{await h({signal:k,path:j,matches:F,fetcherKey:T,patch:(B,q)=>{k.aborted||Lf(B,q,W,$,i)}})}catch(B){return{type:"error",error:B,partialMatches:F}}finally{V&&!k.aborted&&(s=[...s])}if(k.aborted)return{type:"aborted"};let b=yr(W,j,o);if(b)return{type:"success",matches:b};let U=bs(W,j,o,!0);if(!U||F.length===U.length&&F.every((B,q)=>B.route.id===U[q].route.id))return{type:"success",matches:null};F=U}}function vv(x){l={},a=ma(x,i,void 0,l)}function yv(x,j){let k=a==null;Lf(x,j,a||s,l,i),k&&(s=[...s],et({}))}return D={get basename(){return o},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:nv,subscribe:iv,enableScrollRestoration:pv,navigate:Vc,fetch:uv,revalidate:lv,createHref:x=>e.history.createHref(x),encodeLocation:x=>e.history.encodeLocation(x),getFetcher:Kc,deleteFetcher:fv,dispose:rv,getBlocker:hv,deleteBlocker:Xc,patchRoutes:yv,_internalFetchControllers:O,_internalActiveDeferreds:Ze,_internalSetRoutes:vv},D}function c1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ru(e,t,n,r,i,l,s,a){let o,c;if(s){o=[];for(let d of t)if(o.push(d),d.route.id===s){c=d;break}}else o=t,c=t[t.length-1];let h=Ia(i||".",Fa(o,l),Sn(e.pathname,n)||e.pathname,a==="path");if(i==null&&(h.search=e.search,h.hash=e.hash),(i==null||i===""||i===".")&&c){let d=Ac(h.search);if(c.route.index&&!d)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let p=new URLSearchParams(h.search),m=p.getAll("index");p.delete("index"),m.filter(_=>_).forEach(_=>p.append("index",_));let E=p.toString();h.search=E?"?"+E:""}}return r&&n!=="/"&&(h.pathname=h.pathname==="/"?n:vn([n,h.pathname])),Br(h)}function Nf(e,t,n,r){if(!r||!c1(r))return{path:n};if(r.formMethod&&!S1(r.formMethod))return{path:n,error:dt(405,{method:r.formMethod})};let i=()=>({path:n,error:dt(400,{type:"invalid-body"})}),l=r.formMethod||"get",s=e?l.toUpperCase():l.toLowerCase(),a=Bm(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!$t(s))return i();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,E)=>{let[_,P]=E;return""+m+_+"="+P+`
50
- `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!$t(s))return i();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return i()}}}X(typeof FormData=="function","FormData is not available in this environment");let o,c;if(r.formData)o=Lu(r.formData),c=r.formData;else if(r.body instanceof FormData)o=Lu(r.body),c=r.body;else if(r.body instanceof URLSearchParams)o=r.body,c=Df(o);else if(r.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(r.body),c=Df(o)}catch{return i()}let h={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if($t(h.formMethod))return{path:n,submission:h};let d=ur(n);return t&&d.search&&Ac(d.search)&&o.append("index",""),d.search="?"+o,{path:Br(d),submission:h}}function Pf(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Rf(e,t,n,r,i,l,s,a,o,c,h,d,p,m,E,_){let P=_?wt(_[1])?_[1].error:_[1].data:void 0,v=e.createURL(t.location),f=e.createURL(i),y=n;l&&t.errors?y=Pf(n,Object.keys(t.errors)[0],!0):_&&wt(_[1])&&(y=Pf(n,_[0]));let S=_?_[1].statusCode:void 0,R=s&&S&&S>=400,D=y.filter((N,z)=>{let{route:M}=N;if(M.lazy)return!0;if(M.loader==null)return!1;if(l)return Tu(M,t.loaderData,t.errors);if(d1(t.loaderData,t.matches[z],N)||o.some(Ce=>Ce===N.route.id))return!0;let Y=t.matches[z],se=N;return Tf(N,xe({currentUrl:v,currentParams:Y.params,nextUrl:f,nextParams:se.params},r,{actionResult:P,actionStatus:S,defaultShouldRevalidate:R?!1:a||v.pathname+v.search===f.pathname+f.search||v.search!==f.search||$m(Y,se)}))}),w=[];return d.forEach((N,z)=>{if(l||!n.some(ke=>ke.route.id===N.routeId)||h.has(z))return;let M=yr(m,N.path,E);if(!M){w.push({key:z,routeId:N.routeId,path:N.path,matches:null,match:null,controller:null});return}let Y=t.fetchers.get(z),se=ul(M,N.path),Ce=!1;p.has(z)?Ce=!1:c.has(z)?(c.delete(z),Ce=!0):Y&&Y.state!=="idle"&&Y.data===void 0?Ce=a:Ce=Tf(se,xe({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:f,nextParams:n[n.length-1].params},r,{actionResult:P,actionStatus:S,defaultShouldRevalidate:R?!1:a})),Ce&&w.push({key:z,routeId:N.routeId,path:N.path,matches:M,match:se,controller:new AbortController})}),[D,w]}function Tu(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function d1(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function $m(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Tf(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Lf(e,t,n,r,i){var l;let s;if(e){let c=r[e];X(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=n;let a=t.filter(c=>!s.some(h=>bm(c,h))),o=ma(a,i,[e||"_","patch",String(((l=s)==null?void 0:l.length)||"0")],r);s.push(...o)}function bm(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(l=>bm(n,l))}):!1}async function f1(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];X(i,"No route found in manifest");let l={};for(let s in r){let o=i[s]!==void 0&&s!=="hasErrorBoundary";br(!o,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!o&&!F0.has(s)&&(l[s]=r[s])}Object.assign(i,l),Object.assign(i,xe({},t(i),{lazy:void 0}))}async function h1(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,l,s)=>Object.assign(i,{[n[s].route.id]:l}),{})}async function p1(e,t,n,r,i,l,s,a,o,c){let h=l.map(m=>m.route.lazy?f1(m.route,o,a):void 0),d=l.map((m,E)=>{let _=h[E],P=i.some(f=>f.route.id===m.route.id);return xe({},m,{shouldLoad:P,resolve:async f=>(f&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(P=!0),P?m1(t,r,m,_,f,c):Promise.resolve({type:de.data,result:void 0}))})}),p=await e({matches:d,request:r,params:l[0].params,fetcherKey:s,context:c});try{await Promise.all(h)}catch{}return p}async function m1(e,t,n,r,i,l){let s,a,o=c=>{let h,d=new Promise((E,_)=>h=_);a=()=>h(),t.signal.addEventListener("abort",a);let p=E=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:l},...E!==void 0?[E]:[]),m=(async()=>{try{return{type:"data",result:await(i?i(_=>p(_)):p())}}catch(E){return{type:"error",result:E}}})();return Promise.race([m,d])};try{let c=n.route[e];if(r)if(c){let h,[d]=await Promise.all([o(c).catch(p=>{h=p}),r]);if(h!==void 0)throw h;s=d}else if(await r,c=n.route[e],c)s=await o(c);else if(e==="action"){let h=new URL(t.url),d=h.pathname+h.search;throw dt(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:de.data,result:void 0};else if(c)s=await o(c);else{let h=new URL(t.url),d=h.pathname+h.search;throw dt(404,{pathname:d})}X(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:de.error,result:c}}finally{a&&t.signal.removeEventListener("abort",a)}return s}async function v1(e){let{result:t,type:n}=e;if(Qm(t)){let d;try{let p=t.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(p){return{type:de.error,error:p}}return n===de.error?{type:de.error,error:new ya(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:de.data,data:d,statusCode:t.status,headers:t.headers}}if(n===de.error){if(Af(t)){var r,i;if(t.data instanceof Error){var l,s;return{type:de.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:de.error,error:new ya(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Ul(t)?t.status:void 0,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:de.error,error:t,statusCode:Ul(t)?t.status:void 0}}if(w1(t)){var a,o;return{type:de.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(Af(t)){var c,h;return{type:de.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(h=t.init)!=null&&h.headers?new Headers(t.init.headers):void 0}}return{type:de.data,data:t}}function y1(e,t,n,r,i,l){let s=e.headers.get("Location");if(X(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ic.test(s)){let a=r.slice(0,r.findIndex(o=>o.route.id===n)+1);s=Ru(new URL(t.url),a,i,!0,s,l),e.headers.set("Location",s)}return e}function Mf(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Ic.test(e)){let l=e,s=l.startsWith("//")?new URL(t.protocol+l):new URL(l);if(i.includes(s.protocol))throw new Error("Invalid redirect location");let a=Sn(s.pathname,n)!=null;if(s.origin===t.origin&&a)return Fc(s.pathname)+s.search+s.hash}try{let l=r.createURL(e);if(i.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Yr(e,t,n,r){let i=e.createURL(Bm(t)).toString(),l={signal:n};if(r&&$t(r.formMethod)){let{formMethod:s,formEncType:a}=r;l.method=s.toUpperCase(),a==="application/json"?(l.headers=new Headers({"Content-Type":a}),l.body=JSON.stringify(r.json)):a==="text/plain"?l.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?l.body=Lu(r.formData):l.body=r.formData}return new Request(i,l)}function Lu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Df(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function g1(e,t,n,r,i){let l={},s=null,a,o=!1,c={},h=n&&wt(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let p=d.route.id,m=t[p];if(X(!Er(m),"Cannot handle redirect results in processLoaderData"),wt(m)){let E=m.error;h!==void 0&&(E=h,h=void 0),s=s||{};{let _=gr(e,p);s[_.route.id]==null&&(s[_.route.id]=E)}l[p]=void 0,o||(o=!0,a=Ul(m.error)?m.error.status:500),m.headers&&(c[p]=m.headers)}else qn(m)?(r.set(p,m.deferredData),l[p]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!o&&(a=m.statusCode),m.headers&&(c[p]=m.headers)):(l[p]=m.data,m.statusCode&&m.statusCode!==200&&!o&&(a=m.statusCode),m.headers&&(c[p]=m.headers))}),h!==void 0&&n&&(s={[n[0]]:h},l[n[0]]=void 0),{loaderData:l,errors:s,statusCode:a||200,loaderHeaders:c}}function Of(e,t,n,r,i,l,s){let{loaderData:a,errors:o}=g1(t,n,r,s);return i.forEach(c=>{let{key:h,match:d,controller:p}=c,m=l[h];if(X(m,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(wt(m)){let E=gr(e.matches,d==null?void 0:d.route.id);o&&o[E.route.id]||(o=xe({},o,{[E.route.id]:m.error})),e.fetchers.delete(h)}else if(Er(m))X(!1,"Unhandled fetcher revalidation redirect");else if(qn(m))X(!1,"Unhandled fetcher deferred data");else{let E=Mn(m.data);e.fetchers.set(h,E)}}),{loaderData:a,errors:o}}function Ff(e,t,n,r){let i=xe({},t);for(let l of n){let s=l.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(i[s]=t[s]):e[s]!==void 0&&l.route.loader&&(i[s]=e[s]),r&&r.hasOwnProperty(s))break}return i}function If(e){return e?wt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function zf(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function dt(e,t){let{pathname:n,routeId:r,method:i,type:l,message:s}=t===void 0?{}:t,a="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&n&&r?o="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":l==="defer-action"?o="defer() is not supported in actions":l==="invalid-body"&&(o="Unable to encode submission body")):e===403?(a="Forbidden",o='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",o='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",i&&n&&r?o="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new ya(e||500,a,new Error(o),!0)}function js(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(Er(i))return{key:r,result:i}}}function Bm(e){let t=typeof e=="string"?ur(e):e;return Br(xe({},t,{hash:""}))}function x1(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function _1(e){return Qm(e.result)&&l1.has(e.result.status)}function qn(e){return e.type===de.deferred}function wt(e){return e.type===de.error}function Er(e){return(e&&e.type)===de.redirect}function Af(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function w1(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Qm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function S1(e){return i1.has(e.toLowerCase())}function $t(e){return n1.has(e.toLowerCase())}async function E1(e,t,n,r,i){let l=Object.entries(t);for(let s=0;s<l.length;s++){let[a,o]=l[s],c=e.find(p=>(p==null?void 0:p.route.id)===a);if(!c)continue;let h=r.find(p=>p.route.id===c.route.id),d=h!=null&&!$m(h,c)&&(i&&i[c.route.id])!==void 0;qn(o)&&d&&await zc(o,n,!1).then(p=>{p&&(t[a]=p)})}}async function j1(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:l,controller:s}=n[r],a=t[i];e.find(c=>(c==null?void 0:c.route.id)===l)&&qn(a)&&(X(s,"Expected an AbortController for revalidating fetcher deferred result"),await zc(a,s.signal,!0).then(c=>{c&&(t[i]=c)}))}}async function zc(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:de.data,data:e.deferredData.unwrappedData}}catch(i){return{type:de.error,error:i}}return{type:de.data,data:e.deferredData.data}}}function Ac(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ul(e,t){let n=typeof t=="string"?ur(t).search:t.search;if(e[e.length-1].route.index&&Ac(n||""))return e[e.length-1];let r=zm(e);return r[r.length-1]}function Uf(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:l,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:l,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function wo(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function C1(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function el(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function k1(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Mn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function N1(e,t){try{let n=e.sessionStorage.getItem(Um);if(n){let r=JSON.parse(n);for(let[i,l]of Object.entries(r||{}))l&&Array.isArray(l)&&t.set(i,new Set(l||[]))}}catch{}}function P1(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Um,JSON.stringify(n))}catch(r){br(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
51
- * React Router v6.30.4
52
- *
53
- * Copyright (c) Remix Software Inc.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE.md file in the root directory of this source tree.
57
- *
58
- * @license MIT
59
- */function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ga.apply(null,arguments)}const Xl=C.createContext(null),Uc=C.createContext(null),jn=C.createContext(null),$c=C.createContext(null),nn=C.createContext({outlet:null,matches:[],isDataRoute:!1}),Vm=C.createContext(null);function R1(e,t){let{relative:n}=t===void 0?{}:t;$i()||X(!1);let{basename:r,navigator:i}=C.useContext(jn),{hash:l,pathname:s,search:a}=Aa(e,{relative:n}),o=s;return r!=="/"&&(o=s==="/"?r:vn([r,s])),i.createHref({pathname:o,search:a,hash:l})}function $i(){return C.useContext($c)!=null}function cr(){return $i()||X(!1),C.useContext($c).location}function Hm(e){C.useContext(jn).static||C.useLayoutEffect(e)}function za(){let{isDataRoute:e}=C.useContext(nn);return e?Q1():T1()}function T1(){$i()||X(!1);let e=C.useContext(Xl),{basename:t,future:n,navigator:r}=C.useContext(jn),{matches:i}=C.useContext(nn),{pathname:l}=cr(),s=JSON.stringify(Fa(i,n.v7_relativeSplatPath)),a=C.useRef(!1);return Hm(()=>{a.current=!0}),C.useCallback(function(c,h){if(h===void 0&&(h={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Ia(c,JSON.parse(s),l,h.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:vn([t,d.pathname])),(h.replace?r.replace:r.push)(d,h.state,h)},[t,r,s,l,e])}const L1=C.createContext(null);function M1(e){let t=C.useContext(nn).outlet;return t&&C.createElement(L1.Provider,{value:e},t)}function Wm(){let{matches:e}=C.useContext(nn),t=e[e.length-1];return t?t.params:{}}function Aa(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(jn),{matches:i}=C.useContext(nn),{pathname:l}=cr(),s=JSON.stringify(Fa(i,r.v7_relativeSplatPath));return C.useMemo(()=>Ia(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function D1(e,t,n,r){$i()||X(!1);let{navigator:i}=C.useContext(jn),{matches:l}=C.useContext(nn),s=l[l.length-1],a=s?s.params:{};s&&s.pathname;let o=s?s.pathnameBase:"/";s&&s.route;let c=cr(),h;h=c;let d=h.pathname||"/",p=d;if(o!=="/"){let _=o.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(_.length).join("/")}let m=yr(e,{pathname:p});return A1(m&&m.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:vn([o,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?o:vn([o,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),l,n,r)}function O1(){let e=B1(),t=Ul(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,null)}const F1=C.createElement(O1,null);class I1 extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(nn.Provider,{value:this.props.routeContext},C.createElement(Vm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z1(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(Xl);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(nn.Provider,{value:t},r)}function A1(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let h=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);h>=0||X(!1),s=s.slice(0,Math.min(s.length,h+1))}let o=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<s.length;h++){let d=s[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=h),d.route.id){let{loaderData:p,errors:m}=n,E=d.route.loader&&p[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||E){o=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((h,d,p)=>{let m,E=!1,_=null,P=null;n&&(m=a&&d.route.id?a[d.route.id]:void 0,_=d.route.errorElement||F1,o&&(c<0&&p===0?(V1("route-fallback"),E=!0,P=null):c===p&&(E=!0,P=d.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,p+1)),f=()=>{let y;return m?y=_:E?y=P:d.route.Component?y=C.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=h,C.createElement(z1,{match:d,routeContext:{outlet:h,matches:v,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?C.createElement(I1,{location:n.location,revalidation:n.revalidation,component:_,error:m,children:f(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):f()},null)}var Km=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Km||{}),qm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(qm||{});function U1(e){let t=C.useContext(Xl);return t||X(!1),t}function $1(e){let t=C.useContext(Uc);return t||X(!1),t}function b1(e){let t=C.useContext(nn);return t||X(!1),t}function Gm(e){let t=b1(),n=t.matches[t.matches.length-1];return n.route.id||X(!1),n.route.id}function B1(){var e;let t=C.useContext(Vm),n=$1(),r=Gm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Q1(){let{router:e}=U1(Km.UseNavigateStable),t=Gm(qm.UseNavigateStable),n=C.useRef(!1);return Hm(()=>{n.current=!0}),C.useCallback(function(i,l){l===void 0&&(l={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ga({fromRouteId:t},l)))},[e,t])}const $f={};function V1(e,t,n){$f[e]||($f[e]=!0)}function H1(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function W1(e){let{to:t,replace:n,state:r,relative:i}=e;$i()||X(!1);let{future:l,static:s}=C.useContext(jn),{matches:a}=C.useContext(nn),{pathname:o}=cr(),c=za(),h=Ia(t,Fa(a,l.v7_relativeSplatPath),o,i==="path"),d=JSON.stringify(h);return C.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function K1(e){return M1(e.context)}function q1(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Oe.Pop,navigator:l,static:s=!1,future:a}=e;$i()&&X(!1);let o=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:o,navigator:l,static:s,future:ga({v7_relativeSplatPath:!1},a)}),[o,a,l,s]);typeof r=="string"&&(r=ur(r));let{pathname:h="/",search:d="",hash:p="",state:m=null,key:E="default"}=r,_=C.useMemo(()=>{let P=Sn(h,o);return P==null?null:{location:{pathname:P,search:d,hash:p,state:m,key:E},navigationType:i}},[o,h,d,p,m,E,i]);return _==null?null:C.createElement(jn.Provider,{value:c},C.createElement($c.Provider,{children:n,value:_}))}new Promise(()=>{});function G1(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
60
- * React Router DOM v6.30.4
61
- *
62
- * Copyright (c) Remix Software Inc.
63
- *
64
- * This source code is licensed under the MIT license found in the
65
- * LICENSE.md file in the root directory of this source tree.
66
- *
67
- * @license MIT
68
- */function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fi.apply(null,arguments)}function Ym(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Y1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function X1(e,t){return e.button===0&&(!t||t==="_self")&&!Y1(e)}function Mu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function J1(e,t){let n=Mu(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}const Z1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ex=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],tx="6";try{window.__reactRouterVersion=tx}catch{}function nx(e,t){return u1({basename:t==null?void 0:t.basename,future:Fi({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:M0({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||rx(),routes:e,mapRouteProperties:G1,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function rx(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Fi({},t,{errors:ix(t.errors)})),t}function ix(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new ya(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let l=window[i.__subType];if(typeof l=="function")try{let s=new l(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let l=new Error(i.message);l.stack="",n[r]=l}}else n[r]=i;return n}const Xm=C.createContext({isTransitioning:!1}),lx=C.createContext(new Map),sx="startTransition",bf=Fv[sx],ax="flushSync",Bf=Kg[ax];function ox(e){bf?bf(e):e()}function tl(e){Bf?Bf(e):e()}class ux{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function cx(e){let{fallbackElement:t,router:n,future:r}=e,[i,l]=C.useState(n.state),[s,a]=C.useState(),[o,c]=C.useState({isTransitioning:!1}),[h,d]=C.useState(),[p,m]=C.useState(),[E,_]=C.useState(),P=C.useRef(new Map),{v7_startTransition:v}=r||{},f=C.useCallback(N=>{v?ox(N):N()},[v]),y=C.useCallback((N,z)=>{let{deletedFetchers:M,flushSync:Y,viewTransitionOpts:se}=z;N.fetchers.forEach((ke,We)=>{ke.data!==void 0&&P.current.set(We,ke.data)}),M.forEach(ke=>P.current.delete(ke));let Ce=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!se||Ce){Y?tl(()=>l(N)):f(()=>l(N));return}if(Y){tl(()=>{p&&(h&&h.resolve(),p.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:se.currentLocation,nextLocation:se.nextLocation})});let ke=n.window.document.startViewTransition(()=>{tl(()=>l(N))});ke.finished.finally(()=>{tl(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),tl(()=>m(ke));return}p?(h&&h.resolve(),p.skipTransition(),_({state:N,currentLocation:se.currentLocation,nextLocation:se.nextLocation})):(a(N),c({isTransitioning:!0,flushSync:!1,currentLocation:se.currentLocation,nextLocation:se.nextLocation}))},[n.window,p,h,P,f]);C.useLayoutEffect(()=>n.subscribe(y),[n,y]),C.useEffect(()=>{o.isTransitioning&&!o.flushSync&&d(new ux)},[o]),C.useEffect(()=>{if(h&&s&&n.window){let N=s,z=h.promise,M=n.window.document.startViewTransition(async()=>{f(()=>l(N)),await z});M.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(M)}},[f,s,h,n.window]),C.useEffect(()=>{h&&s&&i.location.key===s.location.key&&h.resolve()},[h,p,i.location,s]),C.useEffect(()=>{!o.isTransitioning&&E&&(a(E.state),c({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),_(void 0))},[o.isTransitioning,E]),C.useEffect(()=>{},[]);let S=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,z,M)=>n.navigate(N,{state:z,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(N,z,M)=>n.navigate(N,{replace:!0,state:z,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),R=n.basename||"/",D=C.useMemo(()=>({router:n,navigator:S,static:!1,basename:R}),[n,S,R]),w=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>H1(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(Xl.Provider,{value:D},C.createElement(Uc.Provider,{value:i},C.createElement(lx.Provider,{value:P.current},C.createElement(Xm.Provider,{value:o},C.createElement(q1,{basename:R,location:i.location,navigationType:i.historyAction,navigator:S,future:w},i.initialized||n.future.v7_partialHydration?C.createElement(dx,{routes:n.routes,future:n.future,state:i}):t))))),null)}const dx=C.memo(fx);function fx(e){let{routes:t,future:n,state:r}=e;return D1(t,void 0,r,n)}const hx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",px=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mx=C.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:l,replace:s,state:a,target:o,to:c,preventScrollReset:h,viewTransition:d}=t,p=Ym(t,Z1),{basename:m}=C.useContext(jn),E,_=!1;if(typeof c=="string"&&px.test(c)&&(E=c,hx))try{let y=new URL(window.location.href),S=c.startsWith("//")?new URL(y.protocol+c):new URL(c),R=Sn(S.pathname,m);S.origin===y.origin&&R!=null?c=R+S.search+S.hash:_=!0}catch{}let P=R1(c,{relative:i}),v=gx(c,{replace:s,state:a,target:o,preventScrollReset:h,relative:i,viewTransition:d});function f(y){r&&r(y),y.defaultPrevented||v(y)}return C.createElement("a",Fi({},p,{href:E||P,onClick:_||l?r:f,ref:n,target:o}))}),vx=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:l="",end:s=!1,style:a,to:o,viewTransition:c,children:h}=t,d=Ym(t,ex),p=Aa(o,{relative:d.relative}),m=cr(),E=C.useContext(Uc),{navigator:_,basename:P}=C.useContext(jn),v=E!=null&&_x(p)&&c===!0,f=_.encodeLocation?_.encodeLocation(p).pathname:p.pathname,y=m.pathname,S=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;i||(y=y.toLowerCase(),S=S?S.toLowerCase():null,f=f.toLowerCase()),S&&P&&(S=Sn(S,P)||S);const R=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let D=y===f||!s&&y.startsWith(f)&&y.charAt(R)==="/",w=S!=null&&(S===f||!s&&S.startsWith(f)&&S.charAt(f.length)==="/"),N={isActive:D,isPending:w,isTransitioning:v},z=D?r:void 0,M;typeof l=="function"?M=l(N):M=[l,D?"active":null,w?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let Y=typeof a=="function"?a(N):a;return C.createElement(mx,Fi({},d,{"aria-current":z,className:M,ref:n,style:Y,to:o,viewTransition:c}),typeof h=="function"?h(N):h)});var Du;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Du||(Du={}));var Qf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Qf||(Qf={}));function yx(e){let t=C.useContext(Xl);return t||X(!1),t}function gx(e,t){let{target:n,replace:r,state:i,preventScrollReset:l,relative:s,viewTransition:a}=t===void 0?{}:t,o=za(),c=cr(),h=Aa(e,{relative:s});return C.useCallback(d=>{if(X1(d,n)){d.preventDefault();let p=r!==void 0?r:Br(c)===Br(h);o(e,{replace:p,state:i,preventScrollReset:l,relative:s,viewTransition:a})}},[c,o,h,r,i,n,e,l,s,a])}function xx(e){let t=C.useRef(Mu(e)),n=C.useRef(!1),r=cr(),i=C.useMemo(()=>J1(r.search,n.current?null:t.current),[r.search]),l=za(),s=C.useCallback((a,o)=>{const c=Mu(typeof a=="function"?a(i):a);n.current=!0,l("?"+c,o)},[l,i]);return[i,s]}function _x(e,t){t===void 0&&(t={});let n=C.useContext(Xm);n==null&&X(!1);let{basename:r}=yx(Du.useViewTransitionState),i=Aa(e,{relative:t.relative});if(!n.isTransitioning)return!1;let l=Sn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Sn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return va(i.pathname,s)!=null||va(i.pathname,l)!=null}const wx="/api/v1";class Jm extends Error{constructor(t,n,r){super(r),this.status=t,this.body=n,this.name="ApiError"}}async function nl(e,t,n){const r=await fetch(`${wx}${t}`,{method:e,headers:n!==void 0?{"Content-Type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0,credentials:"same-origin"});if(!r.ok){let i;try{i=await r.json()}catch{i=await r.text().catch(()=>null)}throw new Jm(r.status,i,`${e} ${t} → ${r.status}`)}if(r.status!==204)return await r.json()}function Sx(e){if(!e)return"";const t=[];for(const[n,r]of Object.entries(e))r==null||r===""||t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`);return t.length>0?`?${t.join("&")}`:""}const it={get:e=>nl("GET",e),post:(e,t)=>nl("POST",e,t),patch:(e,t)=>nl("PATCH",e,t),put:(e,t)=>nl("PUT",e,t),delete:e=>nl("DELETE",e)},Ex="_shell_ile4l_1",jx="_sidebar_ile4l_13",Cx="_brand_ile4l_23",kx="_nav_ile4l_32",Nx="_navItem_ile4l_39",Px="_navItemActive_ile4l_56",Rx="_sidebarFooter_ile4l_61",Tx="_sidebarVersion_ile4l_69",Lx="_topbar_ile4l_73",Mx="_searchForm_ile4l_83",Dx="_search_ile4l_83",Ox="_themeToggle_ile4l_104",Fx="_main_ile4l_123",ot={shell:Ex,sidebar:jx,brand:Cx,nav:kx,navItem:Nx,navItemActive:Px,sidebarFooter:Rx,sidebarVersion:Tx,topbar:Lx,searchForm:Mx,search:Dx,themeToggle:Ox,main:Fx},Ix=[{to:"/atlas",label:"Atlas"},{to:"/memories",label:"Memories"},{to:"/injection",label:"Injection"},{to:"/sleep",label:"Sleep"},{to:"/settings",label:"Settings"}];function zx(){const e=za();cr();const[t,n]=C.useState(()=>localStorage.getItem("memweave-theme")==="dark"?"dark":"light"),[r,i]=C.useState("");C.useEffect(()=>{document.documentElement.setAttribute("data-theme",t),localStorage.setItem("memweave-theme",t)},[t]);const l=s=>{s.preventDefault(),r.trim()&&e(`/memories?q=${encodeURIComponent(r.trim())}`)};return u.jsxs("div",{className:ot.shell,children:[u.jsxs("aside",{className:ot.sidebar,children:[u.jsx("div",{className:ot.brand,children:"MemWeave"}),u.jsx("nav",{className:ot.nav,children:Ix.map(s=>u.jsx(vx,{to:s.to,className:({isActive:a})=>a?`${ot.navItem} ${ot.navItemActive}`:ot.navItem,children:s.label},s.to))}),u.jsx("div",{className:ot.sidebarFooter,children:u.jsx("span",{className:ot.sidebarVersion,children:"v0.1.0"})})]}),u.jsxs("header",{className:ot.topbar,children:[u.jsx("form",{className:ot.searchForm,onSubmit:l,children:u.jsx("input",{type:"search",className:ot.search,placeholder:"Search memories…",value:r,onChange:s=>i(s.target.value)})}),u.jsx("button",{className:ot.themeToggle,onClick:()=>n(s=>s==="light"?"dark":"light"),"aria-label":"Toggle theme",children:t==="light"?"◐":"◑"})]}),u.jsx("main",{className:ot.main,children:u.jsx(K1,{})})]})}const Zm=e=>e.toFixed(2),tn=e=>e?new Date(e).toLocaleString():"—",bc=e=>{if(!e)return"—";const t=Date.now()-e,n=Math.round(t/1e3);if(n<60)return`${n}s ago`;const r=Math.round(n/60);if(r<60)return`${r}m ago`;const i=Math.round(r/60);if(i<24)return`${i}h ago`;const l=Math.round(i/24);return l<30?`${l}d ago`:tn(e)},Ax=(e,t)=>e.length<=t?e:e.slice(0,t-1)+"…",Ux="_page_zs4as_1",$x="_loading_zs4as_6",bx="_error_zs4as_7",Bx="_empty_zs4as_8",Qx="_header_zs4as_18",Vx="_title_zs4as_22",Hx="_subtitle_zs4as_27",Wx="_kpiRow_zs4as_32",Kx="_kpi_zs4as_32",qx="_kpiLabel_zs4as_46",Gx="_kpiValue_zs4as_55",Yx="_kpiSub_zs4as_64",Xx="_section_zs4as_69",Jx="_sectionTitle_zs4as_73",Zx="_barGroup_zs4as_78",e_="_barRow_zs4as_88",t_="_barLabel_zs4as_95",n_="_barTrack_zs4as_101",r_="_barFill_zs4as_108",i_="_barValue_zs4as_114",l_="_projectChips_zs4as_121",s_="_projectChip_zs4as_121",a_="_projectName_zs4as_144",o_="_projectCount_zs4as_148",ce={page:Ux,loading:$x,error:bx,empty:Bx,header:Qx,title:Vx,subtitle:Hx,kpiRow:Wx,kpi:Kx,kpiLabel:qx,kpiValue:Gx,kpiSub:Yx,section:Xx,sectionTitle:Jx,barGroup:Zx,barRow:e_,barLabel:t_,barTrack:n_,barFill:r_,barValue:i_,projectChips:l_,projectChip:s_,projectName:a_,projectCount:o_},u_=["fact","decision","preference","event","project_context","lesson","code_pattern","bug","workflow"],c_=["short","medium","long"];function d_(){const{data:e,isLoading:t,error:n}=en({queryKey:["stats"],queryFn:()=>it.get("/stats")});return t?u.jsxs("div",{className:ce.loading,children:[u.jsx("span",{className:"spinner"})," Loading Atlas…"]}):n?u.jsxs("div",{className:ce.error,children:["Failed to load stats: ",n.message]}):e?u.jsxs("div",{className:ce.page,children:[u.jsxs("header",{className:ce.header,children:[u.jsx("h1",{className:ce.title,children:"Atlas"}),u.jsx("p",{className:ce.subtitle,children:"Memory observatory — strength over time"})]}),u.jsxs("section",{className:ce.kpiRow,children:[u.jsx(Cs,{label:"Total memorias",value:e.totals.memories.toLocaleString(),sub:`${e.totals.activeMemories} active`}),u.jsx(Cs,{label:"Today: new",value:e.today.newMemories.toLocaleString(),sub:`${e.today.promoted} promoted · ${e.today.evicted} evicted`}),u.jsx(Cs,{label:"Edges",value:e.totals.edges.toLocaleString(),sub:"causal + reference"}),u.jsx(Cs,{label:"Last sleep",value:e.lastConsolidation?bc(e.lastConsolidation.startedAt):"—",sub:e.lastConsolidation?e.lastConsolidation.summary:"no runs yet"})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:"By tier"}),u.jsx("div",{className:ce.barGroup,children:c_.map(r=>u.jsx(Vf,{label:r,value:e.byTier[r],max:Math.max(1,...Object.values(e.byTier)),colorVar:`var(--tier-${r})`},r))})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:"By type"}),u.jsx("div",{className:ce.barGroup,children:u_.map(r=>u.jsx(Vf,{label:r,value:e.byType[r],max:Math.max(1,...Object.values(e.byType)),colorVar:`var(--type-${r})`},r))})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:"Recent projects"}),e.recentProjects.length===0?u.jsx("p",{className:ce.empty,children:"No scoped memorias yet."}):u.jsx("div",{className:ce.projectChips,children:e.recentProjects.map(r=>u.jsxs("a",{href:`/ui/memories?project=${encodeURIComponent(r.project)}`,className:ce.projectChip,children:[u.jsx("span",{className:ce.projectName,children:r.project}),u.jsx("span",{className:ce.projectCount,children:r.count})]},r.project))})]})]}):null}function Cs({label:e,value:t,sub:n}){return u.jsxs("div",{className:ce.kpi,children:[u.jsx("div",{className:ce.kpiLabel,children:e}),u.jsx("div",{className:ce.kpiValue,children:t}),u.jsx("div",{className:ce.kpiSub,children:n})]})}function Vf({label:e,value:t,max:n,colorVar:r}){const i=n>0?t/n*100:0;return u.jsxs("div",{className:ce.barRow,children:[u.jsx("span",{className:ce.barLabel,children:e}),u.jsx("div",{className:ce.barTrack,children:u.jsx("div",{className:ce.barFill,style:{width:`${i}%`,background:r}})}),u.jsx("span",{className:ce.barValue,children:Zm(t)})]})}const f_="_bar_7o9ij_1",h_="_track_7o9ij_7",p_="_fill_7o9ij_17",m_="_label_7o9ij_22",ks={bar:f_,track:h_,fill:p_,label:m_};function Bc({value:e,label:t=!0}){const n=Math.max(0,Math.min(1,e)),r=(n*100).toFixed(0),i=n<.34?"var(--danger)":n<.67?"var(--warning)":"var(--accent)";return u.jsxs("div",{className:ks.bar,children:[u.jsx("div",{className:ks.track,children:u.jsx("div",{className:ks.fill,style:{width:`${r}%`,background:i}})}),t&&u.jsx("span",{className:ks.label,children:Zm(n)})]})}const v_="_badge_1jsky_1",ev={badge:v_},Hf={fact:"var(--type-fact)",decision:"var(--type-decision)",preference:"var(--type-preference)",event:"var(--type-event)",project_context:"var(--type-project_context)",lesson:"var(--type-lesson)",code_pattern:"var(--type-code-pattern)",bug:"var(--type-bug)",workflow:"var(--type-workflow)"},Wf={short:"var(--tier-short)",medium:"var(--tier-medium)",long:"var(--tier-long)"};function Ua({type:e}){return u.jsx("span",{className:ev.badge,style:{borderColor:Hf[e],color:Hf[e]},children:e})}function $a({tier:e}){return u.jsx("span",{className:ev.badge,style:{borderColor:Wf[e],color:Wf[e]},children:e})}const y_="_row_ympqr_1",g_="_chip_ympqr_7",x_="_chipKey_ympqr_18",__="_chipValue_ympqr_23",Ns={row:y_,chip:g_,chipKey:x_,chipValue:__},Kf={project:"var(--accent)",domain:"var(--link)",topic:"var(--text-muted)"};function Qc({scopes:e}){return e.length===0?null:u.jsx("div",{className:Ns.row,children:e.map(t=>u.jsxs("span",{className:Ns.chip,style:{borderColor:Kf[t.key],color:Kf[t.key]},title:`${t.key} = ${t.value}`,children:[u.jsxs("span",{className:Ns.chipKey,children:[t.key,":"]}),u.jsx("span",{className:Ns.chipValue,children:t.value})]},`${t.key}:${t.value}`))})}const w_="_card_1cfv2_1",S_="_cardSelected_1cfv2_20",E_="_header_1cfv2_25",j_="_title_1cfv2_32",C_="_summary_1cfv2_40",k_="_footer_1cfv2_50",N_="_meta_1cfv2_58",Tn={card:w_,cardSelected:S_,header:E_,title:j_,summary:C_,footer:k_,meta:N_};function P_({memory:e,selected:t=!1,onClick:n}){return u.jsxs("button",{className:t?`${Tn.card} ${Tn.cardSelected}`:Tn.card,onClick:n,type:"button",children:[u.jsxs("div",{className:Tn.header,children:[u.jsx(Ua,{type:e.type}),u.jsx($a,{tier:e.tier}),u.jsx("span",{className:Tn.title,children:e.title})]}),u.jsx("div",{className:Tn.summary,children:Ax(e.summary,140)}),u.jsx(Qc,{scopes:e.scopes}),u.jsxs("div",{className:Tn.footer,children:[u.jsx(Bc,{value:e.strength,label:!0}),u.jsxs("span",{className:Tn.meta,children:[e.accessCount,"× · ",bc(e.lastAccessedAt)]})]})]})}const R_="_page_vxyah_1",T_="_filterRail_vxyah_9",L_="_filterTitle_vxyah_16",M_="_filterGroup_vxyah_25",D_="_filterGroupTitle_vxyah_29",O_="_filterGroupBody_vxyah_36",F_="_filterCheckbox_vxyah_42",I_="_filterInput_vxyah_57",z_="_list_vxyah_67",A_="_listHeader_vxyah_75",U_="_empty_vxyah_82",$_="_error_vxyah_83",b_="_reading_vxyah_93",B_="_readingArticle_vxyah_100",Q_="_readingHeader_vxyah_106",V_="_readingBadges_vxyah_114",H_="_readingTitle_vxyah_119",W_="_readingSection_vxyah_124",K_="_readingSectionTitle_vxyah_130",q_="_readingContent_vxyah_138",G_="_readingDl_vxyah_150",Y_="_readingActions_vxyah_173",X_="_btnSecondary_vxyah_180",J_="_btnDanger_vxyah_181",oe={page:R_,filterRail:T_,filterTitle:L_,filterGroup:M_,filterGroupTitle:D_,filterGroupBody:O_,filterCheckbox:F_,filterInput:I_,list:z_,listHeader:A_,empty:U_,error:$_,reading:b_,readingArticle:B_,readingHeader:Q_,readingBadges:V_,readingTitle:H_,readingSection:W_,readingSectionTitle:K_,readingContent:q_,readingDl:G_,readingActions:Y_,btnSecondary:X_,btnDanger:J_},Z_=["fact","decision","preference","event","project_context","lesson","code_pattern","bug","workflow"],ew=["short","medium","long"];function tw(){var d;const[e,t]=xx(),n=e.get("selected"),r=e.get("project")??"",i=e.getAll("type")??[],l=e.getAll("tier")??[],s=en({queryKey:["memories",{project:r,types:i,tiers:l}],queryFn:()=>it.get(`/memories${Sx({limit:50,type:i[0],tier:l[0]})}`)}),a=en({queryKey:["memory",n],queryFn:async()=>n?it.get(`/memories/${n}`):null,enabled:!!n}),o=Yl(),c=pa({mutationFn:p=>it.delete(`/memories/${p}`),onSuccess:()=>{o.invalidateQueries({queryKey:["memories"]}),t(p=>(p.delete("selected"),p))}}),h=(p,m,E)=>{t(_=>{{const P=_.getAll(p),v=P.includes(m)?P.filter(f=>f!==m):[...P,m];_.delete(p);for(const f of v)_.append(p,f)}return _})};return u.jsxs("div",{className:oe.page,children:[u.jsxs("aside",{className:oe.filterRail,children:[u.jsx("h2",{className:oe.filterTitle,children:"Filters"}),u.jsx(So,{title:"Type",children:Z_.map(p=>u.jsx(qf,{label:p,checked:i.includes(p),onChange:()=>h("type",p)},p))}),u.jsx(So,{title:"Tier",children:ew.map(p=>u.jsx(qf,{label:p,checked:l.includes(p),onChange:()=>h("tier",p)},p))}),u.jsx(So,{title:"Project",children:u.jsx("input",{type:"text",placeholder:"project value",className:oe.filterInput,value:r,onChange:p=>t(m=>(p.target.value?m.set("project",p.target.value):m.delete("project"),m))})})]}),u.jsx("section",{className:oe.list,children:s.isLoading?u.jsxs("div",{className:oe.empty,children:[u.jsx("span",{className:"spinner"})," Loading…"]}):s.error?u.jsxs("div",{className:oe.error,children:["Failed to load: ",s.error.message]}):(((d=s.data)==null?void 0:d.memories.length)??0)===0?u.jsx("div",{className:oe.empty,children:"No memorias match these filters."}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:oe.listHeader,children:u.jsxs("span",{children:[s.data.total.toLocaleString()," total"]})}),s.data.memories.map(p=>u.jsx(P_,{memory:p,selected:p.id===n,onClick:()=>t(m=>(m.set("selected",p.id),m))},p.id))]})}),u.jsx("aside",{className:oe.reading,children:a.isLoading?u.jsxs("div",{className:oe.empty,children:[u.jsx("span",{className:"spinner"})," Loading…"]}):a.data?u.jsx(nw,{memory:a.data,onForget:()=>{confirm(`Forget memory "${a.data.title}"?`)&&c.mutate(a.data.id)},onExpandGraph:()=>{window.location.href=`/ui/memories/${a.data.id}/graph`}}):u.jsx("div",{className:oe.empty,children:"Select a memory to read it."})})]})}function So({title:e,children:t}){return u.jsxs("div",{className:oe.filterGroup,children:[u.jsx("h3",{className:oe.filterGroupTitle,children:e}),u.jsx("div",{className:oe.filterGroupBody,children:t})]})}function qf({label:e,checked:t,onChange:n}){return u.jsxs("label",{className:oe.filterCheckbox,children:[u.jsx("input",{type:"checkbox",checked:t,onChange:n}),u.jsx("span",{children:e})]})}function nw({memory:e,onForget:t,onExpandGraph:n}){return u.jsxs("article",{className:oe.readingArticle,children:[u.jsxs("header",{className:oe.readingHeader,children:[u.jsxs("div",{className:oe.readingBadges,children:[u.jsx(Ua,{type:e.type}),u.jsx($a,{tier:e.tier})]}),u.jsx("h1",{className:oe.readingTitle,children:e.title}),u.jsx(Qc,{scopes:e.scopes})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:"Summary"}),u.jsx("p",{children:e.summary})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:"Content"}),u.jsx("pre",{className:oe.readingContent,children:e.content})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:"Properties"}),u.jsxs("dl",{className:oe.readingDl,children:[u.jsx("dt",{children:"Strength"}),u.jsx("dd",{children:u.jsx(Bc,{value:e.strength})}),u.jsx("dt",{children:"importance"}),u.jsx("dd",{children:e.importance}),u.jsx("dt",{children:"confidence"}),u.jsx("dd",{children:e.confidence.toFixed(2)}),u.jsx("dt",{children:"Access count"}),u.jsx("dd",{children:e.accessCount}),u.jsx("dt",{children:"Source"}),u.jsxs("dd",{children:[e.source,e.sourceClient?` · ${e.sourceClient}`:""]}),u.jsx("dt",{children:"Created"}),u.jsx("dd",{children:tn(e.createdAt)}),e.lastAccessedAt&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"Last accessed"}),u.jsx("dd",{children:tn(e.lastAccessedAt)})]})]})]}),u.jsxs("footer",{className:oe.readingActions,children:[u.jsx("button",{onClick:n,className:oe.btnSecondary,children:"Expand graph"}),u.jsx("button",{onClick:t,className:oe.btnDanger,children:"Forget"})]})]})}const rw="_page_1wqmc_1",iw="_loading_1wqmc_9",lw="_error_1wqmc_10",sw="_empty_1wqmc_11",aw="_header_1wqmc_21",ow="_badges_1wqmc_29",uw="_title_1wqmc_34",cw="_section_1wqmc_39",dw="_sectionTitle_1wqmc_45",fw="_content_1wqmc_54",hw="_dl_1wqmc_64",pw="_tabs_1wqmc_85",mw="_tab_1wqmc_85",vw="_tabActive_1wqmc_104",yw="_edgeList_1wqmc_109",gw="_edgeItem_1wqmc_118",xw="_edgeDirection_1wqmc_130",_w="_edgeTarget_1wqmc_136",ww="_edgeType_1wqmc_142",Sw="_edgeStrength_1wqmc_147",Ew="_edgeReason_1wqmc_153",jw="_logTable_1wqmc_158",Cw="_mono_1wqmc_178",ee={page:rw,loading:iw,error:lw,empty:sw,header:aw,badges:ow,title:uw,section:cw,sectionTitle:dw,content:fw,dl:hw,tabs:pw,tab:mw,tabActive:vw,edgeList:yw,edgeItem:gw,edgeDirection:xw,edgeTarget:_w,edgeType:ww,edgeStrength:Sw,edgeReason:Ew,logTable:jw,mono:Cw};function kw(){var a,o,c,h;const{id:e}=Wm(),t=en({queryKey:["memory",e],queryFn:()=>it.get(`/memories/${e}`),enabled:!!e}),n=en({queryKey:["memory-graph",e],queryFn:()=>it.get(`/memories/${e}/graph?depth=1&direction=both`)}),r=en({queryKey:["memory-access-logs",e],queryFn:()=>it.get(`/memories/${e}/access-logs`)}),[i,l]=C.useState("graph");if(t.isLoading)return u.jsxs("div",{className:ee.loading,children:[u.jsx("span",{className:"spinner"})," Loading…"]});if(t.error)return u.jsx("div",{className:ee.error,children:"Not found"});if(!t.data)return null;const s=t.data;return u.jsxs("article",{className:ee.page,children:[u.jsxs("header",{className:ee.header,children:[u.jsxs("div",{className:ee.badges,children:[u.jsx(Ua,{type:s.type}),u.jsx($a,{tier:s.tier})]}),u.jsx("h1",{className:ee.title,children:s.title}),u.jsx(Qc,{scopes:s.scopes})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:"Summary"}),u.jsx("p",{children:s.summary})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:"Content"}),u.jsx("pre",{className:ee.content,children:s.content})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:"Properties"}),u.jsxs("dl",{className:ee.dl,children:[u.jsx("dt",{children:"Strength"}),u.jsx("dd",{children:u.jsx(Bc,{value:s.strength})}),u.jsx("dt",{children:"importance"}),u.jsx("dd",{children:s.importance}),u.jsx("dt",{children:"confidence"}),u.jsx("dd",{children:s.confidence.toFixed(2)}),u.jsx("dt",{children:"Access count"}),u.jsx("dd",{children:s.accessCount}),u.jsx("dt",{children:"Source"}),u.jsx("dd",{children:s.source}),u.jsx("dt",{children:"Created"}),u.jsx("dd",{children:tn(s.createdAt)}),s.lastAccessedAt&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"Last accessed"}),u.jsx("dd",{children:tn(s.lastAccessedAt)})]})]})]}),u.jsxs("section",{className:ee.section,children:[u.jsxs("div",{className:ee.tabs,children:[u.jsxs("button",{className:i==="graph"?`${ee.tab} ${ee.tabActive}`:ee.tab,onClick:()=>l("graph"),children:["Graph (",((a=n.data)==null?void 0:a.nodes.length)??0,")"]}),u.jsxs("button",{className:i==="access"?`${ee.tab} ${ee.tabActive}`:ee.tab,onClick:()=>l("access"),children:["Access logs (",((o=r.data)==null?void 0:o.logs.length)??0,")"]})]}),i==="graph"?u.jsx("div",{className:ee.graphPanel,children:(((c=n.data)==null?void 0:c.edges.length)??0)===0?u.jsx("p",{className:ee.empty,children:"No connected edges."}):u.jsx("ul",{className:ee.edgeList,children:n.data.edges.map(d=>u.jsxs("li",{className:ee.edgeItem,children:[u.jsx("span",{className:ee.edgeDirection,children:d.fromMemoryId===s.id?"→":"←"}),u.jsx("a",{href:`/ui/memories/${d.fromMemoryId===s.id?d.toMemoryId:d.fromMemoryId}`,className:ee.edgeTarget,children:d.fromMemoryId===s.id?d.toMemoryId.slice(0,8):d.fromMemoryId.slice(0,8)}),u.jsx("span",{className:ee.edgeType,children:d.type}),u.jsxs("span",{className:ee.edgeStrength,children:["strength ",d.strength.toFixed(2)]}),u.jsx("span",{className:ee.edgeReason,children:d.reason})]},d.id))})}):u.jsx("div",{className:ee.logsPanel,children:(((h=r.data)==null?void 0:h.logs.length)??0)===0?u.jsx("p",{className:ee.empty,children:"No access recorded yet."}):u.jsxs("table",{className:ee.logTable,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"When"}),u.jsx("th",{children:"Source"}),u.jsx("th",{children:"Used in context"}),u.jsx("th",{children:"Query"})]})}),u.jsx("tbody",{children:r.data.logs.map(d=>u.jsxs("tr",{children:[u.jsx("td",{children:tn(d.accessedAt)}),u.jsx("td",{children:d.source}),u.jsx("td",{children:d.usedInContext?"✓":"—"}),u.jsx("td",{className:ee.mono,children:d.query??"—"})]},d.id))})]})})]})]})}const Nw="_page_1x3bx_1",Pw="_controls_1x3bx_9",Rw="_controlsTitle_1x3bx_16",Tw="_field_1x3bx_25",Lw="_controlVal_1x3bx_50",Mw="_edgeTypeList_1x3bx_57",Dw="_edgeType_1x3bx_57",Ow="_canvas_1x3bx_81",Fw="_loading_1x3bx_88",Iw="_error_1x3bx_89",zw="_empty_1x3bx_90",Aw="_graphWrap_1x3bx_101",Uw="_node_1x3bx_108",$w="_nodeCenter_1x3bx_119",bw="_nodeBadges_1x3bx_126",Bw="_nodeTitle_1x3bx_134",Qw="_edges_1x3bx_143",Vw="_edge_1x3bx_57",Le={page:Nw,controls:Pw,controlsTitle:Rw,field:Tw,controlVal:Lw,edgeTypeList:Mw,edgeType:Dw,canvas:Ow,loading:Fw,error:Iw,empty:zw,graphWrap:Aw,node:Uw,nodeCenter:$w,nodeBadges:bw,nodeTitle:Bw,edges:Qw,edge:Vw},Gf=["causes","enables","contradicts","supersedes","references","related_to","before","after","duplicates","refines"],Yf={causes:"var(--edge-causes)",enables:"var(--edge-enables)",contradicts:"var(--edge-contradicts)",supersedes:"var(--edge-supersedes)",references:"var(--edge-references)",related_to:"var(--edge-related_to)",before:"var(--edge-before)",after:"var(--edge-after)",duplicates:"var(--edge-duplicates)",refines:"var(--edge-refines)"};function Hw(){const{id:e}=Wm(),[t,n]=C.useState(1),[r,i]=C.useState("both"),[l,s]=C.useState(new Set(Gf)),a=en({queryKey:["memory-graph",e,t,r],queryFn:()=>{const c=Array.from(l).join(",");return it.get(`/memories/${e}/graph?depth=${t}&direction=${r}&edgeTypes=${c}`)}}),o=c=>{s(h=>{const d=new Set(h);return d.has(c)?d.delete(c):d.add(c),d})};return u.jsxs("div",{className:Le.page,children:[u.jsxs("aside",{className:Le.controls,children:[u.jsx("h2",{className:Le.controlsTitle,children:"Filters"}),u.jsxs("label",{className:Le.field,children:[u.jsx("span",{children:"Depth"}),u.jsx("input",{type:"range",min:1,max:3,value:t,onChange:c=>n(Number(c.target.value))}),u.jsx("span",{className:Le.controlVal,children:t})]}),u.jsxs("label",{className:Le.field,children:[u.jsx("span",{children:"Direction"}),u.jsxs("select",{value:r,onChange:c=>i(c.target.value),children:[u.jsx("option",{value:"both",children:"both"}),u.jsx("option",{value:"out",children:"outgoing"}),u.jsx("option",{value:"in",children:"incoming"})]})]}),u.jsxs("div",{className:Le.field,children:[u.jsx("span",{children:"Edge types"}),u.jsx("div",{className:Le.edgeTypeList,children:Gf.map(c=>u.jsxs("label",{className:Le.edgeType,children:[u.jsx("input",{type:"checkbox",checked:l.has(c),onChange:()=>o(c)}),u.jsx("span",{style:{borderColor:Yf[c]},children:c})]},c))})]})]}),u.jsx("main",{className:Le.canvas,children:a.isLoading?u.jsxs("div",{className:Le.loading,children:[u.jsx("span",{className:"spinner"})," Loading graph…"]}):a.error?u.jsxs("div",{className:Le.error,children:["Failed: ",a.error.message]}):!a.data||a.data.nodes.length===0?u.jsx("div",{className:Le.empty,children:"No graph for this memory."}):u.jsxs("div",{className:Le.graphWrap,children:[a.data.nodes.map((c,h)=>{const d=h/Math.max(1,a.data.nodes.length)*2*Math.PI,p=180,m=50+Math.cos(d)*p,E=50+Math.sin(d)*p,_=c.id===e;return u.jsxs("div",{className:_?`${Le.node} ${Le.nodeCenter}`:Le.node,style:{left:`${m}%`,top:`${E}%`},children:[u.jsxs("div",{className:Le.nodeBadges,children:[u.jsx(Ua,{type:c.type}),u.jsx($a,{tier:c.tier})]}),u.jsx("div",{className:Le.nodeTitle,children:c.title})]},c.id)}),a.data.edges.map(c=>{const h=a.data.nodes.findIndex(y=>y.id===c.fromMemoryId),d=a.data.nodes.findIndex(y=>y.id===c.toMemoryId);if(h<0||d<0)return null;const p=h/a.data.nodes.length*2*Math.PI,m=d/a.data.nodes.length*2*Math.PI,E=180,_=50+Math.cos(p)*E,P=50+Math.sin(p)*E,v=50+Math.cos(m)*E,f=50+Math.sin(m)*E;return u.jsx("svg",{className:Le.edges,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:u.jsx("line",{x1:_,y1:P,x2:v,y2:f,style:{stroke:Yf[c.type]},className:Le.edge})},c.id)})]})})]})}const Ww="_page_11aai_1",Kw="_header_11aai_6",qw="_title_11aai_10",Gw="_subtitle_11aai_15",Yw="_split_11aai_20",Xw="_form_11aai_26",Jw="_formTitle_11aai_36",Zw="_field_11aai_45",eS="_submit_11aai_76",tS="_error_11aai_91",nS="_viewer_11aai_99",rS="_empty_11aai_109",iS="_viewerMeta_11aai_115",lS="_metaRow_11aai_123",sS="_metaKey_11aai_131",aS="_metaVal_11aai_139",oS="_metaValMono_11aai_143",uS="_viewerSubTitle_11aai_148",cS="_xml_11aai_157",we={page:Ww,header:Kw,title:qw,subtitle:Gw,split:Yw,form:Xw,formTitle:Jw,field:Zw,submit:eS,error:tS,viewer:nS,empty:rS,viewerMeta:iS,metaRow:lS,metaKey:sS,metaVal:aS,metaValMono:oS,viewerSubTitle:uS,xml:cS},dS=["session_start","prompt_delta","file_pack","failure_delta"];function fS(){const[e,t]=C.useState("prompt_delta"),[n,r]=C.useState("demo-session"),[i,l]=C.useState("SQLite design"),[s,a]=C.useState(""),[o,c]=C.useState(null),[h,d]=C.useState(null),[p,m]=C.useState(!1),E=async _=>{_.preventDefault(),m(!0),d(null);try{const P={sessionId:n,phase:e,query:i};s.trim()&&(P.files=s.split(",").map(f=>f.trim()).filter(Boolean));const v=await it.post("/inject",P);c(v)}catch(P){d(P instanceof Jm?`${P.status}: ${JSON.stringify(P.body)}`:P.message)}finally{m(!1)}};return u.jsxs("div",{className:we.page,children:[u.jsxs("header",{className:we.header,children:[u.jsx("h1",{className:we.title,children:"Injection"}),u.jsx("p",{className:we.subtitle,children:"Audit what the agent would see"})]}),u.jsxs("div",{className:we.split,children:[u.jsxs("form",{className:we.form,onSubmit:E,children:[u.jsx("h2",{className:we.formTitle,children:"Request a preview"}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:"Phase"}),u.jsx("select",{value:e,onChange:_=>t(_.target.value),children:dS.map(_=>u.jsx("option",{value:_,children:_},_))})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:"Session ID"}),u.jsx("input",{type:"text",value:n,onChange:_=>r(_.target.value)})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:"Query"}),u.jsx("textarea",{value:i,onChange:_=>l(_.target.value),rows:3})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:"Files (comma-separated, optional)"}),u.jsx("input",{type:"text",value:s,onChange:_=>a(_.target.value)})]}),u.jsx("button",{type:"submit",disabled:p,className:we.submit,children:p?"Computing…":"Preview injection bundle"}),h&&u.jsx("div",{className:we.error,children:h})]}),u.jsx("section",{className:we.viewer,children:o?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:we.viewerMeta,children:[u.jsx(rl,{k:"Bundle ID",v:o.bundleId}),u.jsx(rl,{k:"Phase",v:o.phase}),u.jsx(rl,{k:"Content hash",v:o.contentHash,mono:!0}),u.jsx(rl,{k:"Memories",v:o.memoryIds.length.toString()}),u.jsx(rl,{k:"Estimated tokens",v:o.estimatedTokens.toString()})]}),u.jsx("h3",{className:we.viewerSubTitle,children:"Context XML"}),u.jsx("pre",{className:we.xml,children:o.contextXml})]}):u.jsx("div",{className:we.empty,children:"Submit the form to preview an injection bundle."})})]})]})}function rl({k:e,v:t,mono:n=!1}){return u.jsxs("div",{className:we.metaRow,children:[u.jsx("span",{className:we.metaKey,children:e}),u.jsx("span",{className:n?`${we.metaVal} ${we.metaValMono}`:we.metaVal,children:t})]})}const hS="_page_vld73_1",pS="_header_vld73_6",mS="_title_vld73_14",vS="_subtitle_vld73_19",yS="_actions_vld73_24",gS="_dryRun_vld73_30",xS="_runButton_vld73_38",_S="_loading_vld73_53",wS="_empty_vld73_54",SS="_error_vld73_55",ES="_list_vld73_69",jS="_run_vld73_38",CS="_runHeader_vld73_85",kS="_runNumber_vld73_102",NS="_runTime_vld73_108",PS="_dryRunBadge_vld73_114",RS="_runSummary_vld73_124",TS="_runChevron_vld73_132",LS="_diff_vld73_137",MS="_diffMeta_vld73_143",DS="_diffEmpty_vld73_153",OS="_diffList_vld73_158",FS="_diffOp_vld73_178",IS="_diffMsg_vld73_183",zS="_diffPromoted_vld73_187",AS="_diffEvicted_vld73_190",US="_diffMerged_vld73_193",le={page:hS,header:pS,title:mS,subtitle:vS,actions:yS,dryRun:gS,runButton:xS,loading:_S,empty:wS,error:SS,list:ES,run:jS,runHeader:CS,runNumber:kS,runTime:NS,dryRunBadge:PS,runSummary:RS,runChevron:TS,diff:LS,diffMeta:MS,diffEmpty:DS,diffList:OS,diffOp:FS,diffMsg:IS,diffPromoted:zS,diffEvicted:AS,diffMerged:US};function $S(){const e=Yl(),{data:t,isLoading:n,error:r}=en({queryKey:["consolidation-runs"],queryFn:()=>it.get("/consolidate/runs?limit=20")}),i=pa({mutationFn:c=>it.post("/consolidate",{dryRun:c}),onSuccess:()=>e.invalidateQueries({queryKey:["consolidation-runs"]})}),[l,s]=C.useState(null),[a,o]=C.useState(!1);return u.jsxs("div",{className:le.page,children:[u.jsxs("header",{className:le.header,children:[u.jsxs("div",{children:[u.jsx("h1",{className:le.title,children:"Sleep"}),u.jsx("p",{className:le.subtitle,children:"Consolidation history — promotion, eviction, merging"})]}),u.jsxs("div",{className:le.actions,children:[u.jsxs("label",{className:le.dryRun,children:[u.jsx("input",{type:"checkbox",checked:a,onChange:c=>o(c.target.checked)}),u.jsx("span",{children:"Dry run"})]}),u.jsx("button",{className:le.runButton,disabled:i.isPending,onClick:()=>i.mutate(a),children:i.isPending?"Running…":"Run now"})]})]}),i.error&&u.jsxs("div",{className:le.error,children:["Run failed: ",i.error.message]}),n?u.jsxs("div",{className:le.loading,children:[u.jsx("span",{className:"spinner"})," Loading runs…"]}):r?u.jsxs("div",{className:le.error,children:["Failed to load: ",r.message]}):((t==null?void 0:t.runs.length)??0)===0?u.jsx("div",{className:le.empty,children:'No sleep cycles yet. Click "Run now" to start one.'}):u.jsx("ul",{className:le.list,children:t.runs.map((c,h)=>u.jsx(bS,{run:c,cycleNumber:t.runs.length-h,expanded:l===c.id,onToggle:()=>s(l===c.id?null:c.id)},c.id))})]})}function bS({run:e,cycleNumber:t,expanded:n,onToggle:r}){return u.jsxs("li",{className:le.run,children:[u.jsxs("button",{className:le.runHeader,onClick:r,children:[u.jsxs("span",{className:le.runNumber,children:["Sleep Cycle #",t]}),u.jsx("span",{className:le.runTime,children:bc(e.startedAt)}),e.dryRun&&u.jsx("span",{className:le.dryRunBadge,children:"dry-run"}),u.jsx("span",{className:le.runSummary,children:e.summary}),u.jsx("span",{className:le.runChevron,children:n?"▾":"▸"})]}),n&&u.jsx(BS,{run:e})]})}function BS({run:e}){return u.jsxs("div",{className:le.diff,children:[u.jsxs("div",{className:le.diffMeta,children:[u.jsxs("span",{children:["Started: ",tn(e.startedAt)]}),u.jsxs("span",{children:["Ended: ",tn(e.endedAt)]}),u.jsxs("span",{children:["Edges created: ",e.edgesCreated]}),u.jsxs("span",{children:["Contradictions: ",e.contradictionFound]})]}),e.promoted.length===0&&e.evicted.length===0&&e.merged.length===0?u.jsx("p",{className:le.diffEmpty,children:"No changes in this cycle."}):u.jsxs("ul",{className:le.diffList,children:[e.promoted.map(t=>u.jsxs("li",{className:le.diffPromoted,children:[u.jsx("span",{className:le.diffOp,children:"+"}),u.jsxs("span",{className:le.diffMsg,children:["promoted ",t.slice(0,8)," (short → medium)"]})]},`p${t}`)),e.evicted.map(t=>u.jsxs("li",{className:le.diffEvicted,children:[u.jsx("span",{className:le.diffOp,children:"−"}),u.jsxs("span",{className:le.diffMsg,children:["evicted ",t.slice(0,8)," (strength < 0.1, age > 7d)"]})]},`e${t}`)),e.merged.map((t,n)=>{var r,i;return u.jsxs("li",{className:le.diffMerged,children:[u.jsx("span",{className:le.diffOp,children:"~"}),u.jsxs("span",{className:le.diffMsg,children:["merged ",(r=t[0])==null?void 0:r.slice(0,8)," + ",(i=t[1])==null?void 0:i.slice(0,8)]})]},`m${n}`)})]})]})}const QS="_page_pmtma_1",VS="_header_pmtma_6",HS="_title_pmtma_10",WS="_subtitle_pmtma_15",KS="_section_pmtma_20",qS="_sectionHeader_pmtma_28",GS="_sectionTitle_pmtma_35",YS="_loading_pmtma_45",XS="_empty_pmtma_46",JS="_error_pmtma_47",ZS="_dl_pmtma_55",eE="_dlRow_pmtma_62",tE="_dlKey_pmtma_73",nE="_dlVal_pmtma_81",rE="_dlMono_pmtma_83",iE="_btnPrimary_pmtma_85",lE="_btnSecondary_pmtma_86",sE="_btnDanger_pmtma_87",aE="_table_pmtma_122",oE="_dialogBackdrop_pmtma_144",uE="_dialog_pmtma_144",cE="_dialogTitle_pmtma_164",dE="_warning_pmtma_169",fE="_field_pmtma_178",hE="_dialogActions_pmtma_208",Z={page:QS,header:VS,title:HS,subtitle:WS,section:KS,sectionHeader:qS,sectionTitle:GS,loading:YS,empty:XS,error:JS,dl:ZS,dlRow:eE,dlKey:tE,dlVal:nE,dlMono:rE,btnPrimary:iE,btnSecondary:lE,btnDanger:sE,table:aE,dialogBackdrop:oE,dialog:uE,dialogTitle:cE,warning:dE,field:fE,dialogActions:hE};function pE(){var p;const e=en({queryKey:["settings"],queryFn:()=>it.get("/settings")}),t=en({queryKey:["devices"],queryFn:()=>it.get("/devices")}),n=Yl(),r=pa({mutationFn:m=>it.post("/devices",m),onSuccess:()=>n.invalidateQueries({queryKey:["devices"]})}),i=pa({mutationFn:m=>it.delete(`/devices/${m}`),onSuccess:()=>n.invalidateQueries({queryKey:["devices"]})}),[l,s]=C.useState(!1),[a,o]=C.useState(""),[c,h]=C.useState("opencode"),d=m=>{m.preventDefault(),a.trim()&&r.mutate({name:a.trim(),type:c})};return u.jsxs("div",{className:Z.page,children:[u.jsxs("header",{className:Z.header,children:[u.jsx("h1",{className:Z.title,children:"Settings"}),u.jsx("p",{className:Z.subtitle,children:"Server configuration and registered devices"})]}),u.jsxs("section",{className:Z.section,children:[u.jsx("h2",{className:Z.sectionTitle,children:"Server"}),e.isLoading?u.jsxs("div",{className:Z.loading,children:[u.jsx("span",{className:"spinner"})," Loading…"]}):e.error?u.jsxs("div",{className:Z.error,children:["Failed to load: ",e.error.message]}):e.data?u.jsxs("dl",{className:Z.dl,children:[u.jsx(pr,{k:"Host",v:e.data.server.host}),u.jsx(pr,{k:"Port",v:e.data.server.port.toString()}),u.jsx(pr,{k:"DB path",v:e.data.storage.path,mono:!0}),u.jsx(pr,{k:"Embedding provider",v:`${e.data.embedding.provider} (${e.data.embedding.model}, ${e.data.embedding.dimensions}d)`}),u.jsx(pr,{k:"LLM provider",v:`${e.data.llm.provider} (${e.data.llm.model})`}),u.jsx(pr,{k:"Consolidation",v:e.data.consolidation.enabled?`every ${e.data.consolidation.intervalHours}h`:"disabled"}),u.jsx(pr,{k:"Auth required",v:e.data.auth.requireAuth?"yes":"no (dev mode)"})]}):null]}),u.jsxs("section",{className:Z.section,children:[u.jsxs("div",{className:Z.sectionHeader,children:[u.jsx("h2",{className:Z.sectionTitle,children:"Devices"}),u.jsx("button",{className:Z.btnPrimary,onClick:()=>s(!0),children:"+ Register device"})]}),t.isLoading?u.jsxs("div",{className:Z.loading,children:[u.jsx("span",{className:"spinner"})," Loading…"]}):(((p=t.data)==null?void 0:p.devices.length)??0)===0?u.jsx("div",{className:Z.empty,children:"No devices registered yet."}):u.jsxs("table",{className:Z.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Name"}),u.jsx("th",{children:"Type"}),u.jsx("th",{children:"Registered"}),u.jsx("th",{children:"Last seen"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:t.data.devices.map(m=>u.jsxs("tr",{children:[u.jsx("td",{children:m.name}),u.jsx("td",{children:m.type}),u.jsx("td",{children:tn(m.registeredAt)}),u.jsx("td",{children:tn(m.lastSeenAt)}),u.jsx("td",{children:u.jsx("button",{className:Z.btnDanger,onClick:()=>{confirm(`Revoke device "${m.name}"?`)&&i.mutate(m.id)},children:"Revoke"})})]},m.id))})]})]}),l&&u.jsx("div",{className:Z.dialogBackdrop,onClick:()=>s(!1),children:u.jsx("div",{className:Z.dialog,onClick:m=>m.stopPropagation(),children:r.data?u.jsxs("div",{children:[u.jsx("h3",{className:Z.dialogTitle,children:"Device created"}),u.jsx("p",{className:Z.warning,children:r.data.notice}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:"API key (copy now — won't be shown again)"}),u.jsx("input",{value:r.data.apiKey,readOnly:!0,onClick:m=>m.target.select()})]}),u.jsxs("div",{className:Z.dialogActions,children:[u.jsx("button",{type:"button",onClick:()=>{var m;return(m=navigator.clipboard)==null?void 0:m.writeText(r.data.apiKey)},className:Z.btnSecondary,children:"Copy"}),u.jsx("button",{type:"button",onClick:()=>{s(!1),o(""),r.reset()},className:Z.btnPrimary,children:"Done"})]})]}):u.jsxs("form",{onSubmit:d,children:[u.jsx("h3",{className:Z.dialogTitle,children:"Register a new device"}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:"Name"}),u.jsx("input",{value:a,onChange:m=>o(m.target.value),placeholder:"laptop-1",required:!0})]}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:"Type"}),u.jsxs("select",{value:c,onChange:m=>h(m.target.value),children:[u.jsx("option",{value:"opencode",children:"opencode"}),u.jsx("option",{value:"cursor",children:"cursor"}),u.jsx("option",{value:"claude_code",children:"claude_code"}),u.jsx("option",{value:"rest",children:"rest"})]})]}),u.jsxs("div",{className:Z.dialogActions,children:[u.jsx("button",{type:"button",onClick:()=>s(!1),className:Z.btnSecondary,children:"Cancel"}),u.jsx("button",{type:"submit",className:Z.btnPrimary,disabled:r.isPending,children:r.isPending?"Creating…":"Create"})]})]})})})]})}function pr({k:e,v:t,mono:n=!1}){return u.jsxs("div",{className:Z.dlRow,children:[u.jsx("span",{className:Z.dlKey,children:e}),u.jsx("span",{className:n?`${Z.dlVal} ${Z.dlMono}`:Z.dlVal,children:t})]})}function mE(){return u.jsxs("div",{style:{padding:"48px",textAlign:"center",color:"var(--text-muted)"},children:[u.jsx("h1",{children:"404"}),u.jsx("p",{children:"That page doesn't exist."}),u.jsx("a",{href:"/ui/",children:"Back to Atlas"})]})}const vE=nx([{path:"/",element:u.jsx(zx,{}),children:[{index:!0,element:u.jsx(W1,{to:"/atlas",replace:!0})},{path:"atlas",element:u.jsx(d_,{})},{path:"memories",element:u.jsx(tw,{})},{path:"memories/:id",element:u.jsx(kw,{})},{path:"memories/:id/graph",element:u.jsx(Hw,{})},{path:"injection",element:u.jsx(fS,{})},{path:"sleep",element:u.jsx($S,{})},{path:"settings",element:u.jsx(pE,{})},{path:"*",element:u.jsx(mE,{})}]}],{basename:"/ui"}),yE=new x0({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),tv=document.getElementById("root");if(!tv)throw new Error("Root element #root not found");Sm(tv).render(u.jsx(C.StrictMode,{children:u.jsx(_0,{client:yE,children:u.jsx(cx,{router:vE})})}));