tokmon 0.19.7 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./timeline-_qBfhBAY.js","./chart-C6EyXc8D.js","./breakdown-C9UzD3X2.js"])))=>i.map(i=>d[i]);
2
- var dv=Object.defineProperty;var fv=(e,o,r)=>o in e?dv(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var Je=(e,o,r)=>fv(e,typeof o!="symbol"?o+"":o,r);(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(l){if(l.ep)return;l.ep=!0;const u=r(l);fetch(l.href,u)}})();var i1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ba={exports:{}},Fo={},Da={exports:{}},we={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Uf;function pv(){if(Uf)return we;Uf=1;var e=Symbol.for("react.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function k(N,H,ue){this.props=N,this.context=H,this.refs=R,this.updater=ue||x}k.prototype.isReactComponent={},k.prototype.setState=function(N,H){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,H,"setState")},k.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function _(){}_.prototype=k.prototype;function M(N,H,ue){this.props=N,this.context=H,this.refs=R,this.updater=ue||x}var b=M.prototype=new _;b.constructor=M,C(b,k.prototype),b.isPureReactComponent=!0;var I=Array.isArray,A=Object.prototype.hasOwnProperty,B={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function $(N,H,ue){var ae,re={},ye=null,Ce=null;if(H!=null)for(ae in H.ref!==void 0&&(Ce=H.ref),H.key!==void 0&&(ye=""+H.key),H)A.call(H,ae)&&!L.hasOwnProperty(ae)&&(re[ae]=H[ae]);var ve=arguments.length-2;if(ve===1)re.children=ue;else if(1<ve){for(var xe=Array(ve),be=0;be<ve;be++)xe[be]=arguments[be+2];re.children=xe}if(N&&N.defaultProps)for(ae in ve=N.defaultProps,ve)re[ae]===void 0&&(re[ae]=ve[ae]);return{$$typeof:e,type:N,key:ye,ref:Ce,props:re,_owner:B.current}}function V(N,H){return{$$typeof:e,type:N.type,key:H,ref:N.ref,props:N.props,_owner:N._owner}}function U(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function O(N){var H={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ue){return H[ue]})}var Y=/\/+/g;function K(N,H){return typeof N=="object"&&N!==null&&N.key!=null?O(""+N.key):H.toString(36)}function W(N,H,ue,ae,re){var ye=typeof N;(ye==="undefined"||ye==="boolean")&&(N=null);var Ce=!1;if(N===null)Ce=!0;else switch(ye){case"string":case"number":Ce=!0;break;case"object":switch(N.$$typeof){case e:case o:Ce=!0}}if(Ce)return Ce=N,re=re(Ce),N=ae===""?"."+K(Ce,0):ae,I(re)?(ue="",N!=null&&(ue=N.replace(Y,"$&/")+"/"),W(re,H,ue,"",function(be){return be})):re!=null&&(U(re)&&(re=V(re,ue+(!re.key||Ce&&Ce.key===re.key?"":(""+re.key).replace(Y,"$&/")+"/")+N)),H.push(re)),1;if(Ce=0,ae=ae===""?".":ae+":",I(N))for(var ve=0;ve<N.length;ve++){ye=N[ve];var xe=ae+K(ye,ve);Ce+=W(ye,H,ue,xe,re)}else if(xe=w(N),typeof xe=="function")for(N=xe.call(N),ve=0;!(ye=N.next()).done;)ye=ye.value,xe=ae+K(ye,ve++),Ce+=W(ye,H,ue,xe,re);else if(ye==="object")throw H=String(N),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return Ce}function pe(N,H,ue){if(N==null)return N;var ae=[],re=0;return W(N,ae,"","",function(ye){return H.call(ue,ye,re++)}),ae}function ge(N){if(N._status===-1){var H=N._result;H=H(),H.then(function(ue){(N._status===0||N._status===-1)&&(N._status=1,N._result=ue)},function(ue){(N._status===0||N._status===-1)&&(N._status=2,N._result=ue)}),N._status===-1&&(N._status=0,N._result=H)}if(N._status===1)return N._result.default;throw N._result}var Z={current:null},J={transition:null},le={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:J,ReactCurrentOwner:B};function ee(){throw Error("act(...) is not supported in production builds of React.")}return we.Children={map:pe,forEach:function(N,H,ue){pe(N,function(){H.apply(this,arguments)},ue)},count:function(N){var H=0;return pe(N,function(){H++}),H},toArray:function(N){return pe(N,function(H){return H})||[]},only:function(N){if(!U(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},we.Component=k,we.Fragment=r,we.Profiler=l,we.PureComponent=M,we.StrictMode=i,we.Suspense=p,we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,we.act=ee,we.cloneElement=function(N,H,ue){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ae=C({},N.props),re=N.key,ye=N.ref,Ce=N._owner;if(H!=null){if(H.ref!==void 0&&(ye=H.ref,Ce=B.current),H.key!==void 0&&(re=""+H.key),N.type&&N.type.defaultProps)var ve=N.type.defaultProps;for(xe in H)A.call(H,xe)&&!L.hasOwnProperty(xe)&&(ae[xe]=H[xe]===void 0&&ve!==void 0?ve[xe]:H[xe])}var xe=arguments.length-2;if(xe===1)ae.children=ue;else if(1<xe){ve=Array(xe);for(var be=0;be<xe;be++)ve[be]=arguments[be+2];ae.children=ve}return{$$typeof:e,type:N.type,key:re,ref:ye,props:ae,_owner:Ce}},we.createContext=function(N){return N={$$typeof:d,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:u,_context:N},N.Consumer=N},we.createElement=$,we.createFactory=function(N){var H=$.bind(null,N);return H.type=N,H},we.createRef=function(){return{current:null}},we.forwardRef=function(N){return{$$typeof:h,render:N}},we.isValidElement=U,we.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:ge}},we.memo=function(N,H){return{$$typeof:m,type:N,compare:H===void 0?null:H}},we.startTransition=function(N){var H=J.transition;J.transition={};try{N()}finally{J.transition=H}},we.unstable_act=ee,we.useCallback=function(N,H){return Z.current.useCallback(N,H)},we.useContext=function(N){return Z.current.useContext(N)},we.useDebugValue=function(){},we.useDeferredValue=function(N){return Z.current.useDeferredValue(N)},we.useEffect=function(N,H){return Z.current.useEffect(N,H)},we.useId=function(){return Z.current.useId()},we.useImperativeHandle=function(N,H,ue){return Z.current.useImperativeHandle(N,H,ue)},we.useInsertionEffect=function(N,H){return Z.current.useInsertionEffect(N,H)},we.useLayoutEffect=function(N,H){return Z.current.useLayoutEffect(N,H)},we.useMemo=function(N,H){return Z.current.useMemo(N,H)},we.useReducer=function(N,H,ue){return Z.current.useReducer(N,H,ue)},we.useRef=function(N){return Z.current.useRef(N)},we.useState=function(N){return Z.current.useState(N)},we.useSyncExternalStore=function(N,H,ue){return Z.current.useSyncExternalStore(N,H,ue)},we.useTransition=function(){return Z.current.useTransition()},we.version="18.3.1",we}var Hf;function ts(){return Hf||(Hf=1,Da.exports=pv()),Da.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var qf;function gv(){if(qf)return Fo;qf=1;var e=ts(),o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(h,p,m){var y,v={},w=null,x=null;m!==void 0&&(w=""+m),p.key!==void 0&&(w=""+p.key),p.ref!==void 0&&(x=p.ref);for(y in p)i.call(p,y)&&!u.hasOwnProperty(y)&&(v[y]=p[y]);if(h&&h.defaultProps)for(y in p=h.defaultProps,p)v[y]===void 0&&(v[y]=p[y]);return{$$typeof:o,type:h,key:w,ref:x,props:v,_owner:l.current}}return Fo.Fragment=r,Fo.jsx=d,Fo.jsxs=d,Fo}var Gf;function mv(){return Gf||(Gf=1,ba.exports=gv()),ba.exports}var g=mv(),z=ts();const Go=hv(z);var hi={},za={exports:{}},ut={},Aa={exports:{}},Oa={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var Wf;function vv(){return Wf||(Wf=1,(function(e){function o(J,le){var ee=J.length;J.push(le);e:for(;0<ee;){var N=ee-1>>>1,H=J[N];if(0<l(H,le))J[N]=le,J[ee]=H,ee=N;else break e}}function r(J){return J.length===0?null:J[0]}function i(J){if(J.length===0)return null;var le=J[0],ee=J.pop();if(ee!==le){J[0]=ee;e:for(var N=0,H=J.length,ue=H>>>1;N<ue;){var ae=2*(N+1)-1,re=J[ae],ye=ae+1,Ce=J[ye];if(0>l(re,ee))ye<H&&0>l(Ce,re)?(J[N]=Ce,J[ye]=ee,N=ye):(J[N]=re,J[ae]=ee,N=ae);else if(ye<H&&0>l(Ce,ee))J[N]=Ce,J[ye]=ee,N=ye;else break e}}return le}function l(J,le){var ee=J.sortIndex-le.sortIndex;return ee!==0?ee:J.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();e.unstable_now=function(){return d.now()-h}}var p=[],m=[],y=1,v=null,w=3,x=!1,C=!1,R=!1,k=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(J){for(var le=r(m);le!==null;){if(le.callback===null)i(m);else if(le.startTime<=J)i(m),le.sortIndex=le.expirationTime,o(p,le);else break;le=r(m)}}function I(J){if(R=!1,b(J),!C)if(r(p)!==null)C=!0,ge(A);else{var le=r(m);le!==null&&Z(I,le.startTime-J)}}function A(J,le){C=!1,R&&(R=!1,_($),$=-1),x=!0;var ee=w;try{for(b(le),v=r(p);v!==null&&(!(v.expirationTime>le)||J&&!O());){var N=v.callback;if(typeof N=="function"){v.callback=null,w=v.priorityLevel;var H=N(v.expirationTime<=le);le=e.unstable_now(),typeof H=="function"?v.callback=H:v===r(p)&&i(p),b(le)}else i(p);v=r(p)}if(v!==null)var ue=!0;else{var ae=r(m);ae!==null&&Z(I,ae.startTime-le),ue=!1}return ue}finally{v=null,w=ee,x=!1}}var B=!1,L=null,$=-1,V=5,U=-1;function O(){return!(e.unstable_now()-U<V)}function Y(){if(L!==null){var J=e.unstable_now();U=J;var le=!0;try{le=L(!0,J)}finally{le?K():(B=!1,L=null)}}else B=!1}var K;if(typeof M=="function")K=function(){M(Y)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,pe=W.port2;W.port1.onmessage=Y,K=function(){pe.postMessage(null)}}else K=function(){k(Y,0)};function ge(J){L=J,B||(B=!0,K())}function Z(J,le){$=k(function(){J(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){C||x||(C=!0,ge(A))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return r(p)},e.unstable_next=function(J){switch(w){case 1:case 2:case 3:var le=3;break;default:le=w}var ee=w;w=le;try{return J()}finally{w=ee}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,le){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var ee=w;w=J;try{return le()}finally{w=ee}},e.unstable_scheduleCallback=function(J,le,ee){var N=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?N+ee:N):ee=N,J){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=ee+H,J={id:y++,callback:le,priorityLevel:J,startTime:ee,expirationTime:H,sortIndex:-1},ee>N?(J.sortIndex=ee,o(m,J),r(p)===null&&J===r(m)&&(R?(_($),$=-1):R=!0,Z(I,ee-N))):(J.sortIndex=H,o(p,J),C||x||(C=!0,ge(A))),J},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(J){var le=w;return function(){var ee=w;w=le;try{return J.apply(this,arguments)}finally{w=ee}}}})(Oa)),Oa}var Qf;function yv(){return Qf||(Qf=1,Aa.exports=vv()),Aa.exports}/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var Kf;function xv(){if(Kf)return ut;Kf=1;var e=ts(),o=yv();function r(t){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+t,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function u(t,n){d(t,n),d(t+"Capture",n)}function d(t,n){for(l[t]=n,t=0;t<n.length;t++)i.add(n[t])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,y={},v={};function w(t){return p.call(v,t)?!0:p.call(y,t)?!1:m.test(t)?v[t]=!0:(y[t]=!0,!1)}function x(t,n,s,a){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function C(t,n,s,a){if(n===null||typeof n>"u"||x(t,n,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function R(t,n,s,a,c,f,S){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=t,this.type=n,this.sanitizeURL=f,this.removeEmptyString=S}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){k[t]=new R(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var n=t[0];k[n]=new R(n,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){k[t]=new R(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){k[t]=new R(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){k[t]=new R(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){k[t]=new R(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){k[t]=new R(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){k[t]=new R(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){k[t]=new R(t,5,!1,t.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function M(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var n=t.replace(_,M);k[n]=new R(n,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var n=t.replace(_,M);k[n]=new R(n,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var n=t.replace(_,M);k[n]=new R(n,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){k[t]=new R(t,1,!1,t.toLowerCase(),null,!1,!1)}),k.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){k[t]=new R(t,1,!1,t.toLowerCase(),null,!0,!0)});function b(t,n,s,a){var c=k.hasOwnProperty(n)?k[n]:null;(c!==null?c.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(C(n,s,c,a)&&(s=null),a||c===null?w(n)&&(s===null?t.removeAttribute(n):t.setAttribute(n,""+s)):c.mustUseProperty?t[c.propertyName]=s===null?c.type===3?!1:"":s:(n=c.attributeName,a=c.attributeNamespace,s===null?t.removeAttribute(n):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,a?t.setAttributeNS(a,n,s):t.setAttribute(n,s))))}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),B=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),O=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),J=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var ee=Object.assign,N;function H(t){if(N===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);N=n&&n[1]||""}return`
35
- `+N+t}var ue=!1;function ae(t,n){if(!t||ue)return"";ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(D){var a=D}Reflect.construct(t,[],n)}else{try{n.call()}catch(D){a=D}t.call(n.prototype)}else{try{throw Error()}catch(D){a=D}t()}}catch(D){if(D&&a&&typeof D.stack=="string"){for(var c=D.stack.split(`
36
- `),f=a.stack.split(`
37
- `),S=c.length-1,P=f.length-1;1<=S&&0<=P&&c[S]!==f[P];)P--;for(;1<=S&&0<=P;S--,P--)if(c[S]!==f[P]){if(S!==1||P!==1)do if(S--,P--,0>P||c[S]!==f[P]){var E=`
38
- `+c[S].replace(" at new "," at ");return t.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",t.displayName)),E}while(1<=S&&0<=P);break}}}finally{ue=!1,Error.prepareStackTrace=s}return(t=t?t.displayName||t.name:"")?H(t):""}function re(t){switch(t.tag){case 5:return H(t.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return t=ae(t.type,!1),t;case 11:return t=ae(t.type.render,!1),t;case 1:return t=ae(t.type,!0),t;default:return""}}function ye(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case L:return"Fragment";case B:return"Portal";case V:return"Profiler";case $:return"StrictMode";case K:return"Suspense";case W:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case O:return(t.displayName||"Context")+".Consumer";case U:return(t._context.displayName||"Context")+".Provider";case Y:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case pe:return n=t.displayName||null,n!==null?n:ye(t.type)||"Memo";case ge:n=t._payload,t=t._init;try{return ye(t(n))}catch{}}return null}function Ce(t){var n=t.type;switch(t.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(n);case 8:return n===$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function ve(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function xe(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function be(t){var n=xe(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),a=""+t[n];if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return c.call(this)},set:function(S){a=""+S,f.call(this,S)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Ht(t){t._valueTracker||(t._valueTracker=be(t))}function zn(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var s=n.getValue(),a="";return t&&(a=xe(t)?t.checked?"true":"false":t.value),t=a,t!==s?(n.setValue(t),!0):!1}function An(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ur(t,n){var s=n.checked;return ee({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??t._wrapperState.initialChecked})}function os(t,n){var s=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;s=ve(n.value!=null?n.value:s),t._wrapperState={initialChecked:a,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Gr(t,n){n=n.checked,n!=null&&b(t,"checked",n,!1)}function cr(t,n){Gr(t,n);var s=ve(n.value),a=n.type;if(s!=null)a==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+s):t.value!==""+s&&(t.value=""+s);else if(a==="submit"||a==="reset"){t.removeAttribute("value");return}n.hasOwnProperty("value")?On(t,n.type,s):n.hasOwnProperty("defaultValue")&&On(t,n.type,ve(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(t.defaultChecked=!!n.defaultChecked)}function qt(t,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+t._wrapperState.initialValue,s||n===t.value||(t.value=n),t.defaultValue=n}s=t.name,s!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,s!==""&&(t.name=s)}function On(t,n,s){(n!=="number"||An(t.ownerDocument)!==t)&&(s==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+s&&(t.defaultValue=""+s))}var ft=Array.isArray;function sn(t,n,s,a){if(t=t.options,n){n={};for(var c=0;c<s.length;c++)n["$"+s[c]]=!0;for(s=0;s<t.length;s++)c=n.hasOwnProperty("$"+t[s].value),t[s].selected!==c&&(t[s].selected=c),c&&a&&(t[s].defaultSelected=!0)}else{for(s=""+ve(s),n=null,c=0;c<t.length;c++){if(t[c].value===s){t[c].selected=!0,a&&(t[c].defaultSelected=!0);return}n!==null||t[c].disabled||(n=t[c])}n!==null&&(n.selected=!0)}}function dr(t,n){if(n.dangerouslySetInnerHTML!=null)throw Error(r(91));return ee({},n,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ss(t,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(r(92));if(ft(s)){if(1<s.length)throw Error(r(93));s=s[0]}n=s}n==null&&(n=""),s=n}t._wrapperState={initialValue:ve(s)}}function Wr(t,n){var s=ve(n.value),a=ve(n.defaultValue);s!=null&&(s=""+s,s!==t.value&&(t.value=s),n.defaultValue==null&&t.defaultValue!==s&&(t.defaultValue=s)),a!=null&&(t.defaultValue=""+a)}function ke(t){var n=t.textContent;n===t._wrapperState.initialValue&&n!==""&&n!==null&&(t.value=n)}function qe(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Et(t,n){return t==null||t==="http://www.w3.org/1999/xhtml"?qe(n):t==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var fr,nc=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,a,c){MSApp.execUnsafeLocalFunction(function(){return t(n,s,a,c)})}:t})(function(t,n){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=n;else{for(fr=fr||document.createElement("div"),fr.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=fr.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;n.firstChild;)t.appendChild(n.firstChild)}});function Qr(t,n){if(n){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=n;return}}t.textContent=n}var Kr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gg=["Webkit","ms","Moz","O"];Object.keys(Kr).forEach(function(t){gg.forEach(function(n){n=n+t.charAt(0).toUpperCase()+t.substring(1),Kr[n]=Kr[t]})});function rc(t,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||Kr.hasOwnProperty(t)&&Kr[t]?(""+n).trim():n+"px"}function oc(t,n){t=t.style;for(var s in n)if(n.hasOwnProperty(s)){var a=s.indexOf("--")===0,c=rc(s,n[s],a);s==="float"&&(s="cssFloat"),a?t.setProperty(s,c):t[s]=c}}var mg=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Qi(t,n){if(n){if(mg[t]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(r(137,t));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(r(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(r(61))}if(n.style!=null&&typeof n.style!="object")throw Error(r(62))}}function Ki(t,n){if(t.indexOf("-")===-1)return typeof n.is=="string";switch(t){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 Xi=null;function Yi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ji=null,hr=null,pr=null;function sc(t){if(t=yo(t)){if(typeof Ji!="function")throw Error(r(280));var n=t.stateNode;n&&(n=js(n),Ji(t.stateNode,t.type,n))}}function ic(t){hr?pr?pr.push(t):pr=[t]:hr=t}function lc(){if(hr){var t=hr,n=pr;if(pr=hr=null,sc(t),n)for(t=0;t<n.length;t++)sc(n[t])}}function ac(t,n){return t(n)}function uc(){}var Zi=!1;function cc(t,n,s){if(Zi)return t(n,s);Zi=!0;try{return ac(t,n,s)}finally{Zi=!1,(hr!==null||pr!==null)&&(uc(),lc())}}function Xr(t,n){var s=t.stateNode;if(s===null)return null;var a=js(s);if(a===null)return null;s=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,n,typeof s));return s}var el=!1;if(h)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){el=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{el=!1}function vg(t,n,s,a,c,f,S,P,E){var D=Array.prototype.slice.call(arguments,3);try{n.apply(s,D)}catch(G){this.onError(G)}}var Jr=!1,is=null,ls=!1,tl=null,yg={onError:function(t){Jr=!0,is=t}};function xg(t,n,s,a,c,f,S,P,E){Jr=!1,is=null,vg.apply(yg,arguments)}function wg(t,n,s,a,c,f,S,P,E){if(xg.apply(this,arguments),Jr){if(Jr){var D=is;Jr=!1,is=null}else throw Error(r(198));ls||(ls=!0,tl=D)}}function Vn(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function dc(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function fc(t){if(Vn(t)!==t)throw Error(r(188))}function Sg(t){var n=t.alternate;if(!n){if(n=Vn(t),n===null)throw Error(r(188));return n!==t?null:t}for(var s=t,a=n;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(a=c.return,a!==null){s=a;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return fc(c),t;if(f===a)return fc(c),n;f=f.sibling}throw Error(r(188))}if(s.return!==a.return)s=c,a=f;else{for(var S=!1,P=c.child;P;){if(P===s){S=!0,s=c,a=f;break}if(P===a){S=!0,a=c,s=f;break}P=P.sibling}if(!S){for(P=f.child;P;){if(P===s){S=!0,s=f,a=c;break}if(P===a){S=!0,a=f,s=c;break}P=P.sibling}if(!S)throw Error(r(189))}}if(s.alternate!==a)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:n}function hc(t){return t=Sg(t),t!==null?pc(t):null}function pc(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var n=pc(t);if(n!==null)return n;t=t.sibling}return null}var gc=o.unstable_scheduleCallback,mc=o.unstable_cancelCallback,Cg=o.unstable_shouldYield,Rg=o.unstable_requestPaint,De=o.unstable_now,kg=o.unstable_getCurrentPriorityLevel,nl=o.unstable_ImmediatePriority,vc=o.unstable_UserBlockingPriority,as=o.unstable_NormalPriority,_g=o.unstable_LowPriority,yc=o.unstable_IdlePriority,us=null,Dt=null;function Pg(t){if(Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(us,t,void 0,(t.current.flags&128)===128)}catch{}}var jt=Math.clz32?Math.clz32:Mg,Eg=Math.log,jg=Math.LN2;function Mg(t){return t>>>=0,t===0?32:31-(Eg(t)/jg|0)|0}var cs=64,ds=4194304;function Zr(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fs(t,n){var s=t.pendingLanes;if(s===0)return 0;var a=0,c=t.suspendedLanes,f=t.pingedLanes,S=s&268435455;if(S!==0){var P=S&~c;P!==0?a=Zr(P):(f&=S,f!==0&&(a=Zr(f)))}else S=s&~c,S!==0?a=Zr(S):f!==0&&(a=Zr(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=s&16),n=t.entangledLanes,n!==0)for(t=t.entanglements,n&=a;0<n;)s=31-jt(n),c=1<<s,a|=t[s],n&=~c;return a}function Lg(t,n){switch(t){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ng(t,n){for(var s=t.suspendedLanes,a=t.pingedLanes,c=t.expirationTimes,f=t.pendingLanes;0<f;){var S=31-jt(f),P=1<<S,E=c[S];E===-1?((P&s)===0||(P&a)!==0)&&(c[S]=Lg(P,n)):E<=n&&(t.expiredLanes|=P),f&=~P}}function rl(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function xc(){var t=cs;return cs<<=1,(cs&4194240)===0&&(cs=64),t}function ol(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function eo(t,n,s){t.pendingLanes|=n,n!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,n=31-jt(n),t[n]=s}function Ig(t,n){var s=t.pendingLanes&~n;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=n,t.mutableReadLanes&=n,t.entangledLanes&=n,n=t.entanglements;var a=t.eventTimes;for(t=t.expirationTimes;0<s;){var c=31-jt(s),f=1<<c;n[c]=0,a[c]=-1,t[c]=-1,s&=~f}}function sl(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var a=31-jt(s),c=1<<a;c&n|t[a]&n&&(t[a]|=n),s&=~c}}var _e=0;function wc(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Sc,il,Cc,Rc,kc,ll=!1,hs=[],ln=null,an=null,un=null,to=new Map,no=new Map,cn=[],Fg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _c(t,n){switch(t){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":an=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":to.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":no.delete(n.pointerId)}}function ro(t,n,s,a,c,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:s,eventSystemFlags:a,nativeEvent:f,targetContainers:[c]},n!==null&&(n=yo(n),n!==null&&il(n)),t):(t.eventSystemFlags|=a,n=t.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),t)}function Tg(t,n,s,a,c){switch(n){case"focusin":return ln=ro(ln,t,n,s,a,c),!0;case"dragenter":return an=ro(an,t,n,s,a,c),!0;case"mouseover":return un=ro(un,t,n,s,a,c),!0;case"pointerover":var f=c.pointerId;return to.set(f,ro(to.get(f)||null,t,n,s,a,c)),!0;case"gotpointercapture":return f=c.pointerId,no.set(f,ro(no.get(f)||null,t,n,s,a,c)),!0}return!1}function Pc(t){var n=Bn(t.target);if(n!==null){var s=Vn(n);if(s!==null){if(n=s.tag,n===13){if(n=dc(s),n!==null){t.blockedOn=n,kc(t.priority,function(){Cc(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ps(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=ul(t.domEventName,t.eventSystemFlags,n[0],t.nativeEvent);if(s===null){s=t.nativeEvent;var a=new s.constructor(s.type,s);Xi=a,s.target.dispatchEvent(a),Xi=null}else return n=yo(s),n!==null&&il(n),t.blockedOn=s,!1;n.shift()}return!0}function Ec(t,n,s){ps(t)&&s.delete(n)}function $g(){ll=!1,ln!==null&&ps(ln)&&(ln=null),an!==null&&ps(an)&&(an=null),un!==null&&ps(un)&&(un=null),to.forEach(Ec),no.forEach(Ec)}function oo(t,n){t.blockedOn===n&&(t.blockedOn=null,ll||(ll=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,$g)))}function so(t){function n(c){return oo(c,t)}if(0<hs.length){oo(hs[0],t);for(var s=1;s<hs.length;s++){var a=hs[s];a.blockedOn===t&&(a.blockedOn=null)}}for(ln!==null&&oo(ln,t),an!==null&&oo(an,t),un!==null&&oo(un,t),to.forEach(n),no.forEach(n),s=0;s<cn.length;s++)a=cn[s],a.blockedOn===t&&(a.blockedOn=null);for(;0<cn.length&&(s=cn[0],s.blockedOn===null);)Pc(s),s.blockedOn===null&&cn.shift()}var gr=I.ReactCurrentBatchConfig,gs=!0;function bg(t,n,s,a){var c=_e,f=gr.transition;gr.transition=null;try{_e=1,al(t,n,s,a)}finally{_e=c,gr.transition=f}}function Dg(t,n,s,a){var c=_e,f=gr.transition;gr.transition=null;try{_e=4,al(t,n,s,a)}finally{_e=c,gr.transition=f}}function al(t,n,s,a){if(gs){var c=ul(t,n,s,a);if(c===null)Pl(t,n,a,ms,s),_c(t,a);else if(Tg(c,t,n,s,a))a.stopPropagation();else if(_c(t,a),n&4&&-1<Fg.indexOf(t)){for(;c!==null;){var f=yo(c);if(f!==null&&Sc(f),f=ul(t,n,s,a),f===null&&Pl(t,n,a,ms,s),f===c)break;c=f}c!==null&&a.stopPropagation()}else Pl(t,n,a,null,s)}}var ms=null;function ul(t,n,s,a){if(ms=null,t=Yi(a),t=Bn(t),t!==null)if(n=Vn(t),n===null)t=null;else if(s=n.tag,s===13){if(t=dc(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null);return ms=t,null}function jc(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kg()){case nl:return 1;case vc:return 4;case as:case _g:return 16;case yc:return 536870912;default:return 16}default:return 16}}var dn=null,cl=null,vs=null;function Mc(){if(vs)return vs;var t,n=cl,s=n.length,a,c="value"in dn?dn.value:dn.textContent,f=c.length;for(t=0;t<s&&n[t]===c[t];t++);var S=s-t;for(a=1;a<=S&&n[s-a]===c[f-a];a++);return vs=c.slice(t,1<a?1-a:void 0)}function ys(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function xs(){return!0}function Lc(){return!1}function ht(t){function n(s,a,c,f,S){this._reactName=s,this._targetInst=c,this.type=a,this.nativeEvent=f,this.target=S,this.currentTarget=null;for(var P in t)t.hasOwnProperty(P)&&(s=t[P],this[P]=s?s(f):f[P]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?xs:Lc,this.isPropagationStopped=Lc,this}return ee(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=xs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=xs)},persist:function(){},isPersistent:xs}),n}var mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dl=ht(mr),io=ee({},mr,{view:0,detail:0}),zg=ht(io),fl,hl,lo,ws=ee({},io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gl,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==lo&&(lo&&t.type==="mousemove"?(fl=t.screenX-lo.screenX,hl=t.screenY-lo.screenY):hl=fl=0,lo=t),fl)},movementY:function(t){return"movementY"in t?t.movementY:hl}}),Nc=ht(ws),Ag=ee({},ws,{dataTransfer:0}),Og=ht(Ag),Vg=ee({},io,{relatedTarget:0}),pl=ht(Vg),Bg=ee({},mr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ug=ht(Bg),Hg=ee({},mr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qg=ht(Hg),Gg=ee({},mr,{data:0}),Ic=ht(Gg),Wg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qg={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"},Kg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xg(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Kg[t])?!!n[t]:!1}function gl(){return Xg}var Yg=ee({},io,{key:function(t){if(t.key){var n=Wg[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=ys(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Qg[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gl,charCode:function(t){return t.type==="keypress"?ys(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ys(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Jg=ht(Yg),Zg=ee({},ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fc=ht(Zg),em=ee({},io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gl}),tm=ht(em),nm=ee({},mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rm=ht(nm),om=ee({},ws,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),sm=ht(om),im=[9,13,27,32],ml=h&&"CompositionEvent"in window,ao=null;h&&"documentMode"in document&&(ao=document.documentMode);var lm=h&&"TextEvent"in window&&!ao,Tc=h&&(!ml||ao&&8<ao&&11>=ao),$c=" ",bc=!1;function Dc(t,n){switch(t){case"keyup":return im.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zc(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vr=!1;function am(t,n){switch(t){case"compositionend":return zc(n);case"keypress":return n.which!==32?null:(bc=!0,$c);case"textInput":return t=n.data,t===$c&&bc?null:t;default:return null}}function um(t,n){if(vr)return t==="compositionend"||!ml&&Dc(t,n)?(t=Mc(),vs=cl=dn=null,vr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Tc&&n.locale!=="ko"?null:n.data;default:return null}}var cm={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 Ac(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!cm[t.type]:n==="textarea"}function Oc(t,n,s,a){ic(a),n=_s(n,"onChange"),0<n.length&&(s=new dl("onChange","change",null,s,a),t.push({event:s,listeners:n}))}var uo=null,co=null;function dm(t){od(t,0)}function Ss(t){var n=Cr(t);if(zn(n))return t}function fm(t,n){if(t==="change")return n}var Vc=!1;if(h){var vl;if(h){var yl="oninput"in document;if(!yl){var Bc=document.createElement("div");Bc.setAttribute("oninput","return;"),yl=typeof Bc.oninput=="function"}vl=yl}else vl=!1;Vc=vl&&(!document.documentMode||9<document.documentMode)}function Uc(){uo&&(uo.detachEvent("onpropertychange",Hc),co=uo=null)}function Hc(t){if(t.propertyName==="value"&&Ss(co)){var n=[];Oc(n,co,t,Yi(t)),cc(dm,n)}}function hm(t,n,s){t==="focusin"?(Uc(),uo=n,co=s,uo.attachEvent("onpropertychange",Hc)):t==="focusout"&&Uc()}function pm(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ss(co)}function gm(t,n){if(t==="click")return Ss(n)}function mm(t,n){if(t==="input"||t==="change")return Ss(n)}function vm(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Mt=typeof Object.is=="function"?Object.is:vm;function fo(t,n){if(Mt(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var s=Object.keys(t),a=Object.keys(n);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var c=s[a];if(!p.call(n,c)||!Mt(t[c],n[c]))return!1}return!0}function qc(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Gc(t,n){var s=qc(t);t=0;for(var a;s;){if(s.nodeType===3){if(a=t+s.textContent.length,t<=n&&a>=n)return{node:s,offset:n-t};t=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=qc(s)}}function Wc(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Wc(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Qc(){for(var t=window,n=An();n instanceof t.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)t=n.contentWindow;else break;n=An(t.document)}return n}function xl(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function ym(t){var n=Qc(),s=t.focusedElem,a=t.selectionRange;if(n!==s&&s&&s.ownerDocument&&Wc(s.ownerDocument.documentElement,s)){if(a!==null&&xl(s)){if(n=a.start,t=a.end,t===void 0&&(t=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(t,s.value.length);else if(t=(n=s.ownerDocument||document)&&n.defaultView||window,t.getSelection){t=t.getSelection();var c=s.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!t.extend&&f>a&&(c=a,a=f,f=c),c=Gc(s,f);var S=Gc(s,a);c&&S&&(t.rangeCount!==1||t.anchorNode!==c.node||t.anchorOffset!==c.offset||t.focusNode!==S.node||t.focusOffset!==S.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),t.removeAllRanges(),f>a?(t.addRange(n),t.extend(S.node,S.offset)):(n.setEnd(S.node,S.offset),t.addRange(n)))}}for(n=[],t=s;t=t.parentNode;)t.nodeType===1&&n.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)t=n[s],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var xm=h&&"documentMode"in document&&11>=document.documentMode,yr=null,wl=null,ho=null,Sl=!1;function Kc(t,n,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Sl||yr==null||yr!==An(a)||(a=yr,"selectionStart"in a&&xl(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ho&&fo(ho,a)||(ho=a,a=_s(wl,"onSelect"),0<a.length&&(n=new dl("onSelect","select",null,n,s),t.push({event:n,listeners:a}),n.target=yr)))}function Cs(t,n){var s={};return s[t.toLowerCase()]=n.toLowerCase(),s["Webkit"+t]="webkit"+n,s["Moz"+t]="moz"+n,s}var xr={animationend:Cs("Animation","AnimationEnd"),animationiteration:Cs("Animation","AnimationIteration"),animationstart:Cs("Animation","AnimationStart"),transitionend:Cs("Transition","TransitionEnd")},Cl={},Xc={};h&&(Xc=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);function Rs(t){if(Cl[t])return Cl[t];if(!xr[t])return t;var n=xr[t],s;for(s in n)if(n.hasOwnProperty(s)&&s in Xc)return Cl[t]=n[s];return t}var Yc=Rs("animationend"),Jc=Rs("animationiteration"),Zc=Rs("animationstart"),ed=Rs("transitionend"),td=new Map,nd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fn(t,n){td.set(t,n),u(n,[t])}for(var Rl=0;Rl<nd.length;Rl++){var kl=nd[Rl],wm=kl.toLowerCase(),Sm=kl[0].toUpperCase()+kl.slice(1);fn(wm,"on"+Sm)}fn(Yc,"onAnimationEnd"),fn(Jc,"onAnimationIteration"),fn(Zc,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(ed,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var po="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(" "),Cm=new Set("cancel close invalid load scroll toggle".split(" ").concat(po));function rd(t,n,s){var a=t.type||"unknown-event";t.currentTarget=s,wg(a,n,void 0,t),t.currentTarget=null}function od(t,n){n=(n&4)!==0;for(var s=0;s<t.length;s++){var a=t[s],c=a.event;a=a.listeners;e:{var f=void 0;if(n)for(var S=a.length-1;0<=S;S--){var P=a[S],E=P.instance,D=P.currentTarget;if(P=P.listener,E!==f&&c.isPropagationStopped())break e;rd(c,P,D),f=E}else for(S=0;S<a.length;S++){if(P=a[S],E=P.instance,D=P.currentTarget,P=P.listener,E!==f&&c.isPropagationStopped())break e;rd(c,P,D),f=E}}}if(ls)throw t=tl,ls=!1,tl=null,t}function je(t,n){var s=n[Il];s===void 0&&(s=n[Il]=new Set);var a=t+"__bubble";s.has(a)||(sd(n,t,2,!1),s.add(a))}function _l(t,n,s){var a=0;n&&(a|=4),sd(s,t,a,n)}var ks="_reactListening"+Math.random().toString(36).slice(2);function go(t){if(!t[ks]){t[ks]=!0,i.forEach(function(s){s!=="selectionchange"&&(Cm.has(s)||_l(s,!1,t),_l(s,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[ks]||(n[ks]=!0,_l("selectionchange",!1,n))}}function sd(t,n,s,a){switch(jc(n)){case 1:var c=bg;break;case 4:c=Dg;break;default:c=al}s=c.bind(null,n,s,t),c=void 0,!el||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),a?c!==void 0?t.addEventListener(n,s,{capture:!0,passive:c}):t.addEventListener(n,s,!0):c!==void 0?t.addEventListener(n,s,{passive:c}):t.addEventListener(n,s,!1)}function Pl(t,n,s,a,c){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var S=a.tag;if(S===3||S===4){var P=a.stateNode.containerInfo;if(P===c||P.nodeType===8&&P.parentNode===c)break;if(S===4)for(S=a.return;S!==null;){var E=S.tag;if((E===3||E===4)&&(E=S.stateNode.containerInfo,E===c||E.nodeType===8&&E.parentNode===c))return;S=S.return}for(;P!==null;){if(S=Bn(P),S===null)return;if(E=S.tag,E===5||E===6){a=f=S;continue e}P=P.parentNode}}a=a.return}cc(function(){var D=f,G=Yi(s),Q=[];e:{var q=td.get(t);if(q!==void 0){var te=dl,oe=t;switch(t){case"keypress":if(ys(s)===0)break e;case"keydown":case"keyup":te=Jg;break;case"focusin":oe="focus",te=pl;break;case"focusout":oe="blur",te=pl;break;case"beforeblur":case"afterblur":te=pl;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Nc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Og;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=tm;break;case Yc:case Jc:case Zc:te=Ug;break;case ed:te=rm;break;case"scroll":te=zg;break;case"wheel":te=sm;break;case"copy":case"cut":case"paste":te=qg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Fc}var se=(n&4)!==0,ze=!se&&t==="scroll",F=se?q!==null?q+"Capture":null:q;se=[];for(var j=D,T;j!==null;){T=j;var X=T.stateNode;if(T.tag===5&&X!==null&&(T=X,F!==null&&(X=Xr(j,F),X!=null&&se.push(mo(j,X,T)))),ze)break;j=j.return}0<se.length&&(q=new te(q,oe,null,s,G),Q.push({event:q,listeners:se}))}}if((n&7)===0){e:{if(q=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",q&&s!==Xi&&(oe=s.relatedTarget||s.fromElement)&&(Bn(oe)||oe[Gt]))break e;if((te||q)&&(q=G.window===G?G:(q=G.ownerDocument)?q.defaultView||q.parentWindow:window,te?(oe=s.relatedTarget||s.toElement,te=D,oe=oe?Bn(oe):null,oe!==null&&(ze=Vn(oe),oe!==ze||oe.tag!==5&&oe.tag!==6)&&(oe=null)):(te=null,oe=D),te!==oe)){if(se=Nc,X="onMouseLeave",F="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(se=Fc,X="onPointerLeave",F="onPointerEnter",j="pointer"),ze=te==null?q:Cr(te),T=oe==null?q:Cr(oe),q=new se(X,j+"leave",te,s,G),q.target=ze,q.relatedTarget=T,X=null,Bn(G)===D&&(se=new se(F,j+"enter",oe,s,G),se.target=T,se.relatedTarget=ze,X=se),ze=X,te&&oe)t:{for(se=te,F=oe,j=0,T=se;T;T=wr(T))j++;for(T=0,X=F;X;X=wr(X))T++;for(;0<j-T;)se=wr(se),j--;for(;0<T-j;)F=wr(F),T--;for(;j--;){if(se===F||F!==null&&se===F.alternate)break t;se=wr(se),F=wr(F)}se=null}else se=null;te!==null&&id(Q,q,te,se,!1),oe!==null&&ze!==null&&id(Q,ze,oe,se,!0)}}e:{if(q=D?Cr(D):window,te=q.nodeName&&q.nodeName.toLowerCase(),te==="select"||te==="input"&&q.type==="file")var ie=fm;else if(Ac(q))if(Vc)ie=mm;else{ie=pm;var ce=hm}else(te=q.nodeName)&&te.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(ie=gm);if(ie&&(ie=ie(t,D))){Oc(Q,ie,s,G);break e}ce&&ce(t,q,D),t==="focusout"&&(ce=q._wrapperState)&&ce.controlled&&q.type==="number"&&On(q,"number",q.value)}switch(ce=D?Cr(D):window,t){case"focusin":(Ac(ce)||ce.contentEditable==="true")&&(yr=ce,wl=D,ho=null);break;case"focusout":ho=wl=yr=null;break;case"mousedown":Sl=!0;break;case"contextmenu":case"mouseup":case"dragend":Sl=!1,Kc(Q,s,G);break;case"selectionchange":if(xm)break;case"keydown":case"keyup":Kc(Q,s,G)}var de;if(ml)e:{switch(t){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else vr?Dc(t,s)&&(me="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(me="onCompositionStart");me&&(Tc&&s.locale!=="ko"&&(vr||me!=="onCompositionStart"?me==="onCompositionEnd"&&vr&&(de=Mc()):(dn=G,cl="value"in dn?dn.value:dn.textContent,vr=!0)),ce=_s(D,me),0<ce.length&&(me=new Ic(me,t,null,s,G),Q.push({event:me,listeners:ce}),de?me.data=de:(de=zc(s),de!==null&&(me.data=de)))),(de=lm?am(t,s):um(t,s))&&(D=_s(D,"onBeforeInput"),0<D.length&&(G=new Ic("onBeforeInput","beforeinput",null,s,G),Q.push({event:G,listeners:D}),G.data=de))}od(Q,n)})}function mo(t,n,s){return{instance:t,listener:n,currentTarget:s}}function _s(t,n){for(var s=n+"Capture",a=[];t!==null;){var c=t,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=Xr(t,s),f!=null&&a.unshift(mo(t,f,c)),f=Xr(t,n),f!=null&&a.push(mo(t,f,c))),t=t.return}return a}function wr(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function id(t,n,s,a,c){for(var f=n._reactName,S=[];s!==null&&s!==a;){var P=s,E=P.alternate,D=P.stateNode;if(E!==null&&E===a)break;P.tag===5&&D!==null&&(P=D,c?(E=Xr(s,f),E!=null&&S.unshift(mo(s,E,P))):c||(E=Xr(s,f),E!=null&&S.push(mo(s,E,P)))),s=s.return}S.length!==0&&t.push({event:n,listeners:S})}var Rm=/\r\n?/g,km=/\u0000|\uFFFD/g;function ld(t){return(typeof t=="string"?t:""+t).replace(Rm,`
39
- `).replace(km,"")}function Ps(t,n,s){if(n=ld(n),ld(t)!==n&&s)throw Error(r(425))}function Es(){}var El=null,jl=null;function Ml(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ll=typeof setTimeout=="function"?setTimeout:void 0,_m=typeof clearTimeout=="function"?clearTimeout:void 0,ad=typeof Promise=="function"?Promise:void 0,Pm=typeof queueMicrotask=="function"?queueMicrotask:typeof ad<"u"?function(t){return ad.resolve(null).then(t).catch(Em)}:Ll;function Em(t){setTimeout(function(){throw t})}function Nl(t,n){var s=n,a=0;do{var c=s.nextSibling;if(t.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(a===0){t.removeChild(c),so(n);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=c}while(s);so(n)}function hn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return t}function ud(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return t;n--}else s==="/$"&&n++}t=t.previousSibling}return null}var Sr=Math.random().toString(36).slice(2),zt="__reactFiber$"+Sr,vo="__reactProps$"+Sr,Gt="__reactContainer$"+Sr,Il="__reactEvents$"+Sr,jm="__reactListeners$"+Sr,Mm="__reactHandles$"+Sr;function Bn(t){var n=t[zt];if(n)return n;for(var s=t.parentNode;s;){if(n=s[Gt]||s[zt]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=ud(t);t!==null;){if(s=t[zt])return s;t=ud(t)}return n}t=s,s=t.parentNode}return null}function yo(t){return t=t[zt]||t[Gt],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Cr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(r(33))}function js(t){return t[vo]||null}var Fl=[],Rr=-1;function pn(t){return{current:t}}function Me(t){0>Rr||(t.current=Fl[Rr],Fl[Rr]=null,Rr--)}function Ee(t,n){Rr++,Fl[Rr]=t.current,t.current=n}var gn={},Qe=pn(gn),ot=pn(!1),Un=gn;function kr(t,n){var s=t.type.contextTypes;if(!s)return gn;var a=t.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=n[f];return a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=n,t.__reactInternalMemoizedMaskedChildContext=c),c}function st(t){return t=t.childContextTypes,t!=null}function Ms(){Me(ot),Me(Qe)}function cd(t,n,s){if(Qe.current!==gn)throw Error(r(168));Ee(Qe,n),Ee(ot,s)}function dd(t,n,s){var a=t.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(r(108,Ce(t)||"Unknown",c));return ee({},s,a)}function Ls(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||gn,Un=Qe.current,Ee(Qe,t),Ee(ot,ot.current),!0}function fd(t,n,s){var a=t.stateNode;if(!a)throw Error(r(169));s?(t=dd(t,n,Un),a.__reactInternalMemoizedMergedChildContext=t,Me(ot),Me(Qe),Ee(Qe,t)):Me(ot),Ee(ot,s)}var Wt=null,Ns=!1,Tl=!1;function hd(t){Wt===null?Wt=[t]:Wt.push(t)}function Lm(t){Ns=!0,hd(t)}function mn(){if(!Tl&&Wt!==null){Tl=!0;var t=0,n=_e;try{var s=Wt;for(_e=1;t<s.length;t++){var a=s[t];do a=a(!0);while(a!==null)}Wt=null,Ns=!1}catch(c){throw Wt!==null&&(Wt=Wt.slice(t+1)),gc(nl,mn),c}finally{_e=n,Tl=!1}}return null}var _r=[],Pr=0,Is=null,Fs=0,St=[],Ct=0,Hn=null,Qt=1,Kt="";function qn(t,n){_r[Pr++]=Fs,_r[Pr++]=Is,Is=t,Fs=n}function pd(t,n,s){St[Ct++]=Qt,St[Ct++]=Kt,St[Ct++]=Hn,Hn=t;var a=Qt;t=Kt;var c=32-jt(a)-1;a&=~(1<<c),s+=1;var f=32-jt(n)+c;if(30<f){var S=c-c%5;f=(a&(1<<S)-1).toString(32),a>>=S,c-=S,Qt=1<<32-jt(n)+c|s<<c|a,Kt=f+t}else Qt=1<<f|s<<c|a,Kt=t}function $l(t){t.return!==null&&(qn(t,1),pd(t,1,0))}function bl(t){for(;t===Is;)Is=_r[--Pr],_r[Pr]=null,Fs=_r[--Pr],_r[Pr]=null;for(;t===Hn;)Hn=St[--Ct],St[Ct]=null,Kt=St[--Ct],St[Ct]=null,Qt=St[--Ct],St[Ct]=null}var pt=null,gt=null,Le=!1,Lt=null;function gd(t,n){var s=Pt(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=t,n=t.deletions,n===null?(t.deletions=[s],t.flags|=16):n.push(s)}function md(t,n){switch(t.tag){case 5:var s=t.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(t.stateNode=n,pt=t,gt=hn(n.firstChild),!0):!1;case 6:return n=t.pendingProps===""||n.nodeType!==3?null:n,n!==null?(t.stateNode=n,pt=t,gt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=Hn!==null?{id:Qt,overflow:Kt}:null,t.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=Pt(18,null,null,0),s.stateNode=n,s.return=t,t.child=s,pt=t,gt=null,!0):!1;default:return!1}}function Dl(t){return(t.mode&1)!==0&&(t.flags&128)===0}function zl(t){if(Le){var n=gt;if(n){var s=n;if(!md(t,n)){if(Dl(t))throw Error(r(418));n=hn(s.nextSibling);var a=pt;n&&md(t,n)?gd(a,s):(t.flags=t.flags&-4097|2,Le=!1,pt=t)}}else{if(Dl(t))throw Error(r(418));t.flags=t.flags&-4097|2,Le=!1,pt=t}}}function vd(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;pt=t}function Ts(t){if(t!==pt)return!1;if(!Le)return vd(t),Le=!0,!1;var n;if((n=t.tag!==3)&&!(n=t.tag!==5)&&(n=t.type,n=n!=="head"&&n!=="body"&&!Ml(t.type,t.memoizedProps)),n&&(n=gt)){if(Dl(t))throw yd(),Error(r(418));for(;n;)gd(t,n),n=hn(n.nextSibling)}if(vd(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"){if(n===0){gt=hn(t.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}t=t.nextSibling}gt=null}}else gt=pt?hn(t.stateNode.nextSibling):null;return!0}function yd(){for(var t=gt;t;)t=hn(t.nextSibling)}function Er(){gt=pt=null,Le=!1}function Al(t){Lt===null?Lt=[t]:Lt.push(t)}var Nm=I.ReactCurrentBatchConfig;function xo(t,n,s){if(t=s.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var a=s.stateNode}if(!a)throw Error(r(147,t));var c=a,f=""+t;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(S){var P=c.refs;S===null?delete P[f]:P[f]=S},n._stringRef=f,n)}if(typeof t!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,t))}return t}function $s(t,n){throw t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t))}function xd(t){var n=t._init;return n(t._payload)}function wd(t){function n(F,j){if(t){var T=F.deletions;T===null?(F.deletions=[j],F.flags|=16):T.push(j)}}function s(F,j){if(!t)return null;for(;j!==null;)n(F,j),j=j.sibling;return null}function a(F,j){for(F=new Map;j!==null;)j.key!==null?F.set(j.key,j):F.set(j.index,j),j=j.sibling;return F}function c(F,j){return F=kn(F,j),F.index=0,F.sibling=null,F}function f(F,j,T){return F.index=T,t?(T=F.alternate,T!==null?(T=T.index,T<j?(F.flags|=2,j):T):(F.flags|=2,j)):(F.flags|=1048576,j)}function S(F){return t&&F.alternate===null&&(F.flags|=2),F}function P(F,j,T,X){return j===null||j.tag!==6?(j=La(T,F.mode,X),j.return=F,j):(j=c(j,T),j.return=F,j)}function E(F,j,T,X){var ie=T.type;return ie===L?G(F,j,T.props.children,X,T.key):j!==null&&(j.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ge&&xd(ie)===j.type)?(X=c(j,T.props),X.ref=xo(F,j,T),X.return=F,X):(X=si(T.type,T.key,T.props,null,F.mode,X),X.ref=xo(F,j,T),X.return=F,X)}function D(F,j,T,X){return j===null||j.tag!==4||j.stateNode.containerInfo!==T.containerInfo||j.stateNode.implementation!==T.implementation?(j=Na(T,F.mode,X),j.return=F,j):(j=c(j,T.children||[]),j.return=F,j)}function G(F,j,T,X,ie){return j===null||j.tag!==7?(j=Zn(T,F.mode,X,ie),j.return=F,j):(j=c(j,T),j.return=F,j)}function Q(F,j,T){if(typeof j=="string"&&j!==""||typeof j=="number")return j=La(""+j,F.mode,T),j.return=F,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case A:return T=si(j.type,j.key,j.props,null,F.mode,T),T.ref=xo(F,null,j),T.return=F,T;case B:return j=Na(j,F.mode,T),j.return=F,j;case ge:var X=j._init;return Q(F,X(j._payload),T)}if(ft(j)||le(j))return j=Zn(j,F.mode,T,null),j.return=F,j;$s(F,j)}return null}function q(F,j,T,X){var ie=j!==null?j.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return ie!==null?null:P(F,j,""+T,X);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case A:return T.key===ie?E(F,j,T,X):null;case B:return T.key===ie?D(F,j,T,X):null;case ge:return ie=T._init,q(F,j,ie(T._payload),X)}if(ft(T)||le(T))return ie!==null?null:G(F,j,T,X,null);$s(F,T)}return null}function te(F,j,T,X,ie){if(typeof X=="string"&&X!==""||typeof X=="number")return F=F.get(T)||null,P(j,F,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case A:return F=F.get(X.key===null?T:X.key)||null,E(j,F,X,ie);case B:return F=F.get(X.key===null?T:X.key)||null,D(j,F,X,ie);case ge:var ce=X._init;return te(F,j,T,ce(X._payload),ie)}if(ft(X)||le(X))return F=F.get(T)||null,G(j,F,X,ie,null);$s(j,X)}return null}function oe(F,j,T,X){for(var ie=null,ce=null,de=j,me=j=0,He=null;de!==null&&me<T.length;me++){de.index>me?(He=de,de=null):He=de.sibling;var Re=q(F,de,T[me],X);if(Re===null){de===null&&(de=He);break}t&&de&&Re.alternate===null&&n(F,de),j=f(Re,j,me),ce===null?ie=Re:ce.sibling=Re,ce=Re,de=He}if(me===T.length)return s(F,de),Le&&qn(F,me),ie;if(de===null){for(;me<T.length;me++)de=Q(F,T[me],X),de!==null&&(j=f(de,j,me),ce===null?ie=de:ce.sibling=de,ce=de);return Le&&qn(F,me),ie}for(de=a(F,de);me<T.length;me++)He=te(de,F,me,T[me],X),He!==null&&(t&&He.alternate!==null&&de.delete(He.key===null?me:He.key),j=f(He,j,me),ce===null?ie=He:ce.sibling=He,ce=He);return t&&de.forEach(function(_n){return n(F,_n)}),Le&&qn(F,me),ie}function se(F,j,T,X){var ie=le(T);if(typeof ie!="function")throw Error(r(150));if(T=ie.call(T),T==null)throw Error(r(151));for(var ce=ie=null,de=j,me=j=0,He=null,Re=T.next();de!==null&&!Re.done;me++,Re=T.next()){de.index>me?(He=de,de=null):He=de.sibling;var _n=q(F,de,Re.value,X);if(_n===null){de===null&&(de=He);break}t&&de&&_n.alternate===null&&n(F,de),j=f(_n,j,me),ce===null?ie=_n:ce.sibling=_n,ce=_n,de=He}if(Re.done)return s(F,de),Le&&qn(F,me),ie;if(de===null){for(;!Re.done;me++,Re=T.next())Re=Q(F,Re.value,X),Re!==null&&(j=f(Re,j,me),ce===null?ie=Re:ce.sibling=Re,ce=Re);return Le&&qn(F,me),ie}for(de=a(F,de);!Re.done;me++,Re=T.next())Re=te(de,F,me,Re.value,X),Re!==null&&(t&&Re.alternate!==null&&de.delete(Re.key===null?me:Re.key),j=f(Re,j,me),ce===null?ie=Re:ce.sibling=Re,ce=Re);return t&&de.forEach(function(cv){return n(F,cv)}),Le&&qn(F,me),ie}function ze(F,j,T,X){if(typeof T=="object"&&T!==null&&T.type===L&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case A:e:{for(var ie=T.key,ce=j;ce!==null;){if(ce.key===ie){if(ie=T.type,ie===L){if(ce.tag===7){s(F,ce.sibling),j=c(ce,T.props.children),j.return=F,F=j;break e}}else if(ce.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ge&&xd(ie)===ce.type){s(F,ce.sibling),j=c(ce,T.props),j.ref=xo(F,ce,T),j.return=F,F=j;break e}s(F,ce);break}else n(F,ce);ce=ce.sibling}T.type===L?(j=Zn(T.props.children,F.mode,X,T.key),j.return=F,F=j):(X=si(T.type,T.key,T.props,null,F.mode,X),X.ref=xo(F,j,T),X.return=F,F=X)}return S(F);case B:e:{for(ce=T.key;j!==null;){if(j.key===ce)if(j.tag===4&&j.stateNode.containerInfo===T.containerInfo&&j.stateNode.implementation===T.implementation){s(F,j.sibling),j=c(j,T.children||[]),j.return=F,F=j;break e}else{s(F,j);break}else n(F,j);j=j.sibling}j=Na(T,F.mode,X),j.return=F,F=j}return S(F);case ge:return ce=T._init,ze(F,j,ce(T._payload),X)}if(ft(T))return oe(F,j,T,X);if(le(T))return se(F,j,T,X);$s(F,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,j!==null&&j.tag===6?(s(F,j.sibling),j=c(j,T),j.return=F,F=j):(s(F,j),j=La(T,F.mode,X),j.return=F,F=j),S(F)):s(F,j)}return ze}var jr=wd(!0),Sd=wd(!1),bs=pn(null),Ds=null,Mr=null,Ol=null;function Vl(){Ol=Mr=Ds=null}function Bl(t){var n=bs.current;Me(bs),t._currentValue=n}function Ul(t,n,s){for(;t!==null;){var a=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),t===s)break;t=t.return}}function Lr(t,n){Ds=t,Ol=Mr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&n)!==0&&(it=!0),t.firstContext=null)}function Rt(t){var n=t._currentValue;if(Ol!==t)if(t={context:t,memoizedValue:n,next:null},Mr===null){if(Ds===null)throw Error(r(308));Mr=t,Ds.dependencies={lanes:0,firstContext:t}}else Mr=Mr.next=t;return n}var Gn=null;function Hl(t){Gn===null?Gn=[t]:Gn.push(t)}function Cd(t,n,s,a){var c=n.interleaved;return c===null?(s.next=s,Hl(n)):(s.next=c.next,c.next=s),n.interleaved=s,Xt(t,a)}function Xt(t,n){t.lanes|=n;var s=t.alternate;for(s!==null&&(s.lanes|=n),s=t,t=t.return;t!==null;)t.childLanes|=n,s=t.alternate,s!==null&&(s.childLanes|=n),s=t,t=t.return;return s.tag===3?s.stateNode:null}var vn=!1;function ql(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rd(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Yt(t,n){return{eventTime:t,lane:n,tag:0,payload:null,callback:null,next:null}}function yn(t,n,s){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Se&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,Xt(t,s)}return c=a.interleaved,c===null?(n.next=n,Hl(a)):(n.next=c.next,c.next=n),a.interleaved=n,Xt(t,s)}function zs(t,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var a=n.lanes;a&=t.pendingLanes,s|=a,n.lanes=s,sl(t,s)}}function kd(t,n){var s=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var S={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=S:f=f.next=S,s=s.next}while(s!==null);f===null?c=f=n:f=f.next=n}else c=f=n;s={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=n:t.next=n,s.lastBaseUpdate=n}function As(t,n,s,a){var c=t.updateQueue;vn=!1;var f=c.firstBaseUpdate,S=c.lastBaseUpdate,P=c.shared.pending;if(P!==null){c.shared.pending=null;var E=P,D=E.next;E.next=null,S===null?f=D:S.next=D,S=E;var G=t.alternate;G!==null&&(G=G.updateQueue,P=G.lastBaseUpdate,P!==S&&(P===null?G.firstBaseUpdate=D:P.next=D,G.lastBaseUpdate=E))}if(f!==null){var Q=c.baseState;S=0,G=D=E=null,P=f;do{var q=P.lane,te=P.eventTime;if((a&q)===q){G!==null&&(G=G.next={eventTime:te,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var oe=t,se=P;switch(q=n,te=s,se.tag){case 1:if(oe=se.payload,typeof oe=="function"){Q=oe.call(te,Q,q);break e}Q=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=se.payload,q=typeof oe=="function"?oe.call(te,Q,q):oe,q==null)break e;Q=ee({},Q,q);break e;case 2:vn=!0}}P.callback!==null&&P.lane!==0&&(t.flags|=64,q=c.effects,q===null?c.effects=[P]:q.push(P))}else te={eventTime:te,lane:q,tag:P.tag,payload:P.payload,callback:P.callback,next:null},G===null?(D=G=te,E=Q):G=G.next=te,S|=q;if(P=P.next,P===null){if(P=c.shared.pending,P===null)break;q=P,P=q.next,q.next=null,c.lastBaseUpdate=q,c.shared.pending=null}}while(!0);if(G===null&&(E=Q),c.baseState=E,c.firstBaseUpdate=D,c.lastBaseUpdate=G,n=c.shared.interleaved,n!==null){c=n;do S|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Kn|=S,t.lanes=S,t.memoizedState=Q}}function _d(t,n,s){if(t=n.effects,n.effects=null,t!==null)for(n=0;n<t.length;n++){var a=t[n],c=a.callback;if(c!==null){if(a.callback=null,a=s,typeof c!="function")throw Error(r(191,c));c.call(a)}}}var wo={},At=pn(wo),So=pn(wo),Co=pn(wo);function Wn(t){if(t===wo)throw Error(r(174));return t}function Gl(t,n){switch(Ee(Co,n),Ee(So,t),Ee(At,wo),t=n.nodeType,t){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Et(null,"");break;default:t=t===8?n.parentNode:n,n=t.namespaceURI||null,t=t.tagName,n=Et(n,t)}Me(At),Ee(At,n)}function Nr(){Me(At),Me(So),Me(Co)}function Pd(t){Wn(Co.current);var n=Wn(At.current),s=Et(n,t.type);n!==s&&(Ee(So,t),Ee(At,s))}function Wl(t){So.current===t&&(Me(At),Me(So))}var Fe=pn(0);function Os(t){for(var n=t;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ql=[];function Kl(){for(var t=0;t<Ql.length;t++)Ql[t]._workInProgressVersionPrimary=null;Ql.length=0}var Vs=I.ReactCurrentDispatcher,Xl=I.ReactCurrentBatchConfig,Qn=0,Te=null,Oe=null,Be=null,Bs=!1,Ro=!1,ko=0,Im=0;function Ke(){throw Error(r(321))}function Yl(t,n){if(n===null)return!1;for(var s=0;s<n.length&&s<t.length;s++)if(!Mt(t[s],n[s]))return!1;return!0}function Jl(t,n,s,a,c,f){if(Qn=f,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Vs.current=t===null||t.memoizedState===null?bm:Dm,t=s(a,c),Ro){f=0;do{if(Ro=!1,ko=0,25<=f)throw Error(r(301));f+=1,Be=Oe=null,n.updateQueue=null,Vs.current=zm,t=s(a,c)}while(Ro)}if(Vs.current=qs,n=Oe!==null&&Oe.next!==null,Qn=0,Be=Oe=Te=null,Bs=!1,n)throw Error(r(300));return t}function Zl(){var t=ko!==0;return ko=0,t}function Ot(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Te.memoizedState=Be=t:Be=Be.next=t,Be}function kt(){if(Oe===null){var t=Te.alternate;t=t!==null?t.memoizedState:null}else t=Oe.next;var n=Be===null?Te.memoizedState:Be.next;if(n!==null)Be=n,Oe=t;else{if(t===null)throw Error(r(310));Oe=t,t={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Be===null?Te.memoizedState=Be=t:Be=Be.next=t}return Be}function _o(t,n){return typeof n=="function"?n(t):n}function ea(t){var n=kt(),s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var a=Oe,c=a.baseQueue,f=s.pending;if(f!==null){if(c!==null){var S=c.next;c.next=f.next,f.next=S}a.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,a=a.baseState;var P=S=null,E=null,D=f;do{var G=D.lane;if((Qn&G)===G)E!==null&&(E=E.next={lane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),a=D.hasEagerState?D.eagerState:t(a,D.action);else{var Q={lane:G,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null};E===null?(P=E=Q,S=a):E=E.next=Q,Te.lanes|=G,Kn|=G}D=D.next}while(D!==null&&D!==f);E===null?S=a:E.next=P,Mt(a,n.memoizedState)||(it=!0),n.memoizedState=a,n.baseState=S,n.baseQueue=E,s.lastRenderedState=a}if(t=s.interleaved,t!==null){c=t;do f=c.lane,Te.lanes|=f,Kn|=f,c=c.next;while(c!==t)}else c===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function ta(t){var n=kt(),s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var a=s.dispatch,c=s.pending,f=n.memoizedState;if(c!==null){s.pending=null;var S=c=c.next;do f=t(f,S.action),S=S.next;while(S!==c);Mt(f,n.memoizedState)||(it=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,a]}function Ed(){}function jd(t,n){var s=Te,a=kt(),c=n(),f=!Mt(a.memoizedState,c);if(f&&(a.memoizedState=c,it=!0),a=a.queue,na(Nd.bind(null,s,a,t),[t]),a.getSnapshot!==n||f||Be!==null&&Be.memoizedState.tag&1){if(s.flags|=2048,Po(9,Ld.bind(null,s,a,c,n),void 0,null),Ue===null)throw Error(r(349));(Qn&30)!==0||Md(s,n,c)}return c}function Md(t,n,s){t.flags|=16384,t={getSnapshot:n,value:s},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.stores=[t]):(s=n.stores,s===null?n.stores=[t]:s.push(t))}function Ld(t,n,s,a){n.value=s,n.getSnapshot=a,Id(n)&&Fd(t)}function Nd(t,n,s){return s(function(){Id(n)&&Fd(t)})}function Id(t){var n=t.getSnapshot;t=t.value;try{var s=n();return!Mt(t,s)}catch{return!0}}function Fd(t){var n=Xt(t,1);n!==null&&Tt(n,t,1,-1)}function Td(t){var n=Ot();return typeof t=="function"&&(t=t()),n.memoizedState=n.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:t},n.queue=t,t=t.dispatch=$m.bind(null,Te,t),[n.memoizedState,t]}function Po(t,n,s,a){return t={tag:t,create:n,destroy:s,deps:a,next:null},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.lastEffect=t.next=t):(s=n.lastEffect,s===null?n.lastEffect=t.next=t:(a=s.next,s.next=t,t.next=a,n.lastEffect=t)),t}function $d(){return kt().memoizedState}function Us(t,n,s,a){var c=Ot();Te.flags|=t,c.memoizedState=Po(1|n,s,void 0,a===void 0?null:a)}function Hs(t,n,s,a){var c=kt();a=a===void 0?null:a;var f=void 0;if(Oe!==null){var S=Oe.memoizedState;if(f=S.destroy,a!==null&&Yl(a,S.deps)){c.memoizedState=Po(n,s,f,a);return}}Te.flags|=t,c.memoizedState=Po(1|n,s,f,a)}function bd(t,n){return Us(8390656,8,t,n)}function na(t,n){return Hs(2048,8,t,n)}function Dd(t,n){return Hs(4,2,t,n)}function zd(t,n){return Hs(4,4,t,n)}function Ad(t,n){if(typeof n=="function")return t=t(),n(t),function(){n(null)};if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Od(t,n,s){return s=s!=null?s.concat([t]):null,Hs(4,4,Ad.bind(null,n,t),s)}function ra(){}function Vd(t,n){var s=kt();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Yl(n,a[1])?a[0]:(s.memoizedState=[t,n],t)}function Bd(t,n){var s=kt();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Yl(n,a[1])?a[0]:(t=t(),s.memoizedState=[t,n],t)}function Ud(t,n,s){return(Qn&21)===0?(t.baseState&&(t.baseState=!1,it=!0),t.memoizedState=s):(Mt(s,n)||(s=xc(),Te.lanes|=s,Kn|=s,t.baseState=!0),n)}function Fm(t,n){var s=_e;_e=s!==0&&4>s?s:4,t(!0);var a=Xl.transition;Xl.transition={};try{t(!1),n()}finally{_e=s,Xl.transition=a}}function Hd(){return kt().memoizedState}function Tm(t,n,s){var a=Cn(t);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},qd(t))Gd(n,s);else if(s=Cd(t,n,s,a),s!==null){var c=nt();Tt(s,t,a,c),Wd(s,n,a)}}function $m(t,n,s){var a=Cn(t),c={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(qd(t))Gd(n,c);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var S=n.lastRenderedState,P=f(S,s);if(c.hasEagerState=!0,c.eagerState=P,Mt(P,S)){var E=n.interleaved;E===null?(c.next=c,Hl(n)):(c.next=E.next,E.next=c),n.interleaved=c;return}}catch{}finally{}s=Cd(t,n,c,a),s!==null&&(c=nt(),Tt(s,t,a,c),Wd(s,n,a))}}function qd(t){var n=t.alternate;return t===Te||n!==null&&n===Te}function Gd(t,n){Ro=Bs=!0;var s=t.pending;s===null?n.next=n:(n.next=s.next,s.next=n),t.pending=n}function Wd(t,n,s){if((s&4194240)!==0){var a=n.lanes;a&=t.pendingLanes,s|=a,n.lanes=s,sl(t,s)}}var qs={readContext:Rt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},bm={readContext:Rt,useCallback:function(t,n){return Ot().memoizedState=[t,n===void 0?null:n],t},useContext:Rt,useEffect:bd,useImperativeHandle:function(t,n,s){return s=s!=null?s.concat([t]):null,Us(4194308,4,Ad.bind(null,n,t),s)},useLayoutEffect:function(t,n){return Us(4194308,4,t,n)},useInsertionEffect:function(t,n){return Us(4,2,t,n)},useMemo:function(t,n){var s=Ot();return n=n===void 0?null:n,t=t(),s.memoizedState=[t,n],t},useReducer:function(t,n,s){var a=Ot();return n=s!==void 0?s(n):n,a.memoizedState=a.baseState=n,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Tm.bind(null,Te,t),[a.memoizedState,t]},useRef:function(t){var n=Ot();return t={current:t},n.memoizedState=t},useState:Td,useDebugValue:ra,useDeferredValue:function(t){return Ot().memoizedState=t},useTransition:function(){var t=Td(!1),n=t[0];return t=Fm.bind(null,t[1]),Ot().memoizedState=t,[n,t]},useMutableSource:function(){},useSyncExternalStore:function(t,n,s){var a=Te,c=Ot();if(Le){if(s===void 0)throw Error(r(407));s=s()}else{if(s=n(),Ue===null)throw Error(r(349));(Qn&30)!==0||Md(a,n,s)}c.memoizedState=s;var f={value:s,getSnapshot:n};return c.queue=f,bd(Nd.bind(null,a,f,t),[t]),a.flags|=2048,Po(9,Ld.bind(null,a,f,s,n),void 0,null),s},useId:function(){var t=Ot(),n=Ue.identifierPrefix;if(Le){var s=Kt,a=Qt;s=(a&~(1<<32-jt(a)-1)).toString(32)+s,n=":"+n+"R"+s,s=ko++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=Im++,n=":"+n+"r"+s.toString(32)+":";return t.memoizedState=n},unstable_isNewReconciler:!1},Dm={readContext:Rt,useCallback:Vd,useContext:Rt,useEffect:na,useImperativeHandle:Od,useInsertionEffect:Dd,useLayoutEffect:zd,useMemo:Bd,useReducer:ea,useRef:$d,useState:function(){return ea(_o)},useDebugValue:ra,useDeferredValue:function(t){var n=kt();return Ud(n,Oe.memoizedState,t)},useTransition:function(){var t=ea(_o)[0],n=kt().memoizedState;return[t,n]},useMutableSource:Ed,useSyncExternalStore:jd,useId:Hd,unstable_isNewReconciler:!1},zm={readContext:Rt,useCallback:Vd,useContext:Rt,useEffect:na,useImperativeHandle:Od,useInsertionEffect:Dd,useLayoutEffect:zd,useMemo:Bd,useReducer:ta,useRef:$d,useState:function(){return ta(_o)},useDebugValue:ra,useDeferredValue:function(t){var n=kt();return Oe===null?n.memoizedState=t:Ud(n,Oe.memoizedState,t)},useTransition:function(){var t=ta(_o)[0],n=kt().memoizedState;return[t,n]},useMutableSource:Ed,useSyncExternalStore:jd,useId:Hd,unstable_isNewReconciler:!1};function Nt(t,n){if(t&&t.defaultProps){n=ee({},n),t=t.defaultProps;for(var s in t)n[s]===void 0&&(n[s]=t[s]);return n}return n}function oa(t,n,s,a){n=t.memoizedState,s=s(a,n),s=s==null?n:ee({},n,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Gs={isMounted:function(t){return(t=t._reactInternals)?Vn(t)===t:!1},enqueueSetState:function(t,n,s){t=t._reactInternals;var a=nt(),c=Cn(t),f=Yt(a,c);f.payload=n,s!=null&&(f.callback=s),n=yn(t,f,c),n!==null&&(Tt(n,t,c,a),zs(n,t,c))},enqueueReplaceState:function(t,n,s){t=t._reactInternals;var a=nt(),c=Cn(t),f=Yt(a,c);f.tag=1,f.payload=n,s!=null&&(f.callback=s),n=yn(t,f,c),n!==null&&(Tt(n,t,c,a),zs(n,t,c))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var s=nt(),a=Cn(t),c=Yt(s,a);c.tag=2,n!=null&&(c.callback=n),n=yn(t,c,a),n!==null&&(Tt(n,t,a,s),zs(n,t,a))}};function Qd(t,n,s,a,c,f,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,f,S):n.prototype&&n.prototype.isPureReactComponent?!fo(s,a)||!fo(c,f):!0}function Kd(t,n,s){var a=!1,c=gn,f=n.contextType;return typeof f=="object"&&f!==null?f=Rt(f):(c=st(n)?Un:Qe.current,a=n.contextTypes,f=(a=a!=null)?kr(t,c):gn),n=new n(s,f),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Gs,t.stateNode=n,n._reactInternals=t,a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=c,t.__reactInternalMemoizedMaskedChildContext=f),n}function Xd(t,n,s,a){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,a),n.state!==t&&Gs.enqueueReplaceState(n,n.state,null)}function sa(t,n,s,a){var c=t.stateNode;c.props=s,c.state=t.memoizedState,c.refs={},ql(t);var f=n.contextType;typeof f=="object"&&f!==null?c.context=Rt(f):(f=st(n)?Un:Qe.current,c.context=kr(t,f)),c.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(oa(t,n,f,s),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&Gs.enqueueReplaceState(c,c.state,null),As(t,s,c,a),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308)}function Ir(t,n){try{var s="",a=n;do s+=re(a),a=a.return;while(a);var c=s}catch(f){c=`
40
- Error generating stack: `+f.message+`
41
- `+f.stack}return{value:t,source:n,stack:c,digest:null}}function ia(t,n,s){return{value:t,source:null,stack:s??null,digest:n??null}}function la(t,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var Am=typeof WeakMap=="function"?WeakMap:Map;function Yd(t,n,s){s=Yt(-1,s),s.tag=3,s.payload={element:null};var a=n.value;return s.callback=function(){Zs||(Zs=!0,Ca=a),la(t,n)},s}function Jd(t,n,s){s=Yt(-1,s),s.tag=3;var a=t.type.getDerivedStateFromError;if(typeof a=="function"){var c=n.value;s.payload=function(){return a(c)},s.callback=function(){la(t,n)}}var f=t.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){la(t,n),typeof a!="function"&&(wn===null?wn=new Set([this]):wn.add(this));var S=n.stack;this.componentDidCatch(n.value,{componentStack:S!==null?S:""})}),s}function Zd(t,n,s){var a=t.pingCache;if(a===null){a=t.pingCache=new Am;var c=new Set;a.set(n,c)}else c=a.get(n),c===void 0&&(c=new Set,a.set(n,c));c.has(s)||(c.add(s),t=Zm.bind(null,t,n,s),n.then(t,t))}function ef(t){do{var n;if((n=t.tag===13)&&(n=t.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return t;t=t.return}while(t!==null);return null}function tf(t,n,s,a,c){return(t.mode&1)===0?(t===n?t.flags|=65536:(t.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=Yt(-1,1),n.tag=2,yn(s,n,1))),s.lanes|=1),t):(t.flags|=65536,t.lanes=c,t)}var Om=I.ReactCurrentOwner,it=!1;function tt(t,n,s,a){n.child=t===null?Sd(n,null,s,a):jr(n,t.child,s,a)}function nf(t,n,s,a,c){s=s.render;var f=n.ref;return Lr(n,c),a=Jl(t,n,s,a,f,c),s=Zl(),t!==null&&!it?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~c,Jt(t,n,c)):(Le&&s&&$l(n),n.flags|=1,tt(t,n,a,c),n.child)}function rf(t,n,s,a,c){if(t===null){var f=s.type;return typeof f=="function"&&!Ma(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=f,of(t,n,f,a,c)):(t=si(s.type,null,a,n,n.mode,c),t.ref=n.ref,t.return=n,n.child=t)}if(f=t.child,(t.lanes&c)===0){var S=f.memoizedProps;if(s=s.compare,s=s!==null?s:fo,s(S,a)&&t.ref===n.ref)return Jt(t,n,c)}return n.flags|=1,t=kn(f,a),t.ref=n.ref,t.return=n,n.child=t}function of(t,n,s,a,c){if(t!==null){var f=t.memoizedProps;if(fo(f,a)&&t.ref===n.ref)if(it=!1,n.pendingProps=a=f,(t.lanes&c)!==0)(t.flags&131072)!==0&&(it=!0);else return n.lanes=t.lanes,Jt(t,n,c)}return aa(t,n,s,a,c)}function sf(t,n,s){var a=n.pendingProps,c=a.children,f=t!==null?t.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ee(Tr,mt),mt|=s;else{if((s&1073741824)===0)return t=f!==null?f.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:t,cachePool:null,transitions:null},n.updateQueue=null,Ee(Tr,mt),mt|=t,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=f!==null?f.baseLanes:s,Ee(Tr,mt),mt|=a}else f!==null?(a=f.baseLanes|s,n.memoizedState=null):a=s,Ee(Tr,mt),mt|=a;return tt(t,n,c,s),n.child}function lf(t,n){var s=n.ref;(t===null&&s!==null||t!==null&&t.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function aa(t,n,s,a,c){var f=st(s)?Un:Qe.current;return f=kr(n,f),Lr(n,c),s=Jl(t,n,s,a,f,c),a=Zl(),t!==null&&!it?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~c,Jt(t,n,c)):(Le&&a&&$l(n),n.flags|=1,tt(t,n,s,c),n.child)}function af(t,n,s,a,c){if(st(s)){var f=!0;Ls(n)}else f=!1;if(Lr(n,c),n.stateNode===null)Qs(t,n),Kd(n,s,a),sa(n,s,a,c),a=!0;else if(t===null){var S=n.stateNode,P=n.memoizedProps;S.props=P;var E=S.context,D=s.contextType;typeof D=="object"&&D!==null?D=Rt(D):(D=st(s)?Un:Qe.current,D=kr(n,D));var G=s.getDerivedStateFromProps,Q=typeof G=="function"||typeof S.getSnapshotBeforeUpdate=="function";Q||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P!==a||E!==D)&&Xd(n,S,a,D),vn=!1;var q=n.memoizedState;S.state=q,As(n,a,S,c),E=n.memoizedState,P!==a||q!==E||ot.current||vn?(typeof G=="function"&&(oa(n,s,G,a),E=n.memoizedState),(P=vn||Qd(n,s,P,a,q,E,D))?(Q||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(n.flags|=4194308)):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=E),S.props=a,S.state=E,S.context=D,a=P):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{S=n.stateNode,Rd(t,n),P=n.memoizedProps,D=n.type===n.elementType?P:Nt(n.type,P),S.props=D,Q=n.pendingProps,q=S.context,E=s.contextType,typeof E=="object"&&E!==null?E=Rt(E):(E=st(s)?Un:Qe.current,E=kr(n,E));var te=s.getDerivedStateFromProps;(G=typeof te=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P!==Q||q!==E)&&Xd(n,S,a,E),vn=!1,q=n.memoizedState,S.state=q,As(n,a,S,c);var oe=n.memoizedState;P!==Q||q!==oe||ot.current||vn?(typeof te=="function"&&(oa(n,s,te,a),oe=n.memoizedState),(D=vn||Qd(n,s,D,a,q,oe,E)||!1)?(G||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(a,oe,E),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(a,oe,E)),typeof S.componentDidUpdate=="function"&&(n.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof S.componentDidUpdate!="function"||P===t.memoizedProps&&q===t.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===t.memoizedProps&&q===t.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=oe),S.props=a,S.state=oe,S.context=E,a=D):(typeof S.componentDidUpdate!="function"||P===t.memoizedProps&&q===t.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===t.memoizedProps&&q===t.memoizedState||(n.flags|=1024),a=!1)}return ua(t,n,s,a,f,c)}function ua(t,n,s,a,c,f){lf(t,n);var S=(n.flags&128)!==0;if(!a&&!S)return c&&fd(n,s,!1),Jt(t,n,f);a=n.stateNode,Om.current=n;var P=S&&typeof s.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,t!==null&&S?(n.child=jr(n,t.child,null,f),n.child=jr(n,null,P,f)):tt(t,n,P,f),n.memoizedState=a.state,c&&fd(n,s,!0),n.child}function uf(t){var n=t.stateNode;n.pendingContext?cd(t,n.pendingContext,n.pendingContext!==n.context):n.context&&cd(t,n.context,!1),Gl(t,n.containerInfo)}function cf(t,n,s,a,c){return Er(),Al(c),n.flags|=256,tt(t,n,s,a),n.child}var ca={dehydrated:null,treeContext:null,retryLane:0};function da(t){return{baseLanes:t,cachePool:null,transitions:null}}function df(t,n,s){var a=n.pendingProps,c=Fe.current,f=!1,S=(n.flags&128)!==0,P;if((P=S)||(P=t!==null&&t.memoizedState===null?!1:(c&2)!==0),P?(f=!0,n.flags&=-129):(t===null||t.memoizedState!==null)&&(c|=1),Ee(Fe,c&1),t===null)return zl(n),t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((n.mode&1)===0?n.lanes=1:t.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(S=a.children,t=a.fallback,f?(a=n.mode,f=n.child,S={mode:"hidden",children:S},(a&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=S):f=ii(S,a,0,null),t=Zn(t,a,s,null),f.return=n,t.return=n,f.sibling=t,n.child=f,n.child.memoizedState=da(s),n.memoizedState=ca,t):fa(n,S));if(c=t.memoizedState,c!==null&&(P=c.dehydrated,P!==null))return Vm(t,n,S,a,P,c,s);if(f){f=a.fallback,S=n.mode,c=t.child,P=c.sibling;var E={mode:"hidden",children:a.children};return(S&1)===0&&n.child!==c?(a=n.child,a.childLanes=0,a.pendingProps=E,n.deletions=null):(a=kn(c,E),a.subtreeFlags=c.subtreeFlags&14680064),P!==null?f=kn(P,f):(f=Zn(f,S,s,null),f.flags|=2),f.return=n,a.return=n,a.sibling=f,n.child=a,a=f,f=n.child,S=t.child.memoizedState,S=S===null?da(s):{baseLanes:S.baseLanes|s,cachePool:null,transitions:S.transitions},f.memoizedState=S,f.childLanes=t.childLanes&~s,n.memoizedState=ca,a}return f=t.child,t=f.sibling,a=kn(f,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=s),a.return=n,a.sibling=null,t!==null&&(s=n.deletions,s===null?(n.deletions=[t],n.flags|=16):s.push(t)),n.child=a,n.memoizedState=null,a}function fa(t,n){return n=ii({mode:"visible",children:n},t.mode,0,null),n.return=t,t.child=n}function Ws(t,n,s,a){return a!==null&&Al(a),jr(n,t.child,null,s),t=fa(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Vm(t,n,s,a,c,f,S){if(s)return n.flags&256?(n.flags&=-257,a=ia(Error(r(422))),Ws(t,n,S,a)):n.memoizedState!==null?(n.child=t.child,n.flags|=128,null):(f=a.fallback,c=n.mode,a=ii({mode:"visible",children:a.children},c,0,null),f=Zn(f,c,S,null),f.flags|=2,a.return=n,f.return=n,a.sibling=f,n.child=a,(n.mode&1)!==0&&jr(n,t.child,null,S),n.child.memoizedState=da(S),n.memoizedState=ca,f);if((n.mode&1)===0)return Ws(t,n,S,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var P=a.dgst;return a=P,f=Error(r(419)),a=ia(f,a,void 0),Ws(t,n,S,a)}if(P=(S&t.childLanes)!==0,it||P){if(a=Ue,a!==null){switch(S&-S){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(a.suspendedLanes|S))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,Xt(t,c),Tt(a,t,c,-1))}return ja(),a=ia(Error(r(421))),Ws(t,n,S,a)}return c.data==="$?"?(n.flags|=128,n.child=t.child,n=ev.bind(null,t),c._reactRetry=n,null):(t=f.treeContext,gt=hn(c.nextSibling),pt=n,Le=!0,Lt=null,t!==null&&(St[Ct++]=Qt,St[Ct++]=Kt,St[Ct++]=Hn,Qt=t.id,Kt=t.overflow,Hn=n),n=fa(n,a.children),n.flags|=4096,n)}function ff(t,n,s){t.lanes|=n;var a=t.alternate;a!==null&&(a.lanes|=n),Ul(t.return,n,s)}function ha(t,n,s,a,c){var f=t.memoizedState;f===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:c}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=s,f.tailMode=c)}function hf(t,n,s){var a=n.pendingProps,c=a.revealOrder,f=a.tail;if(tt(t,n,a.children,s),a=Fe.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ff(t,s,n);else if(t.tag===19)ff(t,s,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}a&=1}if(Ee(Fe,a),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(s=n.child,c=null;s!==null;)t=s.alternate,t!==null&&Os(t)===null&&(c=s),s=s.sibling;s=c,s===null?(c=n.child,n.child=null):(c=s.sibling,s.sibling=null),ha(n,!1,c,s,f);break;case"backwards":for(s=null,c=n.child,n.child=null;c!==null;){if(t=c.alternate,t!==null&&Os(t)===null){n.child=c;break}t=c.sibling,c.sibling=s,s=c,c=t}ha(n,!0,s,null,f);break;case"together":ha(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Qs(t,n){(n.mode&1)===0&&t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2)}function Jt(t,n,s){if(t!==null&&(n.dependencies=t.dependencies),Kn|=n.lanes,(s&n.childLanes)===0)return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,s=kn(t,t.pendingProps),n.child=s,s.return=n;t.sibling!==null;)t=t.sibling,s=s.sibling=kn(t,t.pendingProps),s.return=n;s.sibling=null}return n.child}function Bm(t,n,s){switch(n.tag){case 3:uf(n),Er();break;case 5:Pd(n);break;case 1:st(n.type)&&Ls(n);break;case 4:Gl(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,c=n.memoizedProps.value;Ee(bs,a._currentValue),a._currentValue=c;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Ee(Fe,Fe.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?df(t,n,s):(Ee(Fe,Fe.current&1),t=Jt(t,n,s),t!==null?t.sibling:null);Ee(Fe,Fe.current&1);break;case 19:if(a=(s&n.childLanes)!==0,(t.flags&128)!==0){if(a)return hf(t,n,s);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ee(Fe,Fe.current),a)break;return null;case 22:case 23:return n.lanes=0,sf(t,n,s)}return Jt(t,n,s)}var pf,pa,gf,mf;pf=function(t,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)t.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},pa=function(){},gf=function(t,n,s,a){var c=t.memoizedProps;if(c!==a){t=n.stateNode,Wn(At.current);var f=null;switch(s){case"input":c=ur(t,c),a=ur(t,a),f=[];break;case"select":c=ee({},c,{value:void 0}),a=ee({},a,{value:void 0}),f=[];break;case"textarea":c=dr(t,c),a=dr(t,a),f=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(t.onclick=Es)}Qi(s,a);var S;s=null;for(D in c)if(!a.hasOwnProperty(D)&&c.hasOwnProperty(D)&&c[D]!=null)if(D==="style"){var P=c[D];for(S in P)P.hasOwnProperty(S)&&(s||(s={}),s[S]="")}else D!=="dangerouslySetInnerHTML"&&D!=="children"&&D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&D!=="autoFocus"&&(l.hasOwnProperty(D)?f||(f=[]):(f=f||[]).push(D,null));for(D in a){var E=a[D];if(P=c!=null?c[D]:void 0,a.hasOwnProperty(D)&&E!==P&&(E!=null||P!=null))if(D==="style")if(P){for(S in P)!P.hasOwnProperty(S)||E&&E.hasOwnProperty(S)||(s||(s={}),s[S]="");for(S in E)E.hasOwnProperty(S)&&P[S]!==E[S]&&(s||(s={}),s[S]=E[S])}else s||(f||(f=[]),f.push(D,s)),s=E;else D==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,P=P?P.__html:void 0,E!=null&&P!==E&&(f=f||[]).push(D,E)):D==="children"?typeof E!="string"&&typeof E!="number"||(f=f||[]).push(D,""+E):D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&(l.hasOwnProperty(D)?(E!=null&&D==="onScroll"&&je("scroll",t),f||P===E||(f=[])):(f=f||[]).push(D,E))}s&&(f=f||[]).push("style",s);var D=f;(n.updateQueue=D)&&(n.flags|=4)}},mf=function(t,n,s,a){s!==a&&(n.flags|=4)};function Eo(t,n){if(!Le)switch(t.tailMode){case"hidden":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function Xe(t){var n=t.alternate!==null&&t.alternate.child===t.child,s=0,a=0;if(n)for(var c=t.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags&14680064,a|=c.flags&14680064,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=a,t.childLanes=s,n}function Um(t,n,s){var a=n.pendingProps;switch(bl(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return st(n.type)&&Ms(),Xe(n),null;case 3:return a=n.stateNode,Nr(),Me(ot),Me(Qe),Kl(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ts(n)?n.flags|=4:t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Lt!==null&&(_a(Lt),Lt=null))),pa(t,n),Xe(n),null;case 5:Wl(n);var c=Wn(Co.current);if(s=n.type,t!==null&&n.stateNode!=null)gf(t,n,s,a,c),t.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(r(166));return Xe(n),null}if(t=Wn(At.current),Ts(n)){a=n.stateNode,s=n.type;var f=n.memoizedProps;switch(a[zt]=n,a[vo]=f,t=(n.mode&1)!==0,s){case"dialog":je("cancel",a),je("close",a);break;case"iframe":case"object":case"embed":je("load",a);break;case"video":case"audio":for(c=0;c<po.length;c++)je(po[c],a);break;case"source":je("error",a);break;case"img":case"image":case"link":je("error",a),je("load",a);break;case"details":je("toggle",a);break;case"input":os(a,f),je("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!f.multiple},je("invalid",a);break;case"textarea":ss(a,f),je("invalid",a)}Qi(s,f),c=null;for(var S in f)if(f.hasOwnProperty(S)){var P=f[S];S==="children"?typeof P=="string"?a.textContent!==P&&(f.suppressHydrationWarning!==!0&&Ps(a.textContent,P,t),c=["children",P]):typeof P=="number"&&a.textContent!==""+P&&(f.suppressHydrationWarning!==!0&&Ps(a.textContent,P,t),c=["children",""+P]):l.hasOwnProperty(S)&&P!=null&&S==="onScroll"&&je("scroll",a)}switch(s){case"input":Ht(a),qt(a,f,!0);break;case"textarea":Ht(a),ke(a);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(a.onclick=Es)}a=c,n.updateQueue=a,a!==null&&(n.flags|=4)}else{S=c.nodeType===9?c:c.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=qe(s)),t==="http://www.w3.org/1999/xhtml"?s==="script"?(t=S.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof a.is=="string"?t=S.createElement(s,{is:a.is}):(t=S.createElement(s),s==="select"&&(S=t,a.multiple?S.multiple=!0:a.size&&(S.size=a.size))):t=S.createElementNS(t,s),t[zt]=n,t[vo]=a,pf(t,n,!1,!1),n.stateNode=t;e:{switch(S=Ki(s,a),s){case"dialog":je("cancel",t),je("close",t),c=a;break;case"iframe":case"object":case"embed":je("load",t),c=a;break;case"video":case"audio":for(c=0;c<po.length;c++)je(po[c],t);c=a;break;case"source":je("error",t),c=a;break;case"img":case"image":case"link":je("error",t),je("load",t),c=a;break;case"details":je("toggle",t),c=a;break;case"input":os(t,a),c=ur(t,a),je("invalid",t);break;case"option":c=a;break;case"select":t._wrapperState={wasMultiple:!!a.multiple},c=ee({},a,{value:void 0}),je("invalid",t);break;case"textarea":ss(t,a),c=dr(t,a),je("invalid",t);break;default:c=a}Qi(s,c),P=c;for(f in P)if(P.hasOwnProperty(f)){var E=P[f];f==="style"?oc(t,E):f==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&nc(t,E)):f==="children"?typeof E=="string"?(s!=="textarea"||E!=="")&&Qr(t,E):typeof E=="number"&&Qr(t,""+E):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(l.hasOwnProperty(f)?E!=null&&f==="onScroll"&&je("scroll",t):E!=null&&b(t,f,E,S))}switch(s){case"input":Ht(t),qt(t,a,!1);break;case"textarea":Ht(t),ke(t);break;case"option":a.value!=null&&t.setAttribute("value",""+ve(a.value));break;case"select":t.multiple=!!a.multiple,f=a.value,f!=null?sn(t,!!a.multiple,f,!1):a.defaultValue!=null&&sn(t,!!a.multiple,a.defaultValue,!0);break;default:typeof c.onClick=="function"&&(t.onclick=Es)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Xe(n),null;case 6:if(t&&n.stateNode!=null)mf(t,n,t.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(r(166));if(s=Wn(Co.current),Wn(At.current),Ts(n)){if(a=n.stateNode,s=n.memoizedProps,a[zt]=n,(f=a.nodeValue!==s)&&(t=pt,t!==null))switch(t.tag){case 3:Ps(a.nodeValue,s,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ps(a.nodeValue,s,(t.mode&1)!==0)}f&&(n.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[zt]=n,n.stateNode=a}return Xe(n),null;case 13:if(Me(Fe),a=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Le&&gt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)yd(),Er(),n.flags|=98560,f=!1;else if(f=Ts(n),a!==null&&a.dehydrated!==null){if(t===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[zt]=n}else Er(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),f=!1}else Lt!==null&&(_a(Lt),Lt=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(a=a!==null,a!==(t!==null&&t.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(t===null||(Fe.current&1)!==0?Ve===0&&(Ve=3):ja())),n.updateQueue!==null&&(n.flags|=4),Xe(n),null);case 4:return Nr(),pa(t,n),t===null&&go(n.stateNode.containerInfo),Xe(n),null;case 10:return Bl(n.type._context),Xe(n),null;case 17:return st(n.type)&&Ms(),Xe(n),null;case 19:if(Me(Fe),f=n.memoizedState,f===null)return Xe(n),null;if(a=(n.flags&128)!==0,S=f.rendering,S===null)if(a)Eo(f,!1);else{if(Ve!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(S=Os(t),S!==null){for(n.flags|=128,Eo(f,!1),a=S.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=s,s=n.child;s!==null;)f=s,t=a,f.flags&=14680066,S=f.alternate,S===null?(f.childLanes=0,f.lanes=t,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=S.childLanes,f.lanes=S.lanes,f.child=S.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=S.memoizedProps,f.memoizedState=S.memoizedState,f.updateQueue=S.updateQueue,f.type=S.type,t=S.dependencies,f.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),s=s.sibling;return Ee(Fe,Fe.current&1|2),n.child}t=t.sibling}f.tail!==null&&De()>$r&&(n.flags|=128,a=!0,Eo(f,!1),n.lanes=4194304)}else{if(!a)if(t=Os(S),t!==null){if(n.flags|=128,a=!0,s=t.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),Eo(f,!0),f.tail===null&&f.tailMode==="hidden"&&!S.alternate&&!Le)return Xe(n),null}else 2*De()-f.renderingStartTime>$r&&s!==1073741824&&(n.flags|=128,a=!0,Eo(f,!1),n.lanes=4194304);f.isBackwards?(S.sibling=n.child,n.child=S):(s=f.last,s!==null?s.sibling=S:n.child=S,f.last=S)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=De(),n.sibling=null,s=Fe.current,Ee(Fe,a?s&1|2:s&1),n):(Xe(n),null);case 22:case 23:return Ea(),a=n.memoizedState!==null,t!==null&&t.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(mt&1073741824)!==0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),null;case 24:return null;case 25:return null}throw Error(r(156,n.tag))}function Hm(t,n){switch(bl(n),n.tag){case 1:return st(n.type)&&Ms(),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Nr(),Me(ot),Me(Qe),Kl(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 5:return Wl(n),null;case 13:if(Me(Fe),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Er()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Me(Fe),null;case 4:return Nr(),null;case 10:return Bl(n.type._context),null;case 22:case 23:return Ea(),null;case 24:return null;default:return null}}var Ks=!1,Ye=!1,qm=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Fr(t,n){var s=t.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){$e(t,n,a)}else s.current=null}function ga(t,n,s){try{s()}catch(a){$e(t,n,a)}}var vf=!1;function Gm(t,n){if(El=gs,t=Qc(),xl(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var S=0,P=-1,E=-1,D=0,G=0,Q=t,q=null;t:for(;;){for(var te;Q!==s||c!==0&&Q.nodeType!==3||(P=S+c),Q!==f||a!==0&&Q.nodeType!==3||(E=S+a),Q.nodeType===3&&(S+=Q.nodeValue.length),(te=Q.firstChild)!==null;)q=Q,Q=te;for(;;){if(Q===t)break t;if(q===s&&++D===c&&(P=S),q===f&&++G===a&&(E=S),(te=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=te}s=P===-1||E===-1?null:{start:P,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(jl={focusedElem:t,selectionRange:s},gs=!1,ne=n;ne!==null;)if(n=ne,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,ne=t;else for(;ne!==null;){n=ne;try{var oe=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(oe!==null){var se=oe.memoizedProps,ze=oe.memoizedState,F=n.stateNode,j=F.getSnapshotBeforeUpdate(n.elementType===n.type?se:Nt(n.type,se),ze);F.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var T=n.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(X){$e(n,n.return,X)}if(t=n.sibling,t!==null){t.return=n.return,ne=t;break}ne=n.return}return oe=vf,vf=!1,oe}function jo(t,n,s){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&t)===t){var f=c.destroy;c.destroy=void 0,f!==void 0&&ga(n,s,f)}c=c.next}while(c!==a)}}function Xs(t,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var a=s.create;s.destroy=a()}s=s.next}while(s!==n)}}function ma(t){var n=t.ref;if(n!==null){var s=t.stateNode;switch(t.tag){case 5:t=s;break;default:t=s}typeof n=="function"?n(t):n.current=t}}function yf(t){var n=t.alternate;n!==null&&(t.alternate=null,yf(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&(delete n[zt],delete n[vo],delete n[Il],delete n[jm],delete n[Mm])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xf(t){return t.tag===5||t.tag===3||t.tag===4}function wf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function va(t,n,s){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(t,n):s.insertBefore(t,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(t,s)):(n=s,n.appendChild(t)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Es));else if(a!==4&&(t=t.child,t!==null))for(va(t,n,s),t=t.sibling;t!==null;)va(t,n,s),t=t.sibling}function ya(t,n,s){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?s.insertBefore(t,n):s.appendChild(t);else if(a!==4&&(t=t.child,t!==null))for(ya(t,n,s),t=t.sibling;t!==null;)ya(t,n,s),t=t.sibling}var Ge=null,It=!1;function xn(t,n,s){for(s=s.child;s!==null;)Sf(t,n,s),s=s.sibling}function Sf(t,n,s){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(us,s)}catch{}switch(s.tag){case 5:Ye||Fr(s,n);case 6:var a=Ge,c=It;Ge=null,xn(t,n,s),Ge=a,It=c,Ge!==null&&(It?(t=Ge,s=s.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)):Ge.removeChild(s.stateNode));break;case 18:Ge!==null&&(It?(t=Ge,s=s.stateNode,t.nodeType===8?Nl(t.parentNode,s):t.nodeType===1&&Nl(t,s),so(t)):Nl(Ge,s.stateNode));break;case 4:a=Ge,c=It,Ge=s.stateNode.containerInfo,It=!0,xn(t,n,s),Ge=a,It=c;break;case 0:case 11:case 14:case 15:if(!Ye&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,S=f.destroy;f=f.tag,S!==void 0&&((f&2)!==0||(f&4)!==0)&&ga(s,n,S),c=c.next}while(c!==a)}xn(t,n,s);break;case 1:if(!Ye&&(Fr(s,n),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(P){$e(s,n,P)}xn(t,n,s);break;case 21:xn(t,n,s);break;case 22:s.mode&1?(Ye=(a=Ye)||s.memoizedState!==null,xn(t,n,s),Ye=a):xn(t,n,s);break;default:xn(t,n,s)}}function Cf(t){var n=t.updateQueue;if(n!==null){t.updateQueue=null;var s=t.stateNode;s===null&&(s=t.stateNode=new qm),n.forEach(function(a){var c=tv.bind(null,t,a);s.has(a)||(s.add(a),a.then(c,c))})}}function Ft(t,n){var s=n.deletions;if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];try{var f=t,S=n,P=S;e:for(;P!==null;){switch(P.tag){case 5:Ge=P.stateNode,It=!1;break e;case 3:Ge=P.stateNode.containerInfo,It=!0;break e;case 4:Ge=P.stateNode.containerInfo,It=!0;break e}P=P.return}if(Ge===null)throw Error(r(160));Sf(f,S,c),Ge=null,It=!1;var E=c.alternate;E!==null&&(E.return=null),c.return=null}catch(D){$e(c,n,D)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Rf(n,t),n=n.sibling}function Rf(t,n){var s=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ft(n,t),Vt(t),a&4){try{jo(3,t,t.return),Xs(3,t)}catch(se){$e(t,t.return,se)}try{jo(5,t,t.return)}catch(se){$e(t,t.return,se)}}break;case 1:Ft(n,t),Vt(t),a&512&&s!==null&&Fr(s,s.return);break;case 5:if(Ft(n,t),Vt(t),a&512&&s!==null&&Fr(s,s.return),t.flags&32){var c=t.stateNode;try{Qr(c,"")}catch(se){$e(t,t.return,se)}}if(a&4&&(c=t.stateNode,c!=null)){var f=t.memoizedProps,S=s!==null?s.memoizedProps:f,P=t.type,E=t.updateQueue;if(t.updateQueue=null,E!==null)try{P==="input"&&f.type==="radio"&&f.name!=null&&Gr(c,f),Ki(P,S);var D=Ki(P,f);for(S=0;S<E.length;S+=2){var G=E[S],Q=E[S+1];G==="style"?oc(c,Q):G==="dangerouslySetInnerHTML"?nc(c,Q):G==="children"?Qr(c,Q):b(c,G,Q,D)}switch(P){case"input":cr(c,f);break;case"textarea":Wr(c,f);break;case"select":var q=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var te=f.value;te!=null?sn(c,!!f.multiple,te,!1):q!==!!f.multiple&&(f.defaultValue!=null?sn(c,!!f.multiple,f.defaultValue,!0):sn(c,!!f.multiple,f.multiple?[]:"",!1))}c[vo]=f}catch(se){$e(t,t.return,se)}}break;case 6:if(Ft(n,t),Vt(t),a&4){if(t.stateNode===null)throw Error(r(162));c=t.stateNode,f=t.memoizedProps;try{c.nodeValue=f}catch(se){$e(t,t.return,se)}}break;case 3:if(Ft(n,t),Vt(t),a&4&&s!==null&&s.memoizedState.isDehydrated)try{so(n.containerInfo)}catch(se){$e(t,t.return,se)}break;case 4:Ft(n,t),Vt(t);break;case 13:Ft(n,t),Vt(t),c=t.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Sa=De())),a&4&&Cf(t);break;case 22:if(G=s!==null&&s.memoizedState!==null,t.mode&1?(Ye=(D=Ye)||G,Ft(n,t),Ye=D):Ft(n,t),Vt(t),a&8192){if(D=t.memoizedState!==null,(t.stateNode.isHidden=D)&&!G&&(t.mode&1)!==0)for(ne=t,G=t.child;G!==null;){for(Q=ne=G;ne!==null;){switch(q=ne,te=q.child,q.tag){case 0:case 11:case 14:case 15:jo(4,q,q.return);break;case 1:Fr(q,q.return);var oe=q.stateNode;if(typeof oe.componentWillUnmount=="function"){a=q,s=q.return;try{n=a,oe.props=n.memoizedProps,oe.state=n.memoizedState,oe.componentWillUnmount()}catch(se){$e(a,s,se)}}break;case 5:Fr(q,q.return);break;case 22:if(q.memoizedState!==null){Pf(Q);continue}}te!==null?(te.return=q,ne=te):Pf(Q)}G=G.sibling}e:for(G=null,Q=t;;){if(Q.tag===5){if(G===null){G=Q;try{c=Q.stateNode,D?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(P=Q.stateNode,E=Q.memoizedProps.style,S=E!=null&&E.hasOwnProperty("display")?E.display:null,P.style.display=rc("display",S))}catch(se){$e(t,t.return,se)}}}else if(Q.tag===6){if(G===null)try{Q.stateNode.nodeValue=D?"":Q.memoizedProps}catch(se){$e(t,t.return,se)}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===t)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===t)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===t)break e;G===Q&&(G=null),Q=Q.return}G===Q&&(G=null),Q.sibling.return=Q.return,Q=Q.sibling}}break;case 19:Ft(n,t),Vt(t),a&4&&Cf(t);break;case 21:break;default:Ft(n,t),Vt(t)}}function Vt(t){var n=t.flags;if(n&2){try{e:{for(var s=t.return;s!==null;){if(xf(s)){var a=s;break e}s=s.return}throw Error(r(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(Qr(c,""),a.flags&=-33);var f=wf(t);ya(t,f,c);break;case 3:case 4:var S=a.stateNode.containerInfo,P=wf(t);va(t,P,S);break;default:throw Error(r(161))}}catch(E){$e(t,t.return,E)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Wm(t,n,s){ne=t,kf(t)}function kf(t,n,s){for(var a=(t.mode&1)!==0;ne!==null;){var c=ne,f=c.child;if(c.tag===22&&a){var S=c.memoizedState!==null||Ks;if(!S){var P=c.alternate,E=P!==null&&P.memoizedState!==null||Ye;P=Ks;var D=Ye;if(Ks=S,(Ye=E)&&!D)for(ne=c;ne!==null;)S=ne,E=S.child,S.tag===22&&S.memoizedState!==null?Ef(c):E!==null?(E.return=S,ne=E):Ef(c);for(;f!==null;)ne=f,kf(f),f=f.sibling;ne=c,Ks=P,Ye=D}_f(t)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,ne=f):_f(t)}}function _f(t){for(;ne!==null;){var n=ne;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ye||Xs(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!Ye)if(s===null)a.componentDidMount();else{var c=n.elementType===n.type?s.memoizedProps:Nt(n.type,s.memoizedProps);a.componentDidUpdate(c,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&_d(n,f,a);break;case 3:var S=n.updateQueue;if(S!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}_d(n,S,s)}break;case 5:var P=n.stateNode;if(s===null&&n.flags&4){s=P;var E=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&s.focus();break;case"img":E.src&&(s.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var D=n.alternate;if(D!==null){var G=D.memoizedState;if(G!==null){var Q=G.dehydrated;Q!==null&&so(Q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ye||n.flags&512&&ma(n)}catch(q){$e(n,n.return,q)}}if(n===t){ne=null;break}if(s=n.sibling,s!==null){s.return=n.return,ne=s;break}ne=n.return}}function Pf(t){for(;ne!==null;){var n=ne;if(n===t){ne=null;break}var s=n.sibling;if(s!==null){s.return=n.return,ne=s;break}ne=n.return}}function Ef(t){for(;ne!==null;){var n=ne;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{Xs(4,n)}catch(E){$e(n,s,E)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var c=n.return;try{a.componentDidMount()}catch(E){$e(n,c,E)}}var f=n.return;try{ma(n)}catch(E){$e(n,f,E)}break;case 5:var S=n.return;try{ma(n)}catch(E){$e(n,S,E)}}}catch(E){$e(n,n.return,E)}if(n===t){ne=null;break}var P=n.sibling;if(P!==null){P.return=n.return,ne=P;break}ne=n.return}}var Qm=Math.ceil,Ys=I.ReactCurrentDispatcher,xa=I.ReactCurrentOwner,_t=I.ReactCurrentBatchConfig,Se=0,Ue=null,Ae=null,We=0,mt=0,Tr=pn(0),Ve=0,Mo=null,Kn=0,Js=0,wa=0,Lo=null,lt=null,Sa=0,$r=1/0,Zt=null,Zs=!1,Ca=null,wn=null,ei=!1,Sn=null,ti=0,No=0,Ra=null,ni=-1,ri=0;function nt(){return(Se&6)!==0?De():ni!==-1?ni:ni=De()}function Cn(t){return(t.mode&1)===0?1:(Se&2)!==0&&We!==0?We&-We:Nm.transition!==null?(ri===0&&(ri=xc()),ri):(t=_e,t!==0||(t=window.event,t=t===void 0?16:jc(t.type)),t)}function Tt(t,n,s,a){if(50<No)throw No=0,Ra=null,Error(r(185));eo(t,s,a),((Se&2)===0||t!==Ue)&&(t===Ue&&((Se&2)===0&&(Js|=s),Ve===4&&Rn(t,We)),at(t,a),s===1&&Se===0&&(n.mode&1)===0&&($r=De()+500,Ns&&mn()))}function at(t,n){var s=t.callbackNode;Ng(t,n);var a=fs(t,t===Ue?We:0);if(a===0)s!==null&&mc(s),t.callbackNode=null,t.callbackPriority=0;else if(n=a&-a,t.callbackPriority!==n){if(s!=null&&mc(s),n===1)t.tag===0?Lm(Mf.bind(null,t)):hd(Mf.bind(null,t)),Pm(function(){(Se&6)===0&&mn()}),s=null;else{switch(wc(a)){case 1:s=nl;break;case 4:s=vc;break;case 16:s=as;break;case 536870912:s=yc;break;default:s=as}s=Df(s,jf.bind(null,t))}t.callbackPriority=n,t.callbackNode=s}}function jf(t,n){if(ni=-1,ri=0,(Se&6)!==0)throw Error(r(327));var s=t.callbackNode;if(br()&&t.callbackNode!==s)return null;var a=fs(t,t===Ue?We:0);if(a===0)return null;if((a&30)!==0||(a&t.expiredLanes)!==0||n)n=oi(t,a);else{n=a;var c=Se;Se|=2;var f=Nf();(Ue!==t||We!==n)&&(Zt=null,$r=De()+500,Yn(t,n));do try{Ym();break}catch(P){Lf(t,P)}while(!0);Vl(),Ys.current=f,Se=c,Ae!==null?n=0:(Ue=null,We=0,n=Ve)}if(n!==0){if(n===2&&(c=rl(t),c!==0&&(a=c,n=ka(t,c))),n===1)throw s=Mo,Yn(t,0),Rn(t,a),at(t,De()),s;if(n===6)Rn(t,a);else{if(c=t.current.alternate,(a&30)===0&&!Km(c)&&(n=oi(t,a),n===2&&(f=rl(t),f!==0&&(a=f,n=ka(t,f))),n===1))throw s=Mo,Yn(t,0),Rn(t,a),at(t,De()),s;switch(t.finishedWork=c,t.finishedLanes=a,n){case 0:case 1:throw Error(r(345));case 2:Jn(t,lt,Zt);break;case 3:if(Rn(t,a),(a&130023424)===a&&(n=Sa+500-De(),10<n)){if(fs(t,0)!==0)break;if(c=t.suspendedLanes,(c&a)!==a){nt(),t.pingedLanes|=t.suspendedLanes&c;break}t.timeoutHandle=Ll(Jn.bind(null,t,lt,Zt),n);break}Jn(t,lt,Zt);break;case 4:if(Rn(t,a),(a&4194240)===a)break;for(n=t.eventTimes,c=-1;0<a;){var S=31-jt(a);f=1<<S,S=n[S],S>c&&(c=S),a&=~f}if(a=c,a=De()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Qm(a/1960))-a,10<a){t.timeoutHandle=Ll(Jn.bind(null,t,lt,Zt),a);break}Jn(t,lt,Zt);break;case 5:Jn(t,lt,Zt);break;default:throw Error(r(329))}}}return at(t,De()),t.callbackNode===s?jf.bind(null,t):null}function ka(t,n){var s=Lo;return t.current.memoizedState.isDehydrated&&(Yn(t,n).flags|=256),t=oi(t,n),t!==2&&(n=lt,lt=s,n!==null&&_a(n)),t}function _a(t){lt===null?lt=t:lt.push.apply(lt,t)}function Km(t){for(var n=t;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var c=s[a],f=c.getSnapshot;c=c.value;try{if(!Mt(f(),c))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Rn(t,n){for(n&=~wa,n&=~Js,t.suspendedLanes|=n,t.pingedLanes&=~n,t=t.expirationTimes;0<n;){var s=31-jt(n),a=1<<s;t[s]=-1,n&=~a}}function Mf(t){if((Se&6)!==0)throw Error(r(327));br();var n=fs(t,0);if((n&1)===0)return at(t,De()),null;var s=oi(t,n);if(t.tag!==0&&s===2){var a=rl(t);a!==0&&(n=a,s=ka(t,a))}if(s===1)throw s=Mo,Yn(t,0),Rn(t,n),at(t,De()),s;if(s===6)throw Error(r(345));return t.finishedWork=t.current.alternate,t.finishedLanes=n,Jn(t,lt,Zt),at(t,De()),null}function Pa(t,n){var s=Se;Se|=1;try{return t(n)}finally{Se=s,Se===0&&($r=De()+500,Ns&&mn())}}function Xn(t){Sn!==null&&Sn.tag===0&&(Se&6)===0&&br();var n=Se;Se|=1;var s=_t.transition,a=_e;try{if(_t.transition=null,_e=1,t)return t()}finally{_e=a,_t.transition=s,Se=n,(Se&6)===0&&mn()}}function Ea(){mt=Tr.current,Me(Tr)}function Yn(t,n){t.finishedWork=null,t.finishedLanes=0;var s=t.timeoutHandle;if(s!==-1&&(t.timeoutHandle=-1,_m(s)),Ae!==null)for(s=Ae.return;s!==null;){var a=s;switch(bl(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Ms();break;case 3:Nr(),Me(ot),Me(Qe),Kl();break;case 5:Wl(a);break;case 4:Nr();break;case 13:Me(Fe);break;case 19:Me(Fe);break;case 10:Bl(a.type._context);break;case 22:case 23:Ea()}s=s.return}if(Ue=t,Ae=t=kn(t.current,null),We=mt=n,Ve=0,Mo=null,wa=Js=Kn=0,lt=Lo=null,Gn!==null){for(n=0;n<Gn.length;n++)if(s=Gn[n],a=s.interleaved,a!==null){s.interleaved=null;var c=a.next,f=s.pending;if(f!==null){var S=f.next;f.next=c,a.next=S}s.pending=a}Gn=null}return t}function Lf(t,n){do{var s=Ae;try{if(Vl(),Vs.current=qs,Bs){for(var a=Te.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}Bs=!1}if(Qn=0,Be=Oe=Te=null,Ro=!1,ko=0,xa.current=null,s===null||s.return===null){Ve=1,Mo=n,Ae=null;break}e:{var f=t,S=s.return,P=s,E=n;if(n=We,P.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var D=E,G=P,Q=G.tag;if((G.mode&1)===0&&(Q===0||Q===11||Q===15)){var q=G.alternate;q?(G.updateQueue=q.updateQueue,G.memoizedState=q.memoizedState,G.lanes=q.lanes):(G.updateQueue=null,G.memoizedState=null)}var te=ef(S);if(te!==null){te.flags&=-257,tf(te,S,P,f,n),te.mode&1&&Zd(f,D,n),n=te,E=D;var oe=n.updateQueue;if(oe===null){var se=new Set;se.add(E),n.updateQueue=se}else oe.add(E);break e}else{if((n&1)===0){Zd(f,D,n),ja();break e}E=Error(r(426))}}else if(Le&&P.mode&1){var ze=ef(S);if(ze!==null){(ze.flags&65536)===0&&(ze.flags|=256),tf(ze,S,P,f,n),Al(Ir(E,P));break e}}f=E=Ir(E,P),Ve!==4&&(Ve=2),Lo===null?Lo=[f]:Lo.push(f),f=S;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var F=Yd(f,E,n);kd(f,F);break e;case 1:P=E;var j=f.type,T=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(wn===null||!wn.has(T)))){f.flags|=65536,n&=-n,f.lanes|=n;var X=Jd(f,P,n);kd(f,X);break e}}f=f.return}while(f!==null)}Ff(s)}catch(ie){n=ie,Ae===s&&s!==null&&(Ae=s=s.return);continue}break}while(!0)}function Nf(){var t=Ys.current;return Ys.current=qs,t===null?qs:t}function ja(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ue===null||(Kn&268435455)===0&&(Js&268435455)===0||Rn(Ue,We)}function oi(t,n){var s=Se;Se|=2;var a=Nf();(Ue!==t||We!==n)&&(Zt=null,Yn(t,n));do try{Xm();break}catch(c){Lf(t,c)}while(!0);if(Vl(),Se=s,Ys.current=a,Ae!==null)throw Error(r(261));return Ue=null,We=0,Ve}function Xm(){for(;Ae!==null;)If(Ae)}function Ym(){for(;Ae!==null&&!Cg();)If(Ae)}function If(t){var n=bf(t.alternate,t,mt);t.memoizedProps=t.pendingProps,n===null?Ff(t):Ae=n,xa.current=null}function Ff(t){var n=t;do{var s=n.alternate;if(t=n.return,(n.flags&32768)===0){if(s=Um(s,n,mt),s!==null){Ae=s;return}}else{if(s=Hm(s,n),s!==null){s.flags&=32767,Ae=s;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ve=6,Ae=null;return}}if(n=n.sibling,n!==null){Ae=n;return}Ae=n=t}while(n!==null);Ve===0&&(Ve=5)}function Jn(t,n,s){var a=_e,c=_t.transition;try{_t.transition=null,_e=1,Jm(t,n,s,a)}finally{_t.transition=c,_e=a}return null}function Jm(t,n,s,a){do br();while(Sn!==null);if((Se&6)!==0)throw Error(r(327));s=t.finishedWork;var c=t.finishedLanes;if(s===null)return null;if(t.finishedWork=null,t.finishedLanes=0,s===t.current)throw Error(r(177));t.callbackNode=null,t.callbackPriority=0;var f=s.lanes|s.childLanes;if(Ig(t,f),t===Ue&&(Ae=Ue=null,We=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ei||(ei=!0,Df(as,function(){return br(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=_t.transition,_t.transition=null;var S=_e;_e=1;var P=Se;Se|=4,xa.current=null,Gm(t,s),Rf(s,t),ym(jl),gs=!!El,jl=El=null,t.current=s,Wm(s),Rg(),Se=P,_e=S,_t.transition=f}else t.current=s;if(ei&&(ei=!1,Sn=t,ti=c),f=t.pendingLanes,f===0&&(wn=null),Pg(s.stateNode),at(t,De()),n!==null)for(a=t.onRecoverableError,s=0;s<n.length;s++)c=n[s],a(c.value,{componentStack:c.stack,digest:c.digest});if(Zs)throw Zs=!1,t=Ca,Ca=null,t;return(ti&1)!==0&&t.tag!==0&&br(),f=t.pendingLanes,(f&1)!==0?t===Ra?No++:(No=0,Ra=t):No=0,mn(),null}function br(){if(Sn!==null){var t=wc(ti),n=_t.transition,s=_e;try{if(_t.transition=null,_e=16>t?16:t,Sn===null)var a=!1;else{if(t=Sn,Sn=null,ti=0,(Se&6)!==0)throw Error(r(331));var c=Se;for(Se|=4,ne=t.current;ne!==null;){var f=ne,S=f.child;if((ne.flags&16)!==0){var P=f.deletions;if(P!==null){for(var E=0;E<P.length;E++){var D=P[E];for(ne=D;ne!==null;){var G=ne;switch(G.tag){case 0:case 11:case 15:jo(8,G,f)}var Q=G.child;if(Q!==null)Q.return=G,ne=Q;else for(;ne!==null;){G=ne;var q=G.sibling,te=G.return;if(yf(G),G===D){ne=null;break}if(q!==null){q.return=te,ne=q;break}ne=te}}}var oe=f.alternate;if(oe!==null){var se=oe.child;if(se!==null){oe.child=null;do{var ze=se.sibling;se.sibling=null,se=ze}while(se!==null)}}ne=f}}if((f.subtreeFlags&2064)!==0&&S!==null)S.return=f,ne=S;else e:for(;ne!==null;){if(f=ne,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:jo(9,f,f.return)}var F=f.sibling;if(F!==null){F.return=f.return,ne=F;break e}ne=f.return}}var j=t.current;for(ne=j;ne!==null;){S=ne;var T=S.child;if((S.subtreeFlags&2064)!==0&&T!==null)T.return=S,ne=T;else e:for(S=j;ne!==null;){if(P=ne,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Xs(9,P)}}catch(ie){$e(P,P.return,ie)}if(P===S){ne=null;break e}var X=P.sibling;if(X!==null){X.return=P.return,ne=X;break e}ne=P.return}}if(Se=c,mn(),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(us,t)}catch{}a=!0}return a}finally{_e=s,_t.transition=n}}return!1}function Tf(t,n,s){n=Ir(s,n),n=Yd(t,n,1),t=yn(t,n,1),n=nt(),t!==null&&(eo(t,1,n),at(t,n))}function $e(t,n,s){if(t.tag===3)Tf(t,t,s);else for(;n!==null;){if(n.tag===3){Tf(n,t,s);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(wn===null||!wn.has(a))){t=Ir(s,t),t=Jd(n,t,1),n=yn(n,t,1),t=nt(),n!==null&&(eo(n,1,t),at(n,t));break}}n=n.return}}function Zm(t,n,s){var a=t.pingCache;a!==null&&a.delete(n),n=nt(),t.pingedLanes|=t.suspendedLanes&s,Ue===t&&(We&s)===s&&(Ve===4||Ve===3&&(We&130023424)===We&&500>De()-Sa?Yn(t,0):wa|=s),at(t,n)}function $f(t,n){n===0&&((t.mode&1)===0?n=1:(n=ds,ds<<=1,(ds&130023424)===0&&(ds=4194304)));var s=nt();t=Xt(t,n),t!==null&&(eo(t,n,s),at(t,s))}function ev(t){var n=t.memoizedState,s=0;n!==null&&(s=n.retryLane),$f(t,s)}function tv(t,n){var s=0;switch(t.tag){case 13:var a=t.stateNode,c=t.memoizedState;c!==null&&(s=c.retryLane);break;case 19:a=t.stateNode;break;default:throw Error(r(314))}a!==null&&a.delete(n),$f(t,s)}var bf;bf=function(t,n,s){if(t!==null)if(t.memoizedProps!==n.pendingProps||ot.current)it=!0;else{if((t.lanes&s)===0&&(n.flags&128)===0)return it=!1,Bm(t,n,s);it=(t.flags&131072)!==0}else it=!1,Le&&(n.flags&1048576)!==0&&pd(n,Fs,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Qs(t,n),t=n.pendingProps;var c=kr(n,Qe.current);Lr(n,s),c=Jl(null,n,a,t,c,s);var f=Zl();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,st(a)?(f=!0,Ls(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ql(n),c.updater=Gs,n.stateNode=c,c._reactInternals=n,sa(n,a,t,s),n=ua(null,n,a,!0,f,s)):(n.tag=0,Le&&f&&$l(n),tt(null,n,c,s),n=n.child),n;case 16:a=n.elementType;e:{switch(Qs(t,n),t=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=rv(a),t=Nt(a,t),c){case 0:n=aa(null,n,a,t,s);break e;case 1:n=af(null,n,a,t,s);break e;case 11:n=nf(null,n,a,t,s);break e;case 14:n=rf(null,n,a,Nt(a.type,t),s);break e}throw Error(r(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:Nt(a,c),aa(t,n,a,c,s);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:Nt(a,c),af(t,n,a,c,s);case 3:e:{if(uf(n),t===null)throw Error(r(387));a=n.pendingProps,f=n.memoizedState,c=f.element,Rd(t,n),As(n,a,null,s);var S=n.memoizedState;if(a=S.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Ir(Error(r(423)),n),n=cf(t,n,a,s,c);break e}else if(a!==c){c=Ir(Error(r(424)),n),n=cf(t,n,a,s,c);break e}else for(gt=hn(n.stateNode.containerInfo.firstChild),pt=n,Le=!0,Lt=null,s=Sd(n,null,a,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Er(),a===c){n=Jt(t,n,s);break e}tt(t,n,a,s)}n=n.child}return n;case 5:return Pd(n),t===null&&zl(n),a=n.type,c=n.pendingProps,f=t!==null?t.memoizedProps:null,S=c.children,Ml(a,c)?S=null:f!==null&&Ml(a,f)&&(n.flags|=32),lf(t,n),tt(t,n,S,s),n.child;case 6:return t===null&&zl(n),null;case 13:return df(t,n,s);case 4:return Gl(n,n.stateNode.containerInfo),a=n.pendingProps,t===null?n.child=jr(n,null,a,s):tt(t,n,a,s),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:Nt(a,c),nf(t,n,a,c,s);case 7:return tt(t,n,n.pendingProps,s),n.child;case 8:return tt(t,n,n.pendingProps.children,s),n.child;case 12:return tt(t,n,n.pendingProps.children,s),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,S=c.value,Ee(bs,a._currentValue),a._currentValue=S,f!==null)if(Mt(f.value,S)){if(f.children===c.children&&!ot.current){n=Jt(t,n,s);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var P=f.dependencies;if(P!==null){S=f.child;for(var E=P.firstContext;E!==null;){if(E.context===a){if(f.tag===1){E=Yt(-1,s&-s),E.tag=2;var D=f.updateQueue;if(D!==null){D=D.shared;var G=D.pending;G===null?E.next=E:(E.next=G.next,G.next=E),D.pending=E}}f.lanes|=s,E=f.alternate,E!==null&&(E.lanes|=s),Ul(f.return,s,n),P.lanes|=s;break}E=E.next}}else if(f.tag===10)S=f.type===n.type?null:f.child;else if(f.tag===18){if(S=f.return,S===null)throw Error(r(341));S.lanes|=s,P=S.alternate,P!==null&&(P.lanes|=s),Ul(S,s,n),S=f.sibling}else S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===n){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}tt(t,n,c.children,s),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,Lr(n,s),c=Rt(c),a=a(c),n.flags|=1,tt(t,n,a,s),n.child;case 14:return a=n.type,c=Nt(a,n.pendingProps),c=Nt(a.type,c),rf(t,n,a,c,s);case 15:return of(t,n,n.type,n.pendingProps,s);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:Nt(a,c),Qs(t,n),n.tag=1,st(a)?(t=!0,Ls(n)):t=!1,Lr(n,s),Kd(n,a,c),sa(n,a,c,s),ua(null,n,a,!0,t,s);case 19:return hf(t,n,s);case 22:return sf(t,n,s)}throw Error(r(156,n.tag))};function Df(t,n){return gc(t,n)}function nv(t,n,s,a){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(t,n,s,a){return new nv(t,n,s,a)}function Ma(t){return t=t.prototype,!(!t||!t.isReactComponent)}function rv(t){if(typeof t=="function")return Ma(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Y)return 11;if(t===pe)return 14}return 2}function kn(t,n){var s=t.alternate;return s===null?(s=Pt(t.tag,n,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=n,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&14680064,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,n=t.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s}function si(t,n,s,a,c,f){var S=2;if(a=t,typeof t=="function")Ma(t)&&(S=1);else if(typeof t=="string")S=5;else e:switch(t){case L:return Zn(s.children,c,f,n);case $:S=8,c|=8;break;case V:return t=Pt(12,s,n,c|2),t.elementType=V,t.lanes=f,t;case K:return t=Pt(13,s,n,c),t.elementType=K,t.lanes=f,t;case W:return t=Pt(19,s,n,c),t.elementType=W,t.lanes=f,t;case Z:return ii(s,c,f,n);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case U:S=10;break e;case O:S=9;break e;case Y:S=11;break e;case pe:S=14;break e;case ge:S=16,a=null;break e}throw Error(r(130,t==null?t:typeof t,""))}return n=Pt(S,s,n,c),n.elementType=t,n.type=a,n.lanes=f,n}function Zn(t,n,s,a){return t=Pt(7,t,a,n),t.lanes=s,t}function ii(t,n,s,a){return t=Pt(22,t,a,n),t.elementType=Z,t.lanes=s,t.stateNode={isHidden:!1},t}function La(t,n,s){return t=Pt(6,t,null,n),t.lanes=s,t}function Na(t,n,s){return n=Pt(4,t.children!==null?t.children:[],t.key,n),n.lanes=s,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function ov(t,n,s,a,c){this.tag=n,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ol(0),this.expirationTimes=ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ol(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Ia(t,n,s,a,c,f,S,P,E){return t=new ov(t,n,s,P,E),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Pt(3,null,null,n),t.current=f,f.stateNode=t,f.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(f),t}function sv(t,n,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:a==null?null:""+a,children:t,containerInfo:n,implementation:s}}function zf(t){if(!t)return gn;t=t._reactInternals;e:{if(Vn(t)!==t||t.tag!==1)throw Error(r(170));var n=t;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(st(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(r(171))}if(t.tag===1){var s=t.type;if(st(s))return dd(t,s,n)}return n}function Af(t,n,s,a,c,f,S,P,E){return t=Ia(s,a,!0,t,c,f,S,P,E),t.context=zf(null),s=t.current,a=nt(),c=Cn(s),f=Yt(a,c),f.callback=n??null,yn(s,f,c),t.current.lanes=c,eo(t,c,a),at(t,a),t}function li(t,n,s,a){var c=n.current,f=nt(),S=Cn(c);return s=zf(s),n.context===null?n.context=s:n.pendingContext=s,n=Yt(f,S),n.payload={element:t},a=a===void 0?null:a,a!==null&&(n.callback=a),t=yn(c,n,S),t!==null&&(Tt(t,c,S,f),zs(t,c,S)),S}function ai(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Of(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function Fa(t,n){Of(t,n),(t=t.alternate)&&Of(t,n)}function iv(){return null}var Vf=typeof reportError=="function"?reportError:function(t){console.error(t)};function Ta(t){this._internalRoot=t}ui.prototype.render=Ta.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));li(t,n,null,null)},ui.prototype.unmount=Ta.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Xn(function(){li(null,t,null,null)}),n[Gt]=null}};function ui(t){this._internalRoot=t}ui.prototype.unstable_scheduleHydration=function(t){if(t){var n=Rc();t={blockedOn:null,target:t,priority:n};for(var s=0;s<cn.length&&n!==0&&n<cn[s].priority;s++);cn.splice(s,0,t),s===0&&Pc(t)}};function $a(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ci(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Bf(){}function lv(t,n,s,a,c){if(c){if(typeof a=="function"){var f=a;a=function(){var D=ai(S);f.call(D)}}var S=Af(n,a,t,0,null,!1,!1,"",Bf);return t._reactRootContainer=S,t[Gt]=S.current,go(t.nodeType===8?t.parentNode:t),Xn(),S}for(;c=t.lastChild;)t.removeChild(c);if(typeof a=="function"){var P=a;a=function(){var D=ai(E);P.call(D)}}var E=Ia(t,0,!1,null,null,!1,!1,"",Bf);return t._reactRootContainer=E,t[Gt]=E.current,go(t.nodeType===8?t.parentNode:t),Xn(function(){li(n,E,s,a)}),E}function di(t,n,s,a,c){var f=s._reactRootContainer;if(f){var S=f;if(typeof c=="function"){var P=c;c=function(){var E=ai(S);P.call(E)}}li(n,S,t,c)}else S=lv(s,n,t,c,a);return ai(S)}Sc=function(t){switch(t.tag){case 3:var n=t.stateNode;if(n.current.memoizedState.isDehydrated){var s=Zr(n.pendingLanes);s!==0&&(sl(n,s|1),at(n,De()),(Se&6)===0&&($r=De()+500,mn()))}break;case 13:Xn(function(){var a=Xt(t,1);if(a!==null){var c=nt();Tt(a,t,1,c)}}),Fa(t,1)}},il=function(t){if(t.tag===13){var n=Xt(t,134217728);if(n!==null){var s=nt();Tt(n,t,134217728,s)}Fa(t,134217728)}},Cc=function(t){if(t.tag===13){var n=Cn(t),s=Xt(t,n);if(s!==null){var a=nt();Tt(s,t,n,a)}Fa(t,n)}},Rc=function(){return _e},kc=function(t,n){var s=_e;try{return _e=t,n()}finally{_e=s}},Ji=function(t,n,s){switch(n){case"input":if(cr(t,s),n=s.name,s.type==="radio"&&n!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var a=s[n];if(a!==t&&a.form===t.form){var c=js(a);if(!c)throw Error(r(90));zn(a),cr(a,c)}}}break;case"textarea":Wr(t,s);break;case"select":n=s.value,n!=null&&sn(t,!!s.multiple,n,!1)}},ac=Pa,uc=Xn;var av={usingClientEntryPoint:!1,Events:[yo,Cr,js,ic,lc,Pa]},Io={findFiberByHostInstance:Bn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uv={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=hc(t),t===null?null:t.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||iv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fi.isDisabled&&fi.supportsFiber)try{us=fi.inject(uv),Dt=fi}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=av,ut.createPortal=function(t,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$a(n))throw Error(r(200));return sv(t,n,null,s)},ut.createRoot=function(t,n){if(!$a(t))throw Error(r(299));var s=!1,a="",c=Vf;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=Ia(t,1,!1,null,null,s,!1,a,c),t[Gt]=n.current,go(t.nodeType===8?t.parentNode:t),new Ta(n)},ut.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=hc(n),t=t===null?null:t.stateNode,t},ut.flushSync=function(t){return Xn(t)},ut.hydrate=function(t,n,s){if(!ci(n))throw Error(r(200));return di(null,t,n,!0,s)},ut.hydrateRoot=function(t,n,s){if(!$a(t))throw Error(r(405));var a=s!=null&&s.hydratedSources||null,c=!1,f="",S=Vf;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(S=s.onRecoverableError)),n=Af(n,null,t,1,s??null,c,!1,f,S),t[Gt]=n.current,go(t),a)for(t=0;t<a.length;t++)s=a[t],c=s._getVersion,c=c(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,c]:n.mutableSourceEagerHydrationData.push(s,c);return new ui(n)},ut.render=function(t,n,s){if(!ci(n))throw Error(r(200));return di(null,t,n,!1,s)},ut.unmountComponentAtNode=function(t){if(!ci(t))throw Error(r(40));return t._reactRootContainer?(Xn(function(){di(null,null,t,!1,function(){t._reactRootContainer=null,t[Gt]=null})}),!0):!1},ut.unstable_batchedUpdates=Pa,ut.unstable_renderSubtreeIntoContainer=function(t,n,s,a){if(!ci(s))throw Error(r(200));if(t==null||t._reactInternals===void 0)throw Error(r(38));return di(t,n,s,!1,a)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var Xf;function Xh(){if(Xf)return za.exports;Xf=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(o){console.error(o)}}return e(),za.exports=xv(),za.exports}var Yf;function wv(){if(Yf)return hi;Yf=1;var e=Xh();return hi.createRoot=e.createRoot,hi.hydrateRoot=e.hydrateRoot,hi}var Sv=wv(),Cv={};const zu=_v();function Ie(e,...o){if(!zu)return;const r=kv(e,...o);performance.mark(r);try{console.log(e,...o)}catch{console.log(r)}}function Rv(e,...o){zu&&console.warn(e,...o)}function kv(e,...o){return e.replace(/%[sfdO]/g,r=>{const i=o.shift();return r==="%O"&&i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):String(i)})}function _v(){if(typeof window>"u")return(Cv.DEBUG||"").includes("nuqs");try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const o=localStorage.getItem(e)===e;return localStorage.removeItem(e),o&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const Pv={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function ns(e){return`[nuqs] ${Pv[e]}
42
- See https://nuqs.dev/NUQS-${e}`}function Ev(e){if(e.size===0)return"";const o=[];for(const[i,l]of e.entries()){const u=i.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");o.push(`${u}=${jv(l)}`)}return"?"+o.join("&")}function jv(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,o=>encodeURIComponent(o))}const lr=z.createContext({useAdapter(){throw new Error(ns(404))}});lr.displayName="NuqsAdapterContext";zu&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==lr&&console.error(ns(303)),window.__NuqsAdapterContext=lr);function Mv(e){return({children:o,defaultOptions:r,processUrlSearchParams:i,...l})=>z.createElement(lr.Provider,{...l,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},o)}function Lv(e){const o=z.useContext(lr);if(!("useAdapter"in o))throw new Error(ns(404));return o.useAdapter(e)}const Nv=()=>z.useContext(lr).defaultOptions,Iv=()=>z.useContext(lr).processUrlSearchParams;function Fv(){var e;if(typeof window>"u"||!window.GestureEvent)return 50;try{const o=(e=navigator.userAgent)==null?void 0:e.match(/version\/([\d\.]+) safari/i);return parseFloat(o[1])>=17?120:320}catch{return 320}}function Tv(e){return{method:"throttle",timeMs:e}}const Uo=Tv(Fv());function $v(e){return e===null||Array.isArray(e)&&e.length===0}function bv(e,o,r){if(typeof e=="string")r.set(o,e);else{r.delete(o);for(const i of e)r.append(o,i);r.has(o)||r.set(o,"")}return r}function Au(){const e=new Map;return{on(o,r){const i=e.get(o)||[];return i.push(r),e.set(o,i),()=>this.off(o,r)},off(o,r){const i=e.get(o);i&&e.set(o,i.filter(l=>l!==r))},emit(o,r){var i;(i=e.get(o))==null||i.forEach(l=>l(r))}}}function vu(e,o,r){function i(){e(),r.removeEventListener("abort",u)}const l=setTimeout(i,o);function u(){clearTimeout(l),r.removeEventListener("abort",u)}r.addEventListener("abort",u)}function yu(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let o=()=>{},r=()=>{};return{promise:new e((i,l)=>{o=i,r=l}),resolve:o,reject:r}}function Dv(e,o){let r=o;for(let i=e.length-1;i>=0;i--){const l=e[i];if(!l)continue;const u=r;r=()=>l(u)}r()}function xu(){return new URLSearchParams(location.search)}var Yh=class{constructor(){Je(this,"updateMap",new Map);Je(this,"options",{history:"replace",scroll:!1,shallow:!0});Je(this,"timeMs",Uo.timeMs);Je(this,"transitions",new Set);Je(this,"resolvers",null);Je(this,"controller",null);Je(this,"lastFlushedAt",0);Je(this,"resetQueueOnNextPush",!1)}push({key:e,query:o,options:r},i=Uo.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Ie("[nuqs gtq] Enqueueing %s=%s %O",e,o,r),this.updateMap.set(e,o),r.history==="push"&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),r.shallow===!1&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=xu}){var o;return((o=this.resolvers)==null?void 0:o.promise)??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=xu,rateLimitFactor:o=1,...r},i){if(this.controller??(this.controller=new AbortController),!Number.isFinite(this.timeMs))return Ie("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=yu();const l=()=>{this.lastFlushedAt=performance.now();const[d,h]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);h===null?(this.resolvers.resolve(d),this.resetQueueOnNextPush=!0):this.resolvers.reject(d),this.resolvers=null};return vu(()=>{const d=performance.now()-this.lastFlushedAt,h=this.timeMs,p=o*Math.max(0,h-d);Ie("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",p,h,o),p===0?l():vu(l,p,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){var e,o;return(e=this.controller)==null||e.abort(),this.controller=new AbortController,(o=this.resolvers)==null||o.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Ie("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Uo.timeMs,e}applyPendingUpdates(e,o){const{updateUrl:r,getSearchParamsSnapshot:i}=e;let l=i();if(Ie("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,l.toString()),this.updateMap.size===0)return[l,null];const u=Array.from(this.updateMap.entries()),d={...this.options},h=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Ie("[nuqs gtq] Flushing queue %O with options %O",u,d);for(const[p,m]of u)m===null?l.delete(p):l=bv(m,p,l);o&&(l=o(l));try{return Dv(h,()=>{r(l,d)}),[l,null]}catch(p){return console.error(ns(429),u.map(([m])=>m).join(),p),[l,p]}}};const _i=new Yh;function zv(e,o,r){const i=z.useCallback(()=>{const u=Object.fromEntries(e.map(d=>[d,r(d)]));return[JSON.stringify(u),u]},[e.join(","),r]),l=z.useRef(null);return l.current===null&&(l.current=i()),z.useSyncExternalStore(z.useCallback(u=>{const d=e.map(h=>o(h,u));return()=>d.forEach(h=>h())},[e.join(","),o]),()=>{const[u,d]=i();return l.current[0]===u?l.current[1]:(l.current=[u,d],d)},()=>l.current[1])}var Av=class{constructor(e){Je(this,"callback");Je(this,"resolvers",yu());Je(this,"controller",new AbortController);Je(this,"queuedValue");this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,o){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,vu(()=>{const r=this.resolvers;try{Ie("[nuqs dq] Flushing debounce queue",e);const i=this.callback(e);Ie("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=yu(),i.then(l=>r.resolve(l)).catch(l=>r.reject(l))}catch(i){this.queuedValue=void 0,r.reject(i)}},o,this.controller.signal),this.resolvers.promise}},Ov=class{constructor(e=new Yh){Je(this,"throttleQueue");Je(this,"queues",new Map);Je(this,"queuedQuerySync",Au());this.throttleQueue=e}useQueuedQueries(e){return zv(e,(o,r)=>this.queuedQuerySync.on(o,r),o=>this.getQueuedQuery(o))}push(e,o,r,i){if(!Number.isFinite(o)){const d=r.getSearchParamsSnapshot??xu;return Promise.resolve(d())}const l=e.key;if(!this.queues.has(l)){Ie("[nuqs dqc] Creating debounce queue for `%s`",l);const d=new Av(h=>(this.throttleQueue.push(h),this.throttleQueue.flush(r,i).finally(()=>{var p;((p=this.queues.get(h.key))==null?void 0:p.queuedValue)===void 0&&(Ie("[nuqs dqc] Cleaning up empty queue for `%s`",h.key),this.queues.delete(h.key)),this.queuedQuerySync.emit(h.key)})));this.queues.set(l,d)}Ie("[nuqs dqc] Enqueueing debounce update %O",e);const u=this.queues.get(l).push(e,o);return this.queuedQuerySync.emit(l),u}abort(e){var r;const o=this.queues.get(e);return o?(Ie("[nuqs dqc] Aborting debounce queue %s=%s",e,(r=o.queuedValue)==null?void 0:r.query),this.queues.delete(e),o.abort(),this.queuedQuerySync.emit(e),i=>(i.then(o.resolvers.resolve,o.resolvers.reject),i)):i=>i}abortAll(){var e;for(const[o,r]of this.queues.entries())Ie("[nuqs dqc] Aborting debounce queue %s=%s",o,(e=r.queuedValue)==null?void 0:e.query),r.abort(),r.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(o);this.queues.clear()}getQueuedQuery(e){var r,i;const o=(i=(r=this.queues.get(e))==null?void 0:r.queuedValue)==null?void 0:i.query;return o!==void 0?o:this.throttleQueue.getQueuedQuery(e)}};const Va=new Ov(_i);function Jh(e,o){return e===o?!0:e===null||o===null||typeof e=="string"||typeof o=="string"||e.length!==o.length?!1:e.every((r,i)=>r===o[i])}function Jf(e,o,r){return i=>{if(!(o.length===0||o.some(u=>!Jh(i.getAll(u),e.getAll(u)))))return Ie("[nuqs `%s`] no change, returning previous",o.join(","),i),i;const l=Zh(e,o,r);return Ie("[nuqs `%s`] subbed search params change\n from %O\n to %O",o.join(","),i,l),l}}function Zh(e,o,r){if(o.length===0)return e;const i=r?new URLSearchParams(e):e;for(const l of e.keys())o.includes(l)||i.delete(l);return i}const Vv="__nuqs__",wu=Au();function Bv(e){return function(r,i){const l=new URL(location.href);l.search=Ev(r),Ie("[nuqs react] Updating url: %s",l),e&&i.shallow===!1?(i.history==="push"?location.assign:location.replace).call(location,l):(i.history==="push"?history.pushState:history.replaceState).call(history,history.state,Vv,l),wu.emit("update",r),i.scroll===!0&&window.scrollTo({top:0})}}const ep=z.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function Uv(e){const{fullPageNavigationOnShallowFalseUpdates:o}=z.useContext(ep),[r,i]=z.useState(()=>typeof location>"u"?new URLSearchParams:Zh(new URLSearchParams(location.search),e,!1));return z.useEffect(()=>{const l=()=>{i(Jf(new URLSearchParams(location.search),e,!1))},u=d=>{i(Jf(d,e,!0))};return wu.on("update",u),window.addEventListener("popstate",l),()=>{wu.off("update",u),window.removeEventListener("popstate",l)}},[e.join("&")]),{searchParams:r,updateUrl:z.useMemo(()=>Bv(o),[o])}}const Hv=Mv(Uv);function qv({children:e,fullPageNavigationOnShallowFalseUpdates:o=!1,...r}){return z.createElement(ep.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:o}},z.createElement(Hv,{...r,children:e}))}var Vo=typeof window<"u"?z.useLayoutEffect:z.useEffect;function Ba(e){const o=z.useRef({value:e,prev:null}),r=o.current.value;return e!==r&&(o.current={value:e,prev:r}),o.current.prev}function Gv(e,o,r={},i={}){z.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{o(u)},r);return l.observe(e.current),()=>{l.disconnect()}},[o,r,i.disabled,e])}function Wv(e){const o=z.useRef(null);return z.useImperativeHandle(e,()=>o.current,[]),o}const tp=!1;function Wo(e){return e[e.length-1]}function Qv(e){return typeof e=="function"}function tr(e,o){return Qv(e)?e(o):e}const np=Object.prototype.hasOwnProperty,Zf=Object.prototype.propertyIsEnumerable;function rp(e){for(const o in e)if(np.call(e,o))return!0;return!1}const Kv=()=>Object.create(null),er=(e,o)=>nr(e,o,Kv);function nr(e,o,r=()=>({}),i=0){if(e===o)return e;if(i>500)return o;const l=o,u=nh(e)&&nh(l);if(!u&&!(Ni(e)&&Ni(l)))return l;const d=u?e:eh(e);if(!d)return l;const h=u?l:eh(l);if(!h)return l;const p=d.length,m=h.length,y=u?new Array(m):r();let v=0;for(let w=0;w<m;w++){const x=u?w:h[w],C=e[x],R=l[x];if(C===R){y[x]=C,(u?w<p:np.call(e,x))&&v++;continue}if(C===null||R===null||typeof C!="object"||typeof R!="object"){y[x]=R;continue}const k=nr(C,R,r,i+1);y[x]=k,k===C&&v++}return p===m&&v===p?e:y}function eh(e){const o=Object.getOwnPropertyNames(e);for(const l of o)if(!Zf.call(e,l))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return o;const i=o;for(const l of r){if(!Zf.call(e,l))return!1;i.push(l)}return i}function Ni(e){if(!th(e))return!1;const o=e.constructor;if(typeof o>"u")return!0;const r=o.prototype;return!(!th(r)||!r.hasOwnProperty("isPrototypeOf"))}function th(e){return Object.prototype.toString.call(e)==="[object Object]"}function nh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function or(e,o,r){if(e===o)return!0;if(typeof e!=typeof o)return!1;if(Array.isArray(e)&&Array.isArray(o)){if(e.length!==o.length)return!1;for(let i=0,l=e.length;i<l;i++)if(!or(e[i],o[i],r))return!1;return!0}if(Ni(e)&&Ni(o)){const i=(r==null?void 0:r.ignoreUndefined)??!0;if(r!=null&&r.partial){for(const d in o)if((!i||o[d]!==void 0)&&!or(e[d],o[d],r))return!1;return!0}let l=0;if(!i)l=Object.keys(e).length;else for(const d in e)e[d]!==void 0&&l++;let u=0;for(const d in o)if((!i||o[d]!==void 0)&&(u++,u>l||!or(e[d],o[d],r)))return!1;return l===u}return!1}function qr(e){let o,r;const i=new Promise((l,u)=>{o=l,r=u});return i.status="pending",i.resolve=l=>{i.status="resolved",i.value=l,o(l),e==null||e(l)},i.reject=l=>{i.status="rejected",r(l)},i}function Qo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Xv(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function rh(e){let o;try{o=decodeURI(e)}catch{o=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return Xv(o)}const Yv=["http:","https:","mailto:","tel:"];function Ii(e,o){if(!e)return!1;try{const r=new URL(e);return!o.has(r.protocol)}catch{return!1}}function To(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const o=/%25|%5C/gi;let r=0,i="",l;for(;(l=o.exec(e))!==null;)i+=rh(e.slice(r,l.index))+l[0],r=o.lastIndex;i=i+rh(r?e.slice(r):e);let u=!1;return i.startsWith("//")&&(u=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:u}}function Jv(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Zv(e,o){if(e===o)return!0;if(e.length!==o.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==o[r])return!1;return!0}function rn(){throw new Error("Invariant failed")}function Ko(e){const o=new Map;let r,i;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,i&&(i.next=u,u.prev=i)):(u.next.prev=void 0,r=u.next,u.next=void 0,i&&(u.prev=i,i.next=u)),i=u)};return{get(u){const d=o.get(u);if(d)return l(d),d.value},set(u,d){if(o.size>=e&&r){const p=r;o.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===i&&(i=void 0)}const h=o.get(u);if(h)h.value=d,l(h);else{const p={key:u,value:d,prev:i};i&&(i.next=p),i=p,r||(r=p),o.set(u,p)}},clear(){o.clear(),r=void 0,i=void 0}}}const Nn=4,op=5;function ey(e){const o=e.indexOf("{");if(o===-1)return null;const r=e.indexOf("}",o);return r===-1||o+1>=e.length?null:[o,r]}function sp(e,o,r=new Uint16Array(6)){const i=e.indexOf("/",o),l=i===-1?e.length:i,u=e.substring(o,l);if(!u||!u.includes("$"))return r[0]=0,r[1]=o,r[2]=o,r[3]=l,r[4]=l,r[5]=l,r;if(u==="$"){const h=e.length;return r[0]=2,r[1]=o,r[2]=o,r[3]=h,r[4]=h,r[5]=h,r}if(u.charCodeAt(0)===36)return r[0]=1,r[1]=o,r[2]=o+1,r[3]=l,r[4]=l,r[5]=l,r;const d=ey(u);if(d){const[h,p]=d,m=u.charCodeAt(h+1);if(m===45){if(h+2<u.length&&u.charCodeAt(h+2)===36){const y=h+3,v=p;if(y<v)return r[0]=3,r[1]=o+h,r[2]=o+y,r[3]=o+v,r[4]=o+p+1,r[5]=l,r}}else if(m===36){const y=h+1,v=h+2;return v===p?(r[0]=2,r[1]=o+h,r[2]=o+y,r[3]=o+v,r[4]=o+p+1,r[5]=e.length,r):(r[0]=1,r[1]=o+h,r[2]=o+v,r[3]=o+p,r[4]=o+p+1,r[5]=l,r)}}return r[0]=0,r[1]=o,r[2]=o,r[3]=l,r[4]=l,r[5]=l,r}function Oi(e,o,r,i,l,u,d){var p,m,y,v,w,x,C,R,k,_;d==null||d(r);let h=i;{const M=r.fullPath??r.from,b=M.length,I=((p=r.options)==null?void 0:p.caseSensitive)??e,A=((y=(m=r.options)==null?void 0:m.params)==null?void 0:y.parse)??((v=r.options)==null?void 0:v.parseParams);for(;h<b;){const L=sp(M,h,o);let $;const V=h,U=L[5];switch(h=U+1,u++,L[0]){case 0:{const O=M.substring(L[2],L[3]);if(I){const Y=(w=l.static)==null?void 0:w.get(O);if(Y)$=Y;else{l.static??(l.static=new Map);const K=rr(r.fullPath??r.from);K.parent=l,K.depth=u,$=K,l.static.set(O,K)}}else{const Y=O.toLowerCase(),K=(x=l.staticInsensitive)==null?void 0:x.get(Y);if(K)$=K;else{l.staticInsensitive??(l.staticInsensitive=new Map);const W=rr(r.fullPath??r.from);W.parent=l,W.depth=u,$=W,l.staticInsensitive.set(Y,W)}}break}case 1:{const O=M.substring(V,L[1]),Y=M.substring(L[4],U),K=I&&!!(O||Y),W=O?K?O:O.toLowerCase():void 0,pe=Y?K?Y:Y.toLowerCase():void 0,ge=!A&&((C=l.dynamic)==null?void 0:C.find(Z=>!Z.parse&&Z.caseSensitive===K&&Z.prefix===W&&Z.suffix===pe));if(ge)$=ge;else{const Z=Ha(1,r.fullPath??r.from,K,W,pe);$=Z,Z.depth=u,Z.parent=l,l.dynamic??(l.dynamic=[]),l.dynamic.push(Z)}break}case 3:{const O=M.substring(V,L[1]),Y=M.substring(L[4],U),K=I&&!!(O||Y),W=O?K?O:O.toLowerCase():void 0,pe=Y?K?Y:Y.toLowerCase():void 0,ge=!A&&((R=l.optional)==null?void 0:R.find(Z=>!Z.parse&&Z.caseSensitive===K&&Z.prefix===W&&Z.suffix===pe));if(ge)$=ge;else{const Z=Ha(3,r.fullPath??r.from,K,W,pe);$=Z,Z.parent=l,Z.depth=u,l.optional??(l.optional=[]),l.optional.push(Z)}break}case 2:{const O=M.substring(V,L[1]),Y=M.substring(L[4],U),K=I&&!!(O||Y),W=O?K?O:O.toLowerCase():void 0,pe=Y?K?Y:Y.toLowerCase():void 0,ge=Ha(2,r.fullPath??r.from,K,W,pe);$=ge,ge.parent=l,ge.depth=u,l.wildcard??(l.wildcard=[]),l.wildcard.push(ge)}}l=$}if(A&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const L=rr(r.fullPath??r.from);L.kind=op,L.parent=l,u++,L.depth=u,l.pathless??(l.pathless=[]),l.pathless.push(L),l=L}const B=(r.path||!r.children)&&!r.isRoot;if(B&&M.endsWith("/")){const L=rr(r.fullPath??r.from);L.kind=Nn,L.parent=l,u++,L.depth=u,l.index=L,l=L}l.parse=A??null,l.priority=((_=(k=r.options)==null?void 0:k.params)==null?void 0:_.priority)??0,B&&!l.route&&(l.route=r,l.fullPath=r.fullPath??r.from)}if(r.children)for(const M of r.children)Oi(e,o,M,h,l,u,d)}function Ua(e,o){if(e.parse&&!o.parse)return-1;if(!e.parse&&o.parse)return 1;if(e.parse&&o.parse&&(e.priority||o.priority))return o.priority-e.priority;if(e.prefix&&o.prefix&&e.prefix!==o.prefix){if(e.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(e.prefix))return 1}if(e.suffix&&o.suffix&&e.suffix!==o.suffix){if(e.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(e.suffix))return 1}return e.prefix&&!o.prefix?-1:!e.prefix&&o.prefix?1:e.suffix&&!o.suffix?-1:!e.suffix&&o.suffix?1:e.caseSensitive&&!o.caseSensitive?-1:!e.caseSensitive&&o.caseSensitive?1:0}function En(e){var o,r,i;if(e.pathless)for(const l of e.pathless)En(l);if(e.static)for(const l of e.static.values())En(l);if(e.staticInsensitive)for(const l of e.staticInsensitive.values())En(l);if((o=e.dynamic)!=null&&o.length){e.dynamic.sort(Ua);for(const l of e.dynamic)En(l)}if((r=e.optional)!=null&&r.length){e.optional.sort(Ua);for(const l of e.optional)En(l)}if((i=e.wildcard)!=null&&i.length){e.wildcard.sort(Ua);for(const l of e.wildcard)En(l)}}function rr(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ha(e,o,r,i,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:r,prefix:i,suffix:l}}function ty(e,o){const r=rr("/"),i=new Uint16Array(6);for(const l of e)Oi(!1,i,l,1,r,0);En(r),o.masksTree=r,o.flatCache=Ko(1e3)}function ny(e,o){e||(e="/");const r=o.flatCache.get(e);if(r)return r;const i=Ou(e,o.masksTree);return o.flatCache.set(e,i),i}function ry(e,o,r,i,l){e||(e="/"),i||(i="/");const u=o?`case\0${e}`:e;let d=l.singleCache.get(u);return d||(d=rr("/"),Oi(o,new Uint16Array(6),{from:e},1,d,0),l.singleCache.set(u,d)),Ou(i,d,r)}function oy(e,o,r=!1){const i=r?e:`nofuzz\0${e}`,l=o.matchCache.get(i);if(l!==void 0)return l;e||(e="/");let u;try{u=Ou(e,o.segmentTree,r)}catch(d){if(d instanceof URIError)u=null;else throw d}return u&&(u.branch=lp(u.route)),o.matchCache.set(i,u),u}function sy(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function iy(e,o=!1,r){const i=rr(e.fullPath),l=new Uint16Array(6),u={},d={};let h=0;return Oi(o,l,e,1,i,0,p=>{if(r==null||r(p,h),p.id in u&&rn(),u[p.id]=p,h!==0&&p.path){const m=sy(p.fullPath);(!d[m]||p.fullPath.endsWith("/"))&&(d[m]=p)}h++}),En(i),{processedTree:{segmentTree:i,singleCache:Ko(1e3),matchCache:Ko(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:d}}function Ou(e,o,r=!1){const i=e.split("/"),l=ay(e,i,o,r);if(!l)return null;const[u]=ip(e,i,l);return{route:l.node.route,rawParams:u}}function ip(e,o,r){var y,v,w,x,C,R,k,_,M,b;const i=ly(r.node);let l=null;const u=Object.create(null);let d=((y=r.extract)==null?void 0:y.part)??0,h=((v=r.extract)==null?void 0:v.node)??0,p=((w=r.extract)==null?void 0:w.path)??0,m=((x=r.extract)==null?void 0:x.segment)??0;for(;h<i.length;d++,h++,p++,m++){const I=i[h];if(I.kind===Nn)break;if(I.kind===op){m--,d--,p--;continue}const A=o[d],B=p;if(A&&(p+=A.length),I.kind===1){l??(l=r.node.fullPath.split("/"));const L=l[m],$=((C=I.prefix)==null?void 0:C.length)??0;if(L.charCodeAt($)===123){const V=((R=I.suffix)==null?void 0:R.length)??0,U=L.substring($+2,L.length-V-1),O=A.substring($,A.length-V);u[U]=decodeURIComponent(O)}else{const V=L.substring(1);u[V]=decodeURIComponent(A)}}else if(I.kind===3){if(r.skipped&1<<h){d--,p=B-1;continue}l??(l=r.node.fullPath.split("/"));const L=l[m],$=((k=I.prefix)==null?void 0:k.length)??0,V=((_=I.suffix)==null?void 0:_.length)??0,U=L.substring($+3,L.length-V-1),O=I.suffix||I.prefix?A.substring($,A.length-V):A;O&&(u[U]=decodeURIComponent(O))}else if(I.kind===2){const L=I,$=e.substring(B+(((M=L.prefix)==null?void 0:M.length)??0),e.length-(((b=L.suffix)==null?void 0:b.length)??0)),V=decodeURIComponent($);u["*"]=V,u._splat=V;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:d,node:h,path:p,segment:m}]}function lp(e){const o=[e];for(;e.parentRoute;)e=e.parentRoute,o.push(e);return o.reverse(),o}function ly(e){const o=Array(e.depth+1);do o[e.depth]=e,e=e.parent;while(e);return o}function ay(e,o,r,i){if(e==="/"&&r.index)return{node:r.index,skipped:0};const l=!Wo(o),u=l&&e!=="/",d=o.length-(l?1:0),h=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const y=h.pop(),{node:v,index:w,skipped:x,depth:C,statics:R,dynamics:k,optionals:_}=y;let{extract:M,rawParams:b}=y;if(v.kind===2&&v.route&&!gi(m,y))continue;if(v.parse){if(!oh(e,o,y))continue;b=y.rawParams,M=y.extract}i&&v.route&&v.kind!==Nn&&gi(p,y)&&(p=y);const I=w===d;if(I&&(v.route&&(!u||v.kind===Nn||v.kind===2)&&gi(m,y)&&(m=y),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const A=I?void 0:o[w];let B;if(I&&v.index){const L={node:v.index,index:w,skipped:x,depth:C+1,statics:R,dynamics:k,optionals:_,extract:M,rawParams:b};let $=!0;if(v.index.parse&&(oh(e,o,L)||($=!1)),$){if(!k&&!_&&!x&&uy(R,d))return L;gi(m,L)&&(m=L)}}if(v.wildcard)for(let L=v.wildcard.length-1;L>=0;L--){const $=v.wildcard[L],{prefix:V,suffix:U}=$;if(!(V&&(I||!($.caseSensitive?A:B??(B=A.toLowerCase())).startsWith(V)))){if(U){if(I)continue;const O=o.slice(w).join("/").slice(-U.length);if(($.caseSensitive?O:O.toLowerCase())!==U)continue}h.push({node:$,index:d,skipped:x,depth:C+1,statics:R,dynamics:k,optionals:_,extract:M,rawParams:b})}}if(v.optional){const L=x|1<<C,$=C+1;for(let V=v.optional.length-1;V>=0;V--){const U=v.optional[V];h.push({node:U,index:w,skipped:L,depth:$,statics:R,dynamics:k,optionals:_,extract:M,rawParams:b})}if(!I)for(let V=v.optional.length-1;V>=0;V--){const U=v.optional[V],{prefix:O,suffix:Y}=U;if(O||Y){const K=U.caseSensitive?A:B??(B=A.toLowerCase());if(O&&!K.startsWith(O)||Y&&!K.endsWith(Y))continue}h.push({node:U,index:w+1,skipped:x,depth:$,statics:R,dynamics:k,optionals:_+pi(d,w),extract:M,rawParams:b})}}if(!I&&v.dynamic&&A)for(let L=v.dynamic.length-1;L>=0;L--){const $=v.dynamic[L],{prefix:V,suffix:U}=$;if(V||U){const O=$.caseSensitive?A:B??(B=A.toLowerCase());if(V&&!O.startsWith(V)||U&&!O.endsWith(U))continue}h.push({node:$,index:w+1,skipped:x,depth:C+1,statics:R,dynamics:k+pi(d,w),optionals:_,extract:M,rawParams:b})}if(!I&&v.staticInsensitive){const L=v.staticInsensitive.get(B??(B=A.toLowerCase()));L&&h.push({node:L,index:w+1,skipped:x,depth:C+1,statics:R+pi(d,w),dynamics:k,optionals:_,extract:M,rawParams:b})}if(!I&&v.static){const L=v.static.get(A);L&&h.push({node:L,index:w+1,skipped:x,depth:C+1,statics:R+pi(d,w),dynamics:k,optionals:_,extract:M,rawParams:b})}if(v.pathless){const L=C+1;for(let $=v.pathless.length-1;$>=0;$--){const V=v.pathless[$];h.push({node:V,index:w,skipped:x,depth:L,statics:R,dynamics:k,optionals:_,extract:M,rawParams:b})}}}if(m)return m;if(i&&p){let y=p.index;for(let w=0;w<p.index;w++)y+=o[w].length;const v=y===e.length?"/":e.slice(y);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function pi(e,o){return 2**(e-o-1)}function uy(e,o){return e===2**(o-1)-1}function oh(e,o,r){let i,l;try{[i,l]=ip(e,o,r)}catch{return null}if(r.rawParams=i,r.extract=l,!r.node.parse)return!0;try{if(r.node.parse(i)===!1)return null}catch{}return!0}function gi(e,o){return e?o.statics>e.statics||o.statics===e.statics&&(o.dynamics>e.dynamics||o.dynamics===e.dynamics&&(o.optionals>e.optionals||o.optionals===e.optionals&&((o.node.kind===Nn)>(e.node.kind===Nn)||o.node.kind===Nn==(e.node.kind===Nn)&&o.depth>e.depth))):!0}function Pi(e){return Vu(e.filter(o=>o!==void 0).join("/"))}function Vu(e){return e.replace(/\/{2,}/g,"/")}function ap(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function nn(e){const o=e.length;return o>1&&e[o-1]==="/"?e.replace(/\/{1,}$/,""):e}function up(e){return nn(ap(e))}function Fi(e,o){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${o}/`?e.slice(0,-1):e}function cy(e,o,r){return Fi(e,r)===Fi(o,r)}function dy({base:e,to:o,trailingSlash:r="never",cache:i}){const l=o.startsWith("/"),u=!l&&o===".";let d;if(i){d=l?o:u?e:e+"\0"+o;const m=i.get(d);if(m)return m}let h;if(u)h=e.split("/");else if(l)h=o.split("/");else{for(h=e.split("/");h.length>1&&Wo(h)==="";)h.pop();const m=o.split("/");for(let y=0,v=m.length;y<v;y++){const w=m[y];w===""?y?y===v-1&&h.push(w):h=[w]:w===".."?h.pop():w==="."||h.push(w)}}h.length>1&&(Wo(h)===""?r==="never"&&h.pop():r==="always"&&h.push(""));const p=Vu(h.join("/"))||"/";return d&&i&&i.set(d,p),p}function fy(e){const o=new Map(e.map(l=>[encodeURIComponent(l),l])),r=Array.from(o.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(r,"g");return l=>l.replace(i,u=>o.get(u)??u)}function qa(e,o,r){const i=o[e];return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(l=>ih(l,r)).join("/"):ih(i,r)}function sh({path:e,params:o,decoder:r,...i}){let l=!1;const u=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:u,isMissingParams:l};const d=e.length;let h=0,p,m="";for(;h<d;){const y=h;p=sp(e,y,p);const v=p[5];if(h=v+1,y===v)continue;const w=p[0];if(w===0){m+="/"+e.substring(y,v);continue}if(w===2){const x=o._splat;u._splat=x,u["*"]=x;const C=e.substring(y,p[1]),R=e.substring(p[4],v);if(!x){l=!0,(C||R)&&(m+="/"+C+R);continue}const k=qa("_splat",o,r);m+="/"+C+k+R;continue}if(w===1){const x=e.substring(p[2],p[3]);!l&&!(x in o)&&(l=!0),u[x]=o[x];const C=e.substring(y,p[1]),R=e.substring(p[4],v),k=qa(x,o,r)??"undefined";m+="/"+C+k+R;continue}if(w===3){const x=e.substring(p[2],p[3]),C=o[x];if(C==null)continue;u[x]=C;const R=e.substring(y,p[1]),k=e.substring(p[4],v),_=qa(x,o,r)??"";m+="/"+R+_+k;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:u,interpolatedPath:m||"/",isMissingParams:l}}function ih(e,o){const r=encodeURIComponent(e);return(o==null?void 0:o(r))??r}function et(e){return(e==null?void 0:e.isNotFound)===!0}function hy(e,o=String){const r=new URLSearchParams;for(const i in e){const l=e[i];l!==void 0&&r.set(i,o(l))}return r.toString()}function Ga(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function py(e){const o=new URLSearchParams(e),r=Object.create(null);for(const[i,l]of o.entries()){const u=r[i];u==null?r[i]=Ga(l):Array.isArray(u)?u.push(Ga(l)):r[i]=[u,Ga(l)]}return r}const gy=vy(JSON.parse),my=yy(JSON.stringify,JSON.parse);function vy(e){return o=>{o[0]==="?"&&(o=o.substring(1));const r=py(o);for(const i in r){const l=r[i];if(typeof l=="string")try{r[i]=e(l)}catch{}}return r}}function yy(e,o){const r=typeof o=="function";function i(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(r&&typeof l=="string")try{return o(l),e(l)}catch{}return l}return l=>{const u=hy(l,i);return u?`?${u}`:""}}const sr="__root__";function xy(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const o=new Headers(e.headers);e.href&&o.get("Location")===null&&o.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:o});if(r.options=e,e.throw)throw r;return r}function ct(e){return e instanceof Response&&!!e.options}const Su=e=>{var o;if(!e.rendered)return e.rendered=!0,(o=e.onReady)==null?void 0:o.call(e)},wy=e=>e.stores.matchesId.get().some(o=>{var r;return(r=e.stores.matchStores.get(o))==null?void 0:r.get()._forcePending}),Vi=(e,o)=>!!(e.preload&&!e.router.stores.matchStores.has(o)),ir=(e,o,r=!0)=>{const i={...e.router.options.context??{}},l=r?o:o-1;for(let u=0;u<=l;u++){const d=e.matches[u];if(!d)continue;const h=e.router.getMatch(d.id);h&&Object.assign(i,h.__routeContext,h.__beforeLoadContext)}return i},lh=(e,o)=>{if(!e.matches.length)return;const r=o.routeId,i=e.matches.findIndex(d=>d.routeId===e.router.routeTree.id),l=i>=0?i:0;let u=r?e.matches.findIndex(d=>d.routeId===r):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=l);for(let d=u;d>=0;d--){const h=e.matches[d];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return d}return r?u:l},In=(e,o,r)=>{var i,l,u;if(!(!ct(r)&&!et(r)))throw ct(r)&&r.redirectHandled&&!r.options.reloadDocument||(o&&((i=o._nonReactive.beforeLoadPromise)==null||i.resolve(),(l=o._nonReactive.loaderPromise)==null||l.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=r,e.updateMatch(o.id,d=>({...d,status:ct(r)?"redirected":et(r)?"notFound":d.status==="pending"?"success":d.status,context:ir(e,o.index),isFetching:!1,error:r})),et(r)&&!r.routeId&&(r.routeId=o.routeId),(u=o._nonReactive.loadPromise)==null||u.resolve()),ct(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},cp=(e,o)=>{const r=e.router.getMatch(o);return!!(!r||r._nonReactive.dehydrated)},ah=(e,o,r)=>{const i=ir(e,r);e.updateMatch(o,l=>({...l,context:i}))},$o=(e,o,r)=>{var d,h;const{id:i,routeId:l}=e.matches[o],u=e.router.looseRoutesById[l];if(r instanceof Promise)throw r;e.firstBadMatchIndex??(e.firstBadMatchIndex=o),In(e,e.router.getMatch(i),r);try{(h=(d=u.options).onError)==null||h.call(d,r)}catch(p){r=p,In(e,e.router.getMatch(i),r)}e.updateMatch(i,p=>{var m,y;return(m=p._nonReactive.beforeLoadPromise)==null||m.resolve(),p._nonReactive.beforeLoadPromise=void 0,(y=p._nonReactive.loadPromise)==null||y.resolve(),{...p,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!ct(r)&&!et(r)&&(e.serialError??(e.serialError=r))},dp=(e,o,r,i)=>{var u;if(i._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Vi(e,o)&&(r.options.loader||r.options.beforeLoad||hp(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??((u=e.router.options)==null?void 0:u.defaultPendingComponent))){const d=setTimeout(()=>{Su(e)},l);i._nonReactive.pendingTimeout=d}},Sy=(e,o,r)=>{const i=e.router.getMatch(o);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;dp(e,o,r,i);const l=()=>{const u=e.router.getMatch(o);u.preload&&(u.status==="redirected"||u.status==="notFound")&&In(e,u,u.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(l):l()},Cy=(e,o,r,i)=>{const l=e.router.getMatch(o);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=qr(()=>{u==null||u.resolve(),u=void 0});const{paramsError:d,searchError:h}=l;d&&$o(e,r,d),h&&$o(e,r,h),dp(e,o,i,l);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(o,I=>({...I,isFetching:"beforeLoad",fetchCount:I.fetchCount+1,abortController:p})))},v=()=>{var I;(I=l._nonReactive.beforeLoadPromise)==null||I.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(o,A=>({...A,isFetching:!1}))};if(!i.options.beforeLoad){e.router.batch(()=>{y(),v()});return}l._nonReactive.beforeLoadPromise=qr();const w={...ir(e,r,!1),...l.__routeContext},{search:x,params:C,cause:R}=l,k=Vi(e,o),_={search:x,abortController:p,params:C,preload:k,context:w,location:e.location,navigate:I=>e.router.navigate({...I,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:k?"preload":R,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},M=I=>{if(I===void 0){e.router.batch(()=>{y(),v()});return}(ct(I)||et(I))&&(y(),$o(e,r,I)),e.router.batch(()=>{y(),e.updateMatch(o,A=>({...A,__beforeLoadContext:I})),v()})};let b;try{if(b=i.options.beforeLoad(_),Qo(b))return y(),b.catch(I=>{$o(e,r,I)}).then(M)}catch(I){y(),$o(e,r,I)}M(b)},Ry=(e,o)=>{const{id:r,routeId:i}=e.matches[o],l=e.router.looseRoutesById[i],u=()=>h(),d=()=>Cy(e,r,o,l),h=()=>{if(cp(e,r))return;const p=Sy(e,r,l);return Qo(p)?p.then(d):d()};return u()},ky=(e,o,r)=>{var u,d,h,p,m,y;const i=e.router.getMatch(o);if(!i||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([(d=(u=r.options).head)==null?void 0:d.call(u,l),(p=(h=r.options).scripts)==null?void 0:p.call(h,l),(y=(m=r.options).headers)==null?void 0:y.call(m,l)]).then(([v,w,x])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:x,scripts:w,styles:v==null?void 0:v.styles}))},fp=(e,o,r,i,l)=>{const u=o[i-1],{params:d,loaderDeps:h,abortController:p,cause:m}=e.router.getMatch(r),y=ir(e,i),v=Vi(e,r);return{params:d,deps:h,preload:!!v,parentMatchPromise:u,abortController:p,context:y,location:e.location,navigate:w=>e.router.navigate({...w,_fromLocation:e.location}),cause:v?"preload":m,route:l,...e.router.options.additionalContext}},uh=async(e,o,r,i,l)=>{var u,d,h,p,m;try{const y=e.router.getMatch(r);try{(!(tp??e.router.isServer)||y.ssr===!0)&&Xo(l);const v=l.options.loader,w=typeof v=="function"?v:v==null?void 0:v.handler,x=w==null?void 0:w(fp(e,o,r,i,l)),C=!!w&&Qo(x);if((C||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||y._nonReactive.minPendingPromise)&&e.updateMatch(r,k=>({...k,isFetching:"loader"})),w){const k=C?await x:x;In(e,e.router.getMatch(r),k),k!==void 0&&e.updateMatch(r,_=>({..._,loaderData:k}))}l._lazyPromise&&await l._lazyPromise;const R=y._nonReactive.minPendingPromise;R&&await R,l._componentsPromise&&await l._componentsPromise,e.updateMatch(r,k=>({...k,error:void 0,context:ir(e,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let w=v;if((w==null?void 0:w.name)==="AbortError"){if(y.abortController.signal.aborted){(u=y._nonReactive.loaderPromise)==null||u.resolve(),y._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,C=>({...C,status:C.status==="pending"?"success":C.status,isFetching:!1,context:ir(e,i)}));return}const x=y._nonReactive.minPendingPromise;x&&await x,et(v)&&await((h=(d=l.options.notFoundComponent)==null?void 0:d.preload)==null?void 0:h.call(d)),In(e,e.router.getMatch(r),v);try{(m=(p=l.options).onError)==null||m.call(p,v)}catch(C){w=C,In(e,e.router.getMatch(r),C)}!ct(w)&&!et(w)&&await Xo(l,["errorComponent"]),e.updateMatch(r,C=>({...C,error:w,context:ir(e,i),status:"error",isFetching:!1}))}}catch(y){const v=e.router.getMatch(r);v&&(v._nonReactive.loaderPromise=void 0),In(e,v,y)}},_y=async(e,o,r)=>{var x,C,R,k;async function i(_,M,b,I,A){const B=Date.now()-M.updatedAt,L=_?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,$=A.options.shouldReload,V=typeof $=="function"?$(fp(e,o,l,r,A)):$,{status:U,invalid:O}=I,Y=B>=L&&(!!e.forceStaleReload||I.cause==="enter"||b!==void 0&&b!==I.id);d=U==="success"&&(O||(V??Y)),_&&A.options.preload===!1||(d&&!e.sync&&y?(h=!0,(async()=>{var K,W;try{await uh(e,o,l,r,A);const pe=e.router.getMatch(l);(K=pe._nonReactive.loaderPromise)==null||K.resolve(),(W=pe._nonReactive.loadPromise)==null||W.resolve(),pe._nonReactive.loaderPromise=void 0,pe._nonReactive.loadPromise=void 0}catch(pe){ct(pe)&&await e.router.navigate(pe.options)}})()):U!=="success"||d?await uh(e,o,l,r,A):ah(e,l,r))}const{id:l,routeId:u}=e.matches[r];let d=!1,h=!1;const p=e.router.looseRoutesById[u],m=p.options.loader,y=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(cp(e,l)){if(!e.router.getMatch(l))return e.matches[r];ah(e,l,r)}else{const _=e.router.getMatch(l),M=e.router.stores.matchesId.get()[r],b=((x=M&&e.router.stores.matchStores.get(M)||null)==null?void 0:x.routeId)===u?M:(C=e.router.stores.matches.get().find(A=>A.routeId===u))==null?void 0:C.id,I=Vi(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const A=e.router.getMatch(l),B=A._nonReactive.error||A.error;B&&In(e,A,B),A.status==="pending"&&await i(I,_,b,A,p)}else{const A=I&&!e.router.stores.matchStores.has(l),B=e.router.getMatch(l);B._nonReactive.loaderPromise=qr(),A!==B.preload&&e.updateMatch(l,L=>({...L,preload:A})),await i(I,_,b,B,p)}}const v=e.router.getMatch(l);h||((R=v._nonReactive.loaderPromise)==null||R.resolve(),(k=v._nonReactive.loadPromise)==null||k.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,h||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const w=h?v.isFetching:!1;return w!==v.isFetching||v.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:w,invalid:!1})),e.router.getMatch(l)):v};async function ch(e){var w,x;const o=e,r=[];wy(o.router)&&Su(o);let i;for(let C=0;C<o.matches.length;C++){try{const R=Ry(o,C);Qo(R)&&await R}catch(R){if(ct(R))throw R;if(et(R))i=R;else if(!o.preload)throw R;break}if(o.serialError||o.firstBadMatchIndex!=null)break}const l=o.firstBadMatchIndex??o.matches.length,u=i&&!o.preload?lh(o,i):void 0,d=i&&o.preload?0:u!==void 0?Math.min(u+1,l):l;let h,p;for(let C=0;C<d;C++)r.push(_y(o,r,C));try{await Promise.all(r)}catch{const C=await Promise.allSettled(r);for(const R of C){if(R.status!=="rejected")continue;const k=R.reason;if(ct(k))throw k;et(k)?h??(h=k):p??(p=k)}if(p!==void 0)throw p}const m=h??(i&&!o.preload?i:void 0);let y=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!m&&i&&o.preload)return o.matches;if(m){const C=lh(o,m);C===void 0&&rn();const R=o.matches[C],k=o.router.looseRoutesById[R.routeId],_=(w=o.router.options)==null?void 0:w.defaultNotFoundComponent;!k.options.notFoundComponent&&_&&(k.options.notFoundComponent=_),m.routeId=R.routeId;const M=R.routeId===o.router.routeTree.id;o.updateMatch(R.id,b=>({...b,...M?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=C,await Xo(k,["notFoundComponent"])}else if(!o.preload){const C=o.matches[0];C.globalNotFound||(x=o.router.getMatch(C.id))!=null&&x.globalNotFound&&o.updateMatch(C.id,R=>({...R,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){const C=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Xo(C,["errorComponent"])}for(let C=0;C<=y;C++){const{id:R,routeId:k}=o.matches[C],_=o.router.looseRoutesById[k];try{const M=ky(o,R,_);if(M){const b=await M;o.updateMatch(R,I=>({...I,...b}))}}catch(M){console.error(`Error executing head for route ${k}:`,M)}}const v=Su(o);if(Qo(v)&&await v,m)throw m;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}function dh(e,o){const r=o.map(i=>{var l,u;return(u=(l=e.options[i])==null?void 0:l.preload)==null?void 0:u.call(l)}).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Xo(e,o=Ei){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(i=>{const{id:l,...u}=i.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:o===Ei?(()=>{if(e._componentsPromise===void 0){const i=dh(e,Ei);i?e._componentsPromise=i.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():dh(e,o);return e._lazyPromise?e._lazyPromise.then(r):r()}function hp(e){var o;for(const r of Ei)if((o=e.options[r])!=null&&o.preload)return!0;return!1}const Ei=["component","errorComponent","pendingComponent","notFoundComponent"];function Py(e){return{input:({url:o})=>{for(const r of e)o=Cu(r,o);return o},output:({url:o})=>{for(let r=e.length-1;r>=0;r--)o=pp(e[r],o);return o}}}function Ey(e){const o=up(e.basepath),r=`/${o}`,i=e.caseSensitive?r:r.toLowerCase(),l=`${i}/`;return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===i?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=Pi(["/",o,u.pathname]),u)}}function Cu(e,o){var i;const r=(i=e==null?void 0:e.input)==null?void 0:i.call(e,{url:o});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return o}function pp(e,o){var i;const r=(i=e==null?void 0:e.output)==null?void 0:i.call(e,{url:o});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return o}function jy(e,o){const{createMutableStore:r,createReadonlyStore:i,batch:l,init:u}=o,d=new Map,h=new Map,p=new Map,m=r(e.status),y=r(e.loadedAt),v=r(e.isLoading),w=r(e.isTransitioning),x=r(e.location),C=r(e.resolvedLocation),R=r(e.statusCode),k=r(e.redirect),_=r([]),M=r([]),b=r([]),I=i(()=>Wa(d,_.get())),A=i(()=>Wa(h,M.get())),B=i(()=>Wa(p,b.get())),L=i(()=>_.get()[0]),$=i(()=>_.get().some(Z=>{var J;return((J=d.get(Z))==null?void 0:J.get().status)==="pending"})),V=i(()=>{var Z;return{locationHref:x.get().href,resolvedLocationHref:(Z=C.get())==null?void 0:Z.href,status:m.get()}}),U=i(()=>({status:m.get(),loadedAt:y.get(),isLoading:v.get(),isTransitioning:w.get(),matches:I.get(),location:x.get(),resolvedLocation:C.get(),statusCode:R.get(),redirect:k.get()})),O=Ko(64);function Y(Z){let J=O.get(Z);return J||(J=i(()=>{const le=_.get();for(const ee of le){const N=d.get(ee);if(N&&N.routeId===Z)return N.get()}}),O.set(Z,J)),J}const K={status:m,loadedAt:y,isLoading:v,isTransitioning:w,location:x,resolvedLocation:C,statusCode:R,redirect:k,matchesId:_,pendingIds:M,cachedIds:b,matches:I,pendingMatches:A,cachedMatches:B,firstId:L,hasPending:$,matchRouteDeps:V,matchStores:d,pendingMatchStores:h,cachedMatchStores:p,__store:U,getRouteMatchStore:Y,setMatches:W,setPending:pe,setCached:ge};W(e.matches),u==null||u(K);function W(Z){Qa(Z,d,_,r,l)}function pe(Z){Qa(Z,h,M,r,l)}function ge(Z){Qa(Z,p,b,r,l)}return K}function Wa(e,o){const r=[];for(const i of o){const l=e.get(i);l&&r.push(l.get())}return r}function Qa(e,o,r,i,l){const u=e.map(h=>h.id),d=new Set(u);l(()=>{for(const h of o.keys())d.has(h)||o.delete(h);for(const h of e){const p=o.get(h.id);if(!p){const m=i(h);m.routeId=h.routeId,o.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}Zv(r.get(),u)||r.set(u)})}var Tn="__TSR_index",fh="popstate",hh="beforeunload";function My(e){let o=e.getLocation();const r=new Set,i=d=>{o=e.getLocation(),r.forEach(h=>h({location:o,action:d}))},l=d=>{e.notifyOnIndexChange??!0?i(d):o=e.getLocation()},u=async({task:d,navigateOpts:h,...p})=>{var v,w;if((h==null?void 0:h.ignoreBlocker)??!1){d();return}const m=((v=e.getBlockers)==null?void 0:v.call(e))??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const x of m){const C=Yo(p.path,p.state);if(await x.blockerFn({currentLocation:o,nextLocation:C,action:p.type})){(w=e.onBlocked)==null||w.call(e);return}}d()};return{get location(){return o},get length(){return e.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,h,p)=>{const m=o.state[Tn];h=ph(m+1,h),u({task:()=>{e.pushState(d,h),i({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:d,state:h})},replace:(d,h,p)=>{const m=o.state[Tn];h=ph(m,h),u({task:()=>{e.replaceState(d,h),i({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:d,state:h})},go:(d,h)=>{u({task:()=>{e.go(d),l({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{u({task:()=>{e.back((d==null?void 0:d.ignoreBlocker)??!1),l({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{u({task:()=>{e.forward((d==null?void 0:d.ignoreBlocker)??!1),l({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>o.state[Tn]!==0,createHref:d=>e.createHref(d),block:d=>{var p;if(!e.setBlockers)return()=>{};const h=((p=e.getBlockers)==null?void 0:p.call(e))??[];return e.setBlockers([...h,d]),()=>{var y,v;const m=((y=e.getBlockers)==null?void 0:y.call(e))??[];(v=e.setBlockers)==null||v.call(e,m.filter(w=>w!==d))}},flush:()=>{var d;return(d=e.flush)==null?void 0:d.call(e)},destroy:()=>{var d;return(d=e.destroy)==null?void 0:d.call(e)},notify:i}}function ph(e,o){o||(o={});const r=Bu();return{...o,key:r,__TSR_key:r,[Tn]:e}}function gp(e){var $,V;const o=(e==null?void 0:e.window)??(typeof document<"u"?window:void 0),r=o.history.pushState,i=o.history.replaceState;let l=[];const u=()=>l,d=U=>l=U,h=(e==null?void 0:e.createHref)??(U=>U),p=(e==null?void 0:e.parseLocation)??(()=>Yo(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!(($=o.history.state)!=null&&$.__TSR_key)&&!((V=o.history.state)!=null&&V.key)){const U=Bu();o.history.replaceState({[Tn]:0,key:U,__TSR_key:U},"")}let m=p(),y,v=!1,w=!1,x=!1,C=!1;const R=()=>m;let k,_;const M=()=>{k&&(L._ignoreSubscribers=!0,(k.isPush?o.history.pushState:o.history.replaceState)(k.state,"",k.href),L._ignoreSubscribers=!1,k=void 0,_=void 0,y=void 0)},b=(U,O,Y)=>{const K=h(O);_||(y=m),m=Yo(O,Y),k={href:K,state:Y,isPush:(k==null?void 0:k.isPush)||U==="push"},_||(_=Promise.resolve().then(()=>M()))},I=U=>{m=p(),L.notify({type:U})},A=async()=>{if(w){w=!1;return}const U=p(),O=U.state[Tn]-m.state[Tn],Y=O===1,K=O===-1,W=!Y&&!K||v;v=!1;const pe=W?"GO":K?"BACK":"FORWARD",ge=W?{type:"GO",index:O}:{type:K?"BACK":"FORWARD"};if(x)x=!1;else{const Z=u();if(typeof document<"u"&&Z.length){for(const J of Z)if(await J.blockerFn({currentLocation:m,nextLocation:U,action:pe})){w=!0,o.history.go(1),L.notify(ge);return}}}m=p(),L.notify(ge)},B=U=>{if(C){C=!1;return}let O=!1;const Y=u();if(typeof document<"u"&&Y.length)for(const K of Y){const W=K.enableBeforeUnload??!0;if(W===!0){O=!0;break}if(typeof W=="function"&&W()===!0){O=!0;break}}if(O)return U.preventDefault(),U.returnValue=""},L=My({getLocation:R,getLength:()=>o.history.length,pushState:(U,O)=>b("push",U,O),replaceState:(U,O)=>b("replace",U,O),back:U=>(U&&(x=!0),C=!0,o.history.back()),forward:U=>{U&&(x=!0),C=!0,o.history.forward()},go:U=>{v=!0,o.history.go(U)},createHref:U=>h(U),flush:M,destroy:()=>{o.history.pushState=r,o.history.replaceState=i,o.removeEventListener(hh,B,{capture:!0}),o.removeEventListener(fh,A)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:u,setBlockers:d,notifyOnIndexChange:!1});return o.addEventListener(hh,B,{capture:!0}),o.addEventListener(fh,A),o.history.pushState=function(...U){const O=r.apply(o.history,U);return L._ignoreSubscribers||I("PUSH"),O},o.history.replaceState=function(...U){const O=i.apply(o.history,U);return L._ignoreSubscribers||I("REPLACE"),O},L}function Ly(e){const o=typeof document<"u"?window:void 0;return gp({window:o,parseLocation:()=>{const r=o.location.hash.split("#").slice(1),i=r[0]??"/",l=o.location.search,u=r.slice(1);return Yo(`${i}${l}${u.length===0?"":`#${u.join("#")}`}`,o.history.state)},createHref:r=>`${o.location.pathname}${o.location.search}#${r}`})}function Ny(e){let o=e.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}function Yo(e,o){const r=Ny(e),i=r.indexOf("#"),l=r.indexOf("?"),u=Bu();return{href:r,pathname:r.substring(0,i>0?l>0?Math.min(i,l):i:l>0?l:r.length),hash:i>-1?r.substring(i):"",search:l>-1?r.slice(l,i===-1?void 0:i):"",state:o||{[Tn]:0,key:u,__TSR_key:u}}}function Bu(){return(Math.random()+1).toString(36).substring(7)}function Ur(e,o){const r=o,i=e;return{fromLocation:r,toLocation:i,pathChanged:(r==null?void 0:r.pathname)!==i.pathname,hrefChanged:(r==null?void 0:r.href)!==i.href,hashChanged:(r==null?void 0:r.hash)!==i.hash}}const Ru=new WeakMap;var Iy=class{constructor(e,o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=r=>r(),this.update=r=>{var y;const i=this.options,l=this.basepath??(i==null?void 0:i.basepath)??"/",u=this.basepath===void 0,d=i==null?void 0:i.rewrite;if(this.options={...i,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=fy(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=gp()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Ko(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=jy(Ty(this.latestLocation),v),qy(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(u||l!==p||d!==m){this.basepath=p;const v=[],w=up(p);w&&w!=="/"&&v.push(Ey({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:Py(v),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((y=window.CSS)==null?void 0:y.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=iy(this.routeTree,this.options.caseSensitive,(i,l)=>{i.init({originalIndex:l})});return this.options.routeMasks&&ty(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,i)=>{const l={eventType:r,fn:i};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>{this.subscribers.forEach(i=>{i.eventType===r.type&&i.fn(r)})},this.parseLocation=(r,i)=>{const l=({pathname:p,search:m,hash:y,href:v,state:w})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const _=this.options.parseSearch(m),M=this.options.stringifySearch(_);return{href:p+M+y,publicHref:p+M+y,pathname:To(p).path,external:!1,searchStr:M,search:er(i==null?void 0:i.search,_),hash:To(y.slice(1)).path,state:nr(i==null?void 0:i.state,w)}}const x=new URL(v,this.origin),C=Cu(this.rewrite,x),R=this.options.parseSearch(C.search),k=this.options.stringifySearch(R);return C.search=k,{href:C.href.replace(C.origin,""),publicHref:v,pathname:To(C.pathname).path,external:!!this.rewrite&&C.origin!==this.origin,searchStr:k,search:er(i==null?void 0:i.search,R),hash:To(C.hash.slice(1)).path,state:nr(i==null?void 0:i.state,w)}},u=l(r),{__tempLocation:d,__tempKey:h}=u.state;if(d&&(!h||h===this.tempLocationKey)){const p=l(d);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(r,i)=>dy({base:r,to:i.includes("//")?Vu(i):i,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,i,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:i},l):this.matchRoutesInternal(r,i),this.getMatchedRoutes=r=>$y({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const i=this.getMatch(r);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{var l;if(this.stores.pendingMatchStores.has(r))return;const i=(l=this.stores.matchStores.get(r))==null?void 0:l.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const i=(u={})=>{var O,Y;const d=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(d);u.from;const p=u.unsafeRelative==="path"?d.pathname:u.from??h.fullPath,m=u.to?`${u.to}`:void 0,y=h.search,v=Object.assign(Object.create(null),h.params),w=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(p,"."),x=m?this.resolvePathWithBase(w,m):w,C=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?v:Object.assign(v,tr(u.params,v)),R=this.routesByPath[nn(x)];let k;if(R)k=this.getRouteBranch(R);else if(x.includes("$"))k=[];else{const K=this.getMatchedRoutes(x);k=K.matchedRoutes,this.options.notFoundRoute&&(!K.foundRoute||K.foundRoute.path!=="/"&&K.routeParams["**"])&&(k=[...k,this.options.notFoundRoute])}if(k.length&&rp(C))for(const K of k){const W=((O=K.options.params)==null?void 0:O.stringify)??K.options.stringifyParams;if(W)try{Object.assign(C,W(C))}catch{}}const _=r.leaveParams?x:To(sh({path:x,params:C,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let M=y;if(r._includeValidateSearch&&((Y=this.options.search)!=null&&Y.strict)){const K={};k.forEach(W=>{if(W.options.validateSearch)try{Object.assign(K,ji(W.options.validateSearch,{...K,...M}))}catch{}}),M=K}M=by({search:M,dest:u,destRoutes:k,_includeValidateSearch:r._includeValidateSearch}),M=er(y,M);const b=this.options.stringifySearch(M),I=u.hash===!0?d.hash:u.hash?tr(u.hash,d.hash):void 0,A=I?`#${I}`:"";let B=u.state===!0?d.state:u.state?tr(u.state,d.state):{};B=nr(d.state,B);const L=`${_}${b}${A}`;let $,V,U=!1;if(this.rewrite){const K=new URL(L,this.origin),W=pp(this.rewrite,K);$=K.href.replace(K.origin,""),W.origin!==this.origin?(V=W.href,U=!0):V=W.pathname+W.search+W.hash}else $=Jv(L),V=$;return{publicHref:V,href:$,pathname:_,search:M,searchStr:b,state:B,hash:I??"",external:U,unmaskOnReload:u.unmaskOnReload}},l=(u={},d)=>{const h=i(u);let p=d?i(d):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=ny(h.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:v,params:w,...x}=y.route,C=w===!1||w===null?Object.create(null):(w??!0)===!0?m:Object.assign(m,tr(w,m));d={from:r.from,...x,params:C},p=i(d)}}}return p&&(h.maskedLocation=p),h};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:i,...l})=>{let u;const d=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{l.state[v]=this.latestLocation.state[v]});const y=or(l.state,this.latestLocation.state);return m.forEach(v=>{delete l.state[v]}),y},h=nn(this.latestLocation.href)===nn(l.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=qr(()=>{p==null||p.resolve(),p=void 0}),h&&d())this.load();else{let{maskedLocation:m,hashScrollIntoView:y,...v}=l;m&&(v={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,u=l.replace?"REPLACE":"PUSH",this.history[u==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:i})}return this._scroll.next=l.resetScroll??!0,this.history.subscribers.size||this.load(u?{action:{type:u}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:i,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:d,href:h,...p}={})=>{if(h){const v=this.history.location.state.__TSR_index,w=Yo(h,{__TSR_index:r?v:v+1}),x=new URL(w.pathname,this.origin);p.to=Cu(this.rewrite,x).pathname,p.search=this.options.parseSearch(w.search),p.hash=w.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:u,replace:r,resetScroll:i,hashScrollIntoView:l,ignoreBlocker:d});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:i,href:l,publicHref:u,...d})=>{var p,m;let h=!1;if(l)try{new URL(`${l}`),h=!0}catch{}if(h&&!i&&(i=!0),i){if(r!==void 0||!l){const v=this.buildLocation({to:r,...d});l=l??v.publicHref,u=u??v.publicHref}const y=!h&&u?u:l;if(Ii(y,this.protocolAllowlist))return Promise.resolve();if(!d.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const w of v)if(w!=null&&w.blockerFn&&await w.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return d.replace?window.location.replace(y):window.location.href=y,Promise.resolve()}return this.buildAndCommitLocation({...d,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(l=>!r.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(i)})},this.load=async r=>{var m;const i=(m=r==null?void 0:r.action)==null?void 0:m.type;let l,u,d;const h=this.stores.resolvedLocation.get()??this.stores.location.get();for(d=new Promise(y=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),i?Ru.set(this.latestLocation,i):Ru.delete(this.latestLocation);const w=this.latestLocation,x=Ur(w,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...x}),this.emit({type:"onBeforeLoad",...x}),await ch({router:this,sync:r==null?void 0:r.sync,forceStaleReload:h.href===w.href,matches:this.stores.pendingMatches.get(),location:w,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var M,b;let C=null,R=null,k=null,_=null;this.batch(()=>{const I=this.stores.pendingMatches.get(),A=I.length,B=this.stores.matches.get();C=A?B.filter(V=>!this.stores.pendingMatchStores.has(V.id)):null;const L=new Set;for(const V of this.stores.pendingMatchStores.values())V.routeId&&L.add(V.routeId);const $=new Set;for(const V of this.stores.matchStores.values())V.routeId&&$.add(V.routeId);R=A?B.filter(V=>!L.has(V.routeId)):null,k=A?I.filter(V=>!$.has(V.routeId)):null,_=A?I.filter(V=>$.has(V.routeId)):B,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),A&&(this.stores.setMatches(I),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...C.filter(V=>V.status!=="error"&&V.status!=="notFound"&&V.status!=="redirected")]),this.clearExpiredCache())});for(const[I,A]of[[R,"onLeave"],[k,"onEnter"],[_,"onStay"]])if(I)for(const B of I)(b=(M=this.looseRoutesById[B.routeId].options)[A])==null||b.call(M,B)})})}})}catch(w){ct(w)?(l=w,this.navigate({...l.options,replace:!0,ignoreBlocker:!0})):et(w)&&(u=w);const x=l?l.status:u?404:this.stores.matches.get().some(C=>C.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(x),this.stores.redirect.set(l)})}this.latestLoadPromise===d&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),y()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(y=>y.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=r=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof i.types=="function"?i.types(Ur(u,d)):i.types;if(h===!1){r();return}l={update:r,types:h}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,i)=>{this.startTransition(()=>{const l=this.stores.pendingMatchStores.get(r);if(l){l.set(i);return}const u=this.stores.matchStores.get(r);if(u){u.set(i);return}const d=this.stores.cachedMatchStores.get(r);if(d){const h=i(d.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):d.set(h)}})},this.getMatch=r=>{var i,l,u;return((i=this.stores.cachedMatchStores.get(r))==null?void 0:i.get())??((l=this.stores.pendingMatchStores.get(r))==null?void 0:l.get())??((u=this.stores.matchStores.get(r))==null?void 0:u.get())},this.invalidate=r=>{const i=l=>{var u;return((u=r==null?void 0:r.filter)==null?void 0:u.call(r,l))??!0?{...l,invalid:!0,...r!=null&&r.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:r==null?void 0:r.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const i=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const l=r.options._builtLocation??this.buildLocation(r.options),u=this.getParsedLocationHref(l);r.options.href=u,r.headers.set("Location",u)}else if(i)try{const l=new URL(i);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;r.options.href=u,r.headers.set("Location",u)}}catch{}if(r.options.href&&!r.options._builtLocation&&Ii(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const i=r==null?void 0:r.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!i(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),i=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const d=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:r-l.updatedAt>=d};this.clearCache({filter:i})},this.loadRouteChunk=Xo,this.preloadRoute=async r=>{const i=r._builtLocation??this.buildLocation(r);let l=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),d=new Set([...u,...this.stores.cachedIds.get()]),h=l.filter(p=>!d.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return l=await ch({router:this,matches:l,location:i,preload:!0,updateMatch:(p,m)=>{u.has(p)?l=l.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),l}catch(p){if(ct(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:i});et(p)||console.error(p);return}},this.matchRoute=(r,i)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(l);if(i!=null&&i.pending&&this.stores.status.get()!=="pending")return!1;const d=((i==null?void 0:i.pending)===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=ry(u.pathname,(i==null?void 0:i.caseSensitive)??!1,(i==null?void 0:i.fuzzy)??!1,d.pathname,this.processedTree);return!h||r.params&&!or(h.rawParams,r.params,{partial:!0})?!1:(i==null?void 0:i.includeSearch)??!0?or(d.search,u.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??my,parseSearch:e.parseSearch??gy,protocolAllowlist:e.protocolAllowlist??Yv}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:o,processedTree:r}){this.routesById=e,this.routesByPath=o,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}getRouteBranch(e){let o=this.routeBranchCache.get(e);return o||(o=lp(e),this.routeBranchCache.set(e,o)),o}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,o){var y,v;const r=this.getMatchedRoutes(e.pathname),{foundRoute:i,routeParams:l}=r;let{matchedRoutes:u}=r,d=!1;(i?i.path!=="/"&&l["**"]:nn(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const h=d?zy(this.options.notFoundMode,u):void 0,p=new Array(u.length),m=new Map;for(const w of this.stores.matchStores.values())w.routeId&&m.set(w.routeId,w.get());for(let w=0;w<u.length;w++){const x=u[w],C=p[w-1];let R,k,_;{const W=(C==null?void 0:C.search)??e.search,pe=(C==null?void 0:C._strictSearch)??void 0;try{const ge=ji(x.options.validateSearch,{...W})??void 0;R={...W,...ge},k={...pe,...ge},_=void 0}catch(ge){let Z=ge;if(ge instanceof Ti||(Z=new Ti(ge.message,{cause:ge})),o!=null&&o.throwOnError)throw Z;R=W,k={},_=Z}}const M=((v=(y=x.options).loaderDeps)==null?void 0:v.call(y,{search:R}))??"",b=M?JSON.stringify(M):"",{interpolatedPath:I,usedParams:A}=sh({path:x.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),B=x.id+I+b,L=this.getMatch(B),$=m.get(x.id),V=(L==null?void 0:L._strictParams)??A;let U;if(!L)try{gh(x,V)}catch(W){if(et(W)||ct(W)?U=W:U=new Fy(W.message,{cause:W}),o!=null&&o.throwOnError)throw U}Object.assign(l,V);const O=$?"stay":"enter";let Y;if(L)Y={...L,cause:O,params:($==null?void 0:$.params)??l,_strictParams:V,search:er($?$.search:L.search,R),_strictSearch:k};else{const W=x.options.loader||x.options.beforeLoad||x.lazyFn||hp(x)?"pending":"success";Y={id:B,ssr:x.options.ssr,index:w,routeId:x.id,params:($==null?void 0:$.params)??l,_strictParams:V,pathname:I,updatedAt:Date.now(),search:$?er($.search,R):R,_strictSearch:k,searchError:void 0,status:W,isFetching:!1,error:void 0,paramsError:U,__routeContext:void 0,_nonReactive:{loadPromise:qr()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:O,loaderDeps:$?nr($.loaderDeps,M):M,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:x.options.staticData||{},fullPath:x.fullPath}}o!=null&&o.preload||(Y.globalNotFound=h===x.id),Y.searchError=_;const K=this.getParentContext(C);Y.context={...K,...Y.__routeContext,...Y.__beforeLoadContext},p[w]=Y}for(let w=0;w<p.length;w++){const x=p[w],C=this.looseRoutesById[x.routeId],R=this.getMatch(x.id),k=m.get(x.routeId);if(x.params=k?er(k.params,l):l,!R){const _=p[w-1],M=this.getParentContext(_);if(C.options.context){const b={deps:x.loaderDeps,params:x.params,context:M??{},location:e,navigate:I=>this.navigate({...I,_fromLocation:e}),buildLocation:this.buildLocation,cause:x.cause,abortController:x.abortController,preload:!!x.preload,matches:p,routeId:C.id};x.__routeContext=C.options.context(b)??void 0}x.context={...M,...x.__routeContext,...x.__beforeLoadContext}}}return p}matchRoutesLightweight(e){var m;const{matchedRoutes:o,routeParams:r}=this.getMatchedRoutes(e.pathname),i=Wo(o),l={...e.search};for(const y of o)try{Object.assign(l,ji(y.options.validateSearch,l))}catch{}const u=Wo(this.stores.matchesId.get()),d=u&&((m=this.stores.matchStores.get(u))==null?void 0:m.get()),h=d&&d.routeId===i.id&&d.pathname===e.pathname;let p;if(h)p=d.params;else{const y=Object.assign(Object.create(null),r);for(const v of o)try{gh(v,y)}catch{}p=y}return{matchedRoutes:o,fullPath:i.fullPath,search:l,params:p}}},Ti=class extends Error{},Fy=class extends Error{};function Ty(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function ji(e,o){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(o);if(r instanceof Promise)throw new Ti("Async validation not supported");if(r.issues)throw new Ti(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(o):typeof e=="function"?e(o):{}}function $y({pathname:e,routesById:o,processedTree:r}){const i=Object.create(null),l=nn(e);let u;const d=oy(l,r,!0);return d&&(u=d.route,Object.assign(i,d.rawParams)),{matchedRoutes:(d==null?void 0:d.branch)||[o.__root__],routeParams:i,foundRoute:u}}function by({search:e,dest:o,destRoutes:r,_includeValidateSearch:i}){return Dy(r)(e,o,i??!1)}function Dy(e){var u;let o,r;const i=[];for(const d of e){const h=d.options;if("search"in h)(u=h.search)!=null&&u.middlewares&&i.push(...h.search.middlewares);else if(h.preSearchFilters||h.postSearchFilters){const m=({search:y,next:v})=>{const w=v(h.preSearchFilters?h.preSearchFilters.reduce((x,C)=>C(x),y):y);return h.postSearchFilters?h.postSearchFilters.reduce((x,C)=>C(x),w):w};i.push(m)}const p=h.validateSearch;if(p){const m=({search:y,next:v,meta:w})=>{const x=v(y);if(r)try{const C=ji(p,x);if(w&&C)for(const R in C)R in x||(w.defaulted||(w.defaulted=new Map)).set(R,C[R]);return{...x,...C}}catch{}return x};i.push(m)}}const l=(d,h,p)=>{if(d>=i.length){if(!o.search)return{};if(o.search===!0)return h;const y=tr(o.search,h);return p&&(p.explicit=y),y}const m=(y,v)=>{if(v){const w=p||{};return{search:l(d+1,y,w),meta:w}}return l(d+1,y,p)};return i[d]({search:h,next:m,meta:p})};return function(h,p,m){return o=p,r=m,l(0,h)}}function zy(e,o){if(e!=="root")for(let r=o.length-1;r>=0;r--){const i=o[r];if(i.children)return i.id}return sr}function gh(e,o){var i;const r=((i=e.options.params)==null?void 0:i.parse)??e.options.parseParams;if(r){const l=r(o);if(l===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,l)}}function Ay(){try{return sessionStorage}catch{return}}const Oy="tsr-scroll-restoration-v1_3",Hr=Ay();function Vy(){try{return JSON.parse((Hr==null?void 0:Hr.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function By(){try{Hr==null||Hr.setItem(Oy,JSON.stringify(Pn))}catch{}}const Pn=Vy(),mh="data-scroll-restoration-id",Uy=e=>e.state.__TSR_key||e.href;function Hy(e){const o=e.getAttribute(mh);if(o)return`[${mh}="${o}"]`;let r="",i=e,l;for(;l=i.parentNode;){let u=1,d=i;for(;d=d.previousElementSibling;)u++;const h=`${i.localName}:nth-child(${u})`;r=r?`${h} > ${r}`:h,i=l}return r}let mi=!1;const Vr="window";function ku(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function vh(e){const o=[];for(const r of e){if(r===Vr)continue;const i=ku(r);i&&o.push(i)}return o}function qy(e,o){const r=e.options.scrollRestoration,i=e._scroll;r&&(i.restoring=!0);const l=e.options.getScrollRestorationKey||Uy,u=new Map,d=(m,y,v)=>{const w=u.get(m)||{};w.scrollX=y,w.scrollY=v,u.set(m,w)},h=m=>{if(!(mi||!i.restoring))if(m.target===document)d(Vr,scrollX,scrollY);else{const y=m.target;d(y,y.scrollLeft,y.scrollTop)}},p=m=>{if(!i.restoring)return;const y=Pn[m]||(Pn[m]={});for(const[v,w]of u)v===Vr?y[Vr]=w:v.isConnected&&(y[Hy(v)]=w)};r&&!i.restoration&&(i.restoration=!0,mi=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h,!0),e.subscribe("onBeforeLoad",m=>{m.fromLocation&&p(l(m.fromLocation)),u.clear()}),addEventListener("pagehide",()=>{p(l(e.stores.resolvedLocation.get()??e.stores.location.get())),By()})),!i.reset&&(i.reset=!0,e.subscribe("onRendered",m=>{var k;const y=e.options.scrollRestorationBehavior,v=e.options.scrollToTopSelectors,w=i.next;let x;if(u.clear(),w||(i.next=!0),typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const C=l(m.toLocation),R=m.fromLocation&&l(m.fromLocation);if(i.restoring&&R&&R!==C){const _=Pn[R];if(_){let M=Pn[C];for(const b in _){if(b===Vr){if(w)continue}else{const I=ku(b);if(!I||w&&v&&(x??(x=vh(v)),x.includes(I)))continue}M||(M=Pn[C]={}),M[b]??(M[b]=_[b])}}}mi=!0;try{const _=m.toLocation.hash,M=m.toLocation.state.__hashScrollIntoViewOptions??!0;let b=!1;if(w){const I=Ru.get(m.toLocation),A=_&&M&&(I==="PUSH"||I==="REPLACE"),B=i.restoring?Pn[C]:void 0;if(B)for(const L in B){const{scrollX:$,scrollY:V}=B[L];if(L===Vr){if(A)continue;scrollTo({top:V,left:$,behavior:y}),b=!0}else{const U=ku(L);U&&(U.scrollLeft=$,U.scrollTop=V)}}if(!b&&!_){const L={top:0,left:0,behavior:y};if(scrollTo(L),v){x??(x=vh(v));for(const $ of x)$.scrollTo(L)}}}!b&&_&&M&&((k=document.getElementById(_))==null||k.scrollIntoView(M))}finally{mi=!1}}))}const Gy="Error preloading route! ☝️";var mp=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=o=>{var p,m;this.originalIndex=o.originalIndex;const r=this.options,i=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),i?this._path=sr:this.parentRoute||rn();let l=i?sr:r==null?void 0:r.path;l&&l!=="/"&&(l=ap(l));const u=(r==null?void 0:r.id)||l;let d=i?sr:Pi([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),d!=="__root__"&&(d=Pi(["/",d]));const h=d==="__root__"?"/":Pi([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=h,this._to=nn(h)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>xy({from:this.fullPath,...o}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Wy=class extends mp{constructor(e){super(e)}};function Uu(e){const o=e.errorComponent??Hu;return g.jsx(Qy,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:i})=>r?z.createElement(o,{error:r,reset:i}):e.children})}var Qy=class extends z.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,o){const r=e.getResetKey();return o.error&&o.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,o){this.props.onCatch&&this.props.onCatch(e,o)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Hu({error:e}){const[o,r]=z.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(i=>!i),children:o?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),o?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function Ky({children:e,fallback:o=null}){return vp()?g.jsx(Go.Fragment,{children:e}):g.jsx(Go.Fragment,{children:o})}function vp(){return Go.useSyncExternalStore(Xy,()=>!0,()=>!1)}function Xy(){return()=>{}}var yp=z.createContext(null);function wt(e){return z.useContext(yp)}var Bi=z.createContext(void 0),Yy=z.createContext(void 0),Ne=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ne||{});function Jy({update:e,notify:o,unwatched:r}){return{link:i,unlink:l,propagate:u,checkDirty:d,shallowPropagate:h};function i(m,y,v){const w=y.depsTail;if(w!==void 0&&w.dep===m)return;const x=w!==void 0?w.nextDep:y.deps;if(x!==void 0&&x.dep===m){x.version=v,y.depsTail=x;return}const C=m.subsTail;if(C!==void 0&&C.version===v&&C.sub===y)return;const R=y.depsTail=m.subsTail={version:v,dep:m,sub:y,prevDep:w,nextDep:x,prevSub:C,nextSub:void 0};x!==void 0&&(x.prevDep=R),w!==void 0?w.nextDep=R:y.deps=R,C!==void 0?C.nextSub=R:m.subs=R}function l(m,y=m.sub){const v=m.dep,w=m.prevDep,x=m.nextDep,C=m.nextSub,R=m.prevSub;return x!==void 0?x.prevDep=w:y.depsTail=w,w!==void 0?w.nextDep=x:y.deps=x,C!==void 0?C.prevSub=R:v.subsTail=R,R!==void 0?R.nextSub=C:(v.subs=C)===void 0&&r(v),x}function u(m){let y=m.nextSub,v;e:do{const w=m.sub;let x=w.flags;if(x&60?x&12?x&4?!(x&48)&&p(m,w)?(w.flags=x|40,x&=1):x=0:w.flags=x&-9|32:x=0:w.flags=x|32,x&2&&o(w),x&1){const C=w.subs;if(C!==void 0){const R=(m=C).nextSub;R!==void 0&&(v={value:y,prev:v},y=R);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function d(m,y){let v,w=0,x=!1;e:do{const C=m.dep,R=C.flags;if(y.flags&16)x=!0;else if((R&17)===17){if(e(C)){const k=C.subs;k.nextSub!==void 0&&h(k),x=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=C.deps,y=C,++w;continue}if(!x){const k=m.nextDep;if(k!==void 0){m=k;continue}}for(;w--;){const k=y.subs,_=k.nextSub!==void 0;if(_?(m=v.value,v=v.prev):m=k,x){if(e(y)){_&&h(k),y=m.sub;continue}x=!1}else y.flags&=-33;y=m.sub;const M=m.nextDep;if(M!==void 0){m=M;continue e}}return x}while(!0)}function h(m){do{const y=m.sub,v=y.flags;(v&48)===32&&(y.flags=v|16,(v&6)===2&&o(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let v=y.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Zy(e,o,r){var u,d,h;const i=typeof e=="object",l=i?e:void 0;return{next:(u=i?e.next:e)==null?void 0:u.bind(l),error:(d=i?e.error:o)==null?void 0:d.bind(l),complete:(h=i?e.complete:r)==null?void 0:h.bind(l)}}const _u=[];let Mi=0;const{link:yh,unlink:ex,propagate:tx,checkDirty:xp,shallowPropagate:xh}=Jy({update(e){return e._update()},notify(e){_u[Pu++]=e,e.flags&=~Ne.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ne.Mutable|Ne.Dirty,$i(e))}});let vi=0,Pu=0,Bt,Eu=0;function wp(e){try{++Eu,e()}finally{--Eu||Sp()}}function $i(e){const o=e.depsTail;let r=o!==void 0?o.nextDep:e.deps;for(;r!==void 0;)r=ex(r,e)}function Sp(){if(!(Eu>0)){for(;vi<Pu;){const e=_u[vi];_u[vi++]=void 0,e.notify()}vi=0,Pu=0}}function wh(e,o){const r=typeof e=="function",i=e,l={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ne.None:Ne.Mutable,get(){return Bt!==void 0&&yh(l,Bt,Mi),l._snapshot},subscribe(u){const d=Zy(u),h={current:!1},p=nx(()=>{var m;l.get(),h.current?(m=d.next)==null||m.call(d,l._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const d=Bt,h=(o==null?void 0:o.compare)??Object.is;if(r)Bt=l,++Mi,l.depsTail=void 0;else if(u===void 0)return!1;r&&(l.flags=Ne.Mutable|Ne.RecursedCheck);try{const p=l._snapshot,m=typeof u=="function"?u(p):u===void 0&&r?i(p):u;return p===void 0||!h(p,m)?(l._snapshot=m,!0):!1}finally{Bt=d,r&&(l.flags&=~Ne.RecursedCheck),$i(l)}}};return r?(l.flags=Ne.Mutable|Ne.Dirty,l.get=function(){const u=l.flags;if(u&Ne.Dirty||u&Ne.Pending&&xp(l.deps,l)){if(l._update()){const d=l.subs;d!==void 0&&xh(d)}}else u&Ne.Pending&&(l.flags=u&~Ne.Pending);return Bt!==void 0&&yh(l,Bt,Mi),l._snapshot}):l.set=function(u){if(l._update(u)){const d=l.subs;d!==void 0&&(tx(d),xh(d),Sp())}},l}function nx(e){const o=()=>{const i=Bt;Bt=r,++Mi,r.depsTail=void 0,r.flags=Ne.Watching|Ne.RecursedCheck;try{return e()}finally{Bt=i,r.flags&=~Ne.RecursedCheck,$i(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ne.Watching|Ne.RecursedCheck,notify(){const i=this.flags;i&Ne.Dirty||i&Ne.Pending&&xp(this.deps,this)?o():this.flags=Ne.Watching},stop(){this.flags=Ne.None,this.depsTail=void 0,$i(this)}};return o(),r}var Ka={exports:{}},Xa={},Ya={exports:{}},Ja={};/**
43
- * @license React
44
- * use-sync-external-store-shim.production.js
45
- *
46
- * Copyright (c) Meta Platforms, Inc. and affiliates.
47
- *
48
- * This source code is licensed under the MIT license found in the
49
- * LICENSE file in the root directory of this source tree.
50
- */var Sh;function rx(){if(Sh)return Ja;Sh=1;var e=ts();function o(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var r=typeof Object.is=="function"?Object.is:o,i=e.useState,l=e.useEffect,u=e.useLayoutEffect,d=e.useDebugValue;function h(v,w){var x=w(),C=i({inst:{value:x,getSnapshot:w}}),R=C[0].inst,k=C[1];return u(function(){R.value=x,R.getSnapshot=w,p(R)&&k({inst:R})},[v,x,w]),l(function(){return p(R)&&k({inst:R}),v(function(){p(R)&&k({inst:R})})},[v]),d(x),x}function p(v){var w=v.getSnapshot;v=v.value;try{var x=w();return!r(v,x)}catch{return!0}}function m(v,w){return w()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Ja.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Ja}var Ch;function ox(){return Ch||(Ch=1,Ya.exports=rx()),Ya.exports}/**
51
- * @license React
52
- * use-sync-external-store-shim/with-selector.production.js
53
- *
54
- * Copyright (c) Meta Platforms, Inc. and affiliates.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE file in the root directory of this source tree.
58
- */var Rh;function sx(){if(Rh)return Xa;Rh=1;var e=ts(),o=ox();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var i=typeof Object.is=="function"?Object.is:r,l=o.useSyncExternalStore,u=e.useRef,d=e.useEffect,h=e.useMemo,p=e.useDebugValue;return Xa.useSyncExternalStoreWithSelector=function(m,y,v,w,x){var C=u(null);if(C.current===null){var R={hasValue:!1,value:null};C.current=R}else R=C.current;C=h(function(){function _(B){if(!M){if(M=!0,b=B,B=w(B),x!==void 0&&R.hasValue){var L=R.value;if(x(L,B))return I=L}return I=B}if(L=I,i(b,B))return L;var $=w(B);return x!==void 0&&x(L,$)?(b=B,L):(b=B,I=$)}var M=!1,b,I,A=v===void 0?null:v;return[function(){return _(y())},A===null?void 0:function(){return _(A())}]},[y,v,w,x]);var k=l(m,C[0],C[1]);return d(function(){R.hasValue=!0,R.value=k},[k]),p(k),k},Xa}var kh;function ix(){return kh||(kh=1,Ka.exports=sx()),Ka.exports}var lx=ix();function ax(e,o){return e===o}function rt(e,o,r=ax){const i=z.useCallback(d=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(d);return h},[e]),l=z.useCallback(()=>e==null?void 0:e.get(),[e]);return lx.useSyncExternalStoreWithSelector(i,l,l,o,r)}var Za={get(){},subscribe(){return{unsubscribe(){}}}};function Cp(e,o){const r=z.useRef();return i=>{const l=e!=null&&e.select?e.select(i):i;return(e==null?void 0:e.structuralSharing)??o.options.defaultStructuralSharing?r.current=nr(r.current,l):l}}function ar(e){const o=wt(),r=z.useContext(e.from?Yy:Bi),i=e.from?o.stores.getRouteMatchStore(e.from):o.stores.matchStores.get(r),l=Cp(e,o),u=rt(i??Za,d=>d?l(d):Za);if(u!==Za)return u;(e.shouldThrow??!0)&&rn()}function Rp(e){return ar({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:o=>e.select?e.select(o.loaderData):o.loaderData})}function kp(e){const{select:o,...r}=e;return ar({...r,select:i=>o?o(i.loaderDeps):i.loaderDeps})}function _p(e){return ar({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:o=>{const r=e.strict===!1?o.params:o._strictParams;return e.select?e.select(r):r}})}function Pp(e){return ar({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:o=>e.select?e.select(o.search):o.search})}function Ep(e){const o=wt();return z.useCallback(r=>o.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,o])}function jp(e){return ar({...e,select:o=>e.select?e.select(o.context):o.context})}var ux=Xh();function cx(e,o){const r=wt(),i=Wv(o),{activeProps:l,inactiveProps:u,activeOptions:d,to:h,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:v,replace:w,startTransition:x,resetScroll:C,viewTransition:R,children:k,target:_,disabled:M,style:b,className:I,onClick:A,onBlur:B,onFocus:L,onMouseEnter:$,onMouseLeave:V,onTouchStart:U,ignoreBlocker:O,params:Y,search:K,hash:W,state:pe,mask:ge,reloadDocument:Z,unsafeRelative:J,from:le,_fromLocation:ee,...N}=e,H=vp(),ue=z.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=rt(r.stores.location,ke=>ke,(ke,qe)=>ke.href===qe.href),re=z.useMemo(()=>{const ke={_fromLocation:ae,...ue};return r.buildLocation(ke)},[r,ae,ue]),ye=re.maskedLocation?re.maskedLocation.publicHref:re.publicHref,Ce=re.maskedLocation?re.maskedLocation.external:re.external,ve=z.useMemo(()=>mx(ye,Ce,r.history,M),[M,Ce,ye,r.history]),xe=z.useMemo(()=>{if(ve!=null&&ve.external)return Ii(ve.href,r.protocolAllowlist)?void 0:ve.href;if(!vx(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),Ii(h,r.protocolAllowlist)?void 0:h}catch{}},[h,ve,r.protocolAllowlist]),be=z.useMemo(()=>{if(xe)return!1;if(d!=null&&d.exact){if(!cy(ae.pathname,re.pathname,r.basepath))return!1}else{const ke=Fi(ae.pathname,r.basepath),qe=Fi(re.pathname,r.basepath);if(!(ke.startsWith(qe)&&(ke.length===qe.length||ke[qe.length]==="/")))return!1}return((d==null?void 0:d.includeSearch)??!0)&&!or(ae.search,re.search,{partial:!(d!=null&&d.exact),ignoreUndefined:!(d!=null&&d.explicitUndefined)})?!1:d!=null&&d.includeHash?H&&ae.hash===re.hash:!0},[d==null?void 0:d.exact,d==null?void 0:d.explicitUndefined,d==null?void 0:d.includeHash,d==null?void 0:d.includeSearch,ae,xe,H,re.hash,re.pathname,re.search,r.basepath]),Ht=be?tr(l,{})??dx:eu,zn=be?eu:tr(u,{})??eu,An=[I,Ht.className,zn.className].filter(Boolean).join(" "),ur=(b||Ht.style||zn.style)&&{...b,...Ht.style,...zn.style},[os,Gr]=z.useState(!1),cr=z.useRef(!1),qt=e.reloadDocument||xe?!1:p??r.options.defaultPreload,On=m??r.options.defaultPreloadDelay??0,ft=z.useCallback(()=>{r.preloadRoute({...ue,_builtLocation:re}).catch(ke=>{console.warn(ke),console.warn(Gy)})},[r,ue,re]);Gv(i,z.useCallback(ke=>{ke!=null&&ke.isIntersecting&&ft()},[ft]),gx,{disabled:!!M||qt!=="viewport"}),z.useEffect(()=>{cr.current||!M&&qt==="render"&&(ft(),cr.current=!0)},[M,ft,qt]);const sn=ke=>{const qe=ke.currentTarget.getAttribute("target"),Et=_!==void 0?_:qe;if(!M&&!yx(ke)&&!ke.defaultPrevented&&(!Et||Et==="_self")&&ke.button===0){ke.preventDefault(),ux.flushSync(()=>{Gr(!0)});const fr=r.subscribe("onResolved",()=>{fr(),Gr(!1)});r.navigate({...ue,replace:w,resetScroll:C,hashScrollIntoView:v,startTransition:x,viewTransition:R,ignoreBlocker:O})}};if(xe)return{...N,ref:i,href:xe,...k&&{children:k},..._&&{target:_},...M&&{disabled:M},...b&&{style:b},...I&&{className:I},...A&&{onClick:A},...B&&{onBlur:B},...L&&{onFocus:L},...$&&{onMouseEnter:$},...V&&{onMouseLeave:V},...U&&{onTouchStart:U}};const dr=ke=>{if(M||qt!=="intent")return;if(!On){ft();return}const qe=ke.currentTarget;if(bo.has(qe))return;const Et=setTimeout(()=>{bo.delete(qe),ft()},On);bo.set(qe,Et)},ss=ke=>{M||qt!=="intent"||ft()},Wr=ke=>{if(M||!qt||!On)return;const qe=ke.currentTarget,Et=bo.get(qe);Et&&(clearTimeout(Et),bo.delete(qe))};return{...N,...Ht,...zn,href:ve==null?void 0:ve.href,ref:i,onClick:Dr([A,sn]),onBlur:Dr([B,Wr]),onFocus:Dr([L,dr]),onMouseEnter:Dr([$,dr]),onMouseLeave:Dr([V,Wr]),onTouchStart:Dr([U,ss]),disabled:!!M,target:_,...ur&&{style:ur},...An&&{className:An},...M&&fx,...be&&hx,...H&&os&&px}}var eu={},dx={className:"active"},fx={role:"link","aria-disabled":!0},hx={"data-status":"active","aria-current":"page"},px={"data-transitioning":"transitioning"},bo=new WeakMap,gx={rootMargin:"100px"},Dr=e=>o=>{for(const r of e)if(r){if(o.defaultPrevented)return;r(o)}};function mx(e,o,r,i){if(!i)return o?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function vx(e){if(typeof e!="string")return!1;const o=e.charCodeAt(0);return o===47?e.charCodeAt(1)!==47:o===46}var qu=z.forwardRef((e,o)=>{const{_asChild:r,...i}=e,{type:l,...u}=cx(i,o),d=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;if(!r){const{disabled:h,...p}=u;return z.createElement("a",p,d)}return z.createElement(r,u,d)});function yx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var xx=class extends mp{constructor(e){super(e),this.useMatch=o=>ar({select:o==null?void 0:o.select,from:this.id,structuralSharing:o==null?void 0:o.structuralSharing}),this.useRouteContext=o=>jp({...o,from:this.id}),this.useSearch=o=>Pp({select:o==null?void 0:o.select,structuralSharing:o==null?void 0:o.structuralSharing,from:this.id}),this.useParams=o=>_p({select:o==null?void 0:o.select,structuralSharing:o==null?void 0:o.structuralSharing,from:this.id}),this.useLoaderDeps=o=>kp({...o,from:this.id}),this.useLoaderData=o=>Rp({...o,from:this.id}),this.useNavigate=()=>Ep({from:this.fullPath}),this.Link=Go.forwardRef((o,r)=>g.jsx(qu,{ref:r,from:this.fullPath,...o}))}};function Mp(e){return new xx(e)}var wx=class extends Wy{constructor(e){super(e),this.useMatch=o=>ar({select:o==null?void 0:o.select,from:this.id,structuralSharing:o==null?void 0:o.structuralSharing}),this.useRouteContext=o=>jp({...o,from:this.id}),this.useSearch=o=>Pp({select:o==null?void 0:o.select,structuralSharing:o==null?void 0:o.structuralSharing,from:this.id}),this.useParams=o=>_p({select:o==null?void 0:o.select,structuralSharing:o==null?void 0:o.structuralSharing,from:this.id}),this.useLoaderDeps=o=>kp({...o,from:this.id}),this.useLoaderData=o=>Rp({...o,from:this.id}),this.useNavigate=()=>Ep({from:this.fullPath}),this.Link=Go.forwardRef((o,r)=>g.jsx(qu,{ref:r,from:this.fullPath,...o}))}};function Sx(e){return new wx(e)}function Cx(e){const o=wt(),r=`not-found-${rt(o.stores.location,i=>i.pathname)}-${rt(o.stores.status,i=>i)}`;return g.jsx(Uu,{getResetKey:()=>r,onCatch:(i,l)=>{var u;if(et(i))(u=e.onCatch)==null||u.call(e,i,l);else throw i},errorComponent:({error:i})=>{var l;if(et(i))return(l=e.fallback)==null?void 0:l.call(e,i);throw i},children:e.children})}function Rx(){return g.jsx("p",{children:"Not Found"})}function Br(e){return g.jsx(g.Fragment,{children:e.children})}function Lp(e,o,r){return o.options.notFoundComponent?g.jsx(o.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...r}):g.jsx(Rx,{})}function kx(e){return null}function _x(){return kx(wt()),null}var Px=(e,o)=>e.routeId===o.routeId&&e._displayPending===o._displayPending,Ex=(e,o)=>e[0]===o[0]&&e[1]===o[1],Np=z.memo(function({matchId:o}){const r=wt(),i=r.stores.matchStores.get(o);i||rn();const l=rt(r.stores.loadedAt,d=>d),u=rt(i,d=>d,Px);return g.jsx(jx,{router:r,matchId:o,resetKey:l,matchState:z.useMemo(()=>{var p;const d=u.routeId,h=(p=r.routesById[d].parentRoute)==null?void 0:p.id;return{routeId:d,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:h}},[u._displayPending,u.routeId,u.ssr,r.routesById])})});function jx({router:e,matchId:o,resetKey:r,matchState:i}){var C,R;const l=e.routesById[i.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,d=u?g.jsx(u,{}):null,h=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??((C=e.options.notFoundRoute)==null?void 0:C.options.component):l.options.notFoundComponent,y=i.ssr===!1||i.ssr==="data-only",v=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(((R=l.options.errorComponent)==null?void 0:R.preload)||y))?z.Suspense:Br,w=h?Uu:Br,x=m?Cx:Br;return g.jsxs(l.isRoot?l.options.shellComponent??Br:Br,{children:[g.jsx(Bi.Provider,{value:o,children:g.jsx(v,{fallback:d,children:g.jsx(w,{getResetKey:()=>r,errorComponent:h||Hu,onCatch:(k,_)=>{if(et(k))throw k.routeId??(k.routeId=i.routeId),k;p==null||p(k,_)},children:g.jsx(x,{fallback:k=>{if(k.routeId??(k.routeId=i.routeId),!m||k.routeId&&k.routeId!==i.routeId||!k.routeId&&!l.isRoot)throw k;return z.createElement(m,k)},children:y||i._displayPending?g.jsx(Ky,{fallback:d,children:g.jsx(_h,{matchId:o})}):g.jsx(_h,{matchId:o})})})})}),i.parentRouteId===sr?g.jsxs(g.Fragment,{children:[g.jsx(Mx,{}),e.options.scrollRestoration&&tp?g.jsx(_x,{}):null]}):null]})}function Mx(){const e=wt(),o=z.useRef();return Vo(()=>{const r=e.stores.resolvedLocation.get(),i=o.current;r&&(!i||i.href!==r.href)&&e.emit({type:"onRendered",...Ur(e.stores.location.get(),i??r)}),o.current=r},[rt(e.stores.resolvedLocation,r=>r==null?void 0:r.state.__TSR_key),e]),null}var _h=z.memo(function({matchId:o}){const r=wt(),i=(y,v)=>{var w;return((w=r.getMatch(y.id))==null?void 0:w._nonReactive[v])??y._nonReactive[v]},l=r.stores.matchStores.get(o);l||rn();const u=rt(l,y=>y),d=u.routeId,h=r.routesById[d],p=z.useMemo(()=>{var v;const y=(v=r.routesById[d].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:v({routeId:d,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[d,u.loaderDeps,u._strictParams,u._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=z.useMemo(()=>{const y=h.options.component??r.options.defaultComponent;return y?g.jsx(y,{},p):g.jsx(Ip,{})},[p,h.options.component,r.options.defaultComponent]);if(u._displayPending)throw i(u,"displayPendingPromise");if(u._forcePending)throw i(u,"minPendingPromise");if(u.status==="pending"){const y=h.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const v=r.getMatch(u.id);if(v&&!v._nonReactive.minPendingPromise){const w=qr();v._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),v._nonReactive.minPendingPromise=void 0},y)}}throw i(u,"loadPromise")}if(u.status==="notFound")return et(u.error)||rn(),Lp(r,h,u.error);if(u.status==="redirected")throw ct(u.error)||rn(),i(u,"loadPromise");if(u.status==="error")throw u.error;return m}),Ip=z.memo(function(){const o=wt(),r=z.useContext(Bi);let i,l=!1,u;{const m=r?o.stores.matchStores.get(r):void 0;[i,l]=rt(m,y=>[y==null?void 0:y.routeId,(y==null?void 0:y.globalNotFound)??!1],Ex),u=rt(o.stores.matchesId,y=>y[y.findIndex(v=>v===r)+1])}const d=i?o.routesById[i]:void 0,h=o.options.defaultPendingComponent?g.jsx(o.options.defaultPendingComponent,{}):null;if(l)return d||rn(),Lp(o,d,void 0);if(!u)return null;const p=g.jsx(Np,{matchId:u});return i===sr?g.jsx(z.Suspense,{fallback:h,children:p}):p});function Lx(){const e=wt(),o=z.useRef({router:e,mounted:!1}),[r,i]=z.useState(!1),l=rt(e.stores.isLoading,v=>v),u=rt(e.stores.hasPending,v=>v),d=Ba(l),h=l||r||u,p=Ba(h),m=l||u,y=Ba(m);return e.startTransition=v=>{i(!0),z.startTransition(()=>{v(),i(!1)})},z.useEffect(()=>{const v=e.history.subscribe(e.load),w=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return nn(e.latestLocation.publicHref)!==nn(w.publicHref)&&e.commitLocation({...w,replace:!0}),()=>{v()}},[e,e.history]),Vo(()=>{if(typeof window<"u"&&e.ssr||o.current.router===e&&o.current.mounted)return;o.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(w){console.error(w)}})()},[e]),Vo(()=>{d&&!l&&e.emit({type:"onLoad",...Ur(e.stores.location.get(),e.stores.resolvedLocation.get())})},[d,e,l]),Vo(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Ur(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),Vo(()=>{if(p&&!h){const v=Ur(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...v}),wp(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[h,p,e]),null}function Nx(){const e=wt(),o=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=o?g.jsx(o,{}):null,i=g.jsxs(typeof document<"u"&&e.ssr?Br:z.Suspense,{fallback:r,children:[g.jsx(Lx,{}),g.jsx(Ix,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:i}):i}function Ix(){const e=wt(),o=rt(e.stores.firstId,l=>l),r=rt(e.stores.loadedAt,l=>l),i=o?g.jsx(Np,{matchId:o}):null;return g.jsx(Bi.Provider,{value:o,children:e.options.disableGlobalCatchBoundary?i:g.jsx(Uu,{getResetKey:()=>r,errorComponent:Hu,onCatch:void 0,children:i})})}var Fx=e=>({createMutableStore:wh,createReadonlyStore:wh,batch:wp}),Tx=e=>new $x(e),$x=class extends Iy{constructor(e){super(e,Fx)}};function bx({router:e,children:o,...r}){rp(r)&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const i=g.jsx(yp.Provider,{value:e,children:o});return e.options.Wrap?g.jsx(e.options.Wrap,{children:i}):i}function Dx({router:e,...o}){return g.jsx(bx,{router:e,...o,children:g.jsx(Nx,{})})}function zx(e){const o=wt({warn:(e==null?void 0:e.router)===void 0}),r=(e==null?void 0:e.router)||o;return rt(r.stores.__store,Cp(e,r))}const Ax={claude:"#6caa71",codex:"#7ccbcd",cursor:"#bd7bcd",copilot:"#dee5eb",pi:"#6d96b4",opencode:"#c4ac62",antigravity:"#b45648",gemini:"#79be7e"};function Ox(e){return Ax[e]??"#8b979c"}const Ph=["#00d7ff","#00d787","#e6b450","#d75f87","#5f87ff","#af87ff","#5fd7a7","#ff8787","#d7af5f","#87d7ff","#d787d7","#9ee493","#ffb454","#7aa2f7","#bb9af7"],Eh=new Map;function Gu(e){const o=Eh.get(e);if(o)return o;let r=0;for(let l=0;l<e.length;l++)r=r*31+e.charCodeAt(l)>>>0;const i=Ph[r%Ph.length];return Eh.set(e,i),i}const l1={input:"#6d96b4",output:"#6caa71",cacheCreate:"#c4ac62",cacheRead:"#7ccbcd"};function on(e){return e.replace(/^claude-/,"").replace(/^gpt-/,"gpt-").replace(/-\d{8}$/,"").replace(/-latest$/,"")}const jn=864e5,ju=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tn=e=>{const[o,r,i]=e.split("-").map(Number);return Date.UTC(o,(r||1)-1,i||1)},Jo=e=>new Date(e).toISOString().slice(0,10),Ho=e=>(new Date(e).getUTCDay()+6)%7,Vx=e=>{const o=tn(e);return Jo(o-Ho(o)*jn)},Bx={period:"all"},Fp=[{key:"7d",label:"7 days"},{key:"30d",label:"30 days"},{key:"90d",label:"90 days"},{key:"mtd",label:"month"},{key:"all",label:"all time"}],Bo=()=>({cost:0,tokens:0,cacheSavings:0,calls:0});function Tp(e,o){if(!o.providers.length)return null;const r=new Set(e.accounts.filter(l=>l.hasUsage).map(l=>l.providerId)),i=o.providers.filter(l=>r.has(l));return i.length?new Set(i):null}function $p(e,o){const r=Tp(e,o);return e.accounts.filter(i=>!(!i.hasUsage||o.account!=="all"&&i.id!==o.account||r&&!r.has(i.providerId)))}function Mu(e){var o,r,i,l,u,d,h,p,m;return!!(e.hasBilling&&((r=(o=e.billing)==null?void 0:o.metrics)!=null&&r.length||(i=e.billing)!=null&&i.plan||(l=e.billing)!=null&&l.error||(h=(d=(u=e.billing)==null?void 0:u.activity)==null?void 0:d.series)!=null&&h.length||(m=(p=e.billing)==null?void 0:p.modelSpend)!=null&&m.length))}function Ux(e,o){const r=Tp(e,o);return e.accounts.filter(i=>!(!i.hasUsage&&!Mu(i)||o.account!=="all"&&i.id!==o.account||r&&!r.has(i.providerId)))}function bp(e){var r;let o=null;for(const i of e)for(const l of((r=i.table)==null?void 0:r.daily)??[])(!o||l.label>o)&&(o=l.label);return o}function Dp(e,o){if(!o||e==="all")return null;if(e==="mtd")return new Date().toISOString().slice(0,7)+"-01";const r=e==="7d"?7:e==="90d"?90:30;return Jo(tn(o)-(r-1)*jn)}function Hx(e,o,r){if(!r||e==="all")return null;const i=Dp(e,r);if(o==="daily")return i;const l=o==="monthly"?365:84,u=Jo(tn(r)-(l-1)*jn);return i&&i<u?i:u}function tu(e,o){var i;const r=(i=e.dashboard)==null?void 0:i[o];return r?{cost:r.cost,tokens:r.tokens,cacheSavings:r.cacheSavings,calls:0}:Bo()}const Li=(e,o,r,i,l)=>{e.cost+=o,e.tokens+=r,e.cacheSavings+=i,e.calls+=l};function qx(){return{totals:Bo(),today:Bo(),week:Bo(),month:Bo(),burnRate:0,timelineMap:new Map,cacheByDay:new Map,provAgg:new Map,modelAgg:new Map,modelTrend:new Map,modelOptionSet:new Set,tokenComposition:{input:0,output:0,cacheCreate:0,cacheRead:0}}}function Gx(e,o){var i;const r=l=>[l.cost,l.tokens,l.cacheSavings,l.calls];Li(e.today,...r(tu(o,"today"))),Li(e.week,...r(tu(o,"week"))),Li(e.month,...r(tu(o,"month"))),e.burnRate+=((i=o.dashboard)==null?void 0:i.burnRate)??0}function Wx(e,o,r,i,l){let u=0,d=0,h=0,p=0;for(const v of o.breakdown){if(e.modelOptionSet.add(v.name),l&&!l.has(v.name))continue;const w=v.input+v.output+v.cacheCreate+v.cacheRead;u+=v.cost,d+=w,h+=v.cacheSavings,p+=v.count,e.tokenComposition.input+=v.input,e.tokenComposition.output+=v.output,e.tokenComposition.cacheCreate+=v.cacheCreate,e.tokenComposition.cacheRead+=v.cacheRead;const x=e.modelAgg.get(v.name)??{cost:0,tokens:0,cacheSavings:0,calls:0};x.cost+=v.cost,x.tokens+=w,x.cacheSavings+=v.cacheSavings,x.calls+=v.count,e.modelAgg.set(v.name,x);let C=e.modelTrend.get(v.name);C||(C=new Map,e.modelTrend.set(v.name,C)),C.set(o.label,(C.get(o.label)??0)+v.cost)}if(l&&p===0&&u===0)return;Li(e.totals,u,d,h,p);const m=e.timelineMap.get(o.label)??{date:o.label,total:0,tokens:0,byProvider:{}};m.total+=u,m.tokens+=d,m.byProvider[r]=(m.byProvider[r]??0)+u,e.timelineMap.set(o.label,m),e.cacheByDay.set(o.label,(e.cacheByDay.get(o.label)??0)+h);const y=e.provAgg.get(r)??{id:r,name:r,color:i,cost:0,tokens:0,calls:0};y.cost+=u,y.tokens+=d,y.calls+=p,e.provAgg.set(r,y)}function Qx(e){return[...e.timelineMap.values()].sort((o,r)=>o.date.localeCompare(r.date))}function Kx(e,o,r){const i=o.map(l=>l.date);return[...e.modelAgg.entries()].map(([l,u])=>{const d=e.modelTrend.get(l);return{model:l,color:Gu(l),cost:u.cost,tokens:u.tokens,cacheSavings:u.cacheSavings,calls:u.calls,share:r>0?u.cost/r:0,tokenShare:e.totals.tokens>0?u.tokens/e.totals.tokens:0,callShare:e.totals.calls>0?u.calls/e.totals.calls:0,trend:i.map(h=>(d==null?void 0:d.get(h))??0)}}).sort((l,u)=>u.cost-l.cost)}function Xx(e,o){var M,b;const r=e?$p(e,o):[],i=bp(r),l=Dp(o.period,i),u=o.models.length?new Set(o.models):null,d=new Map,h=new Map;for(const I of(e==null?void 0:e.providers)??[])d.set(I.id,I.color),h.set(I.id,I.name);const p=qx(),m=I=>!l||I>=l;for(const I of r){Gx(p,I);const A=I.providerId,B=d.get(A)??I.color;for(const L of((M=I.table)==null?void 0:M.daily)??[])m(L.label)&&Wx(p,L,A,B,u)}for(const I of p.provAgg.values()){const A=h.get(I.id);A&&(I.name=A)}const y=Qx(p);let v=0;const w=y.map(I=>(v+=I.total,{date:I.date,total:v})),x=y.map(I=>({date:I.date,value:p.cacheByDay.get(I.date)??0})),C=new Map;for(const I of r)for(const A of((b=I.table)==null?void 0:b.daily)??[]){if(!m(A.label))continue;const B=u?A.breakdown.filter($=>u.has($.name)):A.breakdown;if(u&&B.length===0)continue;let L=C.get(A.label);L||(L={tokens:0,calls:0,cacheSavings:0,models:new Map},C.set(A.label,L));for(const $ of B)L.tokens+=$.input+$.output+$.cacheCreate+$.cacheRead,L.calls+=$.count,L.cacheSavings+=$.cacheSavings,L.models.set($.name,(L.models.get($.name)??0)+$.cost)}const R=y.map(I=>{const A=C.get(I.date);return{date:I.date,cost:I.total,tokens:(A==null?void 0:A.tokens)??0,calls:(A==null?void 0:A.calls)??0,cacheSavings:(A==null?void 0:A.cacheSavings)??0,models:A?[...A.models.entries()].map(([B,L])=>({name:B,cost:L})).sort((B,L)=>L.cost-B.cost):[]}}),k=[...p.provAgg.values()].sort((I,A)=>A.cost-I.cost),_=Kx(p,y,p.totals.cost);return{filteredAccounts:r,totals:p.totals,today:p.today,week:p.week,month:p.month,burnRate:p.burnRate,timeline:y,cumulative:w,cacheSavingsSeries:x,calendar:R,cardAccounts:e?Ux(e,o):[],byProvider:k,byModel:_,tokenComposition:p.tokenComposition,modelOptions:[...p.modelOptionSet].sort(),latestDay:i,rangeStart:l}}function Yx(e){return e.reduce((o,r)=>(o.input+=r.input,o.output+=r.output,o.cacheCreate+=r.cacheCreate,o.cacheRead+=r.cacheRead,o.cacheSavings+=r.cacheSavings,o.cost+=r.cost,o.count+=r.count,o),{input:0,output:0,cacheCreate:0,cacheRead:0,cacheSavings:0,cost:0,count:0})}function Jx(e,o,r){var m;if(!e)return[];const i=$p(e,o),l=bp(i),u=Hx(o.period,r,l),d=u?r==="monthly"?u.slice(0,7):r==="weekly"?Vx(u):u:null,h=o.models.length?new Set(o.models):null,p=new Map;for(const y of i)for(const v of((m=y.table)==null?void 0:m[r])??[]){if(d&&v.label<d)continue;const w=h?v.breakdown.filter(R=>h.has(R.name)):v.breakdown;if(h&&w.length===0)continue;const x=p.get(v.label),C=Yx(w);if(!x)p.set(v.label,{label:v.label,models:w.map(R=>R.name).sort(),...C,total:C.input+C.output+C.cacheCreate+C.cacheRead,breakdown:w.map(R=>({...R}))});else{x.input+=C.input,x.output+=C.output,x.cacheCreate+=C.cacheCreate,x.cacheRead+=C.cacheRead,x.cacheSavings+=C.cacheSavings,x.total+=C.input+C.output+C.cacheCreate+C.cacheRead,x.cost+=C.cost,x.count+=C.count;const R=new Map(x.breakdown.map(k=>[k.name,k]));for(const k of w){const _=R.get(k.name);_?(_.input+=k.input,_.output+=k.output,_.cacheCreate+=k.cacheCreate,_.cacheRead+=k.cacheRead,_.cacheSavings+=k.cacheSavings,_.cost+=k.cost,_.count+=k.count):R.set(k.name,{...k})}x.breakdown=[...R.values()].sort((k,_)=>_.cost-k.cost),x.models=x.breakdown.map(k=>k.name)}}return[...p.values()]}function Ut({children:e,className:o="size-4",...r}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":!0,...r,children:e})}const Zx=e=>g.jsxs(Ut,{...e,children:[g.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),g.jsx("circle",{cx:"12",cy:"13",r:"4"})]}),jh=e=>g.jsx(Ut,{...e,children:g.jsx("path",{d:"M20 6 9 17l-5-5"})}),e0=e=>g.jsxs(Ut,{...e,children:[g.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),g.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),t0=e=>g.jsxs(Ut,{...e,children:[g.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),g.jsx("path",{d:"m7 10 5 5 5-5"}),g.jsx("path",{d:"M12 15V3"})]}),n0=e=>g.jsxs(Ut,{...e,children:[g.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),g.jsx("path",{d:"m16 6-4-4-4 4"}),g.jsx("path",{d:"M12 2v13"})]}),r0=e=>g.jsx(Ut,{...e,children:g.jsx("path",{d:"m6 9 6 6 6-6"})}),o0=e=>g.jsxs(Ut,{...e,children:[g.jsx("circle",{cx:"11",cy:"11",r:"8"}),g.jsx("path",{d:"m21 21-4.3-4.3"})]}),bi=e=>g.jsxs(Ut,{...e,children:[g.jsx("path",{d:"M18 6 6 18"}),g.jsx("path",{d:"m6 6 12 12"})]}),s0=e=>g.jsxs(Ut,{...e,children:[g.jsx("circle",{cx:"12",cy:"12",r:"4"}),g.jsx("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),i0=e=>g.jsx(Ut,{...e,children:g.jsx("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"})});function l0(e,o){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),i=r.createElement("base"),l=r.createElement("a");return r.head.appendChild(i),r.body.appendChild(l),o&&(i.href=o),l.href=e,l.href}const a0=(()=>{let e=0;const o=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${o()}${e}`)})();function $n(e){const o=[];for(let r=0,i=e.length;r<i;r++)o.push(e[r]);return o}let zr=null;function zp(e={}){return zr||(e.includeStyleProperties?(zr=e.includeStyleProperties,zr):(zr=$n(window.getComputedStyle(document.documentElement)),zr))}function Di(e,o){const i=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(o);return i?parseFloat(i.replace("px","")):0}function u0(e){const o=Di(e,"border-left-width"),r=Di(e,"border-right-width");return e.clientWidth+o+r}function c0(e){const o=Di(e,"border-top-width"),r=Di(e,"border-bottom-width");return e.clientHeight+o+r}function Ap(e,o={}){const r=o.width||u0(e),i=o.height||c0(e);return{width:r,height:i}}function d0(){let e,o;try{o=process}catch{}const r=o&&o.env?o.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const vt=16384;function f0(e){(e.width>vt||e.height>vt)&&(e.width>vt&&e.height>vt?e.width>e.height?(e.height*=vt/e.width,e.width=vt):(e.width*=vt/e.height,e.height=vt):e.width>vt?(e.height*=vt/e.width,e.width=vt):(e.width*=vt/e.height,e.height=vt))}function h0(e,o={}){return e.toBlob?new Promise(r=>{e.toBlob(r,o.type?o.type:"image/png",o.quality?o.quality:1)}):new Promise(r=>{const i=window.atob(e.toDataURL(o.type?o.type:void 0,o.quality?o.quality:void 0).split(",")[1]),l=i.length,u=new Uint8Array(l);for(let d=0;d<l;d+=1)u[d]=i.charCodeAt(d);r(new Blob([u],{type:o.type?o.type:"image/png"}))})}function zi(e){return new Promise((o,r)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>o(i))})},i.onerror=r,i.crossOrigin="anonymous",i.decoding="async",i.src=e})}async function p0(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(o=>`data:image/svg+xml;charset=utf-8,${o}`)}async function g0(e,o,r){const i="http://www.w3.org/2000/svg",l=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return l.setAttribute("width",`${o}`),l.setAttribute("height",`${r}`),l.setAttribute("viewBox",`0 0 ${o} ${r}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),l.appendChild(u),u.appendChild(e),p0(l)}const dt=(e,o)=>{if(e instanceof o)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===o.name||dt(r,o)};function m0(e){const o=e.getPropertyValue("content");return`${e.cssText} content: '${o.replace(/'|"/g,"")}';`}function v0(e,o){return zp(o).map(r=>{const i=e.getPropertyValue(r),l=e.getPropertyPriority(r);return`${r}: ${i}${l?" !important":""};`}).join(" ")}function y0(e,o,r,i){const l=`.${e}:${o}`,u=r.cssText?m0(r):v0(r,i);return document.createTextNode(`${l}{${u}}`)}function Mh(e,o,r,i){const l=window.getComputedStyle(e,r),u=l.getPropertyValue("content");if(u===""||u==="none")return;const d=a0();try{o.className=`${o.className} ${d}`}catch{return}const h=document.createElement("style");h.appendChild(y0(d,r,l,i)),o.appendChild(h)}function x0(e,o,r){Mh(e,o,":before",r),Mh(e,o,":after",r)}const Lh="application/font-woff",Nh="image/jpeg",w0={woff:Lh,woff2:Lh,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Nh,jpeg:Nh,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function S0(e){const o=/\.([^./]*?)$/g.exec(e);return o?o[1]:""}function Wu(e){const o=S0(e).toLowerCase();return w0[o]||""}function C0(e){return e.split(/,/)[1]}function Lu(e){return e.search(/^(data:)/)!==-1}function R0(e,o){return`data:${o};base64,${e}`}async function Op(e,o,r){const i=await fetch(e,o);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const l=await i.blob();return new Promise((u,d)=>{const h=new FileReader;h.onerror=d,h.onloadend=()=>{try{u(r({res:i,result:h.result}))}catch(p){d(p)}},h.readAsDataURL(l)})}const nu={};function k0(e,o,r){let i=e.replace(/\?.*/,"");return r&&(i=e),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),o?`[${o}]${i}`:i}async function Qu(e,o,r){const i=k0(e,o,r.includeQueryParams);if(nu[i]!=null)return nu[i];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let l;try{const u=await Op(e,r.fetchRequestInit,({res:d,result:h})=>(o||(o=d.headers.get("Content-Type")||""),C0(h)));l=R0(u,o)}catch(u){l=r.imagePlaceholder||"";let d=`Failed to fetch resource: ${e}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return nu[i]=l,l}async function _0(e){const o=e.toDataURL();return o==="data:,"?e.cloneNode(!1):zi(o)}async function P0(e,o){if(e.currentSrc){const u=document.createElement("canvas"),d=u.getContext("2d");u.width=e.clientWidth,u.height=e.clientHeight,d==null||d.drawImage(e,0,0,u.width,u.height);const h=u.toDataURL();return zi(h)}const r=e.poster,i=Wu(r),l=await Qu(r,i,o);return zi(l)}async function E0(e,o){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await Ui(e.contentDocument.body,o,!0)}catch{}return e.cloneNode(!1)}async function j0(e,o){return dt(e,HTMLCanvasElement)?_0(e):dt(e,HTMLVideoElement)?P0(e,o):dt(e,HTMLIFrameElement)?E0(e,o):e.cloneNode(Vp(e))}const M0=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Vp=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function L0(e,o,r){var i,l;if(Vp(o))return o;let u=[];return M0(e)&&e.assignedNodes?u=$n(e.assignedNodes()):dt(e,HTMLIFrameElement)&&(!((i=e.contentDocument)===null||i===void 0)&&i.body)?u=$n(e.contentDocument.body.childNodes):u=$n(((l=e.shadowRoot)!==null&&l!==void 0?l:e).childNodes),u.length===0||dt(e,HTMLVideoElement)||await u.reduce((d,h)=>d.then(()=>Ui(h,r)).then(p=>{p&&o.appendChild(p)}),Promise.resolve()),o}function N0(e,o,r){const i=o.style;if(!i)return;const l=window.getComputedStyle(e);l.cssText?(i.cssText=l.cssText,i.transformOrigin=l.transformOrigin):zp(r).forEach(u=>{let d=l.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),dt(e,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&o.getAttribute("d")&&(d=`path(${o.getAttribute("d")})`),i.setProperty(u,d,l.getPropertyPriority(u))})}function I0(e,o){dt(e,HTMLTextAreaElement)&&(o.innerHTML=e.value),dt(e,HTMLInputElement)&&o.setAttribute("value",e.value)}function F0(e,o){if(dt(e,HTMLSelectElement)){const i=Array.from(o.children).find(l=>e.value===l.getAttribute("value"));i&&i.setAttribute("selected","")}}function T0(e,o,r){return dt(o,Element)&&(N0(e,o,r),x0(e,o,r),I0(e,o),F0(e,o)),o}async function $0(e,o){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const i={};for(let u=0;u<r.length;u++){const h=r[u].getAttribute("xlink:href");if(h){const p=e.querySelector(h),m=document.querySelector(h);!p&&m&&!i[h]&&(i[h]=await Ui(m,o,!0))}}const l=Object.values(i);if(l.length){const u="http://www.w3.org/1999/xhtml",d=document.createElementNS(u,"svg");d.setAttribute("xmlns",u),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const h=document.createElementNS(u,"defs");d.appendChild(h);for(let p=0;p<l.length;p++)h.appendChild(l[p]);e.appendChild(d)}return e}async function Ui(e,o,r){return!r&&o.filter&&!o.filter(e)?null:Promise.resolve(e).then(i=>j0(i,o)).then(i=>L0(e,i,o)).then(i=>T0(e,i,o)).then(i=>$0(i,o))}const Bp=/url\((['"]?)([^'"]+?)\1\)/g,b0=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,D0=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function z0(e){const o=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${o})(['"]?\\))`,"g")}function A0(e){const o=[];return e.replace(Bp,(r,i,l)=>(o.push(l),r)),o.filter(r=>!Lu(r))}async function O0(e,o,r,i,l){try{const u=r?l0(o,r):o,d=Wu(o);let h;return l||(h=await Qu(u,d,i)),e.replace(z0(o),`$1${h}$3`)}catch{}return e}function V0(e,{preferredFontFormat:o}){return o?e.replace(D0,r=>{for(;;){const[i,,l]=b0.exec(r)||[];if(!l)return"";if(l===o)return`src: ${i};`}}):e}function Up(e){return e.search(Bp)!==-1}async function Hp(e,o,r){if(!Up(e))return e;const i=V0(e,r);return A0(i).reduce((u,d)=>u.then(h=>O0(h,d,o,r)),Promise.resolve(i))}async function Ar(e,o,r){var i;const l=(i=o.style)===null||i===void 0?void 0:i.getPropertyValue(e);if(l){const u=await Hp(l,null,r);return o.style.setProperty(e,u,o.style.getPropertyPriority(e)),!0}return!1}async function B0(e,o){await Ar("background",e,o)||await Ar("background-image",e,o),await Ar("mask",e,o)||await Ar("-webkit-mask",e,o)||await Ar("mask-image",e,o)||await Ar("-webkit-mask-image",e,o)}async function U0(e,o){const r=dt(e,HTMLImageElement);if(!(r&&!Lu(e.src))&&!(dt(e,SVGImageElement)&&!Lu(e.href.baseVal)))return;const i=r?e.src:e.href.baseVal,l=await Qu(i,Wu(i),o);await new Promise((u,d)=>{e.onload=u,e.onerror=o.onImageErrorHandler?(...p)=>{try{u(o.onImageErrorHandler(...p))}catch(m){d(m)}}:d;const h=e;h.decode&&(h.decode=u),h.loading==="lazy"&&(h.loading="eager"),r?(e.srcset="",e.src=l):e.href.baseVal=l})}async function H0(e,o){const i=$n(e.childNodes).map(l=>qp(l,o));await Promise.all(i).then(()=>e)}async function qp(e,o){dt(e,Element)&&(await B0(e,o),await U0(e,o),await H0(e,o))}function q0(e,o){const{style:r}=e;o.backgroundColor&&(r.backgroundColor=o.backgroundColor),o.width&&(r.width=`${o.width}px`),o.height&&(r.height=`${o.height}px`);const i=o.style;return i!=null&&Object.keys(i).forEach(l=>{r[l]=i[l]}),e}const Ih={};async function Fh(e){let o=Ih[e];if(o!=null)return o;const i=await(await fetch(e)).text();return o={url:e,cssText:i},Ih[e]=o,o}async function Th(e,o){let r=e.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(r.match(/url\([^)]+\)/g)||[]).map(async d=>{let h=d.replace(i,"$1");return h.startsWith("https://")||(h=new URL(h,e.url).href),Op(h,o.fetchRequestInit,({result:p})=>(r=r.replace(d,`url(${p})`),[d,p]))});return Promise.all(u).then(()=>r)}function $h(e){if(e==null)return[];const o=[],r=/(\/\*[\s\S]*?\*\/)/gi;let i=e.replace(r,"");const l=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=l.exec(i);if(p===null)break;o.push(p[0])}i=i.replace(l,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",h=new RegExp(d,"gi");for(;;){let p=u.exec(i);if(p===null){if(p=h.exec(i),p===null)break;u.lastIndex=h.lastIndex}else h.lastIndex=u.lastIndex;o.push(p[0])}return o}async function G0(e,o){const r=[],i=[];return e.forEach(l=>{if("cssRules"in l)try{$n(l.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let h=d+1;const p=u.href,m=Fh(p).then(y=>Th(y,o)).then(y=>$h(y).forEach(v=>{try{l.insertRule(v,v.startsWith("@import")?h+=1:l.cssRules.length)}catch(w){console.error("Error inserting rule from remote css",{rule:v,error:w})}})).catch(y=>{console.error("Error loading remote css",y.toString())});i.push(m)}})}catch(u){const d=e.find(h=>h.href==null)||document.styleSheets[0];l.href!=null&&i.push(Fh(l.href).then(h=>Th(h,o)).then(h=>$h(h).forEach(p=>{d.insertRule(p,d.cssRules.length)})).catch(h=>{console.error("Error loading remote stylesheet",h)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(e.forEach(l=>{if("cssRules"in l)try{$n(l.cssRules||[]).forEach(u=>{r.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${l.href}`,u)}}),r))}function W0(e){return e.filter(o=>o.type===CSSRule.FONT_FACE_RULE).filter(o=>Up(o.style.getPropertyValue("src")))}async function Q0(e,o){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=$n(e.ownerDocument.styleSheets),i=await G0(r,o);return W0(i)}function Gp(e){return e.trim().replace(/["']/g,"")}function K0(e){const o=new Set;function r(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{o.add(Gp(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&r(u)})}return r(e),o}async function X0(e,o){const r=await Q0(e,o),i=K0(e);return(await Promise.all(r.filter(u=>i.has(Gp(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return Hp(u.cssText,d,o)}))).join(`
59
- `)}async function Y0(e,o){const r=o.fontEmbedCSS!=null?o.fontEmbedCSS:o.skipFonts?null:await X0(e,o);if(r){const i=document.createElement("style"),l=document.createTextNode(r);i.appendChild(l),e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}}async function J0(e,o={}){const{width:r,height:i}=Ap(e,o),l=await Ui(e,o,!0);return await Y0(l,o),await qp(l,o),q0(l,o),await g0(l,r,i)}async function Wp(e,o={}){const{width:r,height:i}=Ap(e,o),l=await J0(e,o),u=await zi(l),d=document.createElement("canvas"),h=d.getContext("2d"),p=o.pixelRatio||d0(),m=o.canvasWidth||r,y=o.canvasHeight||i;return d.width=m*p,d.height=y*p,o.skipAutoScale||f0(d),d.style.width=`${m}`,d.style.height=`${y}`,o.backgroundColor&&(h.fillStyle=o.backgroundColor,h.fillRect(0,0,d.width,d.height)),h.drawImage(u,0,0,d.width,d.height),d}async function Z0(e,o={}){return(await Wp(e,o)).toDataURL()}async function ew(e,o={}){const r=await Wp(e,o);return await h0(r)}const Qp="#0a0a0a";async function Kp(){try{await document.fonts.ready}catch{}await new Promise(e=>requestAnimationFrame(()=>e(null)))}async function tw(e,o={}){return await Kp(),Z0(e,{pixelRatio:o.pixelRatio??2,backgroundColor:o.backgroundColor??Qp,cacheBust:!0,skipFonts:!1})}function nw(e,o){const r=document.createElement("a");r.href=e,r.download=o,document.body.appendChild(r),r.click(),r.remove()}async function rw(e,o,r){nw(await tw(e,r),o)}async function ow(e,o){try{await Kp();const r=await ew(e,{pixelRatio:(o==null?void 0:o.pixelRatio)??2,backgroundColor:(o==null?void 0:o.backgroundColor)??Qp,cacheBust:!0});return!r||!navigator.clipboard||typeof ClipboardItem>"u"?!1:(await navigator.clipboard.write([new ClipboardItem({"image/png":r})]),!0)}catch{return!1}}function sw(e){const o=new Date,r=i=>String(i).padStart(2,"0");return`tokmon-${e}-${o.getFullYear()}${r(o.getMonth()+1)}${r(o.getDate())}-${r(o.getHours())}${r(o.getMinutes())}.png`}function Pe(e,o={}){if(!Number.isFinite(e))return"$0.00";const r=o.sign&&e>0?"+":"",i=Math.abs(e);return i>=1e5?`${r}$${(e/1e3).toFixed(0)}k`:i>=1e4?`${r}$${(e/1e3).toFixed(1)}k`:i>=1?`${r}$${e.toFixed(2)}`:i>=.01?`${r}$${e.toFixed(3)}`:i===0?"$0.00":`${r}$${e.toFixed(4)}`}function a1(e){if(!Number.isFinite(e))return"$0";const o=Math.abs(e);return o>=1e6?`$${(e/1e6).toFixed(1).replace(/\.0$/,"")}M`:o>=1e3?`$${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:o>=1?`$${Math.round(e)}`:o===0?"$0":`$${e.toFixed(2)}`}function yt(e){if(!Number.isFinite(e)||e===0)return"0";const o=Math.abs(e);return o>=1e9?`${(e/1e9).toFixed(2)}B`:o>=1e6?`${(e/1e6).toFixed(2)}M`:o>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function Dn(e){return Number.isFinite(e)?Math.round(e).toLocaleString("en-US"):"0"}function Xp(e){if(!Number.isFinite(e))return"0";const o=Math.abs(e);return o>=1e6?`${(e/1e6).toFixed(1)}M`:o>=1e4?`${Math.round(e/1e3)}k`:Math.round(e).toLocaleString("en-US")}function Yp(e,o=0){return Number.isFinite(e)?`${(e*100).toFixed(o)}%`:"0%"}function iw(e,o){const r=Math.max(0,Math.round((o-e)/1e3));if(r<2)return"just now";if(r<60)return`${r}s ago`;const i=Math.round(r/60);if(i<60)return`${i}m ago`;const l=Math.round(i/60);return l<24?`${l}h ago`:`${Math.round(l/24)}d ago`}function Zo(e){const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(o)return`${ju[Number(o[2])-1]} ${Number(o[3])}`;const r=/^(\d{4})-(\d{2})$/.exec(e);return r?`${ju[Number(r[2])-1]} ${r[1]}`:e}function Ai({variant:e="footer",version:o}){return e==="corner"?g.jsxs("div",{className:"pointer-events-none absolute bottom-3 right-3 z-10 flex items-center gap-1.5 rounded bg-bg-0/60 px-2 py-1 font-display text-[11px] tracking-wide text-fg-faint backdrop-blur-sm",children:[g.jsx("span",{className:"text-accent",children:"●"})," tokmon"]}):g.jsxs("div",{className:"flex items-center gap-2 font-display text-sm tracking-wide",children:[g.jsx("span",{className:"text-accent",children:"●"}),g.jsx("span",{className:"text-fg-bright",children:"tokmon"}),g.jsxs("span",{className:"text-xs tracking-normal text-fg-faint",children:["github.com/DavidIlie/tokmon",o?` · v${o}`:""]})]})}const bh=e=>e==="all time"?"all time":`last ${e}`,lw=z.forwardRef(function({derived:o,periodLabel:r,tz:i,version:l,opts:u},d){const h=o.byModel.slice(0,5),p=o.totals.cost>0,m=y=>p?y.share:y.tokenShare;return g.jsxs("div",{ref:d,className:"relative flex flex-col",style:{width:1040,height:540,background:"var(--color-bg-0)",backgroundImage:u.glow?"radial-gradient(circle at 50% -10%, color-mix(in oklab, var(--color-accent) 16%, transparent), transparent 55%), radial-gradient(var(--color-line-faint) 1px, transparent 1px)":"radial-gradient(var(--color-line-faint) 1px, transparent 1px)",backgroundSize:u.glow?"100% 100%, 24px 24px":"24px 24px",fontFamily:"var(--font-mono)",color:"var(--color-fg)"},children:[g.jsxs("div",{className:"flex items-baseline gap-2 border-b border-line px-6 py-3.5",children:[g.jsx("span",{className:"font-display text-sm tracking-wide text-accent",children:"tokmon"}),g.jsxs("span",{className:"text-sm text-fg-dim",children:["usage · ",bh(r)]}),g.jsx("span",{className:"ml-auto text-xs text-fg-faint",children:i})]}),g.jsxs("div",{className:"flex flex-1 gap-9 px-9 py-7",children:[g.jsxs("div",{className:"flex w-[300px] shrink-0 flex-col",children:[g.jsx("div",{className:"font-display text-xs uppercase tracking-widest text-fg-faint",children:p?"total spend":"total tokens"}),g.jsx("div",{className:"tnum mt-1 text-cost",style:{fontSize:64,lineHeight:1},children:p?Pe(o.totals.cost):yt(o.totals.tokens)}),g.jsxs("div",{className:"mt-auto flex flex-col gap-3",children:[p?g.jsx(yi,{label:"tokens",value:yt(o.totals.tokens)}):g.jsx(yi,{label:"spend",value:Pe(o.totals.cost)}),g.jsx(yi,{label:"cache saved",value:Pe(o.totals.cacheSavings),className:"text-positive"}),g.jsx(yi,{label:"calls",value:Dn(o.totals.calls)})]})]}),g.jsxs("div",{className:"flex flex-1 flex-col gap-2 border-l border-line pl-9",children:[g.jsxs("div",{className:"font-display text-xs uppercase tracking-widest text-fg-faint",children:["top models · ",bh(r)]}),h.length===0?g.jsx("div",{className:"flex flex-1 items-center text-sm text-fg-faint",children:"no model usage in range"}):h.map(y=>g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"size-2 shrink-0 rounded-[2px]",style:{background:y.color}}),g.jsx("span",{className:"w-28 shrink-0 truncate text-sm text-fg",children:on(y.model)}),g.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-bg-3",children:g.jsx("span",{className:"block h-full rounded-full",style:{width:`${Math.min(100,m(y)*100)}%`,minWidth:2,background:y.color}})}),g.jsx("span",{className:"tnum w-10 shrink-0 text-right text-xs text-fg-faint",children:Yp(m(y))}),g.jsx("span",{className:"tnum w-20 shrink-0 text-right text-sm text-cost",children:p?Pe(y.cost):yt(y.tokens)})]},y.model))]})]}),g.jsx("div",{className:"border-t border-line px-9 pt-3",children:g.jsx(es,{data:o.timeline.map(y=>y.total),color:"var(--color-accent)",className:"text-2xl tracking-tight"})}),g.jsxs("div",{className:"flex items-center justify-between border-t border-line px-9 py-3.5",children:[u.wmPos==="footer"?g.jsx(Ai,{variant:"footer",version:l}):g.jsx("span",{className:"text-xs text-fg-faint",children:"tokmon"}),g.jsx("span",{className:"text-xs text-fg-faint",children:r})]}),u.wmPos==="corner"&&g.jsx(Ai,{variant:"corner"})]})});function yi({label:e,value:o,className:r="text-fg-bright"}){return g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-wide text-fg-faint",children:e}),g.jsx("div",{className:`tnum mt-1 truncate text-xl ${r}`,children:o})]})}const aw=z.forwardRef(function({node:o,title:r,framed:i,wmPos:l},u){const d=z.useRef(null);return z.useEffect(()=>{const h=d.current;if(!h)return;h.innerHTML="";const p=o.cloneNode(!0);return p.querySelectorAll("[data-chrome]").forEach(m=>m.remove()),p.style.width=`${Math.round(o.getBoundingClientRect().width)}px`,p.classList.remove("hover:border-line-2"),h.appendChild(p),()=>{h.innerHTML=""}},[o]),g.jsxs("div",{ref:u,className:"relative",style:{background:"var(--color-bg-0)",backgroundImage:"radial-gradient(var(--color-line-faint) 1px, transparent 1px)",backgroundSize:"24px 24px",padding:i?28:16,fontFamily:"var(--font-mono)"},children:[i&&g.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[g.jsx("span",{className:"font-display text-xs tracking-wide text-accent",children:"tokmon"}),g.jsxs("span",{className:"font-display text-xs uppercase tracking-wider text-fg-dim",children:["/ ",r]})]}),g.jsx("div",{ref:d}),l==="footer"?g.jsx("div",{className:"mt-3 flex justify-end",children:g.jsx(Ai,{variant:"footer"})}):g.jsx(Ai,{variant:"corner"})]})}),uw=600,Dh=360,cw=e=>e==="light"?"#f4f5f5":"#0a0a0a";function dw({source:e,onClose:o}){const r=e.kind==="summary",i=z.useRef(null),l=z.useRef(null),u=z.useRef(null),d=z.useRef(),[h,p]=z.useState(()=>document.documentElement.classList.contains("light")?"light":"dark"),[m,y]=z.useState(r?"footer":"corner"),[v,w]=z.useState("2"),[x,C]=z.useState(!0),[R,k]=z.useState(!0),[_,M]=z.useState({w:r?1040:700,h:r?540:360}),[b,I]=z.useState(null);z.useEffect(()=>{var K;const O=document.activeElement;(K=l.current)==null||K.focus();const Y=W=>{if(W.key==="Escape"){o();return}if(W.key!=="Tab"||!u.current)return;const pe=u.current.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');if(pe.length===0)return;const ge=pe[0],Z=pe[pe.length-1];W.shiftKey&&document.activeElement===ge?(W.preventDefault(),Z.focus()):!W.shiftKey&&document.activeElement===Z&&(W.preventDefault(),ge.focus())};return document.addEventListener("keydown",Y),()=>{var W;document.removeEventListener("keydown",Y),(W=O==null?void 0:O.focus)==null||W.call(O)}},[o]),z.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const A=O=>{I(O),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>I(null),1600)};z.useEffect(()=>{const O=i.current;if(!O)return;const Y=()=>M({w:O.offsetWidth||_.w,h:O.offsetHeight||_.h});Y();const K=new ResizeObserver(Y);K.observe(O);const W=setTimeout(Y,80);return()=>{K.disconnect(),clearTimeout(W)}},[e,R,m,h,x]);const B=Math.min(uw/_.w,Dh/_.h,1),L={pixelRatio:Number(v),backgroundColor:cw(h)},$=sw(r?"summary":e.captureName),V=async()=>{i.current&&(await rw(i.current,$,L),A("dl"))},U=async()=>{i.current&&A(await ow(i.current,L)?"copy":"fail")};return g.jsx("div",{className:"dialog-fade fixed inset-0 z-[60] flex items-center justify-center bg-bg-0/70 p-4 backdrop-blur-sm",onMouseDown:O=>{O.target===O.currentTarget&&o()},role:"dialog","aria-modal":"true","aria-label":"Share",children:g.jsxs("div",{ref:u,className:"dialog-pop relative flex max-h-[88vh] w-full max-w-[720px] flex-col overflow-hidden rounded-md border border-line-2 bg-bg-1",children:[g.jsx("div",{className:"pointer-events-none absolute left-3 top-2 font-display text-[11px] uppercase tracking-wider text-fg-dim",children:"share"}),g.jsx("button",{type:"button",onClick:o,"aria-label":"Close",className:"absolute right-2 top-2 z-10 rounded p-1 text-fg-faint transition hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",children:g.jsx(bi,{className:"size-4"})}),g.jsx("div",{className:"flex items-center justify-center bg-bg-0 px-6 pb-5 pt-9",style:{minHeight:Dh+24},children:g.jsx("div",{className:"overflow-hidden rounded",style:{width:_.w*B,height:_.h*B},children:g.jsx("div",{style:{width:_.w,height:_.h,transform:`scale(${B})`,transformOrigin:"top left"},children:g.jsx("div",{className:h==="light"?"light":"dark",children:r?g.jsx(lw,{ref:i,derived:e.derived,periodLabel:e.periodLabel,tz:e.tz,version:e.version,opts:{glow:x,wmPos:m}}):g.jsx(aw,{ref:i,node:e.node,title:e.captureName,framed:R,wmPos:m})})})})}),g.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-line px-4 py-3 text-[11px]",children:[g.jsx(zo,{label:"theme",children:g.jsx(Mn,{size:"xs",containerClassName:Do,ariaLabel:"export theme",options:[{value:"dark",label:"dark"},{value:"light",label:"light"}],value:h,onChange:p})}),g.jsx(zo,{label:"mark",children:g.jsx(Mn,{size:"xs",containerClassName:Do,ariaLabel:"watermark position",options:[{value:"footer",label:"footer"},{value:"corner",label:"corner"}],value:m,onChange:y})}),r?g.jsx(zo,{label:"glow",children:g.jsx(Mn,{size:"xs",containerClassName:Do,ariaLabel:"accent glow",options:[{value:"on",label:"on"},{value:"off",label:"off"}],value:x?"on":"off",onChange:O=>C(O==="on")})}):g.jsx(zo,{label:"frame",children:g.jsx(Mn,{size:"xs",containerClassName:Do,ariaLabel:"frame",options:[{value:"framed",label:"framed"},{value:"bare",label:"bare"}],value:R?"framed":"bare",onChange:O=>k(O==="framed")})}),g.jsx(zo,{label:"scale",children:g.jsx(Mn,{size:"xs",containerClassName:Do,ariaLabel:"export scale",options:[{value:"1",label:"1x"},{value:"2",label:"2x"},{value:"3",label:"3x"}],value:v,onChange:w})}),g.jsxs("span",{className:"ml-auto tnum text-fg-faint",children:[_.w," × ",_.h," · ",v,"x"]})]}),g.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-line px-4 py-3",children:[g.jsxs("button",{type:"button",onClick:U,className:"flex items-center gap-1.5 rounded border border-line bg-bg-1 px-3 py-1.5 text-xs text-fg-dim transition hover:border-line-2 hover:text-fg active:scale-[0.97] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",children:[b==="copy"?g.jsx(jh,{className:"size-3.5 text-positive"}):b==="fail"?g.jsx(bi,{className:"size-3.5 text-warning"}):g.jsx(e0,{className:"size-3.5"})," ",b==="copy"?"copied":b==="fail"?"copy failed":"copy"]}),g.jsxs("button",{type:"button",ref:l,onClick:V,className:"flex items-center gap-1.5 rounded border border-accent/60 bg-bg-1 px-3 py-1.5 text-xs text-accent transition hover:bg-bg-2 active:scale-[0.97] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",children:[b==="dl"?g.jsx(jh,{className:"size-3.5 text-positive"}):g.jsx(t0,{className:"size-3.5"})," download PNG"]})]})]})})}const Do="flex items-center overflow-hidden rounded border border-line text-[10px]";function zo({label:e,children:o}){return g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-fg-faint",children:e}),o]})}const Jp=z.createContext(()=>{}),Zp=()=>z.useContext(Jp);function fw({children:e}){const[o,r]=z.useState(null);return g.jsxs(Jp.Provider,{value:r,children:[e,o&&g.jsx(dw,{source:o,onClose:()=>r(null)})]})}function Hi({title:e,titleTag:o,right:r,captureName:i,children:l,className:u="",bodyClassName:d=""}){const h=z.useRef(null);return g.jsxs("section",{ref:h,className:`group relative rounded-md border border-line bg-bg-1/80 transition-colors hover:border-line-2 ${u}`,children:[e&&g.jsxs("div",{className:"pointer-events-none absolute -top-[7px] left-3 flex items-center gap-2 bg-bg-1 px-1.5",children:[g.jsx("span",{className:"font-display text-[11px] uppercase tracking-wider text-fg-dim",children:e}),o!=null&&g.jsx("span",{className:"text-[10px] normal-case tracking-normal text-fg-faint",children:o})]}),r&&g.jsx("div",{"data-chrome":!0,className:"absolute right-2 top-2 z-20 flex items-center gap-1.5 rounded bg-bg-1 px-0.5",children:r}),i&&g.jsx("div",{"data-chrome":!0,className:"absolute -top-[11px] right-3 z-20",children:g.jsx(hw,{getNode:()=>h.current,name:i})}),g.jsx("div",{className:`p-4 ${d}`,children:l})]})}function hw({getNode:e,name:o}){const r=Zp();return g.jsx("button",{type:"button",title:"Share this panel","aria-label":"Share this panel as an image",onClick:()=>{const i=e();i&&r({kind:"panel",node:i,captureName:o})},className:"rounded border border-transparent bg-bg-1 p-1 text-fg-faint opacity-0 transition hover:border-line hover:text-accent group-hover:opacity-100 focus-visible:opacity-100",children:g.jsx(Zx,{className:"size-3.5"})})}const ru=["▁","▂","▃","▄","▅","▆","▇","█"];function es({data:e,color:o="var(--color-accent)",className:r=""}){const i=ru.length-1,l=Math.max(...e,0),u=Math.min(...e,0),d=l>0&&u===l;return g.jsx("span",{className:`font-mono leading-none ${r}`,style:{color:o},"aria-hidden":!0,children:e.length===0?"·":d?ru[Math.floor(i/2)].repeat(e.length):e.map(h=>ru[l<=0?0:Math.max(0,Math.min(i,Math.floor(h/l*(i+.999))))]).join("")})}function xi({label:e,value:o,sub:r,valueClass:i="text-fg-bright"}){return g.jsxs("div",{children:[g.jsx("div",{className:"font-display text-[10px] uppercase tracking-wide text-fg-faint",children:e}),g.jsx("div",{className:`tnum mt-1 text-xl ${i}`,children:o}),r!=null&&g.jsx("div",{className:"mt-0.5 text-xs text-fg-dim",children:r})]})}function pw({children:e}){return g.jsx("div",{className:"flex h-full min-h-24 items-center justify-center text-center text-xs text-fg-faint",children:e})}const Ku="focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent";function Mn({options:e,value:o,onChange:r,size:i="sm",btnClassName:l,containerClassName:u,ariaLabel:d}){const h="flex items-center overflow-hidden rounded border border-line",p=i==="xs"?"px-1.5 py-0.5 text-[10px] transition max-sm:py-1.5":"px-2 py-1 text-xs transition max-sm:py-2",m=i==="xs"?"bg-bg-3 text-accent":"bg-bg-2 text-accent",y=i==="xs"?"text-fg-faint hover:text-fg":"text-fg-dim hover:text-fg";return g.jsx("div",{className:u??h,role:"group","aria-label":d,children:e.map(v=>g.jsx("button",{type:"button","aria-pressed":o===v.value,onClick:()=>r(v.value),className:`${l??p} ${Ku} ${o===v.value?m:y}`,children:v.label},String(v.value)))})}function zh({label:e,value:o,children:r}){const[i,l]=z.useState(!1),u=z.useRef(null);return z.useEffect(()=>{if(!i)return;const d=p=>{u.current&&!u.current.contains(p.target)&&l(!1)},h=p=>{p.key==="Escape"&&l(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",h)}},[i]),g.jsxs("div",{ref:u,className:"relative",children:[g.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":i,onClick:()=>l(d=>!d),className:`flex items-center gap-1.5 rounded border border-line bg-bg-1 px-2 py-1 text-xs text-fg-dim transition hover:border-line-2 hover:text-fg max-sm:py-2 ${Ku}`,children:[g.jsxs("span",{className:"text-fg-faint",children:[e,":"]}),g.jsx("span",{className:"text-fg",children:o}),g.jsx(r0,{className:`size-3 transition ${i?"rotate-180":""}`})]}),i&&g.jsx("div",{role:"menu",className:"absolute right-0 z-50 mt-1 min-w-44 max-w-[calc(100vw-2.5rem)] rounded-md border border-line-2 bg-bg-2 p-1 shadow-xl",children:r(()=>l(!1))})]})}function Ah({children:e}){return g.jsx("div",{className:"flex flex-col",children:e})}function wi({active:e,onClick:o,children:r}){return g.jsx("button",{type:"button",role:"menuitem",onClick:o,className:`flex min-w-0 items-center gap-2 rounded px-2 py-1 text-left text-xs transition ${Ku} ${e?"bg-bg-3 text-fg-bright":"text-fg-dim hover:bg-bg-3 hover:text-fg"}`,children:r})}function gw({snapshot:e,derived:o,filters:r,setFilters:i}){const l=(e==null?void 0:e.providers)??[],d=((e==null?void 0:e.accounts)??[]).filter(_=>_.hasUsage),h=new Set(d.map(_=>_.providerId)),p=l.filter(_=>h.has(_.id)),m=new Set(o.cardAccounts.map(_=>_.providerId)),y=l.filter(_=>!h.has(_.id)&&m.has(_.id)),v=r.providers.length?d.filter(_=>r.providers.includes(_.providerId)):d,w=_=>{var M;return((M=l.find(b=>b.id===_))==null?void 0:M.name)??_},x=_=>_.name&&_.name!==w(_.providerId)?`${w(_.providerId)} · ${_.name}`:w(_.providerId),C=d.find(_=>_.id===r.account),R=_=>i(M=>{const b=M.providers.includes(_);return{...M,providers:b?M.providers.filter(I=>I!==_):[...M.providers,_]}}),k=r.providers.length>0||r.models.length>0||r.account!=="all";return g.jsx("div",{className:"border-t border-line bg-bg-0/70",children:g.jsxs("div",{className:"mx-auto flex max-w-[1600px] flex-wrap items-center gap-x-4 gap-y-2 px-5 py-2.5 2xl:max-w-[1920px]",children:[g.jsx("span",{className:"hidden text-xs text-fg-faint sm:inline",children:"filter:"}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[p.map(_=>{const M=r.providers.includes(_.id),b=r.providers.length>0&&!M;return g.jsxs("button",{type:"button","aria-pressed":M,onClick:()=>R(_.id),className:"flex items-center gap-1.5 rounded border px-2 py-0.5 text-xs transition focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent max-sm:py-1.5",style:{borderColor:M?_.color:"var(--color-line)",color:b?"var(--color-fg-faint)":M?_.color:"var(--color-fg-dim)",background:M?"var(--color-bg-2)":"transparent"},title:M?`hide ${_.name}`:r.providers.length?`add ${_.name}`:`show only ${_.name}`,children:[g.jsx("span",{style:{color:_.color,opacity:b?.4:1},"aria-hidden":!0,children:M?"●":"○"}),_.name]},_.id)}),y.length>0&&g.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-fg-faint",title:"Billing-only providers — shown as cards with plan & quota; no usage timeline to filter",children:[p.length>0&&g.jsx("span",{className:"text-line-2",children:"|"}),g.jsx("span",{children:"billing-only:"}),y.map(_=>g.jsxs("span",{className:"flex items-center gap-1 text-fg-dim",children:[g.jsx("span",{style:{color:_.color,opacity:.55},"aria-hidden":!0,children:"·"}),_.name]},_.id))]})]}),g.jsxs("div",{className:"flex w-full flex-wrap items-center gap-2 md:ml-auto md:w-auto",children:[v.length>1?g.jsx(zh,{label:"account",value:r.account==="all"?"all":C?x(C):"all",children:_=>g.jsxs(Ah,{children:[g.jsx(wi,{active:r.account==="all",onClick:()=>{i(M=>({...M,account:"all"})),_()},children:"All accounts"}),g.jsx("div",{className:"my-1 h-px bg-line"}),g.jsx("div",{className:"max-h-64 overflow-y-auto",children:v.map(M=>g.jsxs(wi,{active:r.account===M.id,onClick:()=>{i(b=>({...b,account:M.id})),_()},children:[g.jsx("span",{style:{color:M.color},"aria-hidden":!0,children:"●"})," ",g.jsx("span",{className:"truncate",children:x(M)})]},M.id))})]})}):v.length===1?g.jsxs("span",{className:"rounded border border-line bg-bg-1 px-2 py-1 text-xs text-fg-dim",children:["account: ",g.jsx("span",{className:"text-fg",children:x(v[0])})]}):null,g.jsx(zh,{label:"model",value:r.models.length===0?"all":r.models.length===1?on(r.models[0]):`${r.models.length} models`,children:()=>g.jsxs(Ah,{children:[g.jsx(wi,{active:r.models.length===0,onClick:()=>i(_=>({..._,models:[]})),children:"All models"}),g.jsx("div",{className:"my-1 h-px bg-line"}),g.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[o.modelOptions.length===0&&g.jsx("div",{className:"px-2 py-1 text-xs text-fg-faint",children:"no models in range"}),o.modelOptions.map(_=>{const M=r.models.includes(_);return g.jsxs(wi,{active:M,onClick:()=>i(b=>({...b,models:M?b.models.filter(I=>I!==_):[...b.models,_]})),children:[g.jsx("span",{className:M?"text-accent":"text-fg-faint","aria-hidden":!0,children:M?"◉":"○"})," ",on(_)]},_)})]})]})}),g.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[g.jsx("span",{className:"text-xs text-fg-faint",children:"range:"}),g.jsx(Mn,{options:Fp.map(_=>({value:_.key,label:_.key==="mtd"?"MTD":_.key==="all"?"ALL":_.key})),value:r.period,onChange:_=>i(M=>({...M,period:_})),size:"sm",ariaLabel:"time range"})]}),k&&g.jsxs("button",{type:"button",onClick:()=>i(_=>({..._,providers:[],models:[],account:"all"})),className:"flex items-center gap-1 rounded border border-line bg-bg-1 px-2 py-1 text-xs text-fg-faint transition hover:border-warning/60 hover:text-warning focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",title:"Clear provider, model & account filters","aria-label":"Clear provider, model and account filters",children:[g.jsx(bi,{className:"size-3","aria-hidden":!0})," clear"]})]})]})})}function mw({derived:e,periodLabel:o,tz:r,version:i}){const l=Zp();return g.jsxs("button",{type:"button",onClick:()=>l({kind:"summary",derived:e,periodLabel:o,tz:r,version:i}),className:"flex items-center gap-1.5 rounded border border-line bg-bg-1 px-2.5 py-1 text-xs text-fg-dim transition hover:border-accent/60 hover:text-accent active:scale-[0.97] max-sm:py-2",title:"Create a shareable image",children:[g.jsx(n0,{className:"size-3.5"}),g.jsx("span",{children:"share"})]})}const vw="modulepreload",yw=function(e,o){return new URL(e,o).href},Oh={},eg=function(o,r,i){let l=Promise.resolve();if(r&&r.length>0){let d=function(y){return Promise.all(y.map(v=>Promise.resolve(v).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const h=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),m=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));l=d(r.map(y=>{if(y=yw(y,i),y in Oh)return;Oh[y]=!0;const v=y.endsWith(".css"),w=v?'[rel="stylesheet"]':"";if(!!i)for(let R=h.length-1;R>=0;R--){const k=h[R];if(k.href===y&&(!v||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${w}`))return;const C=document.createElement("link");if(C.rel=v?"stylesheet":vw,v||(C.as="script"),C.crossOrigin="",C.href=y,m&&C.setAttribute("nonce",m),document.head.appendChild(C),v)return new Promise((R,k)=>{C.addEventListener("load",R),C.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${y}`)))})}))}function u(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&u(h.reason);return o().catch(u)})};function xw({derived:e,periodLabel:o}){const r=e.totals,i=e.timeline.map(d=>d.total).slice(-30),l=e.timeline.map(d=>d.tokens).slice(-30),u=e.cacheSavingsSeries.map(d=>d.value).slice(-30);return g.jsxs("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-3",children:[g.jsx(Ao,{label:`spend · ${o}`,value:Pe(r.cost),accent:"text-cost",spark:i,sparkColor:"var(--color-cost)"}),g.jsx(Ao,{label:"tokens",value:yt(r.tokens),spark:l,sparkColor:"var(--color-fg-dim)"}),g.jsx(Ao,{label:"cache saved",value:Pe(r.cacheSavings),accent:"text-positive",spark:u,sparkColor:"var(--color-positive)"}),g.jsx(Ao,{label:"calls",value:Dn(r.calls)}),g.jsx(Ao,{label:"burn · today",value:`${Pe(e.burnRate)}/hr`,accent:"text-warning"})]})}function Ao({label:e,value:o,accent:r="text-fg-bright",spark:i,sparkColor:l}){return g.jsxs("div",{className:"rise flex min-w-0 flex-col rounded-md border border-line bg-bg-1/80 p-3.5 transition-colors hover:border-line-2",children:[g.jsx("div",{className:"font-display text-[10px] uppercase tracking-wide text-fg-faint",children:e}),g.jsx("div",{className:`tnum mt-1.5 text-xl sm:text-2xl ${r}`,children:o}),i&&i.length>1&&g.jsx("div",{className:"mt-auto overflow-hidden pt-2 text-right",children:g.jsx(es,{data:i,color:l??"currentColor",className:"text-sm opacity-70"})})]})}function ww({accounts:e,nameOf:o}){return e.length===0?g.jsx(Hi,{title:"accounts",children:g.jsx("div",{className:"py-6 text-center text-xs text-fg-faint",children:"no accounts match the current filter"})}):g.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-[repeat(auto-fit,minmax(min(340px,100%),1fr))]",children:e.map((r,i)=>g.jsx(Sw,{account:r,index:i,providerName:o(r.providerId)},r.id))})}function Sw({account:e,index:o,providerName:r}){var m,y,v,w,x,C;const i=e.dashboard,l=((m=e.billing)==null?void 0:m.metrics)??[],u=((y=e.billing)==null?void 0:y.modelSpend)??[],d=(v=e.billing)==null?void 0:v.activity,h=Ox(e.providerId),p=e.name&&e.name!==r;return g.jsxs("div",{className:"rise group relative overflow-hidden rounded-md border bg-bg-1/50 p-4 transition-colors",style:{animationDelay:`${o*40}ms`,borderColor:`color-mix(in oklab, ${h} 50%, var(--color-line))`},children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{style:{color:h},children:"●"}),g.jsx("span",{className:"font-display text-sm tracking-wide text-fg-bright",children:r}),p&&g.jsxs("span",{className:"truncate text-xs text-fg-faint",children:["· ",e.name]})]}),((w=e.billing)==null?void 0:w.plan)&&g.jsx("span",{className:"shrink-0 rounded border border-line px-1.5 py-0.5 text-[10px] text-fg-dim",children:e.billing.plan})]}),i&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-2",children:[g.jsx(ou,{label:"today",cost:i.today.cost,tokens:i.today.tokens}),g.jsx(ou,{label:"week",cost:i.week.cost,tokens:i.week.tokens}),g.jsx(ou,{label:"month",cost:i.month.cost,tokens:i.month.tokens})]}),g.jsxs("div",{className:"mt-3 flex items-center justify-between border-t border-line-faint pt-3 text-xs",children:[g.jsxs("span",{className:"text-fg-dim",children:["burn ",g.jsxs("span",{className:"tnum text-warning",children:[Pe(i.burnRate),"/hr"]})]}),g.jsxs("span",{className:"text-fg-dim",children:["saved ",g.jsx("span",{className:"tnum text-positive",children:Pe(i.month.cacheSavings)})]})]})]}),l.length>0&&g.jsx("div",{className:`flex flex-col gap-2 ${i?"mt-3 border-t border-line-faint pt-3":"mt-4"}`,children:l.slice(0,8).map(R=>g.jsx(Rw,{metric:R},R.label))}),u.length>0&&g.jsxs("div",{className:"mt-3 flex flex-col gap-1 border-t border-line-faint pt-3",children:[g.jsx("div",{className:"text-[10px] uppercase tracking-wide text-fg-faint",children:"spend by model"}),u.slice(0,4).map(R=>g.jsxs("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[g.jsx("span",{className:"min-w-0 truncate text-fg-dim",children:on(R.name)}),g.jsxs("span",{className:"tnum shrink-0 text-cost",children:[Pe(R.usd),g.jsxs("span",{className:"ml-1.5 text-fg-faint",children:[Dn(R.requests)," req"]})]})]},R.name))]}),i&&i.series.length>0&&g.jsxs("div",{className:"mt-3 flex items-center gap-2 border-t border-line-faint pt-3",children:[g.jsx(es,{data:i.series,color:h,className:"text-sm"}),g.jsxs("span",{className:"ml-auto text-[10px] text-fg-faint",children:[i.series.length,"d"]})]}),!i&&d&&d.series.length>0&&g.jsxs("div",{className:"mt-3 flex items-center gap-2 border-t border-line-faint pt-3",children:[g.jsx(es,{data:d.series,color:h,className:"text-sm"}),g.jsx("span",{className:"ml-auto text-[10px] text-fg-faint",children:d.summary})]}),l.length===0&&((x=e.billing)==null?void 0:x.error)&&g.jsxs("div",{className:`flex items-start gap-1.5 text-xs text-warning ${i?"mt-3 border-t border-line-faint pt-3":"mt-4"}`,children:[g.jsx("span",{"aria-hidden":!0,children:"⚠"}),g.jsx("span",{children:e.billing.error})]}),!i&&l.length===0&&!((C=e.billing)!=null&&C.error)&&u.length===0&&!(d&&d.series.length)&&g.jsx("div",{className:"py-6 text-center text-xs text-fg-faint",children:e.hasUsage?"no usage data":"billing-only · no live metrics"})]})}function ou({label:e,cost:o,tokens:r}){const i=o>0||r===0;return g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] uppercase text-fg-faint",children:e}),g.jsx("div",{className:`tnum text-sm ${i?"text-cost":"text-fg-bright"}`,children:i?Pe(o):yt(r)}),g.jsx("div",{className:"tnum text-[10px] text-fg-faint",children:i?yt(r):Pe(o)})]})}function Cw(e){return e.format.kind==="dollars"?Pe(e.used):e.format.kind==="count"?`${Dn(e.used)}${e.format.suffix?" "+e.format.suffix:""}`:`${Math.round(e.used)}%`}function Rw({metric:e}){const o=e.format.kind==="percent"?Math.min(1,Math.max(0,e.used/100)):e.limit!=null&&e.limit>0?Math.min(1,Math.max(0,e.used/e.limit)):null,r=o==null?"var(--color-accent)":o>=.9?"var(--color-warning)":o>=.7?"var(--color-cost)":"var(--color-positive)";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[g.jsx("span",{className:"truncate text-fg-dim",children:e.label}),g.jsxs("span",{className:"tnum text-fg",children:[Cw(e),e.format.kind!=="percent"&&e.limit!=null&&g.jsxs("span",{className:"text-fg-faint",children:[" / ",e.format.kind==="dollars"?Pe(e.limit):Dn(e.limit)]}),e.resetsAt&&g.jsxs("span",{className:"ml-1.5 text-fg-faint",children:["· ",e.resetsAt]})]})]}),o!=null&&g.jsx("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded-full bg-bg-3",role:"progressbar","aria-label":e.label,"aria-valuenow":Math.round(o*100),"aria-valuemin":0,"aria-valuemax":100,children:g.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${o*100}%`,background:r}})})]})}const kw=[0,.32,.55,.78,1],Vh=e=>e===0?"var(--color-bg-2)":`color-mix(in oklab, var(--color-cost) ${kw[e]*100}%, var(--color-bg-2))`,tg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _w({derived:e,maxWeeks:o=26,periodLabel:r}){const[i,l]=z.useState(null),[u,d]=z.useState(null),h=i??u,p=z.useMemo(()=>new Map(e.calendar.map(R=>[R.date,R])),[e.calendar]),m=z.useMemo(()=>e.calendar.some(R=>R.cost>0),[e.calendar]),y=R=>m?R.cost:R.tokens,v=z.useMemo(()=>{const R=e.calendar,k=R.filter(L=>y(L)>0);if(k.length===0)return null;const _=R.reduce((L,$)=>L+y($),0),M=k.reduce((L,$)=>y($)>y(L)?$:L),b=new Array(7).fill(0);for(const L of R)b[Ho(tn(L.date))]+=y(L);const I=b.indexOf(Math.max(...b)),A=new Set(k.map(L=>L.date));let B=0;for(let L=tn(k[k.length-1].date);A.has(Jo(L));L-=jn)B++;return{active:k.length,total:_,top:M,avg:_/k.length,busiest:I,streak:B,costed:m}},[e,m]),w=z.useMemo(()=>{const R=new Map(e.calendar.map(O=>[O.date,y(O)]));if(e.calendar.length===0)return null;const k=e.calendar[e.calendar.length-1].date,_=e.calendar[0].date;let M=tn(k),b=tn(_);(M-b)/(jn*7)>o&&(b=M-o*7*jn),b-=Ho(b)*jn;const I=Math.max(...e.calendar.map(y),0),A=O=>{if(O<=0||I<=0)return 0;const Y=O/I;return Y>.66?4:Y>.4?3:Y>.15?2:1},B=[];let L=new Array(7).fill(null);const $=[];let V=-1,U=0;for(let O=b;O<=M;O+=jn){const Y=Jo(O),K=Ho(O);K===0&&L.some(Boolean)&&(B.push(L),L=new Array(7).fill(null),U++);const W=new Date(O).getUTCMonth();W!==V&&K===0&&($.push({col:U,text:ju[W]}),V=W);const pe=O>=tn(_);L[K]=pe?{date:Y,cost:R.get(Y)??0,level:A(R.get(Y)??0)}:null}return L.some(Boolean)&&B.push(L),{weeks:B,monthLabels:$}},[e,o]),x=w?`repeat(${w.weeks.length}, minmax(0,1fr))`:void 0,C=w?w.weeks.length*25:void 0;return g.jsx(g.Fragment,{children:g.jsx(Hi,{title:"daily spend",titleTag:r,captureName:"calendar",children:!w||!v?g.jsx("div",{className:"py-6 text-center text-xs text-fg-faint",children:"no usage yet"}):g.jsxs("div",{className:"grid gap-x-8 gap-y-5 pt-1 md:grid-cols-[minmax(0,1fr)_210px] md:items-start",children:[g.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[g.jsx("div",{className:"pl-6",children:g.jsx("div",{className:"grid gap-[3px] text-[9px] text-fg-faint",style:{gridTemplateColumns:x,maxWidth:C},children:w.weeks.map((R,k)=>{const _=w.monthLabels.find(M=>M.col===k);return g.jsx("div",{className:"truncate",children:(_==null?void 0:_.text)??""},k)})})}),g.jsxs("div",{className:"flex gap-[3px]",children:[g.jsx("div",{className:"flex w-5 shrink-0 flex-col gap-[3px] text-[9px] text-fg-faint",children:["M","","W","","F","",""].map((R,k)=>g.jsx("div",{className:"flex flex-1 items-center",children:R},k))}),g.jsx("div",{className:"grid min-w-0 flex-1 gap-[3px]",style:{gridTemplateColumns:x,maxWidth:C},onMouseLeave:()=>l(null),children:w.weeks.map((R,k)=>g.jsx("div",{className:"flex flex-col gap-[3px]",children:R.map((_,M)=>_===null?g.jsx("div",{className:"aspect-square"},M):g.jsx("button",{type:"button","aria-label":`${Zo(_.date)} — click to pin`,"aria-pressed":(u==null?void 0:u.date)===_.date,className:`aspect-square block rounded-[3px] p-0 transition duration-150 hover:scale-[1.18] hover:ring-1 hover:ring-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent ${(u==null?void 0:u.date)===_.date?"ring-1 ring-fg-bright":""}`,style:{background:Vh(_.level)},onMouseEnter:()=>l(p.get(_.date)??null),onFocus:()=>l(p.get(_.date)??null),onClick:()=>d(b=>(b==null?void 0:b.date)===_.date?null:p.get(_.date)??null)},M))},k))})]}),g.jsxs("div",{className:"flex items-center gap-1.5 pl-6 pt-1 text-[9px] text-fg-faint",children:["less",[0,1,2,3,4].map(R=>g.jsx("span",{className:"size-[11px] rounded-[2px]",style:{background:Vh(R)}},R)),"more"]})]}),g.jsxs("div",{className:"relative border-line-faint md:border-l md:pl-6",children:[g.jsxs("div",{className:`grid grid-cols-2 gap-x-6 gap-y-4 transition-opacity duration-200 md:grid-cols-1 ${h?"opacity-0":"opacity-100"}`,children:[g.jsx(xi,{label:"busiest day",value:v.costed?Pe(v.top.cost):yt(v.top.tokens),sub:Zo(v.top.date),valueClass:"text-cost"}),g.jsx(xi,{label:"daily average",value:v.costed?Pe(v.avg):yt(v.avg),sub:`across ${v.active} active days`}),g.jsx(xi,{label:"top weekday",value:tg[v.busiest],valueClass:"text-fg-bright"}),g.jsx(xi,{label:"current streak",value:`${v.streak}d`,sub:v.streak>0?"in a row":"idle today",valueClass:"text-positive"})]}),h&&g.jsx("div",{className:"dialog-fade absolute inset-0 md:pl-6",children:g.jsx(Pw,{day:h,pinned:!i&&h===u})})]})]})})})}function Pw({day:e,pinned:o=!1}){return g.jsxs("div",{className:"font-mono text-[11px]",children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-b border-line-faint pb-2",children:[g.jsxs("span",{className:"text-fg-dim",children:[tg[Ho(tn(e.date))]," · ",Zo(e.date),o&&g.jsx("span",{className:"ml-1.5 text-[9px] uppercase tracking-wide text-accent",children:"pinned"})]}),g.jsx("span",{className:"tnum text-cost",children:e.cost>0?Pe(e.cost):"—"})]}),e.cost>0?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid grid-cols-3 gap-2 py-2 text-[10px]",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-fg-faint",children:"calls"}),g.jsx("div",{className:"tnum text-fg",children:Dn(e.calls)})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-fg-faint",children:"tokens"}),g.jsx("div",{className:"tnum text-fg",children:yt(e.tokens)})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-fg-faint",children:"saved"}),g.jsx("div",{className:"tnum text-positive",children:Pe(e.cacheSavings)})]})]}),g.jsxs("div",{className:"flex flex-col gap-1 border-t border-line-faint pt-2",children:[e.models.slice(0,5).map(r=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:Gu(r.name)}}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-fg-dim",children:on(r.name)}),g.jsx("span",{className:"tnum w-16 shrink-0 text-right text-fg",children:Pe(r.cost)})]},r.name)),e.models.length>5&&g.jsxs("div",{className:"pt-0.5 text-fg-faint",children:["+",e.models.length-5," more"]})]})]}):g.jsx("div",{className:"pt-2 text-fg-faint",children:"no spend this day"})]})}const Ew=[{value:"cost",label:"cost"},{value:"tokens",label:"tokens"},{value:"calls",label:"calls"}],Bh="1.75rem minmax(6rem,12rem) minmax(3.5rem,1fr) 3rem 5.5rem 5rem auto auto auto";function jw({derived:e,limit:o,periodLabel:r}){const[i,l]=z.useState(e.totals.cost>0?"cost":"tokens"),u=[...e.byModel].sort((y,v)=>v[i]-y[i]),d=o?u.slice(0,o):u,h=i==="tokens"?"tokenShare":i==="calls"?"callShare":"share",p=i==="tokens"?"block":"hidden md:block",m=i==="calls"?"block":"hidden lg:block";return g.jsx(Hi,{title:"model leaderboard",titleTag:r,captureName:"models",right:g.jsx(Mn,{options:Ew,value:i,onChange:l,size:"xs",ariaLabel:"sort models by",containerClassName:"flex items-center gap-0.5",btnClassName:"rounded px-1.5 py-0.5 text-[11px] transition"}),children:d.length===0?g.jsx(pw,{children:"no models in period"}):g.jsxs("div",{className:"mt-6 flex flex-col overflow-x-auto",children:[g.jsxs("div",{className:"grid items-center gap-x-3 border-b border-line px-2 pb-1.5 font-display text-[10px] uppercase tracking-wide text-fg-faint",style:{gridTemplateColumns:Bh},children:[g.jsx("span",{}),g.jsx("span",{}),g.jsx("span",{children:"share"}),g.jsx("span",{className:"text-right",children:"%"}),g.jsx("span",{className:"text-right text-cost/70",children:"cost"}),g.jsx("span",{className:"text-right",children:"trend"}),g.jsx("span",{className:"hidden text-right lg:block",children:"$/call"}),g.jsx("span",{className:`text-right ${p}`,children:"tokens"}),g.jsx("span",{className:`text-right ${m}`,children:"calls"})]}),d.map((y,v)=>g.jsxs("div",{className:"grid items-center gap-x-3 rounded border-b border-line-faint px-2 py-2 transition-colors last:border-0 hover:bg-bg-2/40",style:{gridTemplateColumns:Bh},children:[g.jsxs("span",{className:`tnum text-xs ${v===0?"font-medium text-accent":v<3?"text-fg-dim":"text-fg-faint"}`,children:["#",v+1]}),g.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:"size-2 shrink-0 rounded-[2px]",style:{background:y.color}}),g.jsx("span",{className:"truncate text-fg",title:y.model,children:on(y.model)})]}),g.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-bg-3",children:g.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,y[h]*100)}%`,minWidth:y[h]>0?"2px":0,background:y.color}})}),g.jsx("span",{className:"tnum text-right text-[11px] text-fg-dim",children:Yp(y[h],y[h]>0&&y[h]<.01?1:0)}),g.jsx("span",{className:"tnum text-right text-xs text-cost",children:Pe(y.cost)}),g.jsx("span",{className:"overflow-hidden text-right",children:g.jsx(es,{data:y.trend.slice(-30),color:y.color,className:"text-sm"})}),g.jsx("span",{className:"tnum hidden text-right text-xs text-fg-dim lg:block",children:Pe(y.calls?y.cost/y.calls:0)}),g.jsx("span",{className:`tnum text-right text-xs text-fg-dim ${p}`,children:y.tokens>0?yt(y.tokens):g.jsx("span",{className:"text-fg-faint",children:"—"})}),g.jsx("span",{className:`tnum text-right text-xs text-fg-faint ${m}`,children:Dn(y.calls)})]},y.model))]})})}/**
60
- * table-core
61
- *
62
- * Copyright (c) TanStack
63
- *
64
- * This source code is licensed under the MIT license found in the
65
- * LICENSE.md file in the root directory of this source tree.
66
- *
67
- * @license MIT
68
- */function Mw(){return{accessor:(e,o)=>typeof e=="function"?{...o,accessorFn:e}:{...o,accessorKey:e},display:e=>e,group:e=>e}}function Fn(e,o){return typeof e=="function"?e(o):e}function xt(e,o){return r=>{o.setState(i=>({...i,[e]:Fn(r,i[e])}))}}function qi(e){return e instanceof Function}function Lw(e){return Array.isArray(e)&&e.every(o=>typeof o=="number")}function Nw(e,o){const r=[],i=l=>{l.forEach(u=>{r.push(u);const d=o(u);d!=null&&d.length&&i(d)})};return i(e),r}function fe(e,o,r){let i=[],l;return u=>{let d;r.key&&r.debug&&(d=Date.now());const h=e(u);if(!(h.length!==i.length||h.some((y,v)=>i[v]!==y)))return l;i=h;let m;if(r.key&&r.debug&&(m=Date.now()),l=o(...h),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const y=Math.round((Date.now()-d)*100)/100,v=Math.round((Date.now()-m)*100)/100,w=v/16,x=(C,R)=>{for(C=String(C);C.length<R;)C=" "+C;return C};console.info(`%c⏱ ${x(v,5)} /${x(y,5)} ms`,`
69
- font-size: .6rem;
70
- font-weight: bold;
71
- color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,r==null?void 0:r.key)}return l}}function he(e,o,r,i){return{debug:()=>{var l;return(l=e==null?void 0:e.debugAll)!=null?l:e[o]},key:!1,onChange:i}}function Iw(e,o,r,i){const l=()=>{var d;return(d=u.getValue())!=null?d:e.options.renderFallbackValue},u={id:`${o.id}_${r.id}`,row:o,column:r,getValue:()=>o.getValue(i),renderValue:l,getContext:fe(()=>[e,r,o,u],(d,h,p,m)=>({table:d,column:h,row:p,cell:m,getValue:m.getValue,renderValue:m.renderValue}),he(e.options,"debugCells"))};return e._features.forEach(d=>{d.createCell==null||d.createCell(u,r,o,e)},{}),u}function Fw(e,o,r,i){var l,u;const h={...e._getDefaultColumnDef(),...o},p=h.accessorKey;let m=(l=(u=h.id)!=null?u:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?l:typeof h.header=="string"?h.header:void 0,y;if(h.accessorFn?y=h.accessorFn:p&&(p.includes(".")?y=w=>{let x=w;for(const R of p.split(".")){var C;x=(C=x)==null?void 0:C[R]}return x}:y=w=>w[h.accessorKey]),!m)throw new Error;let v={id:`${String(m)}`,accessorFn:y,parent:i,depth:r,columnDef:h,columns:[],getFlatColumns:fe(()=>[!0],()=>{var w;return[v,...(w=v.columns)==null?void 0:w.flatMap(x=>x.getFlatColumns())]},he(e.options,"debugColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],w=>{var x;if((x=v.columns)!=null&&x.length){let C=v.columns.flatMap(R=>R.getLeafColumns());return w(C)}return[v]},he(e.options,"debugColumns"))};for(const w of e._features)w.createColumn==null||w.createColumn(v,e);return v}const Ze="debugHeaders";function Uh(e,o,r){var i;let u={id:(i=r.id)!=null?i:o.id,column:o,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],h=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(h),d.push(p)};return h(u),d},getContext:()=>({table:e,header:u,column:o})};return e._features.forEach(d=>{d.createHeader==null||d.createHeader(u,e)}),u}const Tw={createTable:e=>{e.getHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,r,i,l)=>{var u,d;const h=(u=i==null?void 0:i.map(v=>r.find(w=>w.id===v)).filter(Boolean))!=null?u:[],p=(d=l==null?void 0:l.map(v=>r.find(w=>w.id===v)).filter(Boolean))!=null?d:[],m=r.filter(v=>!(i!=null&&i.includes(v.id))&&!(l!=null&&l.includes(v.id)));return Si(o,[...h,...m,...p],e)},he(e.options,Ze)),e.getCenterHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,r,i,l)=>(r=r.filter(u=>!(i!=null&&i.includes(u.id))&&!(l!=null&&l.includes(u.id))),Si(o,r,e,"center")),he(e.options,Ze)),e.getLeftHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(o,r,i)=>{var l;const u=(l=i==null?void 0:i.map(d=>r.find(h=>h.id===d)).filter(Boolean))!=null?l:[];return Si(o,u,e,"left")},he(e.options,Ze)),e.getRightHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(o,r,i)=>{var l;const u=(l=i==null?void 0:i.map(d=>r.find(h=>h.id===d)).filter(Boolean))!=null?l:[];return Si(o,u,e,"right")},he(e.options,Ze)),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],o=>[...o].reverse(),he(e.options,Ze)),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],o=>[...o].reverse(),he(e.options,Ze)),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],o=>[...o].reverse(),he(e.options,Ze)),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],o=>[...o].reverse(),he(e.options,Ze)),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],o=>o.map(r=>r.headers).flat(),he(e.options,Ze)),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],o=>o.map(r=>r.headers).flat(),he(e.options,Ze)),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],o=>o.map(r=>r.headers).flat(),he(e.options,Ze)),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],o=>o.map(r=>r.headers).flat(),he(e.options,Ze)),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],o=>o.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),he(e.options,Ze)),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],o=>o.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),he(e.options,Ze)),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],o=>o.filter(r=>{var i;return!((i=r.subHeaders)!=null&&i.length)}),he(e.options,Ze)),e.getLeafHeaders=fe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(o,r,i)=>{var l,u,d,h,p,m;return[...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[],...(d=(h=r[0])==null?void 0:h.headers)!=null?d:[],...(p=(m=i[0])==null?void 0:m.headers)!=null?p:[]].map(y=>y.getLeafHeaders()).flat()},he(e.options,Ze))}};function Si(e,o,r,i){var l,u;let d=0;const h=function(w,x){x===void 0&&(x=1),d=Math.max(d,x),w.filter(C=>C.getIsVisible()).forEach(C=>{var R;(R=C.columns)!=null&&R.length&&h(C.columns,x+1)},0)};h(e);let p=[];const m=(w,x)=>{const C={depth:x,id:[i,`${x}`].filter(Boolean).join("_"),headers:[]},R=[];w.forEach(k=>{const _=[...R].reverse()[0],M=k.column.depth===C.depth;let b,I=!1;if(M&&k.column.parent?b=k.column.parent:(b=k.column,I=!0),_&&(_==null?void 0:_.column)===b)_.subHeaders.push(k);else{const A=Uh(r,b,{id:[i,x,b.id,k==null?void 0:k.id].filter(Boolean).join("_"),isPlaceholder:I,placeholderId:I?`${R.filter(B=>B.column===b).length}`:void 0,depth:x,index:R.length});A.subHeaders.push(k),R.push(A)}C.headers.push(k),k.headerGroup=C}),p.push(C),x>0&&m(R,x-1)},y=o.map((w,x)=>Uh(r,w,{depth:d,index:x}));m(y,d-1),p.reverse();const v=w=>w.filter(C=>C.column.getIsVisible()).map(C=>{let R=0,k=0,_=[0];C.subHeaders&&C.subHeaders.length?(_=[],v(C.subHeaders).forEach(b=>{let{colSpan:I,rowSpan:A}=b;R+=I,_.push(A)})):R=1;const M=Math.min(..._);return k=k+M,C.colSpan=R,C.rowSpan=k,{colSpan:R,rowSpan:k}});return v((l=(u=p[0])==null?void 0:u.headers)!=null?l:[]),p}const Xu=(e,o,r,i,l,u,d)=>{let h={id:o,index:i,original:r,depth:l,parentId:d,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(h._valuesCache.hasOwnProperty(p))return h._valuesCache[p];const m=e.getColumn(p);if(m!=null&&m.accessorFn)return h._valuesCache[p]=m.accessorFn(h.original,i),h._valuesCache[p]},getUniqueValues:p=>{if(h._uniqueValuesCache.hasOwnProperty(p))return h._uniqueValuesCache[p];const m=e.getColumn(p);if(m!=null&&m.accessorFn)return m.columnDef.getUniqueValues?(h._uniqueValuesCache[p]=m.columnDef.getUniqueValues(h.original,i),h._uniqueValuesCache[p]):(h._uniqueValuesCache[p]=[h.getValue(p)],h._uniqueValuesCache[p])},renderValue:p=>{var m;return(m=h.getValue(p))!=null?m:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Nw(h.subRows,p=>p.subRows),getParentRow:()=>h.parentId?e.getRow(h.parentId,!0):void 0,getParentRows:()=>{let p=[],m=h;for(;;){const y=m.getParentRow();if(!y)break;p.push(y),m=y}return p.reverse()},getAllCells:fe(()=>[e.getAllLeafColumns()],p=>p.map(m=>Iw(e,h,m,m.id)),he(e.options,"debugRows")),_getAllCellsByColumnId:fe(()=>[h.getAllCells()],p=>p.reduce((m,y)=>(m[y.column.id]=y,m),{}),he(e.options,"debugRows"))};for(let p=0;p<e._features.length;p++){const m=e._features[p];m==null||m.createRow==null||m.createRow(h,e)}return h},$w={createColumn:(e,o)=>{e._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():o.getPreFilteredRowModel(),e._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ng=(e,o,r)=>{var i,l;const u=r==null||(i=r.toString())==null?void 0:i.toLowerCase();return!!(!((l=e.getValue(o))==null||(l=l.toString())==null||(l=l.toLowerCase())==null)&&l.includes(u))};ng.autoRemove=e=>$t(e);const rg=(e,o,r)=>{var i;return!!(!((i=e.getValue(o))==null||(i=i.toString())==null)&&i.includes(r))};rg.autoRemove=e=>$t(e);const og=(e,o,r)=>{var i;return((i=e.getValue(o))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(r==null?void 0:r.toLowerCase())};og.autoRemove=e=>$t(e);const sg=(e,o,r)=>{var i;return(i=e.getValue(o))==null?void 0:i.includes(r)};sg.autoRemove=e=>$t(e);const ig=(e,o,r)=>!r.some(i=>{var l;return!((l=e.getValue(o))!=null&&l.includes(i))});ig.autoRemove=e=>$t(e)||!(e!=null&&e.length);const lg=(e,o,r)=>r.some(i=>{var l;return(l=e.getValue(o))==null?void 0:l.includes(i)});lg.autoRemove=e=>$t(e)||!(e!=null&&e.length);const ag=(e,o,r)=>e.getValue(o)===r;ag.autoRemove=e=>$t(e);const ug=(e,o,r)=>e.getValue(o)==r;ug.autoRemove=e=>$t(e);const Yu=(e,o,r)=>{let[i,l]=r;const u=e.getValue(o);return u>=i&&u<=l};Yu.resolveFilterValue=e=>{let[o,r]=e,i=typeof o!="number"?parseFloat(o):o,l=typeof r!="number"?parseFloat(r):r,u=o===null||Number.isNaN(i)?-1/0:i,d=r===null||Number.isNaN(l)?1/0:l;if(u>d){const h=u;u=d,d=h}return[u,d]};Yu.autoRemove=e=>$t(e)||$t(e[0])&&$t(e[1]);const en={includesString:ng,includesStringSensitive:rg,equalsString:og,arrIncludes:sg,arrIncludesAll:ig,arrIncludesSome:lg,equals:ag,weakEquals:ug,inNumberRange:Yu};function $t(e){return e==null||e===""}const bw={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,o)=>{e.getAutoFilterFn=()=>{const r=o.getCoreRowModel().flatRows[0],i=r==null?void 0:r.getValue(e.id);return typeof i=="string"?en.includesString:typeof i=="number"?en.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?en.equals:Array.isArray(i)?en.arrIncludes:en.weakEquals},e.getFilterFn=()=>{var r,i;return qi(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(i=o.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?r:en[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,i,l;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((i=o.options.enableColumnFilters)!=null?i:!0)&&((l=o.options.enableFilters)!=null?l:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=o.getState().columnFilters)==null||(r=r.find(i=>i.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,i;return(r=(i=o.getState().columnFilters)==null?void 0:i.findIndex(l=>l.id===e.id))!=null?r:-1},e.setFilterValue=r=>{o.setColumnFilters(i=>{const l=e.getFilterFn(),u=i==null?void 0:i.find(y=>y.id===e.id),d=Fn(r,u?u.value:void 0);if(Hh(l,d,e)){var h;return(h=i==null?void 0:i.filter(y=>y.id!==e.id))!=null?h:[]}const p={id:e.id,value:d};if(u){var m;return(m=i==null?void 0:i.map(y=>y.id===e.id?p:y))!=null?m:[]}return i!=null&&i.length?[...i,p]:[p]})}},createRow:(e,o)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=o=>{const r=e.getAllLeafColumns(),i=l=>{var u;return(u=Fn(o,l))==null?void 0:u.filter(d=>{const h=r.find(p=>p.id===d.id);if(h){const p=h.getFilterFn();if(Hh(p,d.value,h))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=o=>{var r,i;e.setColumnFilters(o?[]:(r=(i=e.initialState)==null?void 0:i.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Hh(e,o,r){return(e&&e.autoRemove?e.autoRemove(o,r):!1)||typeof o>"u"||typeof o=="string"&&!o}const Dw=(e,o,r)=>r.reduce((i,l)=>{const u=l.getValue(e);return i+(typeof u=="number"?u:0)},0),zw=(e,o,r)=>{let i;return r.forEach(l=>{const u=l.getValue(e);u!=null&&(i>u||i===void 0&&u>=u)&&(i=u)}),i},Aw=(e,o,r)=>{let i;return r.forEach(l=>{const u=l.getValue(e);u!=null&&(i<u||i===void 0&&u>=u)&&(i=u)}),i},Ow=(e,o,r)=>{let i,l;return r.forEach(u=>{const d=u.getValue(e);d!=null&&(i===void 0?d>=d&&(i=l=d):(i>d&&(i=d),l<d&&(l=d)))}),[i,l]},Vw=(e,o)=>{let r=0,i=0;if(o.forEach(l=>{let u=l.getValue(e);u!=null&&(u=+u)>=u&&(++r,i+=u)}),r)return i/r},Bw=(e,o)=>{if(!o.length)return;const r=o.map(u=>u.getValue(e));if(!Lw(r))return;if(r.length===1)return r[0];const i=Math.floor(r.length/2),l=r.sort((u,d)=>u-d);return r.length%2!==0?l[i]:(l[i-1]+l[i])/2},Uw=(e,o)=>Array.from(new Set(o.map(r=>r.getValue(e))).values()),Hw=(e,o)=>new Set(o.map(r=>r.getValue(e))).size,qw=(e,o)=>o.length,su={sum:Dw,min:zw,max:Aw,extent:Ow,mean:Vw,median:Bw,unique:Uw,uniqueCount:Hw,count:qw},Gw={getDefaultColumnDef:()=>({aggregatedCell:e=>{var o,r;return(o=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,o)=>{e.toggleGrouping=()=>{o.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(i=>i!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,i;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((i=o.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=o.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=o.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const r=o.getCoreRowModel().flatRows[0],i=r==null?void 0:r.getValue(e.id);if(typeof i=="number")return su.sum;if(Object.prototype.toString.call(i)==="[object Date]")return su.extent},e.getAggregationFn=()=>{var r,i;if(!e)throw new Error;return qi(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(i=o.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?r:su[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=o=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(o),e.resetGrouping=o=>{var r,i;e.setGrouping(o?[]:(r=(i=e.initialState)==null?void 0:i.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,o)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];const i=o.getColumn(r);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[r]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,o,r,i)=>{e.getIsGrouped=()=>o.getIsGrouped()&&o.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&o.getIsGrouped(),e.getIsAggregated=()=>{var l;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((l=r.subRows)!=null&&l.length)}}};function Ww(e,o,r){if(!(o!=null&&o.length)||!r)return e;const i=e.filter(u=>!o.includes(u.id));return r==="remove"?i:[...o.map(u=>e.find(d=>d.id===u)).filter(Boolean),...i]}const Qw={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xt("columnOrder",e)}),createColumn:(e,o)=>{e.getIndex=fe(r=>[qo(o,r)],r=>r.findIndex(i=>i.id===e.id),he(o.options,"debugColumns")),e.getIsFirstColumn=r=>{var i;return((i=qo(o,r)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=r=>{var i;const l=qo(o,r);return((i=l[l.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=o=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(o),e.resetColumnOrder=o=>{var r;e.setColumnOrder(o?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=fe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(o,r,i)=>l=>{let u=[];if(!(o!=null&&o.length))u=l;else{const d=[...o],h=[...l];for(;h.length&&d.length;){const p=d.shift(),m=h.findIndex(y=>y.id===p);m>-1&&u.push(h.splice(m,1)[0])}u=[...u,...h]}return Ww(u,r,i)},he(e.options,"debugTable"))}},iu=()=>({left:[],right:[]}),Kw={getInitialState:e=>({columnPinning:iu(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xt("columnPinning",e)}),createColumn:(e,o)=>{e.pin=r=>{const i=e.getLeafColumns().map(l=>l.id).filter(Boolean);o.setColumnPinning(l=>{var u,d;if(r==="right"){var h,p;return{left:((h=l==null?void 0:l.left)!=null?h:[]).filter(v=>!(i!=null&&i.includes(v))),right:[...((p=l==null?void 0:l.right)!=null?p:[]).filter(v=>!(i!=null&&i.includes(v))),...i]}}if(r==="left"){var m,y;return{left:[...((m=l==null?void 0:l.left)!=null?m:[]).filter(v=>!(i!=null&&i.includes(v))),...i],right:((y=l==null?void 0:l.right)!=null?y:[]).filter(v=>!(i!=null&&i.includes(v)))}}return{left:((u=l==null?void 0:l.left)!=null?u:[]).filter(v=>!(i!=null&&i.includes(v))),right:((d=l==null?void 0:l.right)!=null?d:[]).filter(v=>!(i!=null&&i.includes(v)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var l,u,d;return((l=i.columnDef.enablePinning)!=null?l:!0)&&((u=(d=o.options.enableColumnPinning)!=null?d:o.options.enablePinning)!=null?u:!0)}),e.getIsPinned=()=>{const r=e.getLeafColumns().map(h=>h.id),{left:i,right:l}=o.getState().columnPinning,u=r.some(h=>i==null?void 0:i.includes(h)),d=r.some(h=>l==null?void 0:l.includes(h));return u?"left":d?"right":!1},e.getPinnedIndex=()=>{var r,i;const l=e.getIsPinned();return l?(r=(i=o.getState().columnPinning)==null||(i=i[l])==null?void 0:i.indexOf(e.id))!=null?r:-1:0}},createRow:(e,o)=>{e.getCenterVisibleCells=fe(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(r,i,l)=>{const u=[...i??[],...l??[]];return r.filter(d=>!u.includes(d.column.id))},he(o.options,"debugRows")),e.getLeftVisibleCells=fe(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left],(r,i)=>(i??[]).map(u=>r.find(d=>d.column.id===u)).filter(Boolean).map(u=>({...u,position:"left"})),he(o.options,"debugRows")),e.getRightVisibleCells=fe(()=>[e._getAllVisibleCells(),o.getState().columnPinning.right],(r,i)=>(i??[]).map(u=>r.find(d=>d.column.id===u)).filter(Boolean).map(u=>({...u,position:"right"})),he(o.options,"debugRows"))},createTable:e=>{e.setColumnPinning=o=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(o),e.resetColumnPinning=o=>{var r,i;return e.setColumnPinning(o?iu():(r=(i=e.initialState)==null?void 0:i.columnPinning)!=null?r:iu())},e.getIsSomeColumnsPinned=o=>{var r;const i=e.getState().columnPinning;if(!o){var l,u;return!!((l=i.left)!=null&&l.length||(u=i.right)!=null&&u.length)}return!!((r=i[o])!=null&&r.length)},e.getLeftLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(o,r)=>(r??[]).map(i=>o.find(l=>l.id===i)).filter(Boolean),he(e.options,"debugColumns")),e.getRightLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(o,r)=>(r??[]).map(i=>o.find(l=>l.id===i)).filter(Boolean),he(e.options,"debugColumns")),e.getCenterLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,r,i)=>{const l=[...r??[],...i??[]];return o.filter(u=>!l.includes(u.id))},he(e.options,"debugColumns"))}};function Xw(e){return e||(typeof document<"u"?document:null)}const Ci={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},lu=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Yw={getDefaultColumnDef:()=>Ci,getInitialState:e=>({columnSizing:{},columnSizingInfo:lu(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xt("columnSizing",e),onColumnSizingInfoChange:xt("columnSizingInfo",e)}),createColumn:(e,o)=>{e.getSize=()=>{var r,i,l;const u=o.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:Ci.minSize,(i=u??e.columnDef.size)!=null?i:Ci.size),(l=e.columnDef.maxSize)!=null?l:Ci.maxSize)},e.getStart=fe(r=>[r,qo(o,r),o.getState().columnSizing],(r,i)=>i.slice(0,e.getIndex(r)).reduce((l,u)=>l+u.getSize(),0),he(o.options,"debugColumns")),e.getAfter=fe(r=>[r,qo(o,r),o.getState().columnSizing],(r,i)=>i.slice(e.getIndex(r)+1).reduce((l,u)=>l+u.getSize(),0),he(o.options,"debugColumns")),e.resetSize=()=>{o.setColumnSizing(r=>{let{[e.id]:i,...l}=r;return l})},e.getCanResize=()=>{var r,i;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((i=o.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,o)=>{e.getSize=()=>{let r=0;const i=l=>{if(l.subHeaders.length)l.subHeaders.forEach(i);else{var u;r+=(u=l.column.getSize())!=null?u:0}};return i(e),r},e.getStart=()=>{if(e.index>0){const r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{const i=o.getColumn(e.column.id),l=i==null?void 0:i.getCanResize();return u=>{if(!i||!l||(u.persist==null||u.persist(),au(u)&&u.touches&&u.touches.length>1))return;const d=e.getSize(),h=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[i.id,i.getSize()]],p=au(u)?Math.round(u.touches[0].clientX):u.clientX,m={},y=(_,M)=>{typeof M=="number"&&(o.setColumnSizingInfo(b=>{var I,A;const B=o.options.columnResizeDirection==="rtl"?-1:1,L=(M-((I=b==null?void 0:b.startOffset)!=null?I:0))*B,$=Math.max(L/((A=b==null?void 0:b.startSize)!=null?A:0),-.999999);return b.columnSizingStart.forEach(V=>{let[U,O]=V;m[U]=Math.round(Math.max(O+O*$,0)*100)/100}),{...b,deltaOffset:L,deltaPercentage:$}}),(o.options.columnResizeMode==="onChange"||_==="end")&&o.setColumnSizing(b=>({...b,...m})))},v=_=>y("move",_),w=_=>{y("end",_),o.setColumnSizingInfo(M=>({...M,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},x=Xw(r),C={moveHandler:_=>v(_.clientX),upHandler:_=>{x==null||x.removeEventListener("mousemove",C.moveHandler),x==null||x.removeEventListener("mouseup",C.upHandler),w(_.clientX)}},R={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),v(_.touches[0].clientX),!1),upHandler:_=>{var M;x==null||x.removeEventListener("touchmove",R.moveHandler),x==null||x.removeEventListener("touchend",R.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),w((M=_.touches[0])==null?void 0:M.clientX)}},k=Jw()?{passive:!1}:!1;au(u)?(x==null||x.addEventListener("touchmove",R.moveHandler,k),x==null||x.addEventListener("touchend",R.upHandler,k)):(x==null||x.addEventListener("mousemove",C.moveHandler,k),x==null||x.addEventListener("mouseup",C.upHandler,k)),o.setColumnSizingInfo(_=>({..._,startOffset:p,startSize:d,deltaOffset:0,deltaPercentage:0,columnSizingStart:h,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=o=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(o),e.setColumnSizingInfo=o=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(o),e.resetColumnSizing=o=>{var r;e.setColumnSizing(o?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=o=>{var r;e.setColumnSizingInfo(o?lu():(r=e.initialState.columnSizingInfo)!=null?r:lu())},e.getTotalSize=()=>{var o,r;return(o=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((i,l)=>i+l.getSize(),0))!=null?o:0},e.getLeftTotalSize=()=>{var o,r;return(o=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((i,l)=>i+l.getSize(),0))!=null?o:0},e.getCenterTotalSize=()=>{var o,r;return(o=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((i,l)=>i+l.getSize(),0))!=null?o:0},e.getRightTotalSize=()=>{var o,r;return(o=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((i,l)=>i+l.getSize(),0))!=null?o:0}}};let Ri=null;function Jw(){if(typeof Ri=="boolean")return Ri;let e=!1;try{const o={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,o),window.removeEventListener("test",r)}catch{e=!1}return Ri=e,Ri}function au(e){return e.type==="touchstart"}const Zw={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xt("columnVisibility",e)}),createColumn:(e,o)=>{e.toggleVisibility=r=>{e.getCanHide()&&o.setColumnVisibility(i=>({...i,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,i;const l=e.columns;return(r=l.length?l.some(u=>u.getIsVisible()):(i=o.getState().columnVisibility)==null?void 0:i[e.id])!=null?r:!0},e.getCanHide=()=>{var r,i;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((i=o.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,o)=>{e._getAllVisibleCells=fe(()=>[e.getAllCells(),o.getState().columnVisibility],r=>r.filter(i=>i.column.getIsVisible()),he(o.options,"debugRows")),e.getVisibleCells=fe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,i,l)=>[...r,...i,...l],he(o.options,"debugRows"))},createTable:e=>{const o=(r,i)=>fe(()=>[i(),i().filter(l=>l.getIsVisible()).map(l=>l.id).join("_")],l=>l.filter(u=>u.getIsVisible==null?void 0:u.getIsVisible()),he(e.options,"debugColumns"));e.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var i;e.setColumnVisibility(r?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=r=>{var i;r=(i=r)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((l,u)=>({...l,[u.id]:r||!(u.getCanHide!=null&&u.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var i;e.toggleAllColumnsVisible((i=r.target)==null?void 0:i.checked)}}};function qo(e,o){return o?o==="center"?e.getCenterVisibleLeafColumns():o==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const eS={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},tS={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var r;const i=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[o.id])==null?void 0:r.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,o)=>{e.getCanGlobalFilter=()=>{var r,i,l,u;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((i=o.options.enableGlobalFilter)!=null?i:!0)&&((l=o.options.enableFilters)!=null?l:!0)&&((u=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(e))!=null?u:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>en.includesString,e.getGlobalFilterFn=()=>{var o,r;const{globalFilterFn:i}=e.options;return qi(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(o=(r=e.options.filterFns)==null?void 0:r[i])!=null?o:en[i]},e.setGlobalFilter=o=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(o)},e.resetGlobalFilter=o=>{e.setGlobalFilter(o?void 0:e.initialState.globalFilter)}}},nS={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let o=!1,r=!1;e._autoResetExpanded=()=>{var i,l;if(!o){e._queue(()=>{o=!0});return}if((i=(l=e.options.autoResetAll)!=null?l:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var l,u;e.setExpanded(i?{}:(l=(u=e.initialState)==null?void 0:u.expanded)!=null?l:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(l=>!l.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(u=>{const d=u.split(".");i=Math.max(i,d.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,o)=>{e.toggleExpanded=r=>{o.setExpanded(i=>{var l;const u=i===!0?!0:!!(i!=null&&i[e.id]);let d={};if(i===!0?Object.keys(o.getRowModel().rowsById).forEach(h=>{d[h]=!0}):d=i,r=(l=r)!=null?l:!u,!u&&r)return{...d,[e.id]:!0};if(u&&!r){const{[e.id]:h,...p}=d;return p}return i})},e.getIsExpanded=()=>{var r;const i=o.getState().expanded;return!!((r=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(e))!=null?r:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var r,i,l;return(r=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(e))!=null?r:((i=o.options.enableExpanding)!=null?i:!0)&&!!((l=e.subRows)!=null&&l.length)},e.getIsAllParentsExpanded=()=>{let r=!0,i=e;for(;r&&i.parentId;)i=o.getRow(i.parentId,!0),r=i.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{const r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},Nu=0,Iu=10,uu=()=>({pageIndex:Nu,pageSize:Iu}),rS={getInitialState:e=>({...e,pagination:{...uu(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xt("pagination",e)}),createTable:e=>{let o=!1,r=!1;e._autoResetPageIndex=()=>{var i,l;if(!o){e._queue(()=>{o=!0});return}if((i=(l=e.options.autoResetAll)!=null?l:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=i=>{const l=u=>Fn(i,u);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(l)},e.resetPagination=i=>{var l;e.setPagination(i?uu():(l=e.initialState.pagination)!=null?l:uu())},e.setPageIndex=i=>{e.setPagination(l=>{let u=Fn(i,l.pageIndex);const d=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return u=Math.max(0,Math.min(u,d)),{...l,pageIndex:u}})},e.resetPageIndex=i=>{var l,u;e.setPageIndex(i?Nu:(l=(u=e.initialState)==null||(u=u.pagination)==null?void 0:u.pageIndex)!=null?l:Nu)},e.resetPageSize=i=>{var l,u;e.setPageSize(i?Iu:(l=(u=e.initialState)==null||(u=u.pagination)==null?void 0:u.pageSize)!=null?l:Iu)},e.setPageSize=i=>{e.setPagination(l=>{const u=Math.max(1,Fn(i,l.pageSize)),d=l.pageSize*l.pageIndex,h=Math.floor(d/u);return{...l,pageIndex:h,pageSize:u}})},e.setPageCount=i=>e.setPagination(l=>{var u;let d=Fn(i,(u=e.options.pageCount)!=null?u:-1);return typeof d=="number"&&(d=Math.max(-1,d)),{...l,pageCount:d}}),e.getPageOptions=fe(()=>[e.getPageCount()],i=>{let l=[];return i&&i>0&&(l=[...new Array(i)].fill(null).map((u,d)=>d)),l},he(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,l=e.getPageCount();return l===-1?!0:l===0?!1:i<l-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},cu=()=>({top:[],bottom:[]}),oS={getInitialState:e=>({rowPinning:cu(),...e}),getDefaultOptions:e=>({onRowPinningChange:xt("rowPinning",e)}),createRow:(e,o)=>{e.pin=(r,i,l)=>{const u=i?e.getLeafRows().map(p=>{let{id:m}=p;return m}):[],d=l?e.getParentRows().map(p=>{let{id:m}=p;return m}):[],h=new Set([...d,e.id,...u]);o.setRowPinning(p=>{var m,y;if(r==="bottom"){var v,w;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(R=>!(h!=null&&h.has(R))),bottom:[...((w=p==null?void 0:p.bottom)!=null?w:[]).filter(R=>!(h!=null&&h.has(R))),...Array.from(h)]}}if(r==="top"){var x,C;return{top:[...((x=p==null?void 0:p.top)!=null?x:[]).filter(R=>!(h!=null&&h.has(R))),...Array.from(h)],bottom:((C=p==null?void 0:p.bottom)!=null?C:[]).filter(R=>!(h!=null&&h.has(R)))}}return{top:((m=p==null?void 0:p.top)!=null?m:[]).filter(R=>!(h!=null&&h.has(R))),bottom:((y=p==null?void 0:p.bottom)!=null?y:[]).filter(R=>!(h!=null&&h.has(R)))}})},e.getCanPin=()=>{var r;const{enableRowPinning:i,enablePinning:l}=o.options;return typeof i=="function"?i(e):(r=i??l)!=null?r:!0},e.getIsPinned=()=>{const r=[e.id],{top:i,bottom:l}=o.getState().rowPinning,u=r.some(h=>i==null?void 0:i.includes(h)),d=r.some(h=>l==null?void 0:l.includes(h));return u?"top":d?"bottom":!1},e.getPinnedIndex=()=>{var r,i;const l=e.getIsPinned();if(!l)return-1;const u=(r=l==="top"?o.getTopRows():o.getBottomRows())==null?void 0:r.map(d=>{let{id:h}=d;return h});return(i=u==null?void 0:u.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=o=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(o),e.resetRowPinning=o=>{var r,i;return e.setRowPinning(o?cu():(r=(i=e.initialState)==null?void 0:i.rowPinning)!=null?r:cu())},e.getIsSomeRowsPinned=o=>{var r;const i=e.getState().rowPinning;if(!o){var l,u;return!!((l=i.top)!=null&&l.length||(u=i.bottom)!=null&&u.length)}return!!((r=i[o])!=null&&r.length)},e._getPinnedRows=(o,r,i)=>{var l;return((l=e.options.keepPinnedRows)==null||l?(r??[]).map(d=>{const h=e.getRow(d,!0);return h.getIsAllParentsExpanded()?h:null}):(r??[]).map(d=>o.find(h=>h.id===d))).filter(Boolean).map(d=>({...d,position:i}))},e.getTopRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(o,r)=>e._getPinnedRows(o,r,"top"),he(e.options,"debugRows")),e.getBottomRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(o,r)=>e._getPinnedRows(o,r,"bottom"),he(e.options,"debugRows")),e.getCenterRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(o,r,i)=>{const l=new Set([...r??[],...i??[]]);return o.filter(u=>!l.has(u.id))},he(e.options,"debugRows"))}},sS={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=o=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(o),e.resetRowSelection=o=>{var r;return e.setRowSelection(o?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=o=>{e.setRowSelection(r=>{o=typeof o<"u"?o:!e.getIsAllRowsSelected();const i={...r},l=e.getPreGroupedRowModel().flatRows;return o?l.forEach(u=>{u.getCanSelect()&&(i[u.id]=!0)}):l.forEach(u=>{delete i[u.id]}),i})},e.toggleAllPageRowsSelected=o=>e.setRowSelection(r=>{const i=typeof o<"u"?o:!e.getIsAllPageRowsSelected(),l={...r};return e.getRowModel().rows.forEach(u=>{Fu(l,u.id,i,!0,e)}),l}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(o,r)=>Object.keys(o).length?du(e,r):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(o,r)=>Object.keys(o).length?du(e,r):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(o,r)=>Object.keys(o).length?du(e,r):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const o=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState();let i=!!(o.length&&Object.keys(r).length);return i&&o.some(l=>l.getCanSelect()&&!r[l.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows.filter(l=>l.getCanSelect()),{rowSelection:r}=e.getState();let i=!!o.length;return i&&o.some(l=>!r[l.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var o;const r=Object.keys((o=e.getState().rowSelection)!=null?o:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:o.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>o=>{e.toggleAllRowsSelected(o.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>o=>{e.toggleAllPageRowsSelected(o.target.checked)}},createRow:(e,o)=>{e.toggleSelected=(r,i)=>{const l=e.getIsSelected();o.setRowSelection(u=>{var d;if(r=typeof r<"u"?r:!l,e.getCanSelect()&&l===r)return u;const h={...u};return Fu(h,e.id,r,(d=i==null?void 0:i.selectChildren)!=null?d:!0,o),h})},e.getIsSelected=()=>{const{rowSelection:r}=o.getState();return Ju(e,r)},e.getIsSomeSelected=()=>{const{rowSelection:r}=o.getState();return Tu(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:r}=o.getState();return Tu(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(e):(r=o.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(e):(r=o.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(e):(r=o.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{const r=e.getCanSelect();return i=>{var l;r&&e.toggleSelected((l=i.target)==null?void 0:l.checked)}}}},Fu=(e,o,r,i,l)=>{var u;const d=l.getRow(o,!0);r?(d.getCanMultiSelect()||Object.keys(e).forEach(h=>delete e[h]),d.getCanSelect()&&(e[o]=!0)):delete e[o],i&&(u=d.subRows)!=null&&u.length&&d.getCanSelectSubRows()&&d.subRows.forEach(h=>Fu(e,h.id,r,i,l))};function du(e,o){const r=e.getState().rowSelection,i=[],l={},u=function(d,h){return d.map(p=>{var m;const y=Ju(p,r);if(y&&(i.push(p),l[p.id]=p),(m=p.subRows)!=null&&m.length&&(p={...p,subRows:u(p.subRows)}),y)return p}).filter(Boolean)};return{rows:u(o.rows),flatRows:i,rowsById:l}}function Ju(e,o){var r;return(r=o[e.id])!=null?r:!1}function Tu(e,o,r){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let l=!0,u=!1;return e.subRows.forEach(d=>{if(!(u&&!l)&&(d.getCanSelect()&&(Ju(d,o)?u=!0:l=!1),d.subRows&&d.subRows.length)){const h=Tu(d,o);h==="all"?u=!0:(h==="some"&&(u=!0),l=!1)}}),l?"all":u?"some":!1}const $u=/([0-9]+)/gm,iS=(e,o,r)=>cg(bn(e.getValue(r)).toLowerCase(),bn(o.getValue(r)).toLowerCase()),lS=(e,o,r)=>cg(bn(e.getValue(r)),bn(o.getValue(r))),aS=(e,o,r)=>Zu(bn(e.getValue(r)).toLowerCase(),bn(o.getValue(r)).toLowerCase()),uS=(e,o,r)=>Zu(bn(e.getValue(r)),bn(o.getValue(r))),cS=(e,o,r)=>{const i=e.getValue(r),l=o.getValue(r);return i>l?1:i<l?-1:0},dS=(e,o,r)=>Zu(e.getValue(r),o.getValue(r));function Zu(e,o){return e===o?0:e>o?1:-1}function bn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function cg(e,o){const r=e.split($u).filter(Boolean),i=o.split($u).filter(Boolean);for(;r.length&&i.length;){const l=r.shift(),u=i.shift(),d=parseInt(l,10),h=parseInt(u,10),p=[d,h].sort();if(isNaN(p[0])){if(l>u)return 1;if(u>l)return-1;continue}if(isNaN(p[1]))return isNaN(d)?-1:1;if(d>h)return 1;if(h>d)return-1}return r.length-i.length}const Oo={alphanumeric:iS,alphanumericCaseSensitive:lS,text:aS,textCaseSensitive:uS,datetime:cS,basic:dS},fS={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xt("sorting",e),isMultiSortEvent:o=>o.shiftKey}),createColumn:(e,o)=>{e.getAutoSortingFn=()=>{const r=o.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const l of r){const u=l==null?void 0:l.getValue(e.id);if(Object.prototype.toString.call(u)==="[object Date]")return Oo.datetime;if(typeof u=="string"&&(i=!0,u.split($u).length>1))return Oo.alphanumeric}return i?Oo.text:Oo.basic},e.getAutoSortDir=()=>{const r=o.getFilteredRowModel().flatRows[0];return typeof(r==null?void 0:r.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,i;if(!e)throw new Error;return qi(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(i=o.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?r:Oo[e.columnDef.sortingFn]},e.toggleSorting=(r,i)=>{const l=e.getNextSortingOrder(),u=typeof r<"u"&&r!==null;o.setSorting(d=>{const h=d==null?void 0:d.find(x=>x.id===e.id),p=d==null?void 0:d.findIndex(x=>x.id===e.id);let m=[],y,v=u?r:l==="desc";if(d!=null&&d.length&&e.getCanMultiSort()&&i?h?y="toggle":y="add":d!=null&&d.length&&p!==d.length-1?y="replace":h?y="toggle":y="replace",y==="toggle"&&(u||l||(y="remove")),y==="add"){var w;m=[...d,{id:e.id,desc:v}],m.splice(0,m.length-((w=o.options.maxMultiSortColCount)!=null?w:Number.MAX_SAFE_INTEGER))}else y==="toggle"?m=d.map(x=>x.id===e.id?{...x,desc:v}:x):y==="remove"?m=d.filter(x=>x.id!==e.id):m=[{id:e.id,desc:v}];return m})},e.getFirstSortDir=()=>{var r,i;return((r=(i=e.columnDef.sortDescFirst)!=null?i:o.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var i,l;const u=e.getFirstSortDir(),d=e.getIsSorted();return d?d!==u&&((i=o.options.enableSortingRemoval)==null||i)&&(!(r&&(l=o.options.enableMultiRemove)!=null)||l)?!1:d==="desc"?"asc":"desc":u},e.getCanSort=()=>{var r,i;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((i=o.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,i;return(r=(i=e.columnDef.enableMultiSort)!=null?i:o.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;const i=(r=o.getState().sorting)==null?void 0:r.find(l=>l.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,i;return(r=(i=o.getState().sorting)==null?void 0:i.findIndex(l=>l.id===e.id))!=null?r:-1},e.clearSorting=()=>{o.setSorting(r=>r!=null&&r.length?r.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const r=e.getCanSort();return i=>{r&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=o=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(o),e.resetSorting=o=>{var r,i;e.setSorting(o?[]:(r=(i=e.initialState)==null?void 0:i.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},hS=[Tw,Zw,Qw,Kw,$w,bw,eS,tS,fS,Gw,nS,rS,oS,sS,Yw];function pS(e){var o,r;const i=[...hS,...(o=e._features)!=null?o:[]];let l={_features:i};const u=l._features.reduce((w,x)=>Object.assign(w,x.getDefaultOptions==null?void 0:x.getDefaultOptions(l)),{}),d=w=>l.options.mergeOptions?l.options.mergeOptions(u,w):{...u,...w};let p={...{},...(r=e.initialState)!=null?r:{}};l._features.forEach(w=>{var x;p=(x=w.getInitialState==null?void 0:w.getInitialState(p))!=null?x:p});const m=[];let y=!1;const v={_features:i,options:{...u,...e},initialState:p,_queue:w=>{m.push(w),y||(y=!0,Promise.resolve().then(()=>{for(;m.length;)m.shift()();y=!1}).catch(x=>setTimeout(()=>{throw x})))},reset:()=>{l.setState(l.initialState)},setOptions:w=>{const x=Fn(w,l.options);l.options=d(x)},getState:()=>l.options.state,setState:w=>{l.options.onStateChange==null||l.options.onStateChange(w)},_getRowId:(w,x,C)=>{var R;return(R=l.options.getRowId==null?void 0:l.options.getRowId(w,x,C))!=null?R:`${C?[C.id,x].join("."):x}`},getCoreRowModel:()=>(l._getCoreRowModel||(l._getCoreRowModel=l.options.getCoreRowModel(l)),l._getCoreRowModel()),getRowModel:()=>l.getPaginationRowModel(),getRow:(w,x)=>{let C=(x?l.getPrePaginationRowModel():l.getRowModel()).rowsById[w];if(!C&&(C=l.getCoreRowModel().rowsById[w],!C))throw new Error;return C},_getDefaultColumnDef:fe(()=>[l.options.defaultColumn],w=>{var x;return w=(x=w)!=null?x:{},{header:C=>{const R=C.header.column.columnDef;return R.accessorKey?R.accessorKey:R.accessorFn?R.id:null},cell:C=>{var R,k;return(R=(k=C.renderValue())==null||k.toString==null?void 0:k.toString())!=null?R:null},...l._features.reduce((C,R)=>Object.assign(C,R.getDefaultColumnDef==null?void 0:R.getDefaultColumnDef()),{}),...w}},he(e,"debugColumns")),_getColumnDefs:()=>l.options.columns,getAllColumns:fe(()=>[l._getColumnDefs()],w=>{const x=function(C,R,k){return k===void 0&&(k=0),C.map(_=>{const M=Fw(l,_,k,R),b=_;return M.columns=b.columns?x(b.columns,M,k+1):[],M})};return x(w)},he(e,"debugColumns")),getAllFlatColumns:fe(()=>[l.getAllColumns()],w=>w.flatMap(x=>x.getFlatColumns()),he(e,"debugColumns")),_getAllFlatColumnsById:fe(()=>[l.getAllFlatColumns()],w=>w.reduce((x,C)=>(x[C.id]=C,x),{}),he(e,"debugColumns")),getAllLeafColumns:fe(()=>[l.getAllColumns(),l._getOrderColumnsFn()],(w,x)=>{let C=w.flatMap(R=>R.getLeafColumns());return x(C)},he(e,"debugColumns")),getColumn:w=>l._getAllFlatColumnsById()[w]};Object.assign(l,v);for(let w=0;w<l._features.length;w++){const x=l._features[w];x==null||x.createTable==null||x.createTable(l)}return l}function gS(){return e=>fe(()=>[e.options.data],o=>{const r={rows:[],flatRows:[],rowsById:{}},i=function(l,u,d){u===void 0&&(u=0);const h=[];for(let m=0;m<l.length;m++){const y=Xu(e,e._getRowId(l[m],m,d),l[m],m,u,void 0,d==null?void 0:d.id);if(r.flatRows.push(y),r.rowsById[y.id]=y,h.push(y),e.options.getSubRows){var p;y.originalSubRows=e.options.getSubRows(l[m],m),(p=y.originalSubRows)!=null&&p.length&&(y.subRows=i(y.originalSubRows,u+1,y))}}return h};return r.rows=i(o),r},he(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function mS(){return e=>fe(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(o,r,i)=>!r.rows.length||o!==!0&&!Object.keys(o??{}).length||!i?r:vS(r),he(e.options,"debugTable"))}function vS(e){const o=[],r=i=>{var l;o.push(i),(l=i.subRows)!=null&&l.length&&i.getIsExpanded()&&i.subRows.forEach(r)};return e.rows.forEach(r),{rows:o,flatRows:e.flatRows,rowsById:e.rowsById}}function yS(e,o,r){return r.options.filterFromLeafRows?xS(e,o,r):wS(e,o,r)}function xS(e,o,r){var i;const l=[],u={},d=(i=r.options.maxLeafRowFilterDepth)!=null?i:100,h=function(p,m){m===void 0&&(m=0);const y=[];for(let w=0;w<p.length;w++){var v;let x=p[w];const C=Xu(r,x.id,x.original,x.index,x.depth,void 0,x.parentId);if(C.columnFilters=x.columnFilters,(v=x.subRows)!=null&&v.length&&m<d){if(C.subRows=h(x.subRows,m+1),x=C,o(x)&&!C.subRows.length){y.push(x),u[x.id]=x,l.push(x);continue}if(o(x)||C.subRows.length){y.push(x),u[x.id]=x,l.push(x);continue}}else x=C,o(x)&&(y.push(x),u[x.id]=x,l.push(x))}return y};return{rows:h(e),flatRows:l,rowsById:u}}function wS(e,o,r){var i;const l=[],u={},d=(i=r.options.maxLeafRowFilterDepth)!=null?i:100,h=function(p,m){m===void 0&&(m=0);const y=[];for(let w=0;w<p.length;w++){let x=p[w];if(o(x)){var v;if((v=x.subRows)!=null&&v.length&&m<d){const R=Xu(r,x.id,x.original,x.index,x.depth,void 0,x.parentId);R.subRows=h(x.subRows,m+1),x=R}y.push(x),l.push(x),u[x.id]=x}}return y};return{rows:h(e),flatRows:l,rowsById:u}}function SS(){return e=>fe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(o,r,i)=>{if(!o.rows.length||!(r!=null&&r.length)&&!i){for(let w=0;w<o.flatRows.length;w++)o.flatRows[w].columnFilters={},o.flatRows[w].columnFiltersMeta={};return o}const l=[],u=[];(r??[]).forEach(w=>{var x;const C=e.getColumn(w.id);if(!C)return;const R=C.getFilterFn();R&&l.push({id:w.id,filterFn:R,resolvedValue:(x=R.resolveFilterValue==null?void 0:R.resolveFilterValue(w.value))!=null?x:w.value})});const d=(r??[]).map(w=>w.id),h=e.getGlobalFilterFn(),p=e.getAllLeafColumns().filter(w=>w.getCanGlobalFilter());i&&h&&p.length&&(d.push("__global__"),p.forEach(w=>{var x;u.push({id:w.id,filterFn:h,resolvedValue:(x=h.resolveFilterValue==null?void 0:h.resolveFilterValue(i))!=null?x:i})}));let m,y;for(let w=0;w<o.flatRows.length;w++){const x=o.flatRows[w];if(x.columnFilters={},l.length)for(let C=0;C<l.length;C++){m=l[C];const R=m.id;x.columnFilters[R]=m.filterFn(x,R,m.resolvedValue,k=>{x.columnFiltersMeta[R]=k})}if(u.length){for(let C=0;C<u.length;C++){y=u[C];const R=y.id;if(y.filterFn(x,R,y.resolvedValue,k=>{x.columnFiltersMeta[R]=k})){x.columnFilters.__global__=!0;break}}x.columnFilters.__global__!==!0&&(x.columnFilters.__global__=!1)}}const v=w=>{for(let x=0;x<d.length;x++)if(w.columnFilters[d[x]]===!1)return!1;return!0};return yS(o.rows,v,e)},he(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function CS(){return e=>fe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(o,r)=>{if(!r.rows.length||!(o!=null&&o.length))return r;const i=e.getState().sorting,l=[],u=i.filter(p=>{var m;return(m=e.getColumn(p.id))==null?void 0:m.getCanSort()}),d={};u.forEach(p=>{const m=e.getColumn(p.id);m&&(d[p.id]={sortUndefined:m.columnDef.sortUndefined,invertSorting:m.columnDef.invertSorting,sortingFn:m.getSortingFn()})});const h=p=>{const m=p.map(y=>({...y}));return m.sort((y,v)=>{for(let x=0;x<u.length;x+=1){var w;const C=u[x],R=d[C.id],k=R.sortUndefined,_=(w=C==null?void 0:C.desc)!=null?w:!1;let M=0;if(k){const b=y.getValue(C.id),I=v.getValue(C.id),A=b===void 0,B=I===void 0;if(A||B){if(k==="first")return A?-1:1;if(k==="last")return A?1:-1;M=A&&B?0:A?k:-k}}if(M===0&&(M=R.sortingFn(y,v,C.id)),M!==0)return _&&(M*=-1),R.invertSorting&&(M*=-1),M}return y.index-v.index}),m.forEach(y=>{var v;l.push(y),(v=y.subRows)!=null&&v.length&&(y.subRows=h(y.subRows))}),m};return{rows:h(r.rows),flatRows:l,rowsById:r.rowsById}},he(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
72
- * react-table
73
- *
74
- * Copyright (c) TanStack
75
- *
76
- * This source code is licensed under the MIT license found in the
77
- * LICENSE.md file in the root directory of this source tree.
78
- *
79
- * @license MIT
80
- */function fu(e,o){return e?RS(e)?z.createElement(e,o):e:null}function RS(e){return kS(e)||typeof e=="function"||_S(e)}function kS(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function _S(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function PS(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=z.useState(()=>({current:pS(o)})),[i,l]=z.useState(()=>r.current.initialState);return r.current.setOptions(u=>({...u,...e,state:{...i,...e.state},onStateChange:d=>{l(d),e.onStateChange==null||e.onStateChange(d)}})),r.current}const Or=Mw(),dg=g.jsx("span",{className:"text-fg-faint",children:"—"}),ES=e=>`${Zo(e.label)} ${e.label} ${e.models.map(on).join(" ")} ${e.models.join(" ")}`.toLowerCase();function jS(e){return z.useMemo(()=>[Or.accessor("label",{header:e,cell:o=>g.jsxs("button",{type:"button","aria-expanded":o.row.getIsExpanded(),onClick:r=>{r.stopPropagation(),o.row.toggleExpanded()},className:"flex items-center gap-1 rounded text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",children:[g.jsx("span",{"aria-hidden":!0,className:o.row.getIsExpanded()?"text-accent":"text-fg-faint",children:o.row.getIsExpanded()?"▾":"▸"}),g.jsx("span",{className:"text-fg",children:Zo(o.getValue())})]})}),Or.display({id:"models",header:"models",cell:o=>g.jsx("span",{className:"line-clamp-1 text-fg-dim",children:o.row.original.models.map(on).join(", ")})}),Or.accessor("total",{header:"tokens",meta:{align:"right"},cell:o=>o.getValue()>0?g.jsx("span",{className:"text-fg",children:yt(o.getValue())}):dg}),Or.accessor("cacheSavings",{header:"saved",meta:{align:"right",hiddenSm:!0},cell:o=>g.jsx("span",{className:"text-positive",children:Pe(o.getValue())})}),Or.accessor("count",{header:"calls",meta:{align:"right",hiddenSm:!0},cell:o=>g.jsx("span",{className:"text-fg-dim",children:Xp(o.getValue())})}),Or.accessor("cost",{header:"cost",meta:{align:"right"},cell:o=>g.jsx("span",{className:"text-cost",children:Pe(o.getValue())})})],[e])}const MS=e=>`py-2 pr-3${(e==null?void 0:e.align)==="right"?" text-right":""}${e!=null&&e.hiddenSm?" hidden sm:table-cell":""}`;function LS({rows:e,granLabel:o,q:r}){const[i,l]=z.useState([{id:"label",desc:!0}]),[u,d]=z.useState({}),p=jS(o==="monthly"?"month":o==="weekly"?"week":"date"),m=PS({data:e,columns:p,state:{sorting:i,expanded:u,globalFilter:r},onSortingChange:l,onExpandedChange:d,getRowCanExpand:()=>!0,globalFilterFn:(w,x,C)=>!String(C).trim()||ES(w.original).includes(String(C).trim().toLowerCase()),getCoreRowModel:gS(),getSortedRowModel:CS(),getFilteredRowModel:SS(),getExpandedRowModel:mS()}),y=m.getRowModel().rows,v=z.useMemo(()=>y.reduce((w,x)=>({total:w.total+x.original.total,cost:w.cost+x.original.cost,cacheSavings:w.cacheSavings+x.original.cacheSavings,count:w.count+x.original.count}),{total:0,cost:0,cacheSavings:0,count:0}),[y]);return g.jsx(Hi,{title:`explore · ${o}`,captureName:"explore",children:g.jsx("div",{className:"max-h-[calc(100vh-240px)] overflow-auto",children:g.jsxs("table",{className:"w-full border-collapse text-xs",children:[g.jsxs("colgroup",{children:[g.jsx("col",{}),g.jsx("col",{style:{width:"34%"}}),g.jsx("col",{style:{width:"13%"}}),g.jsx("col",{style:{width:"12%"}}),g.jsx("col",{style:{width:"11%"}}),g.jsx("col",{style:{width:"13%"}})]}),g.jsx("thead",{children:g.jsx("tr",{className:"sticky top-0 z-10 bg-bg-1 text-[11px] shadow-[inset_0_-1px_0_var(--color-line)]",children:m.getHeaderGroups()[0].headers.map(w=>{const x=w.column.columnDef.meta,C=w.column.getIsSorted();return g.jsx("th",{className:`py-2 pr-3 font-normal ${(x==null?void 0:x.align)==="right"?"text-right":"text-left"}${x!=null&&x.hiddenSm?" hidden sm:table-cell":""}`,children:w.column.getCanSort()?g.jsxs("button",{type:"button",onClick:w.column.getToggleSortingHandler(),className:`flex w-full items-center gap-1 text-fg-faint transition hover:text-fg ${(x==null?void 0:x.align)==="right"?"justify-end":""}`,children:[fu(w.column.columnDef.header,w.getContext()),C&&g.jsx("span",{className:"text-accent",children:C==="asc"?"▲":"▼"})]}):g.jsx("span",{className:"text-fg-faint",children:fu(w.column.columnDef.header,w.getContext())})},w.id)})})}),g.jsxs("tbody",{children:[y.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"py-8 text-center text-fg-faint",children:r.trim()?`no rows match “${r.trim()}”`:"no usage in this range"})}),y.map(w=>g.jsxs(z.Fragment,{children:[g.jsx("tr",{className:"cursor-pointer border-b border-line-faint transition hover:bg-bg-2/60",onClick:()=>w.toggleExpanded(),children:w.getVisibleCells().map(x=>g.jsx("td",{className:`${MS(x.column.columnDef.meta)}${x.column.id==="label"?" whitespace-nowrap":""} tnum`,children:fu(x.column.columnDef.cell,x.getContext())},x.id))}),w.getIsExpanded()&&w.original.breakdown.map(x=>{const C=x.input+x.output+x.cacheCreate+x.cacheRead;return g.jsxs("tr",{className:"border-b border-line-faint bg-bg-0/40 text-[11px]",children:[g.jsxs("td",{className:"py-1.5 pr-3 pl-5 text-fg-dim",colSpan:2,children:[g.jsx("span",{className:"mr-1.5 inline-block size-1.5 rounded-full align-middle",style:{background:Gu(x.name)}}),on(x.name)]}),g.jsx("td",{className:"tnum py-1.5 pr-3 text-right text-fg-dim",children:C>0?yt(C):dg}),g.jsx("td",{className:"tnum hidden py-1.5 pr-3 text-right text-positive/80 sm:table-cell",children:Pe(x.cacheSavings)}),g.jsx("td",{className:"tnum hidden py-1.5 pr-3 text-right text-fg-faint sm:table-cell",children:Dn(x.count)}),g.jsx("td",{className:"tnum py-1.5 text-right text-cost/90",children:Pe(x.cost)})]},x.name)})]},w.id))]}),y.length>0&&g.jsx("tfoot",{children:g.jsxs("tr",{className:"sticky bottom-0 z-10 bg-bg-1 text-fg shadow-[inset_0_1px_0_var(--color-line)]",children:[g.jsxs("td",{className:"py-2 pr-3 font-display text-[11px] uppercase text-fg-dim",colSpan:2,children:["total · ",y.length]}),g.jsx("td",{className:"tnum py-2 pr-3 text-right",children:yt(v.total)}),g.jsx("td",{className:"tnum hidden py-2 pr-3 text-right text-positive sm:table-cell",children:Pe(v.cacheSavings)}),g.jsx("td",{className:"tnum hidden py-2 pr-3 text-right sm:table-cell",children:Xp(v.count)}),g.jsx("td",{className:"tnum py-2 text-right text-cost",children:Pe(v.cost)})]})})]})})})}const Gi=()=>eg(()=>import("./timeline-_qBfhBAY.js"),__vite__mapDeps([0,1]),import.meta.url),rs=()=>eg(()=>import("./breakdown-C9UzD3X2.js"),__vite__mapDeps([2,1]),import.meta.url);Gi();rs();const NS=z.lazy(()=>Gi().then(e=>({default:e.CostTimeline}))),IS=z.lazy(()=>Gi().then(e=>({default:e.CumulativeSpend}))),FS=z.lazy(()=>Gi().then(e=>({default:e.CacheSavings}))),fg=z.lazy(()=>rs().then(e=>({default:e.CostByModel}))),hg=z.lazy(()=>rs().then(e=>({default:e.ProviderDonut}))),qh=z.lazy(()=>rs().then(e=>({default:e.TokenComposition}))),TS=z.lazy(()=>rs().then(e=>({default:e.CacheByModel}))),$S=({className:e})=>g.jsx("div",{className:e,"aria-hidden":!0}),Ln=({children:e})=>g.jsx(z.Suspense,{fallback:null,children:e}),Gh=[{key:"overview",label:"overview"},{key:"analytics",label:"analytics"},{key:"models",label:"models"},{key:"explore",label:"explore"}],bS=[{value:"daily",label:"daily"},{value:"weekly",label:"weekly"},{value:"monthly",label:"monthly"}];function DS({derived:e,periodLabel:o,scopeLabel:r,providers:i}){const l=u=>{var d;return((d=i.find(h=>h.id===u))==null?void 0:d.name)??u};return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(xw,{derived:e,periodLabel:o}),g.jsx(z.Suspense,{fallback:g.jsx($S,{className:"h-[clamp(320px,42vh,560px)]"}),children:g.jsx(NS,{derived:e,periodLabel:r,heightClass:"h-[clamp(320px,42vh,560px)]"})}),g.jsx(ww,{accounts:e.cardAccounts,nameOf:l})]})}function zS({derived:e,scopeLabel:o}){const r=e.byProvider.length>1;return g.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[g.jsx("div",{className:"md:col-span-2",children:g.jsx(_w,{derived:e,periodLabel:o})}),g.jsx(Ln,{children:g.jsx(fg,{derived:e,periodLabel:o})}),g.jsx(Ln,{children:r?g.jsx(hg,{derived:e,periodLabel:o}):g.jsx(qh,{derived:e,periodLabel:o})}),r&&g.jsx(Ln,{children:g.jsx(qh,{derived:e,periodLabel:o})}),g.jsx("div",{className:r?void 0:"md:col-span-2",children:g.jsx(Ln,{children:g.jsx(FS,{derived:e,periodLabel:o})})}),g.jsx("div",{className:"md:col-span-2",children:g.jsx(Ln,{children:g.jsx(IS,{derived:e,height:300,periodLabel:o})})})]})}function AS({derived:e,scopeLabel:o}){const r=e.byProvider.length>1;return g.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[g.jsx("div",{className:"md:col-span-2",children:g.jsx(jw,{derived:e,periodLabel:o})}),g.jsx("div",{className:r?void 0:"md:col-span-2",children:g.jsx(Ln,{children:g.jsx(fg,{derived:e,metric:"tokens",limit:12,periodLabel:o})})}),r&&g.jsx(Ln,{children:g.jsx(hg,{derived:e,periodLabel:o})}),g.jsx("div",{className:"md:col-span-2",children:g.jsx(Ln,{children:g.jsx(TS,{derived:e,periodLabel:o})})})]})}function OS({snapshot:e,filters:o,periodLabel:r}){const[i,l]=z.useState(""),[u,d]=z.useState("daily"),h=z.useMemo(()=>Jx(e,o,u),[e,o,u]),p=u!=="daily"?`showing up to ${u==="monthly"?"12 months":"12 weeks"}`:o.period!=="all"?`scoped to ${r}`:null;return g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-xs text-fg-faint",children:"granularity:"}),g.jsx(Mn,{options:bS,value:u,onChange:d,size:"sm",ariaLabel:"row granularity",btnClassName:"px-3 py-1 text-xs capitalize transition"})]}),p&&g.jsx("span",{className:"text-xs text-fg-faint",children:p}),g.jsxs("div",{className:"ml-auto flex items-center gap-1.5 rounded border border-line bg-bg-1 px-2 py-1 text-xs focus-within:border-line-2",children:[g.jsx(o0,{className:"size-3 text-fg-faint"}),g.jsx("input",{type:"search",value:i,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Escape"&&l("")},placeholder:"filter rows…","aria-label":"Filter rows by date or model",autoComplete:"off",spellCheck:!1,className:"w-32 bg-transparent text-fg outline-none placeholder:text-fg-faint [&::-webkit-search-cancel-button]:appearance-none"}),i&&g.jsx("button",{type:"button",onClick:()=>l(""),"aria-label":"Clear filter",children:g.jsx(bi,{className:"size-3 text-fg-faint hover:text-fg","aria-hidden":!0})})]})]}),g.jsx(LS,{rows:h,granLabel:u,q:i})]})}function ec(e,o,r){try{return e(o)}catch(i){return Rv("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),o,i,r),null}}function bt(e){function o(r){if(typeof r>"u")return null;let i="";if(Array.isArray(r)){if(r[0]===void 0)return null;i=r[0]}return typeof r=="string"&&(i=r),ec(e.parse,i)}return{type:"single",eq:(r,i)=>r===i,...e,parseServerSide:o,withDefault(r){return{...this,defaultValue:r,parseServerSide(i){return o(i)??r}}},withOptions(r){return{...this,...r}}}}const hu=bt({parse:e=>e,serialize:String});bt({parse:e=>{const o=parseInt(e);return o==o?o:null},serialize:e=>""+Math.round(e)});bt({parse:e=>{const o=parseInt(e);return o==o?o-1:null},serialize:e=>""+Math.round(e+1)});bt({parse:e=>{const o=parseInt(e,16);return o==o?o:null},serialize:e=>{const o=Math.round(e).toString(16);return(o.length&1?"0":"")+o}});bt({parse:e=>{const o=parseFloat(e);return o==o?o:null},serialize:String});bt({parse:e=>e.toLowerCase()==="true",serialize:String});function tc(e,o){return e.valueOf()===o.valueOf()}bt({parse:e=>{const o=parseInt(e);return o==o?new Date(o):null},serialize:e=>""+e.valueOf(),eq:tc});bt({parse:e=>{const o=new Date(e);return o.valueOf()==o.valueOf()?o:null},serialize:e=>e.toISOString(),eq:tc});bt({parse:e=>{const o=new Date(e.slice(0,10));return o.valueOf()==o.valueOf()?o:null},serialize:e=>e.toISOString().slice(0,10),eq:tc});function VS(e){return BS(e)}function BS(e){return bt({parse:o=>{const r=o;return e.includes(r)?r:null},serialize:String})}function Wh(e,o=","){const r=e.eq??((l,u)=>l===u),i=encodeURIComponent(o);return bt({parse:l=>l===""?[]:l.split(o).map((u,d)=>ec(e.parse,u.replaceAll(i,o),`[${d}]`)).filter(u=>u!=null),serialize:l=>l.map(u=>(e.serialize?e.serialize(u):String(u)).replaceAll(o,i)).join(o),eq(l,u){return l===u?!0:l.length!==u.length?!1:l.every((d,h)=>r(d,u[h]))}})}const pu=Au(),US={};function HS(e,o={}){const r=z.useId(),i=Nv(),l=Iv(),{history:u="replace",scroll:d=(i==null?void 0:i.scroll)??!1,shallow:h=(i==null?void 0:i.shallow)??!0,throttleMs:p=Uo.timeMs,limitUrlUpdates:m=i==null?void 0:i.limitUrlUpdates,clearOnDefault:y=(i==null?void 0:i.clearOnDefault)??!0,startTransition:v,urlKeys:w=US}=o,x=Object.keys(e).join(","),C=z.useMemo(()=>Object.fromEntries(Object.keys(e).map($=>[$,w[$]??$])),[x,JSON.stringify(w)]),R=Lv(Object.values(C)),k=R.searchParams,_=z.useRef({}),M=z.useMemo(()=>Object.fromEntries(Object.keys(e).map($=>[$,e[$].defaultValue??null])),[Object.values(e).map(({defaultValue:$})=>$).join(",")]),b=Va.useQueuedQueries(Object.values(C)),[I,A]=z.useState(()=>gu(e,w,k??new URLSearchParams,b).state),B=z.useRef(I);if(Ie("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,x,I,k),Object.keys(_.current).join("&")!==Object.values(C).join("&")){const{state:$,hasChanged:V}=gu(e,w,k,b,_.current,B.current);V&&(Ie("[nuq+ %s `%s`] State changed: %O",r,x,{state:$,initialSearchParams:k,queuedQueries:b,queryRef:_.current,stateRef:B.current}),B.current=$,A($)),_.current=Object.fromEntries(Object.entries(C).map(([U,O])=>{var Y;return[O,((Y=e[U])==null?void 0:Y.type)==="multi"?k==null?void 0:k.getAll(O):(k==null?void 0:k.get(O))??null]}))}z.useEffect(()=>{const{state:$,hasChanged:V}=gu(e,w,k,b,_.current,B.current);V&&(Ie("[nuq+ %s `%s`] State changed: %O",r,x,{state:$,initialSearchParams:k,queuedQueries:b,queryRef:_.current,stateRef:B.current}),B.current=$,A($))},[Object.values(C).map($=>`${$}=${k==null?void 0:k.getAll($)}`).join("&"),JSON.stringify(b)]),z.useEffect(()=>{const $=Object.keys(e).reduce((V,U)=>(V[U]=({state:O,query:Y})=>{A(K=>{const{defaultValue:W}=e[U],pe=C[U],ge=O??W??null,Z=K[U]??W??null;return Object.is(Z,ge)?(Ie("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,x,pe,O,W,B.current),K):(B.current={...B.current,[U]:ge},_.current[pe]=Y,Ie("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,x,pe,O,W,B.current),B.current)})},V),{});for(const V of Object.keys(e)){const U=C[V];Ie("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,U,x),pu.on(U,$[V])}return()=>{for(const V of Object.keys(e)){const U=C[V];Ie("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,U,x),pu.off(U,$[V])}}},[x,C]);const L=z.useCallback(($,V={})=>{var Z,J,le,ee,N,H;const U=Object.fromEntries(Object.keys(e).map(ue=>[ue,null])),O=typeof $=="function"?$(Qh(B.current,M))??U:$??U;Ie("[nuq+ %s `%s`] setState: %O",r,x,O);let Y,K=0,W=!1;const pe=[];for(let[ue,ae]of Object.entries(O)){const re=e[ue],ye=C[ue];if(!re||ae===void 0)continue;(V.clearOnDefault??re.clearOnDefault??y)&&ae!==null&&re.defaultValue!==void 0&&(re.eq??((xe,be)=>xe===be))(ae,re.defaultValue)&&(ae=null);const Ce=ae===null?null:(re.serialize??String)(ae);pu.emit(ye,{state:ae,query:Ce});const ve={key:ye,query:Ce,options:{history:V.history??re.history??u,shallow:V.shallow??re.shallow??h,scroll:V.scroll??re.scroll??d,startTransition:V.startTransition??re.startTransition??v}};if(((Z=V==null?void 0:V.limitUrlUpdates)==null?void 0:Z.method)==="debounce"||(m==null?void 0:m.method)==="debounce"||((J=re.limitUrlUpdates)==null?void 0:J.method)==="debounce"){ve.options.shallow===!0&&console.warn(ns(422));const xe=((le=V==null?void 0:V.limitUrlUpdates)==null?void 0:le.timeMs)??(m==null?void 0:m.timeMs)??((ee=re.limitUrlUpdates)==null?void 0:ee.timeMs)??Uo.timeMs,be=Va.push(ve,xe,R,l);K<xe&&(Y=be,K=xe)}else{const xe=((N=V==null?void 0:V.limitUrlUpdates)==null?void 0:N.timeMs)??((H=re==null?void 0:re.limitUrlUpdates)==null?void 0:H.timeMs)??(m==null?void 0:m.timeMs)??V.throttleMs??re.throttleMs??p;pe.push(Va.abort(ye)),_i.push(ve,xe),W=!0}}const ge=pe.reduce((ue,ae)=>ae(ue),W?_i.flush(R,l):_i.getPendingPromise(R));return Y??ge},[x,u,h,d,p,m==null?void 0:m.method,m==null?void 0:m.timeMs,v,C,R.updateUrl,R.getSearchParamsSnapshot,R.rateLimitFactor,l,M]);return[z.useMemo(()=>Qh(I,M),[I,M]),L]}function gu(e,o,r,i,l,u){let d=!1;const h=Object.entries(e).reduce((p,[m,y])=>{const v=(o==null?void 0:o[m])??m,w=i[v],x=y.type==="multi"?[]:null,C=w===void 0?(y.type==="multi"?r==null?void 0:r.getAll(v):r==null?void 0:r.get(v))??x:w;return l&&u&&Jh(l[v]??x,C)?(p[m]=u[m]??null,p):(d=!0,p[m]=($v(C)?null:ec(y.parse,C,v))??null,l&&(l[v]=C),p)},{});if(!d){const p=Object.keys(e),m=Object.keys(u??{});d=p.length!==m.length||p.some(y=>!m.includes(y))}return{state:h,hasChanged:d}}function Qh(e,o){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??o[r]??null]))}const qS=["7d","30d","90d","mtd","all"];function GS(){const[e,o]=HS({p:Wh(hu).withDefault([]),m:Wh(hu).withDefault([]),a:hu.withDefault("all"),period:VS(qS).withDefault(Bx.period)},{history:"replace"}),r=z.useMemo(()=>({providers:e.p,models:e.m,account:e.a,period:e.period}),[e.p,e.m,e.a,e.period]),i=z.useCallback(l=>{o(u=>{const d={providers:u.p,models:u.m,account:u.a,period:u.period},h=typeof l=="function"?l(d):l;return{p:h.providers,m:h.models,a:h.account,period:h.period}})},[o]);return[r,i]}function WS(){const[e,o]=z.useState(null),[r,i]=z.useState("connecting"),l=z.useRef(null);return z.useEffect(()=>{let u=!1,d;fetch("/api/data").then(p=>p.json()).then(p=>{u||!p||"pending"in p||o(p)}).catch(()=>{});const h=()=>{const p=new EventSource("/api/stream");l.current=p,p.onopen=()=>{u||i("live")},p.addEventListener("snapshot",m=>{if(!u)try{o(JSON.parse(m.data)),i("live")}catch{}}),p.onerror=()=>{u||(p.readyState===EventSource.CLOSED?(i("error"),p.close(),d=setTimeout(()=>{u||(i("reconnecting"),h())},3e3)):i("reconnecting"))}};return h(),()=>{var p;u=!0,clearTimeout(d),(p=l.current)==null||p.close(),l.current=null}},[]),{snapshot:e,conn:r}}const bu=e=>`/${e}`,pg=z.createContext(null),Wi=()=>{const e=z.useContext(pg);if(!e)throw new Error("useDashboard outside provider");return e};function QS(e=1e3){const[o,r]=z.useState(()=>Date.now());return z.useEffect(()=>{const i=setInterval(()=>r(Date.now()),e);return()=>clearInterval(i)},[e]),o}function KS(){const[e,o]=z.useState(()=>document.documentElement.classList.contains("light")?"light":"dark");return z.useEffect(()=>{document.documentElement.classList.toggle("light",e==="light")},[e]),[e,()=>{const i=e==="dark"?"light":"dark";try{localStorage.setItem("tokmon-theme",i)}catch{}o(i)}]}function XS({theme:e,onToggle:o}){return g.jsx("button",{type:"button",onClick:o,title:e==="dark"?"Switch to light":"Switch to dark","aria-label":"Toggle theme",className:"rounded border border-line bg-bg-1 p-1.5 text-fg-dim transition hover:border-line-2 hover:text-fg max-sm:p-2.5",children:e==="dark"?g.jsx(s0,{className:"size-3.5"}):g.jsx(i0,{className:"size-3.5"})})}function YS({conn:e,freshAt:o}){const r=QS(),i=e==="live"?"var(--color-positive)":e==="error"?"var(--color-warning)":"var(--color-cost)",l=o?iw(o,r):null,u=e==="live"?l??"live":e==="connecting"?"connecting…":e==="reconnecting"?l?`reconnecting · ${l}`:"reconnecting…":l?`offline · ${l}`:"offline";return g.jsxs("span",{className:"flex items-center gap-1.5 text-xs",role:"status","aria-label":e==="live"?"live":e,children:[g.jsxs("span",{className:"relative flex size-2",children:[e==="live"&&g.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full opacity-60",style:{background:i}}),g.jsx("span",{className:"relative inline-flex size-2 rounded-full",style:{background:i}})]}),g.jsx("span",{className:"inline-block truncate text-fg-dim max-sm:max-w-[7rem]","aria-hidden":!0,children:u})]})}function mu({label:e}){return g.jsxs("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-2 text-sm text-fg-dim",children:[g.jsxs("span",{className:"font-display text-lg text-fg-dim",children:["tokmon",g.jsx("span",{className:"cursor-blink text-accent",children:"▋"})]}),g.jsx("span",{className:"text-fg-faint",children:e})]})}function JS(){var A,B;const{snapshot:e,conn:o}=WS(),[r,i]=GS(),[l,u]=KS(),d=z.useMemo(()=>Xx(e,r),[e,r]),h=((A=Fp.find(L=>L.key===r.period))==null?void 0:A.label)??r.period,p=r.period==="all"?void 0:h,m=zx({select:L=>L.location.pathname}),y=((B=Gh.find(L=>bu(L.key)===m))==null?void 0:B.key)??"overview";z.useEffect(()=>{var K;if(!e)return;const L=new Set(e.providers.map(W=>W.id)),$=new Set(e.accounts.map(W=>W.id)),V=r.providers.filter(W=>L.has(W)),U=r.account==="all"||$.has(r.account)?r.account:"all",O=new Set;for(const W of e.accounts)for(const pe of((K=W.table)==null?void 0:K.monthly)??[])for(const ge of pe.breakdown)O.add(ge.name);const Y=O.size>0?r.models.filter(W=>O.has(W)):r.models;(V.length!==r.providers.length||U!==r.account||Y.length!==r.models.length)&&i(W=>({...W,providers:V,account:U,models:Y}))},[e,r,i]);const v=(e==null?void 0:e.accounts.filter(L=>L.hasUsage))??[],w=v.length>0,x=((e==null?void 0:e.accounts)??[]).some(Mu),C=((e==null?void 0:e.accounts)??[]).some(L=>L.hasBilling&&!Mu(L)),R=w&&v.every(L=>L.table!=null),k=z.useRef(!1);z.useEffect(()=>{R&&(k.current=!0)},[R]);const[_,M]=z.useState(!1);z.useEffect(()=>{const L=setTimeout(()=>M(!0),12e3);return()=>clearTimeout(L)},[]);const b=!w||R||k.current||_,I=z.useMemo(()=>e?{snapshot:e,filters:r,derived:d,periodLabel:h,scopeLabel:p}:null,[e,r,d,h,p]);return g.jsxs("div",{className:"min-h-screen",children:[g.jsxs("header",{className:"relative z-30 border-b border-line bg-bg-0/80 backdrop-blur",children:[g.jsxs("div",{className:"mx-auto max-w-[1600px] px-5 2xl:max-w-[1920px]",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3.5",children:[g.jsx("span",{className:"font-display text-2xl text-fg-bright",children:"TOKMON"}),g.jsxs("span",{className:"hidden text-sm text-fg-faint sm:inline",children:["~/usage ",g.jsx("span",{className:"text-prompt",children:"$"})," ",g.jsx("span",{className:"text-fg-dim",children:y}),g.jsx("span",{className:"cursor-blink text-accent",children:"▋"})]}),g.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-3",children:[g.jsx(YS,{conn:o,freshAt:(e==null?void 0:e.generatedAt)??null}),g.jsx(XS,{theme:l,onToggle:u}),b&&(w||x)&&g.jsx(mw,{derived:d,periodLabel:h,tz:(e==null?void 0:e.tz)??"",version:(e==null?void 0:e.version)??""})]})]}),g.jsx("nav",{className:"-mb-px flex items-center gap-1 overflow-x-auto",children:Gh.map(L=>g.jsx(qu,{to:bu(L.key),className:`relative shrink-0 border-b-2 px-3 py-2 font-display text-xs uppercase tracking-wider transition ${y===L.key?"border-accent text-fg-bright":"border-transparent text-fg-faint hover:text-fg-dim"}`,children:L.label},L.key))})]}),g.jsx(gw,{snapshot:e,derived:d,filters:r,setFilters:i})]}),g.jsx("main",{className:"mx-auto max-w-[1600px] px-5 2xl:max-w-[1920px] py-5",children:e?!w&&!x?C&&!_&&o!=="error"?g.jsx(mu,{label:"reading billing…"}):g.jsx("div",{className:"rounded-md border border-line bg-bg-1 p-8 text-center text-sm text-fg-dim",children:"No providers detected. Open tokmon, enable a provider, then refresh."}):!b||!I?g.jsx(mu,{label:o==="error"?"connection lost — retrying…":"reading usage history…"}):g.jsx(pg.Provider,{value:I,children:g.jsx(Ip,{})}):g.jsx(mu,{label:o==="error"?"connection lost — retrying…":"reading usage…"})}),g.jsxs("footer",{className:"mx-auto max-w-[1600px] px-5 2xl:max-w-[1920px] py-6 text-center text-[11px] text-fg-faint",children:["tokmon",e!=null&&e.version?` v${e.version}`:""," · by David Ilie · live LLM usage dashboard"]})]})}function Kh(){const{derived:e,periodLabel:o,scopeLabel:r,snapshot:i}=Wi();return g.jsx("div",{children:g.jsx(DS,{derived:e,periodLabel:o,scopeLabel:r,providers:i.providers})})}function ZS(){const{derived:e,scopeLabel:o}=Wi();return g.jsx("div",{children:g.jsx(zS,{derived:e,scopeLabel:o})})}function e1(){const{derived:e,scopeLabel:o}=Wi();return g.jsx("div",{children:g.jsx(AS,{derived:e,scopeLabel:o})})}function t1(){const{snapshot:e,filters:o,periodLabel:r}=Wi();return g.jsx("div",{children:g.jsx(OS,{snapshot:e,filters:o,periodLabel:r})})}const Du=Sx({component:JS}),ki=(e,o)=>Mp({getParentRoute:()=>Du,path:bu(e),component:o}),n1=Du.addChildren([Mp({getParentRoute:()=>Du,path:"/",component:Kh}),ki("overview",Kh),ki("analytics",ZS),ki("models",e1),ki("explore",t1)]),r1=Tx({routeTree:n1,history:Ly(),defaultViewTransition:!0});function o1(){return g.jsx(Dx,{router:r1})}Sv.createRoot(document.getElementById("root")).render(g.jsx(z.StrictMode,{children:g.jsx(qv,{children:g.jsx(fw,{children:g.jsx(o1,{})})})}));export{pw as E,Hi as P,Go as R,Mn as S,l1 as T,a1 as a,Pe as b,yt as c,Yp as d,i1 as e,Zo as f,hv as g,g as j,z as r,on as s};