@tokenbuddy/tokenbuddy 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli.d.ts +52 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +212 -9
- package/dist/src/cli.js.map +1 -1
- package/dist/src/daemon.d.ts +8 -0
- package/dist/src/daemon.d.ts.map +1 -1
- package/dist/src/daemon.js +335 -21
- package/dist/src/daemon.js.map +1 -1
- package/dist/src/init-setup.d.ts +25 -0
- package/dist/src/init-setup.d.ts.map +1 -0
- package/dist/src/init-setup.js +125 -0
- package/dist/src/init-setup.js.map +1 -0
- package/package.json +3 -3
- package/src/cli.ts +265 -11
- package/src/daemon.ts +385 -20
- package/src/init-setup.ts +165 -0
- package/static/ui/assets/index-BILQcD8g.js +226 -0
- package/static/ui/assets/index-BILQcD8g.js.map +1 -0
- package/static/ui/assets/index-C5KsebCA.css +1 -0
- package/static/ui/index.html +2 -2
- package/static/ui/manifest.webmanifest +1 -1
- package/static/ui/sw.js +1 -1
- package/tests/control-plane-ui-endpoints.test.ts +193 -1
- package/tests/tokenbuddy.test.ts +218 -2
- package/static/ui/assets/index-UMiTTeo8.css +0 -1
- package/static/ui/assets/index-YHs-Ca0f.js +0 -206
- package/static/ui/assets/index-YHs-Ca0f.js.map +0 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
var zb=Object.defineProperty;var Wp=n=>{throw TypeError(n)};var Ab=(n,i,s)=>i in n?zb(n,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[i]=s;var ed=(n,i,s)=>Ab(n,typeof i!="symbol"?i+"":i,s),td=(n,i,s)=>i.has(n)||Wp("Cannot "+s);var N=(n,i,s)=>(td(n,i,"read from private field"),s?s.call(n):i.get(n)),ce=(n,i,s)=>i.has(n)?Wp("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,s),ee=(n,i,s,u)=>(td(n,i,"write to private field"),u?u.call(n,s):i.set(n,s),s),ye=(n,i,s)=>(td(n,i,"access private method"),s);var vo=(n,i,s,u)=>({set _(d){ee(n,i,d,s)},get _(){return N(n,i,u)}});(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(d){if(d.ep)return;d.ep=!0;const h=s(d);fetch(d.href,h)}})();var ad={exports:{}},Cr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Pp;function Rb(){if(Pp)return Cr;Pp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(u,d,h){var m=null;if(h!==void 0&&(m=""+h),d.key!==void 0&&(m=""+d.key),"key"in d){h={};for(var x in d)x!=="key"&&(h[x]=d[x])}else h=d;return d=h.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:h}}return Cr.Fragment=i,Cr.jsx=s,Cr.jsxs=s,Cr}var Ip;function _b(){return Ip||(Ip=1,ad.exports=Rb()),ad.exports}var o=_b(),ld={exports:{}},pe={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ev;function Ob(){if(ev)return pe;ev=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function T(w){return w===null||typeof w!="object"?null:(w=E&&w[E]||w["@@iterator"],typeof w=="function"?w:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,L={};function k(w,_,Z){this.props=w,this.context=_,this.refs=L,this.updater=Z||z}k.prototype.isReactComponent={},k.prototype.setState=function(w,_){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,_,"setState")},k.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function K(){}K.prototype=k.prototype;function Q(w,_,Z){this.props=w,this.context=_,this.refs=L,this.updater=Z||z}var X=Q.prototype=new K;X.constructor=Q,O(X,k.prototype),X.isPureReactComponent=!0;var F=Array.isArray;function te(){}var V={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function I(w,_,Z){var P=Z.ref;return{$$typeof:n,type:w,key:_,ref:P!==void 0?P:null,props:Z}}function oe(w,_){return I(w.type,_,w.props)}function W(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function fe(w){var _={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(Z){return _[Z]})}var he=/\/+/g;function be(w,_){return typeof w=="object"&&w!==null&&w.key!=null?fe(""+w.key):_.toString(36)}function ue(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(te,te):(w.status="pending",w.then(function(_){w.status==="pending"&&(w.status="fulfilled",w.value=_)},function(_){w.status==="pending"&&(w.status="rejected",w.reason=_)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function U(w,_,Z,P,G){var ae=typeof w;(ae==="undefined"||ae==="boolean")&&(w=null);var se=!1;if(w===null)se=!0;else switch(ae){case"bigint":case"string":case"number":se=!0;break;case"object":switch(w.$$typeof){case n:case i:se=!0;break;case g:return se=w._init,U(se(w._payload),_,Z,P,G)}}if(se)return G=G(w),se=P===""?"."+be(w,0):P,F(G)?(Z="",se!=null&&(Z=se.replace(he,"$&/")+"/"),U(G,_,Z,"",function(Ot){return Ot})):G!=null&&(W(G)&&(G=oe(G,Z+(G.key==null||w&&w.key===G.key?"":(""+G.key).replace(he,"$&/")+"/")+se)),_.push(G)),1;se=0;var Ee=P===""?".":P+":";if(F(w))for(var Ae=0;Ae<w.length;Ae++)P=w[Ae],ae=Ee+be(P,Ae),se+=U(P,_,Z,ae,G);else if(Ae=T(w),typeof Ae=="function")for(w=Ae.call(w),Ae=0;!(P=w.next()).done;)P=P.value,ae=Ee+be(P,Ae++),se+=U(P,_,Z,ae,G);else if(ae==="object"){if(typeof w.then=="function")return U(ue(w),_,Z,P,G);throw _=String(w),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return se}function $(w,_,Z){if(w==null)return w;var P=[],G=0;return U(w,P,"","",function(ae){return _.call(Z,ae,G++)}),P}function ie(w){if(w._status===-1){var _=w._result;_=_(),_.then(function(Z){(w._status===0||w._status===-1)&&(w._status=1,w._result=Z)},function(Z){(w._status===0||w._status===-1)&&(w._status=2,w._result=Z)}),w._status===-1&&(w._status=0,w._result=_)}if(w._status===1)return w._result.default;throw w._result}var ge=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},je={map:$,forEach:function(w,_,Z){$(w,function(){_.apply(this,arguments)},Z)},count:function(w){var _=0;return $(w,function(){_++}),_},toArray:function(w){return $(w,function(_){return _})||[]},only:function(w){if(!W(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return pe.Activity=b,pe.Children=je,pe.Component=k,pe.Fragment=s,pe.Profiler=d,pe.PureComponent=Q,pe.StrictMode=u,pe.Suspense=p,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,pe.__COMPILER_RUNTIME={__proto__:null,c:function(w){return V.H.useMemoCache(w)}},pe.cache=function(w){return function(){return w.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(w,_,Z){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var P=O({},w.props),G=w.key;if(_!=null)for(ae in _.key!==void 0&&(G=""+_.key),_)!J.call(_,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&_.ref===void 0||(P[ae]=_[ae]);var ae=arguments.length-2;if(ae===1)P.children=Z;else if(1<ae){for(var se=Array(ae),Ee=0;Ee<ae;Ee++)se[Ee]=arguments[Ee+2];P.children=se}return I(w.type,G,P)},pe.createContext=function(w){return w={$$typeof:m,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:h,_context:w},w},pe.createElement=function(w,_,Z){var P,G={},ae=null;if(_!=null)for(P in _.key!==void 0&&(ae=""+_.key),_)J.call(_,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(G[P]=_[P]);var se=arguments.length-2;if(se===1)G.children=Z;else if(1<se){for(var Ee=Array(se),Ae=0;Ae<se;Ae++)Ee[Ae]=arguments[Ae+2];G.children=Ee}if(w&&w.defaultProps)for(P in se=w.defaultProps,se)G[P]===void 0&&(G[P]=se[P]);return I(w,ae,G)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(w){return{$$typeof:x,render:w}},pe.isValidElement=W,pe.lazy=function(w){return{$$typeof:g,_payload:{_status:-1,_result:w},_init:ie}},pe.memo=function(w,_){return{$$typeof:v,type:w,compare:_===void 0?null:_}},pe.startTransition=function(w){var _=V.T,Z={};V.T=Z;try{var P=w(),G=V.S;G!==null&&G(Z,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(te,ge)}catch(ae){ge(ae)}finally{_!==null&&Z.types!==null&&(_.types=Z.types),V.T=_}},pe.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},pe.use=function(w){return V.H.use(w)},pe.useActionState=function(w,_,Z){return V.H.useActionState(w,_,Z)},pe.useCallback=function(w,_){return V.H.useCallback(w,_)},pe.useContext=function(w){return V.H.useContext(w)},pe.useDebugValue=function(){},pe.useDeferredValue=function(w,_){return V.H.useDeferredValue(w,_)},pe.useEffect=function(w,_){return V.H.useEffect(w,_)},pe.useEffectEvent=function(w){return V.H.useEffectEvent(w)},pe.useId=function(){return V.H.useId()},pe.useImperativeHandle=function(w,_,Z){return V.H.useImperativeHandle(w,_,Z)},pe.useInsertionEffect=function(w,_){return V.H.useInsertionEffect(w,_)},pe.useLayoutEffect=function(w,_){return V.H.useLayoutEffect(w,_)},pe.useMemo=function(w,_){return V.H.useMemo(w,_)},pe.useOptimistic=function(w,_){return V.H.useOptimistic(w,_)},pe.useReducer=function(w,_,Z){return V.H.useReducer(w,_,Z)},pe.useRef=function(w){return V.H.useRef(w)},pe.useState=function(w){return V.H.useState(w)},pe.useSyncExternalStore=function(w,_,Z){return V.H.useSyncExternalStore(w,_,Z)},pe.useTransition=function(){return V.H.useTransition()},pe.version="19.2.7",pe}var tv;function Yd(){return tv||(tv=1,ld.exports=Ob()),ld.exports}var j=Yd(),nd={exports:{}},Er={},id={exports:{}},rd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var av;function Db(){return av||(av=1,(function(n){function i(U,$){var ie=U.length;U.push($);e:for(;0<ie;){var ge=ie-1>>>1,je=U[ge];if(0<d(je,$))U[ge]=$,U[ie]=je,ie=ge;else break e}}function s(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var $=U[0],ie=U.pop();if(ie!==$){U[0]=ie;e:for(var ge=0,je=U.length,w=je>>>1;ge<w;){var _=2*(ge+1)-1,Z=U[_],P=_+1,G=U[P];if(0>d(Z,ie))P<je&&0>d(G,Z)?(U[ge]=G,U[P]=ie,ge=P):(U[ge]=Z,U[_]=ie,ge=_);else if(P<je&&0>d(G,ie))U[ge]=G,U[P]=ie,ge=P;else break e}}return $}function d(U,$){var ie=U.sortIndex-$.sortIndex;return ie!==0?ie:U.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var m=Date,x=m.now();n.unstable_now=function(){return m.now()-x}}var p=[],v=[],g=1,b=null,E=3,T=!1,z=!1,O=!1,L=!1,k=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function X(U){for(var $=s(v);$!==null;){if($.callback===null)u(v);else if($.startTime<=U)u(v),$.sortIndex=$.expirationTime,i(p,$);else break;$=s(v)}}function F(U){if(O=!1,X(U),!z)if(s(p)!==null)z=!0,te||(te=!0,fe());else{var $=s(v);$!==null&&ue(F,$.startTime-U)}}var te=!1,V=-1,J=5,I=-1;function oe(){return L?!0:!(n.unstable_now()-I<J)}function W(){if(L=!1,te){var U=n.unstable_now();I=U;var $=!0;try{e:{z=!1,O&&(O=!1,K(V),V=-1),T=!0;var ie=E;try{t:{for(X(U),b=s(p);b!==null&&!(b.expirationTime>U&&oe());){var ge=b.callback;if(typeof ge=="function"){b.callback=null,E=b.priorityLevel;var je=ge(b.expirationTime<=U);if(U=n.unstable_now(),typeof je=="function"){b.callback=je,X(U),$=!0;break t}b===s(p)&&u(p),X(U)}else u(p);b=s(p)}if(b!==null)$=!0;else{var w=s(v);w!==null&&ue(F,w.startTime-U),$=!1}}break e}finally{b=null,E=ie,T=!1}$=void 0}}finally{$?fe():te=!1}}}var fe;if(typeof Q=="function")fe=function(){Q(W)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,be=he.port2;he.port1.onmessage=W,fe=function(){be.postMessage(null)}}else fe=function(){k(W,0)};function ue(U,$){V=k(function(){U(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(U){switch(E){case 1:case 2:case 3:var $=3;break;default:$=E}var ie=E;E=$;try{return U()}finally{E=ie}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ie=E;E=U;try{return $()}finally{E=ie}},n.unstable_scheduleCallback=function(U,$,ie){var ge=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?ge+ie:ge):ie=ge,U){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ie+je,U={id:g++,callback:$,priorityLevel:U,startTime:ie,expirationTime:je,sortIndex:-1},ie>ge?(U.sortIndex=ie,i(v,U),s(p)===null&&U===s(v)&&(O?(K(V),V=-1):O=!0,ue(F,ie-ge))):(U.sortIndex=je,i(p,U),z||T||(z=!0,te||(te=!0,fe()))),U},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(U){var $=E;return function(){var ie=E;E=$;try{return U.apply(this,arguments)}finally{E=ie}}}})(rd)),rd}var lv;function kb(){return lv||(lv=1,id.exports=Db()),id.exports}var sd={exports:{}},vt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var nv;function Ub(){if(nv)return vt;nv=1;var n=Yd();function i(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)v+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(p,v,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:b==null?null:""+b,children:p,containerInfo:v,implementation:g}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(p,v){if(p==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,vt.createPortal=function(p,v){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(p,v,null,g)},vt.flushSync=function(p){var v=m.T,g=u.p;try{if(m.T=null,u.p=2,p)return p()}finally{m.T=v,u.p=g,u.d.f()}},vt.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,u.d.C(p,v))},vt.prefetchDNS=function(p){typeof p=="string"&&u.d.D(p)},vt.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var g=v.as,b=x(g,v.crossOrigin),E=typeof v.integrity=="string"?v.integrity:void 0,T=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;g==="style"?u.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:T}):g==="script"&&u.d.X(p,{crossOrigin:b,integrity:E,fetchPriority:T,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},vt.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var g=x(v.as,v.crossOrigin);u.d.M(p,{crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&u.d.M(p)},vt.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var g=v.as,b=x(g,v.crossOrigin);u.d.L(p,g,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},vt.preloadModule=function(p,v){if(typeof p=="string")if(v){var g=x(v.as,v.crossOrigin);u.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else u.d.m(p)},vt.requestFormReset=function(p){u.d.r(p)},vt.unstable_batchedUpdates=function(p,v){return p(v)},vt.useFormState=function(p,v,g){return m.H.useFormState(p,v,g)},vt.useFormStatus=function(){return m.H.useHostTransitionStatus()},vt.version="19.2.7",vt}var iv;function Bb(){if(iv)return sd.exports;iv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),sd.exports=Ub(),sd.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var rv;function Hb(){if(rv)return Er;rv=1;var n=kb(),i=Yd(),s=Bb();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(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 x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(u(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var c=r.alternate;if(c===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===a)return p(r),e;if(c===l)return p(r),t;c=c.sibling}throw Error(u(188))}if(a.return!==l.return)a=r,l=c;else{for(var f=!1,y=r.child;y;){if(y===a){f=!0,a=r,l=c;break}if(y===l){f=!0,l=r,a=c;break}y=y.sibling}if(!f){for(y=c.child;y;){if(y===a){f=!0,a=c,l=r;break}if(y===l){f=!0,l=c,a=r;break}y=y.sibling}if(!f)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function fe(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case k:return"Profiler";case L:return"StrictMode";case F:return"Suspense";case te:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case Q:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var ue=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ge=[],je=-1;function w(e){return{current:e}}function _(e){0>je||(e.current=ge[je],ge[je]=null,je--)}function Z(e,t){je++,ge[je]=e.current,e.current=t}var P=w(null),G=w(null),ae=w(null),se=w(null);function Ee(e,t){switch(Z(ae,t),Z(G,e),Z(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gp(t),e=jp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(P),Z(P,e)}function Ae(){_(P),_(G),_(ae)}function Ot(e){e.memoizedState!==null&&Z(se,e);var t=P.current,a=jp(t,e.type);t!==a&&(Z(G,e),Z(P,a))}function na(e){G.current===e&&(_(P),_(G)),se.current===e&&(_(se),Sr._currentValue=ie)}var Na,Se;function ct(e){if(Na===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Na=t&&t[1]||"",Se=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Na+e+Se}var bn=!1;function Wa(e,t){if(!e||bn)return"";bn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(B){var D=B}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(B){D=B}e.call(Y.prototype)}}else{try{throw Error()}catch(B){D=B}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(B){if(B&&D&&typeof B.stack=="string")return[B.stack,D.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),f=c[0],y=c[1];if(f&&y){var S=f.split(`
|
|
44
|
+
`),R=y.split(`
|
|
45
|
+
`);for(r=l=0;l<S.length&&!S[l].includes("DetermineComponentFrameRoot");)l++;for(;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;if(l===S.length||r===R.length)for(l=S.length-1,r=R.length-1;1<=l&&0<=r&&S[l]!==R[r];)r--;for(;1<=l&&0<=r;l--,r--)if(S[l]!==R[r]){if(l!==1||r!==1)do if(l--,r--,0>r||S[l]!==R[r]){var H=`
|
|
46
|
+
`+S[l].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=l&&0<=r);break}}}finally{bn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ct(a):""}function Qo(e,t){switch(e.tag){case 26:case 27:case 5:return ct(e.type);case 16:return ct("Lazy");case 13:return e.child!==t&&t!==null?ct("Suspense Fallback"):ct("Suspense");case 19:return ct("SuspenseList");case 0:case 15:return Wa(e.type,!1);case 11:return Wa(e.type.render,!1);case 1:return Wa(e.type,!0);case 31:return ct("Activity");default:return""}}function gn(e){try{var t="",a=null;do t+=Qo(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var fa=Object.prototype.hasOwnProperty,Ul=n.unstable_scheduleCallback,Pa=n.unstable_cancelCallback,$r=n.unstable_shouldYield,Jr=n.unstable_requestPaint,bt=n.unstable_now,qo=n.unstable_getCurrentPriorityLevel,Fr=n.unstable_ImmediatePriority,Wr=n.unstable_UserBlockingPriority,jn=n.unstable_NormalPriority,Yo=n.unstable_LowPriority,Pr=n.unstable_IdlePriority,Go=n.log,Ko=n.unstable_setDisableYieldValue,Bl=null,gt=null;function ma(e){if(typeof Go=="function"&&Ko(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Bl,e)}catch{}}var jt=Math.clz32?Math.clz32:ts,Ir=Math.log,es=Math.LN2;function ts(e){return e>>>=0,e===0?32:31-(Ir(e)/es|0)|0}var Hl=256,Ll=262144,Ql=4194304;function ha(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ql(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,c=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~c,l!==0?r=ha(l):(f&=y,f!==0?r=ha(f):a||(a=y&~e,a!==0&&(r=ha(a))))):(y=l&~c,y!==0?r=ha(y):f!==0?r=ha(f):a||(a=l&~e,a!==0&&(r=ha(a)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:r}function Ia(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function as(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Oi(){var e=Ql;return Ql<<=1,(Ql&62914560)===0&&(Ql=4194304),e}function Sn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ne(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,a,l,r,c){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(a=f&~a;0<a;){var H=31-jt(a),Y=1<<H;y[H]=0,S[H]=-1;var D=R[H];if(D!==null)for(R[H]=null,H=0;H<D.length;H++){var B=D[H];B!==null&&(B.lane&=-536870913)}a&=~Y}l!==0&&Dt(e,l,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function Dt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-jt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function el(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-jt(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function Di(e,t){var a=t&-t;return a=(a&42)!==0?1:Nn(a),(a&(e.suspendedLanes|t))!==0?0:a}function Nn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function wn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ki(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Kp(e.type))}function Ui(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var rt=Math.random().toString(36).slice(2),qe="__reactFiber$"+rt,Ie="__reactProps$"+rt,Mn="__reactContainer$"+rt,Xo="__reactEvents$"+rt,y0="__reactListeners$"+rt,b0="__reactHandles$"+rt,sf="__reactResources$"+rt,Bi="__reactMarker$"+rt;function Vo(e){delete e[qe],delete e[Ie],delete e[Xo],delete e[y0],delete e[b0]}function Cn(e){var t=e[qe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Mn]||a[qe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Tp(e);e!==null;){if(a=e[qe])return a;e=Tp(e)}return t}e=a,a=e.parentNode}return null}function En(e){if(e=e[qe]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Hi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Tn(e){var t=e[sf];return t||(t=e[sf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Bi]=!0}var of=new Set,uf={};function Yl(e,t){zn(e,t),zn(e+"Capture",t)}function zn(e,t){for(uf[e]=t,e=0;e<t.length;e++)of.add(t[e])}var g0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),cf={},df={};function j0(e){return fa.call(df,e)?!0:fa.call(cf,e)?!1:g0.test(e)?df[e]=!0:(cf[e]=!0,!1)}function ls(e,t,a){if(j0(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ns(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function wa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ff(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function S0(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(f){a=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zo(e){if(!e._valueTracker){var t=ff(e)?"checked":"value";e._valueTracker=S0(e,t,""+e[t])}}function mf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=ff(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function is(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var N0=/[\n"\\]/g;function Vt(e){return e.replace(N0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $o(e,t,a,l,r,c,f,y){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xt(t)):e.value!==""+Xt(t)&&(e.value=""+Xt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Jo(e,f,Xt(t)):a!=null?Jo(e,f,Xt(a)):l!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+Xt(y):e.removeAttribute("name")}function hf(e,t,a,l,r,c,f,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Zo(e);return}a=a!=null?""+Xt(a):"",t=t!=null?""+Xt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Zo(e)}function Jo(e,t,a){t==="number"&&is(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function An(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Xt(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function pf(e,t,a){if(t!=null&&(t=""+Xt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Xt(a):""}function vf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(ue(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Xt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Zo(e)}function Rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var w0=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||w0.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function yf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&xf(e,r,l)}else for(var c in t)t.hasOwnProperty(c)&&xf(e,c,t[c])}function Fo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var M0=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),C0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rs(e){return C0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ma(){}var Wo=null;function Po(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _n=null,On=null;function bf(e){var t=En(e);if(t&&(e=t.stateNode)){var a=e[Ie]||null;e:switch(e=t.stateNode,t.type){case"input":if($o(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[Ie]||null;if(!r)throw Error(u(90));$o(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&mf(l)}break e;case"textarea":pf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&An(e,!!a.multiple,t,!1)}}}var Io=!1;function gf(e,t,a){if(Io)return e(t,a);Io=!0;try{var l=e(t);return l}finally{if(Io=!1,(_n!==null||On!==null)&&(Zs(),_n&&(t=_n,e=On,On=_n=null,bf(t),e)))for(t=0;t<e.length;t++)bf(e[t])}}function Li(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Ie]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ca)try{var Qi={};Object.defineProperty(Qi,"passive",{get:function(){eu=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{eu=!1}var tl=null,tu=null,ss=null;function jf(){if(ss)return ss;var e,t=tu,a=t.length,l,r="value"in tl?tl.value:tl.textContent,c=r.length;for(e=0;e<a&&t[e]===r[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===r[c-l];l++);return ss=r.slice(e,1<l?1-l:void 0)}function os(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 us(){return!0}function Sf(){return!1}function Mt(e){function t(a,l,r,c,f){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?us:Sf,this.isPropagationStopped=Sf,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=us)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),t}var Gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=Mt(Gl),qi=b({},Gl,{view:0,detail:0}),E0=Mt(qi),au,lu,Yi,ds=b({},qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yi&&(Yi&&e.type==="mousemove"?(au=e.screenX-Yi.screenX,lu=e.screenY-Yi.screenY):lu=au=0,Yi=e),au)},movementY:function(e){return"movementY"in e?e.movementY:lu}}),Nf=Mt(ds),T0=b({},ds,{dataTransfer:0}),z0=Mt(T0),A0=b({},qi,{relatedTarget:0}),nu=Mt(A0),R0=b({},Gl,{animationName:0,elapsedTime:0,pseudoElement:0}),_0=Mt(R0),O0=b({},Gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),D0=Mt(O0),k0=b({},Gl,{data:0}),wf=Mt(k0),U0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B0={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"},H0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=H0[e])?!!t[e]:!1}function iu(){return L0}var Q0=b({},qi,{key:function(e){if(e.key){var t=U0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?B0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(e){return e.type==="keypress"?os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),q0=Mt(Q0),Y0=b({},ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mf=Mt(Y0),G0=b({},qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),K0=Mt(G0),X0=b({},Gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),V0=Mt(X0),Z0=b({},ds,{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}),$0=Mt(Z0),J0=b({},Gl,{newState:0,oldState:0}),F0=Mt(J0),W0=[9,13,27,32],ru=Ca&&"CompositionEvent"in window,Gi=null;Ca&&"documentMode"in document&&(Gi=document.documentMode);var P0=Ca&&"TextEvent"in window&&!Gi,Cf=Ca&&(!ru||Gi&&8<Gi&&11>=Gi),Ef=" ",Tf=!1;function zf(e,t){switch(e){case"keyup":return W0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Af(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function I0(e,t){switch(e){case"compositionend":return Af(t);case"keypress":return t.which!==32?null:(Tf=!0,Ef);case"textInput":return e=t.data,e===Ef&&Tf?null:e;default:return null}}function ey(e,t){if(Dn)return e==="compositionend"||!ru&&zf(e,t)?(e=jf(),ss=tu=tl=null,Dn=!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 Cf&&t.locale!=="ko"?null:t.data;default:return null}}var ty={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 Rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ty[e.type]:t==="textarea"}function _f(e,t,a,l){_n?On?On.push(l):On=[l]:_n=l,t=eo(t,"onChange"),0<t.length&&(a=new cs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ki=null,Xi=null;function ay(e){hp(e,0)}function fs(e){var t=Hi(e);if(mf(t))return e}function Of(e,t){if(e==="change")return t}var Df=!1;if(Ca){var su;if(Ca){var ou="oninput"in document;if(!ou){var kf=document.createElement("div");kf.setAttribute("oninput","return;"),ou=typeof kf.oninput=="function"}su=ou}else su=!1;Df=su&&(!document.documentMode||9<document.documentMode)}function Uf(){Ki&&(Ki.detachEvent("onpropertychange",Bf),Xi=Ki=null)}function Bf(e){if(e.propertyName==="value"&&fs(Xi)){var t=[];_f(t,Xi,e,Po(e)),gf(ay,t)}}function ly(e,t,a){e==="focusin"?(Uf(),Ki=t,Xi=a,Ki.attachEvent("onpropertychange",Bf)):e==="focusout"&&Uf()}function ny(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fs(Xi)}function iy(e,t){if(e==="click")return fs(t)}function ry(e,t){if(e==="input"||e==="change")return fs(t)}function sy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:sy;function Vi(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!fa.call(t,r)||!kt(e[r],t[r]))return!1}return!0}function Hf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var a=Hf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hf(a)}}function Qf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=is(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=is(e.document)}return t}function uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var oy=Ca&&"documentMode"in document&&11>=document.documentMode,kn=null,cu=null,Zi=null,du=!1;function Yf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;du||kn==null||kn!==is(l)||(l=kn,"selectionStart"in l&&uu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zi&&Vi(Zi,l)||(Zi=l,l=eo(cu,"onSelect"),0<l.length&&(t=new cs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=kn)))}function Kl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Un={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionrun:Kl("Transition","TransitionRun"),transitionstart:Kl("Transition","TransitionStart"),transitioncancel:Kl("Transition","TransitionCancel"),transitionend:Kl("Transition","TransitionEnd")},fu={},Gf={};Ca&&(Gf=document.createElement("div").style,"AnimationEvent"in window||(delete Un.animationend.animation,delete Un.animationiteration.animation,delete Un.animationstart.animation),"TransitionEvent"in window||delete Un.transitionend.transition);function Xl(e){if(fu[e])return fu[e];if(!Un[e])return e;var t=Un[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gf)return fu[e]=t[a];return e}var Kf=Xl("animationend"),Xf=Xl("animationiteration"),Vf=Xl("animationstart"),uy=Xl("transitionrun"),cy=Xl("transitionstart"),dy=Xl("transitioncancel"),Zf=Xl("transitionend"),$f=new Map,mu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mu.push("scrollEnd");function ia(e,t){$f.set(e,t),Yl(t,[e])}var ms=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Zt=[],Bn=0,hu=0;function hs(){for(var e=Bn,t=hu=Bn=0;t<e;){var a=Zt[t];Zt[t++]=null;var l=Zt[t];Zt[t++]=null;var r=Zt[t];Zt[t++]=null;var c=Zt[t];if(Zt[t++]=null,l!==null&&r!==null){var f=l.pending;f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r}c!==0&&Jf(a,r,c)}}function ps(e,t,a,l){Zt[Bn++]=e,Zt[Bn++]=t,Zt[Bn++]=a,Zt[Bn++]=l,hu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function pu(e,t,a,l){return ps(e,t,a,l),vs(e)}function Vl(e,t){return ps(e,null,null,t),vs(e)}function Jf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-jt(a),e=c.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),c):null}function vs(e){if(50<pr)throw pr=0,wc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Hn={};function fy(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,a,l){return new fy(e,t,a,l)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var a=e.alternate;return a===null?(a=Ut(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ff(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xs(e,t,a,l,r,c){var f=0;if(l=e,typeof e=="function")vu(e)&&(f=1);else if(typeof e=="string")f=xb(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=Ut(31,a,t,r),e.elementType=I,e.lanes=c,e;case O:return Zl(a.children,r,c,t);case L:f=8,r|=24;break;case k:return e=Ut(12,a,t,r|2),e.elementType=k,e.lanes=c,e;case F:return e=Ut(13,a,t,r),e.elementType=F,e.lanes=c,e;case te:return e=Ut(19,a,t,r),e.elementType=te,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:f=10;break e;case K:f=9;break e;case X:f=11;break e;case V:f=14;break e;case J:f=16,l=null;break e}f=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Ut(f,a,t,r),t.elementType=e,t.type=l,t.lanes=c,t}function Zl(e,t,a,l){return e=Ut(7,e,l,t),e.lanes=a,e}function xu(e,t,a){return e=Ut(6,e,null,t),e.lanes=a,e}function Wf(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function yu(e,t,a){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pf=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var a=Pf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:gn(t)},Pf.set(e,t),t)}return{value:e,source:t,stack:gn(t)}}var Ln=[],Qn=0,ys=null,$i=0,Jt=[],Ft=0,al=null,pa=1,va="";function Ta(e,t){Ln[Qn++]=$i,Ln[Qn++]=ys,ys=e,$i=t}function If(e,t,a){Jt[Ft++]=pa,Jt[Ft++]=va,Jt[Ft++]=al,al=e;var l=pa;e=va;var r=32-jt(l)-1;l&=~(1<<r),a+=1;var c=32-jt(t)+r;if(30<c){var f=r-r%5;c=(l&(1<<f)-1).toString(32),l>>=f,r-=f,pa=1<<32-jt(t)+r|a<<r|l,va=c+e}else pa=1<<c|a<<r|l,va=e}function bu(e){e.return!==null&&(Ta(e,1),If(e,1,0))}function gu(e){for(;e===ys;)ys=Ln[--Qn],Ln[Qn]=null,$i=Ln[--Qn],Ln[Qn]=null;for(;e===al;)al=Jt[--Ft],Jt[Ft]=null,va=Jt[--Ft],Jt[Ft]=null,pa=Jt[--Ft],Jt[Ft]=null}function em(e,t){Jt[Ft++]=pa,Jt[Ft++]=va,Jt[Ft++]=al,pa=t.id,va=t.overflow,al=e}var dt=null,Ke=null,Te=!1,ll=null,Wt=!1,ju=Error(u(519));function nl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ji($t(t,e)),ju}function tm(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[qe]=e,t[Ie]=l,a){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(a=0;a<xr.length;a++)we(xr[a],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),hf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),vf(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||yp(t.textContent,a)?(l.popover!=null&&(we("beforetoggle",t),we("toggle",t)),l.onScroll!=null&&we("scroll",t),l.onScrollEnd!=null&&we("scrollend",t),l.onClick!=null&&(t.onclick=Ma),t=!0):t=!1,t||nl(e,!0)}function am(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:dt=dt.return}}function qn(e){if(e!==dt)return!1;if(!Te)return am(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Lc(e.type,e.memoizedProps)),a=!a),a&&Ke&&nl(e),am(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ke=Ep(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ke=Ep(e)}else t===27?(t=Ke,yl(e.type)?(e=Kc,Kc=null,Ke=e):Ke=t):Ke=dt?It(e.stateNode.nextSibling):null;return!0}function $l(){Ke=dt=null,Te=!1}function Su(){var e=ll;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),ll=null),e}function Ji(e){ll===null?ll=[e]:ll.push(e)}var Nu=w(null),Jl=null,za=null;function il(e,t,a){Z(Nu,t._currentValue),t._currentValue=a}function Aa(e){e._currentValue=Nu.current,_(Nu)}function wu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Mu(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var f=r.child;c=c.firstContext;e:for(;c!==null;){var y=c;c=r;for(var S=0;S<t.length;S++)if(y.context===t[S]){c.lanes|=a,y=c.alternate,y!==null&&(y.lanes|=a),wu(c.return,a,e),l||(f=null);break e}c=y.next}}else if(r.tag===18){if(f=r.return,f===null)throw Error(u(341));f.lanes|=a,c=f.alternate,c!==null&&(c.lanes|=a),wu(f,a,e),f=null}else f=r.child;if(f!==null)f.return=r;else for(f=r;f!==null;){if(f===e){f=null;break}if(r=f.sibling,r!==null){r.return=f.return,f=r;break}f=f.return}r=f}}function Yn(e,t,a,l){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var f=r.alternate;if(f===null)throw Error(u(387));if(f=f.memoizedProps,f!==null){var y=r.type;kt(r.pendingProps.value,f.value)||(e!==null?e.push(y):e=[y])}}else if(r===se.current){if(f=r.alternate,f===null)throw Error(u(387));f.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Sr):e=[Sr])}r=r.return}e!==null&&Mu(t,e,a,l),t.flags|=262144}function bs(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fl(e){Jl=e,za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return lm(Jl,e)}function gs(e,t){return Jl===null&&Fl(e),lm(e,t)}function lm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},za===null){if(e===null)throw Error(u(308));za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else za=za.next=t;return a}var my=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},hy=n.unstable_scheduleCallback,py=n.unstable_NormalPriority,et={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new my,data:new Map,refCount:0}}function Fi(e){e.refCount--,e.refCount===0&&hy(py,function(){e.controller.abort()})}var Wi=null,Eu=0,Gn=0,Kn=null;function vy(e,t){if(Wi===null){var a=Wi=[];Eu=0,Gn=Ac(),Kn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Eu++,t.then(nm,nm),t}function nm(){if(--Eu===0&&Wi!==null){Kn!==null&&(Kn.status="fulfilled");var e=Wi;Wi=null,Gn=0,Kn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xy(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var im=U.S;U.S=function(e,t){Yh=bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vy(e,t),im!==null&&im(e,t)};var Wl=w(null);function Tu(){var e=Wl.current;return e!==null?e:Ye.pooledCache}function js(e,t){t===null?Z(Wl,Wl.current):Z(Wl,t.pool)}function rm(){var e=Tu();return e===null?null:{parent:et._currentValue,pool:e}}var Xn=Error(u(460)),zu=Error(u(474)),Ss=Error(u(542)),Ns={then:function(){}};function sm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function om(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ma,Ma),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e;default:if(typeof t.status=="string")t.then(Ma,Ma);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cm(e),e}throw Il=t,Xn}}function Pl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Il=a,Xn):a}}var Il=null;function um(){if(Il===null)throw Error(u(459));var e=Il;return Il=null,e}function cm(e){if(e===Xn||e===Ss)throw Error(u(483))}var Vn=null,Pi=0;function ws(e){var t=Pi;return Pi+=1,Vn===null&&(Vn=[]),om(Vn,e,t)}function Ii(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ms(e,t){throw t.$$typeof===E?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dm(e){function t(C,M){if(e){var A=C.deletions;A===null?(C.deletions=[M],C.flags|=16):A.push(M)}}function a(C,M){if(!e)return null;for(;M!==null;)t(C,M),M=M.sibling;return null}function l(C){for(var M=new Map;C!==null;)C.key!==null?M.set(C.key,C):M.set(C.index,C),C=C.sibling;return M}function r(C,M){return C=Ea(C,M),C.index=0,C.sibling=null,C}function c(C,M,A){return C.index=A,e?(A=C.alternate,A!==null?(A=A.index,A<M?(C.flags|=67108866,M):A):(C.flags|=67108866,M)):(C.flags|=1048576,M)}function f(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function y(C,M,A,q){return M===null||M.tag!==6?(M=xu(A,C.mode,q),M.return=C,M):(M=r(M,A),M.return=C,M)}function S(C,M,A,q){var de=A.type;return de===O?H(C,M,A.props.children,q,A.key):M!==null&&(M.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&Pl(de)===M.type)?(M=r(M,A.props),Ii(M,A),M.return=C,M):(M=xs(A.type,A.key,A.props,null,C.mode,q),Ii(M,A),M.return=C,M)}function R(C,M,A,q){return M===null||M.tag!==4||M.stateNode.containerInfo!==A.containerInfo||M.stateNode.implementation!==A.implementation?(M=yu(A,C.mode,q),M.return=C,M):(M=r(M,A.children||[]),M.return=C,M)}function H(C,M,A,q,de){return M===null||M.tag!==7?(M=Zl(A,C.mode,q,de),M.return=C,M):(M=r(M,A),M.return=C,M)}function Y(C,M,A){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=xu(""+M,C.mode,A),M.return=C,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case T:return A=xs(M.type,M.key,M.props,null,C.mode,A),Ii(A,M),A.return=C,A;case z:return M=yu(M,C.mode,A),M.return=C,M;case J:return M=Pl(M),Y(C,M,A)}if(ue(M)||fe(M))return M=Zl(M,C.mode,A,null),M.return=C,M;if(typeof M.then=="function")return Y(C,ws(M),A);if(M.$$typeof===Q)return Y(C,gs(C,M),A);Ms(C,M)}return null}function D(C,M,A,q){var de=M!==null?M.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return de!==null?null:y(C,M,""+A,q);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case T:return A.key===de?S(C,M,A,q):null;case z:return A.key===de?R(C,M,A,q):null;case J:return A=Pl(A),D(C,M,A,q)}if(ue(A)||fe(A))return de!==null?null:H(C,M,A,q,null);if(typeof A.then=="function")return D(C,M,ws(A),q);if(A.$$typeof===Q)return D(C,M,gs(C,A),q);Ms(C,A)}return null}function B(C,M,A,q,de){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return C=C.get(A)||null,y(M,C,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case T:return C=C.get(q.key===null?A:q.key)||null,S(M,C,q,de);case z:return C=C.get(q.key===null?A:q.key)||null,R(M,C,q,de);case J:return q=Pl(q),B(C,M,A,q,de)}if(ue(q)||fe(q))return C=C.get(A)||null,H(M,C,q,de,null);if(typeof q.then=="function")return B(C,M,A,ws(q),de);if(q.$$typeof===Q)return B(C,M,A,gs(M,q),de);Ms(M,q)}return null}function le(C,M,A,q){for(var de=null,Re=null,re=M,xe=M=0,Ce=null;re!==null&&xe<A.length;xe++){re.index>xe?(Ce=re,re=null):Ce=re.sibling;var _e=D(C,re,A[xe],q);if(_e===null){re===null&&(re=Ce);break}e&&re&&_e.alternate===null&&t(C,re),M=c(_e,M,xe),Re===null?de=_e:Re.sibling=_e,Re=_e,re=Ce}if(xe===A.length)return a(C,re),Te&&Ta(C,xe),de;if(re===null){for(;xe<A.length;xe++)re=Y(C,A[xe],q),re!==null&&(M=c(re,M,xe),Re===null?de=re:Re.sibling=re,Re=re);return Te&&Ta(C,xe),de}for(re=l(re);xe<A.length;xe++)Ce=B(re,C,xe,A[xe],q),Ce!==null&&(e&&Ce.alternate!==null&&re.delete(Ce.key===null?xe:Ce.key),M=c(Ce,M,xe),Re===null?de=Ce:Re.sibling=Ce,Re=Ce);return e&&re.forEach(function(Nl){return t(C,Nl)}),Te&&Ta(C,xe),de}function me(C,M,A,q){if(A==null)throw Error(u(151));for(var de=null,Re=null,re=M,xe=M=0,Ce=null,_e=A.next();re!==null&&!_e.done;xe++,_e=A.next()){re.index>xe?(Ce=re,re=null):Ce=re.sibling;var Nl=D(C,re,_e.value,q);if(Nl===null){re===null&&(re=Ce);break}e&&re&&Nl.alternate===null&&t(C,re),M=c(Nl,M,xe),Re===null?de=Nl:Re.sibling=Nl,Re=Nl,re=Ce}if(_e.done)return a(C,re),Te&&Ta(C,xe),de;if(re===null){for(;!_e.done;xe++,_e=A.next())_e=Y(C,_e.value,q),_e!==null&&(M=c(_e,M,xe),Re===null?de=_e:Re.sibling=_e,Re=_e);return Te&&Ta(C,xe),de}for(re=l(re);!_e.done;xe++,_e=A.next())_e=B(re,C,xe,_e.value,q),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?xe:_e.key),M=c(_e,M,xe),Re===null?de=_e:Re.sibling=_e,Re=_e);return e&&re.forEach(function(Tb){return t(C,Tb)}),Te&&Ta(C,xe),de}function Le(C,M,A,q){if(typeof A=="object"&&A!==null&&A.type===O&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case T:e:{for(var de=A.key;M!==null;){if(M.key===de){if(de=A.type,de===O){if(M.tag===7){a(C,M.sibling),q=r(M,A.props.children),q.return=C,C=q;break e}}else if(M.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&Pl(de)===M.type){a(C,M.sibling),q=r(M,A.props),Ii(q,A),q.return=C,C=q;break e}a(C,M);break}else t(C,M);M=M.sibling}A.type===O?(q=Zl(A.props.children,C.mode,q,A.key),q.return=C,C=q):(q=xs(A.type,A.key,A.props,null,C.mode,q),Ii(q,A),q.return=C,C=q)}return f(C);case z:e:{for(de=A.key;M!==null;){if(M.key===de)if(M.tag===4&&M.stateNode.containerInfo===A.containerInfo&&M.stateNode.implementation===A.implementation){a(C,M.sibling),q=r(M,A.children||[]),q.return=C,C=q;break e}else{a(C,M);break}else t(C,M);M=M.sibling}q=yu(A,C.mode,q),q.return=C,C=q}return f(C);case J:return A=Pl(A),Le(C,M,A,q)}if(ue(A))return le(C,M,A,q);if(fe(A)){if(de=fe(A),typeof de!="function")throw Error(u(150));return A=de.call(A),me(C,M,A,q)}if(typeof A.then=="function")return Le(C,M,ws(A),q);if(A.$$typeof===Q)return Le(C,M,gs(C,A),q);Ms(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,M!==null&&M.tag===6?(a(C,M.sibling),q=r(M,A),q.return=C,C=q):(a(C,M),q=xu(A,C.mode,q),q.return=C,C=q),f(C)):a(C,M)}return function(C,M,A,q){try{Pi=0;var de=Le(C,M,A,q);return Vn=null,de}catch(re){if(re===Xn||re===Ss)throw re;var Re=Ut(29,re,null,C.mode);return Re.lanes=q,Re.return=C,Re}finally{}}}var en=dm(!0),fm=dm(!1),rl=!1;function Au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function sl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ol(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Oe&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=vs(e),Jf(e,null,a),t}return ps(e,l,t,a),vs(e)}function er(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,el(e,a)}}function _u(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?r=c=f:c=c.next=f,a=a.next}while(a!==null);c===null?r=c=t:c=c.next=t}else r=c=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ou=!1;function tr(){if(Ou){var e=Kn;if(e!==null)throw e}}function ar(e,t,a,l){Ou=!1;var r=e.updateQueue;rl=!1;var c=r.firstBaseUpdate,f=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var S=y,R=S.next;S.next=null,f===null?c=R:f.next=R,f=S;var H=e.alternate;H!==null&&(H=H.updateQueue,y=H.lastBaseUpdate,y!==f&&(y===null?H.firstBaseUpdate=R:y.next=R,H.lastBaseUpdate=S))}if(c!==null){var Y=r.baseState;f=0,H=R=S=null,y=c;do{var D=y.lane&-536870913,B=D!==y.lane;if(B?(Me&D)===D:(l&D)===D){D!==0&&D===Gn&&(Ou=!0),H!==null&&(H=H.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var le=e,me=y;D=t;var Le=a;switch(me.tag){case 1:if(le=me.payload,typeof le=="function"){Y=le.call(Le,Y,D);break e}Y=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=me.payload,D=typeof le=="function"?le.call(Le,Y,D):le,D==null)break e;Y=b({},Y,D);break e;case 2:rl=!0}}D=y.callback,D!==null&&(e.flags|=64,B&&(e.flags|=8192),B=r.callbacks,B===null?r.callbacks=[D]:B.push(D))}else B={lane:D,tag:y.tag,payload:y.payload,callback:y.callback,next:null},H===null?(R=H=B,S=Y):H=H.next=B,f|=D;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;B=y,y=B.next,B.next=null,r.lastBaseUpdate=B,r.shared.pending=null}}while(!0);H===null&&(S=Y),r.baseState=S,r.firstBaseUpdate=R,r.lastBaseUpdate=H,c===null&&(r.shared.lanes=0),ml|=f,e.lanes=f,e.memoizedState=Y}}function mm(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function hm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mm(a[e],t)}var Zn=w(null),Cs=w(0);function pm(e,t){e=La,Z(Cs,e),Z(Zn,t),La=e|t.baseLanes}function Du(){Z(Cs,La),Z(Zn,Zn.current)}function ku(){La=Cs.current,_(Zn),_(Cs)}var Bt=w(null),Pt=null;function ul(e){var t=e.alternate;Z(We,We.current&1),Z(Bt,e),Pt===null&&(t===null||Zn.current!==null||t.memoizedState!==null)&&(Pt=e)}function Uu(e){Z(We,We.current),Z(Bt,e),Pt===null&&(Pt=e)}function vm(e){e.tag===22?(Z(We,We.current),Z(Bt,e),Pt===null&&(Pt=e)):cl()}function cl(){Z(We,We.current),Z(Bt,Bt.current)}function Ht(e){_(Bt),Pt===e&&(Pt=null),_(We)}var We=w(0);function Es(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Yc(a)||Gc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ra=0,ve=null,Be=null,tt=null,Ts=!1,$n=!1,tn=!1,zs=0,lr=0,Jn=null,yy=0;function $e(){throw Error(u(321))}function Bu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!kt(e[a],t[a]))return!1;return!0}function Hu(e,t,a,l,r,c){return Ra=c,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Im:Iu,tn=!1,c=a(l,r),tn=!1,$n&&(c=ym(t,a,l,r)),xm(e),c}function xm(e){U.H=rr;var t=Be!==null&&Be.next!==null;if(Ra=0,tt=Be=ve=null,Ts=!1,lr=0,Jn=null,t)throw Error(u(300));e===null||at||(e=e.dependencies,e!==null&&bs(e)&&(at=!0))}function ym(e,t,a,l){ve=e;var r=0;do{if($n&&(Jn=null),lr=0,$n=!1,25<=r)throw Error(u(301));if(r+=1,tt=Be=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}U.H=eh,c=t(a,l)}while($n);return c}function by(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?nr(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(ve.flags|=1024),t}function Lu(){var e=zs!==0;return zs=0,e}function Qu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function qu(e){if(Ts){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ts=!1}Ra=0,tt=Be=ve=null,$n=!1,lr=zs=0,Jn=null}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?ve.memoizedState=tt=e:tt=tt.next=e,tt}function Pe(){if(Be===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=tt===null?ve.memoizedState:tt.next;if(t!==null)tt=t,Be=e;else{if(e===null)throw ve.alternate===null?Error(u(467)):Error(u(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},tt===null?ve.memoizedState=tt=e:tt=tt.next=e}return tt}function As(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nr(e){var t=lr;return lr+=1,Jn===null&&(Jn=[]),e=om(Jn,e,t),t=ve,(tt===null?t.memoizedState:tt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Im:Iu),e}function Rs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return nr(e);if(e.$$typeof===Q)return ft(e)}throw Error(u(438,String(e)))}function Yu(e){var t=null,a=ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=As(),ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=oe;return t.index++,a}function _a(e,t){return typeof t=="function"?t(e):t}function _s(e){var t=Pe();return Gu(t,Be,e)}function Gu(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var r=e.baseQueue,c=l.pending;if(c!==null){if(r!==null){var f=r.next;r.next=c.next,c.next=f}t.baseQueue=r=c,l.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var y=f=null,S=null,R=t,H=!1;do{var Y=R.lane&-536870913;if(Y!==R.lane?(Me&Y)===Y:(Ra&Y)===Y){var D=R.revertLane;if(D===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Y===Gn&&(H=!0);else if((Ra&D)===D){R=R.next,D===Gn&&(H=!0);continue}else Y={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(y=S=Y,f=c):S=S.next=Y,ve.lanes|=D,ml|=D;Y=R.action,tn&&a(c,Y),c=R.hasEagerState?R.eagerState:a(c,Y)}else D={lane:Y,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(y=S=D,f=c):S=S.next=D,ve.lanes|=Y,ml|=Y;R=R.next}while(R!==null&&R!==t);if(S===null?f=c:S.next=y,!kt(c,e.memoizedState)&&(at=!0,H&&(a=Kn,a!==null)))throw a;e.memoizedState=c,e.baseState=f,e.baseQueue=S,l.lastRenderedState=c}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ku(e){var t=Pe(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,c=t.memoizedState;if(r!==null){a.pending=null;var f=r=r.next;do c=e(c,f.action),f=f.next;while(f!==r);kt(c,t.memoizedState)||(at=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function bm(e,t,a){var l=ve,r=Pe(),c=Te;if(c){if(a===void 0)throw Error(u(407));a=a()}else a=t();var f=!kt((Be||r).memoizedState,a);if(f&&(r.memoizedState=a,at=!0),r=r.queue,Zu(Sm.bind(null,l,r,e),[e]),r.getSnapshot!==t||f||tt!==null&&tt.memoizedState.tag&1){if(l.flags|=2048,Fn(9,{destroy:void 0},jm.bind(null,l,r,a,t),null),Ye===null)throw Error(u(349));c||(Ra&127)!==0||gm(l,t,a)}return a}function gm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ve.updateQueue,t===null?(t=As(),ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jm(e,t,a,l){t.value=a,t.getSnapshot=l,Nm(t)&&wm(e)}function Sm(e,t,a){return a(function(){Nm(t)&&wm(e)})}function Nm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!kt(e,a)}catch{return!0}}function wm(e){var t=Vl(e,2);t!==null&&At(t,e,2)}function Xu(e){var t=St();if(typeof e=="function"){var a=e;if(e=a(),tn){ma(!0);try{a()}finally{ma(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t}function Mm(e,t,a,l){return e.baseState=a,Gu(e,Be,typeof l=="function"?l:_a)}function gy(e,t,a,l,r){if(ks(e))throw Error(u(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){c.listeners.push(f)}};U.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,Cm(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Cm(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var c=U.T,f={};U.T=f;try{var y=a(r,l),S=U.S;S!==null&&S(f,y),Em(e,t,y)}catch(R){Vu(e,t,R)}finally{c!==null&&f.types!==null&&(c.types=f.types),U.T=c}}else try{c=a(r,l),Em(e,t,c)}catch(R){Vu(e,t,R)}}function Em(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Tm(e,t,l)},function(l){return Vu(e,t,l)}):Tm(e,t,a)}function Tm(e,t,a){t.status="fulfilled",t.value=a,zm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Cm(e,a)))}function Vu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,zm(t),t=t.next;while(t!==l)}e.action=null}function zm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Am(e,t){return t}function Rm(e,t){if(Te){var a=Ye.formState;if(a!==null){e:{var l=ve;if(Te){if(Ke){t:{for(var r=Ke,c=Wt;r.nodeType!==8;){if(!c){r=null;break t}if(r=It(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){Ke=It(r.nextSibling),l=r.data==="F!";break e}}nl(l)}l=!1}l&&(t=a[0])}}return a=St(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Am,lastRenderedState:t},a.queue=l,a=Fm.bind(null,ve,l),l.dispatch=a,l=Xu(!1),c=Pu.bind(null,ve,!1,l.queue),l=St(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=gy.bind(null,ve,r,c,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function _m(e){var t=Pe();return Om(t,Be,e)}function Om(e,t,a){if(t=Gu(e,t,Am)[0],e=_s(_a)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=nr(t)}catch(f){throw f===Xn?Ss:f}else l=t;t=Pe();var r=t.queue,c=r.dispatch;return a!==t.memoizedState&&(ve.flags|=2048,Fn(9,{destroy:void 0},jy.bind(null,r,a),null)),[l,c,e]}function jy(e,t){e.action=t}function Dm(e){var t=Pe(),a=Be;if(a!==null)return Om(t,a,e);Pe(),t=t.memoizedState,a=Pe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Fn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ve.updateQueue,t===null&&(t=As(),ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function km(){return Pe().memoizedState}function Os(e,t,a,l){var r=St();ve.flags|=e,r.memoizedState=Fn(1|t,{destroy:void 0},a,l===void 0?null:l)}function Ds(e,t,a,l){var r=Pe();l=l===void 0?null:l;var c=r.memoizedState.inst;Be!==null&&l!==null&&Bu(l,Be.memoizedState.deps)?r.memoizedState=Fn(t,c,a,l):(ve.flags|=e,r.memoizedState=Fn(1|t,c,a,l))}function Um(e,t){Os(8390656,8,e,t)}function Zu(e,t){Ds(2048,8,e,t)}function Sy(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=As(),ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Bm(e){var t=Pe().memoizedState;return Sy({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Hm(e,t){return Ds(4,2,e,t)}function Lm(e,t){return Ds(4,4,e,t)}function Qm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qm(e,t,a){a=a!=null?a.concat([e]):null,Ds(4,4,Qm.bind(null,t,e),a)}function $u(){}function Ym(e,t){var a=Pe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Bu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Gm(e,t){var a=Pe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Bu(t,l[1]))return l[0];if(l=e(),tn){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[l,t],l}function Ju(e,t,a){return a===void 0||(Ra&1073741824)!==0&&(Me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Kh(),ve.lanes|=e,ml|=e,a)}function Km(e,t,a,l){return kt(a,t)?a:Zn.current!==null?(e=Ju(e,a,l),kt(e,t)||(at=!0),e):(Ra&42)===0||(Ra&1073741824)!==0&&(Me&261930)===0?(at=!0,e.memoizedState=a):(e=Kh(),ve.lanes|=e,ml|=e,t)}function Xm(e,t,a,l,r){var c=$.p;$.p=c!==0&&8>c?c:8;var f=U.T,y={};U.T=y,Pu(e,!1,t,a);try{var S=r(),R=U.S;if(R!==null&&R(y,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var H=xy(S,l);ir(e,t,H,qt(e))}else ir(e,t,l,qt(e))}catch(Y){ir(e,t,{then:function(){},status:"rejected",reason:Y},qt())}finally{$.p=c,f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}function Ny(){}function Fu(e,t,a,l){if(e.tag!==5)throw Error(u(476));var r=Vm(e).queue;Xm(e,r,t,ie,a===null?Ny:function(){return Zm(e),a(l)})}function Vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:ie},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zm(e){var t=Vm(e);t.next===null&&(t=e.alternate.memoizedState),ir(e,t.next.queue,{},qt())}function Wu(){return ft(Sr)}function $m(){return Pe().memoizedState}function Jm(){return Pe().memoizedState}function wy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=qt();e=sl(a);var l=ol(t,e,a);l!==null&&(At(l,t,a),er(l,t,a)),t={cache:Cu()},e.payload=t;return}t=t.return}}function My(e,t,a){var l=qt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ks(e)?Wm(t,a):(a=pu(e,t,a,l),a!==null&&(At(a,e,l),Pm(a,t,l)))}function Fm(e,t,a){var l=qt();ir(e,t,a,l)}function ir(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ks(e))Wm(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var f=t.lastRenderedState,y=c(f,a);if(r.hasEagerState=!0,r.eagerState=y,kt(y,f))return ps(e,t,r,0),Ye===null&&hs(),!1}catch{}finally{}if(a=pu(e,t,r,l),a!==null)return At(a,e,l),Pm(a,t,l),!0}return!1}function Pu(e,t,a,l){if(l={lane:2,revertLane:Ac(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(u(479))}else t=pu(e,a,l,2),t!==null&&At(t,e,2)}function ks(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function Wm(e,t){$n=Ts=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Pm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,el(e,a)}}var rr={readContext:ft,use:Rs,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};rr.useEffectEvent=$e;var Im={readContext:ft,use:Rs,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Um,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Os(4194308,4,Qm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){Os(4,2,e,t)},useMemo:function(e,t){var a=St();t=t===void 0?null:t;var l=e();if(tn){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=St();if(a!==void 0){var r=a(t);if(tn){ma(!0);try{a(t)}finally{ma(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=My.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:function(e){e=Xu(e);var t=e.queue,a=Fm.bind(null,ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:$u,useDeferredValue:function(e,t){var a=St();return Ju(a,e,t)},useTransition:function(){var e=Xu(!1);return e=Xm.bind(null,ve,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ve,r=St();if(Te){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ye===null)throw Error(u(349));(Me&127)!==0||gm(l,t,a)}r.memoizedState=a;var c={value:a,getSnapshot:t};return r.queue=c,Um(Sm.bind(null,l,c,e),[e]),l.flags|=2048,Fn(9,{destroy:void 0},jm.bind(null,l,c,a,t),null),a},useId:function(){var e=St(),t=Ye.identifierPrefix;if(Te){var a=va,l=pa;a=(l&~(1<<32-jt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=zs++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=yy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wu,useFormState:Rm,useActionState:Rm,useOptimistic:function(e){var t=St();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Pu.bind(null,ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Yu,useCacheRefresh:function(){return St().memoizedState=wy.bind(null,ve)},useEffectEvent:function(e){var t=St(),a={impl:e};return t.memoizedState=a,function(){if((Oe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Iu={readContext:ft,use:Rs,useCallback:Ym,useContext:ft,useEffect:Zu,useImperativeHandle:qm,useInsertionEffect:Hm,useLayoutEffect:Lm,useMemo:Gm,useReducer:_s,useRef:km,useState:function(){return _s(_a)},useDebugValue:$u,useDeferredValue:function(e,t){var a=Pe();return Km(a,Be.memoizedState,e,t)},useTransition:function(){var e=_s(_a)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:nr(e),t]},useSyncExternalStore:bm,useId:$m,useHostTransitionStatus:Wu,useFormState:_m,useActionState:_m,useOptimistic:function(e,t){var a=Pe();return Mm(a,Be,e,t)},useMemoCache:Yu,useCacheRefresh:Jm};Iu.useEffectEvent=Bm;var eh={readContext:ft,use:Rs,useCallback:Ym,useContext:ft,useEffect:Zu,useImperativeHandle:qm,useInsertionEffect:Hm,useLayoutEffect:Lm,useMemo:Gm,useReducer:Ku,useRef:km,useState:function(){return Ku(_a)},useDebugValue:$u,useDeferredValue:function(e,t){var a=Pe();return Be===null?Ju(a,e,t):Km(a,Be.memoizedState,e,t)},useTransition:function(){var e=Ku(_a)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:nr(e),t]},useSyncExternalStore:bm,useId:$m,useHostTransitionStatus:Wu,useFormState:Dm,useActionState:Dm,useOptimistic:function(e,t){var a=Pe();return Be!==null?Mm(a,Be,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Yu,useCacheRefresh:Jm};eh.useEffectEvent=Bm;function ec(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var tc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=qt(),r=sl(l);r.payload=t,a!=null&&(r.callback=a),t=ol(e,r,l),t!==null&&(At(t,e,l),er(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=qt(),r=sl(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=ol(e,r,l),t!==null&&(At(t,e,l),er(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=qt(),l=sl(a);l.tag=2,t!=null&&(l.callback=t),t=ol(e,l,a),t!==null&&(At(t,e,a),er(t,e,a))}};function th(e,t,a,l,r,c,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,f):t.prototype&&t.prototype.isPureReactComponent?!Vi(a,l)||!Vi(r,c):!0}function ah(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&tc.enqueueReplaceState(t,t.state,null)}function an(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function lh(e){ms(e)}function nh(e){console.error(e)}function ih(e){ms(e)}function Us(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function rh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function ac(e,t,a){return a=sl(a),a.tag=3,a.payload={element:null},a.callback=function(){Us(e,t)},a}function sh(e){return e=sl(e),e.tag=3,e}function oh(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var c=l.value;e.payload=function(){return r(c)},e.callback=function(){rh(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){rh(t,a,l),typeof r!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function Cy(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Yn(t,a,r,!0),a=Bt.current,a!==null){switch(a.tag){case 31:case 13:return Pt===null?$s():a.alternate===null&&Je===0&&(Je=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Ns?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Ec(e,l,r)),!1;case 22:return a.flags|=65536,l===Ns?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Ec(e,l,r)),!1}throw Error(u(435,a.tag))}return Ec(e,l,r),$s(),!1}if(Te)return t=Bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==ju&&(e=Error(u(422),{cause:l}),Ji($t(e,a)))):(l!==ju&&(t=Error(u(423),{cause:l}),Ji($t(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=$t(l,a),r=ac(e.stateNode,l,r),_u(e,r),Je!==4&&(Je=2)),!1;var c=Error(u(520),{cause:l});if(c=$t(c,a),hr===null?hr=[c]:hr.push(c),Je!==4&&(Je=2),t===null)return!0;l=$t(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=ac(a.stateNode,l,e),_u(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(hl===null||!hl.has(c))))return a.flags|=65536,r&=-r,a.lanes|=r,r=sh(r),oh(r,e,a,l),_u(a,r),!1}a=a.return}while(a!==null);return!1}var lc=Error(u(461)),at=!1;function mt(e,t,a,l){t.child=e===null?fm(t,null,a,l):en(t,e.child,a,l)}function uh(e,t,a,l,r){a=a.render;var c=t.ref;if("ref"in l){var f={};for(var y in l)y!=="ref"&&(f[y]=l[y])}else f=l;return Fl(t),l=Hu(e,t,a,f,c,r),y=Lu(),e!==null&&!at?(Qu(e,t,r),Oa(e,t,r)):(Te&&y&&bu(t),t.flags|=1,mt(e,t,l,r),t.child)}function ch(e,t,a,l,r){if(e===null){var c=a.type;return typeof c=="function"&&!vu(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,dh(e,t,c,l,r)):(e=xs(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!dc(e,r)){var f=c.memoizedProps;if(a=a.compare,a=a!==null?a:Vi,a(f,l)&&e.ref===t.ref)return Oa(e,t,r)}return t.flags|=1,e=Ea(c,l),e.ref=t.ref,e.return=t,t.child=e}function dh(e,t,a,l,r){if(e!==null){var c=e.memoizedProps;if(Vi(c,l)&&e.ref===t.ref)if(at=!1,t.pendingProps=l=c,dc(e,r))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Oa(e,t,r)}return nc(e,t,a,l,r)}function fh(e,t,a,l){var r=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~c}else l=0,t.child=null;return mh(e,t,c,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&js(t,c!==null?c.cachePool:null),c!==null?pm(t,c):Du(),vm(t);else return l=t.lanes=536870912,mh(e,t,c!==null?c.baseLanes|a:a,a,l)}else c!==null?(js(t,c.cachePool),pm(t,c),cl(),t.memoizedState=null):(e!==null&&js(t,null),Du(),cl());return mt(e,t,r,a),t.child}function sr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mh(e,t,a,l,r){var c=Tu();return c=c===null?null:{parent:et._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&js(t,null),Du(),vm(t),e!==null&&Yn(e,t,l,!0),t.childLanes=r,null}function Bs(e,t){return t=Ls({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hh(e,t,a){return en(t,e.child,null,a),e=Bs(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function Ey(e,t,a){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(l.mode==="hidden")return e=Bs(t,l),t.lanes=536870912,sr(null,e);if(Uu(t),(e=Ke)?(e=Cp(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:al!==null?{id:pa,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Wf(e),a.return=t,t.child=a,dt=t,Ke=null)):e=null,e===null)throw nl(t);return t.lanes=536870912,null}return Bs(t,l)}var c=e.memoizedState;if(c!==null){var f=c.dehydrated;if(Uu(t),r)if(t.flags&256)t.flags&=-257,t=hh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(at||Yn(e,t,a,!1),r=(a&e.childLanes)!==0,at||r){if(l=Ye,l!==null&&(f=Di(l,a),f!==0&&f!==c.retryLane))throw c.retryLane=f,Vl(e,f),At(l,e,f),lc;$s(),t=hh(e,t,a)}else e=c.treeContext,Ke=It(f.nextSibling),dt=t,Te=!0,ll=null,Wt=!1,e!==null&&em(t,e),t=Bs(t,l),t.flags|=4096;return t}return e=Ea(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function nc(e,t,a,l,r){return Fl(t),a=Hu(e,t,a,l,void 0,r),l=Lu(),e!==null&&!at?(Qu(e,t,r),Oa(e,t,r)):(Te&&l&&bu(t),t.flags|=1,mt(e,t,a,r),t.child)}function ph(e,t,a,l,r,c){return Fl(t),t.updateQueue=null,a=ym(t,l,a,r),xm(e),l=Lu(),e!==null&&!at?(Qu(e,t,c),Oa(e,t,c)):(Te&&l&&bu(t),t.flags|=1,mt(e,t,a,c),t.child)}function vh(e,t,a,l,r){if(Fl(t),t.stateNode===null){var c=Hn,f=a.contextType;typeof f=="object"&&f!==null&&(c=ft(f)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=tc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Au(t),f=a.contextType,c.context=typeof f=="object"&&f!==null?ft(f):Hn,c.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(ec(t,a,f,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(f=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),f!==c.state&&tc.enqueueReplaceState(c,c.state,null),ar(t,l,c,r),tr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var y=t.memoizedProps,S=an(a,y);c.props=S;var R=c.context,H=a.contextType;f=Hn,typeof H=="object"&&H!==null&&(f=ft(H));var Y=a.getDerivedStateFromProps;H=typeof Y=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||R!==f)&&ah(t,c,l,f),rl=!1;var D=t.memoizedState;c.state=D,ar(t,l,c,r),tr(),R=t.memoizedState,y||D!==R||rl?(typeof Y=="function"&&(ec(t,a,Y,l),R=t.memoizedState),(S=rl||th(t,a,S,l,D,R,f))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=R),c.props=l,c.state=R,c.context=f,l=S):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Ru(e,t),f=t.memoizedProps,H=an(a,f),c.props=H,Y=t.pendingProps,D=c.context,R=a.contextType,S=Hn,typeof R=="object"&&R!==null&&(S=ft(R)),y=a.getDerivedStateFromProps,(R=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==Y||D!==S)&&ah(t,c,l,S),rl=!1,D=t.memoizedState,c.state=D,ar(t,l,c,r),tr();var B=t.memoizedState;f!==Y||D!==B||rl||e!==null&&e.dependencies!==null&&bs(e.dependencies)?(typeof y=="function"&&(ec(t,a,y,l),B=t.memoizedState),(H=rl||th(t,a,H,l,D,B,S)||e!==null&&e.dependencies!==null&&bs(e.dependencies))?(R||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,B,S),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,B,S)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=B),c.props=l,c.state=B,c.context=S,l=H):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,Hs(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=en(t,e.child,null,r),t.child=en(t,null,a,r)):mt(e,t,a,r),t.memoizedState=c.state,e=t.child):e=Oa(e,t,r),e}function xh(e,t,a,l){return $l(),t.flags|=256,mt(e,t,a,l),t.child}var ic={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rc(e){return{baseLanes:e,cachePool:rm()}}function sc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Qt),e}function yh(e,t,a){var l=t.pendingProps,r=!1,c=(t.flags&128)!==0,f;if((f=c)||(f=e!==null&&e.memoizedState===null?!1:(We.current&2)!==0),f&&(r=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?ul(t):cl(),(e=Ke)?(e=Cp(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:al!==null?{id:pa,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Wf(e),a.return=t,t.child=a,dt=t,Ke=null)):e=null,e===null)throw nl(t);return Gc(e)?t.lanes=32:t.lanes=536870912,null}var y=l.children;return l=l.fallback,r?(cl(),r=t.mode,y=Ls({mode:"hidden",children:y},r),l=Zl(l,r,a,null),y.return=t,l.return=t,y.sibling=l,t.child=y,l=t.child,l.memoizedState=rc(a),l.childLanes=sc(e,f,a),t.memoizedState=ic,sr(null,l)):(ul(t),oc(t,y))}var S=e.memoizedState;if(S!==null&&(y=S.dehydrated,y!==null)){if(c)t.flags&256?(ul(t),t.flags&=-257,t=uc(e,t,a)):t.memoizedState!==null?(cl(),t.child=e.child,t.flags|=128,t=null):(cl(),y=l.fallback,r=t.mode,l=Ls({mode:"visible",children:l.children},r),y=Zl(y,r,a,null),y.flags|=2,l.return=t,y.return=t,l.sibling=y,t.child=l,en(t,e.child,null,a),l=t.child,l.memoizedState=rc(a),l.childLanes=sc(e,f,a),t.memoizedState=ic,t=sr(null,l));else if(ul(t),Gc(y)){if(f=y.nextSibling&&y.nextSibling.dataset,f)var R=f.dgst;f=R,l=Error(u(419)),l.stack="",l.digest=f,Ji({value:l,source:null,stack:null}),t=uc(e,t,a)}else if(at||Yn(e,t,a,!1),f=(a&e.childLanes)!==0,at||f){if(f=Ye,f!==null&&(l=Di(f,a),l!==0&&l!==S.retryLane))throw S.retryLane=l,Vl(e,l),At(f,e,l),lc;Yc(y)||$s(),t=uc(e,t,a)}else Yc(y)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,Ke=It(y.nextSibling),dt=t,Te=!0,ll=null,Wt=!1,e!==null&&em(t,e),t=oc(t,l.children),t.flags|=4096);return t}return r?(cl(),y=l.fallback,r=t.mode,S=e.child,R=S.sibling,l=Ea(S,{mode:"hidden",children:l.children}),l.subtreeFlags=S.subtreeFlags&65011712,R!==null?y=Ea(R,y):(y=Zl(y,r,a,null),y.flags|=2),y.return=t,l.return=t,l.sibling=y,t.child=l,sr(null,l),l=t.child,y=e.child.memoizedState,y===null?y=rc(a):(r=y.cachePool,r!==null?(S=et._currentValue,r=r.parent!==S?{parent:S,pool:S}:r):r=rm(),y={baseLanes:y.baseLanes|a,cachePool:r}),l.memoizedState=y,l.childLanes=sc(e,f,a),t.memoizedState=ic,sr(e.child,l)):(ul(t),a=e.child,e=a.sibling,a=Ea(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function oc(e,t){return t=Ls({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ls(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function uc(e,t,a){return en(t,e.child,null,a),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),wu(e.return,t,a)}function cc(e,t,a,l,r,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r,treeForkCount:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=r,f.treeForkCount=c)}function gh(e,t,a){var l=t.pendingProps,r=l.revealOrder,c=l.tail;l=l.children;var f=We.current,y=(f&2)!==0;if(y?(f=f&1|2,t.flags|=128):f&=1,Z(We,f),mt(e,t,l,a),l=Te?$i:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bh(e,a,t);else if(e.tag===19)bh(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Es(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),cc(t,!1,r,a,c,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Es(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}cc(t,!0,a,null,c,l);break;case"together":cc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Oa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ml|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Yn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Ea(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ea(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bs(e)))}function Ty(e,t,a){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),il(t,et,e.memoizedState.cache),$l();break;case 27:case 5:Ot(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:il(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ul(t),t.flags|=128,null):(a&t.child.childLanes)!==0?yh(e,t,a):(ul(t),e=Oa(e,t,a),e!==null?e.sibling:null);ul(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Yn(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return gh(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Z(We,We.current),l)break;return null;case 22:return t.lanes=0,fh(e,t,a,t.pendingProps);case 24:il(t,et,e.memoizedState.cache)}return Oa(e,t,a)}function jh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!dc(e,a)&&(t.flags&128)===0)return at=!1,Ty(e,t,a);at=(e.flags&131072)!==0}else at=!1,Te&&(t.flags&1048576)!==0&&If(t,$i,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Pl(t.elementType),t.type=e,typeof e=="function")vu(e)?(l=an(e,l),t.tag=1,t=vh(null,t,e,l,a)):(t.tag=0,t=nc(null,t,e,l,a));else{if(e!=null){var r=e.$$typeof;if(r===X){t.tag=11,t=uh(null,t,e,l,a);break e}else if(r===V){t.tag=14,t=ch(null,t,e,l,a);break e}}throw t=be(e)||e,Error(u(306,t,""))}}return t;case 0:return nc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=an(l,t.pendingProps),vh(e,t,l,r,a);case 3:e:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var c=t.memoizedState;r=c.element,Ru(e,t),ar(t,l,null,a);var f=t.memoizedState;if(l=f.cache,il(t,et,l),l!==c.cache&&Mu(t,[et],a,!0),tr(),l=f.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=xh(e,t,l,a);break e}else if(l!==r){r=$t(Error(u(424)),t),Ji(r),t=xh(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ke=It(e.firstChild),dt=t,Te=!0,ll=null,Wt=!0,a=fm(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($l(),l===r){t=Oa(e,t,a);break e}mt(e,t,l,a)}t=t.child}return t;case 26:return Hs(e,t),e===null?(a=_p(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,l=to(ae.current).createElement(a),l[qe]=t,l[Ie]=e,ht(l,a,e),st(l),t.stateNode=l):t.memoizedState=_p(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ot(t),e===null&&Te&&(l=t.stateNode=zp(t.type,t.pendingProps,ae.current),dt=t,Wt=!0,r=Ke,yl(t.type)?(Kc=r,Ke=It(l.firstChild)):Ke=r),mt(e,t,t.pendingProps.children,a),Hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=l=Ke)&&(l=nb(l,t.type,t.pendingProps,Wt),l!==null?(t.stateNode=l,dt=t,Ke=It(l.firstChild),Wt=!1,r=!0):r=!1),r||nl(t)),Ot(t),r=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,l=c.children,Lc(r,c)?l=null:f!==null&&Lc(r,f)&&(t.flags|=32),t.memoizedState!==null&&(r=Hu(e,t,by,null,null,a),Sr._currentValue=r),Hs(e,t),mt(e,t,l,a),t.child;case 6:return e===null&&Te&&((e=a=Ke)&&(a=ib(a,t.pendingProps,Wt),a!==null?(t.stateNode=a,dt=t,Ke=null,e=!0):e=!1),e||nl(t)),null;case 13:return yh(e,t,a);case 4:return Ee(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=en(t,null,l,a):mt(e,t,l,a),t.child;case 11:return uh(e,t,t.type,t.pendingProps,a);case 7:return mt(e,t,t.pendingProps,a),t.child;case 8:return mt(e,t,t.pendingProps.children,a),t.child;case 12:return mt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,il(t,t.type,l.value),mt(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,Fl(t),r=ft(r),l=l(r),t.flags|=1,mt(e,t,l,a),t.child;case 14:return ch(e,t,t.type,t.pendingProps,a);case 15:return dh(e,t,t.type,t.pendingProps,a);case 19:return gh(e,t,a);case 31:return Ey(e,t,a);case 22:return fh(e,t,a,t.pendingProps);case 24:return Fl(t),l=ft(et),e===null?(r=Tu(),r===null&&(r=Ye,c=Cu(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=a),r=c),t.memoizedState={parent:l,cache:r},Au(t),il(t,et,r)):((e.lanes&a)!==0&&(Ru(e,t),ar(t,null,null,a),tr()),r=e.memoizedState,c=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),il(t,et,l)):(l=c.cache,il(t,et,l),l!==r.cache&&Mu(t,[et],a,!0))),mt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Da(e){e.flags|=4}function fc(e,t,a,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if($h())e.flags|=8192;else throw Il=Ns,zu}else e.flags&=-16777217}function Sh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bp(t))if($h())e.flags|=8192;else throw Il=Ns,zu}function Qs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Oi():536870912,e.lanes|=t,ei|=t)}function or(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function zy(e,t,a){var l=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Aa(et),Ae(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qn(t)?Da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Su())),Xe(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(Da(t),c!==null?(Xe(t),Sh(t,c)):(Xe(t),fc(t,r,null,l,a))):c?c!==e.memoizedState?(Da(t),Xe(t),Sh(t,c)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Da(t),Xe(t),fc(t,r,e,l,a)),null;case 27:if(na(t),a=ae.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Da(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Xe(t),null}e=P.current,qn(t)?tm(t):(e=zp(r,l,a),t.stateNode=e,Da(t))}return Xe(t),null;case 5:if(na(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Da(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Xe(t),null}if(c=P.current,qn(t))tm(t);else{var f=to(ae.current);switch(c){case 1:c=f.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=f.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=f.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=f.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=f.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?f.createElement(r,{is:l.is}):f.createElement(r)}}c[qe]=t,c[Ie]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)c.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=c;e:switch(ht(c,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Da(t)}}return Xe(t),fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Da(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=ae.current,qn(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=dt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[qe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||yp(e.nodeValue,a)),e||nl(t,!0)}else e=to(e).createTextNode(l),e[qe]=t,t.stateNode=e}return Xe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=qn(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[qe]=t}else $l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else a=Su(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Xe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=qn(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[qe]=t}else $l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),r=!1}else r=Su(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Qs(t,t.updateQueue),Xe(t),null);case 4:return Ae(),e===null&&Dc(t.stateNode.containerInfo),Xe(t),null;case 10:return Aa(t.type),Xe(t),null;case 19:if(_(We),l=t.memoizedState,l===null)return Xe(t),null;if(r=(t.flags&128)!==0,c=l.rendering,c===null)if(r)or(l,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Es(e),c!==null){for(t.flags|=128,or(l,!1),e=c.updateQueue,t.updateQueue=e,Qs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ff(a,e),a=a.sibling;return Z(We,We.current&1|2),Te&&Ta(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&bt()>Xs&&(t.flags|=128,r=!0,or(l,!1),t.lanes=4194304)}else{if(!r)if(e=Es(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Qs(t,e),or(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!Te)return Xe(t),null}else 2*bt()-l.renderingStartTime>Xs&&a!==536870912&&(t.flags|=128,r=!0,or(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=bt(),e.sibling=null,a=We.current,Z(We,r?a&1|2:a&1),Te&&Ta(t,l.treeForkCount),e):(Xe(t),null);case 22:case 23:return Ht(t),ku(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),a=t.updateQueue,a!==null&&Qs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&_(Wl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Aa(et),Xe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Ay(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(et),Ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return na(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(u(340));$l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));$l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(We),null;case 4:return Ae(),null;case 10:return Aa(t.type),null;case 22:case 23:return Ht(t),ku(),e!==null&&_(Wl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Aa(et),null;case 25:return null;default:return null}}function Nh(e,t){switch(gu(t),t.tag){case 3:Aa(et),Ae();break;case 26:case 27:case 5:na(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:_(We);break;case 10:Aa(t.type);break;case 22:case 23:Ht(t),ku(),e!==null&&_(Wl);break;case 24:Aa(et)}}function ur(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var c=a.create,f=a.inst;l=c(),f.destroy=l}a=a.next}while(a!==r)}}catch(y){Ue(t,t.return,y)}}function dl(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var c=r.next;l=c;do{if((l.tag&e)===e){var f=l.inst,y=f.destroy;if(y!==void 0){f.destroy=void 0,r=t;var S=a,R=y;try{R()}catch(H){Ue(r,S,H)}}}l=l.next}while(l!==c)}}catch(H){Ue(t,t.return,H)}}function wh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hm(t,a)}catch(l){Ue(e,e.return,l)}}}function Mh(e,t,a){a.props=an(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ue(e,t,l)}}function cr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){Ue(e,t,r)}}function xa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){Ue(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ue(e,t,r)}else a.current=null}function Ch(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){Ue(e,e.return,r)}}function mc(e,t,a){try{var l=e.stateNode;Py(l,e.type,a,t),l[Ie]=t}catch(r){Ue(e,e.return,r)}}function Eh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yl(e.type)||e.tag===4}function hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Eh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&yl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ma));else if(l!==4&&(l===27&&yl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(pc(e,t,a),e=e.sibling;e!==null;)pc(e,t,a),e=e.sibling}function qs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&yl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(qs(e,t,a),e=e.sibling;e!==null;)qs(e,t,a),e=e.sibling}function Th(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ht(t,l,a),t[qe]=e,t[Ie]=a}catch(c){Ue(e,e.return,c)}}var ka=!1,lt=!1,vc=!1,zh=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Ry(e,t){if(e=e.containerInfo,Bc=oo,e=qf(e),uu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var f=0,y=-1,S=-1,R=0,H=0,Y=e,D=null;t:for(;;){for(var B;Y!==a||r!==0&&Y.nodeType!==3||(y=f+r),Y!==c||l!==0&&Y.nodeType!==3||(S=f+l),Y.nodeType===3&&(f+=Y.nodeValue.length),(B=Y.firstChild)!==null;)D=Y,Y=B;for(;;){if(Y===e)break t;if(D===a&&++R===r&&(y=f),D===c&&++H===l&&(S=f),(B=Y.nextSibling)!==null)break;Y=D,D=Y.parentNode}Y=B}a=y===-1||S===-1?null:{start:y,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(Hc={focusedElem:e,selectionRange:a},oo=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){switch(t=ot,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,r=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var le=an(a.type,r);e=l.getSnapshotBeforeUpdate(le,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(me){Ue(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)qc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}}function Ah(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ba(e,a),l&4&&ur(5,a);break;case 1:if(Ba(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){Ue(a,a.return,f)}else{var r=an(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Ue(a,a.return,f)}}l&64&&wh(a),l&512&&cr(a,a.return);break;case 3:if(Ba(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hm(e,t)}catch(f){Ue(a,a.return,f)}}break;case 27:t===null&&l&4&&Th(a);case 26:case 5:Ba(e,a),t===null&&l&4&&Ch(a),l&512&&cr(a,a.return);break;case 12:Ba(e,a);break;case 31:Ba(e,a),l&4&&Oh(e,a);break;case 13:Ba(e,a),l&4&&Dh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Qy.bind(null,a),rb(e,a))));break;case 22:if(l=a.memoizedState!==null||ka,!l){t=t!==null&&t.memoizedState!==null||lt,r=ka;var c=lt;ka=l,(lt=t)&&!c?Ha(e,a,(a.subtreeFlags&8772)!==0):Ba(e,a),ka=r,lt=c}break;case 30:break;default:Ba(e,a)}}function Rh(e){var t=e.alternate;t!==null&&(e.alternate=null,Rh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vo(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ve=null,Ct=!1;function Ua(e,t,a){for(a=a.child;a!==null;)_h(e,t,a),a=a.sibling}function _h(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Bl,a)}catch{}switch(a.tag){case 26:lt||xa(a,t),Ua(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:lt||xa(a,t);var l=Ve,r=Ct;yl(a.type)&&(Ve=a.stateNode,Ct=!1),Ua(e,t,a),br(a.stateNode),Ve=l,Ct=r;break;case 5:lt||xa(a,t);case 6:if(l=Ve,r=Ct,Ve=null,Ua(e,t,a),Ve=l,Ct=r,Ve!==null)if(Ct)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(a.stateNode)}catch(c){Ue(a,t,c)}else try{Ve.removeChild(a.stateNode)}catch(c){Ue(a,t,c)}break;case 18:Ve!==null&&(Ct?(e=Ve,wp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),oi(e)):wp(Ve,a.stateNode));break;case 4:l=Ve,r=Ct,Ve=a.stateNode.containerInfo,Ct=!0,Ua(e,t,a),Ve=l,Ct=r;break;case 0:case 11:case 14:case 15:dl(2,a,t),lt||dl(4,a,t),Ua(e,t,a);break;case 1:lt||(xa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Mh(a,t,l)),Ua(e,t,a);break;case 21:Ua(e,t,a);break;case 22:lt=(l=lt)||a.memoizedState!==null,Ua(e,t,a),lt=l;break;default:Ua(e,t,a)}}function Oh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{oi(e)}catch(a){Ue(t,t.return,a)}}}function Dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{oi(e)}catch(a){Ue(t,t.return,a)}}function _y(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zh),t;default:throw Error(u(435,e.tag))}}function Ys(e,t){var a=_y(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var r=qy.bind(null,e,l);l.then(r,r)}})}function Et(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],c=e,f=t,y=f;e:for(;y!==null;){switch(y.tag){case 27:if(yl(y.type)){Ve=y.stateNode,Ct=!1;break e}break;case 5:Ve=y.stateNode,Ct=!1;break e;case 3:case 4:Ve=y.stateNode.containerInfo,Ct=!0;break e}y=y.return}if(Ve===null)throw Error(u(160));_h(c,f,r),Ve=null,Ct=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)kh(t,e),t=t.sibling}var ra=null;function kh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),Tt(e),l&4&&(dl(3,e,e.return),ur(3,e),dl(5,e,e.return));break;case 1:Et(t,e),Tt(e),l&512&&(lt||a===null||xa(a,a.return)),l&64&&ka&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=ra;if(Et(t,e),Tt(e),l&512&&(lt||a===null||xa(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":c=r.getElementsByTagName("title")[0],(!c||c[Bi]||c[qe]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(l),r.head.insertBefore(c,r.querySelector("head > title"))),ht(c,l,a),c[qe]=e,st(c),l=c;break e;case"link":var f=kp("link","href",r).get(l+(a.href||""));if(f){for(var y=0;y<f.length;y++)if(c=f[y],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(y,1);break t}}c=r.createElement(l),ht(c,l,a),r.head.appendChild(c);break;case"meta":if(f=kp("meta","content",r).get(l+(a.content||""))){for(y=0;y<f.length;y++)if(c=f[y],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(y,1);break t}}c=r.createElement(l),ht(c,l,a),r.head.appendChild(c);break;default:throw Error(u(468,l))}c[qe]=e,st(c),l=c}e.stateNode=l}else Up(r,e.type,e.stateNode);else e.stateNode=Dp(r,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?Up(r,e.type,e.stateNode):Dp(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&mc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(t,e),Tt(e),l&512&&(lt||a===null||xa(a,a.return)),a!==null&&l&4&&mc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(t,e),Tt(e),l&512&&(lt||a===null||xa(a,a.return)),e.flags&32){r=e.stateNode;try{Rn(r,"")}catch(le){Ue(e,e.return,le)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,mc(e,r,a!==null?a.memoizedProps:r)),l&1024&&(vc=!0);break;case 6:if(Et(t,e),Tt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(le){Ue(e,e.return,le)}}break;case 3:if(no=null,r=ra,ra=ao(t.containerInfo),Et(t,e),ra=r,Tt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{oi(t.containerInfo)}catch(le){Ue(e,e.return,le)}vc&&(vc=!1,Uh(e));break;case 4:l=ra,ra=ao(e.stateNode.containerInfo),Et(t,e),Tt(e),ra=l;break;case 12:Et(t,e),Tt(e);break;case 31:Et(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 13:Et(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ks=bt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 22:r=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,R=ka,H=lt;if(ka=R||r,lt=H||S,Et(t,e),lt=H,ka=R,Tt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||S||ka||lt||ln(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(c=S.stateNode,r)f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{y=S.stateNode;var Y=S.memoizedProps.style,D=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;y.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(le){Ue(S,S.return,le)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=r?"":S.memoizedProps}catch(le){Ue(S,S.return,le)}}}else if(t.tag===18){if(a===null){S=t;try{var B=S.stateNode;r?Mp(B,!0):Mp(S.stateNode,!1)}catch(le){Ue(S,S.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Ys(e,a))));break;case 19:Et(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 30:break;case 21:break;default:Et(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Eh(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,c=hc(e);qs(e,c,r);break;case 5:var f=a.stateNode;a.flags&32&&(Rn(f,""),a.flags&=-33);var y=hc(e);qs(e,y,f);break;case 3:case 4:var S=a.stateNode.containerInfo,R=hc(e);pc(e,R,S);break;default:throw Error(u(161))}}catch(H){Ue(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Uh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Uh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ba(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ah(e,t.alternate,t),t=t.sibling}function ln(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:dl(4,t,t.return),ln(t);break;case 1:xa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Mh(t,t.return,a),ln(t);break;case 27:br(t.stateNode);case 26:case 5:xa(t,t.return),ln(t);break;case 22:t.memoizedState===null&&ln(t);break;case 30:ln(t);break;default:ln(t)}e=e.sibling}}function Ha(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,c=t,f=c.flags;switch(c.tag){case 0:case 11:case 15:Ha(r,c,a),ur(4,c);break;case 1:if(Ha(r,c,a),l=c,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(R){Ue(l,l.return,R)}if(l=c,r=l.updateQueue,r!==null){var y=l.stateNode;try{var S=r.shared.hiddenCallbacks;if(S!==null)for(r.shared.hiddenCallbacks=null,r=0;r<S.length;r++)mm(S[r],y)}catch(R){Ue(l,l.return,R)}}a&&f&64&&wh(c),cr(c,c.return);break;case 27:Th(c);case 26:case 5:Ha(r,c,a),a&&l===null&&f&4&&Ch(c),cr(c,c.return);break;case 12:Ha(r,c,a);break;case 31:Ha(r,c,a),a&&f&4&&Oh(r,c);break;case 13:Ha(r,c,a),a&&f&4&&Dh(r,c);break;case 22:c.memoizedState===null&&Ha(r,c,a),cr(c,c.return);break;case 30:break;default:Ha(r,c,a)}t=t.sibling}}function xc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Fi(a))}function yc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fi(e))}function sa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Bh(e,t,a,l),t=t.sibling}function Bh(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:sa(e,t,a,l),r&2048&&ur(9,t);break;case 1:sa(e,t,a,l);break;case 3:sa(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fi(e)));break;case 12:if(r&2048){sa(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,f=c.id,y=c.onPostCommit;typeof y=="function"&&y(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ue(t,t.return,S)}}else sa(e,t,a,l);break;case 31:sa(e,t,a,l);break;case 13:sa(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,f=t.alternate,t.memoizedState!==null?c._visibility&2?sa(e,t,a,l):dr(e,t):c._visibility&2?sa(e,t,a,l):(c._visibility|=2,Wn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&xc(f,t);break;case 24:sa(e,t,a,l),r&2048&&yc(t.alternate,t);break;default:sa(e,t,a,l)}}function Wn(e,t,a,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,f=t,y=a,S=l,R=f.flags;switch(f.tag){case 0:case 11:case 15:Wn(c,f,y,S,r),ur(8,f);break;case 23:break;case 22:var H=f.stateNode;f.memoizedState!==null?H._visibility&2?Wn(c,f,y,S,r):dr(c,f):(H._visibility|=2,Wn(c,f,y,S,r)),r&&R&2048&&xc(f.alternate,f);break;case 24:Wn(c,f,y,S,r),r&&R&2048&&yc(f.alternate,f);break;default:Wn(c,f,y,S,r)}t=t.sibling}}function dr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:dr(a,l),r&2048&&xc(l.alternate,l);break;case 24:dr(a,l),r&2048&&yc(l.alternate,l);break;default:dr(a,l)}t=t.sibling}}var fr=8192;function Pn(e,t,a){if(e.subtreeFlags&fr)for(e=e.child;e!==null;)Hh(e,t,a),e=e.sibling}function Hh(e,t,a){switch(e.tag){case 26:Pn(e,t,a),e.flags&fr&&e.memoizedState!==null&&yb(a,ra,e.memoizedState,e.memoizedProps);break;case 5:Pn(e,t,a);break;case 3:case 4:var l=ra;ra=ao(e.stateNode.containerInfo),Pn(e,t,a),ra=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=fr,fr=16777216,Pn(e,t,a),fr=l):Pn(e,t,a));break;default:Pn(e,t,a)}}function Lh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ot=l,qh(l,e)}Lh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qh(e),e=e.sibling}function Qh(e){switch(e.tag){case 0:case 11:case 15:mr(e),e.flags&2048&&dl(9,e,e.return);break;case 3:mr(e);break;case 12:mr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gs(e)):mr(e);break;default:mr(e)}}function Gs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ot=l,qh(l,e)}Lh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:dl(8,t,t.return),Gs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Gs(t));break;default:Gs(t)}e=e.sibling}}function qh(e,t){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:dl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Fi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ot=l;else e:for(a=e;ot!==null;){l=ot;var r=l.sibling,c=l.return;if(Rh(l),l===a){ot=null;break e}if(r!==null){r.return=c,ot=r;break e}ot=c}}}var Oy={getCacheForType:function(e){var t=ft(et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ft(et).controller.signal}},Dy=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Ye=null,Ne=null,Me=0,ke=0,Lt=null,fl=!1,In=!1,bc=!1,La=0,Je=0,ml=0,nn=0,gc=0,Qt=0,ei=0,hr=null,zt=null,jc=!1,Ks=0,Yh=0,Xs=1/0,Vs=null,hl=null,nt=0,pl=null,ti=null,Qa=0,Sc=0,Nc=null,Gh=null,pr=0,wc=null;function qt(){return(Oe&2)!==0&&Me!==0?Me&-Me:U.T!==null?Ac():ki()}function Kh(){if(Qt===0)if((Me&536870912)===0||Te){var e=Ll;Ll<<=1,(Ll&3932160)===0&&(Ll=262144),Qt=e}else Qt=536870912;return e=Bt.current,e!==null&&(e.flags|=32),Qt}function At(e,t,a){(e===Ye&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(ai(e,0),vl(e,Me,Qt,!1)),ne(e,a),((Oe&2)===0||e!==Ye)&&(e===Ye&&((Oe&2)===0&&(nn|=a),Je===4&&vl(e,Me,Qt,!1)),ya(e))}function Xh(e,t,a){if((Oe&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ia(e,t),r=l?By(e,t):Cc(e,t,!0),c=l;do{if(r===0){In&&!l&&vl(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!ky(a)){r=Cc(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var y=e;r=hr;var S=y.current.memoizedState.isDehydrated;if(S&&(ai(y,f).flags|=256),f=Cc(y,f,!1),f!==2){if(bc&&!S){y.errorRecoveryDisabledLanes|=c,nn|=c,r=4;break e}c=zt,zt=r,c!==null&&(zt===null?zt=c:zt.push.apply(zt,c))}r=f}if(c=!1,r!==2)continue}}if(r===1){ai(e,0),vl(e,t,0,!0);break}e:{switch(l=e,c=r,c){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:vl(l,t,Qt,!fl);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=Ks+300-bt(),10<r)){if(vl(l,t,Qt,!fl),ql(l,0,!0)!==0)break e;Qa=t,l.timeoutHandle=Sp(Vh.bind(null,l,a,zt,Vs,jc,t,Qt,nn,ei,fl,c,"Throttled",-0,0),r);break e}Vh(l,a,zt,Vs,jc,t,Qt,nn,ei,fl,c,null,-0,0)}}break}while(!0);ya(e)}function Vh(e,t,a,l,r,c,f,y,S,R,H,Y,D,B){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ma},Hh(t,c,Y);var le=(c&62914560)===c?Ks-bt():(c&4194048)===c?Yh-bt():0;if(le=bb(Y,le),le!==null){Qa=c,e.cancelPendingCommit=le(ep.bind(null,e,t,c,a,l,r,f,y,S,H,Y,null,D,B)),vl(e,c,f,!R);return}}ep(e,t,c,a,l,r,f,y,S)}function ky(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var r=a[l],c=r.getSnapshot;r=r.value;try{if(!kt(c(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vl(e,t,a,l){t&=~gc,t&=~nn,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var c=31-jt(r),f=1<<c;l[c]=-1,r&=~f}a!==0&&Dt(e,a,t)}function Zs(){return(Oe&6)===0?(vr(0),!1):!0}function Mc(){if(Ne!==null){if(ke===0)var e=Ne.return;else e=Ne,za=Jl=null,qu(e),Vn=null,Pi=0,e=Ne;for(;e!==null;)Nh(e.alternate,e),e=e.return;Ne=null}}function ai(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,tb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Qa=0,Mc(),Ye=e,Ne=a=Ea(e.current,null),Me=t,ke=0,Lt=null,fl=!1,In=Ia(e,t),bc=!1,ei=Qt=gc=nn=ml=Je=0,zt=hr=null,jc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-jt(l),c=1<<r;t|=e[r],l&=~c}return La=t,hs(),a}function Zh(e,t){ve=null,U.H=rr,t===Xn||t===Ss?(t=um(),ke=3):t===zu?(t=um(),ke=4):ke=t===lc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,Ne===null&&(Je=1,Us(e,$t(t,e.current)))}function $h(){var e=Bt.current;return e===null?!0:(Me&4194048)===Me?Pt===null:(Me&62914560)===Me||(Me&536870912)!==0?e===Pt:!1}function Jh(){var e=U.H;return U.H=rr,e===null?rr:e}function Fh(){var e=U.A;return U.A=Oy,e}function $s(){Je=4,fl||(Me&4194048)!==Me&&Bt.current!==null||(In=!0),(ml&134217727)===0&&(nn&134217727)===0||Ye===null||vl(Ye,Me,Qt,!1)}function Cc(e,t,a){var l=Oe;Oe|=2;var r=Jh(),c=Fh();(Ye!==e||Me!==t)&&(Vs=null,ai(e,t)),t=!1;var f=Je;e:do try{if(ke!==0&&Ne!==null){var y=Ne,S=Lt;switch(ke){case 8:Mc(),f=6;break e;case 3:case 2:case 9:case 6:Bt.current===null&&(t=!0);var R=ke;if(ke=0,Lt=null,li(e,y,S,R),a&&In){f=0;break e}break;default:R=ke,ke=0,Lt=null,li(e,y,S,R)}}Uy(),f=Je;break}catch(H){Zh(e,H)}while(!0);return t&&e.shellSuspendCounter++,za=Jl=null,Oe=l,U.H=r,U.A=c,Ne===null&&(Ye=null,Me=0,hs()),f}function Uy(){for(;Ne!==null;)Wh(Ne)}function By(e,t){var a=Oe;Oe|=2;var l=Jh(),r=Fh();Ye!==e||Me!==t?(Vs=null,Xs=bt()+500,ai(e,t)):In=Ia(e,t);e:do try{if(ke!==0&&Ne!==null){t=Ne;var c=Lt;t:switch(ke){case 1:ke=0,Lt=null,li(e,t,c,1);break;case 2:case 9:if(sm(c)){ke=0,Lt=null,Ph(t);break}t=function(){ke!==2&&ke!==9||Ye!==e||(ke=7),ya(e)},c.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:sm(c)?(ke=0,Lt=null,Ph(t)):(ke=0,Lt=null,li(e,t,c,7));break;case 5:var f=null;switch(Ne.tag){case 26:f=Ne.memoizedState;case 5:case 27:var y=Ne;if(f?Bp(f):y.stateNode.complete){ke=0,Lt=null;var S=y.sibling;if(S!==null)Ne=S;else{var R=y.return;R!==null?(Ne=R,Js(R)):Ne=null}break t}}ke=0,Lt=null,li(e,t,c,5);break;case 6:ke=0,Lt=null,li(e,t,c,6);break;case 8:Mc(),Je=6;break e;default:throw Error(u(462))}}Hy();break}catch(H){Zh(e,H)}while(!0);return za=Jl=null,U.H=l,U.A=r,Oe=a,Ne!==null?0:(Ye=null,Me=0,hs(),Je)}function Hy(){for(;Ne!==null&&!$r();)Wh(Ne)}function Wh(e){var t=jh(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Js(e):Ne=t}function Ph(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=ph(a,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=ph(a,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:qu(t);default:Nh(a,t),t=Ne=Ff(t,La),t=jh(a,t,La)}e.memoizedProps=e.pendingProps,t===null?Js(e):Ne=t}function li(e,t,a,l){za=Jl=null,qu(t),Vn=null,Pi=0;var r=t.return;try{if(Cy(e,r,t,a,Me)){Je=1,Us(e,$t(a,e.current)),Ne=null;return}}catch(c){if(r!==null)throw Ne=r,c;Je=1,Us(e,$t(a,e.current)),Ne=null;return}t.flags&32768?(Te||l===1?e=!0:In||(Me&536870912)!==0?e=!1:(fl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Bt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ih(t,e)):Js(t)}function Js(e){var t=e;do{if((t.flags&32768)!==0){Ih(t,fl);return}e=t.return;var a=zy(t.alternate,t,La);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Je===0&&(Je=5)}function Ih(e,t){do{var a=Ay(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);Je=6,Ne=null}function ep(e,t,a,l,r,c,f,y,S){e.cancelPendingCommit=null;do Fs();while(nt!==0);if((Oe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(c=t.lanes|t.childLanes,c|=hu,Qe(e,a,c,f,y,S),e===Ye&&(Ne=Ye=null,Me=0),ti=t,pl=e,Qa=a,Sc=c,Nc=r,Gh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yy(jn,function(){return ip(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,r=$.p,$.p=2,f=Oe,Oe|=4;try{Ry(e,t,a)}finally{Oe=f,$.p=r,U.T=l}}nt=1,tp(),ap(),lp()}}function tp(){if(nt===1){nt=0;var e=pl,t=ti,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=$.p;$.p=2;var r=Oe;Oe|=4;try{kh(t,e);var c=Hc,f=qf(e.containerInfo),y=c.focusedElem,S=c.selectionRange;if(f!==y&&y&&y.ownerDocument&&Qf(y.ownerDocument.documentElement,y)){if(S!==null&&uu(y)){var R=S.start,H=S.end;if(H===void 0&&(H=R),"selectionStart"in y)y.selectionStart=R,y.selectionEnd=Math.min(H,y.value.length);else{var Y=y.ownerDocument||document,D=Y&&Y.defaultView||window;if(D.getSelection){var B=D.getSelection(),le=y.textContent.length,me=Math.min(S.start,le),Le=S.end===void 0?me:Math.min(S.end,le);!B.extend&&me>Le&&(f=Le,Le=me,me=f);var C=Lf(y,me),M=Lf(y,Le);if(C&&M&&(B.rangeCount!==1||B.anchorNode!==C.node||B.anchorOffset!==C.offset||B.focusNode!==M.node||B.focusOffset!==M.offset)){var A=Y.createRange();A.setStart(C.node,C.offset),B.removeAllRanges(),me>Le?(B.addRange(A),B.extend(M.node,M.offset)):(A.setEnd(M.node,M.offset),B.addRange(A))}}}}for(Y=[],B=y;B=B.parentNode;)B.nodeType===1&&Y.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<Y.length;y++){var q=Y[y];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}oo=!!Bc,Hc=Bc=null}finally{Oe=r,$.p=l,U.T=a}}e.current=t,nt=2}}function ap(){if(nt===2){nt=0;var e=pl,t=ti,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=$.p;$.p=2;var r=Oe;Oe|=4;try{Ah(e,t.alternate,t)}finally{Oe=r,$.p=l,U.T=a}}nt=3}}function lp(){if(nt===4||nt===3){nt=0,Jr();var e=pl,t=ti,a=Qa,l=Gh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nt=5:(nt=0,ti=pl=null,np(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(hl=null),wn(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Bl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,r=$.p,$.p=2,U.T=null;try{for(var c=e.onRecoverableError,f=0;f<l.length;f++){var y=l[f];c(y.value,{componentStack:y.stack})}}finally{U.T=t,$.p=r}}(Qa&3)!==0&&Fs(),ya(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===wc?pr++:(pr=0,wc=e):pr=0,vr(0)}}function np(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fi(t)))}function Fs(){return tp(),ap(),lp(),ip()}function ip(){if(nt!==5)return!1;var e=pl,t=Sc;Sc=0;var a=wn(Qa),l=U.T,r=$.p;try{$.p=32>a?32:a,U.T=null,a=Nc,Nc=null;var c=pl,f=Qa;if(nt=0,ti=pl=null,Qa=0,(Oe&6)!==0)throw Error(u(331));var y=Oe;if(Oe|=4,Qh(c.current),Bh(c,c.current,f,a),Oe=y,vr(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Bl,c)}catch{}return!0}finally{$.p=r,U.T=l,np(e,t)}}function rp(e,t,a){t=$t(a,t),t=ac(e.stateNode,t,2),e=ol(e,t,2),e!==null&&(ne(e,2),ya(e))}function Ue(e,t,a){if(e.tag===3)rp(e,e,a);else for(;t!==null;){if(t.tag===3){rp(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(hl===null||!hl.has(l))){e=$t(a,e),a=sh(2),l=ol(t,a,2),l!==null&&(oh(a,l,t,e),ne(l,2),ya(l));break}}t=t.return}}function Ec(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Dy;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(bc=!0,r.add(a),e=Ly.bind(null,e,t,a),t.then(e,e))}function Ly(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ye===e&&(Me&a)===a&&(Je===4||Je===3&&(Me&62914560)===Me&&300>bt()-Ks?(Oe&2)===0&&ai(e,0):gc|=a,ei===Me&&(ei=0)),ya(e)}function sp(e,t){t===0&&(t=Oi()),e=Vl(e,t),e!==null&&(ne(e,t),ya(e))}function Qy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),sp(e,a)}function qy(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),sp(e,a)}function Yy(e,t){return Ul(e,t)}var Ws=null,ni=null,Tc=!1,Ps=!1,zc=!1,xl=0;function ya(e){e!==ni&&e.next===null&&(ni===null?Ws=ni=e:ni=ni.next=e),Ps=!0,Tc||(Tc=!0,Ky())}function vr(e,t){if(!zc&&Ps){zc=!0;do for(var a=!1,l=Ws;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var c=0;else{var f=l.suspendedLanes,y=l.pingedLanes;c=(1<<31-jt(42|e)+1)-1,c&=r&~(f&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,dp(l,c))}else c=Me,c=ql(l,l===Ye?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Ia(l,c)||(a=!0,dp(l,c));l=l.next}while(a);zc=!1}}function Gy(){op()}function op(){Ps=Tc=!1;var e=0;xl!==0&&eb()&&(e=xl);for(var t=bt(),a=null,l=Ws;l!==null;){var r=l.next,c=up(l,t);c===0?(l.next=null,a===null?Ws=r:a.next=r,r===null&&(ni=a)):(a=l,(e!==0||(c&3)!==0)&&(Ps=!0)),l=r}nt!==0&&nt!==5||vr(e),xl!==0&&(xl=0)}function up(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var f=31-jt(c),y=1<<f,S=r[f];S===-1?((y&a)===0||(y&l)!==0)&&(r[f]=as(y,t)):S<=t&&(e.expiredLanes|=y),c&=~y}if(t=Ye,a=Me,a=ql(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Pa(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ia(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Pa(l),wn(a)){case 2:case 8:a=Wr;break;case 32:a=jn;break;case 268435456:a=Pr;break;default:a=jn}return l=cp.bind(null,e),a=Ul(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Pa(l),e.callbackPriority=2,e.callbackNode=null,2}function cp(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Fs()&&e.callbackNode!==a)return null;var l=Me;return l=ql(e,e===Ye?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Xh(e,l,t),up(e,bt()),e.callbackNode!=null&&e.callbackNode===a?cp.bind(null,e):null)}function dp(e,t){if(Fs())return null;Xh(e,t,!0)}function Ky(){ab(function(){(Oe&6)!==0?Ul(Fr,Gy):op()})}function Ac(){if(xl===0){var e=Gn;e===0&&(e=Hl,Hl<<=1,(Hl&261888)===0&&(Hl=256)),xl=e}return xl}function fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(""+e)}function mp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Xy(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var c=fp((r[Ie]||null).action),f=l.submitter;f&&(t=(t=f[Ie]||null)?fp(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var y=new cs("action","action",null,l,r);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(xl!==0){var S=f?mp(r,f):new FormData(r);Fu(a,{pending:!0,data:S,method:r.method,action:c},null,S)}}else typeof c=="function"&&(y.preventDefault(),S=f?mp(r,f):new FormData(r),Fu(a,{pending:!0,data:S,method:r.method,action:c},c,S))},currentTarget:r}]})}}for(var Rc=0;Rc<mu.length;Rc++){var _c=mu[Rc],Vy=_c.toLowerCase(),Zy=_c[0].toUpperCase()+_c.slice(1);ia(Vy,"on"+Zy)}ia(Kf,"onAnimationEnd"),ia(Xf,"onAnimationIteration"),ia(Vf,"onAnimationStart"),ia("dblclick","onDoubleClick"),ia("focusin","onFocus"),ia("focusout","onBlur"),ia(uy,"onTransitionRun"),ia(cy,"onTransitionStart"),ia(dy,"onTransitionCancel"),ia(Zf,"onTransitionEnd"),zn("onMouseEnter",["mouseout","mouseover"]),zn("onMouseLeave",["mouseout","mouseover"]),zn("onPointerEnter",["pointerout","pointerover"]),zn("onPointerLeave",["pointerout","pointerover"]),Yl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="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(" "),$y=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xr));function hp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var f=l.length-1;0<=f;f--){var y=l[f],S=y.instance,R=y.currentTarget;if(y=y.listener,S!==c&&r.isPropagationStopped())break e;c=y,r.currentTarget=R;try{c(r)}catch(H){ms(H)}r.currentTarget=null,c=S}else for(f=0;f<l.length;f++){if(y=l[f],S=y.instance,R=y.currentTarget,y=y.listener,S!==c&&r.isPropagationStopped())break e;c=y,r.currentTarget=R;try{c(r)}catch(H){ms(H)}r.currentTarget=null,c=S}}}}function we(e,t){var a=t[Xo];a===void 0&&(a=t[Xo]=new Set);var l=e+"__bubble";a.has(l)||(pp(t,e,2,!1),a.add(l))}function Oc(e,t,a){var l=0;t&&(l|=4),pp(a,e,l,t)}var Is="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[Is]){e[Is]=!0,of.forEach(function(a){a!=="selectionchange"&&($y.has(a)||Oc(a,!1,e),Oc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Is]||(t[Is]=!0,Oc("selectionchange",!1,t))}}function pp(e,t,a,l){switch(Kp(t)){case 2:var r=Sb;break;case 8:r=Nb;break;default:r=Jc}a=r.bind(null,t,a,e),r=void 0,!eu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function kc(e,t,a,l,r){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var y=l.stateNode.containerInfo;if(y===r)break;if(f===4)for(f=l.return;f!==null;){var S=f.tag;if((S===3||S===4)&&f.stateNode.containerInfo===r)return;f=f.return}for(;y!==null;){if(f=Cn(y),f===null)return;if(S=f.tag,S===5||S===6||S===26||S===27){l=c=f;continue e}y=y.parentNode}}l=l.return}gf(function(){var R=c,H=Po(a),Y=[];e:{var D=$f.get(e);if(D!==void 0){var B=cs,le=e;switch(e){case"keypress":if(os(a)===0)break e;case"keydown":case"keyup":B=q0;break;case"focusin":le="focus",B=nu;break;case"focusout":le="blur",B=nu;break;case"beforeblur":case"afterblur":B=nu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=z0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=K0;break;case Kf:case Xf:case Vf:B=_0;break;case Zf:B=V0;break;case"scroll":case"scrollend":B=E0;break;case"wheel":B=$0;break;case"copy":case"cut":case"paste":B=D0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Mf;break;case"toggle":case"beforetoggle":B=F0}var me=(t&4)!==0,Le=!me&&(e==="scroll"||e==="scrollend"),C=me?D!==null?D+"Capture":null:D;me=[];for(var M=R,A;M!==null;){var q=M;if(A=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||A===null||C===null||(q=Li(M,C),q!=null&&me.push(yr(M,q,A))),Le)break;M=M.return}0<me.length&&(D=new B(D,le,null,a,H),Y.push({event:D,listeners:me}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",D&&a!==Wo&&(le=a.relatedTarget||a.fromElement)&&(Cn(le)||le[Mn]))break e;if((B||D)&&(D=H.window===H?H:(D=H.ownerDocument)?D.defaultView||D.parentWindow:window,B?(le=a.relatedTarget||a.toElement,B=R,le=le?Cn(le):null,le!==null&&(Le=h(le),me=le.tag,le!==Le||me!==5&&me!==27&&me!==6)&&(le=null)):(B=null,le=R),B!==le)){if(me=Nf,q="onMouseLeave",C="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(me=Mf,q="onPointerLeave",C="onPointerEnter",M="pointer"),Le=B==null?D:Hi(B),A=le==null?D:Hi(le),D=new me(q,M+"leave",B,a,H),D.target=Le,D.relatedTarget=A,q=null,Cn(H)===R&&(me=new me(C,M+"enter",le,a,H),me.target=A,me.relatedTarget=Le,q=me),Le=q,B&&le)t:{for(me=Jy,C=B,M=le,A=0,q=C;q;q=me(q))A++;q=0;for(var de=M;de;de=me(de))q++;for(;0<A-q;)C=me(C),A--;for(;0<q-A;)M=me(M),q--;for(;A--;){if(C===M||M!==null&&C===M.alternate){me=C;break t}C=me(C),M=me(M)}me=null}else me=null;B!==null&&vp(Y,D,B,me,!1),le!==null&&Le!==null&&vp(Y,Le,le,me,!0)}}e:{if(D=R?Hi(R):window,B=D.nodeName&&D.nodeName.toLowerCase(),B==="select"||B==="input"&&D.type==="file")var Re=Of;else if(Rf(D))if(Df)Re=ry;else{Re=ny;var re=ly}else B=D.nodeName,!B||B.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?R&&Fo(R.elementType)&&(Re=Of):Re=iy;if(Re&&(Re=Re(e,R))){_f(Y,Re,a,H);break e}re&&re(e,D,R),e==="focusout"&&R&&D.type==="number"&&R.memoizedProps.value!=null&&Jo(D,"number",D.value)}switch(re=R?Hi(R):window,e){case"focusin":(Rf(re)||re.contentEditable==="true")&&(kn=re,cu=R,Zi=null);break;case"focusout":Zi=cu=kn=null;break;case"mousedown":du=!0;break;case"contextmenu":case"mouseup":case"dragend":du=!1,Yf(Y,a,H);break;case"selectionchange":if(oy)break;case"keydown":case"keyup":Yf(Y,a,H)}var xe;if(ru)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Dn?zf(e,a)&&(Ce="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(Cf&&a.locale!=="ko"&&(Dn||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Dn&&(xe=jf()):(tl=H,tu="value"in tl?tl.value:tl.textContent,Dn=!0)),re=eo(R,Ce),0<re.length&&(Ce=new wf(Ce,e,null,a,H),Y.push({event:Ce,listeners:re}),xe?Ce.data=xe:(xe=Af(a),xe!==null&&(Ce.data=xe)))),(xe=P0?I0(e,a):ey(e,a))&&(Ce=eo(R,"onBeforeInput"),0<Ce.length&&(re=new wf("onBeforeInput","beforeinput",null,a,H),Y.push({event:re,listeners:Ce}),re.data=xe)),Xy(Y,e,R,a,H)}hp(Y,t)})}function yr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function eo(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=Li(e,a),r!=null&&l.unshift(yr(e,r,c)),r=Li(e,t),r!=null&&l.push(yr(e,r,c))),e.tag===3)return l;e=e.return}return[]}function Jy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vp(e,t,a,l,r){for(var c=t._reactName,f=[];a!==null&&a!==l;){var y=a,S=y.alternate,R=y.stateNode;if(y=y.tag,S!==null&&S===l)break;y!==5&&y!==26&&y!==27||R===null||(S=R,r?(R=Li(a,c),R!=null&&f.unshift(yr(a,R,S))):r||(R=Li(a,c),R!=null&&f.push(yr(a,R,S)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var Fy=/\r\n?/g,Wy=/\u0000|\uFFFD/g;function xp(e){return(typeof e=="string"?e:""+e).replace(Fy,`
|
|
49
|
+
`).replace(Wy,"")}function yp(e,t){return t=xp(t),xp(e)===t}function He(e,t,a,l,r,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Rn(e,""+l);break;case"className":ns(e,"class",l);break;case"tabIndex":ns(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(e,a,l);break;case"style":yf(e,l,c);break;case"data":if(t!=="object"){ns(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&He(e,t,"name",r.name,r,null),He(e,t,"formEncType",r.formEncType,r,null),He(e,t,"formMethod",r.formMethod,r,null),He(e,t,"formTarget",r.formTarget,r,null)):(He(e,t,"encType",r.encType,r,null),He(e,t,"method",r.method,r,null),He(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ma);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=rs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":we("beforetoggle",e),we("toggle",e),ls(e,"popover",l);break;case"xlinkActuate":wa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":wa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":wa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":wa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":wa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":wa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":wa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":wa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":wa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ls(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=M0.get(a)||a,ls(e,a,l))}}function Uc(e,t,a,l,r,c){switch(a){case"style":yf(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&Rn(e,""+l);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!uf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),c=e[Ie]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ls(e,a,l)}}}function ht(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var l=!1,r=!1,c;for(c in a)if(a.hasOwnProperty(c)){var f=a[c];if(f!=null)switch(c){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:He(e,t,c,f,a,null)}}r&&He(e,t,"srcSet",a.srcSet,a,null),l&&He(e,t,"src",a.src,a,null);return;case"input":we("invalid",e);var y=c=f=r=null,S=null,R=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":r=H;break;case"type":f=H;break;case"checked":S=H;break;case"defaultChecked":R=H;break;case"value":c=H;break;case"defaultValue":y=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(u(137,t));break;default:He(e,t,l,H,a,null)}}hf(e,c,y,S,R,f,r,!1);return;case"select":we("invalid",e),l=f=c=null;for(r in a)if(a.hasOwnProperty(r)&&(y=a[r],y!=null))switch(r){case"value":c=y;break;case"defaultValue":f=y;break;case"multiple":l=y;default:He(e,t,r,y,a,null)}t=c,a=f,e.multiple=!!l,t!=null?An(e,!!l,t,!1):a!=null&&An(e,!!l,a,!0);return;case"textarea":we("invalid",e),c=r=l=null;for(f in a)if(a.hasOwnProperty(f)&&(y=a[f],y!=null))switch(f){case"value":l=y;break;case"defaultValue":r=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(u(91));break;default:He(e,t,f,y,a,null)}vf(e,l,r,c);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(l=a[S],l!=null))switch(S){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:He(e,t,S,l,a,null)}return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(l=0;l<xr.length;l++)we(xr[l],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in a)if(a.hasOwnProperty(R)&&(l=a[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:He(e,t,R,l,a,null)}return;default:if(Fo(t)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&Uc(e,t,H,l,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null&&He(e,t,y,l,a,null))}function Py(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,f=null,y=null,S=null,R=null,H=null;for(B in a){var Y=a[B];if(a.hasOwnProperty(B)&&Y!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":S=Y;default:l.hasOwnProperty(B)||He(e,t,B,null,l,Y)}}for(var D in l){var B=l[D];if(Y=a[D],l.hasOwnProperty(D)&&(B!=null||Y!=null))switch(D){case"type":c=B;break;case"name":r=B;break;case"checked":R=B;break;case"defaultChecked":H=B;break;case"value":f=B;break;case"defaultValue":y=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(u(137,t));break;default:B!==Y&&He(e,t,D,B,l,Y)}}$o(e,f,y,S,R,H,c,r);return;case"select":B=f=y=D=null;for(c in a)if(S=a[c],a.hasOwnProperty(c)&&S!=null)switch(c){case"value":break;case"multiple":B=S;default:l.hasOwnProperty(c)||He(e,t,c,null,l,S)}for(r in l)if(c=l[r],S=a[r],l.hasOwnProperty(r)&&(c!=null||S!=null))switch(r){case"value":D=c;break;case"defaultValue":y=c;break;case"multiple":f=c;default:c!==S&&He(e,t,r,c,l,S)}t=y,a=f,l=B,D!=null?An(e,!!a,D,!1):!!l!=!!a&&(t!=null?An(e,!!a,t,!0):An(e,!!a,a?[]:"",!1));return;case"textarea":B=D=null;for(y in a)if(r=a[y],a.hasOwnProperty(y)&&r!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:He(e,t,y,null,l,r)}for(f in l)if(r=l[f],c=a[f],l.hasOwnProperty(f)&&(r!=null||c!=null))switch(f){case"value":D=r;break;case"defaultValue":B=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==c&&He(e,t,f,r,l,c)}pf(e,D,B);return;case"option":for(var le in a)if(D=a[le],a.hasOwnProperty(le)&&D!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:He(e,t,le,null,l,D)}for(S in l)if(D=l[S],B=a[S],l.hasOwnProperty(S)&&D!==B&&(D!=null||B!=null))switch(S){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:He(e,t,S,D,l,B)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in a)D=a[me],a.hasOwnProperty(me)&&D!=null&&!l.hasOwnProperty(me)&&He(e,t,me,null,l,D);for(R in l)if(D=l[R],B=a[R],l.hasOwnProperty(R)&&D!==B&&(D!=null||B!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:He(e,t,R,D,l,B)}return;default:if(Fo(t)){for(var Le in a)D=a[Le],a.hasOwnProperty(Le)&&D!==void 0&&!l.hasOwnProperty(Le)&&Uc(e,t,Le,void 0,l,D);for(H in l)D=l[H],B=a[H],!l.hasOwnProperty(H)||D===B||D===void 0&&B===void 0||Uc(e,t,H,D,l,B);return}}for(var C in a)D=a[C],a.hasOwnProperty(C)&&D!=null&&!l.hasOwnProperty(C)&&He(e,t,C,null,l,D);for(Y in l)D=l[Y],B=a[Y],!l.hasOwnProperty(Y)||D===B||D==null&&B==null||He(e,t,Y,D,l,B)}function bp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var r=a[l],c=r.transferSize,f=r.initiatorType,y=r.duration;if(c&&y&&bp(f)){for(f=0,y=r.responseEnd,l+=1;l<a.length;l++){var S=a[l],R=S.startTime;if(R>y)break;var H=S.transferSize,Y=S.initiatorType;H&&bp(Y)&&(S=S.responseEnd,f+=H*(S<y?1:(y-R)/(S-R)))}if(--l,t+=8*(c+f)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bc=null,Hc=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function gp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Lc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qc=null;function eb(){var e=window.event;return e&&e.type==="popstate"?e===Qc?!1:(Qc=e,!0):(Qc=null,!1)}var Sp=typeof setTimeout=="function"?setTimeout:void 0,tb=typeof clearTimeout=="function"?clearTimeout:void 0,Np=typeof Promise=="function"?Promise:void 0,ab=typeof queueMicrotask=="function"?queueMicrotask:typeof Np<"u"?function(e){return Np.resolve(null).then(e).catch(lb)}:Sp;function lb(e){setTimeout(function(){throw e})}function yl(e){return e==="head"}function wp(e,t){var a=t,l=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(r),oi(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")br(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,br(a);for(var c=a.firstChild;c;){var f=c.nextSibling,y=c.nodeName;c[Bi]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=f}}else a==="body"&&br(e.ownerDocument.body);a=r}while(a);oi(t)}function Mp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qc(a),Vo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function nb(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Bi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function ib(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function Cp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=It(e.nextSibling),e===null))return null;return e}function Yc(e){return e.data==="$?"||e.data==="$~"}function Gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function rb(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function It(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kc=null;function Ep(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return It(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Tp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function zp(e,t,a){switch(t=to(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function br(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vo(e)}var ea=new Map,Ap=new Set;function ao(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qa=$.d;$.d={f:sb,r:ob,D:ub,C:cb,L:db,m:fb,X:hb,S:mb,M:pb};function sb(){var e=qa.f(),t=Zs();return e||t}function ob(e){var t=En(e);t!==null&&t.tag===5&&t.type==="form"?Zm(t):qa.r(e)}var ii=typeof document>"u"?null:document;function Rp(e,t,a){var l=ii;if(l&&typeof t=="string"&&t){var r=Vt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Ap.has(r)||(Ap.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),ht(t,"link",e),st(t),l.head.appendChild(t)))}}function ub(e){qa.D(e),Rp("dns-prefetch",e,null)}function cb(e,t){qa.C(e,t),Rp("preconnect",e,t)}function db(e,t,a){qa.L(e,t,a);var l=ii;if(l&&e&&t){var r='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Vt(a.imageSizes)+'"]')):r+='[href="'+Vt(e)+'"]';var c=r;switch(t){case"style":c=ri(e);break;case"script":c=si(e)}ea.has(c)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ea.set(c,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(gr(c))||t==="script"&&l.querySelector(jr(c))||(t=l.createElement("link"),ht(t,"link",e),st(t),l.head.appendChild(t)))}}function fb(e,t){qa.m(e,t);var a=ii;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Vt(l)+'"][href="'+Vt(e)+'"]',c=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=si(e)}if(!ea.has(c)&&(e=b({rel:"modulepreload",href:e},t),ea.set(c,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(jr(c)))return}l=a.createElement("link"),ht(l,"link",e),st(l),a.head.appendChild(l)}}}function mb(e,t,a){qa.S(e,t,a);var l=ii;if(l&&e){var r=Tn(l).hoistableStyles,c=ri(e);t=t||"default";var f=r.get(c);if(!f){var y={loading:0,preload:null};if(f=l.querySelector(gr(c)))y.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ea.get(c))&&Xc(e,a);var S=f=l.createElement("link");st(S),ht(S,"link",e),S._p=new Promise(function(R,H){S.onload=R,S.onerror=H}),S.addEventListener("load",function(){y.loading|=1}),S.addEventListener("error",function(){y.loading|=2}),y.loading|=4,lo(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:y},r.set(c,f)}}}function hb(e,t){qa.X(e,t);var a=ii;if(a&&e){var l=Tn(a).hoistableScripts,r=si(e),c=l.get(r);c||(c=a.querySelector(jr(r)),c||(e=b({src:e,async:!0},t),(t=ea.get(r))&&Vc(e,t),c=a.createElement("script"),st(c),ht(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(r,c))}}function pb(e,t){qa.M(e,t);var a=ii;if(a&&e){var l=Tn(a).hoistableScripts,r=si(e),c=l.get(r);c||(c=a.querySelector(jr(r)),c||(e=b({src:e,async:!0,type:"module"},t),(t=ea.get(r))&&Vc(e,t),c=a.createElement("script"),st(c),ht(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(r,c))}}function _p(e,t,a,l){var r=(r=ae.current)?ao(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ri(a.href),a=Tn(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ri(a.href);var c=Tn(r).hoistableStyles,f=c.get(e);if(f||(r=r.ownerDocument||r,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=r.querySelector(gr(e)))&&!c._p&&(f.instance=c,f.state.loading=5),ea.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ea.set(e,a),c||vb(r,e,a,f.state))),t&&l===null)throw Error(u(528,""));return f}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=si(a),a=Tn(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function ri(e){return'href="'+Vt(e)+'"'}function gr(e){return'link[rel="stylesheet"]['+e+"]"}function Op(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function vb(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),ht(t,"link",a),st(t),e.head.appendChild(t))}function si(e){return'[src="'+Vt(e)+'"]'}function jr(e){return"script[async]"+e}function Dp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(l)return t.instance=l,st(l),l;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),st(l),ht(l,"style",r),lo(l,a.precedence,e),t.instance=l;case"stylesheet":r=ri(a.href);var c=e.querySelector(gr(r));if(c)return t.state.loading|=4,t.instance=c,st(c),c;l=Op(a),(r=ea.get(r))&&Xc(l,r),c=(e.ownerDocument||e).createElement("link"),st(c);var f=c;return f._p=new Promise(function(y,S){f.onload=y,f.onerror=S}),ht(c,"link",l),t.state.loading|=4,lo(c,a.precedence,e),t.instance=c;case"script":return c=si(a.src),(r=e.querySelector(jr(c)))?(t.instance=r,st(r),r):(l=a,(r=ea.get(c))&&(l=b({},a),Vc(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),st(r),ht(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,lo(l,a.precedence,e));return t.instance}function lo(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,c=r,f=0;f<l.length;f++){var y=l[f];if(y.dataset.precedence===t)c=y;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var no=null;function kp(e,t,a){if(no===null){var l=new Map,r=no=new Map;r.set(a,l)}else r=no,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var c=a[r];if(!(c[Bi]||c[qe]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var f=c.getAttribute(t)||"";f=e+f;var y=l.get(f);y?y.push(c):l.set(f,[c])}}return l}function Up(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function xb(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Bp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yb(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=ri(l.href),c=t.querySelector(gr(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=io.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,st(c);return}c=t.ownerDocument||t,l=Op(l),(r=ea.get(r))&&Xc(l,r),c=c.createElement("link"),st(c);var f=c;f._p=new Promise(function(y,S){f.onload=y,f.onerror=S}),ht(c,"link",l),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=io.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Zc=0;function bb(e,t){return e.stylesheets&&e.count===0&&so(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&so(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Zc===0&&(Zc=62500*Iy());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&so(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Zc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)so(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ro=null;function so(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ro=new Map,t.forEach(gb,e),ro=null,io.call(e))}function gb(e,t){if(!(t.state.loading&4)){var a=ro.get(e);if(a)var l=a.get(null);else{a=new Map,ro.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var f=r[c];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}r=t.instance,f=r.getAttribute("data-precedence"),c=a.get(f)||l,c===l&&a.set(null,r),a.set(f,r),this.count++,l=io.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Sr={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function jb(e,t,a,l,r,c,f,y,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sn(0),this.hiddenUpdates=Sn(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Hp(e,t,a,l,r,c,f,y,S,R,H,Y){return e=new jb(e,t,a,f,S,R,H,Y,y),t=1,c===!0&&(t|=24),c=Ut(3,null,null,t),e.current=c,c.stateNode=e,t=Cu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},Au(c),e}function Lp(e){return e?(e=Hn,e):Hn}function Qp(e,t,a,l,r,c){r=Lp(r),l.context===null?l.context=r:l.pendingContext=r,l=sl(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=ol(e,l,t),a!==null&&(At(a,e,t),er(a,e,t))}function qp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function $c(e,t){qp(e,t),(e=e.alternate)&&qp(e,t)}function Yp(e){if(e.tag===13||e.tag===31){var t=Vl(e,67108864);t!==null&&At(t,e,67108864),$c(e,67108864)}}function Gp(e){if(e.tag===13||e.tag===31){var t=qt();t=Nn(t);var a=Vl(e,t);a!==null&&At(a,e,t),$c(e,t)}}var oo=!0;function Sb(e,t,a,l){var r=U.T;U.T=null;var c=$.p;try{$.p=2,Jc(e,t,a,l)}finally{$.p=c,U.T=r}}function Nb(e,t,a,l){var r=U.T;U.T=null;var c=$.p;try{$.p=8,Jc(e,t,a,l)}finally{$.p=c,U.T=r}}function Jc(e,t,a,l){if(oo){var r=Fc(l);if(r===null)kc(e,t,l,uo,a),Xp(e,l);else if(Mb(r,e,t,a,l))l.stopPropagation();else if(Xp(e,l),t&4&&-1<wb.indexOf(e)){for(;r!==null;){var c=En(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var f=ha(c.pendingLanes);if(f!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;f;){var S=1<<31-jt(f);y.entanglements[1]|=S,f&=~S}ya(c),(Oe&6)===0&&(Xs=bt()+500,vr(0))}}break;case 31:case 13:y=Vl(c,2),y!==null&&At(y,c,2),Zs(),$c(c,2)}if(c=Fc(l),c===null&&kc(e,t,l,uo,a),c===r)break;r=c}r!==null&&l.stopPropagation()}else kc(e,t,l,null,a)}}function Fc(e){return e=Po(e),Wc(e)}var uo=null;function Wc(e){if(uo=null,e=Cn(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=x(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uo=e,null}function Kp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qo()){case Fr:return 2;case Wr:return 8;case jn:case Yo:return 32;case Pr:return 268435456;default:return 32}default:return 32}}var Pc=!1,bl=null,gl=null,jl=null,Nr=new Map,wr=new Map,Sl=[],wb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Xp(e,t){switch(e){case"focusin":case"focusout":bl=null;break;case"dragenter":case"dragleave":gl=null;break;case"mouseover":case"mouseout":jl=null;break;case"pointerover":case"pointerout":Nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wr.delete(t.pointerId)}}function Mr(e,t,a,l,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[r]},t!==null&&(t=En(t),t!==null&&Yp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Mb(e,t,a,l,r){switch(t){case"focusin":return bl=Mr(bl,e,t,a,l,r),!0;case"dragenter":return gl=Mr(gl,e,t,a,l,r),!0;case"mouseover":return jl=Mr(jl,e,t,a,l,r),!0;case"pointerover":var c=r.pointerId;return Nr.set(c,Mr(Nr.get(c)||null,e,t,a,l,r)),!0;case"gotpointercapture":return c=r.pointerId,wr.set(c,Mr(wr.get(c)||null,e,t,a,l,r)),!0}return!1}function Vp(e){var t=Cn(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Ui(e.priority,function(){Gp(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,Ui(e.priority,function(){Gp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function co(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Fc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Wo=l,a.target.dispatchEvent(l),Wo=null}else return t=En(a),t!==null&&Yp(t),e.blockedOn=a,!1;t.shift()}return!0}function Zp(e,t,a){co(e)&&a.delete(t)}function Cb(){Pc=!1,bl!==null&&co(bl)&&(bl=null),gl!==null&&co(gl)&&(gl=null),jl!==null&&co(jl)&&(jl=null),Nr.forEach(Zp),wr.forEach(Zp)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,Pc||(Pc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Cb)))}var mo=null;function $p(e){mo!==e&&(mo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){mo===e&&(mo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(Wc(l||a)===null)continue;break}var c=En(a);c!==null&&(e.splice(t,3),t-=3,Fu(c,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function oi(e){function t(S){return fo(S,e)}bl!==null&&fo(bl,e),gl!==null&&fo(gl,e),jl!==null&&fo(jl,e),Nr.forEach(t),wr.forEach(t);for(var a=0;a<Sl.length;a++){var l=Sl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Sl.length&&(a=Sl[0],a.blockedOn===null);)Vp(a),a.blockedOn===null&&Sl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],c=a[l+1],f=r[Ie]||null;if(typeof c=="function")f||$p(a);else if(f){var y=null;if(c&&c.hasAttribute("formAction")){if(r=c,f=c[Ie]||null)y=f.formAction;else if(Wc(r)!==null)continue}else y=f.action;typeof y=="function"?a[l+1]=y:(a.splice(l,3),l-=3),$p(a)}}}function Jp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(f){return r=f})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Ic(e){this._internalRoot=e}ho.prototype.render=Ic.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=qt();Qp(a,l,e,t,null,null)},ho.prototype.unmount=Ic.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qp(e.current,2,null,e,null,null),Zs(),t[Mn]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var t=ki();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Sl.length&&t!==0&&t<Sl[a].priority;a++);Sl.splice(a,0,e),a===0&&Vp(e)}};var Fp=i.version;if(Fp!=="19.2.7")throw Error(u(527,Fp,"19.2.7"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=v(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Eb={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{Bl=po.inject(Eb),gt=po}catch{}}return Er.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,l="",r=lh,c=nh,f=ih;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Hp(e,1,!1,null,null,a,l,null,r,c,f,Jp),e[Mn]=t.current,Dc(e),new Ic(t)},Er.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var l=!1,r="",c=lh,f=nh,y=ih,S=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=Hp(e,1,!0,t,a??null,l,r,S,c,f,y,Jp),t.context=Lp(null),a=t.current,l=qt(),l=Nn(l),r=sl(l),r.callback=null,ol(a,r,l),a=l,t.current.lanes=a,ne(t,a),ya(t),e[Mn]=t.current,Dc(e),new ho(t)},Er.version="19.2.7",Er}var sv;function Lb(){if(sv)return nd.exports;sv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),nd.exports=Hb(),nd.exports}var Qb=Lb();/**
|
|
50
|
+
* react-router v7.17.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var ov="popstate";function uv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function qb(n={}){function i(u,d){var v;let h=(v=d.state)==null?void 0:v.masked,{pathname:m,search:x,hash:p}=h||u.location;return bd("",{pathname:m,search:x,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default",h?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:Dr(d)}return Gb(i,s,null,n)}function Ze(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Sa(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Yb(){return Math.random().toString(36).substring(2,10)}function cv(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function bd(n,i,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?Ti(i):i,state:s,key:i&&i.key||u||Yb(),mask:d}}function Dr({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Ti(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(i.search=n.substring(u),n=n.substring(0,u)),n&&(i.pathname=n)}return i}function Gb(n,i,s,u={}){let{window:d=document.defaultView,v5Compat:h=!1}=u,m=d.history,x="POP",p=null,v=g();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function g(){return(m.state||{idx:null}).idx}function b(){x="POP";let L=g(),k=L==null?null:L-v;v=L,p&&p({action:x,location:O.location,delta:k})}function E(L,k){x="PUSH";let K=uv(L)?L:bd(O.location,L,k);v=g()+1;let Q=cv(K,v),X=O.createHref(K.mask||K);try{m.pushState(Q,"",X)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;d.location.assign(X)}h&&p&&p({action:x,location:O.location,delta:1})}function T(L,k){x="REPLACE";let K=uv(L)?L:bd(O.location,L,k);v=g();let Q=cv(K,v),X=O.createHref(K.mask||K);m.replaceState(Q,"",X),h&&p&&p({action:x,location:O.location,delta:0})}function z(L){return Kb(d,L)}let O={get action(){return x},get location(){return n(d,m)},listen(L){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(ov,b),p=L,()=>{d.removeEventListener(ov,b),p=null}},createHref(L){return i(d,L)},createURL:z,encodeLocation(L){let k=z(L);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:E,replace:T,go(L){return m.go(L)}};return O}function Kb(n,i,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),Ze(u,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:Dr(i);return d=d.replace(/ $/,"%20"),!s&&d.startsWith("//")&&(d=u+d),new URL(d,u)}function tx(n,i,s="/"){return Xb(n,i,s,!1)}function Xb(n,i,s,u,d){let h=typeof i=="string"?Ti(i):i,m=$a(h.pathname||"/",s);if(m==null)return null;let x=Vb(n),p=null,v=ng(m);for(let g=0;p==null&&g<x.length;++g)p=ag(x[g],v,u);return p}function Vb(n){let i=ax(n);return Zb(i),i}function ax(n,i=[],s=[],u="",d=!1){let h=(m,x,p=d,v)=>{let g={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(u)&&p)return;Ze(g.relativePath.startsWith(u),`Absolute route path "${g.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(u.length)}let b=ua([u,g.relativePath]),E=s.concat(g);m.children&&m.children.length>0&&(Ze(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),ax(m.children,i,E,b,p)),!(m.path==null&&!m.index)&&i.push({path:b,score:eg(b,m.index),routesMeta:E})};return n.forEach((m,x)=>{var p;if(m.path===""||!((p=m.path)!=null&&p.includes("?")))h(m,x);else for(let v of lx(m.path))h(m,x,!0,v)}),i}function lx(n){let i=n.split("/");if(i.length===0)return[];let[s,...u]=i,d=s.endsWith("?"),h=s.replace(/\?$/,"");if(u.length===0)return d?[h,""]:[h];let m=lx(u.join("/")),x=[];return x.push(...m.map(p=>p===""?h:[h,p].join("/"))),d&&x.push(...m),x.map(p=>n.startsWith("/")&&p===""?"/":p)}function Zb(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:tg(i.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var $b=/^:[\w-]+$/,Jb=3,Fb=2,Wb=1,Pb=10,Ib=-2,dv=n=>n==="*";function eg(n,i){let s=n.split("/"),u=s.length;return s.some(dv)&&(u+=Ib),i&&(u+=Fb),s.filter(d=>!dv(d)).reduce((d,h)=>d+($b.test(h)?Jb:h===""?Wb:Pb),u)}function tg(n,i){return n.length===i.length&&n.slice(0,-1).every((u,d)=>u===i[d])?n[n.length-1]-i[i.length-1]:0}function ag(n,i,s=!1){let{routesMeta:u}=n,d={},h="/",m=[];for(let x=0;x<u.length;++x){let p=u[x],v=x===u.length-1,g=h==="/"?i:i.slice(h.length)||"/",b=Co({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},g),E=p.route;if(!b&&v&&s&&!u[u.length-1].route.index&&(b=Co({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!b)return null;Object.assign(d,b.params),m.push({params:d,pathname:ua([h,b.pathname]),pathnameBase:og(ua([h,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(h=ua([h,b.pathnameBase]))}return m}function Co(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=lg(n.path,n.caseSensitive,n.end),d=i.match(s);if(!d)return null;let h=d[0],m=h.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:u.reduce((v,{paramName:g,isOptional:b},E)=>{if(g==="*"){let z=x[E]||"";m=h.slice(0,h.length-z.length).replace(/(.)\/+$/,"$1")}const T=x[E];return b&&!T?v[g]=void 0:v[g]=(T||"").replace(/%2F/g,"/"),v},{}),pathname:h,pathnameBase:m,pattern:n}}function lg(n,i=!1,s=!0){Sa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,x,p,v,g)=>{if(u.push({paramName:x,isOptional:p!=null}),p){let b=g.charAt(v+m.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),u]}function ng(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Sa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function $a(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}var ig=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rg(n,i="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?Ti(n):n,h;return s?(s=ix(s),s.startsWith("/")?h=fv(s.substring(1),"/"):h=fv(s,i)):h=i,{pathname:h,search:ug(u),hash:cg(d)}}function fv(n,i){let s=Eo(i).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function od(n,i,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sg(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function nx(n){let i=sg(n);return i.map((s,u)=>u===i.length-1?s.pathname:s.pathnameBase)}function Gd(n,i,s,u=!1){let d;typeof n=="string"?d=Ti(n):(d={...n},Ze(!d.pathname||!d.pathname.includes("?"),od("?","pathname","search",d)),Ze(!d.pathname||!d.pathname.includes("#"),od("#","pathname","hash",d)),Ze(!d.search||!d.search.includes("#"),od("#","search","hash",d)));let h=n===""||d.pathname==="",m=h?"/":d.pathname,x;if(m==null)x=s;else{let b=i.length-1;if(!u&&m.startsWith("..")){let E=m.split("/");for(;E[0]==="..";)E.shift(),b-=1;d.pathname=E.join("/")}x=b>=0?i[b]:"/"}let p=rg(d,x),v=m&&m!=="/"&&m.endsWith("/"),g=(h||m===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(v||g)&&(p.pathname+="/"),p}var ix=n=>n.replace(/\/\/+/g,"/"),ua=n=>ix(n.join("/")),Eo=n=>n.replace(/\/+$/,""),og=n=>Eo(n).replace(/^\/*/,"/"),ug=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,cg=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,dg=class{constructor(n,i,s,u=!1){this.status=n,this.statusText=i||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function fg(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function mg(n){let i=n.map(s=>s.route.path).filter(Boolean);return ua(i)||"/"}var rx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sx(n,i){let s=n;if(typeof s!="string"||!ig.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(rx)try{let h=new URL(window.location.href),m=s.startsWith("//")?new URL(h.protocol+s):new URL(s),x=$a(m.pathname,i);m.origin===h.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{Sa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ox=["POST","PUT","PATCH","DELETE"];new Set(ox);var hg=["GET",...ox];new Set(hg);var zi=j.createContext(null);zi.displayName="DataRouter";var _o=j.createContext(null);_o.displayName="DataRouterState";var ux=j.createContext(!1);function pg(){return j.useContext(ux)}var cx=j.createContext({isTransitioning:!1});cx.displayName="ViewTransition";var vg=j.createContext(new Map);vg.displayName="Fetchers";var xg=j.createContext(null);xg.displayName="Await";var la=j.createContext(null);la.displayName="Navigation";var Kr=j.createContext(null);Kr.displayName="Location";var Ja=j.createContext({outlet:null,matches:[],isDataRoute:!1});Ja.displayName="Route";var Kd=j.createContext(null);Kd.displayName="RouteError";var dx="REACT_ROUTER_ERROR",yg="REDIRECT",bg="ROUTE_ERROR_RESPONSE";function gg(n){if(n.startsWith(`${dx}:${yg}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function jg(n){if(n.startsWith(`${dx}:${bg}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new dg(i.status,i.statusText,i.data)}catch{}}function Sg(n,{relative:i}={}){Ze(Xr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=j.useContext(la),{hash:d,pathname:h,search:m}=Vr(n,{relative:i}),x=h;return s!=="/"&&(x=h==="/"?s:ua([s,h])),u.createHref({pathname:x,search:m,hash:d})}function Xr(){return j.useContext(Kr)!=null}function Fa(){return Ze(Xr(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(Kr).location}var fx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mx(n){j.useContext(la).static||j.useLayoutEffect(n)}function Ng(){let{isDataRoute:n}=j.useContext(Ja);return n?Ug():wg()}function wg(){Ze(Xr(),"useNavigate() may be used only in the context of a <Router> component.");let n=j.useContext(zi),{basename:i,navigator:s}=j.useContext(la),{matches:u}=j.useContext(Ja),{pathname:d}=Fa(),h=JSON.stringify(nx(u)),m=j.useRef(!1);return mx(()=>{m.current=!0}),j.useCallback((p,v={})=>{if(Sa(m.current,fx),!m.current)return;if(typeof p=="number"){s.go(p);return}let g=Gd(p,JSON.parse(h),d,v.relative==="path");n==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:ua([i,g.pathname])),(v.replace?s.replace:s.push)(g,v.state,v)},[i,s,h,d,n])}j.createContext(null);function Vr(n,{relative:i}={}){let{matches:s}=j.useContext(Ja),{pathname:u}=Fa(),d=JSON.stringify(nx(s));return j.useMemo(()=>Gd(n,JSON.parse(d),u,i==="path"),[n,d,u,i])}function Mg(n,i){return hx(n,i)}function hx(n,i,s){var L;Ze(Xr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=j.useContext(la),{matches:d}=j.useContext(Ja),h=d[d.length-1],m=h?h.params:{},x=h?h.pathname:"/",p=h?h.pathnameBase:"/",v=h&&h.route;{let k=v&&v.path||"";vx(x,!v||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=Fa(),b;if(i){let k=typeof i=="string"?Ti(i):i;Ze(p==="/"||((L=k.pathname)==null?void 0:L.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${k.pathname}" was given in the \`location\` prop.`),b=k}else b=g;let E=b.pathname||"/",T=E;if(p!=="/"){let k=p.replace(/^\//,"").split("/");T="/"+E.replace(/^\//,"").split("/").slice(k.length).join("/")}let z=s&&s.state.matches.length?s.state.matches.map(k=>Object.assign(k,{route:s.manifest[k.route.id]||k.route})):tx(n,{pathname:T});Sa(v||z!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Sa(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let O=Ag(z&&z.map(k=>Object.assign({},k,{params:Object.assign({},m,k.params),pathname:ua([p,u.encodeLocation?u.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?p:ua([p,u.encodeLocation?u.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),d,s);return i&&O?j.createElement(Kr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...b},navigationType:"POP"}},O):O}function Cg(){let n=kg(),i=fg(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},h={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:h},"ErrorBoundary")," or"," ",j.createElement("code",{style:h},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},i),s?j.createElement("pre",{style:d},s):null,m)}var Eg=j.createElement(Cg,null),px=class extends j.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=jg(n.digest);s&&(n=s)}let i=n!==void 0?j.createElement(Ja.Provider,{value:this.props.routeContext},j.createElement(Kd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?j.createElement(Tg,{error:n},i):i}};px.contextType=ux;var ud=new WeakMap;function Tg({children:n,error:i}){let{basename:s}=j.useContext(la);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let u=gg(i.digest);if(u){let d=ud.get(i);if(d)throw d;let h=sx(u.location,s);if(rx&&!ud.get(i))if(h.isExternal||u.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:u.replace}));throw ud.set(i,m),m}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return n}function zg({routeContext:n,match:i,children:s}){let u=j.useContext(zi);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),j.createElement(Ja.Provider,{value:n},s)}function Ag(n,i=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(i.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let d=n,h=u==null?void 0:u.errors;if(h!=null){let g=d.findIndex(b=>b.route.id&&(h==null?void 0:h[b.route.id])!==void 0);Ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,g+1))}let m=!1,x=-1;if(s&&u){m=u.renderFallback;for(let g=0;g<d.length;g++){let b=d[g];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(x=g),b.route.id){let{loaderData:E,errors:T}=u,z=b.route.loader&&!E.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||z){s.isStatic&&(m=!0),x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}}let p=s==null?void 0:s.onError,v=u&&p?(g,b)=>{var E,T;p(g,{location:u.location,params:((T=(E=u.matches)==null?void 0:E[0])==null?void 0:T.params)??{},pattern:mg(u.matches),errorInfo:b})}:void 0;return d.reduceRight((g,b,E)=>{let T,z=!1,O=null,L=null;u&&(T=h&&b.route.id?h[b.route.id]:void 0,O=b.route.errorElement||Eg,m&&(x<0&&E===0?(vx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,L=null):x===E&&(z=!0,L=b.route.hydrateFallbackElement||null)));let k=i.concat(d.slice(0,E+1)),K=()=>{let Q;return T?Q=O:z?Q=L:b.route.Component?Q=j.createElement(b.route.Component,null):b.route.element?Q=b.route.element:Q=g,j.createElement(zg,{match:b,routeContext:{outlet:g,matches:k,isDataRoute:u!=null},children:Q})};return u&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?j.createElement(px,{location:u.location,revalidation:u.revalidation,component:O,error:T,children:K(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:v}):K()},null)}function Xd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rg(n){let i=j.useContext(zi);return Ze(i,Xd(n)),i}function _g(n){let i=j.useContext(_o);return Ze(i,Xd(n)),i}function Og(n){let i=j.useContext(Ja);return Ze(i,Xd(n)),i}function Vd(n){let i=Og(n),s=i.matches[i.matches.length-1];return Ze(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function Dg(){return Vd("useRouteId")}function kg(){var u;let n=j.useContext(Kd),i=_g("useRouteError"),s=Vd("useRouteError");return n!==void 0?n:(u=i.errors)==null?void 0:u[s]}function Ug(){let{router:n}=Rg("useNavigate"),i=Vd("useNavigate"),s=j.useRef(!1);return mx(()=>{s.current=!0}),j.useCallback(async(d,h={})=>{Sa(s.current,fx),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...h}))},[n,i])}var mv={};function vx(n,i,s){!i&&!mv[n]&&(mv[n]=!0,Sa(!1,s))}j.memo(Bg);function Bg({routes:n,manifest:i,future:s,state:u,isStatic:d,onError:h}){return hx(n,void 0,{manifest:i,state:u,isStatic:d,onError:h})}function fi(n){Ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hg({basename:n="/",children:i=null,location:s,navigationType:u="POP",navigator:d,static:h=!1,useTransitions:m}){Ze(!Xr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),p=j.useMemo(()=>({basename:x,navigator:d,static:h,useTransitions:m,future:{}}),[x,d,h,m]);typeof s=="string"&&(s=Ti(s));let{pathname:v="/",search:g="",hash:b="",state:E=null,key:T="default",mask:z}=s,O=j.useMemo(()=>{let L=$a(v,x);return L==null?null:{location:{pathname:L,search:g,hash:b,state:E,key:T,mask:z},navigationType:u}},[x,v,g,b,E,T,u,z]);return Sa(O!=null,`<Router basename="${x}"> is not able to match the URL "${v}${g}${b}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:j.createElement(la.Provider,{value:p},j.createElement(Kr.Provider,{children:i,value:O}))}function Lg({children:n,location:i}){return Mg(gd(n),i)}function gd(n,i=[]){let s=[];return j.Children.forEach(n,(u,d)=>{if(!j.isValidElement(u))return;let h=[...i,d];if(u.type===j.Fragment){s.push.apply(s,gd(u.props.children,h));return}Ze(u.type===fi,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ze(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||h.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=gd(u.props.children,h)),s.push(m)}),s}var So="get",No="application/x-www-form-urlencoded";function Oo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Qg(n){return Oo(n)&&n.tagName.toLowerCase()==="button"}function qg(n){return Oo(n)&&n.tagName.toLowerCase()==="form"}function Yg(n){return Oo(n)&&n.tagName.toLowerCase()==="input"}function Gg(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Kg(n,i){return n.button===0&&(!i||i==="_self")&&!Gg(n)}var xo=null;function Xg(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var Vg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cd(n){return n!=null&&!Vg.has(n)?(Sa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${No}"`),null):n}function Zg(n,i){let s,u,d,h,m;if(qg(n)){let x=n.getAttribute("action");u=x?$a(x,i):null,s=n.getAttribute("method")||So,d=cd(n.getAttribute("enctype"))||No,h=new FormData(n)}else if(Qg(n)||Yg(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||x.getAttribute("action");if(u=p?$a(p,i):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||So,d=cd(n.getAttribute("formenctype"))||cd(x.getAttribute("enctype"))||No,h=new FormData(x,n),!Xg()){let{name:v,type:g,value:b}=n;if(g==="image"){let E=v?`${v}.`:"";h.append(`${E}x`,"0"),h.append(`${E}y`,"0")}else v&&h.append(v,b)}}else{if(Oo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=So,u=null,d=No,m=n}return h&&d==="text/plain"&&(m=h,h=void 0),{action:u,method:s.toLowerCase(),encType:d,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function xx(n,i,s,u){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:i&&$a(d.pathname,i)==="/"?d.pathname=`${Eo(i)}/_root.${u}`:d.pathname=`${Eo(d.pathname)}.${u}`,d}async function $g(n,i){if(n.id in i)return i[n.id];try{let s=await import(n.module);return i[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Jg(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Fg(n,i,s){let u=await Promise.all(n.map(async d=>{let h=i.routes[d.route.id];if(h){let m=await $g(h,s);return m.links?m.links():[]}return[]}));return e1(u.flat(1).filter(Jg).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function hv(n,i,s,u,d,h){let m=(p,v)=>s[v]?p.route.id!==s[v].route.id:!0,x=(p,v)=>{var g;return s[v].pathname!==p.pathname||((g=s[v].route.path)==null?void 0:g.endsWith("*"))&&s[v].params["*"]!==p.params["*"]};return h==="assets"?i.filter((p,v)=>m(p,v)||x(p,v)):h==="data"?i.filter((p,v)=>{var b;let g=u.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(m(p,v)||x(p,v))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((b=s[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function Wg(n,i,{includeHydrateFallback:s}={}){return Pg(n.map(u=>{let d=i.routes[u.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),s&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function Pg(n){return[...new Set(n)]}function Ig(n){let i={},s=Object.keys(n).sort();for(let u of s)i[u]=n[u];return i}function e1(n,i){let s=new Set;return new Set(i),n.reduce((u,d)=>{let h=JSON.stringify(Ig(d));return s.has(h)||(s.add(h),u.push({key:h,link:d})),u},[])}function $d(){let n=j.useContext(zi);return Zd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function t1(){let n=j.useContext(_o);return Zd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Jd=j.createContext(void 0);Jd.displayName="FrameworkContext";function Fd(){let n=j.useContext(Jd);return Zd(n,"You must render this element inside a <HydratedRouter> element"),n}function a1(n,i){let s=j.useContext(Jd),[u,d]=j.useState(!1),[h,m]=j.useState(!1),{onFocus:x,onBlur:p,onMouseEnter:v,onMouseLeave:g,onTouchStart:b}=i,E=j.useRef(null);j.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let O=k=>{k.forEach(K=>{m(K.isIntersecting)})},L=new IntersectionObserver(O,{threshold:.5});return E.current&&L.observe(E.current),()=>{L.disconnect()}}},[n]),j.useEffect(()=>{if(u){let O=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(O)}}},[u]);let T=()=>{d(!0)},z=()=>{d(!1),m(!1)};return s?n!=="intent"?[h,E,{}]:[h,E,{onFocus:Tr(x,T),onBlur:Tr(p,z),onMouseEnter:Tr(v,T),onMouseLeave:Tr(g,z),onTouchStart:Tr(b,T)}]:[!1,E,{}]}function Tr(n,i){return s=>{n&&n(s),s.defaultPrevented||i(s)}}function l1({page:n,...i}){let s=pg(),{router:u}=$d(),d=j.useMemo(()=>tx(u.routes,n,u.basename),[u.routes,n,u.basename]);return d?s?j.createElement(i1,{page:n,matches:d,...i}):j.createElement(r1,{page:n,matches:d,...i}):null}function n1(n){let{manifest:i,routeModules:s}=Fd(),[u,d]=j.useState([]);return j.useEffect(()=>{let h=!1;return Fg(n,i,s).then(m=>{h||d(m)}),()=>{h=!0}},[n,i,s]),u}function i1({page:n,matches:i,...s}){let u=Fa(),{future:d}=Fd(),{basename:h}=$d(),m=j.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let x=xx(n,h,d.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,v=[];for(let g of i)typeof g.route.shouldRevalidate=="function"?p=!0:v.push(g.route.id);return p&&v.length>0&&x.searchParams.set("_routes",v.join(",")),[x.pathname+x.search]},[h,d.v8_trailingSlashAwareDataRequests,n,u,i]);return j.createElement(j.Fragment,null,m.map(x=>j.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...s})))}function r1({page:n,matches:i,...s}){let u=Fa(),{future:d,manifest:h,routeModules:m}=Fd(),{basename:x}=$d(),{loaderData:p,matches:v}=t1(),g=j.useMemo(()=>hv(n,i,v,h,u,"data"),[n,i,v,h,u]),b=j.useMemo(()=>hv(n,i,v,h,u,"assets"),[n,i,v,h,u]),E=j.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let O=new Set,L=!1;if(i.forEach(K=>{var X;let Q=h.routes[K.route.id];!Q||!Q.hasLoader||(!g.some(F=>F.route.id===K.route.id)&&K.route.id in p&&((X=m[K.route.id])!=null&&X.shouldRevalidate)||Q.hasClientLoader?L=!0:O.add(K.route.id))}),O.size===0)return[];let k=xx(n,x,d.v8_trailingSlashAwareDataRequests,"data");return L&&O.size>0&&k.searchParams.set("_routes",i.filter(K=>O.has(K.route.id)).map(K=>K.route.id).join(",")),[k.pathname+k.search]},[x,d.v8_trailingSlashAwareDataRequests,p,u,h,g,i,n,m]),T=j.useMemo(()=>Wg(b,h),[b,h]),z=n1(b);return j.createElement(j.Fragment,null,E.map(O=>j.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...s})),T.map(O=>j.createElement("link",{key:O,rel:"modulepreload",href:O,...s})),z.map(({key:O,link:L})=>j.createElement("link",{key:O,nonce:s.nonce,...L,crossOrigin:L.crossOrigin??s.crossOrigin})))}function s1(...n){return i=>{n.forEach(s=>{typeof s=="function"?s(i):s!=null&&(s.current=i)})}}var o1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{o1&&(window.__reactRouterVersion="7.17.0")}catch{}function u1({basename:n,children:i,useTransitions:s,window:u}){let d=j.useRef();d.current==null&&(d.current=qb({window:u,v5Compat:!0}));let h=d.current,[m,x]=j.useState({action:h.action,location:h.location}),p=j.useCallback(v=>{s===!1?x(v):j.startTransition(()=>x(v))},[s]);return j.useLayoutEffect(()=>h.listen(p),[h,p]),j.createElement(Hg,{basename:n,children:i,location:m.location,navigationType:m.action,navigator:h,useTransitions:s})}var yx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Do=j.forwardRef(function({onClick:i,discover:s="render",prefetch:u="none",relative:d,reloadDocument:h,replace:m,mask:x,state:p,target:v,to:g,preventScrollReset:b,viewTransition:E,defaultShouldRevalidate:T,...z},O){let{basename:L,navigator:k,useTransitions:K}=j.useContext(la),Q=typeof g=="string"&&yx.test(g),X=sx(g,L);g=X.to;let F=Sg(g,{relative:d}),te=Fa(),V=null;if(x){let ue=Gd(x,[],te.mask?te.mask.pathname:"/",!0);L!=="/"&&(ue.pathname=ue.pathname==="/"?L:ua([L,ue.pathname])),V=k.createHref(ue)}let[J,I,oe]=a1(u,z),W=f1(g,{replace:m,mask:x,state:p,target:v,preventScrollReset:b,relative:d,viewTransition:E,defaultShouldRevalidate:T,useTransitions:K});function fe(ue){i&&i(ue),ue.defaultPrevented||W(ue)}let he=!(X.isExternal||h),be=j.createElement("a",{...z,...oe,href:(he?V:void 0)||X.absoluteURL||F,onClick:he?fe:i,ref:s1(O,I),target:v,"data-discover":!Q&&s==="render"?"true":void 0});return J&&!Q?j.createElement(j.Fragment,null,be,j.createElement(l1,{page:F})):be});Do.displayName="Link";var Wd=j.forwardRef(function({"aria-current":i="page",caseSensitive:s=!1,className:u="",end:d=!1,style:h,to:m,viewTransition:x,children:p,...v},g){let b=Vr(m,{relative:v.relative}),E=Fa(),T=j.useContext(_o),{navigator:z,basename:O}=j.useContext(la),L=T!=null&&x1(b)&&x===!0,k=z.encodeLocation?z.encodeLocation(b).pathname:b.pathname,K=E.pathname,Q=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;s||(K=K.toLowerCase(),Q=Q?Q.toLowerCase():null,k=k.toLowerCase()),Q&&O&&(Q=$a(Q,O)||Q);const X=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let F=K===k||!d&&K.startsWith(k)&&K.charAt(X)==="/",te=Q!=null&&(Q===k||!d&&Q.startsWith(k)&&Q.charAt(k.length)==="/"),V={isActive:F,isPending:te,isTransitioning:L},J=F?i:void 0,I;typeof u=="function"?I=u(V):I=[u,F?"active":null,te?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let oe=typeof h=="function"?h(V):h;return j.createElement(Do,{...v,"aria-current":J,className:I,ref:g,style:oe,to:m,viewTransition:x},typeof p=="function"?p(V):p)});Wd.displayName="NavLink";var c1=j.forwardRef(({discover:n="render",fetcherKey:i,navigate:s,reloadDocument:u,replace:d,state:h,method:m=So,action:x,onSubmit:p,relative:v,preventScrollReset:g,viewTransition:b,defaultShouldRevalidate:E,...T},z)=>{let{useTransitions:O}=j.useContext(la),L=p1(),k=v1(x,{relative:v}),K=m.toLowerCase()==="get"?"get":"post",Q=typeof x=="string"&&yx.test(x),X=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let te=F.nativeEvent.submitter,V=(te==null?void 0:te.getAttribute("formmethod"))||m,J=()=>L(te||F.currentTarget,{fetcherKey:i,method:V,navigate:s,replace:d,state:h,relative:v,preventScrollReset:g,viewTransition:b,defaultShouldRevalidate:E});O&&s!==!1?j.startTransition(()=>J()):J()};return j.createElement("form",{ref:z,method:K,action:k,onSubmit:u?p:X,...T,"data-discover":!Q&&n==="render"?"true":void 0})});c1.displayName="Form";function d1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bx(n){let i=j.useContext(zi);return Ze(i,d1(n)),i}function f1(n,{target:i,replace:s,mask:u,state:d,preventScrollReset:h,relative:m,viewTransition:x,defaultShouldRevalidate:p,useTransitions:v}={}){let g=Ng(),b=Fa(),E=Vr(n,{relative:m});return j.useCallback(T=>{if(Kg(T,i)){T.preventDefault();let z=s!==void 0?s:Dr(b)===Dr(E),O=()=>g(n,{replace:z,mask:u,state:d,preventScrollReset:h,relative:m,viewTransition:x,defaultShouldRevalidate:p});v?j.startTransition(()=>O()):O()}},[b,g,E,s,u,d,i,n,h,m,x,p,v])}var m1=0,h1=()=>`__${String(++m1)}__`;function p1(){let{router:n}=bx("useSubmit"),{basename:i}=j.useContext(la),s=Dg(),u=n.fetch,d=n.navigate;return j.useCallback(async(h,m={})=>{let{action:x,method:p,encType:v,formData:g,body:b}=Zg(h,i);if(m.navigate===!1){let E=m.fetcherKey||h1();await u(E,s,m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:g,body:b,formMethod:m.method||p,formEncType:m.encType||v,flushSync:m.flushSync})}else await d(m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:g,body:b,formMethod:m.method||p,formEncType:m.encType||v,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,i,s])}function v1(n,{relative:i}={}){let{basename:s}=j.useContext(la),u=j.useContext(Ja);Ze(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),h={...Vr(n||".",{relative:i})},m=Fa();if(n==null){h.search=m.search;let x=new URLSearchParams(h.search),p=x.getAll("index");if(p.some(g=>g==="")){x.delete("index"),p.filter(b=>b).forEach(b=>x.append("index",b));let g=x.toString();h.search=g?`?${g}`:""}}return(!n||n===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(h.pathname=h.pathname==="/"?s:ua([s,h.pathname])),Dr(h)}function x1(n,{relative:i}={}){let s=j.useContext(cx);Ze(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=bx("useViewTransitionState"),d=Vr(n,{relative:i});if(!s.isTransitioning)return!1;let h=$a(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=$a(s.nextLocation.pathname,u)||s.nextLocation.pathname;return Co(d.pathname,m)!=null||Co(d.pathname,h)!=null}var Ai=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},on,Ml,hi,Kv,y1=(Kv=class extends Ai{constructor(){super();ce(this,on);ce(this,Ml);ce(this,hi);ee(this,hi,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){N(this,Ml)||this.setEventListener(N(this,hi))}onUnsubscribe(){var i;this.hasListeners()||((i=N(this,Ml))==null||i.call(this),ee(this,Ml,void 0))}setEventListener(i){var s;ee(this,hi,i),(s=N(this,Ml))==null||s.call(this),ee(this,Ml,i(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(i){N(this,on)!==i&&(ee(this,on,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(s=>{s(i)})}isFocused(){var i;return typeof N(this,on)=="boolean"?N(this,on):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},on=new WeakMap,Ml=new WeakMap,hi=new WeakMap,Kv),Pd=new y1,b1={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)},Cl,qd,Xv,g1=(Xv=class{constructor(){ce(this,Cl,b1);ce(this,qd,!1)}setTimeoutProvider(n){ee(this,Cl,n)}setTimeout(n,i){return N(this,Cl).setTimeout(n,i)}clearTimeout(n){N(this,Cl).clearTimeout(n)}setInterval(n,i){return N(this,Cl).setInterval(n,i)}clearInterval(n){N(this,Cl).clearInterval(n)}},Cl=new WeakMap,qd=new WeakMap,Xv),sn=new g1;function j1(n){setTimeout(n,0)}var S1=typeof window>"u"||"Deno"in globalThis;function wt(){}function N1(n,i){return typeof n=="function"?n(i):n}function jd(n){return typeof n=="number"&&n>=0&&n!==1/0}function gx(n,i){return Math.max(n+(i||0)-Date.now(),0)}function Dl(n,i){return typeof n=="function"?n(i):n}function Gt(n,i){return typeof n=="function"?n(i):n}function pv(n,i){const{type:s="all",exact:u,fetchStatus:d,predicate:h,queryKey:m,stale:x}=n;if(m){if(u){if(i.queryHash!==Id(m,i.options))return!1}else if(!kr(i.queryKey,m))return!1}if(s!=="all"){const p=i.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof x=="boolean"&&i.isStale()!==x||d&&d!==i.state.fetchStatus||h&&!h(i))}function vv(n,i){const{exact:s,status:u,predicate:d,mutationKey:h}=n;if(h){if(!i.options.mutationKey)return!1;if(s){if(xn(i.options.mutationKey)!==xn(h))return!1}else if(!kr(i.options.mutationKey,h))return!1}return!(u&&i.state.status!==u||d&&!d(i))}function Id(n,i){return((i==null?void 0:i.queryKeyHashFn)||xn)(n)}function xn(n){return JSON.stringify(n,(i,s)=>Sd(s)?Object.keys(s).sort().reduce((u,d)=>(u[d]=s[d],u),{}):s)}function kr(n,i){return n===i?!0:typeof n!=typeof i?!1:n&&i&&typeof n=="object"&&typeof i=="object"?Object.keys(i).every(s=>kr(n[s],i[s])):!1}var w1=Object.prototype.hasOwnProperty;function jx(n,i,s=0){if(n===i)return n;if(s>500)return i;const u=xv(n)&&xv(i);if(!u&&!(Sd(n)&&Sd(i)))return i;const h=(u?n:Object.keys(n)).length,m=u?i:Object.keys(i),x=m.length,p=u?new Array(x):{};let v=0;for(let g=0;g<x;g++){const b=u?g:m[g],E=n[b],T=i[b];if(E===T){p[b]=E,(u?g<h:w1.call(n,b))&&v++;continue}if(E===null||T===null||typeof E!="object"||typeof T!="object"){p[b]=T;continue}const z=jx(E,T,s+1);p[b]=z,z===E&&v++}return h===x&&v===h?n:p}function To(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const s in n)if(n[s]!==i[s])return!1;return!0}function xv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Sd(n){if(!yv(n))return!1;const i=n.constructor;if(i===void 0)return!0;const s=i.prototype;return!(!yv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function yv(n){return Object.prototype.toString.call(n)==="[object Object]"}function M1(n){return new Promise(i=>{sn.setTimeout(i,n)})}function Nd(n,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,i):s.structuralSharing!==!1?jx(n,i):i}function C1(n,i,s=0){const u=[...n,i];return s&&u.length>s?u.slice(1):u}function E1(n,i,s=0){const u=[i,...n];return s&&u.length>s?u.slice(0,-1):u}var ef=Symbol();function Sx(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===ef?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function tf(n,i){return typeof n=="function"?n(...i):!!n}function T1(n,i,s){let u=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??(d=i()),u||(u=!0,d.aborted?s():d.addEventListener("abort",s,{once:!0})),d)}),n}var Ur=(()=>{let n=()=>S1;return{isServer(){return n()},setIsServer(i){n=i}}})();function wd(){let n,i;const s=new Promise((d,h)=>{n=d,i=h});s.status="pending",s.catch(()=>{});function u(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{u({status:"fulfilled",value:d}),n(d)},s.reject=d=>{u({status:"rejected",reason:d}),i(d)},s}var z1=j1;function A1(){let n=[],i=0,s=x=>{x()},u=x=>{x()},d=z1;const h=x=>{i?n.push(x):d(()=>{s(x)})},m=()=>{const x=n;n=[],x.length&&d(()=>{u(()=>{x.forEach(p=>{s(p)})})})};return{batch:x=>{let p;i++;try{p=x()}finally{i--,i||m()}return p},batchCalls:x=>(...p)=>{h(()=>{x(...p)})},schedule:h,setNotifyFunction:x=>{s=x},setBatchNotifyFunction:x=>{u=x},setScheduler:x=>{d=x}}}var it=A1(),pi,El,vi,Vv,R1=(Vv=class extends Ai{constructor(){super();ce(this,pi,!0);ce(this,El);ce(this,vi);ee(this,vi,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i(!0),u=()=>i(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",u)}}})}onSubscribe(){N(this,El)||this.setEventListener(N(this,vi))}onUnsubscribe(){var i;this.hasListeners()||((i=N(this,El))==null||i.call(this),ee(this,El,void 0))}setEventListener(i){var s;ee(this,vi,i),(s=N(this,El))==null||s.call(this),ee(this,El,i(this.setOnline.bind(this)))}setOnline(i){N(this,pi)!==i&&(ee(this,pi,i),this.listeners.forEach(u=>{u(i)}))}isOnline(){return N(this,pi)}},pi=new WeakMap,El=new WeakMap,vi=new WeakMap,Vv),zo=new R1;function _1(n){return Math.min(1e3*2**n,3e4)}function Nx(n){return(n??"online")==="online"?zo.isOnline():!0}var Md=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function wx(n){let i=!1,s=0,u;const d=wd(),h=()=>d.status!=="pending",m=O=>{var L;if(!h()){const k=new Md(O);E(k),(L=n.onCancel)==null||L.call(n,k)}},x=()=>{i=!0},p=()=>{i=!1},v=()=>Pd.isFocused()&&(n.networkMode==="always"||zo.isOnline())&&n.canRun(),g=()=>Nx(n.networkMode)&&n.canRun(),b=O=>{h()||(u==null||u(),d.resolve(O))},E=O=>{h()||(u==null||u(),d.reject(O))},T=()=>new Promise(O=>{var L;u=k=>{(h()||v())&&O(k)},(L=n.onPause)==null||L.call(n)}).then(()=>{var O;u=void 0,h()||(O=n.onContinue)==null||O.call(n)}),z=()=>{if(h())return;let O;const L=s===0?n.initialPromise:void 0;try{O=L??n.fn()}catch(k){O=Promise.reject(k)}Promise.resolve(O).then(b).catch(k=>{var te;if(h())return;const K=n.retry??(Ur.isServer()?0:3),Q=n.retryDelay??_1,X=typeof Q=="function"?Q(s,k):Q,F=K===!0||typeof K=="number"&&s<K||typeof K=="function"&&K(s,k);if(i||!F){E(k);return}s++,(te=n.onFail)==null||te.call(n,s,k),M1(X).then(()=>v()?void 0:T()).then(()=>{i?E(k):z()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(u==null||u(),d),cancelRetry:x,continueRetry:p,canStart:g,start:()=>(g()?z():T().then(z),d)}}var un,Zv,Mx=(Zv=class{constructor(){ce(this,un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jd(this.gcTime)&&ee(this,un,sn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ur.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,un)!==void 0&&(sn.clearTimeout(N(this,un)),ee(this,un,void 0))}},un=new WeakMap,Zv);function O1(n){return{onFetch:(i,s)=>{var g,b,E,T,z;const u=i.options,d=(E=(b=(g=i.fetchOptions)==null?void 0:g.meta)==null?void 0:b.fetchMore)==null?void 0:E.direction,h=((T=i.state.data)==null?void 0:T.pages)||[],m=((z=i.state.data)==null?void 0:z.pageParams)||[];let x={pages:[],pageParams:[]},p=0;const v=async()=>{let O=!1;const L=Q=>{T1(Q,()=>i.signal,()=>O=!0)},k=Sx(i.options,i.fetchOptions),K=async(Q,X,F)=>{if(O)return Promise.reject(i.signal.reason);if(X==null&&Q.pages.length)return Promise.resolve(Q);const V=(()=>{const W={client:i.client,queryKey:i.queryKey,pageParam:X,direction:F?"backward":"forward",meta:i.options.meta};return L(W),W})(),J=await k(V),{maxPages:I}=i.options,oe=F?E1:C1;return{pages:oe(Q.pages,J,I),pageParams:oe(Q.pageParams,X,I)}};if(d&&h.length){const Q=d==="backward",X=Q?D1:bv,F={pages:h,pageParams:m},te=X(u,F);x=await K(F,te,Q)}else{const Q=n??h.length;do{const X=p===0?m[0]??u.initialPageParam:bv(u,x);if(p>0&&X==null)break;x=await K(x,X),p++}while(p<Q)}return x};i.options.persister?i.fetchFn=()=>{var O,L;return(L=(O=i.options).persister)==null?void 0:L.call(O,v,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s)}:i.fetchFn=v}}}function bv(n,{pages:i,pageParams:s}){const u=i.length-1;return i.length>0?n.getNextPageParam(i[u],i,s[u],s):void 0}function D1(n,{pages:i,pageParams:s}){var u;return i.length>0?(u=n.getPreviousPageParam)==null?void 0:u.call(n,i[0],i,s[0],s):void 0}var xi,cn,yi,ta,dn,ut,Lr,fn,Yt,Cx,Ya,$v,k1=($v=class extends Mx{constructor(i){super();ce(this,Yt);ce(this,xi);ce(this,cn);ce(this,yi);ce(this,ta);ce(this,dn);ce(this,ut);ce(this,Lr);ce(this,fn);ee(this,fn,!1),ee(this,Lr,i.defaultOptions),this.setOptions(i.options),this.observers=[],ee(this,dn,i.client),ee(this,ta,N(this,dn).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,ee(this,cn,jv(this.options)),this.state=i.state??N(this,cn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,xi)}get promise(){var i;return(i=N(this,ut))==null?void 0:i.promise}setOptions(i){if(this.options={...N(this,Lr),...i},i!=null&&i._type&&ee(this,xi,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=jv(this.options);s.data!==void 0&&(this.setState(gv(s.data,s.dataUpdatedAt)),ee(this,cn,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,ta).remove(this)}setData(i,s){const u=Nd(this.state.data,i,this.options);return ye(this,Yt,Ya).call(this,{data:u,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),u}setState(i){ye(this,Yt,Ya).call(this,{type:"setState",state:i})}cancel(i){var u,d;const s=(u=N(this,ut))==null?void 0:u.promise;return(d=N(this,ut))==null||d.cancel(i),s?s.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,cn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>Gt(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ef||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>Dl(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!gx(this.state.dataUpdatedAt,i)}onFocus(){var s;const i=this.observers.find(u=>u.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(s=N(this,ut))==null||s.continue()}onOnline(){var s;const i=this.observers.find(u=>u.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(s=N(this,ut))==null||s.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),N(this,ta).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(s=>s!==i),this.observers.length||(N(this,ut)&&(N(this,fn)||ye(this,Yt,Cx).call(this)?N(this,ut).cancel({revert:!0}):N(this,ut).cancelRetry()),this.scheduleGc()),N(this,ta).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,Yt,Ya).call(this,{type:"invalidate"})}async fetch(i,s){var v,g,b,E,T,z,O,L,k,K,Q;if(this.state.fetchStatus!=="idle"&&((v=N(this,ut))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(N(this,ut))return N(this,ut).continueRetry(),N(this,ut).promise}if(i&&this.setOptions(i),!this.options.queryFn){const X=this.observers.find(F=>F.options.queryFn);X&&this.setOptions(X.options)}const u=new AbortController,d=X=>{Object.defineProperty(X,"signal",{enumerable:!0,get:()=>(ee(this,fn,!0),u.signal)})},h=()=>{const X=Sx(this.options,s),te=(()=>{const V={client:N(this,dn),queryKey:this.queryKey,meta:this.meta};return d(V),V})();return ee(this,fn,!1),this.options.persister?this.options.persister(X,te,this):X(te)},x=(()=>{const X={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:N(this,dn),state:this.state,fetchFn:h};return d(X),X})(),p=N(this,xi)==="infinite"?O1(this.options.pages):this.options.behavior;p==null||p.onFetch(x,this),ee(this,yi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=x.fetchOptions)==null?void 0:g.meta))&&ye(this,Yt,Ya).call(this,{type:"fetch",meta:(b=x.fetchOptions)==null?void 0:b.meta}),ee(this,ut,wx({initialPromise:s==null?void 0:s.initialPromise,fn:x.fetchFn,onCancel:X=>{X instanceof Md&&X.revert&&this.setState({...N(this,yi),fetchStatus:"idle"}),u.abort()},onFail:(X,F)=>{ye(this,Yt,Ya).call(this,{type:"failed",failureCount:X,error:F})},onPause:()=>{ye(this,Yt,Ya).call(this,{type:"pause"})},onContinue:()=>{ye(this,Yt,Ya).call(this,{type:"continue"})},retry:x.options.retry,retryDelay:x.options.retryDelay,networkMode:x.options.networkMode,canRun:()=>!0}));try{const X=await N(this,ut).start();if(X===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(X),(T=(E=N(this,ta).config).onSuccess)==null||T.call(E,X,this),(O=(z=N(this,ta).config).onSettled)==null||O.call(z,X,this.state.error,this),X}catch(X){if(X instanceof Md){if(X.silent)return N(this,ut).promise;if(X.revert){if(this.state.data===void 0)throw X;return this.state.data}}throw ye(this,Yt,Ya).call(this,{type:"error",error:X}),(k=(L=N(this,ta).config).onError)==null||k.call(L,X,this),(Q=(K=N(this,ta).config).onSettled)==null||Q.call(K,this.state.data,X,this),X}finally{this.scheduleGc()}}},xi=new WeakMap,cn=new WeakMap,yi=new WeakMap,ta=new WeakMap,dn=new WeakMap,ut=new WeakMap,Lr=new WeakMap,fn=new WeakMap,Yt=new WeakSet,Cx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ya=function(i){const s=u=>{switch(i.type){case"failed":return{...u,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...Ex(u.data,this.options),fetchMeta:i.meta??null};case"success":const d={...u,...gv(i.data,i.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,yi,i.manual?d:void 0),d;case"error":const h=i.error;return{...u,error:h,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...i.state}}};this.state=s(this.state),it.batch(()=>{this.observers.forEach(u=>{u.onQueryUpdate()}),N(this,ta).notify({query:this,type:"updated",action:i})})},$v);function Ex(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nx(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function gv(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jv(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,s=i!==void 0,u=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Rt,ze,Qr,Nt,mn,bi,Ga,Tl,qr,gi,ji,hn,pn,zl,Si,De,Or,Cd,Ed,Td,zd,Ad,Rd,_d,Tx,Jv,U1=(Jv=class extends Ai{constructor(i,s){super();ce(this,De);ce(this,Rt);ce(this,ze);ce(this,Qr);ce(this,Nt);ce(this,mn);ce(this,bi);ce(this,Ga);ce(this,Tl);ce(this,qr);ce(this,gi);ce(this,ji);ce(this,hn);ce(this,pn);ce(this,zl);ce(this,Si,new Set);this.options=s,ee(this,Rt,i),ee(this,Tl,null),ee(this,Ga,wd()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,ze).addObserver(this),Sv(N(this,ze),this.options)?ye(this,De,Or).call(this):this.updateResult(),ye(this,De,zd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Od(N(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Od(N(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,De,Ad).call(this),ye(this,De,Rd).call(this),N(this,ze).removeObserver(this)}setOptions(i){const s=this.options,u=N(this,ze);if(this.options=N(this,Rt).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,N(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,De,_d).call(this),N(this,ze).setOptions(this.options),s._defaulted&&!To(this.options,s)&&N(this,Rt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,ze),observer:this});const d=this.hasListeners();d&&Nv(N(this,ze),u,this.options,s)&&ye(this,De,Or).call(this),this.updateResult(),d&&(N(this,ze)!==u||Gt(this.options.enabled,N(this,ze))!==Gt(s.enabled,N(this,ze))||Dl(this.options.staleTime,N(this,ze))!==Dl(s.staleTime,N(this,ze)))&&ye(this,De,Cd).call(this);const h=ye(this,De,Ed).call(this);d&&(N(this,ze)!==u||Gt(this.options.enabled,N(this,ze))!==Gt(s.enabled,N(this,ze))||h!==N(this,zl))&&ye(this,De,Td).call(this,h)}getOptimisticResult(i){const s=N(this,Rt).getQueryCache().build(N(this,Rt),i),u=this.createResult(s,i);return H1(this,u)&&(ee(this,Nt,u),ee(this,bi,this.options),ee(this,mn,N(this,ze).state)),u}getCurrentResult(){return N(this,Nt)}trackResult(i,s){return new Proxy(i,{get:(u,d)=>(this.trackProp(d),s==null||s(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Ga).status==="pending"&&N(this,Ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(u,d))})}trackProp(i){N(this,Si).add(i)}getCurrentQuery(){return N(this,ze)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const s=N(this,Rt).defaultQueryOptions(i),u=N(this,Rt).getQueryCache().build(N(this,Rt),s);return u.fetch().then(()=>this.createResult(u,s))}fetch(i){return ye(this,De,Or).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Nt)))}createResult(i,s){var I;const u=N(this,ze),d=this.options,h=N(this,Nt),m=N(this,mn),x=N(this,bi),v=i!==u?i.state:N(this,Qr),{state:g}=i;let b={...g},E=!1,T;if(s._optimisticResults){const oe=this.hasListeners(),W=!oe&&Sv(i,s),fe=oe&&Nv(i,u,s,d);(W||fe)&&(b={...b,...Ex(g.data,i.options)}),s._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:z,errorUpdatedAt:O,status:L}=b;T=b.data;let k=!1;if(s.placeholderData!==void 0&&T===void 0&&L==="pending"){let oe;h!=null&&h.isPlaceholderData&&s.placeholderData===(x==null?void 0:x.placeholderData)?(oe=h.data,k=!0):oe=typeof s.placeholderData=="function"?s.placeholderData((I=N(this,ji))==null?void 0:I.state.data,N(this,ji)):s.placeholderData,oe!==void 0&&(L="success",T=Nd(h==null?void 0:h.data,oe,s),E=!0)}if(s.select&&T!==void 0&&!k)if(h&&T===(m==null?void 0:m.data)&&s.select===N(this,qr))T=N(this,gi);else try{ee(this,qr,s.select),T=s.select(T),T=Nd(h==null?void 0:h.data,T,s),ee(this,gi,T),ee(this,Tl,null)}catch(oe){ee(this,Tl,oe)}N(this,Tl)&&(z=N(this,Tl),T=N(this,gi),O=Date.now(),L="error");const K=b.fetchStatus==="fetching",Q=L==="pending",X=L==="error",F=Q&&K,te=T!==void 0,J={status:L,fetchStatus:b.fetchStatus,isPending:Q,isSuccess:L==="success",isError:X,isInitialLoading:F,isLoading:F,data:T,dataUpdatedAt:b.dataUpdatedAt,error:z,errorUpdatedAt:O,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:b.dataUpdateCount>v.dataUpdateCount||b.errorUpdateCount>v.errorUpdateCount,isFetching:K,isRefetching:K&&!Q,isLoadingError:X&&!te,isPaused:b.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:X&&te,isStale:af(i,s),refetch:this.refetch,promise:N(this,Ga),isEnabled:Gt(s.enabled,i)!==!1};if(this.options.experimental_prefetchInRender){const oe=J.data!==void 0,W=J.status==="error"&&!oe,fe=ue=>{W?ue.reject(J.error):oe&&ue.resolve(J.data)},he=()=>{const ue=ee(this,Ga,J.promise=wd());fe(ue)},be=N(this,Ga);switch(be.status){case"pending":i.queryHash===u.queryHash&&fe(be);break;case"fulfilled":(W||J.data!==be.value)&&he();break;case"rejected":(!W||J.error!==be.reason)&&he();break}}return J}updateResult(){const i=N(this,Nt),s=this.createResult(N(this,ze),this.options);if(ee(this,mn,N(this,ze).state),ee(this,bi,this.options),N(this,mn).data!==void 0&&ee(this,ji,N(this,ze)),To(s,i))return;ee(this,Nt,s);const u=()=>{if(!i)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!N(this,Si).size)return!0;const m=new Set(h??N(this,Si));return this.options.throwOnError&&m.add("error"),Object.keys(N(this,Nt)).some(x=>{const p=x;return N(this,Nt)[p]!==i[p]&&m.has(p)})};ye(this,De,Tx).call(this,{listeners:u()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,De,zd).call(this)}},Rt=new WeakMap,ze=new WeakMap,Qr=new WeakMap,Nt=new WeakMap,mn=new WeakMap,bi=new WeakMap,Ga=new WeakMap,Tl=new WeakMap,qr=new WeakMap,gi=new WeakMap,ji=new WeakMap,hn=new WeakMap,pn=new WeakMap,zl=new WeakMap,Si=new WeakMap,De=new WeakSet,Or=function(i){ye(this,De,_d).call(this);let s=N(this,ze).fetch(this.options,i);return i!=null&&i.throwOnError||(s=s.catch(wt)),s},Cd=function(){ye(this,De,Ad).call(this);const i=Dl(this.options.staleTime,N(this,ze));if(Ur.isServer()||N(this,Nt).isStale||!jd(i))return;const u=gx(N(this,Nt).dataUpdatedAt,i)+1;ee(this,hn,sn.setTimeout(()=>{N(this,Nt).isStale||this.updateResult()},u))},Ed=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,ze)):this.options.refetchInterval)??!1},Td=function(i){ye(this,De,Rd).call(this),ee(this,zl,i),!(Ur.isServer()||Gt(this.options.enabled,N(this,ze))===!1||!jd(N(this,zl))||N(this,zl)===0)&&ee(this,pn,sn.setInterval(()=>{(this.options.refetchIntervalInBackground||Pd.isFocused())&&ye(this,De,Or).call(this)},N(this,zl)))},zd=function(){ye(this,De,Cd).call(this),ye(this,De,Td).call(this,ye(this,De,Ed).call(this))},Ad=function(){N(this,hn)!==void 0&&(sn.clearTimeout(N(this,hn)),ee(this,hn,void 0))},Rd=function(){N(this,pn)!==void 0&&(sn.clearInterval(N(this,pn)),ee(this,pn,void 0))},_d=function(){const i=N(this,Rt).getQueryCache().build(N(this,Rt),this.options);if(i===N(this,ze))return;const s=N(this,ze);ee(this,ze,i),ee(this,Qr,i.state),this.hasListeners()&&(s==null||s.removeObserver(this),i.addObserver(this))},Tx=function(i){it.batch(()=>{i.listeners&&this.listeners.forEach(s=>{s(N(this,Nt))}),N(this,Rt).getQueryCache().notify({query:N(this,ze),type:"observerResultsUpdated"})})},Jv);function B1(n,i){return Gt(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Gt(i.retryOnMount,n)===!1)}function Sv(n,i){return B1(n,i)||n.state.data!==void 0&&Od(n,i,i.refetchOnMount)}function Od(n,i,s){if(Gt(i.enabled,n)!==!1&&Dl(i.staleTime,n)!=="static"){const u=typeof s=="function"?s(n):s;return u==="always"||u!==!1&&af(n,i)}return!1}function Nv(n,i,s,u){return(n!==i||Gt(u.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&af(n,s)}function af(n,i){return Gt(i.enabled,n)!==!1&&n.isStaleByTime(Dl(i.staleTime,n))}function H1(n,i){return!To(n.getCurrentResult(),i)}var Yr,ba,xt,vn,ga,wl,Fv,L1=(Fv=class extends Mx{constructor(i){super();ce(this,ga);ce(this,Yr);ce(this,ba);ce(this,xt);ce(this,vn);ee(this,Yr,i.client),this.mutationId=i.mutationId,ee(this,xt,i.mutationCache),ee(this,ba,[]),this.state=i.state||zx(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){N(this,ba).includes(i)||(N(this,ba).push(i),this.clearGcTimeout(),N(this,xt).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){ee(this,ba,N(this,ba).filter(s=>s!==i)),this.scheduleGc(),N(this,xt).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){N(this,ba).length||(this.state.status==="pending"?this.scheduleGc():N(this,xt).remove(this))}continue(){var i;return((i=N(this,vn))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var m,x,p,v,g,b,E,T,z,O,L,k,K,Q,X,F,te,V;const s=()=>{ye(this,ga,wl).call(this,{type:"continue"})},u={client:N(this,Yr),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,vn,wx({fn:()=>this.options.mutationFn?this.options.mutationFn(i,u):Promise.reject(new Error("No mutationFn found")),onFail:(J,I)=>{ye(this,ga,wl).call(this,{type:"failed",failureCount:J,error:I})},onPause:()=>{ye(this,ga,wl).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,xt).canRun(this)}));const d=this.state.status==="pending",h=!N(this,vn).canStart();try{if(d)s();else{ye(this,ga,wl).call(this,{type:"pending",variables:i,isPaused:h}),N(this,xt).config.onMutate&&await N(this,xt).config.onMutate(i,this,u);const I=await((x=(m=this.options).onMutate)==null?void 0:x.call(m,i,u));I!==this.state.context&&ye(this,ga,wl).call(this,{type:"pending",context:I,variables:i,isPaused:h})}const J=await N(this,vn).start();return await((v=(p=N(this,xt).config).onSuccess)==null?void 0:v.call(p,J,i,this.state.context,this,u)),await((b=(g=this.options).onSuccess)==null?void 0:b.call(g,J,i,this.state.context,u)),await((T=(E=N(this,xt).config).onSettled)==null?void 0:T.call(E,J,null,this.state.variables,this.state.context,this,u)),await((O=(z=this.options).onSettled)==null?void 0:O.call(z,J,null,i,this.state.context,u)),ye(this,ga,wl).call(this,{type:"success",data:J}),J}catch(J){try{await((k=(L=N(this,xt).config).onError)==null?void 0:k.call(L,J,i,this.state.context,this,u))}catch(I){Promise.reject(I)}try{await((Q=(K=this.options).onError)==null?void 0:Q.call(K,J,i,this.state.context,u))}catch(I){Promise.reject(I)}try{await((F=(X=N(this,xt).config).onSettled)==null?void 0:F.call(X,void 0,J,this.state.variables,this.state.context,this,u))}catch(I){Promise.reject(I)}try{await((V=(te=this.options).onSettled)==null?void 0:V.call(te,void 0,J,i,this.state.context,u))}catch(I){Promise.reject(I)}throw ye(this,ga,wl).call(this,{type:"error",error:J}),J}finally{N(this,xt).runNext(this)}}},Yr=new WeakMap,ba=new WeakMap,xt=new WeakMap,vn=new WeakMap,ga=new WeakSet,wl=function(i){const s=u=>{switch(i.type){case"failed":return{...u,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...u,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:i.error,failureCount:u.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=s(this.state),it.batch(()=>{N(this,ba).forEach(u=>{u.onMutationUpdate(i)}),N(this,xt).notify({mutation:this,type:"updated",action:i})})},Fv);function zx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ka,oa,Gr,Wv,Q1=(Wv=class extends Ai{constructor(i={}){super();ce(this,Ka);ce(this,oa);ce(this,Gr);this.config=i,ee(this,Ka,new Set),ee(this,oa,new Map),ee(this,Gr,0)}build(i,s,u){const d=new L1({client:i,mutationCache:this,mutationId:++vo(this,Gr)._,options:i.defaultMutationOptions(s),state:u});return this.add(d),d}add(i){N(this,Ka).add(i);const s=yo(i);if(typeof s=="string"){const u=N(this,oa).get(s);u?u.push(i):N(this,oa).set(s,[i])}this.notify({type:"added",mutation:i})}remove(i){if(N(this,Ka).delete(i)){const s=yo(i);if(typeof s=="string"){const u=N(this,oa).get(s);if(u)if(u.length>1){const d=u.indexOf(i);d!==-1&&u.splice(d,1)}else u[0]===i&&N(this,oa).delete(s)}}this.notify({type:"removed",mutation:i})}canRun(i){const s=yo(i);if(typeof s=="string"){const u=N(this,oa).get(s),d=u==null?void 0:u.find(h=>h.state.status==="pending");return!d||d===i}else return!0}runNext(i){var u;const s=yo(i);if(typeof s=="string"){const d=(u=N(this,oa).get(s))==null?void 0:u.find(h=>h!==i&&h.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){it.batch(()=>{N(this,Ka).forEach(i=>{this.notify({type:"removed",mutation:i})}),N(this,Ka).clear(),N(this,oa).clear()})}getAll(){return Array.from(N(this,Ka))}find(i){const s={exact:!0,...i};return this.getAll().find(u=>vv(s,u))}findAll(i={}){return this.getAll().filter(s=>vv(i,s))}notify(i){it.batch(()=>{this.listeners.forEach(s=>{s(i)})})}resumePausedMutations(){const i=this.getAll().filter(s=>s.state.isPaused);return it.batch(()=>Promise.all(i.map(s=>s.continue().catch(wt))))}},Ka=new WeakMap,oa=new WeakMap,Gr=new WeakMap,Wv);function yo(n){var i;return(i=n.options.scope)==null?void 0:i.id}var Xa,Al,_t,Va,Za,wo,Dd,Pv,q1=(Pv=class extends Ai{constructor(s,u){super();ce(this,Za);ce(this,Xa);ce(this,Al);ce(this,_t);ce(this,Va);ee(this,Xa,s),this.setOptions(u),this.bindMethods(),ye(this,Za,wo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var d;const u=this.options;this.options=N(this,Xa).defaultMutationOptions(s),To(this.options,u)||N(this,Xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,_t),observer:this}),u!=null&&u.mutationKey&&this.options.mutationKey&&xn(u.mutationKey)!==xn(this.options.mutationKey)?this.reset():((d=N(this,_t))==null?void 0:d.state.status)==="pending"&&N(this,_t).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=N(this,_t))==null||s.removeObserver(this)}onMutationUpdate(s){ye(this,Za,wo).call(this),ye(this,Za,Dd).call(this,s)}getCurrentResult(){return N(this,Al)}reset(){var s;(s=N(this,_t))==null||s.removeObserver(this),ee(this,_t,void 0),ye(this,Za,wo).call(this),ye(this,Za,Dd).call(this)}mutate(s,u){var d;return ee(this,Va,u),(d=N(this,_t))==null||d.removeObserver(this),ee(this,_t,N(this,Xa).getMutationCache().build(N(this,Xa),this.options)),N(this,_t).addObserver(this),N(this,_t).execute(s)}},Xa=new WeakMap,Al=new WeakMap,_t=new WeakMap,Va=new WeakMap,Za=new WeakSet,wo=function(){var u;const s=((u=N(this,_t))==null?void 0:u.state)??zx();ee(this,Al,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Dd=function(s){it.batch(()=>{var u,d,h,m,x,p,v,g;if(N(this,Va)&&this.hasListeners()){const b=N(this,Al).variables,E=N(this,Al).context,T={client:N(this,Xa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(d=(u=N(this,Va)).onSuccess)==null||d.call(u,s.data,b,E,T)}catch(z){Promise.reject(z)}try{(m=(h=N(this,Va)).onSettled)==null||m.call(h,s.data,null,b,E,T)}catch(z){Promise.reject(z)}}else if((s==null?void 0:s.type)==="error"){try{(p=(x=N(this,Va)).onError)==null||p.call(x,s.error,b,E,T)}catch(z){Promise.reject(z)}try{(g=(v=N(this,Va)).onSettled)==null||g.call(v,void 0,s.error,b,E,T)}catch(z){Promise.reject(z)}}}this.listeners.forEach(b=>{b(N(this,Al))})})},Pv),ja,Iv,Y1=(Iv=class extends Ai{constructor(i={}){super();ce(this,ja);this.config=i,ee(this,ja,new Map)}build(i,s,u){const d=s.queryKey,h=s.queryHash??Id(d,s);let m=this.get(h);return m||(m=new k1({client:i,queryKey:d,queryHash:h,options:i.defaultQueryOptions(s),state:u,defaultOptions:i.getQueryDefaults(d)}),this.add(m)),m}add(i){N(this,ja).has(i.queryHash)||(N(this,ja).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const s=N(this,ja).get(i.queryHash);s&&(i.destroy(),s===i&&N(this,ja).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){it.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return N(this,ja).get(i)}getAll(){return[...N(this,ja).values()]}find(i){const s={exact:!0,...i};return this.getAll().find(u=>pv(s,u))}findAll(i={}){const s=this.getAll();return Object.keys(i).length>0?s.filter(u=>pv(i,u)):s}notify(i){it.batch(()=>{this.listeners.forEach(s=>{s(i)})})}onFocus(){it.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},ja=new WeakMap,Iv),Fe,Rl,_l,Ni,wi,Ol,Mi,Ci,ex,G1=(ex=class{constructor(n={}){ce(this,Fe);ce(this,Rl);ce(this,_l);ce(this,Ni);ce(this,wi);ce(this,Ol);ce(this,Mi);ce(this,Ci);ee(this,Fe,n.queryCache||new Y1),ee(this,Rl,n.mutationCache||new Q1),ee(this,_l,n.defaultOptions||{}),ee(this,Ni,new Map),ee(this,wi,new Map),ee(this,Ol,0)}mount(){vo(this,Ol)._++,N(this,Ol)===1&&(ee(this,Mi,Pd.subscribe(async n=>{n&&(await this.resumePausedMutations(),N(this,Fe).onFocus())})),ee(this,Ci,zo.subscribe(async n=>{n&&(await this.resumePausedMutations(),N(this,Fe).onOnline())})))}unmount(){var n,i;vo(this,Ol)._--,N(this,Ol)===0&&((n=N(this,Mi))==null||n.call(this),ee(this,Mi,void 0),(i=N(this,Ci))==null||i.call(this),ee(this,Ci,void 0))}isFetching(n){return N(this,Fe).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return N(this,Rl).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=N(this,Fe).get(i.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),s=N(this,Fe).build(this,i),u=s.state.data;return u===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Dl(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(u))}getQueriesData(n){return N(this,Fe).findAll(n).map(({queryKey:i,state:s})=>{const u=s.data;return[i,u]})}setQueryData(n,i,s){const u=this.defaultQueryOptions({queryKey:n}),d=N(this,Fe).get(u.queryHash),h=d==null?void 0:d.state.data,m=N1(i,h);if(m!==void 0)return N(this,Fe).build(this,u).setData(m,{...s,manual:!0})}setQueriesData(n,i,s){return it.batch(()=>N(this,Fe).findAll(n).map(({queryKey:u})=>[u,this.setQueryData(u,i,s)]))}getQueryState(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=N(this,Fe).get(i.queryHash))==null?void 0:s.state}removeQueries(n){const i=N(this,Fe);it.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(n,i){const s=N(this,Fe);return it.batch(()=>(s.findAll(n).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...n},i)))}cancelQueries(n,i={}){const s={revert:!0,...i},u=it.batch(()=>N(this,Fe).findAll(n).map(d=>d.cancel(s)));return Promise.all(u).then(wt).catch(wt)}invalidateQueries(n,i={}){return it.batch(()=>(N(this,Fe).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},u=it.batch(()=>N(this,Fe).findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let h=d.fetch(void 0,s);return s.throwOnError||(h=h.catch(wt)),d.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(u).then(wt)}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const s=N(this,Fe).build(this,i);return s.isStaleByTime(Dl(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(wt).catch(wt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(wt).catch(wt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return zo.isOnline()?N(this,Rl).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Fe)}getMutationCache(){return N(this,Rl)}getDefaultOptions(){return N(this,_l)}setDefaultOptions(n){ee(this,_l,n)}setQueryDefaults(n,i){N(this,Ni).set(xn(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...N(this,Ni).values()],s={};return i.forEach(u=>{kr(n,u.queryKey)&&Object.assign(s,u.defaultOptions)}),s}setMutationDefaults(n,i){N(this,wi).set(xn(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...N(this,wi).values()],s={};return i.forEach(u=>{kr(n,u.mutationKey)&&Object.assign(s,u.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const i={...N(this,_l).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=Id(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===ef&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...N(this,_l).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){N(this,Fe).clear(),N(this,Rl).clear()}},Fe=new WeakMap,Rl=new WeakMap,_l=new WeakMap,Ni=new WeakMap,wi=new WeakMap,Ol=new WeakMap,Mi=new WeakMap,Ci=new WeakMap,ex),Ax=j.createContext(void 0),Zr=n=>{const i=j.useContext(Ax);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},K1=({client:n,children:i})=>(j.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),o.jsx(Ax.Provider,{value:n,children:i})),Rx=j.createContext(!1),X1=()=>j.useContext(Rx);Rx.Provider;function V1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Z1=j.createContext(V1()),$1=()=>j.useContext(Z1),J1=(n,i,s)=>{const u=s!=null&&s.state.error&&typeof n.throwOnError=="function"?tf(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||u)&&(i.isReset()||(n.retryOnMount=!1))},F1=n=>{j.useEffect(()=>{n.clearReset()},[n])},W1=({result:n,errorResetBoundary:i,throwOnError:s,query:u,suspense:d})=>n.isError&&!i.isReset()&&!n.isFetching&&u&&(d&&n.data===void 0||tf(s,[n.error,u])),P1=n=>{if(n.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),u=n.staleTime;n.staleTime=typeof u=="function"?(...d)=>s(u(...d)):s(u),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},I1=(n,i)=>n.isLoading&&n.isFetching&&!i,e2=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,wv=(n,i,s)=>i.fetchOptimistic(n).catch(()=>{s.clearReset()});function t2(n,i,s){var T,z,O,L;const u=X1(),d=$1(),h=Zr(),m=h.defaultQueryOptions(n);(z=(T=h.getDefaultOptions().queries)==null?void 0:T._experimental_beforeQuery)==null||z.call(T,m);const x=h.getQueryCache().get(m.queryHash),p=n.subscribed!==!1;m._optimisticResults=u?"isRestoring":p?"optimistic":void 0,P1(m),J1(m,d,x),F1(d);const v=!h.getQueryCache().get(m.queryHash),[g]=j.useState(()=>new i(h,m)),b=g.getOptimisticResult(m),E=!u&&p;if(j.useSyncExternalStore(j.useCallback(k=>{const K=E?g.subscribe(it.batchCalls(k)):wt;return g.updateResult(),K},[g,E]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),j.useEffect(()=>{g.setOptions(m)},[m,g]),e2(m,b))throw wv(m,g,d);if(W1({result:b,errorResetBoundary:d,throwOnError:m.throwOnError,query:x,suspense:m.suspense}))throw b.error;if((L=(O=h.getDefaultOptions().queries)==null?void 0:O._experimental_afterQuery)==null||L.call(O,m,b),m.experimental_prefetchInRender&&!Ur.isServer()&&I1(b,u)){const k=v?wv(m,g,d):x==null?void 0:x.promise;k==null||k.catch(wt).finally(()=>{g.updateResult()})}return m.notifyOnChangeProps?b:g.trackResult(b)}function ca(n,i){return t2(n,U1)}function Ri(n,i){const s=Zr(),[u]=j.useState(()=>new q1(s,n));j.useEffect(()=>{u.setOptions(n)},[u,n]);const d=j.useSyncExternalStore(j.useCallback(m=>u.subscribe(it.batchCalls(m)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),h=j.useCallback((m,x)=>{u.mutate(m,x).catch(wt)},[u]);if(d.error&&tf(u.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:h,mutateAsync:d.mutate}}/**
|
|
61
|
+
* @license lucide-react v1.17.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const _x=(...n)=>n.filter((i,s,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===s).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v1.17.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const a2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v1.17.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const l2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,s,u)=>u?u.toUpperCase():s.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v1.17.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Mv=n=>{const i=l2(n);return i.charAt(0).toUpperCase()+i.slice(1)};/**
|
|
81
|
+
* @license lucide-react v1.17.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var dd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
86
|
+
* @license lucide-react v1.17.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const n2=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},i2=j.createContext({}),r2=()=>j.useContext(i2),s2=j.forwardRef(({color:n,size:i,strokeWidth:s,absoluteStrokeWidth:u,className:d="",children:h,iconNode:m,...x},p)=>{const{size:v=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,color:E="currentColor",className:T=""}=r2()??{},z=u??b?Number(s??g)*24/Number(i??v):s??g;return j.createElement("svg",{ref:p,...dd,width:i??v??dd.width,height:i??v??dd.height,stroke:n??E,strokeWidth:z,className:_x("lucide",T,d),...!h&&!n2(x)&&{"aria-hidden":"true"},...x},[...m.map(([O,L])=>j.createElement(O,L)),...Array.isArray(h)?h:[h]])});/**
|
|
91
|
+
* @license lucide-react v1.17.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Ge=(n,i)=>{const s=j.forwardRef(({className:u,...d},h)=>j.createElement(s2,{ref:h,iconNode:i,className:_x(`lucide-${a2(Mv(n))}`,`lucide-${n}`,u),...d}));return s.displayName=Mv(n),s};/**
|
|
96
|
+
* @license lucide-react v1.17.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const o2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Cv=Ge("activity",o2);/**
|
|
101
|
+
* @license lucide-react v1.17.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const u2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ko=Ge("arrow-right",u2);/**
|
|
106
|
+
* @license lucide-react v1.17.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const c2=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],Ev=Ge("boxes",c2);/**
|
|
111
|
+
* @license lucide-react v1.17.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const d2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Kt=Ge("check",d2);/**
|
|
116
|
+
* @license lucide-react v1.17.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const f2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],m2=Ge("circle-check",f2);/**
|
|
121
|
+
* @license lucide-react v1.17.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const h2=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],kd=Ge("circle-dashed",h2);/**
|
|
126
|
+
* @license lucide-react v1.17.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const p2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Ox=Ge("clock-3",p2);/**
|
|
131
|
+
* @license lucide-react v1.17.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const v2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],x2=Ge("copy",v2);/**
|
|
136
|
+
* @license lucide-react v1.17.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const y2=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ei=Ge("credit-card",y2);/**
|
|
141
|
+
* @license lucide-react v1.17.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const b2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],g2=Ge("database",b2);/**
|
|
146
|
+
* @license lucide-react v1.17.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const j2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],S2=Ge("git-branch",j2);/**
|
|
151
|
+
* @license lucide-react v1.17.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const N2=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z",key:"yxxwt6"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],w2=Ge("landmark",N2);/**
|
|
156
|
+
* @license lucide-react v1.17.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const M2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pt=Ge("loader-circle",M2);/**
|
|
161
|
+
* @license lucide-react v1.17.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const C2=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],E2=Ge("lock-keyhole",C2);/**
|
|
166
|
+
* @license lucide-react v1.17.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const T2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ud=Ge("plus",T2);/**
|
|
171
|
+
* @license lucide-react v1.17.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const z2=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],A2=Ge("receipt-text",z2);/**
|
|
176
|
+
* @license lucide-react v1.17.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const R2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],_2=Ge("refresh-cw",R2);/**
|
|
181
|
+
* @license lucide-react v1.17.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const O2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Uo=Ge("search",O2);/**
|
|
186
|
+
* @license lucide-react v1.17.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const D2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],k2=Ge("shield-check",D2);/**
|
|
191
|
+
* @license lucide-react v1.17.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const U2=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],B2=Ge("smartphone",U2);/**
|
|
196
|
+
* @license lucide-react v1.17.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const H2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],L2=Ge("terminal",H2);/**
|
|
201
|
+
* @license lucide-react v1.17.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Q2=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],q2=Ge("timer",Q2);/**
|
|
206
|
+
* @license lucide-react v1.17.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const Y2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Dx=Ge("trash-2",Y2);/**
|
|
211
|
+
* @license lucide-react v1.17.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const G2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],K2=Ge("trending-up",G2);/**
|
|
216
|
+
* @license lucide-react v1.17.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const X2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]],rn=Ge("wallet-cards",X2);/**
|
|
221
|
+
* @license lucide-react v1.17.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const V2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Br=Ge("x",V2);class kx extends Error{constructor(s,u,d){super(s);ed(this,"status");ed(this,"code");this.status=u,this.code=d}}async function da(n){var s,u;const i=await fetch(n);if(!i.ok){const d=await i.json().catch(()=>({}));throw new kx(((s=d.error)==null?void 0:s.message)??`${n} returned ${i.status}`,i.status,(u=d.error)==null?void 0:u.code)}return i.json()}async function kl(n,i,s){var d,h;const u=await fetch(i,{method:n,headers:s?{"content-type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!u.ok){const m=await u.json().catch(()=>({}));throw new kx(((d=m.error)==null?void 0:d.message)??`${n} ${i} returned ${u.status}`,u.status,(h=m.error)==null?void 0:h.code)}return u.json()}function Bo(){return ca({queryKey:["ledger","inferences"],queryFn:()=>da("/ledger/inferences"),refetchInterval:1e4})}function Ux(){return ca({queryKey:["ledger","purchases"],queryFn:()=>da("/ledger/purchases"),refetchInterval:1e4})}function Bx(){return ca({queryKey:["payments"],queryFn:()=>da("/payments"),refetchInterval:1e4})}function Hx(){const n=Zr();return Ri({mutationFn:()=>kl("POST","/payments/clawtip/activate"),onSuccess:()=>{n.invalidateQueries({queryKey:["payments"]})}})}function Lx(){return Ri({mutationFn:()=>kl("POST","/payments/clawtip/recharge")})}function Qx(){return ca({queryKey:["providers","status"],queryFn:()=>da("/providers/status"),refetchInterval:1e4})}function Z2(){return Ri({mutationFn:n=>kl("POST","/providers/install/preview",n)})}function $2(){const n=Zr();return Ri({mutationFn:i=>kl("POST","/providers/install/apply",i),onSuccess:()=>{n.invalidateQueries({queryKey:["providers","status"]}),n.invalidateQueries({queryKey:["init","state"]})}})}function qx(){return ca({queryKey:["routing","strategy"],queryFn:()=>da("/routing/strategy")})}function Yx(){const n=Zr();return Ri({mutationFn:i=>kl("PUT","/routing/strategy",i),onSuccess:()=>{n.invalidateQueries({queryKey:["routing","strategy"]})}})}function J2(n){const i=new URLSearchParams;for(const[s,u]of Object.entries(n))u!=null&&u!==""&&i.set(s,F2(u));return ca({queryKey:["routing","preview",i.toString()],queryFn:()=>da(`/routing/preview?${i.toString()}`),enabled:!1})}function F2(n){return Array.isArray(n)?n.join(","):typeof n=="object"&&n!==null?Object.entries(n).map(([i,s])=>`${i}:${s}`).join(","):String(n)}function Gx(){return ca({queryKey:["sellers"],queryFn:()=>da("/sellers"),refetchInterval:3e4})}function lf(){return ca({queryKey:["models"],queryFn:()=>da("/models"),refetchInterval:3e4})}function W2(){return ca({queryKey:["prewarm","focus-set"],queryFn:()=>da("/v1.2/prewarm").then(n=>({ok:!0,focusSet:n.focusSet??[],source:"historical"}))})}async function Mo(n){const i=Array.isArray(n)?{models:n}:n;return kl("PUT","/prewarm/focus-set",i)}function Kx(){return ca({queryKey:["status"],queryFn:()=>da("/status"),refetchInterval:5e3})}function yt({children:n,className:i=""}){return o.jsx("div",{className:["rounded-[12px] border border-[var(--color-line-2)] bg-white shadow-[0_12px_36px_rgba(60,41,112,0.08)]",i].join(" "),children:n})}function nf({tone:n="lavender",children:i}){const s={lavender:"bg-[var(--color-lavender)] text-[var(--color-purple)]",green:"bg-emerald-50 text-emerald-700",amber:"bg-amber-50 text-amber-700",red:"bg-rose-50 text-rose-700",blue:"bg-indigo-50 text-indigo-700",gray:"bg-slate-100 text-slate-600"};return o.jsxs("span",{className:["inline-flex items-center gap-1.5 text-[0.78rem] font-medium px-2.5 py-0.5 rounded-full",s[n]??s.lavender].join(" "),children:[o.jsx("span",{className:"size-1.5 rounded-full bg-current"}),i]})}const P2=[{method:"alipay-agent",name:"Alipay Agent Payment",icon:"A"},{method:"wechat-pay",name:"WeChat Pay",icon:"W"},{method:"coinbase-smart-wallet",name:"Coinbase Smart Wallet",icon:"C"}];function Tv(){var fe,he,be,ue,U,$,ie,ge,je,w,_,Z,P,G,ae,se,Ee,Ae,Ot,na,Na;const[n,i]=j.useState(null),s=Kx(),u=qx(),d=Bx(),h=Qx(),m=Hx(),x=Lx(),p=d.refetch,v=m.reset,g=Bo(),b=Ux(),E=Gx(),T=lf(),z=((fe=g.data)==null?void 0:fe.inferences)??[],O=((he=b.data)==null?void 0:he.purchases)??[],L=((be=d.data)==null?void 0:be.payments)??[],k=new Set((((ue=T.data)==null?void 0:ue.data)??[]).map(Se=>Se.id)).size,K=((U=E.data)==null?void 0:U.sellers.length)??((ie=($=T.data)==null?void 0:$.sellers)==null?void 0:ie.length)??0,Q=j.useMemo(()=>uj(z,O),[z,O]),X=j.useMemo(()=>cj(L,z),[z,L]),te=L.some(Se=>aa(Se.method)==="clawtip"&&(Se.enabled||Jx(Se.config,"walletConfigPresent")))||((ge=m.data)==null?void 0:ge.walletConfigPresent)===!0,V=((je=s.data)==null?void 0:je.status)==="running"&&!s.isError,J=new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),I=((w=u.data)==null?void 0:w.strategy.mode)??((_=s.data)==null?void 0:_.sellerRoutingMode)??"—",oe=((Z=u.data)==null?void 0:Z.strategy.scorer)??((P=s.data)==null?void 0:P.sellerRoutingScorer)??"—",W=()=>{i(null),m.reset(),x.reset()};return j.useEffect(()=>{if((n==null?void 0:n.kind)!=="activate"||aa(n.method)!=="clawtip"||te)return;const Se=window.setInterval(()=>{p()},1500);return()=>window.clearInterval(Se)},[te,n==null?void 0:n.kind,n==null?void 0:n.method,p]),j.useEffect(()=>{(n==null?void 0:n.kind)==="activate"&&aa(n.method)==="clawtip"&&te&&(i(null),v())},[te,n==null?void 0:n.kind,n==null?void 0:n.method,v]),o.jsxs("div",{className:"min-w-0 overflow-x-hidden space-y-3",children:[o.jsxs("section",{className:"grid grid-cols-2 gap-2.5 md:grid-cols-3 xl:grid-cols-6",children:[o.jsx(ui,{to:"/routing",icon:o.jsx(S2,{className:"size-4"}),label:"Router",value:I,note:`${oe} scorer`,tone:"router"}),o.jsx(ui,{to:"/ledger",icon:o.jsx(Cv,{className:"size-4"}),label:"Today requests",value:Q.todayRequestCount.toLocaleString(),note:`${Q.totalRequestCount.toLocaleString()} total`,tone:"requests"}),o.jsx(ui,{to:"/ledger",icon:o.jsx(Ei,{className:"size-4"}),label:"Spend today",value:mi(Q.todaySpendMicros,4),note:`${mi(Q.totalSpendMicros,4)} total`,tone:"spend"}),o.jsx(ui,{to:"/ledger",icon:o.jsx(Ev,{className:"size-4"}),label:"Today tokens",value:ci(Q.todayInputTokens+Q.todayOutputTokens),note:`In ${ci(Q.todayInputTokens)} / Out ${ci(Q.todayOutputTokens)}`,tone:"todayTokens"}),o.jsx(ui,{to:"/ledger",icon:o.jsx(Cv,{className:"size-4"}),label:"Total tokens",value:ci(Q.inputTokens+Q.outputTokens),note:`In ${ci(Q.inputTokens)} / Out ${ci(Q.outputTokens)}`,tone:"tokens"}),o.jsx(ui,{to:"/routing",icon:o.jsx(Ev,{className:"size-4"}),label:"Models / Sellers",value:`${k}`,note:`${K} sellers`,tone:"capacity"})]}),o.jsxs("section",{className:"grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1.45fr)_minmax(260px,0.8fr)]",children:[o.jsxs("div",{className:"min-w-0 space-y-3",children:[o.jsxs(yt,{className:"p-3.5",children:[o.jsx("div",{className:"flex items-start justify-between gap-4",children:o.jsx("div",{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-[1rem] font-semibold text-[var(--color-ink)]",children:"Payment management"}),o.jsx(nf,{tone:L.some(Se=>Se.enabled)?"green":"amber",children:L.some(Se=>Se.enabled)?"configured":"not configured"})]})})}),o.jsx("div",{className:"mt-2 min-w-0 overflow-hidden rounded-[10px] border border-[var(--color-line-2)] bg-white",children:X.map(Se=>o.jsx(tj,{...Se,onActivate:()=>{i({kind:"activate",method:Se.method}),Se.method==="clawtip"&&m.mutate()},onRecharge:()=>{i({kind:"recharge",method:Se.method}),Se.method==="clawtip"&&x.mutate()}},Se.method))})]}),o.jsxs(yt,{className:"p-3",children:[o.jsxs("div",{className:"mb-2 flex min-w-0 flex-col gap-2",children:[o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(K2,{className:"size-4 shrink-0 text-[var(--color-purple)]"}),o.jsx("h2",{className:"truncate text-[1rem] font-semibold text-[var(--color-ink)]",children:"TokenUsage"})]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[o.jsx(fd,{icon:o.jsx(Ei,{className:"size-3.5"}),label:"Weekly spend",value:mi(Q.weeklySpendMicros),tone:"spend"}),o.jsx(fd,{icon:o.jsx(m2,{className:"size-3.5"}),label:"Completed purchases",value:Q.completedPurchases.toString(),tone:"ok"}),o.jsx(fd,{icon:o.jsx(Ox,{className:"size-3.5"}),label:"Pending purchases",value:Q.pendingPurchases.toString(),tone:"warn"})]})]}),o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1 text-[0.7rem] text-[var(--color-muted)]",children:[Q.modelUsage.map(Se=>o.jsx(rj,{model:Se.model,color:Se.color},Se.model)),o.jsx(zv,{label:"in"}),o.jsx(zv,{label:"out",dashed:!0})]})]}),o.jsxs("div",{className:"grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1fr)_190px]",children:[o.jsx(lj,{days:Q.days,series:Q.modelUsage}),o.jsxs("div",{className:"grid gap-3",children:[o.jsx(nj,{days:Q.days,values:Q.cost,total:mi(Q.weeklySpendMicros)}),o.jsx(ij,{values:Q.thirtyDaySpend,total:mi(Q.totalSpendMicros)})]})]})]})]}),o.jsx("aside",{className:"min-w-0 space-y-3",children:o.jsx(I2,{clients:((G=h.data)==null?void 0:G.clients)??[],configuredCount:((ae=h.data)==null?void 0:ae.summary.configuredCount)??0,installCommand:((se=h.data)==null?void 0:se.summary.installCommand)??"tb init",loading:h.isLoading,error:h.error})})]}),o.jsx(sj,{checkedAt:J,healthy:V,pid:(Ee=s.data)==null?void 0:Ee.pid,status:(Ae=s.data)==null?void 0:Ae.status,proxyPort:(Ot=s.data)==null?void 0:Ot.proxyPort,controlPort:(na=s.data)==null?void 0:na.controlPort,registryUrl:(Na=s.data)==null?void 0:Na.sellerRegistryUrl}),n?o.jsx(aj,{modal:n,methods:X,qr:n.kind==="activate"?m.data:x.data,loading:n.kind==="activate"?m.isPending:x.isPending,error:n.kind==="activate"?m.error:x.error,onClose:W}):null]})}function I2({clients:n,configuredCount:i,installCommand:s,loading:u,error:d}){const[h,m]=j.useState(!1),x=[...n].sort((v,g)=>Rv(v.status)-Rv(g.status)||v.name.localeCompare(g.name)),p=async()=>{await $x(s)&&(m(!0),window.setTimeout(()=>m(!1),1500))};return o.jsxs(yt,{className:"p-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(L2,{className:"size-4 text-[var(--color-purple)]"}),o.jsx("h2",{className:"text-[1rem] font-semibold text-[var(--color-ink)]",children:"Client tools"})]}),o.jsxs("span",{className:"font-mono text-[0.74rem] text-[var(--color-muted)]",children:[i," configured"]})]}),o.jsx("div",{className:"mt-3 rounded-[10px] border border-indigo-100 bg-indigo-50 px-3 py-2",children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-[0.78rem] font-medium text-indigo-900",children:"Provider install runs in CLI"}),o.jsxs("div",{className:"mt-0.5 text-[0.74rem] text-indigo-900/70",children:["Run ",o.jsx("span",{className:"font-mono",children:s})," to install or repair client configs."]})]}),o.jsx("button",{className:"shrink-0 rounded-[8px] bg-indigo-600 px-2.5 py-1.5 text-[0.72rem] font-semibold text-white shadow-[0_8px_18px_rgba(79,70,229,0.16)] transition hover:bg-indigo-700 active:translate-y-px",onClick:p,children:h?"Copied":"CLI"})]})}),o.jsx("div",{className:"mt-3 grid gap-2",children:u?o.jsxs("div",{className:"flex items-center gap-2 rounded-[9px] border border-[var(--color-line-2)] bg-white px-3 py-2 text-[0.78rem] text-[var(--color-muted)]",children:[o.jsx(pt,{className:"size-4 animate-spin text-[var(--color-purple)]"}),"Checking local client configs..."]}):d?o.jsx("div",{className:"rounded-[9px] border border-rose-100 bg-rose-50 px-3 py-2 text-[0.78rem] text-rose-700",children:d instanceof Error?d.message:String(d)}):x.map(v=>o.jsx(ej,{client:v},v.id))})]})}function ej({client:n}){const[i,s]=j.useState(!1),u=mj(n.status),d=n.status==="manual"?n.reason:Zx(n.configPath??n.reason),h=async()=>{!n.manualConfig||!await $x(hj(n.manualConfig))||(s(!0),window.setTimeout(()=>s(!1),1500))};return o.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-[9px] border border-[var(--color-line-2)] bg-white px-3 py-2",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:"truncate text-[0.82rem] font-semibold text-[var(--color-ink)]",children:n.name}),n.commandName?o.jsx("span",{className:"font-mono text-[0.68rem] text-[var(--color-muted)]",children:n.commandName}):null]}),o.jsx("div",{className:"mt-0.5 truncate text-[0.72rem] text-[var(--color-muted)]",children:d})]}),o.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[o.jsx("span",{className:["rounded-[7px] px-2 py-0.5 text-[0.68rem] font-semibold uppercase",u].join(" "),children:n.status}),n.manualConfig?o.jsx("button",{className:"rounded-[7px] border border-indigo-100 bg-indigo-50 px-2 py-1 text-[0.68rem] font-semibold text-indigo-700 transition hover:bg-indigo-100 active:translate-y-px",onClick:h,children:i?"Copied":"Copy"}):null]})]})}function ui({to:n,icon:i,label:s,value:u,note:d,tone:h}){const m={router:{card:"border border-[var(--color-lavender-2)] bg-white shadow-[0_14px_30px_rgba(124,61,240,0.14)] hover:border-[var(--color-purple)] before:bg-[var(--color-purple)]",icon:"bg-[var(--color-lavender)] text-[var(--color-purple)]",label:"text-[var(--color-purple)]/72",value:"text-[var(--color-ink)]",note:"text-[var(--color-muted)]"},requests:{card:"border border-emerald-100 bg-white shadow-[0_10px_24px_rgba(16,185,129,0.08)] hover:border-emerald-200 before:bg-emerald-500",icon:"bg-emerald-50 text-emerald-700",label:"text-emerald-700/72",value:"text-[var(--color-ink)]",note:"text-emerald-950/58"},spend:{card:"border border-teal-100 bg-white shadow-[0_10px_24px_rgba(15,118,110,0.08)] hover:border-teal-200 before:bg-teal-600",icon:"bg-teal-50 text-teal-700",label:"text-teal-700/72",value:"text-[var(--color-ink)]",note:"text-teal-900/62"},todayTokens:{card:"border border-amber-100 bg-white shadow-[0_10px_24px_rgba(245,158,11,0.08)] hover:border-amber-200 before:bg-amber-500",icon:"bg-amber-50 text-amber-700",label:"text-amber-800/70",value:"text-[var(--color-ink)]",note:"text-amber-950/58"},tokens:{card:"border border-violet-100 bg-white shadow-[0_10px_24px_rgba(124,61,240,0.08)] hover:border-violet-200 before:bg-[var(--color-purple)]",icon:"bg-[var(--color-lavender)] text-[var(--color-purple)]",label:"text-[var(--color-purple)]/72",value:"text-[var(--color-ink)]",note:"text-[var(--color-muted)]"},capacity:{card:"border border-amber-100 bg-white shadow-[0_10px_24px_rgba(245,158,11,0.08)] hover:border-amber-200 before:bg-amber-500",icon:"bg-amber-50 text-amber-700",label:"text-amber-800/70",value:"text-[var(--color-ink)]",note:"text-amber-950/58"}}[h];return o.jsxs(Do,{to:n,"aria-label":`Open ${s}`,className:["relative block min-h-[94px] overflow-hidden rounded-[10px] p-3 transition before:absolute before:inset-y-0 before:left-0 before:w-1 hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-[var(--color-purple)]",m.card].join(" "),children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:`grid size-7 place-items-center rounded-[8px] ${m.icon}`,children:i}),o.jsx("span",{className:["text-right text-[0.66rem] font-semibold uppercase leading-3",m.label].join(" "),children:s})]}),o.jsx("div",{className:["mt-2 text-[1.25rem] font-semibold leading-none",m.value].join(" "),children:u}),o.jsx("div",{className:["mt-1.5 truncate text-[0.72rem]",m.note].join(" "),children:d})]})}function tj({name:n,method:i,balance:s,status:u,note:d,action:h,icon:m,balanceHidden:x,onActivate:p,onRecharge:v}){const g=u==="Bound",b=u==="Coming soon",E=g&&x&&aa(i)==="clawtip";return o.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_74px_82px] items-center gap-2 border-b border-[var(--color-line-2)] px-2 py-2.5 last:border-b-0 sm:grid-cols-[minmax(0,1fr)_96px_92px] sm:gap-3 sm:px-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("div",{className:["grid size-8 shrink-0 place-items-center rounded-[8px] text-[0.8rem] font-bold",g?"bg-[var(--color-lavender)] text-[var(--color-purple)]":"bg-[var(--color-page)] text-[var(--color-muted)]"].join(" "),children:m}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"truncate font-semibold text-[var(--color-ink)]",children:n}),d?o.jsx("div",{className:"mt-0.5 truncate text-[0.74rem] text-[var(--color-muted)]",children:d}):null]})})]}),E?o.jsxs("button",{type:"button",className:"inline-flex w-fit items-center gap-1 rounded-[7px] border border-[var(--color-lavender-2)] bg-[var(--color-lavender)] px-2 py-1 font-mono text-[0.82rem] font-semibold text-[var(--color-purple)] transition hover:border-[var(--color-purple)] hover:bg-white active:translate-y-px",onClick:v,"aria-label":"Scan with JD app to view ClawTip wallet balance",title:"Scan with JD app to view wallet balance",children:[o.jsx(E2,{className:"size-3.5"}),"••••"]}):o.jsx("div",{className:"font-mono text-[0.9rem] font-semibold text-[var(--color-ink)]",children:s}),b?o.jsx("span",{className:"text-right text-[0.76rem] font-semibold text-[var(--color-muted)]",children:"Coming soon"}):o.jsx("button",{className:"rounded-[8px] bg-[var(--color-purple)] px-2.5 py-1.5 text-[0.76rem] font-semibold text-white shadow-[0_8px_18px_rgba(124,61,240,0.16)] transition hover:bg-[#6e32dc] active:translate-y-px",onClick:g?v:p,"aria-label":`${h} ${n}`,children:h})]})}function aj({modal:n,methods:i,qr:s,loading:u,error:d,onClose:h}){const m=n.kind==="recharge",x=i.find(O=>O.method===n.method),p=m&&aa(n.method)==="clawtip",v=md(x==null?void 0:x.config,"resourceUrl"),g=md(x==null?void 0:x.config,"walletConfigPath"),b=md(x==null?void 0:x.config,"orderNo"),E=(s==null?void 0:s.walletConfigPresent)===!0||Jx(x==null?void 0:x.config,"walletConfigPresent"),T=!m&&!!(s!=null&&s.qrImageUrl)&&!E&&!d,z=(x==null?void 0:x.name)??Xx(n.method);return o.jsx("div",{className:"fixed inset-0 z-30 grid place-items-center overflow-y-auto bg-[rgba(32,26,56,0.28)] px-4 py-6",children:o.jsxs("div",{className:"w-full max-w-[820px] rounded-[14px] bg-white p-5 shadow-[0_20px_56px_rgba(32,26,56,0.20)] sm:p-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-[1.05rem] font-semibold text-[var(--color-ink)]",children:p?"ClawTip wallet QR":m?`Recharge ${z}`:`Activate ${z}`}),o.jsx("p",{className:"mt-1 text-[0.82rem] leading-5 text-[var(--color-muted)]",children:p?"Scan with JD app to view wallet balance or recharge.":m?"Load the fixed ClawTip recharge QR from static assets.":"Reuse the tb init ClawTip flow and wait for wallet binding."})]}),o.jsx("button",{className:"rounded-[7px] p-1.5 text-[var(--color-muted)] transition hover:bg-[var(--color-page)]",onClick:h,"aria-label":"Close payment modal",children:o.jsx(Br,{className:"size-4"})})]}),o.jsxs("div",{className:"mt-5 flex flex-col gap-4",children:[o.jsx("div",{className:"mx-auto grid min-h-[320px] w-full max-w-[720px] place-items-center overflow-hidden rounded-[12px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-3 sm:min-h-[560px] sm:p-4",children:s!=null&&s.qrImageUrl?o.jsx("img",{className:"max-h-[72vh] w-full object-contain",src:s.qrImageUrl,alt:`${z} ${m?"recharge":"activation"} QR code`}):o.jsxs("div",{className:"flex flex-col items-center gap-2 px-3 text-center text-[0.78rem] leading-5 text-[var(--color-muted)]",children:[u?o.jsx(pt,{className:"size-5 animate-spin text-[var(--color-purple)]"}):null,o.jsx("span",{children:u?"Generating ClawTip QR...":"QR image unavailable"})]})}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[o.jsx(zr,{label:"Method",value:z}),o.jsx(zr,{label:"Wallet",value:E?"bound":"waiting",warn:!E}),s!=null&&s.orderNo||b?o.jsx(zr,{label:"Order",value:(s==null?void 0:s.orderNo)??b??""}):null,s!=null&&s.walletConfigPath||g?o.jsx(zr,{label:"Config",value:Zx((s==null?void 0:s.walletConfigPath)??g??"")}):null,s!=null&&s.clawtipId?o.jsx(zr,{label:"Device",value:s.clawtipId}):null]}),d?o.jsx("div",{className:"rounded-[8px] border border-rose-100 bg-rose-50 px-3 py-2 text-[0.78rem] leading-5 text-rose-700",children:d instanceof Error?d.message:String(d)}):null,s!=null&&s.qrImageUrl?o.jsx("div",{className:"rounded-[8px] border border-emerald-100 bg-emerald-50 px-3 py-2 text-[0.78rem] leading-5 text-emerald-800",children:m?"Scan with JD app to view wallet balance or recharge.":o.jsxs("span",{className:"flex items-start gap-2",children:[T?o.jsx(pt,{className:"mt-0.5 size-4 shrink-0 animate-spin"}):null,o.jsx("span",{children:E?"Wallet bound. Closing...":"Scan with JD app. TokenBuddy is waiting for the local wallet config."})]})}):null,s!=null&&s.resourceUrl||v?o.jsx("a",{className:"block rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 py-2 font-mono text-[0.75rem] text-[var(--color-purple)] transition hover:bg-[var(--color-lavender)]",href:(s==null?void 0:s.resourceUrl)??v,target:"_blank",rel:"noreferrer",children:Vx((s==null?void 0:s.resourceUrl)??v??"")}):!(s!=null&&s.qrImageUrl)&&!u&&!d?o.jsxs("div",{className:"rounded-[8px] border border-amber-100 bg-amber-50 px-3 py-2 text-[0.78rem] leading-5 text-amber-800",children:["No recharge link is available from the daemon. Run ",o.jsx("span",{className:"font-mono",children:"tb init"})," to bind this payment method."]}):null]})]})]})})}function lj({days:n,series:i}){const d={top:14,right:18,bottom:26,left:26},h=i.flatMap(v=>[...v.input,...v.output]),m=Math.max(1,...h),x=v=>d.left+v*(680-d.left-d.right)/Math.max(1,n.length-1),p=v=>d.top+(1-v/m)*(150-d.top-d.bottom);return o.jsx("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-1.5",children:o.jsxs("svg",{className:"h-[160px] w-full",viewBox:"0 0 680 150",role:"img","aria-label":"Daily model input and output usage lines",children:[[.25,.5,.75,1].map(v=>o.jsx("line",{x1:d.left,x2:680-d.right,y1:d.top+(1-v)*(150-d.top-d.bottom),y2:d.top+(1-v)*(150-d.top-d.bottom),stroke:"#eee9fb",strokeWidth:"1"},v)),n.map((v,g)=>o.jsx("text",{x:x(g),y:143,textAnchor:"middle",className:"fill-[var(--color-muted)] text-[10px]",children:v},v)),i.map(v=>o.jsxs("g",{children:[o.jsx("path",{d:Bd(v.input.map((g,b)=>[x(b),p(g)])),fill:"none",stroke:v.color,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:Bd(v.output.map((g,b)=>[x(b),p(g)])),fill:"none",stroke:v.color,strokeWidth:"2.4",strokeDasharray:"5 5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.75"}),v.input.map((g,b)=>o.jsx("circle",{cx:x(b),cy:p(g),r:"2.7",fill:v.color},`${v.model}-input-${b}`)),v.output.map((g,b)=>o.jsx("circle",{cx:x(b),cy:p(g),r:"2.2",fill:"#fff",stroke:v.color,strokeWidth:"1.8"},`${v.model}-output-${b}`))]},v.model)),i.length===0?o.jsx("text",{x:680/2,y:150/2,textAnchor:"middle",className:"fill-[var(--color-muted)] text-[12px]",children:"No token usage yet"}):null]})})}function nj({days:n,values:i,total:s}){const h={top:10,right:8,bottom:16,left:8},m=Math.max(1,...i),x=v=>h.left+v*(190-h.left-h.right)/Math.max(1,i.length-1),p=v=>h.top+(1-v/m)*(72-h.top-h.bottom);return o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-1.5",children:[o.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[o.jsx("span",{className:"text-[0.74rem] font-semibold text-[var(--color-ink)]",children:"Cost curve"}),o.jsx("span",{className:"font-mono text-[0.74rem] text-[var(--color-muted)]",children:s})]}),o.jsxs("svg",{className:"h-[66px] w-full",viewBox:"0 0 190 72",role:"img","aria-label":"Daily cost curve",children:[o.jsx("path",{d:Bd(i.map((v,g)=>[x(g),p(v)])),fill:"none",stroke:"#f59e0b",strokeWidth:"3",strokeLinecap:"round"}),i.map((v,g)=>o.jsx("circle",{cx:x(g),cy:p(v),r:"2.4",fill:"#f59e0b"},n[g]))]})]})}function ij({values:n,total:i}){const s=Math.max(1,...n);return o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-1.5",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-[0.74rem] font-semibold text-[var(--color-ink)]",children:"30 day spend"}),o.jsx("span",{className:"font-mono text-[0.74rem] text-[var(--color-muted)]",children:i})]}),o.jsx("div",{className:"flex h-[60px] items-end gap-1",children:n.map((u,d)=>o.jsx("span",{className:"flex-1 rounded-t-[3px] bg-[var(--color-purple)]/75",style:{height:`${Math.max(8,u/s*100)}%`}},d))})]})}function Bd(n){return n.length===0?"":n.length===1?`M ${n[0][0]} ${n[0][1]}`:n.reduce((i,s,u)=>{if(u===0)return`M ${s[0]} ${s[1]}`;const d=n[u-1],h=(d[0]+s[0])/2;return`${i} C ${h} ${d[1]}, ${h} ${s[1]}, ${s[0]} ${s[1]}`},"")}function fd({icon:n,label:i,value:s,tone:u}){const d={spend:"border-teal-100 bg-teal-50 text-teal-700",ok:"border-emerald-100 bg-emerald-50 text-emerald-700",warn:"border-amber-100 bg-amber-50 text-amber-700"}[u];return o.jsxs("div",{className:["inline-flex h-7 items-center gap-1.5 rounded-[8px] border px-2",d].join(" "),title:i,"aria-label":`${i}: ${s}`,children:[n,o.jsx("span",{className:"font-mono text-[0.78rem] font-semibold text-[var(--color-ink)]",children:s})]})}function rj({model:n,color:i}){return o.jsxs("span",{className:"inline-flex min-w-0 max-w-[9rem] items-center gap-1.5 rounded-[7px] border border-[var(--color-line-2)] bg-white px-1.5 py-0.5",title:n,children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:i}}),o.jsx("span",{className:"truncate font-mono text-[0.68rem]",children:n})]})}function zv({label:n,dashed:i=!1}){return o.jsxs("span",{className:"inline-flex items-center gap-1 rounded-[7px] border border-[var(--color-line-2)] bg-white px-1.5 py-0.5",children:[o.jsx("span",{className:["h-px w-4 border-t border-[var(--color-ink)]",i?"border-dashed":""].join(" ")}),o.jsx("span",{className:"font-mono text-[0.68rem]",children:n})]})}function zr({label:n,value:i,warn:s=!1}){return o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("div",{className:"text-[0.78rem] text-[var(--color-muted)]",children:n}),o.jsx("div",{className:["font-mono text-[0.94rem] font-semibold",s?"text-amber-700":"text-[var(--color-ink)]"].join(" "),children:i})]})}function sj({checkedAt:n,healthy:i,pid:s,status:u,proxyPort:d,controlPort:h,registryUrl:m}){const x=[{icon:"D",label:"Daemon",value:s?`pid ${s}`:u??"unknown",tone:i?"green":"amber"},{icon:"P",label:"Proxy",value:d?`:${d}`:"—",tone:"blue"},{icon:"C",label:"Control",value:h?`:${h}`:"—",tone:"purple"},{icon:"R",label:"Registry",value:m?Vx(m):"—",tone:"amber"}];return o.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-[12px] border border-[var(--color-line-2)] bg-white px-3 py-2 shadow-[0_12px_28px_rgba(41,31,84,0.06)]",children:[o.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[8px] border border-[var(--color-line-2)] bg-white px-2.5 py-1 text-[0.72rem] font-medium text-[var(--color-muted)]",children:[o.jsx(_2,{className:"size-3.5"}),n]}),x.map(p=>o.jsx(oj,{...p},p.label))]})}function oj({icon:n,label:i,value:s,tone:u}){const d={green:"bg-emerald-50 text-emerald-700",blue:"bg-blue-50 text-blue-700",purple:"bg-[var(--color-lavender)] text-[var(--color-purple)]",amber:"bg-amber-50 text-amber-700"}[u];return o.jsxs("div",{className:"inline-flex min-w-0 max-w-full items-center gap-2 rounded-[8px] border border-[var(--color-line-2)] bg-white px-2.5 py-1",children:[o.jsx("span",{className:["grid size-5 shrink-0 place-items-center rounded-[6px] text-[0.62rem] font-bold",d].join(" "),children:n}),o.jsx("span",{className:"text-[0.72rem] font-semibold text-[var(--color-ink)]",children:i}),o.jsx("span",{className:"min-w-0 truncate font-mono text-[0.72rem] text-[var(--color-muted)]",children:s})]})}function uj(n,i){const s=Av(7),u=Av(30),d=Hd(new Date),h=new Set(s.map(V=>V.key)),m=new Map(u.map((V,J)=>[V.key,J])),x=["#7c3df0","#0f9f7a","#2563eb","#f59e0b"],p=new Map,v=s.map(()=>0),g=u.map(()=>0);let b=0,E=0,T=0,z=0,O=0,L=0,k=0,K=0,Q=0;for(const V of n){const J=Hd(new Date(V.createdAt)),I=V.billedMicros??0,oe=V.promptTokens??0,W=V.completionTokens??0;Q+=1,E+=I,z+=oe,O+=W,J===d&&(K+=1,b+=I,L+=oe,k+=W);const fe=s.findIndex(be=>be.key===J);if(fe>=0){T+=I,v[fe]+=I/1e6;const be=p.get(V.modelId)??{input:s.map(()=>0),output:s.map(()=>0),total:0};be.input[fe]+=oe,be.output[fe]+=W,be.total+=oe+W,p.set(V.modelId,be)}else h.has(J)&&(T+=I);const he=m.get(J);he!==void 0&&(g[he]+=I/1e6)}const X=i.filter(V=>fj(V.status)).length,F=i.filter(V=>V.status==="pending").length,te=Array.from(p.entries()).sort((V,J)=>J[1].total-V[1].total).slice(0,4).map(([V,J],I)=>({model:V,color:x[I%x.length],input:J.input,output:J.output}));return{days:s.map(V=>V.label),modelUsage:te,cost:v,thirtyDaySpend:g,todaySpendMicros:b,totalSpendMicros:E,weeklySpendMicros:T,completedPurchases:X,pendingPurchases:F,inputTokens:z,outputTokens:O,todayInputTokens:L,todayOutputTokens:k,todayRequestCount:K,totalRequestCount:Q}}function cj(n,i){const s=new Map;for(const m of[...i].sort((x,p)=>x.createdAt.localeCompare(p.createdAt)))!m.paymentMethod||m.balanceSnapshotMicros===void 0||s.set(aa(m.paymentMethod),m.balanceSnapshotMicros);const u=[...n].filter(m=>aa(m.method)!=="mock").sort((m,x)=>Number(x.isDefault)-Number(m.isDefault)||m.method.localeCompare(x.method)).map(m=>{const x=aa(m.method),p=m.enabled||!!(m.config&&Object.keys(m.config).length>0),v=s.get(x),g=x==="clawtip";return{name:Xx(m.method),method:m.method,balance:g?"••••":v===void 0?"—":mi(v),status:m.enabled?"Bound":"Available",note:p?m.isDefault?"Default wallet":"Configured":"Not bound",action:m.enabled?"Recharge":"Activate",icon:dj(m.method),balanceHidden:g,config:m.config}}),d=new Set(u.map(m=>aa(m.method))),h=P2.filter(m=>!d.has(aa(m.method))).map(m=>({name:m.name,method:m.method,balance:"—",status:"Coming soon",note:"",action:"",icon:m.icon}));return[...u,...h]}function Av(n){const i=[],s=new Intl.DateTimeFormat("en",{weekday:"short"});for(let u=n-1;u>=0;u-=1){const d=new Date;d.setHours(0,0,0,0),d.setDate(d.getDate()-u),i.push({key:Hd(d),label:s.format(d)})}return i}function Hd(n){if(Number.isNaN(n.getTime()))return"";const i=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),u=String(n.getDate()).padStart(2,"0");return`${i}-${s}-${u}`}function Xx(n){const i=aa(n);return i==="clawtip"?"ClawTip":i==="alipay-agent"?"Alipay Agent Payment":i==="wechat-pay"?"WeChat Pay":i==="coinbase-smart-wallet"?"Coinbase Smart Wallet":n.split(/[-_\s]+/).filter(Boolean).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}function dj(n){const i=aa(n);return i==="clawtip"?"C":i==="wechat-pay"?"W":i==="alipay-agent"?"A":i.charAt(0).toUpperCase()||"P"}function aa(n){return n.trim().toLowerCase()}function fj(n){return n==="settled"||n==="active"||n==="completed"||n==="success"}function mi(n,i=2){return`$${(n/1e6).toFixed(i)}`}function ci(n){return Intl.NumberFormat("en",{notation:n>=1e4?"compact":"standard",maximumFractionDigits:n>=1e4?1:0}).format(n)}function Vx(n){try{const i=new URL(n),s=i.pathname==="/"?"":i.pathname;return`${i.host}${s}`.slice(0,34)}catch{return n.length>34?`${n.slice(0,31)}...`:n}}function Zx(n){const i=n.split("/");return i.length<=3?n:`.../${i.slice(-2).join("/")}`}function Rv(n){return n==="configured"?0:n==="installed"?1:n==="manual"?2:3}function mj(n){return n==="configured"?"bg-emerald-50 text-emerald-700":n==="installed"?"bg-amber-50 text-amber-700":n==="manual"?"bg-indigo-50 text-indigo-700":"bg-slate-100 text-slate-600"}async function $x(n){var s;if((s=navigator.clipboard)!=null&&s.writeText)try{return await navigator.clipboard.writeText(n),!0}catch{}const i=document.createElement("textarea");i.value=n,i.setAttribute("readonly",""),i.style.position="fixed",i.style.left="-9999px",i.style.top="0",document.body.appendChild(i),i.focus(),i.select(),i.setSelectionRange(0,i.value.length);try{return document.execCommand("copy")}finally{document.body.removeChild(i)}}function hj(n){return JSON.stringify({openaiCompatible:{baseURL:n.openaiBaseUrl,apiKey:n.apiKey},anthropicCompatible:{baseURL:n.anthropicBaseUrl,apiKey:n.apiKey}},null,2)}function md(n,i){const s=n==null?void 0:n[i];return typeof s=="string"&&s.length>0?s:void 0}function Jx(n,i){return(n==null?void 0:n[i])===!0}const Fx=[{value:"fullAuto",label:"Full auto",help:"Choose from all compatible sellers for each model."},{value:"fixedSet",label:"Fixed set",help:"Choose automatically within your selected seller set."},{value:"fixed",label:"Fixed",help:"Pin one fixed seller for each model."}],Wx=[{value:"balanced",label:"Balanced",help:"Balance reliability, speed, and cost."},{value:"speed",label:"Speed first",help:"Prioritize low TTFT and high throughput."},{value:"discount",label:"Cost first",help:"Prioritize discount and available balance."}];function pj(){var je,w,_,Z,P;const n=qx(),i=Yx(),s=Gx(),u=lf(),d=W2(),h=Bo(),[m,x]=j.useState({mode:"fullAuto",scorer:"balanced"}),[p,v]=j.useState([]),[g,b]=j.useState(""),[E,T]=j.useState(null),[z,O]=j.useState(null),L=J2({...m,modelId:g}),k=u.data,K=((je=s.data)==null?void 0:je.sellers)??[],Q=((w=d.data)==null?void 0:w.focusSet)??[],X=j.useMemo(()=>wj((k==null?void 0:k.data)??[],Q),[Q,k==null?void 0:k.data]),F=Cj(L.data),te=j.useMemo(()=>Mj(K,k,(F==null?void 0:F.routes)??[]),[k,F==null?void 0:F.routes,K]),V=j.useMemo(()=>p.map(G=>X.find(ae=>ae.id===G)).filter(n0),[X,p]),J=m.sellerIds??[],I=m.fixedByModel??{},oe=V.length,W=V.filter(G=>m.mode==="fixed"?!!I[G.id]:m.mode==="fixedSet"?J.length>0:!0).length,fe=j.useMemo(()=>{var G;return Ej(((G=h.data)==null?void 0:G.inferences)??[],F,g,m)},[g,m,(_=h.data)==null?void 0:_.inferences,F]);j.useEffect(()=>{var G;(G=n.data)!=null&&G.strategy&&x(n.data.strategy)},[(Z=n.data)==null?void 0:Z.strategy]),j.useEffect(()=>{if(p.length>0||X.length===0)return;const G=Q.filter(se=>X.some(Ee=>Ee.id===se)),ae=G.length>0?G:X.slice(0,2).map(se=>se.id);v(ae),b(ae[0]??"")},[Q,X,p.length]),j.useEffect(()=>{!g||p.includes(g)||b(p[0]??"")},[g,p]),j.useEffect(()=>{g&&L.refetch()},[g,m.mode,m.scorer,m.sellerId,(P=m.sellerIds)==null?void 0:P.join(","),Bj(m.fixedByModel)]);async function he(G){x(G),T(null);try{await i.mutateAsync(G)}catch(ae){T(ae instanceof Error?ae.message:String(ae))}}function be(G){v(ae=>{if(ae.includes(G)){const Ee=ae.filter(Ae=>Ae!==G);return g===G&&b(Ee[0]??""),Mo(Ee).catch(()=>{}),Ee}b(G);const se=[...ae,G];return Mo(se).catch(()=>{}),se})}function ue(G){v(ae=>{const se=ae.filter(Ee=>Ee!==G);return g===G&&b(se[0]??""),Mo(se).catch(()=>{}),se})}function U(G){const ae=Rj({...m,mode:G},te,g);he(ae)}function $(G){he({...m,scorer:G})}function ie(G,ae){const se=m.sellerIds??[],Ee=se.includes(ae)?se.filter(Ae=>Ae!==ae):[...se,ae];he({...m,mode:"fixedSet",sellerIds:Ee,sellerId:void 0})}function ge(G,ae){const se={...m.fixedByModel??{},[G]:ae};he({...m,mode:"fixed",fixedByModel:se,sellerId:void 0,sellerIds:void 0}),b(G),O(null)}return o.jsxs("div",{className:"space-y-5",children:[o.jsx("section",{children:o.jsxs(yt,{className:"p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-line-2)] px-4 py-3",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx("div",{className:"text-[0.78rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"Models"})}),o.jsxs("button",{type:"button",onClick:()=>O({kind:"models"}),className:"inline-flex items-center gap-1.5 rounded-[8px] bg-[var(--color-purple)] px-3 py-1.5 text-[0.78rem] font-semibold text-white hover:bg-[var(--color-purple-2)]","aria-label":"Add models",children:[o.jsx(Ud,{size:14}),"Add"]})]}),o.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[V.map(G=>{const ae=g===G.id,se=G.sellerCount>0;return o.jsxs("div",{className:["inline-flex min-h-9 items-center gap-2 rounded-[9px] border px-3 py-1.5 transition-colors",se?"border-[var(--color-lavender-2)] bg-[var(--color-lavender)] text-[var(--color-purple)] hover:border-[var(--color-purple)] hover:bg-white":"border-rose-200 bg-rose-50 text-rose-700 hover:bg-white",ae?"ring-2 ring-[var(--color-lavender-2)] ring-offset-1 ring-offset-white":""].join(" "),children:[o.jsx("button",{type:"button",onClick:()=>b(G.id),className:"flex items-center text-left",children:o.jsx("span",{className:["font-mono text-[0.82rem] font-semibold",se?"text-[var(--color-purple)]":"text-rose-700"].join(" "),children:G.id})}),o.jsx("button",{type:"button",onClick:()=>ue(G.id),className:["inline-flex size-5 items-center justify-center rounded-[6px]",se?"text-[var(--color-purple)]/70 hover:bg-white hover:text-[var(--color-purple)]":"text-rose-700/70 hover:bg-white hover:text-rose-700"].join(" "),"aria-label":`Remove ${G.id}`,children:o.jsx(Dx,{size:12})})]},G.id)}),V.length===0?o.jsx("div",{className:"px-4 py-8 text-center text-[0.88rem] text-[var(--color-muted)]",children:"No models yet. Click Add to add common models."}):null,d.isError?o.jsx("div",{className:"px-3 py-2 text-[0.82rem] text-amber-700",children:"Focus models could not be saved."}):null]})]})}),o.jsx("section",{children:o.jsx(yt,{className:"overflow-hidden",children:o.jsxs("div",{className:"p-5",children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[o.jsx("div",{className:"text-[0.78rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"Strategy"}),o.jsxs("div",{className:"text-[0.78rem] text-[var(--color-muted)]",children:[W,"/",Math.max(oe,1)," configured"]})]}),n.isLoading||s.isLoading||u.isLoading?o.jsx("div",{className:"mb-3 rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-2 text-[0.82rem] text-[var(--color-muted)]",children:"Loading routing data..."}):null,n.isError||s.isError||u.isError?o.jsx("div",{className:"mb-3 rounded-[10px] border border-rose-100 bg-rose-50 px-3 py-2 text-[0.82rem] text-rose-700",children:"Some routing data could not be loaded. Check that tb-proxyd is running."}):null,E?o.jsx("div",{className:"mb-3 rounded-[10px] border border-rose-100 bg-rose-50 px-3 py-2 text-[0.82rem] text-rose-700",children:E}):null,o.jsx("div",{className:"mb-5 grid grid-cols-1 gap-2 md:grid-cols-3",children:Fx.map(G=>o.jsx(jj,{active:m.mode===G.value,title:G.label,description:G.help,onClick:()=>U(G.value)},G.value))}),o.jsx("div",{className:"rounded-[14px] border border-[var(--color-line-2)] bg-white p-4",children:o.jsx(vj,{mode:m.mode,scorer:m.scorer,selectedModels:V,fixedSetSellers:J,fixedByModel:I,sellers:te,activeModelId:g,onScorerChange:$,onOpenSellerPicker:O,onToggleFixedSetSeller:ie})})]})})}),o.jsx("section",{className:"xl:col-span-2",children:o.jsxs(yt,{className:"overflow-hidden",children:[o.jsx("div",{className:"border-b border-[var(--color-line-2)] px-4 py-3",children:o.jsx("div",{className:"text-[0.78rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"Recent decisions"})}),o.jsx("div",{className:"min-w-0 max-w-full overflow-x-auto",children:o.jsxs("table",{className:"w-full border-collapse text-left text-[0.82rem]",children:[o.jsx("thead",{className:"bg-white/70 text-[0.7rem] uppercase tracking-wider text-[var(--color-muted)]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Time"}),o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Model"}),o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Seller"}),o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Mode"}),o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Scoring"}),o.jsx("th",{className:"px-4 py-2 font-semibold",children:"Reason"})]})}),o.jsxs("tbody",{className:"divide-y divide-[var(--color-line-2)] bg-white",children:[fe.slice(0,5).map(G=>o.jsxs("tr",{children:[o.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 font-mono text-[var(--color-muted)]",children:G.time}),o.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 font-mono font-semibold text-[var(--color-ink)]",children:G.modelId}),o.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 text-[var(--color-purple)]",children:t0(G.sellerId,te)}),o.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 text-[var(--color-muted)]",children:Qj(G.mode)}),o.jsx("td",{className:"whitespace-nowrap px-4 py-2.5 text-[var(--color-muted)]",children:Lj(G.scorer)}),o.jsx("td",{className:"min-w-[260px] px-4 py-2.5 text-[var(--color-muted)]",children:G.reason})]},`${G.time}-${G.modelId}`)),fe.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-muted)]",children:"No routing decisions yet."})}):null]})]})})]})}),(z==null?void 0:z.kind)==="models"?o.jsx(bj,{models:X,selectedModelIds:p,onClose:()=>O(null),onToggle:be}):null,(z==null?void 0:z.kind)==="sellers"?o.jsx(gj,{modelId:z.modelId,selection:z.selection,selectedSellerIds:z.selection==="single"?I[z.modelId]?[I[z.modelId]]:[]:J,scorer:m.scorer,sellers:te,onClose:()=>O(null),onToggle:G=>{z.selection==="single"?ge(z.modelId,G):ie(z.modelId,G)}}):null]})}function vj({mode:n,scorer:i,selectedModels:s,fixedSetSellers:u,fixedByModel:d,sellers:h,activeModelId:m,onScorerChange:x,onOpenSellerPicker:p,onToggleFixedSetSeller:v}){var E;const g=qj(s,m),b=(E=g[0])==null?void 0:E.id;return n==="fullAuto"?o.jsx("div",{children:o.jsx(_v,{scorer:i,onChange:x})}):n==="fixedSet"?o.jsxs("div",{className:"space-y-3",children:[o.jsx(_v,{scorer:i,onChange:x}),o.jsx(xj,{modelId:b,sellers:h,sellerIds:u,onChoose:T=>p({kind:"sellers",modelId:T,selection:"multi"}),onRemove:T=>{b&&v(b,T)}})]}):o.jsx("div",{className:"space-y-3",children:o.jsx(yj,{selectedModels:g,activeModelId:m,resolveValue:T=>t0(d[T],h),onChoose:T=>p({kind:"sellers",modelId:T,selection:"single"})})})}function _v({scorer:n,onChange:i}){return o.jsx("div",{className:"rounded-[12px] border border-[var(--color-line-2)] bg-white p-1.5",children:o.jsx("div",{className:"grid grid-cols-1 gap-1.5 md:grid-cols-3",children:Wx.map(s=>o.jsxs("button",{type:"button",onClick:()=>i(s.value),"aria-label":`Routing scorer: ${s.label}`,className:["flex min-h-14 items-center gap-2 rounded-[9px] px-3 py-2 text-left transition-colors",n===s.value?"bg-[var(--color-lavender)] text-[var(--color-ink)]":"text-[var(--color-muted)] hover:bg-[var(--color-lavender)]/40"].join(" "),children:[o.jsx(Ho,{active:n===s.value,fixed:!0}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block text-[0.86rem] font-semibold",children:s.label}),o.jsx("span",{className:"block truncate text-[0.72rem] text-[var(--color-muted)]",children:s.help})]})]},s.value))})})}function xj({modelId:n,sellers:i,sellerIds:s,onChoose:u,onRemove:d}){if(!n)return o.jsx("div",{className:"rounded-[12px] border border-[var(--color-line-2)] bg-white px-3 py-4 text-[0.86rem] text-[var(--color-muted)]",children:"Add models before configuring a seller set."});const h=s.map(m=>i.find(x=>x.id===m)).filter(n0);return o.jsxs("div",{className:"overflow-hidden rounded-[12px] border border-[var(--color-line-2)] bg-white",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-[var(--color-line-2)] bg-white/70 px-3 py-2.5",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx("div",{className:"text-[0.78rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"Sellers"})}),o.jsx("button",{type:"button",onClick:()=>u(n),className:"rounded-[8px] border border-[var(--color-lavender-2)] bg-[var(--color-lavender)] px-3 py-1.5 text-[0.78rem] font-semibold text-[var(--color-purple)] hover:bg-white","aria-label":`Add sellers to fixed set for ${n}`,children:"Add sellers"})]}),h.length>0?o.jsx("div",{className:"min-w-0 max-w-full overflow-x-auto",children:o.jsxs("table",{className:"w-full border-collapse text-left text-[0.82rem]",children:[o.jsx("thead",{className:"bg-white/70 text-[0.68rem] uppercase tracking-wider text-[var(--color-muted)]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Seller"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Discount"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Markup fee"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Payment"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"TTFT"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Tok/s"}),o.jsx("th",{className:"w-10 px-3 py-2 font-semibold"})]})}),o.jsx("tbody",{className:"divide-y divide-[var(--color-line-2)] bg-white",children:h.map(m=>o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2.5 font-semibold text-[var(--color-ink)]",children:m.name}),o.jsxs("td",{className:"whitespace-nowrap px-3 py-2.5 text-right",children:[o.jsx("div",{className:"font-mono font-semibold text-[var(--color-purple)]",children:m.discount}),o.jsx("div",{className:"mt-0.5 font-mono text-[0.72rem] text-[var(--color-muted)]",children:m.price})]}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:m.markupFee}),o.jsx("td",{className:"px-3 py-2.5 text-[var(--color-muted)]",children:m.paymentMethods.join(", ")}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:Ix(m.latencyMs)}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:e0(m.tokensPerSecond)}),o.jsx("td",{className:"px-3 py-2.5 text-right",children:o.jsx("button",{type:"button",onClick:()=>d(m.id),className:"inline-flex size-7 items-center justify-center rounded-[7px] text-[var(--color-muted)] hover:bg-rose-50 hover:text-rose-700","aria-label":`Remove ${m.name}`,children:o.jsx(Dx,{size:14})})})]},m.id))})]})}):o.jsx("div",{className:"px-3 py-8 text-center text-[0.86rem] text-[var(--color-muted)]",children:"No sellers yet. Click Add sellers to build the fixed set."})]})}function yj({selectedModels:n,activeModelId:i,resolveValue:s,onChoose:u}){return n.length===0?o.jsx("div",{className:"rounded-[12px] border border-[var(--color-line-2)] bg-white px-3 py-4 text-[0.86rem] text-[var(--color-muted)]",children:"Add models before configuring sellers."}):o.jsx("div",{className:"divide-y divide-[var(--color-line-2)] rounded-[12px] border border-[var(--color-line-2)] bg-white",children:n.map(d=>o.jsxs("div",{className:["flex flex-wrap items-center gap-3 px-3 py-3",i===d.id?"bg-[var(--color-lavender)]/55":""].join(" "),children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx("div",{className:"truncate font-mono text-[0.88rem] font-semibold text-[var(--color-ink)]",children:d.id})}),o.jsxs("div",{className:"min-w-0 flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>u(d.id),className:"max-w-[240px] truncate rounded-[8px] border border-[var(--color-lavender-2)] bg-[var(--color-lavender)] px-3 py-1.5 text-[0.78rem] font-semibold text-[var(--color-purple)] hover:bg-white","aria-label":`Choose seller for ${d.id}`,children:s(d.id)}),o.jsx("button",{type:"button",onClick:()=>u(d.id),className:"rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 py-1.5 text-[0.78rem] font-semibold text-[var(--color-muted)] hover:border-[var(--color-lavender-2)] hover:text-[var(--color-purple)]","aria-label":`Reselect seller for ${d.id}`,children:"Reselect"})]})]},d.id))})}function bj({models:n,selectedModelIds:i,onClose:s,onToggle:u}){const[d,h]=j.useState(""),m=n.filter(x=>l0(d,[x.id,x.paymentMethod,x.enabled?"enabled":"not enabled"]));return o.jsxs(Px,{title:"Add models",onClose:s,children:[o.jsx(a0,{value:d,onChange:h,placeholder:"Search models or payment"}),o.jsx("div",{className:"mt-3 overflow-hidden rounded-[12px] border border-[var(--color-line-2)]",children:o.jsxs("table",{className:"w-full border-collapse text-left text-[0.84rem]",children:[o.jsx("thead",{className:"bg-white/70 text-[0.7rem] uppercase tracking-wider text-[var(--color-muted)]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"w-10 px-3 py-2 font-semibold"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Model"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Payment"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Sellers"})]})}),o.jsxs("tbody",{className:"divide-y divide-[var(--color-line-2)] bg-white",children:[m.map(x=>{const p=i.includes(x.id);return o.jsxs("tr",{onClick:()=>u(x.id),className:["cursor-pointer",p?"bg-[var(--color-lavender)]/70":"hover:bg-[var(--color-lavender)]/35",x.enabled?"":"opacity-60"].join(" "),children:[o.jsx("td",{className:"px-3 py-2.5",children:o.jsx(Ho,{active:p,fixed:!1})}),o.jsx("td",{className:"px-3 py-2.5 font-mono font-semibold text-[var(--color-ink)]",children:x.id}),o.jsx("td",{className:"px-3 py-2.5",children:o.jsx(Sj,{enabled:x.enabled,paymentMethod:x.paymentMethod})}),o.jsx("td",{className:"px-3 py-2.5 text-right text-[var(--color-muted)]",children:x.sellerCount})]},x.id)}),m.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:4,className:"px-3 py-8 text-center text-[var(--color-muted)]",children:"No models found."})}):null]})]})})]})}function gj({modelId:n,selection:i,selectedSellerIds:s,scorer:u,sellers:d,onClose:h,onToggle:m}){const[x,p]=j.useState(""),g=Nj(d.filter(b=>b.coverageModelIds.includes(n)),[n],u).filter(b=>l0(x,[b.name,b.id,b.paymentMethods.join(" "),b.health,b.notes.join(" ")]));return o.jsxs(Px,{title:`Choose seller · ${n}`,onClose:h,children:[o.jsx(a0,{value:x,onChange:p,placeholder:"Search sellers, payment, notes"}),o.jsx("div",{className:"mt-3 overflow-hidden rounded-[12px] border border-[var(--color-line-2)]",children:o.jsxs("table",{className:"w-full border-collapse text-left text-[0.82rem]",children:[o.jsx("thead",{className:"bg-white/70 text-[0.7rem] uppercase tracking-wider text-[var(--color-muted)]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"w-10 px-3 py-2 font-semibold"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Seller"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Discount"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Markup fee"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"Payment"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"TTFT"}),o.jsx("th",{className:"px-3 py-2 text-right font-semibold",children:"Tok/s"})]})}),o.jsxs("tbody",{className:"divide-y divide-[var(--color-line-2)] bg-white",children:[g.map(b=>{const E=s.includes(b.id);return o.jsxs("tr",{onClick:()=>m(b.id),className:["cursor-pointer",E?"bg-[var(--color-lavender)]/70":"hover:bg-[var(--color-lavender)]/35"].join(" "),children:[o.jsx("td",{className:"px-3 py-2.5",children:o.jsx(Ho,{active:E,fixed:i==="single"})}),o.jsx("td",{className:"px-3 py-2.5 font-semibold text-[var(--color-ink)]",children:b.name}),o.jsxs("td",{className:"whitespace-nowrap px-3 py-2.5 text-right",children:[o.jsx("div",{className:"font-mono font-semibold text-[var(--color-purple)]",children:b.discount}),o.jsx("div",{className:"mt-0.5 font-mono text-[0.72rem] text-[var(--color-muted)]",children:b.price})]}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:b.markupFee}),o.jsx("td",{className:"px-3 py-2.5 text-[var(--color-muted)]",children:b.paymentMethods.join(", ")}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:Ix(b.latencyMs)}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:e0(b.tokensPerSecond)})]},b.id)}),g.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:7,className:"px-3 py-8 text-center text-[var(--color-muted)]",children:"No sellers found."})}):null]})]})})]})}function Px({title:n,children:i,onClose:s}){return o.jsx("div",{className:"fixed inset-0 z-30 flex items-center justify-center bg-[#201a38]/35 px-4 py-6 backdrop-blur-sm",children:o.jsxs("div",{className:"max-h-[86dvh] w-full max-w-[820px] overflow-hidden rounded-[14px] border border-[var(--color-line-2)] bg-white shadow-[0_24px_70px_rgba(32,26,56,0.22)]",children:[o.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--color-line-2)] px-5 py-4",children:[o.jsx("div",{className:"min-w-0 flex-1 truncate text-[1rem] font-semibold text-[var(--color-ink)]",children:n}),o.jsx("button",{type:"button",onClick:s,className:"inline-flex size-8 items-center justify-center rounded-[8px] text-[var(--color-muted)] hover:bg-[var(--color-lavender)] hover:text-[var(--color-purple)]","aria-label":"Close",children:o.jsx(Br,{size:16})})]}),o.jsx("div",{className:"max-h-[calc(86dvh-65px)] overflow-auto p-4",children:i})]})})}function jj({active:n,title:i,description:s,onClick:u}){return o.jsxs("button",{type:"button",onClick:u,"aria-label":`Set ${i} routing mode`,className:["min-h-[86px] rounded-[12px] border px-3 py-2.5 text-left transition-all",n?"border-[var(--color-lavender-2)] bg-[var(--color-lavender)] text-[var(--color-ink)]":"border-[var(--color-line-2)] bg-white text-[var(--color-muted)] hover:border-[var(--color-line)]"].join(" "),children:[o.jsxs("span",{className:"flex items-center gap-2 font-mono text-[0.86rem] font-semibold",children:[o.jsx(Ho,{active:n,fixed:!0}),i]}),o.jsx("span",{className:"mt-1.5 block text-[0.74rem] leading-snug text-[var(--color-muted)]",children:s})]})}function Sj({enabled:n,paymentMethod:i}){return o.jsxs("span",{className:["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[0.72rem] ring-1",n?"bg-emerald-50 text-emerald-700 ring-emerald-100":"bg-slate-100 text-slate-500 ring-slate-200"].join(" "),children:[n?o.jsx(k2,{size:12}):o.jsx(kd,{size:12}),i," ",n?"enabled":"not enabled"]})}function Ho({active:n,fixed:i}){return o.jsx("span",{className:["inline-flex size-5 shrink-0 items-center justify-center border",i?"rounded-full":"rounded-[6px]",n?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line)] bg-white text-transparent"].join(" "),children:o.jsx(Kt,{size:13,strokeWidth:2.4})})}function Nj(n,i,s){return[...n].sort((u,d)=>{const h=Ov(u,i),m=Ov(d,i);return h!==m?m-h:s==="speed"?Uj(u.latencyMs,d.latencyMs):s==="discount"?Number.parseInt(d.discount,10)-Number.parseInt(u.discount,10):d.healthScore-u.healthScore})}function wj(n,i){const s=new Map;for(const d of n){const h=s.get(d.id)??{sellerIds:new Set,paymentMethods:new Set};h.sellerIds.add(d.sellerId);for(const m of d.paymentMethods)h.paymentMethods.add(m);s.set(d.id,h)}const u=new Map(i.map((d,h)=>[d,h]));return Array.from(s.entries()).map(([d,h])=>({id:d,paymentMethod:Array.from(h.paymentMethods)[0]??"-",enabled:h.sellerIds.size>0,sellerCount:h.sellerIds.size})).sort((d,h)=>{const m=u.get(d.id),x=u.get(h.id);return m!==void 0||x!==void 0?(m??9999)-(x??9999):d.id.localeCompare(h.id)})}function Mj(n,i,s){const u=(i==null?void 0:i.data)??[],d=new Map(((i==null?void 0:i.sellers)??[]).map(m=>[m.id,m])),h=new Map(s.map(m=>[m.seller.id,m]));return n.map((m,x)=>{var z;const p=h.get(m.id),v=d.get(m.id),g=Array.from(new Set(u.filter(O=>O.sellerId===m.id).map(O=>O.id))),b=(p==null?void 0:p.metrics.ttftMs)??(p==null?void 0:p.metrics.avgLatencyMs),E=p==null?void 0:p.metrics.healthScore,T=(p==null?void 0:p.metrics.discountRatio)??(v==null?void 0:v.discountRatio);return{id:m.id,name:Hj(m.name??(v==null?void 0:v.name)??m.id),endpoint:m.url,health:(v==null?void 0:v.status)==="error"||(v==null?void 0:v.status)==="manifest_unavailable"||m.status==="failed"?"offline":m.status==="degraded"?"degraded":"online",healthScore:Number.isFinite(E)?Math.round(E):0,coverageModelIds:g,paymentMethods:(v==null?void 0:v.paymentMethods)??m.paymentMethods??[],discount:Oj(T),markupFee:Dj(v==null?void 0:v.serviceFeeRatio),price:p?"preview":"registry",latencyMs:Number.isFinite(b)?Math.round(b):void 0,tokensPerSecond:void 0,notes:[((z=m.supportedProtocols)==null?void 0:z.join(", "))||"no protocols",`registry #${x+1}`]}})}function Cj(n){if(n)return n.plan??{routes:n.routes,mode:n.mode,scorer:n.scorer,reason:n.reason}}function Ej(n,i,s,u){var m,x;const d=n.slice(-5).reverse().map(p=>{const v=Tj(p.routeReason);return{time:kj(p.createdAt),modelId:p.modelId,sellerId:p.sellerKey,mode:(v==null?void 0:v.mode)??u.mode,scorer:(v==null?void 0:v.scorer)??u.scorer,status:p.fallbackCount&&p.fallbackCount>0?"fallback":"selected",reason:p.routeReason||p.status,chain:p.falloverChain??[]}});if(d.length>0)return d;const h=(m=i==null?void 0:i.routes)==null?void 0:m[0];return h?[{time:"Preview",modelId:s||"-",sellerId:h.seller.id,mode:i.mode??u.mode,scorer:i.scorer??u.scorer,status:"selected",reason:i.reason??"Current preview route.",chain:((x=i.routes)==null?void 0:x.map(p=>p.seller.id))??[]}]:[]}function Tj(n){const[i,s]=(n==null?void 0:n.split(":"))??[];if(zj(i)&&Aj(s))return{mode:i,scorer:s}}function zj(n){return n==="fixed"||n==="fixedSet"||n==="fullAuto"}function Aj(n){return n==="speed"||n==="discount"||n==="balanced"}function Rj(n,i,s){var u,d;if(n.mode==="fixed"){const h={...n.fixedByModel??{}},m=((u=_j(i,s))==null?void 0:u.id)||((d=i[0])==null?void 0:d.id);return s&&!h[s]&&m&&(h[s]=m),{mode:"fixed",scorer:n.scorer,fixedByModel:h}}if(n.mode==="fixedSet"){const h=n.sellerIds&&n.sellerIds.length>0?n.sellerIds:i.filter(m=>!s||m.coverageModelIds.includes(s)).slice(0,2).map(m=>m.id);return{mode:"fixedSet",scorer:n.scorer,sellerIds:h}}return{mode:"fullAuto",scorer:n.scorer}}function _j(n,i){return n.find(s=>!i||s.coverageModelIds.includes(i))}function Oj(n){if(!Number.isFinite(n))return"-";const i=Math.max(0,1-n);return`${Math.round(i*100)}%`}function Dj(n){return Number.isFinite(n)?`${Math.round(n*100)}%`:"-"}function Ix(n){return Number.isFinite(n)?`${Math.round(n)}ms`:"-"}function e0(n){return Number.isFinite(n)?`${Math.round(n)}`:"-"}function kj(n){const i=new Date(n);return Number.isNaN(i.getTime())?n:i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Ov(n,i){return i.length===0?n.coverageModelIds.length:i.filter(s=>n.coverageModelIds.includes(s)).length}function Uj(n,i){const s=Number.isFinite(n),u=Number.isFinite(i);return s&&u?n-i:s?-1:u?1:0}function t0(n,i){var s;return n?((s=i.find(u=>u.id===n))==null?void 0:s.name)??n:"Not selected"}function Bj(n){return Object.entries(n??{}).sort(([i],[s])=>i.localeCompare(s)).map(([i,s])=>`${i}:${s}`).join(",")}function Hj(n){var i;return((i=n.split("(")[0])==null?void 0:i.trim())||n}function Lj(n){var i;return((i=Wx.find(s=>s.value===n))==null?void 0:i.label)??n}function a0({value:n,onChange:i,placeholder:s}){return o.jsxs("label",{className:"flex items-center gap-2 rounded-[12px] border border-[var(--color-line-2)] bg-white px-3 py-2 text-[0.84rem] text-[var(--color-muted)]",children:[o.jsx(Uo,{size:15}),o.jsx("input",{name:"routing-search",value:n,onChange:u=>i(u.target.value),placeholder:s,className:"min-w-0 flex-1 bg-transparent font-mono text-[0.84rem] text-[var(--color-ink)] outline-none placeholder:text-[var(--color-faint)]"})]})}function l0(n,i){const s=n.trim().toLowerCase();return s?i.some(u=>u.toLowerCase().includes(s)):!0}function Qj(n){var i;return((i=Fx.find(s=>s.value===n))==null?void 0:i.label)??n}function qj(n,i){return i?[...n].sort((s,u)=>s.id===i?-1:u.id===i?1:0):n}function n0(n){return n!==void 0}function i0({totalItems:n,pageSize:i,page:s,onPageChange:u,onPageSizeChange:d,pageSizeOptions:h=[25,50,100]}){const m=Math.max(1,Math.ceil(n/i)),x=j.useMemo(()=>Yj(s,m),[s,m]);if(n===0)return null;const p=(s-1)*i+1,v=Math.min(s*i,n);return o.jsxs("div",{className:"flex flex-col gap-3 border-t border-[var(--color-line-2)] bg-[var(--color-page)]/60 px-4 py-3 text-[0.85rem] lg:flex-row lg:items-center lg:justify-between",children:[o.jsxs("div",{className:"text-[var(--color-muted)]",children:["Showing ",o.jsx("span",{className:"font-mono font-semibold text-[var(--color-ink)]",children:p}),"-",o.jsx("span",{className:"font-mono font-semibold text-[var(--color-ink)]",children:v})," of"," ",o.jsx("span",{className:"font-mono font-semibold text-[var(--color-ink)]",children:n})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("label",{className:"text-[0.78rem] text-[var(--color-muted)]",children:"Rows"}),o.jsx("select",{className:"bg-[var(--color-card)] border border-[var(--color-line-2)] rounded px-1.5 py-0.5 text-[0.85rem] text-[var(--color-ink)] focus:outline-none focus:border-[var(--color-purple)]",value:i,onChange:g=>{const b=Math.max(1,Number(g.target.value)||25);d==null||d(b),u(1)},children:h.map(g=>o.jsx("option",{value:g,children:g},g))}),o.jsxs("div",{className:"ml-2 flex items-center gap-1",children:[o.jsx("button",{type:"button",disabled:s<=1,onClick:()=>u(1),className:"px-2 py-0.5 rounded border border-[var(--color-line-2)] text-[var(--color-ink)] disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--color-lavender)]/40",title:"First page","aria-label":"First page",children:"«"}),o.jsx("button",{type:"button",disabled:s<=1,onClick:()=>u(s-1),className:"px-2 py-0.5 rounded border border-[var(--color-line-2)] text-[var(--color-ink)] disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--color-lavender)]/40",title:"Previous page","aria-label":"Previous page",children:"‹"}),x.map((g,b)=>g==="…"?o.jsx("span",{className:"px-1.5 text-[var(--color-muted)]",children:"…"},`gap-${b}`):o.jsx("button",{type:"button",onClick:()=>u(g),"aria-label":`Page ${g}`,"aria-current":g===s?"page":void 0,className:g===s?"px-2.5 py-0.5 rounded bg-[var(--color-purple)] text-white font-medium":"px-2.5 py-0.5 rounded border border-[var(--color-line-2)] text-[var(--color-ink)] hover:bg-[var(--color-lavender)]/40",children:g},g)),o.jsx("button",{type:"button",disabled:s>=m,onClick:()=>u(s+1),className:"px-2 py-0.5 rounded border border-[var(--color-line-2)] text-[var(--color-ink)] disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--color-lavender)]/40",title:"Next page","aria-label":"Next page",children:"›"}),o.jsx("button",{type:"button",disabled:s>=m,onClick:()=>u(m),className:"px-2 py-0.5 rounded border border-[var(--color-line-2)] text-[var(--color-ink)] disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--color-lavender)]/40",title:"Last page","aria-label":"Last page",children:"»"}),o.jsx("span",{className:"ml-2 text-[0.78rem] text-[var(--color-muted)]",children:"Go to"}),o.jsx("input",{type:"number",min:1,max:m,defaultValue:s,"aria-label":"Go to page",onKeyDown:g=>{if(g.key==="Enter"){const b=Math.max(1,Math.min(m,Number(g.target.value)||1));u(b)}},className:"w-14 bg-[var(--color-card)] border border-[var(--color-line-2)] rounded px-1.5 py-0.5 text-[0.85rem] text-[var(--color-ink)] text-center focus:outline-none focus:border-[var(--color-purple)]"}),o.jsx("span",{className:"text-[0.78rem] text-[var(--color-muted)]",children:"page"})]})]})]})}function Yj(n,i){if(i<=7)return Array.from({length:i},(d,h)=>h+1);const s=[],u=d=>{s[s.length-1]!==d&&s.push(d)};u(1),n>4&&u("…");for(let d=Math.max(2,n-1);d<=Math.min(i-1,n+1);d++)u(d);return n<i-3&&u("…"),u(i),s}const Ar=n=>n<10?`0${n}`:`${n}`;function Hr(n){if(!n)return"—";const i=new Date(n);return Number.isNaN(i.getTime())?"—":`${i.getFullYear()}-${Ar(i.getMonth()+1)}-${Ar(i.getDate())} ${Ar(i.getHours())}:${Ar(i.getMinutes())}:${Ar(i.getSeconds())}`}function Gj(){var je,w;const n=Bo(),i=Ux(),[s,u]=j.useState("inferences"),[d,h]=j.useState(""),[m,x]=j.useState("all"),[p,v]=j.useState("all"),[g,b]=j.useState("all"),[E,T]=j.useState("all"),[z,O]=j.useState(1),[L,k]=j.useState(1),[K,Q]=j.useState(25),[X,F]=j.useState(null),[te,V]=j.useState(null),J=n.isLoading||i.isLoading,I=((je=n.data)==null?void 0:je.inferences)??[],oe=((w=i.data)==null?void 0:w.purchases)??[],W=d.trim().toLowerCase(),fe=j.useMemo(()=>Jj(I,oe),[I,oe]),he=j.useMemo(()=>Fj(I),[I]),be=j.useMemo(()=>Wj(oe),[oe]),ue=j.useMemo(()=>I.filter(_=>m!=="all"&&_.status!==m||p!=="all"&&_.modelId!==p?!1:Pj(_,W)).sort((_,Z)=>Z.createdAt.localeCompare(_.createdAt)),[I,p,m,W]),U=j.useMemo(()=>oe.filter(_=>g!=="all"&&_.status!==g||E!=="all"&&_.paymentMethod!==E?!1:Ij(_,W)).sort((_,Z)=>Z.createdAt.localeCompare(_.createdAt)),[oe,E,g,W]),$=j.useMemo(()=>kv(ue,z,K),[ue,z,K]),ie=j.useMemo(()=>kv(U,L,K),[U,L,K]),ge=n.isError||i.isError;return j.useEffect(()=>{const _=Math.max(1,Math.ceil(ue.length/K));z>_&&O(_)},[ue.length,z,K]),j.useEffect(()=>{const _=Math.max(1,Math.ceil(U.length/K));L>_&&k(_)},[U.length,K,L]),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("section",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(bo,{icon:o.jsx(A2,{className:"size-5"}),label:"Inference spend",value:yn(fe.inferenceSpendMicros,4),detail:`${fe.inferenceCount.toLocaleString()} requests`,tone:"spend"}),o.jsx(bo,{icon:o.jsx(g2,{className:"size-5"}),label:"Token usage",value:hd(fe.inputTokens+fe.outputTokens),detail:`Input: ${hd(fe.inputTokens)} / Output: ${hd(fe.outputTokens)}`,tone:"tokens"}),o.jsx(bo,{icon:o.jsx(rn,{className:"size-5"}),label:"Purchase credit",value:yn(fe.purchaseCreditMicros,4),detail:`${fe.settledPurchases.toLocaleString()} settled`,tone:"credit"}),o.jsx(bo,{icon:o.jsx(Ox,{className:"size-5"}),label:"Average response",value:fe.averageDurationMs===void 0?"N/A":`${(fe.averageDurationMs/1e3).toFixed(2)}s`,detail:"Completed inference time",tone:"latency"})]}),o.jsxs(yt,{className:"overflow-hidden p-0",children:[o.jsxs("div",{className:"border-b border-[var(--color-line-2)] bg-white px-4 py-3",children:[o.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[o.jsx("div",{children:o.jsx("h1",{className:"text-[1.05rem] font-semibold text-[var(--color-ink)]",children:"Usage details"})}),o.jsxs("div",{className:"grid grid-cols-2 overflow-hidden rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-1",children:[o.jsx(Dv,{active:s==="inferences",count:ue.length,onClick:()=>u("inferences"),children:"Inferences"}),o.jsx(Dv,{active:s==="purchases",count:U.length,onClick:()=>u("purchases"),children:"Purchases"})]})]}),o.jsxs("div",{className:"mt-3 grid gap-2 lg:grid-cols-[minmax(220px,1fr)_160px_200px]",children:[o.jsxs("label",{className:"relative block",children:[o.jsx(Uo,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[var(--color-muted)]"}),o.jsx("input",{className:"h-9 w-full rounded-[8px] border border-[var(--color-line-2)] bg-white pl-9 pr-3 text-[0.86rem] text-[var(--color-ink)] outline-none transition placeholder:text-[var(--color-muted)] focus:border-[var(--color-purple)]",value:d,placeholder:s==="inferences"?"Search request, model, seller...":"Search purchase, method, seller...",onChange:_=>{h(_.target.value),O(1),k(1)}})]}),s==="inferences"?o.jsxs(o.Fragment,{children:[o.jsx(go,{label:"Status",value:m,options:he.statuses,onChange:_=>{x(_),O(1)}}),o.jsx(go,{label:"Model",value:p,options:he.models,onChange:_=>{v(_),O(1)}})]}):o.jsxs(o.Fragment,{children:[o.jsx(go,{label:"Status",value:g,options:be.statuses,onChange:_=>{b(_),k(1)}}),o.jsx(go,{label:"Method",value:E,options:be.methods,onChange:_=>{T(_),k(1)}})]})]})]}),ge?o.jsx("div",{className:"border-b border-rose-100 bg-rose-50 px-4 py-3 text-[0.86rem] text-rose-700",children:"Ledger data could not be loaded. The local daemon may be offline or missing ledger endpoints."}):null,J?o.jsx($j,{}):s==="inferences"?o.jsx(Kj,{entries:$,total:ue.length,page:z,pageSize:K,openId:X,onToggle:_=>F(X===_?null:_),onPageChange:O,onPageSizeChange:_=>{Q(_),O(1),k(1)}}):o.jsx(Xj,{entries:ie,total:U.length,page:L,pageSize:K,openId:te,onToggle:_=>V(te===_?null:_),onPageChange:k,onPageSizeChange:_=>{Q(_),O(1),k(1)}})]})]})}function bo({icon:n,label:i,value:s,detail:u,tone:d}){const h={spend:{card:"border-[#cceee6] bg-[#e8fbf7]",icon:"bg-white text-[#0f766e]",label:"text-[#0f766e]",value:"text-[#201a38]",accent:"bg-[#0f766e]"},tokens:{card:"border-[#d9e7ff] bg-[#eaf2ff]",icon:"bg-white text-[#2563eb]",label:"text-[#2563eb]",value:"text-[#201a38]",accent:"bg-[#2563eb]"},credit:{card:"border-[#dff8ec] bg-[#e8fff6]",icon:"bg-white text-emerald-700",label:"text-emerald-700",value:"text-[#201a38]",accent:"bg-emerald-500"},latency:{card:"border-[#f8d5de] bg-[#fff0f3]",icon:"bg-white text-[#ef5b78]",label:"text-[#ef5b78]",value:"text-[#201a38]",accent:"bg-[#ef5b78]"}}[d];return o.jsxs(yt,{className:["relative flex min-h-[7rem] items-center gap-4 overflow-hidden px-4 py-4",h.card].join(" "),children:[o.jsx("div",{className:["absolute inset-y-0 left-0 w-1",h.accent].join(" ")}),o.jsx("div",{className:["grid size-11 shrink-0 place-items-center rounded-[10px] shadow-sm",h.icon].join(" "),children:n}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:["text-[0.72rem] font-bold uppercase tracking-[0.08em]",h.label].join(" "),children:i}),o.jsx("div",{className:["mt-1 truncate font-mono text-[1.55rem] font-bold leading-none tracking-normal",h.value].join(" "),children:s}),o.jsx("div",{className:"mt-2 truncate text-[0.76rem] font-medium text-[var(--color-muted)]",children:u})]})]})}function Dv({active:n,count:i,onClick:s,children:u}){return o.jsxs("button",{type:"button",onClick:s,className:["inline-flex h-8 items-center justify-center gap-2 rounded-[8px] px-3 text-[0.82rem] font-semibold transition",n?"bg-white text-[var(--color-ink)] shadow-sm":"text-[var(--color-muted)] hover:text-[var(--color-ink)]"].join(" "),children:[o.jsx("span",{children:u}),o.jsx("span",{className:"font-mono text-[0.76rem]",children:i.toLocaleString()})]})}function go({label:n,value:i,options:s,onChange:u}){return o.jsxs("label",{className:"grid gap-1",children:[o.jsx("span",{className:"sr-only",children:n}),o.jsxs("select",{className:"h-9 rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.86rem] text-[var(--color-ink)] outline-none transition focus:border-[var(--color-purple)]",value:i,onChange:d=>u(d.target.value),children:[o.jsxs("option",{value:"all",children:["All ",n.toLowerCase()]}),s.map(d=>o.jsx("option",{value:d,children:d},d))]})]})}function Kj({entries:n,total:i,page:s,pageSize:u,openId:d,onToggle:h,onPageChange:m,onPageSizeChange:x}){return i===0?o.jsx(o0,{label:"inference records"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"min-w-0 max-w-full overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[1080px] text-[0.86rem]",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-[var(--color-page)]/70 text-left text-[0.7rem] font-semibold uppercase tracking-[0.08em] text-[var(--color-muted)]",children:[o.jsx("th",{className:"px-4 py-2.5",children:"When"}),o.jsx("th",{className:"px-4 py-2.5",children:"Request"}),o.jsx("th",{className:"px-4 py-2.5",children:"Model"}),o.jsx("th",{className:"px-4 py-2.5",children:"Seller"}),o.jsx("th",{className:"px-4 py-2.5 text-right",children:"Input"}),o.jsx("th",{className:"px-4 py-2.5 text-right",children:"Output"}),o.jsx("th",{className:"px-4 py-2.5 text-right",children:"Cost"}),o.jsx("th",{className:"px-4 py-2.5 text-right",children:"Latency"}),o.jsx("th",{className:"px-4 py-2.5",children:"Status"})]})}),n.map(p=>o.jsxs("tbody",{children:[o.jsxs("tr",{onClick:()=>h(p.requestId),className:"cursor-pointer border-t border-[var(--color-line-2)] transition hover:bg-[var(--color-lavender)]/25",children:[o.jsx("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-[0.76rem] text-[var(--color-muted)]",children:Hr(p.createdAt)}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(r0,{tone:"purple",children:o.jsx(q2,{className:"size-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"max-w-[180px] truncate font-mono text-[0.78rem] font-semibold text-[var(--color-ink)]",children:p.requestId}),o.jsx("div",{className:"mt-0.5 max-w-[180px] truncate text-[0.72rem] text-[var(--color-muted)]",children:p.endpoint})]})]})}),o.jsx("td",{className:"max-w-[190px] truncate px-4 py-3 text-[var(--color-ink)]",children:p.modelId}),o.jsx("td",{className:"px-4 py-3 font-mono text-[0.78rem] text-[var(--color-text)]",children:p.sellerKey}),o.jsx("td",{className:"px-4 py-3 text-right font-mono text-[0.82rem]",children:(p.promptTokens??0).toLocaleString()}),o.jsx("td",{className:"px-4 py-3 text-right font-mono text-[0.82rem]",children:(p.completionTokens??0).toLocaleString()}),o.jsx("td",{className:"px-4 py-3 text-right font-mono text-[0.82rem] font-semibold text-[var(--color-ink)]",children:yn(p.billedMicros??0,4)}),o.jsx("td",{className:"px-4 py-3 text-right font-mono text-[0.82rem] text-[var(--color-muted)]",children:p.durationMs===void 0?"N/A":`${p.durationMs}ms`}),o.jsx("td",{className:"px-4 py-3",children:o.jsx(nf,{tone:u0(p.status),children:p.status})})]}),d===p.requestId?o.jsx("tr",{children:o.jsx("td",{colSpan:9,className:"border-t border-[var(--color-line-2)] bg-[var(--color-page)]/70 px-5 py-4",children:o.jsx(Vj,{entry:p})})}):null]},p.requestId))]})}),o.jsx(i0,{totalItems:i,pageSize:u,page:s,onPageChange:m,onPageSizeChange:x})]})}function Xj({entries:n,total:i,page:s,pageSize:u,openId:d,onToggle:h,onPageChange:m,onPageSizeChange:x}){return i===0?o.jsx(o0,{label:"purchase records"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"min-w-0 max-w-full overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[980px] text-[0.86rem]",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-[var(--color-page)]/70 text-left text-[0.7rem] font-semibold uppercase tracking-[0.08em] text-[var(--color-muted)]",children:[o.jsx("th",{className:"px-4 py-2.5",children:"When"}),o.jsx("th",{className:"px-4 py-2.5",children:"Purchase"}),o.jsx("th",{className:"px-4 py-2.5",children:"Payment method"}),o.jsx("th",{className:"px-4 py-2.5",children:"Model"}),o.jsx("th",{className:"px-4 py-2.5",children:"Seller"}),o.jsx("th",{className:"px-4 py-2.5 text-right",children:"Credit"}),o.jsx("th",{className:"px-4 py-2.5",children:"Status"})]})}),n.map(p=>o.jsxs("tbody",{children:[o.jsxs("tr",{onClick:()=>h(p.purchaseId),className:"cursor-pointer border-t border-[var(--color-line-2)] transition hover:bg-[var(--color-lavender)]/25",children:[o.jsx("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-[0.76rem] text-[var(--color-muted)]",children:Hr(p.createdAt)}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(r0,{tone:"green",children:o.jsx(Ei,{className:"size-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"max-w-[210px] truncate font-mono text-[0.78rem] font-semibold text-[var(--color-ink)]",children:p.purchaseId}),o.jsx("div",{className:"mt-0.5 max-w-[210px] truncate text-[0.72rem] text-[var(--color-muted)]",children:p.paymentReferenceHash??"No reference hash"})]})]})}),o.jsx("td",{className:"px-4 py-3 text-[var(--color-ink)]",children:p.paymentMethod}),o.jsx("td",{className:"max-w-[180px] truncate px-4 py-3 text-[var(--color-ink)]",children:p.modelId}),o.jsx("td",{className:"px-4 py-3 font-mono text-[0.78rem] text-[var(--color-text)]",children:p.sellerKey}),o.jsxs("td",{className:"px-4 py-3 text-right font-mono text-[0.82rem] font-semibold text-emerald-700",children:["+",yn(p.creditMicros,4)]}),o.jsx("td",{className:"px-4 py-3",children:o.jsx(nf,{tone:u0(p.status),children:p.status})})]}),d===p.purchaseId?o.jsx("tr",{children:o.jsx("td",{colSpan:7,className:"border-t border-[var(--color-line-2)] bg-[var(--color-page)]/70 px-5 py-4",children:o.jsx(Zj,{entry:p})})}):null]},p.purchaseId))]})}),o.jsx(i0,{totalItems:i,pageSize:u,page:s,onPageChange:m,onPageSizeChange:x})]})}function r0({tone:n,children:i}){return o.jsx("div",{className:["grid size-9 shrink-0 place-items-center rounded-lg border",n==="purple"?"border-[var(--color-lavender-2)] bg-[var(--color-lavender)] text-[var(--color-purple)]":"border-emerald-100 bg-emerald-50 text-emerald-700"].join(" "),children:i})}function Vj({entry:n}){return o.jsx(s0,{rows:[["Request ID",n.requestId],["Created",Hr(n.createdAt)],["Endpoint",n.endpoint],["Payment method",n.paymentMethod??"N/A"],["Route",`${n.routeReason??"N/A"} -> ${n.sellerKey}`],["Fallback chain",n.falloverChain&&n.falloverChain.length>0?n.falloverChain.join(" -> "):"N/A"],["Upstream status",n.upstreamStatus??"N/A"],["TTFT / duration",`${n.ttftMs!==void 0?`${n.ttftMs}ms`:"N/A"} / ${n.durationMs!==void 0?`${n.durationMs}ms`:"N/A"}`],["Input / output tokens",`${(n.promptTokens??0).toLocaleString()} / ${(n.completionTokens??0).toLocaleString()}`],["Billed",yn(n.billedMicros??0,4)],["Balance after",n.balanceSnapshotMicros!==void 0?yn(n.balanceSnapshotMicros,4):"N/A"],["Prompt hash",n.promptHash?`${n.promptHash.slice(0,32)}...`:"N/A"],["Response hash",n.responseHash?`${n.responseHash.slice(0,32)}...`:"N/A"],["Price version",n.priceVersion??"N/A"]]})}function Zj({entry:n}){return o.jsx(s0,{rows:[["Purchase ID",n.purchaseId],["Created",Hr(n.createdAt)],["Completed",n.completedAt?Hr(n.completedAt):"N/A"],["Payment method",n.paymentMethod],["Payment reference",n.paymentReferenceHash?`${n.paymentReferenceHash.slice(0,32)}...`:"N/A"],["Credit",yn(n.creditMicros,4)],["Credit micros",n.creditMicros.toLocaleString()],["Currency",n.currency],["Seller",n.sellerKey],["Model",n.modelId]]})}function s0({rows:n}){return o.jsx("div",{className:"grid gap-x-4 gap-y-2 text-[0.84rem] sm:grid-cols-[150px_minmax(0,1fr)]",children:n.map(([i,s])=>o.jsxs("div",{className:"contents",children:[o.jsx("div",{className:"text-[var(--color-muted)]",children:i}),o.jsx("div",{className:"min-w-0 break-all font-mono text-[0.8rem] text-[var(--color-ink)]",children:s})]},i))})}function $j(){return o.jsx("div",{className:"space-y-2 px-4 py-4",children:Array.from({length:7},(n,i)=>o.jsx("div",{className:"h-12 rounded-lg bg-[var(--color-lavender)]/35"},i))})}function o0({label:n}){return o.jsxs("div",{className:"flex min-h-[220px] flex-col items-center justify-center px-6 py-10 text-center",children:[o.jsx("div",{className:"grid size-12 place-items-center rounded-xl border border-[var(--color-line-2)] bg-[var(--color-page)] text-[var(--color-purple)]",children:o.jsx(Uo,{className:"size-5"})}),o.jsxs("div",{className:"mt-4 font-semibold text-[var(--color-ink)]",children:["No matching ",n]}),o.jsx("div",{className:"mt-1 max-w-[360px] text-[0.86rem] text-[var(--color-muted)]",children:"Adjust the query or filters to inspect another slice of the local ledger."})]})}function Jj(n,i){const s=n.reduce((p,v)=>p+(v.billedMicros??0),0),u=i.reduce((p,v)=>p+v.creditMicros,0),d=n.reduce((p,v)=>p+(v.promptTokens??0),0),h=n.reduce((p,v)=>p+(v.completionTokens??0),0),m=n.map(p=>p.durationMs).filter(p=>p!==void 0),x=m.length===0?void 0:m.reduce((p,v)=>p+v,0)/m.length;return{inferenceCount:n.length,inferenceSpendMicros:s,purchaseCreditMicros:u,inputTokens:d,outputTokens:h,settledPurchases:i.filter(p=>eS(p.status)).length,averageDurationMs:x}}function Fj(n){return{statuses:Ao(n.map(i=>i.status)),models:Ao(n.map(i=>i.modelId))}}function Wj(n){return{statuses:Ao(n.map(i=>i.status)),methods:Ao(n.map(i=>i.paymentMethod))}}function Ao(n){return Array.from(new Set(n.filter(Boolean))).sort((i,s)=>i.localeCompare(s))}function Pj(n,i){return i?[n.requestId,n.sellerKey,n.modelId,n.endpoint,n.status,n.paymentMethod,n.routeReason,n.upstreamStatus].some(s=>s==null?void 0:s.toLowerCase().includes(i)):!0}function Ij(n,i){return i?[n.purchaseId,n.sellerKey,n.modelId,n.paymentMethod,n.status,n.currency,n.paymentReferenceHash].some(s=>s==null?void 0:s.toLowerCase().includes(i)):!0}function kv(n,i,s){const u=(i-1)*s;return n.slice(u,u+s)}function u0(n){return n==="ok"||n==="settled"||n==="completed"||n==="success"||n==="active"?"green":n==="fallback"||n==="pending"?"amber":n==="failed"||n==="error"||n==="canceled"?"red":"gray"}function eS(n){return n==="settled"||n==="active"||n==="completed"||n==="success"}function yn(n,i=2){return`$${(n/1e6).toFixed(i)}`}function hd(n){return Intl.NumberFormat("en",{notation:n>=1e4?"compact":"standard",maximumFractionDigits:n>=1e4?1:0}).format(n)}function tS(){return ca({queryKey:["init","state"],queryFn:()=>da("/init/state"),refetchInterval:1e4})}async function aS(n){return kl("POST","/init/complete",void 0)}function lS(){return Ri({mutationFn:()=>kl("POST","/init/doctor/run")})}const nS=[{value:"fullAuto",title:"全自动",body:"自动选择可用供应商。"},{value:"fixedSet",title:"固定供应商组",body:"在指定供应商组内切换。"},{value:"fixed",title:"固定供应商",body:"始终使用指定供应商。"}],iS=[{value:"balanced",title:"平衡模式",body:"综合速度、价格、健康度、余额。"},{value:"speed",title:"速度优先",body:"优先选择更快、吞吐量更高供应商。"},{value:"discount",title:"成本优先",body:"优先选择更低成本供应商。"}],Uv=[{index:1,label:"选择模型",value:"默认模型"},{index:2,label:"绑定钱包",value:"支付方式"},{index:3,label:"配置策略",value:"路由规则"},{index:4,label:"配置工具",value:"终端接入"}],rS=[{method:"wechat-pay",name:"WeChat Pay",detail:"微信支付入口预留"},{method:"alipay-agent",name:"Alipay Agent Payment",detail:"代理支付入口预留"},{method:"coinbase-smart-wallet",name:"Coinbase Smart Wallet",detail:"USDC 钱包入口预留"}],sS=["GPT","Claude","Gemini","DeepSeek","Kimi","Qwen","MiniMax","GLM","Doubao","Grok"];function oS(n){const i=new URLSearchParams(n);return i.has("verifyPaymentMethods")?2:(i.has("verifyPickerDom")||i.has("verifyNoIntro")||i.has("verifyCompact"),1)}function uS(){var Ir,es,ts,Hl,Ll,Ql,ha,ql,Ia,as,Oi,Sn;const[n,i]=j.useState(()=>oS(typeof window>"u"?"":window.location.search)),[s,u]=j.useState([]),[d,h]=j.useState(!1),[m,x]=j.useState(),[p,v]=j.useState(!1),[g,b]=j.useState(!1),[E,T]=j.useState("fullAuto"),[z,O]=j.useState("balanced"),[L,k]=j.useState(""),[K,Q]=j.useState([]),[X,F]=j.useState(),[te,V]=j.useState(""),[J,I]=j.useState([]),[oe,W]=j.useState({}),[fe,he]=j.useState(),[be,ue]=j.useState(),[U,$]=j.useState(!1),[ie,ge]=j.useState(null),[je,w]=j.useState(!1),[_,Z]=j.useState(),P=tS(),G=Kx(),ae=Yx(),se=Bx(),Ee=Qx(),Ae=Hx(),Ot=Lx(),na=Z2(),Na=$2(),Se=lS(),ct=lf(),bn=Bo(),Wa=j.useMemo(()=>{var ne;return mS(((ne=ct.data)==null?void 0:ne.data)??[])},[(Ir=ct.data)==null?void 0:Ir.data]),Qo=j.useMemo(()=>{var ne,Qe,Dt;return zS(((ne=ct.data)==null?void 0:ne.sellers)??[],((Qe=ct.data)==null?void 0:Qe.data)??[],((Dt=bn.data)==null?void 0:Dt.inferences)??[])},[(es=bn.data)==null?void 0:es.inferences,(ts=ct.data)==null?void 0:ts.data,(Hl=ct.data)==null?void 0:Hl.sellers]),gn=j.useMemo(()=>{var ne;return hS(Wa,s,((ne=P.data)==null?void 0:ne.recommendedModels)??[])},[(Ll=P.data)==null?void 0:Ll.recommendedModels,Wa,s]),fa=j.useMemo(()=>s.length>0?s:gn.map(ne=>ne.id),[gn,s]),Ul=`http://127.0.0.1:${((Ql=G.data)==null?void 0:Ql.proxyPort)??((ha=P.data)==null?void 0:ha.runtime.proxyPort)??17821}`,Pa=j.useMemo(()=>{var ne;return(((ne=Ee.data)==null?void 0:ne.clients)??[]).filter(Qe=>Qe.id!=="custom"&&Qe.detected)},[(ql=Ee.data)==null?void 0:ql.clients]),$r=((Ia=se.data)==null?void 0:Ia.payments.filter(ne=>ne.enabled&&Lo(ne.method)!=="mock"))??[],Jr=j.useMemo(()=>kS(E,z,L,K),[L,K,E,z]),bt=US({serviceReady:((as=G.data)==null?void 0:as.status)==="running",modelCount:Wa.length,routingMode:E,paymentReady:$r.length>0,configuredTools:((Oi=Ee.data)==null?void 0:Oi.summary.configuredCount)??0}),qo=((Sn=Se.data)==null?void 0:Sn.checks.map(BS))??bt;j.useEffect(()=>{p||!P.data||(u(P.data.focusSet),v(!0))},[P.data,p]),j.useEffect(()=>{te||s.length===0||V(s[0])},[te,s]),j.useEffect(()=>{g||Pa.length===0||(I(Pa.filter(ne=>!ne.configured).map(ne=>ne.id)),b(!0))},[g,Pa]),j.useEffect(()=>{n!==5||Se.data||Se.error||Se.isPending||Se.mutate()},[n,Se]),j.useEffect(()=>{var Dt;const ne=el=>{el.preventDefault(),ge(el),Z("浏览器已经允许直接安装 TokenBuddy。")},Qe=()=>{w(!0),ge(null),Z("TokenBuddy 桌面应用已安装。")};return window.addEventListener("beforeinstallprompt",ne),window.addEventListener("appinstalled",Qe),(Dt=window.matchMedia)!=null&&Dt.call(window,"(display-mode: standalone)").matches&&w(!0),()=>{window.removeEventListener("beforeinstallprompt",ne),window.removeEventListener("appinstalled",Qe)}},[]);const Fr=ne=>{x(void 0),u(Qe=>Qe.includes(ne)?Qe.filter(Dt=>Dt!==ne):[...Qe,ne])},Wr=async()=>{h(!0),x(void 0);try{await Mo(s),x("关注模型已保存。后续工具配置会优先参考这些模型。")}catch(ne){x(`保存失败:${ne instanceof Error?ne.message:String(ne)}`)}finally{h(!1)}},jn=async()=>{if(F(void 0),!Jr){F(E==="fixed"?"请选择一个固定供应商。":"请至少选择一个供应商。");return}try{await ae.mutateAsync(Jr),F("供应商路由策略已保存。"),i(4)}catch(ne){F(`保存失败:${ne instanceof Error?ne.message:String(ne)}`)}},Yo=async()=>{try{await Ae.mutateAsync()}catch{}},Pr=async()=>{try{await Ot.mutateAsync()}catch{}},Go=async()=>{he(void 0);const ne=te||fa[0];if(!ne){he("请先选择一个默认模型。");return}if(J.length===0){he("请选择至少一个要安装的终端工具。");return}try{await na.mutateAsync({providers:J,proxyUrl:Ul,model:ne,providerSelections:Yv(J,oe,fa,ne)}),he("已生成安装预览。确认无误后可以写入配置。")}catch(Qe){he(`预览失败:${Qe instanceof Error?Qe.message:String(Qe)}`)}},Ko=async()=>{he(void 0);const ne=te||fa[0];if(!ne){he("请先选择一个默认模型。");return}if(J.length===0){he("请选择至少一个要安装的终端工具。");return}try{const Qe=await Na.mutateAsync({providers:J,proxyUrl:Ul,model:ne,providerSelections:Yv(J,oe,fa,ne)});he(`已写入 ${Qe.applied.length} 个配置文件。`),i(5)}catch(Qe){he(`安装失败:${Qe instanceof Error?Qe.message:String(Qe)}`)}},Bl=()=>{G.refetch(),P.refetch(),se.refetch(),Ee.refetch(),ct.refetch(),Se.mutate()},gt=async()=>{ue(void 0),$(!0);try{await aS(),ue("初始化已标记完成。你可以把 TokenBuddy 安装成桌面应用,之后从系统应用入口打开。"),P.refetch()}catch(ne){ue(`完成失败:${ne instanceof Error?ne.message:String(ne)}`)}finally{$(!1)}},ma=async()=>{if(!ie){Z("请在浏览器地址栏右侧或菜单里选择“安装应用”。");return}try{Z(void 0),await ie.prompt();const ne=await ie.userChoice;if(ge(null),ne.outcome==="accepted"){w(!0),Z("TokenBuddy 桌面应用已安装。");return}Z("你可以稍后继续使用浏览器安装入口。")}catch(ne){Z(`安装未完成:${ne instanceof Error?ne.message:String(ne)}`)}},jt=(()=>{var ne,Qe,Dt,el,Di,Nn,wn,ki,Ui;return n<=1?o.jsx(dS,{commonModels:gn,allModels:Wa,loading:ct.isLoading,error:ct.error,selectedModels:s,saving:d,saveMessage:m,onToggleModel:Fr,onSave:Wr,onContinue:()=>i(2)}):n===2?o.jsx(NS,{payments:((ne=se.data)==null?void 0:ne.payments)??[],enabledPaymentCount:$r.length,loading:se.isLoading,qrUrl:(Qe=Ae.data)==null?void 0:Qe.qrImageUrl,rechargeQrUrl:(Dt=Ot.data)==null?void 0:Dt.qrImageUrl,walletConfigPresent:(el=Ae.data)==null?void 0:el.walletConfigPresent,error:Ae.error,rechargeError:Ot.error,binding:Ae.isPending,rechargeLoading:Ot.isPending,onBind:Yo,onLoadRecharge:Pr,onRefreshPayments:()=>{se.refetch()},onBack:()=>i(1),onContinue:()=>i(3)}):n===3?o.jsx(jS,{mode:E,scorer:z,sellers:Qo,fixedSellerId:L,fixedSetSellerIds:K,saving:ae.isPending,message:X,onModeChange:T,onScorerChange:O,onFixedSellerChange:k,onToggleFixedSetSeller:rt=>{Q(qe=>qe.includes(rt)?qe.filter(Ie=>Ie!==rt):[...qe,rt])},onSave:jn,onBack:()=>i(2)}):n===4?o.jsx(MS,{clients:((Di=Ee.data)==null?void 0:Di.clients)??[],candidates:Pa,loading:Ee.isLoading,selectedProviders:J,selectedModel:te||fa[0]||"",modelOptions:fa,providerSelections:oe,proxyUrl:Ul,previewChanges:(Nn=na.data)==null?void 0:Nn.changes,applying:Na.isPending,previewing:na.isPending,message:fe,onToggleProvider:rt=>{I(qe=>qe.includes(rt)?qe.filter(Ie=>Ie!==rt):[...qe,rt])},onModelChange:V,onProviderSelectionChange:(rt,qe)=>{W(Ie=>({...Ie,[rt]:qe}))},onPreview:Go,onInstall:Ko,onBack:()=>i(3)}):n===5?o.jsx(ES,{items:qo,status:(wn=Se.data)==null?void 0:wn.status,generatedAt:(ki=Se.data)==null?void 0:ki.generatedAt,running:Se.isPending,error:Se.error,onRefresh:Bl,onBack:()=>i(4),onContinue:()=>i(6)}):o.jsx(TS,{complete:((Ui=P.data)==null?void 0:Ui.setup.status)==="completed",message:be,installMessage:_,canInstall:!!ie,installed:je,saving:U,onBack:()=>i(5),onComplete:gt,onInstall:ma})})();return o.jsxs("div",{className:"min-w-0 space-y-3",children:[o.jsx(cS,{activeStep:n,onSelect:i}),o.jsx("div",{className:"min-w-0",children:jt})]})}function cS({activeStep:n,onSelect:i}){return o.jsx("nav",{"aria-label":"初始化步骤",className:"rounded-[12px] border border-[var(--color-line-2)] bg-white p-2.5 shadow-[0_8px_22px_rgba(60,41,112,0.045)]",children:o.jsx("div",{className:"flex items-stretch gap-2 overflow-x-auto",children:Uv.map(s=>{const u=n===s.index,d=n>s.index;return o.jsxs(j.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>i(s.index),"aria-current":u?"step":void 0,className:["relative flex min-w-[190px] flex-1 items-center gap-2 rounded-[8px] px-3 py-2 text-left transition",u?"bg-[var(--color-lavender)] ring-1 ring-[var(--color-lavender-2)]":"hover:bg-[var(--color-page)]"].join(" "),children:[o.jsx("span",{className:["grid size-6 shrink-0 place-items-center rounded-full border bg-white",u?"border-[var(--color-purple)] text-[var(--color-purple)] shadow-[0_0_0_3px_rgba(124,61,240,0.1)]":"",d?"border-emerald-200 bg-emerald-50 text-emerald-700":"",!u&&!d?"border-[var(--color-line-2)] text-[var(--color-muted)]":""].join(" "),children:d?o.jsx(Kt,{className:"size-3.5"}):o.jsx("span",{className:"size-1.5 rounded-full bg-current"})}),o.jsxs("span",{className:"min-w-0",children:[o.jsxs("span",{className:["block font-mono text-[0.62rem] font-black uppercase tracking-[0.08em]",u?"text-[var(--color-purple)]":"text-[var(--color-muted)]"].join(" "),children:["STEP ",s.index,":"]}),o.jsx("span",{className:["mt-0.5 block text-[0.82rem] font-semibold",u?"text-[var(--color-purple)]":"text-[var(--color-ink)]"].join(" "),children:s.label}),o.jsx("span",{className:"block truncate text-[0.7rem] text-[var(--color-muted)]",children:s.value})]})]}),s.index<Uv.length?o.jsx("div",{className:"hidden min-w-8 items-center justify-center text-[var(--color-purple)]/70 sm:flex",children:o.jsx(ko,{className:"size-5",strokeWidth:2.6})}):null]},s.index)})})})}function _i({index:n,title:i,detail:s,meta:u,action:d}){return o.jsxs("div",{className:"flex flex-col gap-2.5 border-b border-[var(--color-line-2)] pb-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"min-w-0",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("span",{className:"rounded-[7px] bg-[var(--color-lavender)] px-2 py-0.5 font-mono text-[0.68rem] font-semibold text-[var(--color-purple)]",children:String(n).padStart(2,"0")}),o.jsx("div",{className:"text-[0.92rem] font-semibold text-[var(--color-ink)]",children:i}),s?o.jsx("span",{className:"text-[0.74rem] text-[var(--color-muted)]",children:s}):null,u?o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5 font-mono text-[0.68rem] text-[var(--color-muted)]",children:u}):null]})}),d?o.jsx("div",{className:"shrink-0",children:d}):null]})}function dS({commonModels:n,allModels:i,loading:s,error:u,selectedModels:d,saving:h,saveMessage:m,onToggleModel:x,onSave:p,onContinue:v}){const[g,b]=j.useState(!1),E=d.map(T=>i.find(z=>z.id===T)??{id:T,sellerCount:0,protocols:[],paymentMethods:[]});return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:1,title:"模型访问",detail:"默认和高频模型",meta:`${d.length} selected`,action:o.jsxs("button",{type:"button",disabled:s||!!u,onClick:()=>b(!0),className:"inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-purple)] px-2.5 text-[0.78rem] font-semibold text-white transition hover:bg-[var(--color-purple-2)] disabled:cursor-not-allowed disabled:opacity-45",children:[o.jsx(Ud,{className:"size-3.5"}),"添加模型"]})}),u?o.jsxs("div",{className:"mt-3 rounded-[10px] bg-rose-50 px-3 py-2 text-[0.84rem] leading-6 text-rose-700",children:["模型目录加载失败:",u instanceof Error?u.message:String(u)]}):null,E.length===0?o.jsxs("button",{type:"button",disabled:s||!!u,onClick:()=>b(!0),className:"mt-3 flex min-h-[72px] w-full items-center gap-3 rounded-[10px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-3 text-left transition hover:border-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[o.jsx("span",{className:"grid size-8 shrink-0 place-items-center rounded-[8px] bg-white text-[var(--color-purple)]",children:o.jsx(Ud,{className:"size-4"})}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block text-[0.86rem] font-semibold text-[var(--color-ink)]",children:"添加可能使用到的模型"}),o.jsx("span",{className:"mt-0.5 block text-[0.76rem] text-[var(--color-muted)]",children:"从全部可用模型中选择。"})]})]}):o.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:E.map(T=>o.jsxs("div",{className:"inline-flex min-h-9 max-w-full items-center gap-2 rounded-[9px] border border-[var(--color-lavender-2)] bg-[var(--color-lavender)] px-3 py-1.5",children:[o.jsx("span",{className:"truncate font-mono text-[0.82rem] font-semibold text-[var(--color-purple)]",children:T.id}),o.jsx("span",{className:"rounded-full bg-white/70 px-2 py-0.5 text-[0.68rem] font-semibold text-emerald-700",children:"可用"}),o.jsx("button",{type:"button",onClick:()=>x(T.id),className:"inline-flex size-5 items-center justify-center rounded-[6px] text-[var(--color-purple)]/70 hover:bg-white hover:text-[var(--color-purple)]","aria-label":`Remove ${T.id}`,children:o.jsx(Br,{className:"size-3"})})]},T.id))}),o.jsxs("div",{className:"mt-3 flex flex-col gap-2.5 border-t border-[var(--color-line-2)] pt-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{className:"min-h-5 text-[0.8rem] leading-5 text-[var(--color-muted)]",children:[s?o.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[o.jsx(pt,{className:"size-3.5 animate-spin text-[var(--color-purple)]"})," loading catalog"]}):null,m?o.jsx("div",{className:"mt-1 font-medium text-[var(--color-ink)]",children:m}):null]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{type:"button",disabled:h||d.length===0,onClick:p,className:"inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[h?o.jsx(pt,{className:"size-3.5 animate-spin"}):null,"保存"]}),o.jsxs("button",{type:"button",disabled:d.length===0,onClick:v,className:"inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-ink)] transition hover:border-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:["下一步",o.jsx(ko,{className:"size-3.5"})]})]})]})]}),g?o.jsx(fS,{models:n,allModels:i,selectedModelIds:d,onToggle:x,onClose:()=>b(!1)}):null]})}function fS({models:n,allModels:i,selectedModelIds:s,onToggle:u,onClose:d}){const[h,m]=j.useState("common"),[x,p]=j.useState(""),v=x.trim(),g=h==="common"?n:v?xS(i,v):[],b=h==="common"?"没有可用的推荐模型。":"输入关键词搜索全部可用模型。",E=[{id:"common",label:"推荐模型",hint:"直接勾选"},{id:"all",label:"搜索添加",hint:"全部模型"}];return o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(32,26,56,0.22)] px-3 py-6 backdrop-blur-sm",children:o.jsxs("div",{className:"flex max-h-full w-full max-w-[720px] flex-col overflow-hidden rounded-[14px] border border-[var(--color-line-2)] bg-white shadow-[0_24px_80px_rgba(32,26,56,0.22)]",children:[o.jsxs("div",{className:"flex items-start gap-3 border-b border-[var(--color-line-2)] px-4 py-3",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("div",{className:"text-[0.72rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"Select models"}),o.jsx("h2",{className:"mt-0.5 text-[1rem] font-semibold text-[var(--color-ink)]",children:"选择可能使用到的模型"}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"推荐模型直接勾选;搜索添加用于查找平台全部模型。"})]}),o.jsxs("div",{className:"mt-0.5 rounded-full bg-[var(--color-lavender)] px-2.5 py-1 font-mono text-[0.72rem] font-semibold text-[var(--color-purple)]",children:[s.length," selected"]}),o.jsx("button",{type:"button",onClick:d,className:"inline-flex size-8 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] text-[var(--color-muted)] hover:text-[var(--color-ink)]","aria-label":"Close model picker",children:o.jsx(Br,{className:"size-4"})})]}),o.jsxs("div",{className:"border-b border-[var(--color-line-2)] px-4 py-2.5",children:[o.jsx("div",{className:"mb-2 text-[0.72rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:"已选模型"}),s.length===0?o.jsx("div",{className:"rounded-[9px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2 text-[0.78rem] text-[var(--color-muted)]",children:"还没有选择模型。"}):o.jsx("div",{className:"flex max-h-[92px] flex-wrap gap-1.5 overflow-y-auto pr-1",children:s.map(T=>o.jsxs("span",{className:"inline-flex max-w-full items-center gap-1.5 rounded-[8px] border border-[var(--color-lavender-2)] bg-[var(--color-lavender)] px-2 py-1",children:[o.jsx("span",{className:"max-w-[220px] truncate font-mono text-[0.72rem] font-semibold text-[var(--color-purple)]",children:T}),o.jsx("button",{type:"button",onClick:()=>u(T),className:"inline-flex size-4 items-center justify-center rounded-[5px] text-[var(--color-purple)]/70 hover:bg-white hover:text-[var(--color-purple)]","aria-label":`Remove ${T}`,children:o.jsx(Br,{className:"size-3"})})]},T))})]}),o.jsxs("div",{className:"border-b border-[var(--color-line-2)] p-3",children:[o.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:E.map(T=>{const z=h===T.id;return o.jsxs("button",{type:"button",onClick:()=>m(T.id),className:["rounded-[9px] border px-3 py-2 text-left transition",z?"border-[var(--color-purple)] bg-[var(--color-lavender)]":"border-[var(--color-line-2)] bg-white hover:border-[var(--color-lavender-2)]"].join(" "),children:[o.jsx("span",{className:["block text-[0.84rem] font-semibold",z?"text-[var(--color-purple)]":"text-[var(--color-ink)]"].join(" "),children:T.label}),o.jsx("span",{className:"mt-0.5 block text-[0.72rem] text-[var(--color-muted)]",children:T.hint})]},T.id)})}),h==="all"?o.jsxs("label",{className:"relative mt-3 block",children:[o.jsx(Uo,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[var(--color-muted)]"}),o.jsx("input",{value:x,onChange:T=>p(T.target.value),placeholder:"搜索平台全部模型...",className:"h-10 w-full rounded-[9px] border border-[var(--color-line-2)] bg-white pl-9 pr-3 text-[0.88rem] text-[var(--color-ink)] outline-none transition placeholder:text-[var(--color-muted)] focus:border-[var(--color-purple)]"})]}):null]}),o.jsx("div",{className:"min-h-0 max-h-[320px] overflow-y-auto p-3",children:g.length===0?o.jsx("div",{className:"rounded-[12px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-4 py-8 text-center text-[0.86rem] text-[var(--color-muted)]",children:b}):o.jsx("div",{className:"grid gap-2",children:g.map(T=>{const z=s.includes(T.id);return o.jsxs("button",{type:"button",onClick:()=>u(T.id),"aria-pressed":z,className:["flex items-center gap-3 rounded-[10px] border px-3 py-2 text-left transition",z?"border-[var(--color-purple)] bg-[var(--color-lavender)]":"border-[var(--color-line-2)] bg-white hover:border-[var(--color-lavender-2)]"].join(" "),children:[o.jsx("span",{className:["grid size-6 shrink-0 place-items-center rounded-[7px] border",z?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line-2)] bg-white text-transparent"].join(" "),children:o.jsx(Kt,{className:"size-3.5"})}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate font-mono text-[0.88rem] font-semibold text-[var(--color-ink)]",children:T.id}),o.jsxs("span",{className:"mt-1 flex flex-wrap gap-1.5 text-[0.72rem] text-[var(--color-muted)]",children:[o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:rf(T.id)}),o.jsx("span",{className:"rounded-full bg-emerald-50 px-2 py-0.5 font-semibold text-emerald-700",children:"可用"}),Ld(T.paymentMethods)?o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:Ld(T.paymentMethods)}):null]})]}),o.jsx("span",{className:["rounded-[7px] px-2 py-1 text-[0.72rem] font-semibold",z?"bg-[var(--color-purple)] text-white":"bg-[var(--color-page)] text-[var(--color-muted)]"].join(" "),children:z?"已选择":"选择"})]},T.id)})})}),o.jsxs("div",{className:"flex flex-col gap-2 border-t border-[var(--color-line-2)] bg-white px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{className:"text-[0.8rem] leading-5 text-[var(--color-muted)]",children:["已选择 ",o.jsx("span",{className:"font-mono font-semibold text-[var(--color-ink)]",children:s.length})," 个模型"]}),o.jsxs("button",{type:"button",onClick:d,className:"inline-flex h-9 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)]",children:["完成选择",o.jsx(Kt,{className:"size-3.5"})]})]})]})})}function mS(n){const i=new Map;for(const s of n){const u=i.get(s.id)??{sellers:new Set,protocols:new Set,paymentMethods:new Set};u.sellers.add(s.sellerId);for(const d of s.supportedProtocols)u.protocols.add(d);for(const d of s.paymentMethods)u.paymentMethods.add(d);i.set(s.id,u)}return Array.from(i.entries()).map(([s,u])=>({id:s,sellerCount:u.sellers.size,protocols:Array.from(u.protocols).sort(),paymentMethods:Array.from(u.paymentMethods).sort()})).sort((s,u)=>u.sellerCount!==s.sellerCount?u.sellerCount-s.sellerCount:s.id.localeCompare(u.id))}function hS(n,i,s){const u=pS(n,s);if(u.length>0)return u.slice(0,14);const d=new Set(i),h=new Map;for(const p of i){const v=n.find(g=>g.id===p);v&&h.set(v.id,v)}const m=n.map(p=>({model:p,rank:yS(p.id)})).filter(p=>p.rank<100).sort((p,v)=>p.rank!==v.rank?p.rank-v.rank:v.model.sellerCount!==p.model.sellerCount?v.model.sellerCount-p.model.sellerCount:p.model.id.localeCompare(v.model.id)),x=new Map;for(const p of m){const v=rf(p.model.id),g=x.get(v)??[];g.push(p),x.set(v,g)}for(const p of sS){const v=p==="GPT"?3:p==="Claude"||p==="Gemini"?2:1;for(const g of(x.get(p)??[]).slice(0,v))h.set(g.model.id,g.model)}for(const p of m){if(h.size>=14)break;d.has(p.model.id)||h.set(p.model.id,p.model)}return Array.from(h.values()).slice(0,14)}function pS(n,i){const s=new Map;for(const u of i){const d=vS(n,u,s);d&&s.set(d.id,d)}return Array.from(s.values())}function vS(n,i,s){const u=pd(i);if(!u)return;const d=n.find(h=>pd(h.id)===u&&!s.has(h.id));return d||n.find(h=>{if(s.has(h.id))return!1;const m=pd(h.id);return m.includes(u)||u.includes(m)})}function pd(n){return n.trim().toLowerCase().replace(/_/g,"-")}function xS(n,i){const s=i.trim().toLowerCase();return s?n.filter(u=>[u.id,rf(u.id),...u.paymentMethods].some(d=>d.toLowerCase().includes(s))):n}function yS(n){const i=n.toLowerCase();return i.includes("gpt-5.5")||i.includes("gpt-5-5")||i.includes("gpt-5_5")?0:i.includes("gpt-5.4")||i.includes("gpt-5-4")||i.includes("gpt-5_4")?1:i.includes("gpt-5")||i.includes("gpt-latest")||i.includes("openai/gpt")?2:i.includes("claude")&&(i.includes("4.8")||i.includes("4-8"))?3:i.includes("claude")&&i.includes("opus")?4:i.includes("claude")&&i.includes("sonnet")?5:i.includes("claude")?6:i.includes("gemini")&&(i.includes("3.1")||i.includes("3-1"))?7:i.includes("gemini")&&i.includes("pro")?8:i.includes("gemini")?9:i.includes("deepseek")?10:i.includes("kimi")||i.includes("moonshot")?11:i.includes("qwen")||i.includes("tongyi")?12:i.includes("minimax")?13:i.includes("glm")||i.includes("zhipu")?14:i.includes("doubao")||i.includes("bytedance")?15:i.includes("grok")?16:100}function rf(n){const i=n.toLowerCase();return i.includes("gpt")||i.includes("openai")?"GPT":i.includes("claude")||i.includes("anthropic")?"Claude":i.includes("gemini")||i.includes("google")?"Gemini":i.includes("deepseek")?"DeepSeek":i.includes("kimi")||i.includes("moonshot")?"Kimi":i.includes("qwen")||i.includes("tongyi")?"Qwen":i.includes("minimax")?"MiniMax":i.includes("glm")||i.includes("zhipu")?"GLM":i.includes("doubao")||i.includes("bytedance")?"Doubao":i.includes("grok")?"Grok":"Common"}function Ld(n){return n.length===0?"":`${bS(n.map(gS)).join("、")}`}function bS(n){return Array.from(new Set(n))}function gS(n){const i=Lo(n);return i.includes("x402")?"X402":i.includes("clawtip")?"ClawTip":i.includes("wallet")?"钱包":i.includes("mock")||i.includes("test")?"测试":"其它"}function Lo(n){return n.trim().toLowerCase()}function jS({mode:n,scorer:i,sellers:s,fixedSellerId:u,fixedSetSellerIds:d,saving:h,message:m,onModeChange:x,onScorerChange:p,onFixedSellerChange:v,onToggleFixedSetSeller:g,onSave:b,onBack:E}){const T=n!=="fullAuto";return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:3,title:"配置策略",detail:"路由规则",meta:`${v0(n)} / ${YS(i)}`}),o.jsxs("div",{className:"mt-3 grid gap-3 xl:grid-cols-2",children:[o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-2.5",children:[o.jsx("div",{className:"mb-2 text-[0.78rem] font-semibold text-[var(--color-ink)]",children:"路由模式"}),o.jsx("div",{className:"grid gap-2",children:nS.map(z=>o.jsxs("button",{type:"button",onClick:()=>x(z.value),className:["rounded-[9px] border bg-white p-2.5 text-left transition",n===z.value?"border-[var(--color-purple)] bg-[var(--color-lavender)]":"border-[var(--color-line-2)] bg-white hover:border-[var(--color-lavender-2)]"].join(" "),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:["grid size-5 place-items-center rounded-full border",n===z.value?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line-2)] text-transparent"].join(" "),children:o.jsx(Kt,{className:"size-3"})}),o.jsx("span",{className:"text-[0.84rem] font-semibold text-[var(--color-ink)]",children:z.title})]}),o.jsx("p",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:z.body})]},z.value))})]}),o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-2.5",children:[o.jsx("div",{className:"mb-2 text-[0.78rem] font-semibold text-[var(--color-ink)]",children:"优化目标"}),o.jsx("div",{className:"grid gap-2",children:iS.map(z=>o.jsxs("button",{type:"button",onClick:()=>p(z.value),className:["rounded-[9px] border bg-white p-2.5 text-left transition",i===z.value?"border-[var(--color-purple)] bg-[var(--color-lavender)]":"border-[var(--color-line-2)] bg-white hover:border-[var(--color-lavender-2)]"].join(" "),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:["grid size-5 place-items-center rounded-full border",i===z.value?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line-2)] text-transparent"].join(" "),children:o.jsx(Kt,{className:"size-3"})}),o.jsx("span",{className:"text-[0.84rem] font-semibold text-[var(--color-ink)]",children:z.title})]}),o.jsx("p",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:z.body})]},z.value))})]})]}),T?o.jsxs("div",{className:"mt-3 rounded-[10px] border border-[var(--color-line-2)] bg-white p-3",children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"text-[0.8rem] font-semibold text-[var(--color-ink)]",children:"选择供应商"}),o.jsx("div",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5 text-[0.72rem] text-[var(--color-muted)]",children:n==="fixed"?u?"已选择 1 个":"尚未选择":`已选择 ${d.length} 个`})]}),s.length===0?o.jsx("div",{className:"mt-2 rounded-[9px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-3 text-[0.8rem] leading-5 text-[var(--color-muted)]",children:"正在等待供应商目录。你也可以先返回上一步确认模型目录是否已经加载完成。"}):o.jsx(SS,{mode:n,sellers:s,fixedSellerId:u,fixedSetSellerIds:d,onFixedSellerChange:v,onToggleFixedSetSeller:g})]}):o.jsx("div",{className:"mt-3 rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2 text-[0.8rem] leading-5 text-[var(--color-muted)]",children:"当前是全自动模式,TokenBuddy 会根据模型、供应商健康度、速度、价格和余额状态自动规划调用路径。"})]}),o.jsx(c0,{backLabel:"上一步:绑定钱包",nextLabel:"下一步:配置工具",saving:h,message:m,onBack:E,onNext:b})]})}function SS({mode:n,sellers:i,fixedSellerId:s,fixedSetSellerIds:u,onFixedSellerChange:d,onToggleFixedSetSeller:h}){const[m,x]=j.useState({key:"status",direction:"asc"}),p=j.useMemo(()=>d0(i,m),[i,m]),v=b=>{x(E=>({key:b,direction:E.key===b&&E.direction==="asc"?"desc":"asc"}))},g=b=>{if(n==="fixed"){d(b);return}h(b)};return o.jsx("div",{className:"mt-2 overflow-hidden rounded-[9px] border border-[var(--color-line-2)]",children:o.jsx("div",{className:"max-h-[300px] overflow-auto",children:o.jsxs("table",{className:"min-w-[760px] w-full border-collapse text-left text-[0.78rem]",children:[o.jsx("thead",{className:"sticky top-0 z-10 border-b border-[var(--color-line-2)] bg-[var(--color-page)] text-[0.68rem] uppercase tracking-wider text-[var(--color-muted)]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"w-12 px-2 py-2 font-semibold",children:"选"}),o.jsx(di,{label:"供应商",sortKey:"name",sort:m,onSort:v}),o.jsx(di,{label:"状态",sortKey:"status",sort:m,onSort:v}),o.jsx(di,{label:"模型",sortKey:"models",sort:m,onSort:v,align:"right"}),o.jsx(di,{label:"价格",sortKey:"price",sort:m,onSort:v}),o.jsx(di,{label:"折扣",sortKey:"discount",sort:m,onSort:v,align:"right"}),o.jsx(di,{label:"响应",sortKey:"speed",sort:m,onSort:v,align:"right"}),o.jsx("th",{className:"px-3 py-2 font-semibold",children:"支付"})]})}),o.jsx("tbody",{className:"divide-y divide-[var(--color-line-2)] bg-white",children:p.map(b=>{const E=n==="fixed"?s===b.id:u.includes(b.id);return o.jsxs("tr",{onClick:()=>g(b.id),className:["cursor-pointer transition hover:bg-[var(--color-lavender)]/45",E?"bg-[var(--color-lavender)]/70":"bg-white"].join(" "),children:[o.jsx("td",{className:"px-2 py-2.5",children:o.jsx("span",{className:["grid size-5 place-items-center rounded-full border",E?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line-2)] text-transparent"].join(" "),children:o.jsx(Kt,{className:"size-3"})})}),o.jsxs("td",{className:"max-w-[210px] px-3 py-2.5",children:[o.jsx("div",{className:"truncate font-semibold text-[var(--color-ink)]",children:b.name}),o.jsx("div",{className:"mt-0.5 truncate font-mono text-[0.68rem] text-[var(--color-muted)]",children:b.id})]}),o.jsx("td",{className:"px-3 py-2.5",children:o.jsx("span",{className:["inline-flex whitespace-nowrap rounded-full px-2 py-0.5 text-[0.7rem] font-semibold",KS(b.status)].join(" "),children:GS(b.status)})}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono font-semibold text-[var(--color-ink)]",children:b.modelCount}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 font-mono text-[0.72rem] text-[var(--color-ink)]",children:RS(b.minInputPriceMicrosPer1m,b.minOutputPriceMicrosPer1m)}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono font-semibold text-[var(--color-purple)]",children:_S(b.discountRatio)}),o.jsx("td",{className:"whitespace-nowrap px-3 py-2.5 text-right font-mono text-[var(--color-ink)]",children:OS(b.avgResponseMs,b.avgTtftMs)}),o.jsx("td",{className:"max-w-[150px] px-3 py-2.5",children:o.jsx("div",{className:"truncate text-[0.72rem] text-[var(--color-muted)]",children:Ld(b.paymentMethods)||"—"})})]},b.id)})})]})})})}function di({label:n,sortKey:i,sort:s,align:u="left",onSort:d}){const h=s.key===i,m=h?s.direction==="asc"?"↑":"↓":"↕";return o.jsx("th",{className:["px-3 py-2 font-semibold",u==="right"?"text-right":"text-left"].join(" "),children:o.jsxs("button",{type:"button",onClick:()=>d(i),className:["inline-flex items-center gap-1 rounded-[6px] px-1.5 py-1 transition hover:bg-white",u==="right"?"justify-end":"justify-start",h?"text-[var(--color-purple)]":"text-[var(--color-muted)]"].join(" "),children:[o.jsx("span",{children:n}),o.jsx("span",{className:"font-mono text-[0.66rem]",children:m})]})})}function NS({payments:n,enabledPaymentCount:i,loading:s,qrUrl:u,rechargeQrUrl:d,walletConfigPresent:h,error:m,rechargeError:x,binding:p,rechargeLoading:v,onBind:g,onLoadRecharge:b,onRefreshPayments:E,onBack:T,onContinue:z}){const[O,L]=j.useState("clawtip"),[k,K]=j.useState(!1),[Q,X]=j.useState(!1),F=n.find(ue=>Lo(ue.method)==="clawtip"),te=!!(F!=null&&F.enabled||h||wS(F==null?void 0:F.config,"walletConfigPresent")),V=k&&te,J=[{method:"clawtip",name:"ClawTip",detail:"JD App 扫码 / 微支付",status:te?"已绑定":"可绑定",available:!0},...rS.map(ue=>({...ue,status:"Coming soon",available:!1}))],I=J.find(ue=>ue.method===O)??J[0],oe=I.method==="clawtip",W=oe&&te&&!V,fe=V||W||k,he=()=>{K(!0),g()},be=()=>{X(!0),b()};return j.useEffect(()=>{if(!oe||!k||te)return;const ue=window.setInterval(E,1500);return()=>window.clearInterval(ue)},[k,te,E,oe]),j.useEffect(()=>{!W||d||v||Q||(X(!0),b())},[b,v,d,Q,W]),o.jsxs("div",{className:"space-y-3",children:[o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:2,title:"选择支付方式",detail:"钱包和充值通道",meta:s?"checking":`${i} active`,action:oe&&W?o.jsxs("button",{type:"button",disabled:v,onClick:be,className:"inline-flex h-8 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-2.5 text-[0.78rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[v?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(Ei,{className:"size-3.5"}),"刷新充值码"]}):oe&&k&&!te?o.jsxs("button",{type:"button",disabled:p,onClick:he,className:"inline-flex h-8 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-2.5 text-[0.78rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[p?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(rn,{className:"size-3.5"}),"重新生成"]}):oe?null:o.jsx("span",{className:"inline-flex h-8 items-center rounded-[8px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-2.5 font-mono text-[0.72rem] font-semibold text-[var(--color-muted)]",children:"Coming soon"})}),o.jsxs("div",{className:"mt-3 grid gap-3 lg:grid-cols-[minmax(0,300px)_minmax(0,1fr)]",children:[o.jsx("div",{className:"grid content-start gap-2",children:J.map(ue=>{const U=ue.method===I.method;return o.jsxs("button",{type:"button",onClick:()=>L(ue.method),"aria-pressed":U,className:["grid min-h-[64px] grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 rounded-[10px] border px-3 py-2 text-left transition",U?"border-[var(--color-purple)] bg-[var(--color-lavender)] shadow-[0_8px_22px_rgba(124,61,240,0.08)]":"border-[var(--color-line-2)] bg-white hover:bg-[var(--color-page)]"].join(" "),children:[o.jsx("span",{className:["grid size-9 shrink-0 place-items-center rounded-[9px] border",U?"border-[var(--color-lavender-2)] bg-white text-[var(--color-purple)]":"border-[var(--color-line-2)] bg-[var(--color-page)] text-[var(--color-muted)]"].join(" "),children:Bv(ue.method)}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate text-[0.86rem] font-semibold text-[var(--color-ink)]",children:ue.name}),o.jsx("span",{className:"mt-0.5 block truncate text-[0.73rem] text-[var(--color-muted)]",children:ue.detail})]}),o.jsx("span",{className:["rounded-full px-2 py-0.5 text-[0.68rem] font-semibold",ue.available?"bg-emerald-50 text-emerald-700":"bg-[var(--color-page)] text-[var(--color-muted)]"].join(" "),children:ue.status})]},ue.method)})}),oe?fe?o.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(340px,380px)_minmax(0,1fr)]",children:[o.jsx("div",{className:"flex min-h-[360px] items-center justify-center rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-4",children:V?o.jsx("div",{className:"grid size-full min-h-[320px] place-items-center rounded-[10px] border border-emerald-100 bg-emerald-50 px-4 py-5 text-center",children:o.jsxs("div",{children:[o.jsx(Kt,{className:"mx-auto size-8 text-emerald-700"}),o.jsx("div",{className:"mt-3 text-[0.92rem] font-semibold text-emerald-900",children:"绑定成功"}),o.jsx("div",{className:"mt-1 text-[0.78rem] leading-5 text-emerald-800",children:"ClawTip 钱包已经写入本机配置,可以继续配置路由策略。"})]})}):W?d?o.jsx("img",{src:d,alt:"ClawTip 充值二维码",className:"max-h-[340px] w-full max-w-[340px] rounded-[10px] border border-[var(--color-line-2)] bg-white p-3 object-contain shadow-[0_12px_28px_rgba(15,23,42,0.1)]"}):o.jsx("div",{className:"grid size-full min-h-[320px] place-items-center rounded-[10px] border border-dashed border-[var(--color-line-2)] bg-white px-3 py-4 text-center",children:o.jsxs("div",{children:[v?o.jsx(pt,{className:"mx-auto size-6 animate-spin text-[var(--color-purple)]"}):o.jsx(Ei,{className:"mx-auto size-6 text-[var(--color-purple)]"}),o.jsx("div",{className:"mt-2 text-[0.84rem] font-semibold text-[var(--color-ink)]",children:v?"正在加载充值码":"充值码未加载"}),o.jsx("button",{type:"button",disabled:v,onClick:be,className:"mt-3 inline-flex h-8 items-center justify-center rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.78rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:"重新加载"})]})}):k&&u?o.jsx("img",{src:u,alt:"ClawTip 钱包绑定二维码",className:"max-h-[340px] w-full max-w-[340px] rounded-[10px] border border-[var(--color-line-2)] bg-white p-3 object-contain shadow-[0_12px_28px_rgba(15,23,42,0.1)]"}):k?o.jsx("div",{className:"grid size-full min-h-[320px] place-items-center rounded-[10px] border border-dashed border-[var(--color-line-2)] bg-white px-3 py-4 text-center",children:o.jsxs("div",{children:[p?o.jsx(pt,{className:"mx-auto size-6 animate-spin text-[var(--color-purple)]"}):o.jsx(rn,{className:"mx-auto size-6 text-[var(--color-purple)]"}),o.jsx("div",{className:"mt-2 text-[0.84rem] font-semibold text-[var(--color-ink)]",children:p?"正在生成绑定码":"等待绑定码"}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"生成后使用京东 App 扫码绑定。"})]})}):o.jsx("div",{className:"grid size-full min-h-[320px] place-items-center rounded-[10px] border border-dashed border-[var(--color-line-2)] bg-white px-4 py-5 text-center",children:o.jsxs("div",{className:"max-w-[260px]",children:[o.jsx(rn,{className:"mx-auto size-7 text-[var(--color-purple)]"}),o.jsx("div",{className:"mt-3 text-[0.9rem] font-semibold text-[var(--color-ink)]",children:"ClawTip 尚未绑定"}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"开始后沿用 tb init 的 ClawTip 绑定流程。"}),o.jsxs("button",{type:"button",disabled:p,onClick:he,className:"mt-4 inline-flex h-9 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[p?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(rn,{className:"size-3.5"}),"开始绑定"]})]})})}),o.jsxs("div",{className:"grid content-start gap-2",children:[o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-2",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[0.8rem] font-semibold text-[var(--color-ink)]",children:"ClawTip 钱包"}),o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5 text-[0.68rem] font-semibold text-[var(--color-muted)]",children:te?"已绑定":"待绑定"})]}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:V?"绑定已完成,可以继续下一步。":W?"使用京东 App 扫码充值或查看钱包余额。":k&&u?"使用京东 App 扫描二维码完成绑定。":"点击开始绑定后,按现有 tb init 绑定流程等待扫码。"})]}),o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2",children:[o.jsx("div",{className:"text-[0.72rem] font-semibold uppercase tracking-wider text-[var(--color-muted)]",children:W?"Recharge QR":"Wallet config"}),o.jsx("div",{className:"mt-1 text-[0.84rem] font-semibold text-[var(--color-ink)]",children:V?"绑定成功":W?d?"充值码已加载":"正在准备充值码":te?"本机配置已检测":"等待本机配置"})]})]})]}):o.jsxs("div",{className:"flex min-h-[120px] flex-col justify-center rounded-[10px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-4 py-4 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-[0.86rem] font-semibold text-[var(--color-ink)]",children:"ClawTip 尚未绑定"}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"开始后沿用 tb init 的 ClawTip 绑定流程。"})]}),o.jsxs("button",{type:"button",disabled:p,onClick:he,className:"mt-3 inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45 sm:mt-0",children:[p?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(rn,{className:"size-3.5"}),"开始绑定"]})]}):o.jsx("div",{className:"grid min-h-[220px] place-items-center rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-4 text-center",children:o.jsxs("div",{className:"max-w-[360px]",children:[o.jsx("span",{className:"mx-auto grid size-11 place-items-center rounded-[12px] border border-[var(--color-line-2)] bg-white text-[var(--color-purple)]",children:Bv(I.method)}),o.jsx("div",{className:"mt-3 text-[0.92rem] font-semibold text-[var(--color-ink)]",children:I.name}),o.jsxs("div",{className:"mt-1 text-[0.78rem] leading-5 text-[var(--color-muted)]",children:[I.detail,"。当前版本先通过 ClawTip 完成钱包绑定,后续会在这里接入更多支付流程。"]}),o.jsx("div",{className:"mt-3 inline-flex rounded-full bg-white px-3 py-1 font-mono text-[0.7rem] font-semibold text-[var(--color-muted)]",children:"Coming soon"})]})})]}),oe&&!te&&k&&m?o.jsxs("div",{className:"mt-3 rounded-[10px] bg-rose-50 px-3 py-2 text-[0.84rem] leading-6 text-rose-700",children:["生成二维码失败:",m instanceof Error?m.message:String(m)]}):null,oe&&W&&x?o.jsxs("div",{className:"mt-3 rounded-[10px] bg-rose-50 px-3 py-2 text-[0.84rem] leading-6 text-rose-700",children:["加载充值二维码失败:",x instanceof Error?x.message:String(x)]}):null]}),o.jsx(c0,{backLabel:"上一步:模型访问",nextLabel:"下一步:配置策略",message:i>0?"支付方式已可用,可以继续配置路由策略。":"如果你暂时跳过绑定,后续首次购买模型额度时仍需要完成支付配置。",onBack:T,onNext:z})]})}function Bv(n){const i=Lo(n);return i==="wechat-pay"?o.jsx(B2,{className:"size-4"}):i==="alipay-agent"?o.jsx(w2,{className:"size-4"}):i==="coinbase-smart-wallet"?o.jsx(Ei,{className:"size-4"}):o.jsx(rn,{className:"size-4"})}function wS(n,i){const s=n==null?void 0:n[i];return s===!0||s==="true"||s===1||s==="1"}function MS({clients:n,candidates:i,loading:s,selectedProviders:u,selectedModel:d,modelOptions:h,providerSelections:m,proxyUrl:x,previewChanges:p,applying:v,previewing:g,message:b,onToggleProvider:E,onModelChange:T,onProviderSelectionChange:z,onPreview:O,onInstall:L,onBack:k}){var oe;const K=new Set(i.map(W=>W.id)),Q=i.length,X=n.find(W=>W.id==="custom")??h0(x),F=[...n.filter(W=>W.id!=="custom"),{...X,name:"其他工具"}],te=((oe=F[0])==null?void 0:oe.id)??"custom",[V,J]=j.useState(te),I=F.find(W=>W.id===V)??F[0]??X;return j.useEffect(()=>{var W;F.some(fe=>fe.id===V)||J(((W=F[0])==null?void 0:W.id)??"custom")},[V,F]),o.jsxs("div",{className:"space-y-3",children:[o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:4,title:"配置工具",detail:"终端接入",meta:`${u.length} selected / ${Q} detected`,action:s?o.jsx(pt,{className:"size-4 animate-spin text-[var(--color-purple)]"}):null}),o.jsxs("div",{className:"mt-3 grid gap-3 xl:grid-cols-[minmax(0,320px)_minmax(0,1fr)]",children:[o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-2.5",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[0.8rem] font-semibold text-[var(--color-ink)]",children:"工具"}),o.jsxs("div",{className:"rounded-full bg-white px-2 py-0.5 text-[0.72rem] text-[var(--color-muted)]",children:[n.length," tools"]})]}),o.jsx("div",{className:"mt-2 grid max-h-[380px] gap-2 overflow-y-auto pr-1",children:F.map(W=>{const fe=W.id!=="custom"&&K.has(W.id),he=u.includes(W.id),be=I.id===W.id;return o.jsx("button",{type:"button",onClick:()=>J(W.id),className:["rounded-[10px] border p-2.5 text-left transition",be?"border-[var(--color-purple)] bg-white shadow-[0_10px_24px_rgba(60,41,112,0.08)]":"border-[var(--color-line-2)] bg-white/70 hover:border-[var(--color-lavender-2)]"].join(" "),children:o.jsxs("div",{className:"flex items-start gap-2.5",children:[o.jsx("span",{className:["mt-0.5 grid size-6 shrink-0 place-items-center rounded-[8px] border text-[0.72rem] font-semibold",be?"border-[var(--color-purple)] bg-[var(--color-lavender)] text-[var(--color-purple)]":"border-[var(--color-line-2)] bg-white text-[var(--color-muted)]"].join(" "),children:DS(W.name)}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("div",{className:"truncate text-[0.84rem] font-semibold text-[var(--color-ink)]",children:W.name}),he?o.jsx("span",{className:"rounded-full bg-emerald-50 px-1.5 py-0.5 text-[0.66rem] font-semibold text-emerald-700",children:"安装"}):null]}),o.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5 text-[0.68rem] text-[var(--color-muted)]",children:[o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:x0(W)}),W.commandName?o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:W.commandName}):null,W.id==="custom"?o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:"复制配置"}):null]})]}),W.id!=="custom"?o.jsx("span",{"aria-hidden":"true",className:["mt-0.5 grid size-5 shrink-0 place-items-center rounded-full border",he?"border-[var(--color-purple)] bg-[var(--color-purple)] text-white":"border-[var(--color-line-2)] text-transparent",fe?"":"opacity-45"].join(" "),children:o.jsx(Kt,{className:"size-3"})}):null]})},W.id)})})]}),o.jsx("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white p-3",children:o.jsx(CS,{client:I,selected:u.includes(I.id),installable:I.id!=="custom"&&K.has(I.id),selectedModel:d,modelOptions:h,providerSelections:m,proxyUrl:x,onToggleInstall:()=>E(I.id),onModelChange:T,onProviderSelectionChange:z})})]}),p?o.jsxs("div",{className:"mt-3 rounded-[10px] border border-[var(--color-line-2)] bg-white p-3",children:[o.jsx("div",{className:"text-[0.8rem] font-semibold text-[var(--color-ink)]",children:"配置文件变更"}),p.length===0?o.jsx("div",{className:"mt-2 rounded-[9px] border border-dashed border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-3 text-[0.8rem] text-[var(--color-muted)]",children:"没有需要写入的配置变更。"}):o.jsx("div",{className:"mt-2 grid max-h-[180px] gap-2 overflow-y-auto pr-1",children:p.map(W=>o.jsxs("div",{className:"rounded-[9px] border border-[var(--color-line-2)] bg-white p-2.5",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[0.78rem] font-semibold text-[var(--color-ink)]",children:[o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5",children:XS(W.action)}),o.jsx("span",{children:W.providerId})]}),o.jsx("div",{className:"mt-1 truncate font-mono text-[0.72rem] text-[var(--color-muted)]",children:W.path}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:W.summary})]},`${W.providerId}:${W.path}:${W.summary}`))})]}):null]}),o.jsxs(yt,{className:"flex flex-col gap-3 p-3 lg:flex-row lg:items-center lg:justify-between",children:[o.jsx("div",{className:"text-[0.84rem] leading-6 text-[var(--color-muted)]",children:b?o.jsx("div",{className:"mt-1 font-medium text-[var(--color-ink)]",children:b}):null}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:k,className:"inline-flex h-9 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-muted)] transition hover:text-[var(--color-ink)]",children:"上一步:配置策略"}),o.jsxs("button",{type:"button",disabled:g||u.length===0,onClick:O,className:"inline-flex h-9 items-center justify-center gap-2 rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-ink)] transition hover:border-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[g?o.jsx(pt,{className:"size-4 animate-spin"}):null,"预览安装"]}),o.jsxs("button",{type:"button",disabled:v||u.length===0,onClick:L,className:"inline-flex h-9 items-center justify-center gap-2 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[v?o.jsx(pt,{className:"size-4 animate-spin"}):null,"写入配置"]})]})]})]})}function CS({client:n,selected:i,installable:s,selectedModel:u,modelOptions:d,providerSelections:h,proxyUrl:m,onToggleInstall:x,onModelChange:p,onProviderSelectionChange:v}){var E,T,z;if(n.id==="custom"){const O=n.manualConfig??h0(m).manualConfig;return o.jsxs("div",{className:"space-y-3",children:[o.jsx(vd,{client:n,selected:!1,installable:!1}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(_r,{label:"OpenAI base URL",value:(O==null?void 0:O.openaiBaseUrl)??p0(m)}),o.jsx(_r,{label:"Anthropic base URL",value:(O==null?void 0:O.anthropicBaseUrl)??m}),o.jsx(_r,{label:"API key",value:(O==null?void 0:O.apiKey)??"TOKENBUDDY_PROXY"})]}),o.jsx("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"其他工具只需要填入本地推理服务接口和 key,不会写入本机配置文件。"})]})}if(n.id==="claude-code"){const O=m0(h[n.id],d,u),L=(K,Q)=>{v(n.id,{...O,fallbackModel:O.fallbackModel||Q||u,roles:{...O.roles,[K]:Q?{upstreamModel:Q,displayName:Q}:void 0}})},k=K=>{v(n.id,{...O,fallbackModel:K}),p(K)};return o.jsxs("div",{className:"space-y-3",children:[o.jsx(vd,{client:n,selected:i,installable:s,onToggleInstall:x}),o.jsxs("div",{className:"grid gap-2 lg:grid-cols-2",children:[o.jsx(Rr,{label:"Fallback",value:O.fallbackModel??u,modelOptions:d,onChange:k}),o.jsx(Rr,{label:"Haiku",value:((E=O.roles.haiku)==null?void 0:E.upstreamModel)??"",modelOptions:d,onChange:K=>L("haiku",K)}),o.jsx(Rr,{label:"Sonnet",value:((T=O.roles.sonnet)==null?void 0:T.upstreamModel)??"",modelOptions:d,onChange:K=>L("sonnet",K)}),o.jsx(Rr,{label:"Opus",value:((z=O.roles.opus)==null?void 0:z.upstreamModel)??"",modelOptions:d,onChange:K=>L("opus",K)})]}),o.jsx("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:"Claude Code 会把 Haiku、Sonnet、Opus 三种客户端模型映射到你选择的上游模型。"})]})}const g=f0(n.id,h[n.id],u),b=O=>{p(O),v(n.id,{selectionKind:"single-model",protocolPreference:Qd(n.id),defaultModel:O})};return o.jsxs("div",{className:"space-y-3",children:[o.jsx(vd,{client:n,selected:i,installable:s,onToggleInstall:x}),o.jsx(Rr,{label:"模型",value:g.defaultModel,modelOptions:d,onChange:b}),o.jsxs("div",{className:"grid gap-2 lg:grid-cols-2",children:[o.jsx(_r,{label:"Proxy URL",value:m,compact:!0}),o.jsx(_r,{label:"API key",value:"TOKENBUDDY_PROXY",compact:!0})]}),n.configPath?o.jsx("div",{className:"truncate rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-3 py-2 font-mono text-[0.72rem] text-[var(--color-muted)]",children:n.configPath}):null]})}function vd({client:n,selected:i,installable:s,onToggleInstall:u}){return o.jsxs("div",{className:"flex flex-col gap-2 border-b border-[var(--color-line-2)] pb-3 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("div",{className:"text-[0.9rem] font-semibold text-[var(--color-ink)]",children:n.name}),o.jsx("span",{className:"rounded-full bg-[var(--color-page)] px-2 py-0.5 text-[0.7rem] text-[var(--color-muted)]",children:x0(n)})]}),o.jsx("div",{className:"mt-1 text-[0.74rem] leading-5 text-[var(--color-muted)]",children:n.reason})]}),n.id!=="custom"?o.jsxs("button",{type:"button",disabled:!s,onClick:u,className:["inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-[8px] px-2.5 text-[0.78rem] font-semibold transition disabled:cursor-not-allowed disabled:opacity-45",i?"bg-[var(--color-purple)] text-white hover:bg-[var(--color-purple-2)]":"border border-[var(--color-line-2)] bg-white text-[var(--color-ink)] hover:border-[var(--color-purple)]"].join(" "),children:[o.jsx(Kt,{className:"size-3.5"}),i?"已加入安装":"加入安装"]}):null]})}function Rr({label:n,value:i,modelOptions:s,onChange:u}){return o.jsxs("label",{className:"block",children:[o.jsx("span",{className:"text-[0.74rem] font-semibold text-[var(--color-muted)]",children:n}),o.jsxs("select",{value:i,onChange:d=>u(d.target.value),className:"mt-1 h-9 w-full rounded-[8px] border border-[var(--color-line-2)] bg-white px-2.5 text-[0.82rem] text-[var(--color-ink)] outline-none focus:border-[var(--color-purple)]",children:[o.jsx("option",{value:"",children:"请选择模型"}),s.map(d=>o.jsx("option",{value:d,children:d},d))]})]})}function _r({label:n,value:i,compact:s=!1}){const[u,d]=j.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(i),d(!0),window.setTimeout(()=>d(!1),1200)}catch{d(!1)}};return o.jsxs("div",{className:["rounded-[10px] border border-[var(--color-line-2)] bg-white px-3 py-2",s?"min-w-0":""].join(" "),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"text-[0.72rem] font-semibold text-[var(--color-muted)]",children:n}),o.jsxs("button",{type:"button",onClick:h,className:"inline-flex h-7 items-center justify-center gap-1 rounded-[7px] border border-[var(--color-line-2)] bg-[var(--color-page)] px-2 text-[0.7rem] font-semibold text-[var(--color-ink)] transition hover:border-[var(--color-purple)]",children:[o.jsx(x2,{className:"size-3"}),u?"已复制":"复制"]})]}),o.jsx("div",{className:"mt-1 truncate font-mono text-[0.76rem] text-[var(--color-ink)]",children:i})]})}function ES({items:n,status:i,generatedAt:s,running:u,error:d,onRefresh:h,onBack:m,onContinue:x}){return o.jsx("div",{className:"space-y-3",children:o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:5,title:"验证网关",detail:"本机状态",meta:u?"checking":Gv(i),action:o.jsxs("button",{type:"button",disabled:u,onClick:h,className:"inline-flex h-8 items-center justify-center gap-1.5 rounded-[8px] border border-[var(--color-line-2)] bg-white px-2.5 text-[0.78rem] font-semibold text-[var(--color-ink)] transition hover:border-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[u?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(kd,{className:"size-3.5"}),"刷新"]})}),o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[0.76rem] text-[var(--color-muted)]",children:[o.jsx("span",{className:["rounded-full px-2 py-0.5 font-semibold",HS(i)].join(" "),children:u?"正在检查":Gv(i)}),s?o.jsxs("span",{children:["检查时间:",new Date(s).toLocaleString()]}):o.jsx("span",{children:"等待后端检查。"})]}),d?o.jsxs("div",{className:"mt-3 rounded-[10px] bg-rose-50 px-3 py-2 text-[0.82rem] leading-6 text-rose-700",children:["检查失败:",d instanceof Error?d.message:String(d)]}):null,o.jsx("div",{className:"mt-3 grid gap-2 xl:grid-cols-2",children:n.map(p=>o.jsxs("div",{className:"flex gap-2.5 rounded-[10px] border border-[var(--color-line-2)] bg-white p-2.5",children:[o.jsx("span",{className:["mt-0.5 grid size-6 shrink-0 place-items-center rounded-full",QS(p.status)].join(" "),children:p.ok?o.jsx(Kt,{className:"size-3.5"}):o.jsx(kd,{className:"size-3.5"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[0.82rem] font-semibold text-[var(--color-ink)]",children:[p.title,o.jsx("span",{className:["rounded-full px-1.5 py-0.5 text-[0.68rem]",qS(p.status)].join(" "),children:LS(p.status)})]}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:p.body})]})]},p.title))}),o.jsxs("div",{className:"mt-3 flex flex-col gap-2 border-t border-[var(--color-line-2)] pt-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"text-[0.78rem] leading-5 text-[var(--color-muted)]",children:"发现异常时返回对应步骤补齐配置。"}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:m,className:"inline-flex h-9 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-muted)] transition hover:text-[var(--color-ink)]",children:"上一步"}),o.jsxs("button",{type:"button",onClick:x,className:"inline-flex h-9 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)]",children:["下一步",o.jsx(ko,{className:"size-3.5"})]})]})]})]})})}function TS({complete:n,message:i,installMessage:s,canInstall:u,installed:d,saving:h,onBack:m,onComplete:x,onInstall:p}){return o.jsx("div",{className:"space-y-3",children:o.jsxs(yt,{className:"p-3",children:[o.jsx(_i,{index:6,title:n?"初始化完成":"桌面应用",detail:d?"已安装":"可选安装",meta:n?"complete":d?"installed":"optional",action:o.jsxs("button",{type:"button",disabled:d,onClick:p,className:"inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-2.5 text-[0.78rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[o.jsx(Kt,{className:"size-3.5"}),d?"已安装":"安装应用"]})}),o.jsxs("div",{className:"mt-3 grid gap-3 xl:grid-cols-[minmax(0,290px)_minmax(0,1fr)]",children:[o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-[var(--color-page)] p-3",children:[o.jsx("div",{className:"text-[0.84rem] font-semibold text-[var(--color-ink)]",children:d?"TokenBuddy 桌面应用已安装":u?"浏览器支持直接安装":"可从浏览器菜单安装"}),o.jsx("div",{className:"mt-1 text-[0.76rem] leading-5 text-[var(--color-muted)]",children:d?"你可以从系统应用入口打开 TokenBuddy。":u?"点击右上角安装按钮并确认浏览器弹窗。":"在地址栏右侧或浏览器菜单中找到安装应用入口。"}),s?o.jsx("div",{className:"mt-2 text-[0.78rem] font-medium text-[var(--color-ink)]",children:s}):null]}),o.jsx("div",{className:"grid gap-2 lg:grid-cols-3",children:[{title:"安装入口",body:"地址栏或浏览器菜单。"},{title:"应用名称",body:"TokenBuddy。"},{title:"本地服务",body:"继续由 tb-proxyd 提供。"}].map((v,g)=>o.jsxs("div",{className:"rounded-[10px] border border-[var(--color-line-2)] bg-white p-2.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"grid size-5 place-items-center rounded-full bg-[var(--color-lavender)] font-mono text-[0.68rem] font-semibold text-[var(--color-purple)]",children:g+1}),o.jsx("span",{className:"text-[0.8rem] font-semibold text-[var(--color-ink)]",children:v.title})]}),o.jsx("div",{className:"mt-1 text-[0.74rem] leading-5 text-[var(--color-muted)]",children:v.body})]},v.title))})]}),o.jsxs("div",{className:"mt-3 flex flex-col gap-2 border-t border-[var(--color-line-2)] pt-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"text-[0.78rem] leading-5 text-[var(--color-muted)]",children:i?o.jsx("span",{className:"font-medium text-[var(--color-ink)]",children:i}):"完成后可以进入控制台。"}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:m,className:"inline-flex h-9 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-muted)] transition hover:text-[var(--color-ink)]",children:"上一步"}),o.jsxs("button",{type:"button",disabled:h||n,onClick:x,className:"inline-flex h-9 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[h?o.jsx(pt,{className:"size-3.5 animate-spin"}):o.jsx(Kt,{className:"size-3.5"}),n?"已完成":"完成初始化"]}),o.jsx(Do,{to:"/overview",className:"inline-flex h-9 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-ink)] transition hover:border-[var(--color-purple)]",children:"进入控制台"})]})]})]})})}function c0({backLabel:n,nextLabel:i,saving:s=!1,message:u,onBack:d,onNext:h}){return o.jsxs(yt,{className:"flex flex-col gap-2.5 p-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"text-[0.78rem] leading-5 text-[var(--color-muted)]",children:u??"配置完成后继续下一步。"}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:d,className:"inline-flex h-9 items-center justify-center rounded-[8px] border border-[var(--color-line-2)] bg-white px-3 text-[0.82rem] font-semibold text-[var(--color-muted)] transition hover:text-[var(--color-ink)]",children:n}),o.jsxs("button",{type:"button",disabled:s,onClick:h,className:"inline-flex h-9 items-center justify-center gap-1.5 rounded-[8px] bg-[var(--color-ink)] px-3 text-[0.82rem] font-semibold text-white transition hover:bg-[var(--color-purple)] disabled:cursor-not-allowed disabled:opacity-45",children:[s?o.jsx(pt,{className:"size-3.5 animate-spin"}):null,i,s?null:o.jsx(ko,{className:"size-3.5"})]})]})]})}function zS(n,i,s){const u=new Map;for(const m of i){const x=u.get(m.sellerId)??{modelIds:new Set,protocols:new Set,paymentMethods:new Set,responseMsSamples:[],ttftMsSamples:[]};x.modelIds.add(m.id);for(const p of m.supportedProtocols)x.protocols.add(p);for(const p of m.paymentMethods)x.paymentMethods.add(p);x.minInputPriceMicrosPer1m=Lv(x.minInputPriceMicrosPer1m,m.inputPriceMicrosPer1m),x.minOutputPriceMicrosPer1m=Lv(x.minOutputPriceMicrosPer1m,m.outputPriceMicrosPer1m),u.set(m.sellerId,x)}for(const m of s){const x=m.sellerKey;if(!x)continue;const p=u.get(x)??{modelIds:new Set,protocols:new Set,paymentMethods:new Set,responseMsSamples:[],ttftMsSamples:[]};Number.isFinite(m.durationMs)&&p.responseMsSamples.push(m.durationMs),Number.isFinite(m.ttftMs)&&p.ttftMsSamples.push(m.ttftMs),u.set(x,p)}const d=n.map(m=>{const x=u.get(m.id);return{id:m.id,name:Qv(m.name??m.manifestSellerId??m.id),status:m.status,modelCount:m.modelCount??(x==null?void 0:x.modelIds.size)??0,protocols:m.supportedProtocols??Array.from((x==null?void 0:x.protocols)??[]),paymentMethods:m.paymentMethods??Array.from((x==null?void 0:x.paymentMethods)??[]),discountRatio:m.discountRatio,serviceFeeRatio:m.serviceFeeRatio,minInputPriceMicrosPer1m:x==null?void 0:x.minInputPriceMicrosPer1m,minOutputPriceMicrosPer1m:x==null?void 0:x.minOutputPriceMicrosPer1m,avgResponseMs:jo((x==null?void 0:x.responseMsSamples)??[]),avgTtftMs:jo((x==null?void 0:x.ttftMsSamples)??[])}}),h=new Set(d.map(m=>m.id));for(const[m,x]of u.entries()){if(h.has(m))continue;const p=i.find(v=>v.sellerId===m);d.push({id:m,name:Qv((p==null?void 0:p.sellerName)??m),status:"unknown",modelCount:x.modelIds.size,protocols:Array.from(x.protocols).sort(),paymentMethods:Array.from(x.paymentMethods).sort(),minInputPriceMicrosPer1m:x.minInputPriceMicrosPer1m,minOutputPriceMicrosPer1m:x.minOutputPriceMicrosPer1m,avgResponseMs:jo(x.responseMsSamples),avgTtftMs:jo(x.ttftMsSamples)})}return d0(d,{key:"status",direction:"asc"})}function d0(n,i){const s=i.direction==="asc"?1:-1;return[...n].sort((u,d)=>{const h=AS(u,d,i.key);if(h!==0)return h*s;const m=Ro(u.status)-Ro(d.status);return m!==0?m:d.modelCount!==u.modelCount?d.modelCount-u.modelCount:u.name.localeCompare(d.name)})}function AS(n,i,s){return s==="status"?Ro(n.status)-Ro(i.status):s==="name"?n.name.localeCompare(i.name):s==="models"?n.modelCount-i.modelCount:s==="price"?xd(Hv(n),Hv(i)):s==="discount"?xd(n.discountRatio,i.discountRatio):xd(n.avgResponseMs??n.avgTtftMs,i.avgResponseMs??i.avgTtftMs)}function Hv(n){if(!(!Number.isFinite(n.minInputPriceMicrosPer1m)&&!Number.isFinite(n.minOutputPriceMicrosPer1m)))return(n.minInputPriceMicrosPer1m??0)+(n.minOutputPriceMicrosPer1m??0)}function Lv(n,i){const s=Number.isFinite(n),u=Number.isFinite(i);if(s&&u)return Math.min(n,i);if(s)return n;if(u)return i}function jo(n){const i=n.filter(s=>Number.isFinite(s));if(i.length!==0)return i.reduce((s,u)=>s+u,0)/i.length}function xd(n,i){const s=Number.isFinite(n),u=Number.isFinite(i);return s&&u?n-i:s?-1:u?1:0}function Qv(n){var i;return((i=n.split("(")[0])==null?void 0:i.trim())||n}function RS(n,i){return!Number.isFinite(n)&&!Number.isFinite(i)?"-":`I ${qv(n)} / O ${qv(i)}`}function qv(n){if(!Number.isFinite(n))return"-";const i=n/1e6;return`$${i>=1?i.toFixed(2):i.toFixed(4)}`}function _S(n){if(!Number.isFinite(n))return"-";const i=n;if(i<=0)return"free";const s=Math.max(0,1-i);return s>=.01?`${Math.round(s*100)}% off`:`x${i.toFixed(2)}`}function OS(n,i){return!Number.isFinite(n)&&!Number.isFinite(i)?"-":Number.isFinite(n)&&Number.isFinite(i)?`${Math.round(n)}ms / T ${Math.round(i)}ms`:Number.isFinite(n)?`${Math.round(n)}ms`:`T ${Math.round(i)}ms`}function Yv(n,i,s,u){const d=u||s[0]||"",h={};for(const m of n)m!=="custom"&&(h[m]=m==="claude-code"?m0(i[m],s,d):f0(m,i[m],d));return h}function f0(n,i,s){return(i==null?void 0:i.selectionKind)==="single-model"?{...i,protocolPreference:i.protocolPreference??Qd(n),defaultModel:i.defaultModel||s}:{selectionKind:"single-model",protocolPreference:Qd(n),defaultModel:s}}function m0(n,i,s){var h;const u=(n==null?void 0:n.selectionKind)==="claude-role-mapping"?(h=n.roles.sonnet)==null?void 0:h.upstreamModel:void 0,d=s||u||i[0]||"";return(n==null?void 0:n.selectionKind)==="claude-role-mapping"?{...n,protocolPreference:"messages",fallbackModel:n.fallbackModel||d,roles:{...n.roles,sonnet:n.roles.sonnet??(d?{upstreamModel:d,displayName:d}:void 0)}}:{selectionKind:"claude-role-mapping",protocolPreference:"messages",fallbackModel:d,roles:{sonnet:d?{upstreamModel:d,displayName:d}:void 0}}}function Qd(n){if(n==="codex")return"responses";if(n==="claude-code"||n==="claude-desktop")return"messages";if(["openclaw","opencode","hermes"].includes(n))return"chat_completions"}function h0(n){return{id:"custom",name:"其他工具",status:"manual",detected:!0,configured:!1,reason:"复制本地推理服务接口到任意 OpenAI 或 Anthropic 兼容客户端。",manualConfig:{openaiBaseUrl:p0(n),anthropicBaseUrl:n,apiKey:"TOKENBUDDY_PROXY"}}}function p0(n){const i=n.replace(/\/+$/,"");return i.endsWith("/v1")?i:`${i}/v1`}function DS(n){const i=n.trim();return i?i.slice(0,1).toUpperCase():"?"}function kS(n,i,s,u){if(n==="fixed"){const d=s.trim();return d?{mode:n,scorer:i,sellerId:d}:void 0}if(n==="fixedSet"){const d=Array.from(new Set(u.map(h=>h.trim()).filter(Boolean)));return d.length===0?void 0:{mode:n,scorer:i,sellerIds:d}}return{mode:n,scorer:i}}function US({serviceReady:n,modelCount:i,routingMode:s,paymentReady:u,configuredTools:d}){return[{title:n?"本地网关正在运行":"本地网关尚未就绪",body:n?"控制台服务和本地代理已经响应。":"请确认 tb-proxyd 已启动,并等待控制台刷新状态。",ok:n,status:n?"passed":"failed",details:[]},{title:i>0?"模型目录已加载":"模型目录尚未加载",body:i>0?`已发现 ${i} 个可用模型。`:"请检查供应商注册表或网络连接。",ok:i>0,status:i>0?"passed":"failed",details:[]},{title:"路由策略已选择",body:`当前策略为${v0(s)},TokenBuddy 会按这个策略规划供应商。`,ok:!!s,status:s?"passed":"failed",details:[]},{title:u?"支付方式可用":"支付方式尚未可用",body:u?"已经检测到至少一个可用支付方式。":"请完成 ClawTip 绑定,或稍后在支付页面补充配置。",ok:u,status:u?"passed":"warning",details:[]},{title:d>0?"终端工具已接入":"终端工具尚未接入",body:d>0?`已经写入 ${d} 个终端工具配置。`:"如果你还没有安装终端工具,可以稍后再执行接入。",ok:d>0,status:d>0?"passed":"warning",details:[]}]}function BS(n){return{title:n.label,body:n.message,ok:n.status==="passed"||n.status==="skipped",status:n.status,details:n.details}}function Gv(n){return n==="passed"?"全部通过":n==="warning"?"存在警告":n==="failed"?"需要修复":"等待检查"}function HS(n){return n==="passed"?"bg-emerald-50 text-emerald-700":n==="warning"?"bg-amber-50 text-amber-700":n==="failed"?"bg-rose-50 text-rose-700":"bg-[var(--color-page)] text-[var(--color-muted)]"}function LS(n){return n==="passed"?"通过":n==="warning"?"警告":n==="failed"?"失败":"已跳过"}function QS(n){return n==="passed"?"bg-emerald-50 text-emerald-700":n==="failed"?"bg-rose-50 text-rose-700":n==="skipped"?"bg-slate-100 text-slate-600":"bg-amber-50 text-amber-700"}function qS(n){return n==="passed"?"bg-emerald-50 text-emerald-700":n==="failed"?"bg-rose-50 text-rose-700":n==="skipped"?"bg-slate-100 text-slate-600":"bg-amber-50 text-amber-700"}function v0(n){return n==="fixed"?"固定供应商":n==="fixedSet"?"固定供应商组":"全自动"}function YS(n){return n==="speed"?"速度优先":n==="discount"?"成本优先":"平衡模式"}function GS(n){const i=n.toLowerCase();return["ok","healthy","active","available"].includes(i)?"状态正常":["error","failed","unavailable"].includes(i)?"状态异常":["unknown","pending"].includes(i)?"等待检测":`状态:${n}`}function KS(n){const i=n.toLowerCase();return["ok","healthy","active","available"].includes(i)?"bg-emerald-50 text-emerald-700":["error","failed","unavailable"].includes(i)?"bg-rose-50 text-rose-700":"bg-amber-50 text-amber-700"}function Ro(n){const i=n.toLowerCase();return["ok","healthy","active","available"].includes(i)?0:["unknown","pending"].includes(i)?1:2}function x0(n){return n.configured?"已配置":n.status==="installed"?"已安装":n.status==="manual"?"需要手动配置":n.detected?"已检测到":"未检测到"}function XS(n){return n==="create"?"创建":"更新"}function VS(){return o.jsxs("div",{className:"min-h-full",children:[o.jsxs("nav",{className:"sticky top-0 z-10 flex h-12 items-center gap-2 border-b border-[var(--color-line-2)] bg-[var(--color-page)] px-3 sm:gap-5 sm:px-6",children:[o.jsxs(Wd,{to:"/overview",className:"group inline-flex shrink-0 items-baseline rounded-[7px] px-1 py-1.5 focus:outline-none focus:ring-2 focus:ring-[var(--color-purple)]","aria-label":"TOKENBUDDY.AI home",children:[o.jsx("span",{className:"relative font-mono text-[0.78rem] font-black uppercase leading-none tracking-[0.14em] text-[var(--color-ink)] after:absolute after:-bottom-1 after:left-0 after:h-0.5 after:w-full after:origin-left after:scale-x-75 after:rounded-full after:bg-[var(--color-purple)] after:opacity-0 after:transition group-hover:after:scale-x-100 group-hover:after:opacity-100 sm:text-[0.86rem]",children:"TOKENBUDDY"}),o.jsxs("span",{className:"ml-0.5 font-mono text-[0.78rem] font-black uppercase leading-none tracking-[0.06em] text-[var(--color-purple)] sm:text-[0.86rem]",children:[o.jsx("span",{className:"text-[var(--color-purple-2)]",children:"."}),"AI"]})]}),o.jsxs("div",{className:"ml-auto flex min-w-0 gap-0.5 sm:gap-1",children:[o.jsx(yd,{to:"/overview",children:"Overview"}),o.jsx(yd,{to:"/routing",children:"Routing"}),o.jsx(yd,{to:"/ledger",children:"Ledger"})]})]}),o.jsx("main",{className:"mx-auto max-w-[1180px] px-3 py-5 sm:px-6 sm:py-7",children:o.jsxs(Lg,{children:[o.jsx(fi,{path:"/",element:o.jsx(Tv,{})}),o.jsx(fi,{path:"/overview",element:o.jsx(Tv,{})}),o.jsx(fi,{path:"/init",element:o.jsx(uS,{})}),o.jsx(fi,{path:"/routing",element:o.jsx(pj,{})}),o.jsx(fi,{path:"/ledger",element:o.jsx(Gj,{})})]})})]})}function yd({to:n,children:i}){return o.jsx(Wd,{to:n,className:({isActive:s})=>["rounded-full px-2 py-1.5 text-[0.82rem] font-medium transition-colors sm:px-3.5 sm:text-[0.92rem]",s?"font-semibold text-[var(--color-ink)] underline decoration-[var(--color-purple)] decoration-2 underline-offset-[10px]":"text-[var(--color-muted)] hover:text-[var(--color-ink)]"].join(" "),children:i})}function ZS(){!("serviceWorker"in navigator)||window.location.port==="5173"||window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})})}const $S=new G1({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1,retry:1}}});Qb.createRoot(document.getElementById("root")).render(o.jsx(j.StrictMode,{children:o.jsx(K1,{client:$S,children:o.jsx(u1,{children:o.jsx(VS,{})})})}));ZS();
|
|
226
|
+
//# sourceMappingURL=index-BILQcD8g.js.map
|