@mcpspec/server 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +41 -1
- package/package.json +4 -4
- package/ui-dist/assets/index-Bo7hG4mU.css +1 -0
- package/ui-dist/assets/index-DxT3O3nb.js +351 -0
- package/ui-dist/assets/index-DxT3O3nb.js.map +1 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-Bet505kH.js +0 -346
- package/ui-dist/assets/index-Bet505kH.js.map +0 -1
- package/ui-dist/assets/index-DHdza0Ve.css +0 -1
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
var Lv=e=>{throw TypeError(e)};var Hf=(e,t,n)=>t.has(e)||Lv("Cannot "+n);var D=(e,t,n)=>(Hf(e,t,"read from private field"),n?n.call(e):t.get(e)),Pe=(e,t,n)=>t.has(e)?Lv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ye=(e,t,n,i)=>(Hf(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(Hf(e,t,"access private method"),n);var Wc=(e,t,n,i)=>({set _(o){ye(e,t,o,n)},get _(){return D(e,t,i)}});function X1(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();var Fv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kf={exports:{}},Xa={},Qf={exports:{}},Qe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Dv;function J1(){if(Dv)return Qe;Dv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=y&&M[y]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function C(M,G,Re){this.props=M,this.context=G,this.refs=S,this.updater=Re||w}C.prototype.isReactComponent={},C.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,G,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function P(){}P.prototype=C.prototype;function _(M,G,Re){this.props=M,this.context=G,this.refs=S,this.updater=Re||w}var E=_.prototype=new P;E.constructor=_,k(E,C.prototype),E.isPureReactComponent=!0;var R=Array.isArray,N=Object.prototype.hasOwnProperty,T={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function F(M,G,Re){var ge,Ne={},ne=null,se=null;if(G!=null)for(ge in G.ref!==void 0&&(se=G.ref),G.key!==void 0&&(ne=""+G.key),G)N.call(G,ge)&&!O.hasOwnProperty(ge)&&(Ne[ge]=G[ge]);var ve=arguments.length-2;if(ve===1)Ne.children=Re;else if(1<ve){for(var Oe=Array(ve),Te=0;Te<ve;Te++)Oe[Te]=arguments[Te+2];Ne.children=Oe}if(M&&M.defaultProps)for(ge in ve=M.defaultProps,ve)Ne[ge]===void 0&&(Ne[ge]=ve[ge]);return{$$typeof:e,type:M,key:ne,ref:se,props:Ne,_owner:T.current}}function L(M,G){return{$$typeof:e,type:M.type,key:G,ref:M.ref,props:M.props,_owner:M._owner}}function I(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function Q(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Re){return G[Re]})}var U=/\/+/g;function ee(M,G){return typeof M=="object"&&M!==null&&M.key!=null?Q(""+M.key):G.toString(36)}function te(M,G,Re,ge,Ne){var ne=typeof M;(ne==="undefined"||ne==="boolean")&&(M=null);var se=!1;if(M===null)se=!0;else switch(ne){case"string":case"number":se=!0;break;case"object":switch(M.$$typeof){case e:case t:se=!0}}if(se)return se=M,Ne=Ne(se),M=ge===""?"."+ee(se,0):ge,R(Ne)?(Re="",M!=null&&(Re=M.replace(U,"$&/")+"/"),te(Ne,G,Re,"",function(Te){return Te})):Ne!=null&&(I(Ne)&&(Ne=L(Ne,Re+(!Ne.key||se&&se.key===Ne.key?"":(""+Ne.key).replace(U,"$&/")+"/")+M)),G.push(Ne)),1;if(se=0,ge=ge===""?".":ge+":",R(M))for(var ve=0;ve<M.length;ve++){ne=M[ve];var Oe=ge+ee(ne,ve);se+=te(ne,G,Re,Oe,Ne)}else if(Oe=x(M),typeof Oe=="function")for(M=Oe.call(M),ve=0;!(ne=M.next()).done;)ne=ne.value,Oe=ge+ee(ne,ve++),se+=te(ne,G,Re,Oe,Ne);else if(ne==="object")throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return se}function ie(M,G,Re){if(M==null)return M;var ge=[],Ne=0;return te(M,ge,"","",function(ne){return G.call(Re,ne,Ne++)}),ge}function X(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(Re){(M._status===0||M._status===-1)&&(M._status=1,M._result=Re)},function(Re){(M._status===0||M._status===-1)&&(M._status=2,M._result=Re)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var oe={current:null},B={transition:null},J={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:B,ReactCurrentOwner:T};function Z(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:ie,forEach:function(M,G,Re){ie(M,function(){G.apply(this,arguments)},Re)},count:function(M){var G=0;return ie(M,function(){G++}),G},toArray:function(M){return ie(M,function(G){return G})||[]},only:function(M){if(!I(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Qe.Component=C,Qe.Fragment=n,Qe.Profiler=o,Qe.PureComponent=_,Qe.StrictMode=i,Qe.Suspense=h,Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Qe.act=Z,Qe.cloneElement=function(M,G,Re){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ge=k({},M.props),Ne=M.key,ne=M.ref,se=M._owner;if(G!=null){if(G.ref!==void 0&&(ne=G.ref,se=T.current),G.key!==void 0&&(Ne=""+G.key),M.type&&M.type.defaultProps)var ve=M.type.defaultProps;for(Oe in G)N.call(G,Oe)&&!O.hasOwnProperty(Oe)&&(ge[Oe]=G[Oe]===void 0&&ve!==void 0?ve[Oe]:G[Oe])}var Oe=arguments.length-2;if(Oe===1)ge.children=Re;else if(1<Oe){ve=Array(Oe);for(var Te=0;Te<Oe;Te++)ve[Te]=arguments[Te+2];ge.children=ve}return{$$typeof:e,type:M.type,key:Ne,ref:ne,props:ge,_owner:se}},Qe.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:l,_context:M},M.Consumer=M},Qe.createElement=F,Qe.createFactory=function(M){var G=F.bind(null,M);return G.type=M,G},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(M){return{$$typeof:c,render:M}},Qe.isValidElement=I,Qe.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:X}},Qe.memo=function(M,G){return{$$typeof:m,type:M,compare:G===void 0?null:G}},Qe.startTransition=function(M){var G=B.transition;B.transition={};try{M()}finally{B.transition=G}},Qe.unstable_act=Z,Qe.useCallback=function(M,G){return oe.current.useCallback(M,G)},Qe.useContext=function(M){return oe.current.useContext(M)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(M){return oe.current.useDeferredValue(M)},Qe.useEffect=function(M,G){return oe.current.useEffect(M,G)},Qe.useId=function(){return oe.current.useId()},Qe.useImperativeHandle=function(M,G,Re){return oe.current.useImperativeHandle(M,G,Re)},Qe.useInsertionEffect=function(M,G){return oe.current.useInsertionEffect(M,G)},Qe.useLayoutEffect=function(M,G){return oe.current.useLayoutEffect(M,G)},Qe.useMemo=function(M,G){return oe.current.useMemo(M,G)},Qe.useReducer=function(M,G,Re){return oe.current.useReducer(M,G,Re)},Qe.useRef=function(M){return oe.current.useRef(M)},Qe.useState=function(M){return oe.current.useState(M)},Qe.useSyncExternalStore=function(M,G,Re){return oe.current.useSyncExternalStore(M,G,Re)},Qe.useTransition=function(){return oe.current.useTransition()},Qe.version="18.3.1",Qe}var zv;function ua(){return zv||(zv=1,Qf.exports=J1()),Qf.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vv;function eC(){if(Vv)return Xa;Vv=1;var e=ua(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(c,h,m){var v,y={},x=null,w=null;m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(w=h.ref);for(v in h)i.call(h,v)&&!l.hasOwnProperty(v)&&(y[v]=h[v]);if(c&&c.defaultProps)for(v in h=c.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:t,type:c,key:x,ref:w,props:y,_owner:o.current}}return Xa.Fragment=n,Xa.jsx=u,Xa.jsxs=u,Xa}var $v;function tC(){return $v||($v=1,Kf.exports=eC()),Kf.exports}var f=tC(),b=ua();const st=zu(b),fp=X1({__proto__:null,default:st},[b]);var Hc={},Zf={exports:{}},Cn={},qf={exports:{}},Gf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Bv;function nC(){return Bv||(Bv=1,(function(e){function t(B,J){var Z=B.length;B.push(J);e:for(;0<Z;){var M=Z-1>>>1,G=B[M];if(0<o(G,J))B[M]=J,B[Z]=G,Z=M;else break e}}function n(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var J=B[0],Z=B.pop();if(Z!==J){B[0]=Z;e:for(var M=0,G=B.length,Re=G>>>1;M<Re;){var ge=2*(M+1)-1,Ne=B[ge],ne=ge+1,se=B[ne];if(0>o(Ne,Z))ne<G&&0>o(se,Ne)?(B[M]=se,B[ne]=Z,M=ne):(B[M]=Ne,B[ge]=Z,M=ge);else if(ne<G&&0>o(se,Z))B[M]=se,B[ne]=Z,M=ne;else break e}}return J}function o(B,J){var Z=B.sortIndex-J.sortIndex;return Z!==0?Z:B.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],m=[],v=1,y=null,x=3,w=!1,k=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(B){for(var J=n(m);J!==null;){if(J.callback===null)i(m);else if(J.startTime<=B)i(m),J.sortIndex=J.expirationTime,t(h,J);else break;J=n(m)}}function R(B){if(S=!1,E(B),!k)if(n(h)!==null)k=!0,X(N);else{var J=n(m);J!==null&&oe(R,J.startTime-B)}}function N(B,J){k=!1,S&&(S=!1,P(F),F=-1),w=!0;var Z=x;try{for(E(J),y=n(h);y!==null&&(!(y.expirationTime>J)||B&&!Q());){var M=y.callback;if(typeof M=="function"){y.callback=null,x=y.priorityLevel;var G=M(y.expirationTime<=J);J=e.unstable_now(),typeof G=="function"?y.callback=G:y===n(h)&&i(h),E(J)}else i(h);y=n(h)}if(y!==null)var Re=!0;else{var ge=n(m);ge!==null&&oe(R,ge.startTime-J),Re=!1}return Re}finally{y=null,x=Z,w=!1}}var T=!1,O=null,F=-1,L=5,I=-1;function Q(){return!(e.unstable_now()-I<L)}function U(){if(O!==null){var B=e.unstable_now();I=B;var J=!0;try{J=O(!0,B)}finally{J?ee():(T=!1,O=null)}}else T=!1}var ee;if(typeof _=="function")ee=function(){_(U)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ie=te.port2;te.port1.onmessage=U,ee=function(){ie.postMessage(null)}}else ee=function(){C(U,0)};function X(B){O=B,T||(T=!0,ee())}function oe(B,J){F=C(function(){B(e.unstable_now())},J)}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(B){B.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,X(N))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var Z=x;x=J;try{return B()}finally{x=Z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,J){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Z=x;x=B;try{return J()}finally{x=Z}},e.unstable_scheduleCallback=function(B,J,Z){var M=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?M+Z:M):Z=M,B){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Z+G,B={id:v++,callback:J,priorityLevel:B,startTime:Z,expirationTime:G,sortIndex:-1},Z>M?(B.sortIndex=Z,t(m,B),n(h)===null&&B===n(m)&&(S?(P(F),F=-1):S=!0,oe(R,Z-M))):(B.sortIndex=G,t(h,B),k||w||(k=!0,X(N))),B},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(B){var J=x;return function(){var Z=x;x=J;try{return B.apply(this,arguments)}finally{x=Z}}}})(Gf)),Gf}var Uv;function rC(){return Uv||(Uv=1,qf.exports=nC()),qf.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Wv;function sC(){if(Wv)return Cn;Wv=1;var e=ua(),t=rC();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){u(r,s),u(r+"Capture",s)}function u(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=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]*$/,v={},y={};function x(r){return h.call(y,r)?!0:h.call(v,r)?!1:m.test(r)?y[r]=!0:(v[r]=!0,!1)}function w(r,s,a,d){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,s,a,d){if(s===null||typeof s>"u"||w(r,s,a,d))return!0;if(d)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(r,s,a,d,p,g,j){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=r,this.type=s,this.sanitizeURL=g,this.removeEmptyString=j}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){C[r]=new S(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];C[s]=new S(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){C[r]=new S(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){C[r]=new S(r,2,!1,r,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(r){C[r]=new S(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){C[r]=new S(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){C[r]=new S(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){C[r]=new S(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){C[r]=new S(r,5,!1,r.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function _(r){return r[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(r){var s=r.replace(P,_);C[s]=new S(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(P,_);C[s]=new S(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(P,_);C[s]=new S(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,s,a,d){var p=C.hasOwnProperty(s)?C[s]:null;(p!==null?p.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,a,p,d)&&(a=null),d||p===null?x(s)&&(a===null?r.removeAttribute(s):r.setAttribute(s,""+a)):p.mustUseProperty?r[p.propertyName]=a===null?p.type===3?!1:"":a:(s=p.attributeName,d=p.attributeNamespace,a===null?r.removeAttribute(s):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,d?r.setAttributeNS(d,s,a):r.setAttribute(s,a))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),Q=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),B=Symbol.iterator;function J(r){return r===null||typeof r!="object"?null:(r=B&&r[B]||r["@@iterator"],typeof r=="function"?r:null)}var Z=Object.assign,M;function G(r){if(M===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
34
|
+
`+M+r}var Re=!1;function ge(r,s){if(!r||Re)return"";Re=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(q){var d=q}Reflect.construct(r,[],s)}else{try{s.call()}catch(q){d=q}r.call(s.prototype)}else{try{throw Error()}catch(q){d=q}r()}}catch(q){if(q&&d&&typeof q.stack=="string"){for(var p=q.stack.split(`
|
|
35
|
+
`),g=d.stack.split(`
|
|
36
|
+
`),j=p.length-1,A=g.length-1;1<=j&&0<=A&&p[j]!==g[A];)A--;for(;1<=j&&0<=A;j--,A--)if(p[j]!==g[A]){if(j!==1||A!==1)do if(j--,A--,0>A||p[j]!==g[A]){var V=`
|
|
37
|
+
`+p[j].replace(" at new "," at ");return r.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",r.displayName)),V}while(1<=j&&0<=A);break}}}finally{Re=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?G(r):""}function Ne(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function ne(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case O:return"Fragment";case T:return"Portal";case L:return"Profiler";case F:return"StrictMode";case ee:return"Suspense";case te:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Q:return(r.displayName||"Context")+".Consumer";case I:return(r._context.displayName||"Context")+".Provider";case U:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ie:return s=r.displayName||null,s!==null?s:ne(r.type)||"Memo";case X:s=r._payload,r=r._init;try{return ne(r(s))}catch{}}return null}function se(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(s);case 8:return s===F?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function ve(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Oe(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Te(r){var s=Oe(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,g=a.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return p.call(this)},set:function(j){d=""+j,g.call(this,j)}}),Object.defineProperty(r,s,{enumerable:a.enumerable}),{getValue:function(){return d},setValue:function(j){d=""+j},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Le(r){r._valueTracker||(r._valueTracker=Te(r))}function Ue(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var a=s.getValue(),d="";return r&&(d=Oe(r)?r.checked?"true":"false":r.value),r=d,r!==a?(s.setValue(r),!0):!1}function dt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Mt(r,s){var a=s.checked;return Z({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function tn(r,s){var a=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;a=ve(s.value!=null?s.value:a),r._wrapperState={initialChecked:d,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Yt(r,s){s=s.checked,s!=null&&E(r,"checked",s,!1)}function Dt(r,s){Yt(r,s);var a=ve(s.value),d=s.type;if(a!=null)d==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Nt(r,s.type,a):s.hasOwnProperty("defaultValue")&&Nt(r,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function et(r,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,a||s===r.value||(r.value=s),r.defaultValue=s}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function Nt(r,s,a){(s!=="number"||dt(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var Nn=Array.isArray;function z(r,s,a,d){if(r=r.options,s){s={};for(var p=0;p<a.length;p++)s["$"+a[p]]=!0;for(a=0;a<r.length;a++)p=s.hasOwnProperty("$"+r[a].value),r[a].selected!==p&&(r[a].selected=p),p&&d&&(r[a].defaultSelected=!0)}else{for(a=""+ve(a),s=null,p=0;p<r.length;p++){if(r[p].value===a){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}s!==null||r[p].disabled||(s=r[p])}s!==null&&(s.selected=!0)}}function H(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return Z({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Y(r,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(n(92));if(Nn(a)){if(1<a.length)throw Error(n(93));a=a[0]}s=a}s==null&&(s=""),a=s}r._wrapperState={initialValue:ve(a)}}function me(r,s){var a=ve(s.value),d=ve(s.defaultValue);a!=null&&(a=""+a,a!==r.value&&(r.value=a),s.defaultValue==null&&r.defaultValue!==a&&(r.defaultValue=a)),d!=null&&(r.defaultValue=""+d)}function ue(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function re(r){switch(r){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 pe(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?re(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Me,$e=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,d,p){MSApp.execUnsafeLocalFunction(function(){return r(s,a,d,p)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Me=Me||document.createElement("div"),Me.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Me.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function _t(r,s){if(s){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=s;return}}r.textContent=s}var fn={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},Kn=["Webkit","ms","Moz","O"];Object.keys(fn).forEach(function(r){Kn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),fn[s]=fn[r]})});function lo(r,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||fn.hasOwnProperty(r)&&fn[r]?(""+s).trim():s+"px"}function he(r,s){r=r.style;for(var a in s)if(s.hasOwnProperty(a)){var d=a.indexOf("--")===0,p=lo(a,s[a],d);a==="float"&&(a="cssFloat"),d?r.setProperty(a,p):r[a]=p}}var Ge=Z({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 Ve(r,s){if(s){if(Ge[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Be(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 vt=null;function Tt(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Tn=null,Qn=null,Zn=null;function Hr(r){if(r=Fa(r)){if(typeof Tn!="function")throw Error(n(280));var s=r.stateNode;s&&(s=ic(s),Tn(r.stateNode,r.type,s))}}function On(r){Qn?Zn?Zn.push(r):Zn=[r]:Qn=r}function ar(){if(Qn){var r=Qn,s=Zn;if(Zn=Qn=null,Hr(r),s)for(r=0;r<s.length;r++)Hr(s[r])}}function Ss(r,s){return r(s)}function nn(){}var Kr=!1;function Dl(r,s,a){if(Kr)return r(s,a);Kr=!0;try{return Ss(r,s,a)}finally{Kr=!1,(Qn!==null||Zn!==null)&&(nn(),ar())}}function Qr(r,s){var a=r.stateNode;if(a===null)return null;var d=ic(a);if(d===null)return null;a=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(n(231,s,typeof a));return a}var bs=!1;if(c)try{var Cs={};Object.defineProperty(Cs,"passive",{get:function(){bs=!0}}),window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch{bs=!1}function lr(r,s,a,d,p,g,j,A,V){var q=Array.prototype.slice.call(arguments,3);try{s.apply(a,q)}catch(le){this.onError(le)}}var cr=!1,Si=null,bi=!1,co=null,ib={onError:function(r){cr=!0,Si=r}};function ob(r,s,a,d,p,g,j,A,V){cr=!1,Si=null,lr.apply(ib,arguments)}function ab(r,s,a,d,p,g,j,A,V){if(ob.apply(this,arguments),cr){if(cr){var q=Si;cr=!1,Si=null}else throw Error(n(198));bi||(bi=!0,co=q)}}function Ci(r){var s=r,a=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(a=s.return),r=s.return;while(r)}return s.tag===3?a:null}function im(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function om(r){if(Ci(r)!==r)throw Error(n(188))}function lb(r){var s=r.alternate;if(!s){if(s=Ci(r),s===null)throw Error(n(188));return s!==r?null:r}for(var a=r,d=s;;){var p=a.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){a=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===a)return om(p),r;if(g===d)return om(p),s;g=g.sibling}throw Error(n(188))}if(a.return!==d.return)a=p,d=g;else{for(var j=!1,A=p.child;A;){if(A===a){j=!0,a=p,d=g;break}if(A===d){j=!0,d=p,a=g;break}A=A.sibling}if(!j){for(A=g.child;A;){if(A===a){j=!0,a=g,d=p;break}if(A===d){j=!0,d=g,a=p;break}A=A.sibling}if(!j)throw Error(n(189))}}if(a.alternate!==d)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?r:s}function am(r){return r=lb(r),r!==null?lm(r):null}function lm(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=lm(r);if(s!==null)return s;r=r.sibling}return null}var cm=t.unstable_scheduleCallback,um=t.unstable_cancelCallback,cb=t.unstable_shouldYield,ub=t.unstable_requestPaint,Lt=t.unstable_now,db=t.unstable_getCurrentPriorityLevel,ud=t.unstable_ImmediatePriority,dm=t.unstable_UserBlockingPriority,zl=t.unstable_NormalPriority,fb=t.unstable_LowPriority,fm=t.unstable_IdlePriority,Vl=null,Er=null;function hb(r){if(Er&&typeof Er.onCommitFiberRoot=="function")try{Er.onCommitFiberRoot(Vl,r,void 0,(r.current.flags&128)===128)}catch{}}var ur=Math.clz32?Math.clz32:gb,pb=Math.log,mb=Math.LN2;function gb(r){return r>>>=0,r===0?32:31-(pb(r)/mb|0)|0}var $l=64,Bl=4194304;function xa(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ul(r,s){var a=r.pendingLanes;if(a===0)return 0;var d=0,p=r.suspendedLanes,g=r.pingedLanes,j=a&268435455;if(j!==0){var A=j&~p;A!==0?d=xa(A):(g&=j,g!==0&&(d=xa(g)))}else j=a&~p,j!==0?d=xa(j):g!==0&&(d=xa(g));if(d===0)return 0;if(s!==0&&s!==d&&(s&p)===0&&(p=d&-d,g=s&-s,p>=g||p===16&&(g&4194240)!==0))return s;if((d&4)!==0&&(d|=a&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)a=31-ur(s),p=1<<a,d|=r[a],s&=~p;return d}function vb(r,s){switch(r){case 1:case 2:case 4:return s+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 s+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 yb(r,s){for(var a=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes;0<g;){var j=31-ur(g),A=1<<j,V=p[j];V===-1?((A&a)===0||(A&d)!==0)&&(p[j]=vb(A,s)):V<=s&&(r.expiredLanes|=A),g&=~A}}function dd(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function hm(){var r=$l;return $l<<=1,($l&4194240)===0&&($l=64),r}function fd(r){for(var s=[],a=0;31>a;a++)s.push(r);return s}function wa(r,s,a){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-ur(s),r[s]=a}function xb(r,s){var a=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<a;){var p=31-ur(a),g=1<<p;s[p]=0,d[p]=-1,r[p]=-1,a&=~g}}function hd(r,s){var a=r.entangledLanes|=s;for(r=r.entanglements;a;){var d=31-ur(a),p=1<<d;p&s|r[d]&s&&(r[d]|=s),a&=~p}}var mt=0;function pm(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var mm,pd,gm,vm,ym,md=!1,Wl=[],_s=null,ks=null,js=null,Sa=new Map,ba=new Map,Es=[],wb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xm(r,s){switch(r){case"focusin":case"focusout":_s=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":Sa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ba.delete(s.pointerId)}}function Ca(r,s,a,d,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:s,domEventName:a,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},s!==null&&(s=Fa(s),s!==null&&pd(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),r)}function Sb(r,s,a,d,p){switch(s){case"focusin":return _s=Ca(_s,r,s,a,d,p),!0;case"dragenter":return ks=Ca(ks,r,s,a,d,p),!0;case"mouseover":return js=Ca(js,r,s,a,d,p),!0;case"pointerover":var g=p.pointerId;return Sa.set(g,Ca(Sa.get(g)||null,r,s,a,d,p)),!0;case"gotpointercapture":return g=p.pointerId,ba.set(g,Ca(ba.get(g)||null,r,s,a,d,p)),!0}return!1}function wm(r){var s=_i(r.target);if(s!==null){var a=Ci(s);if(a!==null){if(s=a.tag,s===13){if(s=im(a),s!==null){r.blockedOn=s,ym(r.priority,function(){gm(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Hl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var a=vd(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(a===null){a=r.nativeEvent;var d=new a.constructor(a.type,a);vt=d,a.target.dispatchEvent(d),vt=null}else return s=Fa(a),s!==null&&pd(s),r.blockedOn=a,!1;s.shift()}return!0}function Sm(r,s,a){Hl(r)&&a.delete(s)}function bb(){md=!1,_s!==null&&Hl(_s)&&(_s=null),ks!==null&&Hl(ks)&&(ks=null),js!==null&&Hl(js)&&(js=null),Sa.forEach(Sm),ba.forEach(Sm)}function _a(r,s){r.blockedOn===s&&(r.blockedOn=null,md||(md=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bb)))}function ka(r){function s(p){return _a(p,r)}if(0<Wl.length){_a(Wl[0],r);for(var a=1;a<Wl.length;a++){var d=Wl[a];d.blockedOn===r&&(d.blockedOn=null)}}for(_s!==null&&_a(_s,r),ks!==null&&_a(ks,r),js!==null&&_a(js,r),Sa.forEach(s),ba.forEach(s),a=0;a<Es.length;a++)d=Es[a],d.blockedOn===r&&(d.blockedOn=null);for(;0<Es.length&&(a=Es[0],a.blockedOn===null);)wm(a),a.blockedOn===null&&Es.shift()}var uo=R.ReactCurrentBatchConfig,Kl=!0;function Cb(r,s,a,d){var p=mt,g=uo.transition;uo.transition=null;try{mt=1,gd(r,s,a,d)}finally{mt=p,uo.transition=g}}function _b(r,s,a,d){var p=mt,g=uo.transition;uo.transition=null;try{mt=4,gd(r,s,a,d)}finally{mt=p,uo.transition=g}}function gd(r,s,a,d){if(Kl){var p=vd(r,s,a,d);if(p===null)Id(r,s,d,Ql,a),xm(r,d);else if(Sb(p,r,s,a,d))d.stopPropagation();else if(xm(r,d),s&4&&-1<wb.indexOf(r)){for(;p!==null;){var g=Fa(p);if(g!==null&&mm(g),g=vd(r,s,a,d),g===null&&Id(r,s,d,Ql,a),g===p)break;p=g}p!==null&&d.stopPropagation()}else Id(r,s,d,null,a)}}var Ql=null;function vd(r,s,a,d){if(Ql=null,r=Tt(d),r=_i(r),r!==null)if(s=Ci(r),s===null)r=null;else if(a=s.tag,a===13){if(r=im(s),r!==null)return r;r=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Ql=r,null}function bm(r){switch(r){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(db()){case ud:return 1;case dm:return 4;case zl:case fb:return 16;case fm:return 536870912;default:return 16}default:return 16}}var Rs=null,yd=null,Zl=null;function Cm(){if(Zl)return Zl;var r,s=yd,a=s.length,d,p="value"in Rs?Rs.value:Rs.textContent,g=p.length;for(r=0;r<a&&s[r]===p[r];r++);var j=a-r;for(d=1;d<=j&&s[a-d]===p[g-d];d++);return Zl=p.slice(r,1<d?1-d:void 0)}function ql(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Gl(){return!0}function _m(){return!1}function An(r){function s(a,d,p,g,j){this._reactName=a,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=j,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(a=r[A],this[A]=a?a(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Gl:_m,this.isPropagationStopped=_m,this}return Z(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),s}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xd=An(fo),ja=Z({},fo,{view:0,detail:0}),kb=An(ja),wd,Sd,Ea,Yl=Z({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ea&&(Ea&&r.type==="mousemove"?(wd=r.screenX-Ea.screenX,Sd=r.screenY-Ea.screenY):Sd=wd=0,Ea=r),wd)},movementY:function(r){return"movementY"in r?r.movementY:Sd}}),km=An(Yl),jb=Z({},Yl,{dataTransfer:0}),Eb=An(jb),Rb=Z({},ja,{relatedTarget:0}),bd=An(Rb),Pb=Z({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Nb=An(Pb),Tb=Z({},fo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Ob=An(Tb),Ab=Z({},fo,{data:0}),jm=An(Ab),Ib={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mb={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"},Lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fb(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=Lb[r])?!!s[r]:!1}function Cd(){return Fb}var Db=Z({},ja,{key:function(r){if(r.key){var s=Ib[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ql(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Mb[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cd,charCode:function(r){return r.type==="keypress"?ql(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ql(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),zb=An(Db),Vb=Z({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Em=An(Vb),$b=Z({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cd}),Bb=An($b),Ub=Z({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wb=An(Ub),Hb=Z({},Yl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Kb=An(Hb),Qb=[9,13,27,32],_d=c&&"CompositionEvent"in window,Ra=null;c&&"documentMode"in document&&(Ra=document.documentMode);var Zb=c&&"TextEvent"in window&&!Ra,Rm=c&&(!_d||Ra&&8<Ra&&11>=Ra),Pm=" ",Nm=!1;function Tm(r,s){switch(r){case"keyup":return Qb.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ho=!1;function qb(r,s){switch(r){case"compositionend":return Om(s);case"keypress":return s.which!==32?null:(Nm=!0,Pm);case"textInput":return r=s.data,r===Pm&&Nm?null:r;default:return null}}function Gb(r,s){if(ho)return r==="compositionend"||!_d&&Tm(r,s)?(r=Cm(),Zl=yd=Rs=null,ho=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Rm&&s.locale!=="ko"?null:s.data;default:return null}}var Yb={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 Am(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Yb[r.type]:s==="textarea"}function Im(r,s,a,d){On(d),s=nc(s,"onChange"),0<s.length&&(a=new xd("onChange","change",null,a,d),r.push({event:a,listeners:s}))}var Pa=null,Na=null;function Xb(r){Xm(r,0)}function Xl(r){var s=yo(r);if(Ue(s))return r}function Jb(r,s){if(r==="change")return s}var Mm=!1;if(c){var kd;if(c){var jd="oninput"in document;if(!jd){var Lm=document.createElement("div");Lm.setAttribute("oninput","return;"),jd=typeof Lm.oninput=="function"}kd=jd}else kd=!1;Mm=kd&&(!document.documentMode||9<document.documentMode)}function Fm(){Pa&&(Pa.detachEvent("onpropertychange",Dm),Na=Pa=null)}function Dm(r){if(r.propertyName==="value"&&Xl(Na)){var s=[];Im(s,Na,r,Tt(r)),Dl(Xb,s)}}function e1(r,s,a){r==="focusin"?(Fm(),Pa=s,Na=a,Pa.attachEvent("onpropertychange",Dm)):r==="focusout"&&Fm()}function t1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Xl(Na)}function n1(r,s){if(r==="click")return Xl(s)}function r1(r,s){if(r==="input"||r==="change")return Xl(s)}function s1(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var dr=typeof Object.is=="function"?Object.is:s1;function Ta(r,s){if(dr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var a=Object.keys(r),d=Object.keys(s);if(a.length!==d.length)return!1;for(d=0;d<a.length;d++){var p=a[d];if(!h.call(s,p)||!dr(r[p],s[p]))return!1}return!0}function zm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Vm(r,s){var a=zm(r);r=0;for(var d;a;){if(a.nodeType===3){if(d=r+a.textContent.length,r<=s&&d>=s)return{node:a,offset:s-r};r=d}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zm(a)}}function $m(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?$m(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Bm(){for(var r=window,s=dt();s instanceof r.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)r=s.contentWindow;else break;s=dt(r.document)}return s}function Ed(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function i1(r){var s=Bm(),a=r.focusedElem,d=r.selectionRange;if(s!==a&&a&&a.ownerDocument&&$m(a.ownerDocument.documentElement,a)){if(d!==null&&Ed(a)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(r,a.value.length);else if(r=(s=a.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var p=a.textContent.length,g=Math.min(d.start,p);d=d.end===void 0?g:Math.min(d.end,p),!r.extend&&g>d&&(p=d,d=g,g=p),p=Vm(a,g);var j=Vm(a,d);p&&j&&(r.rangeCount!==1||r.anchorNode!==p.node||r.anchorOffset!==p.offset||r.focusNode!==j.node||r.focusOffset!==j.offset)&&(s=s.createRange(),s.setStart(p.node,p.offset),r.removeAllRanges(),g>d?(r.addRange(s),r.extend(j.node,j.offset)):(s.setEnd(j.node,j.offset),r.addRange(s)))}}for(s=[],r=a;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)r=s[a],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var o1=c&&"documentMode"in document&&11>=document.documentMode,po=null,Rd=null,Oa=null,Pd=!1;function Um(r,s,a){var d=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pd||po==null||po!==dt(d)||(d=po,"selectionStart"in d&&Ed(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Oa&&Ta(Oa,d)||(Oa=d,d=nc(Rd,"onSelect"),0<d.length&&(s=new xd("onSelect","select",null,s,a),r.push({event:s,listeners:d}),s.target=po)))}function Jl(r,s){var a={};return a[r.toLowerCase()]=s.toLowerCase(),a["Webkit"+r]="webkit"+s,a["Moz"+r]="moz"+s,a}var mo={animationend:Jl("Animation","AnimationEnd"),animationiteration:Jl("Animation","AnimationIteration"),animationstart:Jl("Animation","AnimationStart"),transitionend:Jl("Transition","TransitionEnd")},Nd={},Wm={};c&&(Wm=document.createElement("div").style,"AnimationEvent"in window||(delete mo.animationend.animation,delete mo.animationiteration.animation,delete mo.animationstart.animation),"TransitionEvent"in window||delete mo.transitionend.transition);function ec(r){if(Nd[r])return Nd[r];if(!mo[r])return r;var s=mo[r],a;for(a in s)if(s.hasOwnProperty(a)&&a in Wm)return Nd[r]=s[a];return r}var Hm=ec("animationend"),Km=ec("animationiteration"),Qm=ec("animationstart"),Zm=ec("transitionend"),qm=new Map,Gm="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 Ps(r,s){qm.set(r,s),l(s,[r])}for(var Td=0;Td<Gm.length;Td++){var Od=Gm[Td],a1=Od.toLowerCase(),l1=Od[0].toUpperCase()+Od.slice(1);Ps(a1,"on"+l1)}Ps(Hm,"onAnimationEnd"),Ps(Km,"onAnimationIteration"),Ps(Qm,"onAnimationStart"),Ps("dblclick","onDoubleClick"),Ps("focusin","onFocus"),Ps("focusout","onBlur"),Ps(Zm,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Aa="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(" "),c1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Aa));function Ym(r,s,a){var d=r.type||"unknown-event";r.currentTarget=a,ab(d,s,void 0,r),r.currentTarget=null}function Xm(r,s){s=(s&4)!==0;for(var a=0;a<r.length;a++){var d=r[a],p=d.event;d=d.listeners;e:{var g=void 0;if(s)for(var j=d.length-1;0<=j;j--){var A=d[j],V=A.instance,q=A.currentTarget;if(A=A.listener,V!==g&&p.isPropagationStopped())break e;Ym(p,A,q),g=V}else for(j=0;j<d.length;j++){if(A=d[j],V=A.instance,q=A.currentTarget,A=A.listener,V!==g&&p.isPropagationStopped())break e;Ym(p,A,q),g=V}}}if(bi)throw r=co,bi=!1,co=null,r}function xt(r,s){var a=s[Vd];a===void 0&&(a=s[Vd]=new Set);var d=r+"__bubble";a.has(d)||(Jm(s,r,2,!1),a.add(d))}function Ad(r,s,a){var d=0;s&&(d|=4),Jm(a,r,d,s)}var tc="_reactListening"+Math.random().toString(36).slice(2);function Ia(r){if(!r[tc]){r[tc]=!0,i.forEach(function(a){a!=="selectionchange"&&(c1.has(a)||Ad(a,!1,r),Ad(a,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[tc]||(s[tc]=!0,Ad("selectionchange",!1,s))}}function Jm(r,s,a,d){switch(bm(s)){case 1:var p=Cb;break;case 4:p=_b;break;default:p=gd}a=p.bind(null,s,a,r),p=void 0,!bs||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(s,a,{capture:!0,passive:p}):r.addEventListener(s,a,!0):p!==void 0?r.addEventListener(s,a,{passive:p}):r.addEventListener(s,a,!1)}function Id(r,s,a,d,p){var g=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var j=d.tag;if(j===3||j===4){var A=d.stateNode.containerInfo;if(A===p||A.nodeType===8&&A.parentNode===p)break;if(j===4)for(j=d.return;j!==null;){var V=j.tag;if((V===3||V===4)&&(V=j.stateNode.containerInfo,V===p||V.nodeType===8&&V.parentNode===p))return;j=j.return}for(;A!==null;){if(j=_i(A),j===null)return;if(V=j.tag,V===5||V===6){d=g=j;continue e}A=A.parentNode}}d=d.return}Dl(function(){var q=g,le=Tt(a),ce=[];e:{var ae=qm.get(r);if(ae!==void 0){var xe=xd,be=r;switch(r){case"keypress":if(ql(a)===0)break e;case"keydown":case"keyup":xe=zb;break;case"focusin":be="focus",xe=bd;break;case"focusout":be="blur",xe=bd;break;case"beforeblur":case"afterblur":xe=bd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=km;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=Eb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=Bb;break;case Hm:case Km:case Qm:xe=Nb;break;case Zm:xe=Wb;break;case"scroll":xe=kb;break;case"wheel":xe=Kb;break;case"copy":case"cut":case"paste":xe=Ob;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Em}var _e=(s&4)!==0,Ft=!_e&&r==="scroll",W=_e?ae!==null?ae+"Capture":null:ae;_e=[];for(var $=q,K;$!==null;){K=$;var de=K.stateNode;if(K.tag===5&&de!==null&&(K=de,W!==null&&(de=Qr($,W),de!=null&&_e.push(Ma($,de,K)))),Ft)break;$=$.return}0<_e.length&&(ae=new xe(ae,be,null,a,le),ce.push({event:ae,listeners:_e}))}}if((s&7)===0){e:{if(ae=r==="mouseover"||r==="pointerover",xe=r==="mouseout"||r==="pointerout",ae&&a!==vt&&(be=a.relatedTarget||a.fromElement)&&(_i(be)||be[Zr]))break e;if((xe||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,xe?(be=a.relatedTarget||a.toElement,xe=q,be=be?_i(be):null,be!==null&&(Ft=Ci(be),be!==Ft||be.tag!==5&&be.tag!==6)&&(be=null)):(xe=null,be=q),xe!==be)){if(_e=km,de="onMouseLeave",W="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(_e=Em,de="onPointerLeave",W="onPointerEnter",$="pointer"),Ft=xe==null?ae:yo(xe),K=be==null?ae:yo(be),ae=new _e(de,$+"leave",xe,a,le),ae.target=Ft,ae.relatedTarget=K,de=null,_i(le)===q&&(_e=new _e(W,$+"enter",be,a,le),_e.target=K,_e.relatedTarget=Ft,de=_e),Ft=de,xe&&be)t:{for(_e=xe,W=be,$=0,K=_e;K;K=go(K))$++;for(K=0,de=W;de;de=go(de))K++;for(;0<$-K;)_e=go(_e),$--;for(;0<K-$;)W=go(W),K--;for(;$--;){if(_e===W||W!==null&&_e===W.alternate)break t;_e=go(_e),W=go(W)}_e=null}else _e=null;xe!==null&&eg(ce,ae,xe,_e,!1),be!==null&&Ft!==null&&eg(ce,Ft,be,_e,!0)}}e:{if(ae=q?yo(q):window,xe=ae.nodeName&&ae.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ae.type==="file")var je=Jb;else if(Am(ae))if(Mm)je=r1;else{je=t1;var Ae=e1}else(xe=ae.nodeName)&&xe.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(je=n1);if(je&&(je=je(r,q))){Im(ce,je,a,le);break e}Ae&&Ae(r,ae,q),r==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&Nt(ae,"number",ae.value)}switch(Ae=q?yo(q):window,r){case"focusin":(Am(Ae)||Ae.contentEditable==="true")&&(po=Ae,Rd=q,Oa=null);break;case"focusout":Oa=Rd=po=null;break;case"mousedown":Pd=!0;break;case"contextmenu":case"mouseup":case"dragend":Pd=!1,Um(ce,a,le);break;case"selectionchange":if(o1)break;case"keydown":case"keyup":Um(ce,a,le)}var Ie;if(_d)e:{switch(r){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else ho?Tm(r,a)&&(Fe="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(Rm&&a.locale!=="ko"&&(ho||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&ho&&(Ie=Cm()):(Rs=le,yd="value"in Rs?Rs.value:Rs.textContent,ho=!0)),Ae=nc(q,Fe),0<Ae.length&&(Fe=new jm(Fe,r,null,a,le),ce.push({event:Fe,listeners:Ae}),Ie?Fe.data=Ie:(Ie=Om(a),Ie!==null&&(Fe.data=Ie)))),(Ie=Zb?qb(r,a):Gb(r,a))&&(q=nc(q,"onBeforeInput"),0<q.length&&(le=new jm("onBeforeInput","beforeinput",null,a,le),ce.push({event:le,listeners:q}),le.data=Ie))}Xm(ce,s)})}function Ma(r,s,a){return{instance:r,listener:s,currentTarget:a}}function nc(r,s){for(var a=s+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Qr(r,a),g!=null&&d.unshift(Ma(r,g,p)),g=Qr(r,s),g!=null&&d.push(Ma(r,g,p))),r=r.return}return d}function go(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function eg(r,s,a,d,p){for(var g=s._reactName,j=[];a!==null&&a!==d;){var A=a,V=A.alternate,q=A.stateNode;if(V!==null&&V===d)break;A.tag===5&&q!==null&&(A=q,p?(V=Qr(a,g),V!=null&&j.unshift(Ma(a,V,A))):p||(V=Qr(a,g),V!=null&&j.push(Ma(a,V,A)))),a=a.return}j.length!==0&&r.push({event:s,listeners:j})}var u1=/\r\n?/g,d1=/\u0000|\uFFFD/g;function tg(r){return(typeof r=="string"?r:""+r).replace(u1,`
|
|
38
|
+
`).replace(d1,"")}function rc(r,s,a){if(s=tg(s),tg(r)!==s&&a)throw Error(n(425))}function sc(){}var Md=null,Ld=null;function Fd(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Dd=typeof setTimeout=="function"?setTimeout:void 0,f1=typeof clearTimeout=="function"?clearTimeout:void 0,ng=typeof Promise=="function"?Promise:void 0,h1=typeof queueMicrotask=="function"?queueMicrotask:typeof ng<"u"?function(r){return ng.resolve(null).then(r).catch(p1)}:Dd;function p1(r){setTimeout(function(){throw r})}function zd(r,s){var a=s,d=0;do{var p=a.nextSibling;if(r.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(d===0){r.removeChild(p),ka(s);return}d--}else a!=="$"&&a!=="$?"&&a!=="$!"||d++;a=p}while(a);ka(s)}function Ns(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function rg(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return r;s--}else a==="/$"&&s++}r=r.previousSibling}return null}var vo=Math.random().toString(36).slice(2),Rr="__reactFiber$"+vo,La="__reactProps$"+vo,Zr="__reactContainer$"+vo,Vd="__reactEvents$"+vo,m1="__reactListeners$"+vo,g1="__reactHandles$"+vo;function _i(r){var s=r[Rr];if(s)return s;for(var a=r.parentNode;a;){if(s=a[Zr]||a[Rr]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(r=rg(r);r!==null;){if(a=r[Rr])return a;r=rg(r)}return s}r=a,a=r.parentNode}return null}function Fa(r){return r=r[Rr]||r[Zr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function yo(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ic(r){return r[La]||null}var $d=[],xo=-1;function Ts(r){return{current:r}}function wt(r){0>xo||(r.current=$d[xo],$d[xo]=null,xo--)}function yt(r,s){xo++,$d[xo]=r.current,r.current=s}var Os={},rn=Ts(Os),yn=Ts(!1),ki=Os;function wo(r,s){var a=r.type.contextTypes;if(!a)return Os;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in a)p[g]=s[g];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=p),p}function xn(r){return r=r.childContextTypes,r!=null}function oc(){wt(yn),wt(rn)}function sg(r,s,a){if(rn.current!==Os)throw Error(n(168));yt(rn,s),yt(yn,a)}function ig(r,s,a){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return a;d=d.getChildContext();for(var p in d)if(!(p in s))throw Error(n(108,se(r)||"Unknown",p));return Z({},a,d)}function ac(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Os,ki=rn.current,yt(rn,r),yt(yn,yn.current),!0}function og(r,s,a){var d=r.stateNode;if(!d)throw Error(n(169));a?(r=ig(r,s,ki),d.__reactInternalMemoizedMergedChildContext=r,wt(yn),wt(rn),yt(rn,r)):wt(yn),yt(yn,a)}var qr=null,lc=!1,Bd=!1;function ag(r){qr===null?qr=[r]:qr.push(r)}function v1(r){lc=!0,ag(r)}function As(){if(!Bd&&qr!==null){Bd=!0;var r=0,s=mt;try{var a=qr;for(mt=1;r<a.length;r++){var d=a[r];do d=d(!0);while(d!==null)}qr=null,lc=!1}catch(p){throw qr!==null&&(qr=qr.slice(r+1)),cm(ud,As),p}finally{mt=s,Bd=!1}}return null}var So=[],bo=0,cc=null,uc=0,qn=[],Gn=0,ji=null,Gr=1,Yr="";function Ei(r,s){So[bo++]=uc,So[bo++]=cc,cc=r,uc=s}function lg(r,s,a){qn[Gn++]=Gr,qn[Gn++]=Yr,qn[Gn++]=ji,ji=r;var d=Gr;r=Yr;var p=32-ur(d)-1;d&=~(1<<p),a+=1;var g=32-ur(s)+p;if(30<g){var j=p-p%5;g=(d&(1<<j)-1).toString(32),d>>=j,p-=j,Gr=1<<32-ur(s)+p|a<<p|d,Yr=g+r}else Gr=1<<g|a<<p|d,Yr=r}function Ud(r){r.return!==null&&(Ei(r,1),lg(r,1,0))}function Wd(r){for(;r===cc;)cc=So[--bo],So[bo]=null,uc=So[--bo],So[bo]=null;for(;r===ji;)ji=qn[--Gn],qn[Gn]=null,Yr=qn[--Gn],qn[Gn]=null,Gr=qn[--Gn],qn[Gn]=null}var In=null,Mn=null,bt=!1,fr=null;function cg(r,s){var a=er(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=r,s=r.deletions,s===null?(r.deletions=[a],r.flags|=16):s.push(a)}function ug(r,s){switch(r.tag){case 5:var a=r.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,In=r,Mn=Ns(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,In=r,Mn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=ji!==null?{id:Gr,overflow:Yr}:null,r.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=er(18,null,null,0),a.stateNode=s,a.return=r,r.child=a,In=r,Mn=null,!0):!1;default:return!1}}function Hd(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Kd(r){if(bt){var s=Mn;if(s){var a=s;if(!ug(r,s)){if(Hd(r))throw Error(n(418));s=Ns(a.nextSibling);var d=In;s&&ug(r,s)?cg(d,a):(r.flags=r.flags&-4097|2,bt=!1,In=r)}}else{if(Hd(r))throw Error(n(418));r.flags=r.flags&-4097|2,bt=!1,In=r}}}function dg(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;In=r}function dc(r){if(r!==In)return!1;if(!bt)return dg(r),bt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Fd(r.type,r.memoizedProps)),s&&(s=Mn)){if(Hd(r))throw fg(),Error(n(418));for(;s;)cg(r,s),s=Ns(s.nextSibling)}if(dg(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"){if(s===0){Mn=Ns(r.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}r=r.nextSibling}Mn=null}}else Mn=In?Ns(r.stateNode.nextSibling):null;return!0}function fg(){for(var r=Mn;r;)r=Ns(r.nextSibling)}function Co(){Mn=In=null,bt=!1}function Qd(r){fr===null?fr=[r]:fr.push(r)}var y1=R.ReactCurrentBatchConfig;function Da(r,s,a){if(r=a.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var d=a.stateNode}if(!d)throw Error(n(147,r));var p=d,g=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===g?s.ref:(s=function(j){var A=p.refs;j===null?delete A[g]:A[g]=j},s._stringRef=g,s)}if(typeof r!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,r))}return r}function fc(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function hg(r){var s=r._init;return s(r._payload)}function pg(r){function s(W,$){if(r){var K=W.deletions;K===null?(W.deletions=[$],W.flags|=16):K.push($)}}function a(W,$){if(!r)return null;for(;$!==null;)s(W,$),$=$.sibling;return null}function d(W,$){for(W=new Map;$!==null;)$.key!==null?W.set($.key,$):W.set($.index,$),$=$.sibling;return W}function p(W,$){return W=$s(W,$),W.index=0,W.sibling=null,W}function g(W,$,K){return W.index=K,r?(K=W.alternate,K!==null?(K=K.index,K<$?(W.flags|=2,$):K):(W.flags|=2,$)):(W.flags|=1048576,$)}function j(W){return r&&W.alternate===null&&(W.flags|=2),W}function A(W,$,K,de){return $===null||$.tag!==6?($=zf(K,W.mode,de),$.return=W,$):($=p($,K),$.return=W,$)}function V(W,$,K,de){var je=K.type;return je===O?le(W,$,K.props.children,de,K.key):$!==null&&($.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===X&&hg(je)===$.type)?(de=p($,K.props),de.ref=Da(W,$,K),de.return=W,de):(de=Lc(K.type,K.key,K.props,null,W.mode,de),de.ref=Da(W,$,K),de.return=W,de)}function q(W,$,K,de){return $===null||$.tag!==4||$.stateNode.containerInfo!==K.containerInfo||$.stateNode.implementation!==K.implementation?($=Vf(K,W.mode,de),$.return=W,$):($=p($,K.children||[]),$.return=W,$)}function le(W,$,K,de,je){return $===null||$.tag!==7?($=Mi(K,W.mode,de,je),$.return=W,$):($=p($,K),$.return=W,$)}function ce(W,$,K){if(typeof $=="string"&&$!==""||typeof $=="number")return $=zf(""+$,W.mode,K),$.return=W,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case N:return K=Lc($.type,$.key,$.props,null,W.mode,K),K.ref=Da(W,null,$),K.return=W,K;case T:return $=Vf($,W.mode,K),$.return=W,$;case X:var de=$._init;return ce(W,de($._payload),K)}if(Nn($)||J($))return $=Mi($,W.mode,K,null),$.return=W,$;fc(W,$)}return null}function ae(W,$,K,de){var je=$!==null?$.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return je!==null?null:A(W,$,""+K,de);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case N:return K.key===je?V(W,$,K,de):null;case T:return K.key===je?q(W,$,K,de):null;case X:return je=K._init,ae(W,$,je(K._payload),de)}if(Nn(K)||J(K))return je!==null?null:le(W,$,K,de,null);fc(W,K)}return null}function xe(W,$,K,de,je){if(typeof de=="string"&&de!==""||typeof de=="number")return W=W.get(K)||null,A($,W,""+de,je);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return W=W.get(de.key===null?K:de.key)||null,V($,W,de,je);case T:return W=W.get(de.key===null?K:de.key)||null,q($,W,de,je);case X:var Ae=de._init;return xe(W,$,K,Ae(de._payload),je)}if(Nn(de)||J(de))return W=W.get(K)||null,le($,W,de,je,null);fc($,de)}return null}function be(W,$,K,de){for(var je=null,Ae=null,Ie=$,Fe=$=0,qt=null;Ie!==null&&Fe<K.length;Fe++){Ie.index>Fe?(qt=Ie,Ie=null):qt=Ie.sibling;var rt=ae(W,Ie,K[Fe],de);if(rt===null){Ie===null&&(Ie=qt);break}r&&Ie&&rt.alternate===null&&s(W,Ie),$=g(rt,$,Fe),Ae===null?je=rt:Ae.sibling=rt,Ae=rt,Ie=qt}if(Fe===K.length)return a(W,Ie),bt&&Ei(W,Fe),je;if(Ie===null){for(;Fe<K.length;Fe++)Ie=ce(W,K[Fe],de),Ie!==null&&($=g(Ie,$,Fe),Ae===null?je=Ie:Ae.sibling=Ie,Ae=Ie);return bt&&Ei(W,Fe),je}for(Ie=d(W,Ie);Fe<K.length;Fe++)qt=xe(Ie,W,Fe,K[Fe],de),qt!==null&&(r&&qt.alternate!==null&&Ie.delete(qt.key===null?Fe:qt.key),$=g(qt,$,Fe),Ae===null?je=qt:Ae.sibling=qt,Ae=qt);return r&&Ie.forEach(function(Bs){return s(W,Bs)}),bt&&Ei(W,Fe),je}function _e(W,$,K,de){var je=J(K);if(typeof je!="function")throw Error(n(150));if(K=je.call(K),K==null)throw Error(n(151));for(var Ae=je=null,Ie=$,Fe=$=0,qt=null,rt=K.next();Ie!==null&&!rt.done;Fe++,rt=K.next()){Ie.index>Fe?(qt=Ie,Ie=null):qt=Ie.sibling;var Bs=ae(W,Ie,rt.value,de);if(Bs===null){Ie===null&&(Ie=qt);break}r&&Ie&&Bs.alternate===null&&s(W,Ie),$=g(Bs,$,Fe),Ae===null?je=Bs:Ae.sibling=Bs,Ae=Bs,Ie=qt}if(rt.done)return a(W,Ie),bt&&Ei(W,Fe),je;if(Ie===null){for(;!rt.done;Fe++,rt=K.next())rt=ce(W,rt.value,de),rt!==null&&($=g(rt,$,Fe),Ae===null?je=rt:Ae.sibling=rt,Ae=rt);return bt&&Ei(W,Fe),je}for(Ie=d(W,Ie);!rt.done;Fe++,rt=K.next())rt=xe(Ie,W,Fe,rt.value,de),rt!==null&&(r&&rt.alternate!==null&&Ie.delete(rt.key===null?Fe:rt.key),$=g(rt,$,Fe),Ae===null?je=rt:Ae.sibling=rt,Ae=rt);return r&&Ie.forEach(function(Y1){return s(W,Y1)}),bt&&Ei(W,Fe),je}function Ft(W,$,K,de){if(typeof K=="object"&&K!==null&&K.type===O&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case N:e:{for(var je=K.key,Ae=$;Ae!==null;){if(Ae.key===je){if(je=K.type,je===O){if(Ae.tag===7){a(W,Ae.sibling),$=p(Ae,K.props.children),$.return=W,W=$;break e}}else if(Ae.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===X&&hg(je)===Ae.type){a(W,Ae.sibling),$=p(Ae,K.props),$.ref=Da(W,Ae,K),$.return=W,W=$;break e}a(W,Ae);break}else s(W,Ae);Ae=Ae.sibling}K.type===O?($=Mi(K.props.children,W.mode,de,K.key),$.return=W,W=$):(de=Lc(K.type,K.key,K.props,null,W.mode,de),de.ref=Da(W,$,K),de.return=W,W=de)}return j(W);case T:e:{for(Ae=K.key;$!==null;){if($.key===Ae)if($.tag===4&&$.stateNode.containerInfo===K.containerInfo&&$.stateNode.implementation===K.implementation){a(W,$.sibling),$=p($,K.children||[]),$.return=W,W=$;break e}else{a(W,$);break}else s(W,$);$=$.sibling}$=Vf(K,W.mode,de),$.return=W,W=$}return j(W);case X:return Ae=K._init,Ft(W,$,Ae(K._payload),de)}if(Nn(K))return be(W,$,K,de);if(J(K))return _e(W,$,K,de);fc(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,$!==null&&$.tag===6?(a(W,$.sibling),$=p($,K),$.return=W,W=$):(a(W,$),$=zf(K,W.mode,de),$.return=W,W=$),j(W)):a(W,$)}return Ft}var _o=pg(!0),mg=pg(!1),hc=Ts(null),pc=null,ko=null,Zd=null;function qd(){Zd=ko=pc=null}function Gd(r){var s=hc.current;wt(hc),r._currentValue=s}function Yd(r,s,a){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===a)break;r=r.return}}function jo(r,s){pc=r,Zd=ko=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(wn=!0),r.firstContext=null)}function Yn(r){var s=r._currentValue;if(Zd!==r)if(r={context:r,memoizedValue:s,next:null},ko===null){if(pc===null)throw Error(n(308));ko=r,pc.dependencies={lanes:0,firstContext:r}}else ko=ko.next=r;return s}var Ri=null;function Xd(r){Ri===null?Ri=[r]:Ri.push(r)}function gg(r,s,a,d){var p=s.interleaved;return p===null?(a.next=a,Xd(s)):(a.next=p.next,p.next=a),s.interleaved=a,Xr(r,d)}function Xr(r,s){r.lanes|=s;var a=r.alternate;for(a!==null&&(a.lanes|=s),a=r,r=r.return;r!==null;)r.childLanes|=s,a=r.alternate,a!==null&&(a.childLanes|=s),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Is=!1;function Jd(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vg(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Jr(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function Ms(r,s,a){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(tt&2)!==0){var p=d.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),d.pending=s,Xr(r,a)}return p=d.interleaved,p===null?(s.next=s,Xd(d)):(s.next=p.next,p.next=s),d.interleaved=s,Xr(r,a)}function mc(r,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,a|=d,s.lanes=a,hd(r,a)}}function yg(r,s){var a=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,a===d)){var p=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var j={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?p=g=j:g=g.next=j,a=a.next}while(a!==null);g===null?p=g=s:g=g.next=s}else p=g=s;a={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,effects:d.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=s:r.next=s,a.lastBaseUpdate=s}function gc(r,s,a,d){var p=r.updateQueue;Is=!1;var g=p.firstBaseUpdate,j=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var V=A,q=V.next;V.next=null,j===null?g=q:j.next=q,j=V;var le=r.alternate;le!==null&&(le=le.updateQueue,A=le.lastBaseUpdate,A!==j&&(A===null?le.firstBaseUpdate=q:A.next=q,le.lastBaseUpdate=V))}if(g!==null){var ce=p.baseState;j=0,le=q=V=null,A=g;do{var ae=A.lane,xe=A.eventTime;if((d&ae)===ae){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var be=r,_e=A;switch(ae=s,xe=a,_e.tag){case 1:if(be=_e.payload,typeof be=="function"){ce=be.call(xe,ce,ae);break e}ce=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=_e.payload,ae=typeof be=="function"?be.call(xe,ce,ae):be,ae==null)break e;ce=Z({},ce,ae);break e;case 2:Is=!0}}A.callback!==null&&A.lane!==0&&(r.flags|=64,ae=p.effects,ae===null?p.effects=[A]:ae.push(A))}else xe={eventTime:xe,lane:ae,tag:A.tag,payload:A.payload,callback:A.callback,next:null},le===null?(q=le=xe,V=ce):le=le.next=xe,j|=ae;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;ae=A,A=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);if(le===null&&(V=ce),p.baseState=V,p.firstBaseUpdate=q,p.lastBaseUpdate=le,s=p.shared.interleaved,s!==null){p=s;do j|=p.lane,p=p.next;while(p!==s)}else g===null&&(p.shared.lanes=0);Ti|=j,r.lanes=j,r.memoizedState=ce}}function xg(r,s,a){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],p=d.callback;if(p!==null){if(d.callback=null,d=a,typeof p!="function")throw Error(n(191,p));p.call(d)}}}var za={},Pr=Ts(za),Va=Ts(za),$a=Ts(za);function Pi(r){if(r===za)throw Error(n(174));return r}function ef(r,s){switch(yt($a,s),yt(Va,r),yt(Pr,za),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:pe(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=pe(s,r)}wt(Pr),yt(Pr,s)}function Eo(){wt(Pr),wt(Va),wt($a)}function wg(r){Pi($a.current);var s=Pi(Pr.current),a=pe(s,r.type);s!==a&&(yt(Va,r),yt(Pr,a))}function tf(r){Va.current===r&&(wt(Pr),wt(Va))}var kt=Ts(0);function vc(r){for(var s=r;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var nf=[];function rf(){for(var r=0;r<nf.length;r++)nf[r]._workInProgressVersionPrimary=null;nf.length=0}var yc=R.ReactCurrentDispatcher,sf=R.ReactCurrentBatchConfig,Ni=0,jt=null,Ut=null,Qt=null,xc=!1,Ba=!1,Ua=0,x1=0;function sn(){throw Error(n(321))}function of(r,s){if(s===null)return!1;for(var a=0;a<s.length&&a<r.length;a++)if(!dr(r[a],s[a]))return!1;return!0}function af(r,s,a,d,p,g){if(Ni=g,jt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,yc.current=r===null||r.memoizedState===null?C1:_1,r=a(d,p),Ba){g=0;do{if(Ba=!1,Ua=0,25<=g)throw Error(n(301));g+=1,Qt=Ut=null,s.updateQueue=null,yc.current=k1,r=a(d,p)}while(Ba)}if(yc.current=bc,s=Ut!==null&&Ut.next!==null,Ni=0,Qt=Ut=jt=null,xc=!1,s)throw Error(n(300));return r}function lf(){var r=Ua!==0;return Ua=0,r}function Nr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?jt.memoizedState=Qt=r:Qt=Qt.next=r,Qt}function Xn(){if(Ut===null){var r=jt.alternate;r=r!==null?r.memoizedState:null}else r=Ut.next;var s=Qt===null?jt.memoizedState:Qt.next;if(s!==null)Qt=s,Ut=r;else{if(r===null)throw Error(n(310));Ut=r,r={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Qt===null?jt.memoizedState=Qt=r:Qt=Qt.next=r}return Qt}function Wa(r,s){return typeof s=="function"?s(r):s}function cf(r){var s=Xn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var d=Ut,p=d.baseQueue,g=a.pending;if(g!==null){if(p!==null){var j=p.next;p.next=g.next,g.next=j}d.baseQueue=p=g,a.pending=null}if(p!==null){g=p.next,d=d.baseState;var A=j=null,V=null,q=g;do{var le=q.lane;if((Ni&le)===le)V!==null&&(V=V.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),d=q.hasEagerState?q.eagerState:r(d,q.action);else{var ce={lane:le,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};V===null?(A=V=ce,j=d):V=V.next=ce,jt.lanes|=le,Ti|=le}q=q.next}while(q!==null&&q!==g);V===null?j=d:V.next=A,dr(d,s.memoizedState)||(wn=!0),s.memoizedState=d,s.baseState=j,s.baseQueue=V,a.lastRenderedState=d}if(r=a.interleaved,r!==null){p=r;do g=p.lane,jt.lanes|=g,Ti|=g,p=p.next;while(p!==r)}else p===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function uf(r){var s=Xn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var d=a.dispatch,p=a.pending,g=s.memoizedState;if(p!==null){a.pending=null;var j=p=p.next;do g=r(g,j.action),j=j.next;while(j!==p);dr(g,s.memoizedState)||(wn=!0),s.memoizedState=g,s.baseQueue===null&&(s.baseState=g),a.lastRenderedState=g}return[g,d]}function Sg(){}function bg(r,s){var a=jt,d=Xn(),p=s(),g=!dr(d.memoizedState,p);if(g&&(d.memoizedState=p,wn=!0),d=d.queue,df(kg.bind(null,a,d,r),[r]),d.getSnapshot!==s||g||Qt!==null&&Qt.memoizedState.tag&1){if(a.flags|=2048,Ha(9,_g.bind(null,a,d,p,s),void 0,null),Zt===null)throw Error(n(349));(Ni&30)!==0||Cg(a,s,p)}return p}function Cg(r,s,a){r.flags|=16384,r={getSnapshot:s,value:a},s=jt.updateQueue,s===null?(s={lastEffect:null,stores:null},jt.updateQueue=s,s.stores=[r]):(a=s.stores,a===null?s.stores=[r]:a.push(r))}function _g(r,s,a,d){s.value=a,s.getSnapshot=d,jg(s)&&Eg(r)}function kg(r,s,a){return a(function(){jg(s)&&Eg(r)})}function jg(r){var s=r.getSnapshot;r=r.value;try{var a=s();return!dr(r,a)}catch{return!0}}function Eg(r){var s=Xr(r,1);s!==null&&gr(s,r,1,-1)}function Rg(r){var s=Nr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:r},s.queue=r,r=r.dispatch=b1.bind(null,jt,r),[s.memoizedState,r]}function Ha(r,s,a,d){return r={tag:r,create:s,destroy:a,deps:d,next:null},s=jt.updateQueue,s===null?(s={lastEffect:null,stores:null},jt.updateQueue=s,s.lastEffect=r.next=r):(a=s.lastEffect,a===null?s.lastEffect=r.next=r:(d=a.next,a.next=r,r.next=d,s.lastEffect=r)),r}function Pg(){return Xn().memoizedState}function wc(r,s,a,d){var p=Nr();jt.flags|=r,p.memoizedState=Ha(1|s,a,void 0,d===void 0?null:d)}function Sc(r,s,a,d){var p=Xn();d=d===void 0?null:d;var g=void 0;if(Ut!==null){var j=Ut.memoizedState;if(g=j.destroy,d!==null&&of(d,j.deps)){p.memoizedState=Ha(s,a,g,d);return}}jt.flags|=r,p.memoizedState=Ha(1|s,a,g,d)}function Ng(r,s){return wc(8390656,8,r,s)}function df(r,s){return Sc(2048,8,r,s)}function Tg(r,s){return Sc(4,2,r,s)}function Og(r,s){return Sc(4,4,r,s)}function Ag(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Ig(r,s,a){return a=a!=null?a.concat([r]):null,Sc(4,4,Ag.bind(null,s,r),a)}function ff(){}function Mg(r,s){var a=Xn();s=s===void 0?null:s;var d=a.memoizedState;return d!==null&&s!==null&&of(s,d[1])?d[0]:(a.memoizedState=[r,s],r)}function Lg(r,s){var a=Xn();s=s===void 0?null:s;var d=a.memoizedState;return d!==null&&s!==null&&of(s,d[1])?d[0]:(r=r(),a.memoizedState=[r,s],r)}function Fg(r,s,a){return(Ni&21)===0?(r.baseState&&(r.baseState=!1,wn=!0),r.memoizedState=a):(dr(a,s)||(a=hm(),jt.lanes|=a,Ti|=a,r.baseState=!0),s)}function w1(r,s){var a=mt;mt=a!==0&&4>a?a:4,r(!0);var d=sf.transition;sf.transition={};try{r(!1),s()}finally{mt=a,sf.transition=d}}function Dg(){return Xn().memoizedState}function S1(r,s,a){var d=zs(r);if(a={lane:d,action:a,hasEagerState:!1,eagerState:null,next:null},zg(r))Vg(s,a);else if(a=gg(r,s,a,d),a!==null){var p=pn();gr(a,r,d,p),$g(a,s,d)}}function b1(r,s,a){var d=zs(r),p={lane:d,action:a,hasEagerState:!1,eagerState:null,next:null};if(zg(r))Vg(s,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=s.lastRenderedReducer,g!==null))try{var j=s.lastRenderedState,A=g(j,a);if(p.hasEagerState=!0,p.eagerState=A,dr(A,j)){var V=s.interleaved;V===null?(p.next=p,Xd(s)):(p.next=V.next,V.next=p),s.interleaved=p;return}}catch{}finally{}a=gg(r,s,p,d),a!==null&&(p=pn(),gr(a,r,d,p),$g(a,s,d))}}function zg(r){var s=r.alternate;return r===jt||s!==null&&s===jt}function Vg(r,s){Ba=xc=!0;var a=r.pending;a===null?s.next=s:(s.next=a.next,a.next=s),r.pending=s}function $g(r,s,a){if((a&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,a|=d,s.lanes=a,hd(r,a)}}var bc={readContext:Yn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},C1={readContext:Yn,useCallback:function(r,s){return Nr().memoizedState=[r,s===void 0?null:s],r},useContext:Yn,useEffect:Ng,useImperativeHandle:function(r,s,a){return a=a!=null?a.concat([r]):null,wc(4194308,4,Ag.bind(null,s,r),a)},useLayoutEffect:function(r,s){return wc(4194308,4,r,s)},useInsertionEffect:function(r,s){return wc(4,2,r,s)},useMemo:function(r,s){var a=Nr();return s=s===void 0?null:s,r=r(),a.memoizedState=[r,s],r},useReducer:function(r,s,a){var d=Nr();return s=a!==void 0?a(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=S1.bind(null,jt,r),[d.memoizedState,r]},useRef:function(r){var s=Nr();return r={current:r},s.memoizedState=r},useState:Rg,useDebugValue:ff,useDeferredValue:function(r){return Nr().memoizedState=r},useTransition:function(){var r=Rg(!1),s=r[0];return r=w1.bind(null,r[1]),Nr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,a){var d=jt,p=Nr();if(bt){if(a===void 0)throw Error(n(407));a=a()}else{if(a=s(),Zt===null)throw Error(n(349));(Ni&30)!==0||Cg(d,s,a)}p.memoizedState=a;var g={value:a,getSnapshot:s};return p.queue=g,Ng(kg.bind(null,d,g,r),[r]),d.flags|=2048,Ha(9,_g.bind(null,d,g,a,s),void 0,null),a},useId:function(){var r=Nr(),s=Zt.identifierPrefix;if(bt){var a=Yr,d=Gr;a=(d&~(1<<32-ur(d)-1)).toString(32)+a,s=":"+s+"R"+a,a=Ua++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=x1++,s=":"+s+"r"+a.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},_1={readContext:Yn,useCallback:Mg,useContext:Yn,useEffect:df,useImperativeHandle:Ig,useInsertionEffect:Tg,useLayoutEffect:Og,useMemo:Lg,useReducer:cf,useRef:Pg,useState:function(){return cf(Wa)},useDebugValue:ff,useDeferredValue:function(r){var s=Xn();return Fg(s,Ut.memoizedState,r)},useTransition:function(){var r=cf(Wa)[0],s=Xn().memoizedState;return[r,s]},useMutableSource:Sg,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1},k1={readContext:Yn,useCallback:Mg,useContext:Yn,useEffect:df,useImperativeHandle:Ig,useInsertionEffect:Tg,useLayoutEffect:Og,useMemo:Lg,useReducer:uf,useRef:Pg,useState:function(){return uf(Wa)},useDebugValue:ff,useDeferredValue:function(r){var s=Xn();return Ut===null?s.memoizedState=r:Fg(s,Ut.memoizedState,r)},useTransition:function(){var r=uf(Wa)[0],s=Xn().memoizedState;return[r,s]},useMutableSource:Sg,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1};function hr(r,s){if(r&&r.defaultProps){s=Z({},s),r=r.defaultProps;for(var a in r)s[a]===void 0&&(s[a]=r[a]);return s}return s}function hf(r,s,a,d){s=r.memoizedState,a=a(d,s),a=a==null?s:Z({},s,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Cc={isMounted:function(r){return(r=r._reactInternals)?Ci(r)===r:!1},enqueueSetState:function(r,s,a){r=r._reactInternals;var d=pn(),p=zs(r),g=Jr(d,p);g.payload=s,a!=null&&(g.callback=a),s=Ms(r,g,p),s!==null&&(gr(s,r,p,d),mc(s,r,p))},enqueueReplaceState:function(r,s,a){r=r._reactInternals;var d=pn(),p=zs(r),g=Jr(d,p);g.tag=1,g.payload=s,a!=null&&(g.callback=a),s=Ms(r,g,p),s!==null&&(gr(s,r,p,d),mc(s,r,p))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var a=pn(),d=zs(r),p=Jr(a,d);p.tag=2,s!=null&&(p.callback=s),s=Ms(r,p,d),s!==null&&(gr(s,r,d,a),mc(s,r,d))}};function Bg(r,s,a,d,p,g,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,g,j):s.prototype&&s.prototype.isPureReactComponent?!Ta(a,d)||!Ta(p,g):!0}function Ug(r,s,a){var d=!1,p=Os,g=s.contextType;return typeof g=="object"&&g!==null?g=Yn(g):(p=xn(s)?ki:rn.current,d=s.contextTypes,g=(d=d!=null)?wo(r,p):Os),s=new s(a,g),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Cc,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=p,r.__reactInternalMemoizedMaskedChildContext=g),s}function Wg(r,s,a,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,d),s.state!==r&&Cc.enqueueReplaceState(s,s.state,null)}function pf(r,s,a,d){var p=r.stateNode;p.props=a,p.state=r.memoizedState,p.refs={},Jd(r);var g=s.contextType;typeof g=="object"&&g!==null?p.context=Yn(g):(g=xn(s)?ki:rn.current,p.context=wo(r,g)),p.state=r.memoizedState,g=s.getDerivedStateFromProps,typeof g=="function"&&(hf(r,s,g,a),p.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(s=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),s!==p.state&&Cc.enqueueReplaceState(p,p.state,null),gc(r,a,p,d),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308)}function Ro(r,s){try{var a="",d=s;do a+=Ne(d),d=d.return;while(d);var p=a}catch(g){p=`
|
|
39
|
+
Error generating stack: `+g.message+`
|
|
40
|
+
`+g.stack}return{value:r,source:s,stack:p,digest:null}}function mf(r,s,a){return{value:r,source:null,stack:a??null,digest:s??null}}function gf(r,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var j1=typeof WeakMap=="function"?WeakMap:Map;function Hg(r,s,a){a=Jr(-1,a),a.tag=3,a.payload={element:null};var d=s.value;return a.callback=function(){Nc||(Nc=!0,Tf=d),gf(r,s)},a}function Kg(r,s,a){a=Jr(-1,a),a.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=s.value;a.payload=function(){return d(p)},a.callback=function(){gf(r,s)}}var g=r.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){gf(r,s),typeof d!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})}),a}function Qg(r,s,a){var d=r.pingCache;if(d===null){d=r.pingCache=new j1;var p=new Set;d.set(s,p)}else p=d.get(s),p===void 0&&(p=new Set,d.set(s,p));p.has(a)||(p.add(a),r=V1.bind(null,r,s,a),s.then(r,r))}function Zg(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function qg(r,s,a,d,p){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=Jr(-1,1),s.tag=2,Ms(a,s,1))),a.lanes|=1),r):(r.flags|=65536,r.lanes=p,r)}var E1=R.ReactCurrentOwner,wn=!1;function hn(r,s,a,d){s.child=r===null?mg(s,null,a,d):_o(s,r.child,a,d)}function Gg(r,s,a,d,p){a=a.render;var g=s.ref;return jo(s,p),d=af(r,s,a,d,g,p),a=lf(),r!==null&&!wn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~p,es(r,s,p)):(bt&&a&&Ud(s),s.flags|=1,hn(r,s,d,p),s.child)}function Yg(r,s,a,d,p){if(r===null){var g=a.type;return typeof g=="function"&&!Df(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=g,Xg(r,s,g,d,p)):(r=Lc(a.type,null,d,s,s.mode,p),r.ref=s.ref,r.return=s,s.child=r)}if(g=r.child,(r.lanes&p)===0){var j=g.memoizedProps;if(a=a.compare,a=a!==null?a:Ta,a(j,d)&&r.ref===s.ref)return es(r,s,p)}return s.flags|=1,r=$s(g,d),r.ref=s.ref,r.return=s,s.child=r}function Xg(r,s,a,d,p){if(r!==null){var g=r.memoizedProps;if(Ta(g,d)&&r.ref===s.ref)if(wn=!1,s.pendingProps=d=g,(r.lanes&p)!==0)(r.flags&131072)!==0&&(wn=!0);else return s.lanes=r.lanes,es(r,s,p)}return vf(r,s,a,d,p)}function Jg(r,s,a){var d=s.pendingProps,p=d.children,g=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(No,Ln),Ln|=a;else{if((a&1073741824)===0)return r=g!==null?g.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,yt(No,Ln),Ln|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=g!==null?g.baseLanes:a,yt(No,Ln),Ln|=d}else g!==null?(d=g.baseLanes|a,s.memoizedState=null):d=a,yt(No,Ln),Ln|=d;return hn(r,s,p,a),s.child}function ev(r,s){var a=s.ref;(r===null&&a!==null||r!==null&&r.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function vf(r,s,a,d,p){var g=xn(a)?ki:rn.current;return g=wo(s,g),jo(s,p),a=af(r,s,a,d,g,p),d=lf(),r!==null&&!wn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~p,es(r,s,p)):(bt&&d&&Ud(s),s.flags|=1,hn(r,s,a,p),s.child)}function tv(r,s,a,d,p){if(xn(a)){var g=!0;ac(s)}else g=!1;if(jo(s,p),s.stateNode===null)kc(r,s),Ug(s,a,d),pf(s,a,d,p),d=!0;else if(r===null){var j=s.stateNode,A=s.memoizedProps;j.props=A;var V=j.context,q=a.contextType;typeof q=="object"&&q!==null?q=Yn(q):(q=xn(a)?ki:rn.current,q=wo(s,q));var le=a.getDerivedStateFromProps,ce=typeof le=="function"||typeof j.getSnapshotBeforeUpdate=="function";ce||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(A!==d||V!==q)&&Wg(s,j,d,q),Is=!1;var ae=s.memoizedState;j.state=ae,gc(s,d,j,p),V=s.memoizedState,A!==d||ae!==V||yn.current||Is?(typeof le=="function"&&(hf(s,a,le,d),V=s.memoizedState),(A=Is||Bg(s,a,A,d,ae,V,q))?(ce||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=V),j.props=d,j.state=V,j.context=q,d=A):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{j=s.stateNode,vg(r,s),A=s.memoizedProps,q=s.type===s.elementType?A:hr(s.type,A),j.props=q,ce=s.pendingProps,ae=j.context,V=a.contextType,typeof V=="object"&&V!==null?V=Yn(V):(V=xn(a)?ki:rn.current,V=wo(s,V));var xe=a.getDerivedStateFromProps;(le=typeof xe=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(A!==ce||ae!==V)&&Wg(s,j,d,V),Is=!1,ae=s.memoizedState,j.state=ae,gc(s,d,j,p);var be=s.memoizedState;A!==ce||ae!==be||yn.current||Is?(typeof xe=="function"&&(hf(s,a,xe,d),be=s.memoizedState),(q=Is||Bg(s,a,q,d,ae,be,V)||!1)?(le||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(d,be,V),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(d,be,V)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=be),j.props=d,j.state=be,j.context=V,d=q):(typeof j.componentDidUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),d=!1)}return yf(r,s,a,d,g,p)}function yf(r,s,a,d,p,g){ev(r,s);var j=(s.flags&128)!==0;if(!d&&!j)return p&&og(s,a,!1),es(r,s,g);d=s.stateNode,E1.current=s;var A=j&&typeof a.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&j?(s.child=_o(s,r.child,null,g),s.child=_o(s,null,A,g)):hn(r,s,A,g),s.memoizedState=d.state,p&&og(s,a,!0),s.child}function nv(r){var s=r.stateNode;s.pendingContext?sg(r,s.pendingContext,s.pendingContext!==s.context):s.context&&sg(r,s.context,!1),ef(r,s.containerInfo)}function rv(r,s,a,d,p){return Co(),Qd(p),s.flags|=256,hn(r,s,a,d),s.child}var xf={dehydrated:null,treeContext:null,retryLane:0};function wf(r){return{baseLanes:r,cachePool:null,transitions:null}}function sv(r,s,a){var d=s.pendingProps,p=kt.current,g=!1,j=(s.flags&128)!==0,A;if((A=j)||(A=r!==null&&r.memoizedState===null?!1:(p&2)!==0),A?(g=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(p|=1),yt(kt,p&1),r===null)return Kd(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(j=d.children,r=d.fallback,g?(d=s.mode,g=s.child,j={mode:"hidden",children:j},(d&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=j):g=Fc(j,d,0,null),r=Mi(r,d,a,null),g.return=s,r.return=s,g.sibling=r,s.child=g,s.child.memoizedState=wf(a),s.memoizedState=xf,r):Sf(s,j));if(p=r.memoizedState,p!==null&&(A=p.dehydrated,A!==null))return R1(r,s,j,d,A,p,a);if(g){g=d.fallback,j=s.mode,p=r.child,A=p.sibling;var V={mode:"hidden",children:d.children};return(j&1)===0&&s.child!==p?(d=s.child,d.childLanes=0,d.pendingProps=V,s.deletions=null):(d=$s(p,V),d.subtreeFlags=p.subtreeFlags&14680064),A!==null?g=$s(A,g):(g=Mi(g,j,a,null),g.flags|=2),g.return=s,d.return=s,d.sibling=g,s.child=d,d=g,g=s.child,j=r.child.memoizedState,j=j===null?wf(a):{baseLanes:j.baseLanes|a,cachePool:null,transitions:j.transitions},g.memoizedState=j,g.childLanes=r.childLanes&~a,s.memoizedState=xf,d}return g=r.child,r=g.sibling,d=$s(g,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=a),d.return=s,d.sibling=null,r!==null&&(a=s.deletions,a===null?(s.deletions=[r],s.flags|=16):a.push(r)),s.child=d,s.memoizedState=null,d}function Sf(r,s){return s=Fc({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function _c(r,s,a,d){return d!==null&&Qd(d),_o(s,r.child,null,a),r=Sf(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function R1(r,s,a,d,p,g,j){if(a)return s.flags&256?(s.flags&=-257,d=mf(Error(n(422))),_c(r,s,j,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(g=d.fallback,p=s.mode,d=Fc({mode:"visible",children:d.children},p,0,null),g=Mi(g,p,j,null),g.flags|=2,d.return=s,g.return=s,d.sibling=g,s.child=d,(s.mode&1)!==0&&_o(s,r.child,null,j),s.child.memoizedState=wf(j),s.memoizedState=xf,g);if((s.mode&1)===0)return _c(r,s,j,null);if(p.data==="$!"){if(d=p.nextSibling&&p.nextSibling.dataset,d)var A=d.dgst;return d=A,g=Error(n(419)),d=mf(g,d,void 0),_c(r,s,j,d)}if(A=(j&r.childLanes)!==0,wn||A){if(d=Zt,d!==null){switch(j&-j){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(d.suspendedLanes|j))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Xr(r,p),gr(d,r,p,-1))}return Ff(),d=mf(Error(n(421))),_c(r,s,j,d)}return p.data==="$?"?(s.flags|=128,s.child=r.child,s=$1.bind(null,r),p._reactRetry=s,null):(r=g.treeContext,Mn=Ns(p.nextSibling),In=s,bt=!0,fr=null,r!==null&&(qn[Gn++]=Gr,qn[Gn++]=Yr,qn[Gn++]=ji,Gr=r.id,Yr=r.overflow,ji=s),s=Sf(s,d.children),s.flags|=4096,s)}function iv(r,s,a){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),Yd(r.return,s,a)}function bf(r,s,a,d,p){var g=r.memoizedState;g===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:a,tailMode:p}:(g.isBackwards=s,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=a,g.tailMode=p)}function ov(r,s,a){var d=s.pendingProps,p=d.revealOrder,g=d.tail;if(hn(r,s,d.children,a),d=kt.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&iv(r,a,s);else if(r.tag===19)iv(r,a,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(yt(kt,d),(s.mode&1)===0)s.memoizedState=null;else switch(p){case"forwards":for(a=s.child,p=null;a!==null;)r=a.alternate,r!==null&&vc(r)===null&&(p=a),a=a.sibling;a=p,a===null?(p=s.child,s.child=null):(p=a.sibling,a.sibling=null),bf(s,!1,p,a,g);break;case"backwards":for(a=null,p=s.child,s.child=null;p!==null;){if(r=p.alternate,r!==null&&vc(r)===null){s.child=p;break}r=p.sibling,p.sibling=a,a=p,p=r}bf(s,!0,a,null,g);break;case"together":bf(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function kc(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function es(r,s,a){if(r!==null&&(s.dependencies=r.dependencies),Ti|=s.lanes,(a&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,a=$s(r,r.pendingProps),s.child=a,a.return=s;r.sibling!==null;)r=r.sibling,a=a.sibling=$s(r,r.pendingProps),a.return=s;a.sibling=null}return s.child}function P1(r,s,a){switch(s.tag){case 3:nv(s),Co();break;case 5:wg(s);break;case 1:xn(s.type)&&ac(s);break;case 4:ef(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,p=s.memoizedProps.value;yt(hc,d._currentValue),d._currentValue=p;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(yt(kt,kt.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?sv(r,s,a):(yt(kt,kt.current&1),r=es(r,s,a),r!==null?r.sibling:null);yt(kt,kt.current&1);break;case 19:if(d=(a&s.childLanes)!==0,(r.flags&128)!==0){if(d)return ov(r,s,a);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),yt(kt,kt.current),d)break;return null;case 22:case 23:return s.lanes=0,Jg(r,s,a)}return es(r,s,a)}var av,Cf,lv,cv;av=function(r,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)r.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Cf=function(){},lv=function(r,s,a,d){var p=r.memoizedProps;if(p!==d){r=s.stateNode,Pi(Pr.current);var g=null;switch(a){case"input":p=Mt(r,p),d=Mt(r,d),g=[];break;case"select":p=Z({},p,{value:void 0}),d=Z({},d,{value:void 0}),g=[];break;case"textarea":p=H(r,p),d=H(r,d),g=[];break;default:typeof p.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=sc)}Ve(a,d);var j;a=null;for(q in p)if(!d.hasOwnProperty(q)&&p.hasOwnProperty(q)&&p[q]!=null)if(q==="style"){var A=p[q];for(j in A)A.hasOwnProperty(j)&&(a||(a={}),a[j]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(o.hasOwnProperty(q)?g||(g=[]):(g=g||[]).push(q,null));for(q in d){var V=d[q];if(A=p!=null?p[q]:void 0,d.hasOwnProperty(q)&&V!==A&&(V!=null||A!=null))if(q==="style")if(A){for(j in A)!A.hasOwnProperty(j)||V&&V.hasOwnProperty(j)||(a||(a={}),a[j]="");for(j in V)V.hasOwnProperty(j)&&A[j]!==V[j]&&(a||(a={}),a[j]=V[j])}else a||(g||(g=[]),g.push(q,a)),a=V;else q==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,A=A?A.__html:void 0,V!=null&&A!==V&&(g=g||[]).push(q,V)):q==="children"?typeof V!="string"&&typeof V!="number"||(g=g||[]).push(q,""+V):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(o.hasOwnProperty(q)?(V!=null&&q==="onScroll"&&xt("scroll",r),g||A===V||(g=[])):(g=g||[]).push(q,V))}a&&(g=g||[]).push("style",a);var q=g;(s.updateQueue=q)&&(s.flags|=4)}},cv=function(r,s,a,d){a!==d&&(s.flags|=4)};function Ka(r,s){if(!bt)switch(r.tailMode){case"hidden":s=r.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function on(r){var s=r.alternate!==null&&r.alternate.child===r.child,a=0,d=0;if(s)for(var p=r.child;p!==null;)a|=p.lanes|p.childLanes,d|=p.subtreeFlags&14680064,d|=p.flags&14680064,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)a|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=a,s}function N1(r,s,a){var d=s.pendingProps;switch(Wd(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(s),null;case 1:return xn(s.type)&&oc(),on(s),null;case 3:return d=s.stateNode,Eo(),wt(yn),wt(rn),rf(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(dc(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,fr!==null&&(If(fr),fr=null))),Cf(r,s),on(s),null;case 5:tf(s);var p=Pi($a.current);if(a=s.type,r!==null&&s.stateNode!=null)lv(r,s,a,d,p),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return on(s),null}if(r=Pi(Pr.current),dc(s)){d=s.stateNode,a=s.type;var g=s.memoizedProps;switch(d[Rr]=s,d[La]=g,r=(s.mode&1)!==0,a){case"dialog":xt("cancel",d),xt("close",d);break;case"iframe":case"object":case"embed":xt("load",d);break;case"video":case"audio":for(p=0;p<Aa.length;p++)xt(Aa[p],d);break;case"source":xt("error",d);break;case"img":case"image":case"link":xt("error",d),xt("load",d);break;case"details":xt("toggle",d);break;case"input":tn(d,g),xt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!g.multiple},xt("invalid",d);break;case"textarea":Y(d,g),xt("invalid",d)}Ve(a,g),p=null;for(var j in g)if(g.hasOwnProperty(j)){var A=g[j];j==="children"?typeof A=="string"?d.textContent!==A&&(g.suppressHydrationWarning!==!0&&rc(d.textContent,A,r),p=["children",A]):typeof A=="number"&&d.textContent!==""+A&&(g.suppressHydrationWarning!==!0&&rc(d.textContent,A,r),p=["children",""+A]):o.hasOwnProperty(j)&&A!=null&&j==="onScroll"&&xt("scroll",d)}switch(a){case"input":Le(d),et(d,g,!0);break;case"textarea":Le(d),ue(d);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(d.onclick=sc)}d=p,s.updateQueue=d,d!==null&&(s.flags|=4)}else{j=p.nodeType===9?p:p.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=re(a)),r==="http://www.w3.org/1999/xhtml"?a==="script"?(r=j.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=j.createElement(a,{is:d.is}):(r=j.createElement(a),a==="select"&&(j=r,d.multiple?j.multiple=!0:d.size&&(j.size=d.size))):r=j.createElementNS(r,a),r[Rr]=s,r[La]=d,av(r,s,!1,!1),s.stateNode=r;e:{switch(j=Be(a,d),a){case"dialog":xt("cancel",r),xt("close",r),p=d;break;case"iframe":case"object":case"embed":xt("load",r),p=d;break;case"video":case"audio":for(p=0;p<Aa.length;p++)xt(Aa[p],r);p=d;break;case"source":xt("error",r),p=d;break;case"img":case"image":case"link":xt("error",r),xt("load",r),p=d;break;case"details":xt("toggle",r),p=d;break;case"input":tn(r,d),p=Mt(r,d),xt("invalid",r);break;case"option":p=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},p=Z({},d,{value:void 0}),xt("invalid",r);break;case"textarea":Y(r,d),p=H(r,d),xt("invalid",r);break;default:p=d}Ve(a,p),A=p;for(g in A)if(A.hasOwnProperty(g)){var V=A[g];g==="style"?he(r,V):g==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&$e(r,V)):g==="children"?typeof V=="string"?(a!=="textarea"||V!=="")&&_t(r,V):typeof V=="number"&&_t(r,""+V):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(o.hasOwnProperty(g)?V!=null&&g==="onScroll"&&xt("scroll",r):V!=null&&E(r,g,V,j))}switch(a){case"input":Le(r),et(r,d,!1);break;case"textarea":Le(r),ue(r);break;case"option":d.value!=null&&r.setAttribute("value",""+ve(d.value));break;case"select":r.multiple=!!d.multiple,g=d.value,g!=null?z(r,!!d.multiple,g,!1):d.defaultValue!=null&&z(r,!!d.multiple,d.defaultValue,!0);break;default:typeof p.onClick=="function"&&(r.onclick=sc)}switch(a){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return on(s),null;case 6:if(r&&s.stateNode!=null)cv(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(a=Pi($a.current),Pi(Pr.current),dc(s)){if(d=s.stateNode,a=s.memoizedProps,d[Rr]=s,(g=d.nodeValue!==a)&&(r=In,r!==null))switch(r.tag){case 3:rc(d.nodeValue,a,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&rc(d.nodeValue,a,(r.mode&1)!==0)}g&&(s.flags|=4)}else d=(a.nodeType===9?a:a.ownerDocument).createTextNode(d),d[Rr]=s,s.stateNode=d}return on(s),null;case 13:if(wt(kt),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(bt&&Mn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)fg(),Co(),s.flags|=98560,g=!1;else if(g=dc(s),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(n(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[Rr]=s}else Co(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;on(s),g=!1}else fr!==null&&(If(fr),fr=null),g=!0;if(!g)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(kt.current&1)!==0?Wt===0&&(Wt=3):Ff())),s.updateQueue!==null&&(s.flags|=4),on(s),null);case 4:return Eo(),Cf(r,s),r===null&&Ia(s.stateNode.containerInfo),on(s),null;case 10:return Gd(s.type._context),on(s),null;case 17:return xn(s.type)&&oc(),on(s),null;case 19:if(wt(kt),g=s.memoizedState,g===null)return on(s),null;if(d=(s.flags&128)!==0,j=g.rendering,j===null)if(d)Ka(g,!1);else{if(Wt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(j=vc(r),j!==null){for(s.flags|=128,Ka(g,!1),d=j.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=a,a=s.child;a!==null;)g=a,r=d,g.flags&=14680066,j=g.alternate,j===null?(g.childLanes=0,g.lanes=r,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=j.childLanes,g.lanes=j.lanes,g.child=j.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=j.memoizedProps,g.memoizedState=j.memoizedState,g.updateQueue=j.updateQueue,g.type=j.type,r=j.dependencies,g.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a=a.sibling;return yt(kt,kt.current&1|2),s.child}r=r.sibling}g.tail!==null&&Lt()>To&&(s.flags|=128,d=!0,Ka(g,!1),s.lanes=4194304)}else{if(!d)if(r=vc(j),r!==null){if(s.flags|=128,d=!0,a=r.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),Ka(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!bt)return on(s),null}else 2*Lt()-g.renderingStartTime>To&&a!==1073741824&&(s.flags|=128,d=!0,Ka(g,!1),s.lanes=4194304);g.isBackwards?(j.sibling=s.child,s.child=j):(a=g.last,a!==null?a.sibling=j:s.child=j,g.last=j)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Lt(),s.sibling=null,a=kt.current,yt(kt,d?a&1|2:a&1),s):(on(s),null);case 22:case 23:return Lf(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Ln&1073741824)!==0&&(on(s),s.subtreeFlags&6&&(s.flags|=8192)):on(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function T1(r,s){switch(Wd(s),s.tag){case 1:return xn(s.type)&&oc(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Eo(),wt(yn),wt(rn),rf(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return tf(s),null;case 13:if(wt(kt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Co()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return wt(kt),null;case 4:return Eo(),null;case 10:return Gd(s.type._context),null;case 22:case 23:return Lf(),null;case 24:return null;default:return null}}var jc=!1,an=!1,O1=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Po(r,s){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(d){Ot(r,s,d)}else a.current=null}function _f(r,s,a){try{a()}catch(d){Ot(r,s,d)}}var uv=!1;function A1(r,s){if(Md=Kl,r=Bm(),Ed(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var d=a.getSelection&&a.getSelection();if(d&&d.rangeCount!==0){a=d.anchorNode;var p=d.anchorOffset,g=d.focusNode;d=d.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var j=0,A=-1,V=-1,q=0,le=0,ce=r,ae=null;t:for(;;){for(var xe;ce!==a||p!==0&&ce.nodeType!==3||(A=j+p),ce!==g||d!==0&&ce.nodeType!==3||(V=j+d),ce.nodeType===3&&(j+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ae=ce,ce=xe;for(;;){if(ce===r)break t;if(ae===a&&++q===p&&(A=j),ae===g&&++le===d&&(V=j),(xe=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=xe}a=A===-1||V===-1?null:{start:A,end:V}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ld={focusedElem:r,selectionRange:a},Kl=!1,Se=s;Se!==null;)if(s=Se,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Se=r;else for(;Se!==null;){s=Se;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var _e=be.memoizedProps,Ft=be.memoizedState,W=s.stateNode,$=W.getSnapshotBeforeUpdate(s.elementType===s.type?_e:hr(s.type,_e),Ft);W.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var K=s.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){Ot(s,s.return,de)}if(r=s.sibling,r!==null){r.return=s.return,Se=r;break}Se=s.return}return be=uv,uv=!1,be}function Qa(r,s,a){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var p=d=d.next;do{if((p.tag&r)===r){var g=p.destroy;p.destroy=void 0,g!==void 0&&_f(s,a,g)}p=p.next}while(p!==d)}}function Ec(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&r)===r){var d=a.create;a.destroy=d()}a=a.next}while(a!==s)}}function kf(r){var s=r.ref;if(s!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof s=="function"?s(r):s.current=r}}function dv(r){var s=r.alternate;s!==null&&(r.alternate=null,dv(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[Rr],delete s[La],delete s[Vd],delete s[m1],delete s[g1])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function fv(r){return r.tag===5||r.tag===3||r.tag===4}function hv(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||fv(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function jf(r,s,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(r,s):a.insertBefore(r,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(r,a)):(s=a,s.appendChild(r)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=sc));else if(d!==4&&(r=r.child,r!==null))for(jf(r,s,a),r=r.sibling;r!==null;)jf(r,s,a),r=r.sibling}function Ef(r,s,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?a.insertBefore(r,s):a.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(Ef(r,s,a),r=r.sibling;r!==null;)Ef(r,s,a),r=r.sibling}var Xt=null,pr=!1;function Ls(r,s,a){for(a=a.child;a!==null;)pv(r,s,a),a=a.sibling}function pv(r,s,a){if(Er&&typeof Er.onCommitFiberUnmount=="function")try{Er.onCommitFiberUnmount(Vl,a)}catch{}switch(a.tag){case 5:an||Po(a,s);case 6:var d=Xt,p=pr;Xt=null,Ls(r,s,a),Xt=d,pr=p,Xt!==null&&(pr?(r=Xt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):Xt.removeChild(a.stateNode));break;case 18:Xt!==null&&(pr?(r=Xt,a=a.stateNode,r.nodeType===8?zd(r.parentNode,a):r.nodeType===1&&zd(r,a),ka(r)):zd(Xt,a.stateNode));break;case 4:d=Xt,p=pr,Xt=a.stateNode.containerInfo,pr=!0,Ls(r,s,a),Xt=d,pr=p;break;case 0:case 11:case 14:case 15:if(!an&&(d=a.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){p=d=d.next;do{var g=p,j=g.destroy;g=g.tag,j!==void 0&&((g&2)!==0||(g&4)!==0)&&_f(a,s,j),p=p.next}while(p!==d)}Ls(r,s,a);break;case 1:if(!an&&(Po(a,s),d=a.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(A){Ot(a,s,A)}Ls(r,s,a);break;case 21:Ls(r,s,a);break;case 22:a.mode&1?(an=(d=an)||a.memoizedState!==null,Ls(r,s,a),an=d):Ls(r,s,a);break;default:Ls(r,s,a)}}function mv(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new O1),s.forEach(function(d){var p=B1.bind(null,r,d);a.has(d)||(a.add(d),d.then(p,p))})}}function mr(r,s){var a=s.deletions;if(a!==null)for(var d=0;d<a.length;d++){var p=a[d];try{var g=r,j=s,A=j;e:for(;A!==null;){switch(A.tag){case 5:Xt=A.stateNode,pr=!1;break e;case 3:Xt=A.stateNode.containerInfo,pr=!0;break e;case 4:Xt=A.stateNode.containerInfo,pr=!0;break e}A=A.return}if(Xt===null)throw Error(n(160));pv(g,j,p),Xt=null,pr=!1;var V=p.alternate;V!==null&&(V.return=null),p.return=null}catch(q){Ot(p,s,q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)gv(s,r),s=s.sibling}function gv(r,s){var a=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(mr(s,r),Tr(r),d&4){try{Qa(3,r,r.return),Ec(3,r)}catch(_e){Ot(r,r.return,_e)}try{Qa(5,r,r.return)}catch(_e){Ot(r,r.return,_e)}}break;case 1:mr(s,r),Tr(r),d&512&&a!==null&&Po(a,a.return);break;case 5:if(mr(s,r),Tr(r),d&512&&a!==null&&Po(a,a.return),r.flags&32){var p=r.stateNode;try{_t(p,"")}catch(_e){Ot(r,r.return,_e)}}if(d&4&&(p=r.stateNode,p!=null)){var g=r.memoizedProps,j=a!==null?a.memoizedProps:g,A=r.type,V=r.updateQueue;if(r.updateQueue=null,V!==null)try{A==="input"&&g.type==="radio"&&g.name!=null&&Yt(p,g),Be(A,j);var q=Be(A,g);for(j=0;j<V.length;j+=2){var le=V[j],ce=V[j+1];le==="style"?he(p,ce):le==="dangerouslySetInnerHTML"?$e(p,ce):le==="children"?_t(p,ce):E(p,le,ce,q)}switch(A){case"input":Dt(p,g);break;case"textarea":me(p,g);break;case"select":var ae=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var xe=g.value;xe!=null?z(p,!!g.multiple,xe,!1):ae!==!!g.multiple&&(g.defaultValue!=null?z(p,!!g.multiple,g.defaultValue,!0):z(p,!!g.multiple,g.multiple?[]:"",!1))}p[La]=g}catch(_e){Ot(r,r.return,_e)}}break;case 6:if(mr(s,r),Tr(r),d&4){if(r.stateNode===null)throw Error(n(162));p=r.stateNode,g=r.memoizedProps;try{p.nodeValue=g}catch(_e){Ot(r,r.return,_e)}}break;case 3:if(mr(s,r),Tr(r),d&4&&a!==null&&a.memoizedState.isDehydrated)try{ka(s.containerInfo)}catch(_e){Ot(r,r.return,_e)}break;case 4:mr(s,r),Tr(r);break;case 13:mr(s,r),Tr(r),p=r.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(Nf=Lt())),d&4&&mv(r);break;case 22:if(le=a!==null&&a.memoizedState!==null,r.mode&1?(an=(q=an)||le,mr(s,r),an=q):mr(s,r),Tr(r),d&8192){if(q=r.memoizedState!==null,(r.stateNode.isHidden=q)&&!le&&(r.mode&1)!==0)for(Se=r,le=r.child;le!==null;){for(ce=Se=le;Se!==null;){switch(ae=Se,xe=ae.child,ae.tag){case 0:case 11:case 14:case 15:Qa(4,ae,ae.return);break;case 1:Po(ae,ae.return);var be=ae.stateNode;if(typeof be.componentWillUnmount=="function"){d=ae,a=ae.return;try{s=d,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(_e){Ot(d,a,_e)}}break;case 5:Po(ae,ae.return);break;case 22:if(ae.memoizedState!==null){xv(ce);continue}}xe!==null?(xe.return=ae,Se=xe):xv(ce)}le=le.sibling}e:for(le=null,ce=r;;){if(ce.tag===5){if(le===null){le=ce;try{p=ce.stateNode,q?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(A=ce.stateNode,V=ce.memoizedProps.style,j=V!=null&&V.hasOwnProperty("display")?V.display:null,A.style.display=lo("display",j))}catch(_e){Ot(r,r.return,_e)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=q?"":ce.memoizedProps}catch(_e){Ot(r,r.return,_e)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===r)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===r)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===r)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:mr(s,r),Tr(r),d&4&&mv(r);break;case 21:break;default:mr(s,r),Tr(r)}}function Tr(r){var s=r.flags;if(s&2){try{e:{for(var a=r.return;a!==null;){if(fv(a)){var d=a;break e}a=a.return}throw Error(n(160))}switch(d.tag){case 5:var p=d.stateNode;d.flags&32&&(_t(p,""),d.flags&=-33);var g=hv(r);Ef(r,g,p);break;case 3:case 4:var j=d.stateNode.containerInfo,A=hv(r);jf(r,A,j);break;default:throw Error(n(161))}}catch(V){Ot(r,r.return,V)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function I1(r,s,a){Se=r,vv(r)}function vv(r,s,a){for(var d=(r.mode&1)!==0;Se!==null;){var p=Se,g=p.child;if(p.tag===22&&d){var j=p.memoizedState!==null||jc;if(!j){var A=p.alternate,V=A!==null&&A.memoizedState!==null||an;A=jc;var q=an;if(jc=j,(an=V)&&!q)for(Se=p;Se!==null;)j=Se,V=j.child,j.tag===22&&j.memoizedState!==null?wv(p):V!==null?(V.return=j,Se=V):wv(p);for(;g!==null;)Se=g,vv(g),g=g.sibling;Se=p,jc=A,an=q}yv(r)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,Se=g):yv(r)}}function yv(r){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:an||Ec(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!an)if(a===null)d.componentDidMount();else{var p=s.elementType===s.type?a.memoizedProps:hr(s.type,a.memoizedProps);d.componentDidUpdate(p,a.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var g=s.updateQueue;g!==null&&xg(s,g,d);break;case 3:var j=s.updateQueue;if(j!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}xg(s,j,a)}break;case 5:var A=s.stateNode;if(a===null&&s.flags&4){a=A;var V=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&a.focus();break;case"img":V.src&&(a.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var q=s.alternate;if(q!==null){var le=q.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&ka(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}an||s.flags&512&&kf(s)}catch(ae){Ot(s,s.return,ae)}}if(s===r){Se=null;break}if(a=s.sibling,a!==null){a.return=s.return,Se=a;break}Se=s.return}}function xv(r){for(;Se!==null;){var s=Se;if(s===r){Se=null;break}var a=s.sibling;if(a!==null){a.return=s.return,Se=a;break}Se=s.return}}function wv(r){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{Ec(4,s)}catch(V){Ot(s,a,V)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var p=s.return;try{d.componentDidMount()}catch(V){Ot(s,p,V)}}var g=s.return;try{kf(s)}catch(V){Ot(s,g,V)}break;case 5:var j=s.return;try{kf(s)}catch(V){Ot(s,j,V)}}}catch(V){Ot(s,s.return,V)}if(s===r){Se=null;break}var A=s.sibling;if(A!==null){A.return=s.return,Se=A;break}Se=s.return}}var M1=Math.ceil,Rc=R.ReactCurrentDispatcher,Rf=R.ReactCurrentOwner,Jn=R.ReactCurrentBatchConfig,tt=0,Zt=null,zt=null,Jt=0,Ln=0,No=Ts(0),Wt=0,Za=null,Ti=0,Pc=0,Pf=0,qa=null,Sn=null,Nf=0,To=1/0,ts=null,Nc=!1,Tf=null,Fs=null,Tc=!1,Ds=null,Oc=0,Ga=0,Of=null,Ac=-1,Ic=0;function pn(){return(tt&6)!==0?Lt():Ac!==-1?Ac:Ac=Lt()}function zs(r){return(r.mode&1)===0?1:(tt&2)!==0&&Jt!==0?Jt&-Jt:y1.transition!==null?(Ic===0&&(Ic=hm()),Ic):(r=mt,r!==0||(r=window.event,r=r===void 0?16:bm(r.type)),r)}function gr(r,s,a,d){if(50<Ga)throw Ga=0,Of=null,Error(n(185));wa(r,a,d),((tt&2)===0||r!==Zt)&&(r===Zt&&((tt&2)===0&&(Pc|=a),Wt===4&&Vs(r,Jt)),bn(r,d),a===1&&tt===0&&(s.mode&1)===0&&(To=Lt()+500,lc&&As()))}function bn(r,s){var a=r.callbackNode;yb(r,s);var d=Ul(r,r===Zt?Jt:0);if(d===0)a!==null&&um(a),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(a!=null&&um(a),s===1)r.tag===0?v1(bv.bind(null,r)):ag(bv.bind(null,r)),h1(function(){(tt&6)===0&&As()}),a=null;else{switch(pm(d)){case 1:a=ud;break;case 4:a=dm;break;case 16:a=zl;break;case 536870912:a=fm;break;default:a=zl}a=Nv(a,Sv.bind(null,r))}r.callbackPriority=s,r.callbackNode=a}}function Sv(r,s){if(Ac=-1,Ic=0,(tt&6)!==0)throw Error(n(327));var a=r.callbackNode;if(Oo()&&r.callbackNode!==a)return null;var d=Ul(r,r===Zt?Jt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=Mc(r,d);else{s=d;var p=tt;tt|=2;var g=_v();(Zt!==r||Jt!==s)&&(ts=null,To=Lt()+500,Ai(r,s));do try{D1();break}catch(A){Cv(r,A)}while(!0);qd(),Rc.current=g,tt=p,zt!==null?s=0:(Zt=null,Jt=0,s=Wt)}if(s!==0){if(s===2&&(p=dd(r),p!==0&&(d=p,s=Af(r,p))),s===1)throw a=Za,Ai(r,0),Vs(r,d),bn(r,Lt()),a;if(s===6)Vs(r,d);else{if(p=r.current.alternate,(d&30)===0&&!L1(p)&&(s=Mc(r,d),s===2&&(g=dd(r),g!==0&&(d=g,s=Af(r,g))),s===1))throw a=Za,Ai(r,0),Vs(r,d),bn(r,Lt()),a;switch(r.finishedWork=p,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Ii(r,Sn,ts);break;case 3:if(Vs(r,d),(d&130023424)===d&&(s=Nf+500-Lt(),10<s)){if(Ul(r,0)!==0)break;if(p=r.suspendedLanes,(p&d)!==d){pn(),r.pingedLanes|=r.suspendedLanes&p;break}r.timeoutHandle=Dd(Ii.bind(null,r,Sn,ts),s);break}Ii(r,Sn,ts);break;case 4:if(Vs(r,d),(d&4194240)===d)break;for(s=r.eventTimes,p=-1;0<d;){var j=31-ur(d);g=1<<j,j=s[j],j>p&&(p=j),d&=~g}if(d=p,d=Lt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*M1(d/1960))-d,10<d){r.timeoutHandle=Dd(Ii.bind(null,r,Sn,ts),d);break}Ii(r,Sn,ts);break;case 5:Ii(r,Sn,ts);break;default:throw Error(n(329))}}}return bn(r,Lt()),r.callbackNode===a?Sv.bind(null,r):null}function Af(r,s){var a=qa;return r.current.memoizedState.isDehydrated&&(Ai(r,s).flags|=256),r=Mc(r,s),r!==2&&(s=Sn,Sn=a,s!==null&&If(s)),r}function If(r){Sn===null?Sn=r:Sn.push.apply(Sn,r)}function L1(r){for(var s=r;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var d=0;d<a.length;d++){var p=a[d],g=p.getSnapshot;p=p.value;try{if(!dr(g(),p))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Vs(r,s){for(s&=~Pf,s&=~Pc,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var a=31-ur(s),d=1<<a;r[a]=-1,s&=~d}}function bv(r){if((tt&6)!==0)throw Error(n(327));Oo();var s=Ul(r,0);if((s&1)===0)return bn(r,Lt()),null;var a=Mc(r,s);if(r.tag!==0&&a===2){var d=dd(r);d!==0&&(s=d,a=Af(r,d))}if(a===1)throw a=Za,Ai(r,0),Vs(r,s),bn(r,Lt()),a;if(a===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Ii(r,Sn,ts),bn(r,Lt()),null}function Mf(r,s){var a=tt;tt|=1;try{return r(s)}finally{tt=a,tt===0&&(To=Lt()+500,lc&&As())}}function Oi(r){Ds!==null&&Ds.tag===0&&(tt&6)===0&&Oo();var s=tt;tt|=1;var a=Jn.transition,d=mt;try{if(Jn.transition=null,mt=1,r)return r()}finally{mt=d,Jn.transition=a,tt=s,(tt&6)===0&&As()}}function Lf(){Ln=No.current,wt(No)}function Ai(r,s){r.finishedWork=null,r.finishedLanes=0;var a=r.timeoutHandle;if(a!==-1&&(r.timeoutHandle=-1,f1(a)),zt!==null)for(a=zt.return;a!==null;){var d=a;switch(Wd(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&oc();break;case 3:Eo(),wt(yn),wt(rn),rf();break;case 5:tf(d);break;case 4:Eo();break;case 13:wt(kt);break;case 19:wt(kt);break;case 10:Gd(d.type._context);break;case 22:case 23:Lf()}a=a.return}if(Zt=r,zt=r=$s(r.current,null),Jt=Ln=s,Wt=0,Za=null,Pf=Pc=Ti=0,Sn=qa=null,Ri!==null){for(s=0;s<Ri.length;s++)if(a=Ri[s],d=a.interleaved,d!==null){a.interleaved=null;var p=d.next,g=a.pending;if(g!==null){var j=g.next;g.next=p,d.next=j}a.pending=d}Ri=null}return r}function Cv(r,s){do{var a=zt;try{if(qd(),yc.current=bc,xc){for(var d=jt.memoizedState;d!==null;){var p=d.queue;p!==null&&(p.pending=null),d=d.next}xc=!1}if(Ni=0,Qt=Ut=jt=null,Ba=!1,Ua=0,Rf.current=null,a===null||a.return===null){Wt=1,Za=s,zt=null;break}e:{var g=r,j=a.return,A=a,V=s;if(s=Jt,A.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var q=V,le=A,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var xe=Zg(j);if(xe!==null){xe.flags&=-257,qg(xe,j,A,g,s),xe.mode&1&&Qg(g,q,s),s=xe,V=q;var be=s.updateQueue;if(be===null){var _e=new Set;_e.add(V),s.updateQueue=_e}else be.add(V);break e}else{if((s&1)===0){Qg(g,q,s),Ff();break e}V=Error(n(426))}}else if(bt&&A.mode&1){var Ft=Zg(j);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),qg(Ft,j,A,g,s),Qd(Ro(V,A));break e}}g=V=Ro(V,A),Wt!==4&&(Wt=2),qa===null?qa=[g]:qa.push(g),g=j;do{switch(g.tag){case 3:g.flags|=65536,s&=-s,g.lanes|=s;var W=Hg(g,V,s);yg(g,W);break e;case 1:A=V;var $=g.type,K=g.stateNode;if((g.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Fs===null||!Fs.has(K)))){g.flags|=65536,s&=-s,g.lanes|=s;var de=Kg(g,A,s);yg(g,de);break e}}g=g.return}while(g!==null)}jv(a)}catch(je){s=je,zt===a&&a!==null&&(zt=a=a.return);continue}break}while(!0)}function _v(){var r=Rc.current;return Rc.current=bc,r===null?bc:r}function Ff(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),Zt===null||(Ti&268435455)===0&&(Pc&268435455)===0||Vs(Zt,Jt)}function Mc(r,s){var a=tt;tt|=2;var d=_v();(Zt!==r||Jt!==s)&&(ts=null,Ai(r,s));do try{F1();break}catch(p){Cv(r,p)}while(!0);if(qd(),tt=a,Rc.current=d,zt!==null)throw Error(n(261));return Zt=null,Jt=0,Wt}function F1(){for(;zt!==null;)kv(zt)}function D1(){for(;zt!==null&&!cb();)kv(zt)}function kv(r){var s=Pv(r.alternate,r,Ln);r.memoizedProps=r.pendingProps,s===null?jv(r):zt=s,Rf.current=null}function jv(r){var s=r;do{var a=s.alternate;if(r=s.return,(s.flags&32768)===0){if(a=N1(a,s,Ln),a!==null){zt=a;return}}else{if(a=T1(a,s),a!==null){a.flags&=32767,zt=a;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Wt=6,zt=null;return}}if(s=s.sibling,s!==null){zt=s;return}zt=s=r}while(s!==null);Wt===0&&(Wt=5)}function Ii(r,s,a){var d=mt,p=Jn.transition;try{Jn.transition=null,mt=1,z1(r,s,a,d)}finally{Jn.transition=p,mt=d}return null}function z1(r,s,a,d){do Oo();while(Ds!==null);if((tt&6)!==0)throw Error(n(327));a=r.finishedWork;var p=r.finishedLanes;if(a===null)return null;if(r.finishedWork=null,r.finishedLanes=0,a===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var g=a.lanes|a.childLanes;if(xb(r,g),r===Zt&&(zt=Zt=null,Jt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Tc||(Tc=!0,Nv(zl,function(){return Oo(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=Jn.transition,Jn.transition=null;var j=mt;mt=1;var A=tt;tt|=4,Rf.current=null,A1(r,a),gv(a,r),i1(Ld),Kl=!!Md,Ld=Md=null,r.current=a,I1(a),ub(),tt=A,mt=j,Jn.transition=g}else r.current=a;if(Tc&&(Tc=!1,Ds=r,Oc=p),g=r.pendingLanes,g===0&&(Fs=null),hb(a.stateNode),bn(r,Lt()),s!==null)for(d=r.onRecoverableError,a=0;a<s.length;a++)p=s[a],d(p.value,{componentStack:p.stack,digest:p.digest});if(Nc)throw Nc=!1,r=Tf,Tf=null,r;return(Oc&1)!==0&&r.tag!==0&&Oo(),g=r.pendingLanes,(g&1)!==0?r===Of?Ga++:(Ga=0,Of=r):Ga=0,As(),null}function Oo(){if(Ds!==null){var r=pm(Oc),s=Jn.transition,a=mt;try{if(Jn.transition=null,mt=16>r?16:r,Ds===null)var d=!1;else{if(r=Ds,Ds=null,Oc=0,(tt&6)!==0)throw Error(n(331));var p=tt;for(tt|=4,Se=r.current;Se!==null;){var g=Se,j=g.child;if((Se.flags&16)!==0){var A=g.deletions;if(A!==null){for(var V=0;V<A.length;V++){var q=A[V];for(Se=q;Se!==null;){var le=Se;switch(le.tag){case 0:case 11:case 15:Qa(8,le,g)}var ce=le.child;if(ce!==null)ce.return=le,Se=ce;else for(;Se!==null;){le=Se;var ae=le.sibling,xe=le.return;if(dv(le),le===q){Se=null;break}if(ae!==null){ae.return=xe,Se=ae;break}Se=xe}}}var be=g.alternate;if(be!==null){var _e=be.child;if(_e!==null){be.child=null;do{var Ft=_e.sibling;_e.sibling=null,_e=Ft}while(_e!==null)}}Se=g}}if((g.subtreeFlags&2064)!==0&&j!==null)j.return=g,Se=j;else e:for(;Se!==null;){if(g=Se,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:Qa(9,g,g.return)}var W=g.sibling;if(W!==null){W.return=g.return,Se=W;break e}Se=g.return}}var $=r.current;for(Se=$;Se!==null;){j=Se;var K=j.child;if((j.subtreeFlags&2064)!==0&&K!==null)K.return=j,Se=K;else e:for(j=$;Se!==null;){if(A=Se,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Ec(9,A)}}catch(je){Ot(A,A.return,je)}if(A===j){Se=null;break e}var de=A.sibling;if(de!==null){de.return=A.return,Se=de;break e}Se=A.return}}if(tt=p,As(),Er&&typeof Er.onPostCommitFiberRoot=="function")try{Er.onPostCommitFiberRoot(Vl,r)}catch{}d=!0}return d}finally{mt=a,Jn.transition=s}}return!1}function Ev(r,s,a){s=Ro(a,s),s=Hg(r,s,1),r=Ms(r,s,1),s=pn(),r!==null&&(wa(r,1,s),bn(r,s))}function Ot(r,s,a){if(r.tag===3)Ev(r,r,a);else for(;s!==null;){if(s.tag===3){Ev(s,r,a);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Fs===null||!Fs.has(d))){r=Ro(a,r),r=Kg(s,r,1),s=Ms(s,r,1),r=pn(),s!==null&&(wa(s,1,r),bn(s,r));break}}s=s.return}}function V1(r,s,a){var d=r.pingCache;d!==null&&d.delete(s),s=pn(),r.pingedLanes|=r.suspendedLanes&a,Zt===r&&(Jt&a)===a&&(Wt===4||Wt===3&&(Jt&130023424)===Jt&&500>Lt()-Nf?Ai(r,0):Pf|=a),bn(r,s)}function Rv(r,s){s===0&&((r.mode&1)===0?s=1:(s=Bl,Bl<<=1,(Bl&130023424)===0&&(Bl=4194304)));var a=pn();r=Xr(r,s),r!==null&&(wa(r,s,a),bn(r,a))}function $1(r){var s=r.memoizedState,a=0;s!==null&&(a=s.retryLane),Rv(r,a)}function B1(r,s){var a=0;switch(r.tag){case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(a=p.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Rv(r,a)}var Pv;Pv=function(r,s,a){if(r!==null)if(r.memoizedProps!==s.pendingProps||yn.current)wn=!0;else{if((r.lanes&a)===0&&(s.flags&128)===0)return wn=!1,P1(r,s,a);wn=(r.flags&131072)!==0}else wn=!1,bt&&(s.flags&1048576)!==0&&lg(s,uc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;kc(r,s),r=s.pendingProps;var p=wo(s,rn.current);jo(s,a),p=af(null,s,d,r,p,a);var g=lf();return s.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,xn(d)?(g=!0,ac(s)):g=!1,s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Jd(s),p.updater=Cc,s.stateNode=p,p._reactInternals=s,pf(s,d,r,a),s=yf(null,s,d,!0,g,a)):(s.tag=0,bt&&g&&Ud(s),hn(null,s,p,a),s=s.child),s;case 16:d=s.elementType;e:{switch(kc(r,s),r=s.pendingProps,p=d._init,d=p(d._payload),s.type=d,p=s.tag=W1(d),r=hr(d,r),p){case 0:s=vf(null,s,d,r,a);break e;case 1:s=tv(null,s,d,r,a);break e;case 11:s=Gg(null,s,d,r,a);break e;case 14:s=Yg(null,s,d,hr(d.type,r),a);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,p=s.pendingProps,p=s.elementType===d?p:hr(d,p),vf(r,s,d,p,a);case 1:return d=s.type,p=s.pendingProps,p=s.elementType===d?p:hr(d,p),tv(r,s,d,p,a);case 3:e:{if(nv(s),r===null)throw Error(n(387));d=s.pendingProps,g=s.memoizedState,p=g.element,vg(r,s),gc(s,d,null,a);var j=s.memoizedState;if(d=j.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},s.updateQueue.baseState=g,s.memoizedState=g,s.flags&256){p=Ro(Error(n(423)),s),s=rv(r,s,d,a,p);break e}else if(d!==p){p=Ro(Error(n(424)),s),s=rv(r,s,d,a,p);break e}else for(Mn=Ns(s.stateNode.containerInfo.firstChild),In=s,bt=!0,fr=null,a=mg(s,null,d,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Co(),d===p){s=es(r,s,a);break e}hn(r,s,d,a)}s=s.child}return s;case 5:return wg(s),r===null&&Kd(s),d=s.type,p=s.pendingProps,g=r!==null?r.memoizedProps:null,j=p.children,Fd(d,p)?j=null:g!==null&&Fd(d,g)&&(s.flags|=32),ev(r,s),hn(r,s,j,a),s.child;case 6:return r===null&&Kd(s),null;case 13:return sv(r,s,a);case 4:return ef(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=_o(s,null,d,a):hn(r,s,d,a),s.child;case 11:return d=s.type,p=s.pendingProps,p=s.elementType===d?p:hr(d,p),Gg(r,s,d,p,a);case 7:return hn(r,s,s.pendingProps,a),s.child;case 8:return hn(r,s,s.pendingProps.children,a),s.child;case 12:return hn(r,s,s.pendingProps.children,a),s.child;case 10:e:{if(d=s.type._context,p=s.pendingProps,g=s.memoizedProps,j=p.value,yt(hc,d._currentValue),d._currentValue=j,g!==null)if(dr(g.value,j)){if(g.children===p.children&&!yn.current){s=es(r,s,a);break e}}else for(g=s.child,g!==null&&(g.return=s);g!==null;){var A=g.dependencies;if(A!==null){j=g.child;for(var V=A.firstContext;V!==null;){if(V.context===d){if(g.tag===1){V=Jr(-1,a&-a),V.tag=2;var q=g.updateQueue;if(q!==null){q=q.shared;var le=q.pending;le===null?V.next=V:(V.next=le.next,le.next=V),q.pending=V}}g.lanes|=a,V=g.alternate,V!==null&&(V.lanes|=a),Yd(g.return,a,s),A.lanes|=a;break}V=V.next}}else if(g.tag===10)j=g.type===s.type?null:g.child;else if(g.tag===18){if(j=g.return,j===null)throw Error(n(341));j.lanes|=a,A=j.alternate,A!==null&&(A.lanes|=a),Yd(j,a,s),j=g.sibling}else j=g.child;if(j!==null)j.return=g;else for(j=g;j!==null;){if(j===s){j=null;break}if(g=j.sibling,g!==null){g.return=j.return,j=g;break}j=j.return}g=j}hn(r,s,p.children,a),s=s.child}return s;case 9:return p=s.type,d=s.pendingProps.children,jo(s,a),p=Yn(p),d=d(p),s.flags|=1,hn(r,s,d,a),s.child;case 14:return d=s.type,p=hr(d,s.pendingProps),p=hr(d.type,p),Yg(r,s,d,p,a);case 15:return Xg(r,s,s.type,s.pendingProps,a);case 17:return d=s.type,p=s.pendingProps,p=s.elementType===d?p:hr(d,p),kc(r,s),s.tag=1,xn(d)?(r=!0,ac(s)):r=!1,jo(s,a),Ug(s,d,p),pf(s,d,p,a),yf(null,s,d,!0,r,a);case 19:return ov(r,s,a);case 22:return Jg(r,s,a)}throw Error(n(156,s.tag))};function Nv(r,s){return cm(r,s)}function U1(r,s,a,d){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function er(r,s,a,d){return new U1(r,s,a,d)}function Df(r){return r=r.prototype,!(!r||!r.isReactComponent)}function W1(r){if(typeof r=="function")return Df(r)?1:0;if(r!=null){if(r=r.$$typeof,r===U)return 11;if(r===ie)return 14}return 2}function $s(r,s){var a=r.alternate;return a===null?(a=er(r.tag,s,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=s,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,s=r.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function Lc(r,s,a,d,p,g){var j=2;if(d=r,typeof r=="function")Df(r)&&(j=1);else if(typeof r=="string")j=5;else e:switch(r){case O:return Mi(a.children,p,g,s);case F:j=8,p|=8;break;case L:return r=er(12,a,s,p|2),r.elementType=L,r.lanes=g,r;case ee:return r=er(13,a,s,p),r.elementType=ee,r.lanes=g,r;case te:return r=er(19,a,s,p),r.elementType=te,r.lanes=g,r;case oe:return Fc(a,p,g,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case I:j=10;break e;case Q:j=9;break e;case U:j=11;break e;case ie:j=14;break e;case X:j=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=er(j,a,s,p),s.elementType=r,s.type=d,s.lanes=g,s}function Mi(r,s,a,d){return r=er(7,r,d,s),r.lanes=a,r}function Fc(r,s,a,d){return r=er(22,r,d,s),r.elementType=oe,r.lanes=a,r.stateNode={isHidden:!1},r}function zf(r,s,a){return r=er(6,r,null,s),r.lanes=a,r}function Vf(r,s,a){return s=er(4,r.children!==null?r.children:[],r.key,s),s.lanes=a,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function H1(r,s,a,d,p){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fd(0),this.expirationTimes=fd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fd(0),this.identifierPrefix=d,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function $f(r,s,a,d,p,g,j,A,V){return r=new H1(r,s,a,A,V),s===1?(s=1,g===!0&&(s|=8)):s=0,g=er(3,null,null,s),r.current=g,g.stateNode=r,g.memoizedState={element:d,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jd(g),r}function K1(r,s,a){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:d==null?null:""+d,children:r,containerInfo:s,implementation:a}}function Tv(r){if(!r)return Os;r=r._reactInternals;e:{if(Ci(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(xn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var a=r.type;if(xn(a))return ig(r,a,s)}return s}function Ov(r,s,a,d,p,g,j,A,V){return r=$f(a,d,!0,r,p,g,j,A,V),r.context=Tv(null),a=r.current,d=pn(),p=zs(a),g=Jr(d,p),g.callback=s??null,Ms(a,g,p),r.current.lanes=p,wa(r,p,d),bn(r,d),r}function Dc(r,s,a,d){var p=s.current,g=pn(),j=zs(p);return a=Tv(a),s.context===null?s.context=a:s.pendingContext=a,s=Jr(g,j),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=Ms(p,s,j),r!==null&&(gr(r,p,j,g),mc(r,p,j)),j}function zc(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Av(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<s?a:s}}function Bf(r,s){Av(r,s),(r=r.alternate)&&Av(r,s)}function Q1(){return null}var Iv=typeof reportError=="function"?reportError:function(r){console.error(r)};function Uf(r){this._internalRoot=r}Vc.prototype.render=Uf.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Dc(r,s,null,null)},Vc.prototype.unmount=Uf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Oi(function(){Dc(null,r,null,null)}),s[Zr]=null}};function Vc(r){this._internalRoot=r}Vc.prototype.unstable_scheduleHydration=function(r){if(r){var s=vm();r={blockedOn:null,target:r,priority:s};for(var a=0;a<Es.length&&s!==0&&s<Es[a].priority;a++);Es.splice(a,0,r),a===0&&wm(r)}};function Wf(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function $c(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Mv(){}function Z1(r,s,a,d,p){if(p){if(typeof d=="function"){var g=d;d=function(){var q=zc(j);g.call(q)}}var j=Ov(s,d,r,0,null,!1,!1,"",Mv);return r._reactRootContainer=j,r[Zr]=j.current,Ia(r.nodeType===8?r.parentNode:r),Oi(),j}for(;p=r.lastChild;)r.removeChild(p);if(typeof d=="function"){var A=d;d=function(){var q=zc(V);A.call(q)}}var V=$f(r,0,!1,null,null,!1,!1,"",Mv);return r._reactRootContainer=V,r[Zr]=V.current,Ia(r.nodeType===8?r.parentNode:r),Oi(function(){Dc(s,V,a,d)}),V}function Bc(r,s,a,d,p){var g=a._reactRootContainer;if(g){var j=g;if(typeof p=="function"){var A=p;p=function(){var V=zc(j);A.call(V)}}Dc(s,j,r,p)}else j=Z1(a,s,r,p,d);return zc(j)}mm=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var a=xa(s.pendingLanes);a!==0&&(hd(s,a|1),bn(s,Lt()),(tt&6)===0&&(To=Lt()+500,As()))}break;case 13:Oi(function(){var d=Xr(r,1);if(d!==null){var p=pn();gr(d,r,1,p)}}),Bf(r,1)}},pd=function(r){if(r.tag===13){var s=Xr(r,134217728);if(s!==null){var a=pn();gr(s,r,134217728,a)}Bf(r,134217728)}},gm=function(r){if(r.tag===13){var s=zs(r),a=Xr(r,s);if(a!==null){var d=pn();gr(a,r,s,d)}Bf(r,s)}},vm=function(){return mt},ym=function(r,s){var a=mt;try{return mt=r,s()}finally{mt=a}},Tn=function(r,s,a){switch(s){case"input":if(Dt(r,a),s=a.name,a.type==="radio"&&s!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var d=a[s];if(d!==r&&d.form===r.form){var p=ic(d);if(!p)throw Error(n(90));Ue(d),Dt(d,p)}}}break;case"textarea":me(r,a);break;case"select":s=a.value,s!=null&&z(r,!!a.multiple,s,!1)}},Ss=Mf,nn=Oi;var q1={usingClientEntryPoint:!1,Events:[Fa,yo,ic,On,ar,Mf]},Ya={findFiberByHostInstance:_i,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},G1={bundleType:Ya.bundleType,version:Ya.version,rendererPackageName:Ya.rendererPackageName,rendererConfig:Ya.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=am(r),r===null?null:r.stateNode},findFiberByHostInstance:Ya.findFiberByHostInstance||Q1,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 Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{Vl=Uc.inject(G1),Er=Uc}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q1,Cn.createPortal=function(r,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wf(s))throw Error(n(200));return K1(r,s,null,a)},Cn.createRoot=function(r,s){if(!Wf(r))throw Error(n(299));var a=!1,d="",p=Iv;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(p=s.onRecoverableError)),s=$f(r,1,!1,null,null,a,!1,d,p),r[Zr]=s.current,Ia(r.nodeType===8?r.parentNode:r),new Uf(s)},Cn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=am(s),r=r===null?null:r.stateNode,r},Cn.flushSync=function(r){return Oi(r)},Cn.hydrate=function(r,s,a){if(!$c(s))throw Error(n(200));return Bc(null,r,s,!0,a)},Cn.hydrateRoot=function(r,s,a){if(!Wf(r))throw Error(n(405));var d=a!=null&&a.hydratedSources||null,p=!1,g="",j=Iv;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(j=a.onRecoverableError)),s=Ov(s,null,r,1,a??null,p,!1,g,j),r[Zr]=s.current,Ia(r),d)for(r=0;r<d.length;r++)a=d[r],p=a._getVersion,p=p(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,p]:s.mutableSourceEagerHydrationData.push(a,p);return new Vc(s)},Cn.render=function(r,s,a){if(!$c(s))throw Error(n(200));return Bc(null,r,s,!1,a)},Cn.unmountComponentAtNode=function(r){if(!$c(r))throw Error(n(40));return r._reactRootContainer?(Oi(function(){Bc(null,null,r,!1,function(){r._reactRootContainer=null,r[Zr]=null})}),!0):!1},Cn.unstable_batchedUpdates=Mf,Cn.unstable_renderSubtreeIntoContainer=function(r,s,a,d){if(!$c(a))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Bc(r,s,a,!1,d)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Hv;function tw(){if(Hv)return Zf.exports;Hv=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(t){console.error(t)}}return e(),Zf.exports=sC(),Zf.exports}var Kv;function iC(){if(Kv)return Hc;Kv=1;var e=tw();return Hc.createRoot=e.createRoot,Hc.hydrateRoot=e.hydrateRoot,Hc}var oC=iC(),da=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ys,dp,Wx,lC=(Wx=class{constructor(){Pe(this,Ys,aC);Pe(this,dp,!1)}setTimeoutProvider(e){ye(this,Ys,e)}setTimeout(e,t){return D(this,Ys).setTimeout(e,t)}clearTimeout(e){D(this,Ys).clearTimeout(e)}setInterval(e,t){return D(this,Ys).setInterval(e,t)}clearInterval(e){D(this,Ys).clearInterval(e)}},Ys=new WeakMap,dp=new WeakMap,Wx),Fi=new lC;function cC(e){setTimeout(e,0)}var Xi=typeof window>"u"||"Deno"in globalThis;function vn(){}function uC(e,t){return typeof e=="function"?e(t):e}function kh(e){return typeof e=="number"&&e>=0&&e!==1/0}function nw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ci(e,t){return typeof e=="function"?e(t):e}function nr(e,t){return typeof e=="function"?e(t):e}function Qv(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:c}=e;if(u){if(i){if(t.queryHash!==hp(u,t.options))return!1}else if(!pl(t.queryKey,u))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||l&&!l(t))}function Zv(e,t){const{exact:n,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Ji(t.options.mutationKey)!==Ji(l))return!1}else if(!pl(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function hp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ji)(e)}function Ji(e){return JSON.stringify(e,(t,n)=>jh(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function pl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pl(e[n],t[n])):!1}var dC=Object.prototype.hasOwnProperty;function rw(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=qv(e)&&qv(t);if(!i&&!(jh(e)&&jh(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),c=u.length,h=i?new Array(c):{};let m=0;for(let v=0;v<c;v++){const y=i?v:u[v],x=e[y],w=t[y];if(x===w){h[y]=x,(i?v<l:dC.call(e,y))&&m++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){h[y]=w;continue}const k=rw(x,w,n+1);h[y]=k,k===x&&m++}return l===c&&m===l?e:h}function du(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jh(e){if(!Gv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Gv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gv(e){return Object.prototype.toString.call(e)==="[object Object]"}function fC(e){return new Promise(t=>{Fi.setTimeout(t,e)})}function Eh(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rw(e,t):t}function hC(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function pC(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var pp=Symbol();function sw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mp(e,t){return typeof e=="function"?e(...t):!!e}function mC(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var $i,Xs,Ho,Hx,gC=(Hx=class extends da{constructor(){super();Pe(this,$i);Pe(this,Xs);Pe(this,Ho);ye(this,Ho,t=>{if(!Xi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){D(this,Xs)||this.setEventListener(D(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Xs))==null||t.call(this),ye(this,Xs,void 0))}setEventListener(t){var n;ye(this,Ho,t),(n=D(this,Xs))==null||n.call(this),ye(this,Xs,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){D(this,$i)!==t&&(ye(this,$i,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,$i)=="boolean"?D(this,$i):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$i=new WeakMap,Xs=new WeakMap,Ho=new WeakMap,Hx),gp=new gC;function Rh(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var vC=cC;function yC(){let e=[],t=0,n=c=>{c()},i=c=>{c()},o=vC;const l=c=>{t?e.push(c):o(()=>{n(c)})},u=()=>{const c=e;e=[],c.length&&o(()=>{i(()=>{c.forEach(h=>{n(h)})})})};return{batch:c=>{let h;t++;try{h=c()}finally{t--,t||u()}return h},batchCalls:c=>(...h)=>{l(()=>{c(...h)})},schedule:l,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{o=c}}}var Kt=yC(),Ko,Js,Qo,Kx,xC=(Kx=class extends da{constructor(){super();Pe(this,Ko,!0);Pe(this,Js);Pe(this,Qo);ye(this,Qo,t=>{if(!Xi&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){D(this,Js)||this.setEventListener(D(this,Qo))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Js))==null||t.call(this),ye(this,Js,void 0))}setEventListener(t){var n;ye(this,Qo,t),(n=D(this,Js))==null||n.call(this),ye(this,Js,t(this.setOnline.bind(this)))}setOnline(t){D(this,Ko)!==t&&(ye(this,Ko,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return D(this,Ko)}},Ko=new WeakMap,Js=new WeakMap,Qo=new WeakMap,Kx),fu=new xC;function wC(e){return Math.min(1e3*2**e,3e4)}function iw(e){return(e??"online")==="online"?fu.isOnline():!0}var Ph=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ow(e){let t=!1,n=0,i;const o=Rh(),l=()=>o.status!=="pending",u=S=>{var C;if(!l()){const P=new Ph(S);x(P),(C=e.onCancel)==null||C.call(e,P)}},c=()=>{t=!0},h=()=>{t=!1},m=()=>gp.isFocused()&&(e.networkMode==="always"||fu.isOnline())&&e.canRun(),v=()=>iw(e.networkMode)&&e.canRun(),y=S=>{l()||(i==null||i(),o.resolve(S))},x=S=>{l()||(i==null||i(),o.reject(S))},w=()=>new Promise(S=>{var C;i=P=>{(l()||m())&&S(P)},(C=e.onPause)==null||C.call(e)}).then(()=>{var S;i=void 0,l()||(S=e.onContinue)==null||S.call(e)}),k=()=>{if(l())return;let S;const C=n===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(y).catch(P=>{var T;if(l())return;const _=e.retry??(Xi?0:3),E=e.retryDelay??wC,R=typeof E=="function"?E(n,P):E,N=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,P);if(t||!N){x(P);return}n++,(T=e.onFail)==null||T.call(e,n,P),fC(R).then(()=>m()?void 0:w()).then(()=>{t?x(P):k()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i==null||i(),o),cancelRetry:c,continueRetry:h,canStart:v,start:()=>(v()?k():w().then(k),o)}}var Bi,Qx,aw=(Qx=class{constructor(){Pe(this,Bi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kh(this.gcTime)&&ye(this,Bi,Fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xi?1/0:300*1e3))}clearGcTimeout(){D(this,Bi)&&(Fi.clearTimeout(D(this,Bi)),ye(this,Bi,void 0))}},Bi=new WeakMap,Qx),Ui,Zo,tr,Wi,Gt,El,Hi,yr,ss,Zx,SC=(Zx=class extends aw{constructor(t){super();Pe(this,yr);Pe(this,Ui);Pe(this,Zo);Pe(this,tr);Pe(this,Wi);Pe(this,Gt);Pe(this,El);Pe(this,Hi);ye(this,Hi,!1),ye(this,El,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Wi,t.client),ye(this,tr,D(this,Wi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Ui,Xv(this.options)),this.state=t.state??D(this,Ui),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,Gt))==null?void 0:t.promise}setOptions(t){if(this.options={...D(this,El),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Xv(this.options);n.data!==void 0&&(this.setState(Yv(n.data,n.dataUpdatedAt)),ye(this,Ui,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,tr).remove(this)}setData(t,n){const i=Eh(this.state.data,t,this.options);return Ke(this,yr,ss).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){Ke(this,yr,ss).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,o;const n=(i=D(this,Gt))==null?void 0:i.promise;return(o=D(this,Gt))==null||o.cancel(t),n?n.then(vn).catch(vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,Ui))}isActive(){return this.observers.some(t=>nr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ci(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!nw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Gt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Gt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,tr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,Gt)&&(D(this,Hi)?D(this,Gt).cancel({revert:!0}):D(this,Gt).cancelRetry()),this.scheduleGc()),D(this,tr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,yr,ss).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,v,y,x,w,k,S,C,P,_,E;if(this.state.fetchStatus!=="idle"&&((h=D(this,Gt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,Gt))return D(this,Gt).continueRetry(),D(this,Gt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(N=>N.options.queryFn);R&&this.setOptions(R.options)}const i=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(ye(this,Hi,!0),i.signal)})},l=()=>{const R=sw(this.options,n),T=(()=>{const O={client:D(this,Wi),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ye(this,Hi,!1),this.options.persister?this.options.persister(R,T,this):R(T)},c=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Wi),state:this.state,fetchFn:l};return o(R),R})();(m=this.options.behavior)==null||m.onFetch(c,this),ye(this,Zo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=c.fetchOptions)==null?void 0:v.meta))&&Ke(this,yr,ss).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),ye(this,Gt,ow({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:R=>{R instanceof Ph&&R.revert&&this.setState({...D(this,Zo),fetchStatus:"idle"}),i.abort()},onFail:(R,N)=>{Ke(this,yr,ss).call(this,{type:"failed",failureCount:R,error:N})},onPause:()=>{Ke(this,yr,ss).call(this,{type:"pause"})},onContinue:()=>{Ke(this,yr,ss).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const R=await D(this,Gt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(w=(x=D(this,tr).config).onSuccess)==null||w.call(x,R,this),(S=(k=D(this,tr).config).onSettled)==null||S.call(k,R,this.state.error,this),R}catch(R){if(R instanceof Ph){if(R.silent)return D(this,Gt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ke(this,yr,ss).call(this,{type:"error",error:R}),(P=(C=D(this,tr).config).onError)==null||P.call(C,R,this),(E=(_=D(this,tr).config).onSettled)==null||E.call(_,this.state.data,R,this),R}finally{this.scheduleGc()}}},Ui=new WeakMap,Zo=new WeakMap,tr=new WeakMap,Wi=new WeakMap,Gt=new WeakMap,El=new WeakMap,Hi=new WeakMap,yr=new WeakSet,ss=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...lw(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...Yv(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,Zo,t.manual?o:void 0),o;case"error":const l=t.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),Kt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),D(this,tr).notify({query:this,type:"updated",action:t})})},Zx);function lw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var kn,Xe,Rl,mn,Ki,qo,as,ei,Pl,Go,Yo,Qi,Zi,ti,Xo,ht,al,Nh,Th,Oh,Ah,Ih,Mh,Lh,cw,qx,bC=(qx=class extends da{constructor(t,n){super();Pe(this,ht);Pe(this,kn);Pe(this,Xe);Pe(this,Rl);Pe(this,mn);Pe(this,Ki);Pe(this,qo);Pe(this,as);Pe(this,ei);Pe(this,Pl);Pe(this,Go);Pe(this,Yo);Pe(this,Qi);Pe(this,Zi);Pe(this,ti);Pe(this,Xo,new Set);this.options=n,ye(this,kn,t),ye(this,ei,null),ye(this,as,Rh()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,Xe).addObserver(this),Jv(D(this,Xe),this.options)?Ke(this,ht,al).call(this):this.updateResult(),Ke(this,ht,Ah).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fh(D(this,Xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fh(D(this,Xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,ht,Ih).call(this),Ke(this,ht,Mh).call(this),D(this,Xe).removeObserver(this)}setOptions(t){const n=this.options,i=D(this,Xe);if(this.options=D(this,kn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof nr(this.options.enabled,D(this,Xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,ht,Lh).call(this),D(this,Xe).setOptions(this.options),n._defaulted&&!du(this.options,n)&&D(this,kn).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Xe),observer:this});const o=this.hasListeners();o&&ey(D(this,Xe),i,this.options,n)&&Ke(this,ht,al).call(this),this.updateResult(),o&&(D(this,Xe)!==i||nr(this.options.enabled,D(this,Xe))!==nr(n.enabled,D(this,Xe))||ci(this.options.staleTime,D(this,Xe))!==ci(n.staleTime,D(this,Xe)))&&Ke(this,ht,Nh).call(this);const l=Ke(this,ht,Th).call(this);o&&(D(this,Xe)!==i||nr(this.options.enabled,D(this,Xe))!==nr(n.enabled,D(this,Xe))||l!==D(this,ti))&&Ke(this,ht,Oh).call(this,l)}getOptimisticResult(t){const n=D(this,kn).getQueryCache().build(D(this,kn),t),i=this.createResult(n,t);return _C(this,i)&&(ye(this,mn,i),ye(this,qo,this.options),ye(this,Ki,D(this,Xe).state)),i}getCurrentResult(){return D(this,mn)}trackResult(t,n){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&D(this,as).status==="pending"&&D(this,as).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){D(this,Xo).add(t)}getCurrentQuery(){return D(this,Xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=D(this,kn).defaultQueryOptions(t),i=D(this,kn).getQueryCache().build(D(this,kn),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return Ke(this,ht,al).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,mn)))}createResult(t,n){var L;const i=D(this,Xe),o=this.options,l=D(this,mn),u=D(this,Ki),c=D(this,qo),m=t!==i?t.state:D(this,Rl),{state:v}=t;let y={...v},x=!1,w;if(n._optimisticResults){const I=this.hasListeners(),Q=!I&&Jv(t,n),U=I&&ey(t,i,n,o);(Q||U)&&(y={...y,...lw(v.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:k,errorUpdatedAt:S,status:C}=y;w=y.data;let P=!1;if(n.placeholderData!==void 0&&w===void 0&&C==="pending"){let I;l!=null&&l.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(I=l.data,P=!0):I=typeof n.placeholderData=="function"?n.placeholderData((L=D(this,Yo))==null?void 0:L.state.data,D(this,Yo)):n.placeholderData,I!==void 0&&(C="success",w=Eh(l==null?void 0:l.data,I,n),x=!0)}if(n.select&&w!==void 0&&!P)if(l&&w===(u==null?void 0:u.data)&&n.select===D(this,Pl))w=D(this,Go);else try{ye(this,Pl,n.select),w=n.select(w),w=Eh(l==null?void 0:l.data,w,n),ye(this,Go,w),ye(this,ei,null)}catch(I){ye(this,ei,I)}D(this,ei)&&(k=D(this,ei),w=D(this,Go),S=Date.now(),C="error");const _=y.fetchStatus==="fetching",E=C==="pending",R=C==="error",N=E&&_,T=w!==void 0,F={status:C,fetchStatus:y.fetchStatus,isPending:E,isSuccess:C==="success",isError:R,isInitialLoading:N,isLoading:N,data:w,dataUpdatedAt:y.dataUpdatedAt,error:k,errorUpdatedAt:S,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:_,isRefetching:_&&!E,isLoadingError:R&&!T,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:R&&T,isStale:vp(t,n),refetch:this.refetch,promise:D(this,as),isEnabled:nr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=F.data!==void 0,Q=F.status==="error"&&!I,U=ie=>{Q?ie.reject(F.error):I&&ie.resolve(F.data)},ee=()=>{const ie=ye(this,as,F.promise=Rh());U(ie)},te=D(this,as);switch(te.status){case"pending":t.queryHash===i.queryHash&&U(te);break;case"fulfilled":(Q||F.data!==te.value)&&ee();break;case"rejected":(!Q||F.error!==te.reason)&&ee();break}}return F}updateResult(){const t=D(this,mn),n=this.createResult(D(this,Xe),this.options);if(ye(this,Ki,D(this,Xe).state),ye(this,qo,this.options),D(this,Ki).data!==void 0&&ye(this,Yo,D(this,Xe)),du(n,t))return;ye(this,mn,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!D(this,Xo).size)return!0;const u=new Set(l??D(this,Xo));return this.options.throwOnError&&u.add("error"),Object.keys(D(this,mn)).some(c=>{const h=c;return D(this,mn)[h]!==t[h]&&u.has(h)})};Ke(this,ht,cw).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,ht,Ah).call(this)}},kn=new WeakMap,Xe=new WeakMap,Rl=new WeakMap,mn=new WeakMap,Ki=new WeakMap,qo=new WeakMap,as=new WeakMap,ei=new WeakMap,Pl=new WeakMap,Go=new WeakMap,Yo=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,ti=new WeakMap,Xo=new WeakMap,ht=new WeakSet,al=function(t){Ke(this,ht,Lh).call(this);let n=D(this,Xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vn)),n},Nh=function(){Ke(this,ht,Ih).call(this);const t=ci(this.options.staleTime,D(this,Xe));if(Xi||D(this,mn).isStale||!kh(t))return;const i=nw(D(this,mn).dataUpdatedAt,t)+1;ye(this,Qi,Fi.setTimeout(()=>{D(this,mn).isStale||this.updateResult()},i))},Th=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Xe)):this.options.refetchInterval)??!1},Oh=function(t){Ke(this,ht,Mh).call(this),ye(this,ti,t),!(Xi||nr(this.options.enabled,D(this,Xe))===!1||!kh(D(this,ti))||D(this,ti)===0)&&ye(this,Zi,Fi.setInterval(()=>{(this.options.refetchIntervalInBackground||gp.isFocused())&&Ke(this,ht,al).call(this)},D(this,ti)))},Ah=function(){Ke(this,ht,Nh).call(this),Ke(this,ht,Oh).call(this,Ke(this,ht,Th).call(this))},Ih=function(){D(this,Qi)&&(Fi.clearTimeout(D(this,Qi)),ye(this,Qi,void 0))},Mh=function(){D(this,Zi)&&(Fi.clearInterval(D(this,Zi)),ye(this,Zi,void 0))},Lh=function(){const t=D(this,kn).getQueryCache().build(D(this,kn),this.options);if(t===D(this,Xe))return;const n=D(this,Xe);ye(this,Xe,t),ye(this,Rl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cw=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(D(this,mn))}),D(this,kn).getQueryCache().notify({query:D(this,Xe),type:"observerResultsUpdated"})})},qx);function CC(e,t){return nr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jv(e,t){return CC(e,t)||e.state.data!==void 0&&Fh(e,t,t.refetchOnMount)}function Fh(e,t,n){if(nr(t.enabled,e)!==!1&&ci(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&vp(e,t)}return!1}function ey(e,t,n,i){return(e!==t||nr(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&vp(e,n)}function vp(e,t){return nr(t.enabled,e)!==!1&&e.isStaleByTime(ci(t.staleTime,e))}function _C(e,t){return!du(e.getCurrentResult(),t)}function ty(e){return{onFetch:(t,n)=>{var v,y,x,w,k;const i=t.options,o=(x=(y=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,l=((w=t.state.data)==null?void 0:w.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let c={pages:[],pageParams:[]},h=0;const m=async()=>{let S=!1;const C=E=>{mC(E,()=>t.signal,()=>S=!0)},P=sw(t.options,t.fetchOptions),_=async(E,R,N)=>{if(S)return Promise.reject();if(R==null&&E.pages.length)return Promise.resolve(E);const O=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:R,direction:N?"backward":"forward",meta:t.options.meta};return C(Q),Q})(),F=await P(O),{maxPages:L}=t.options,I=N?pC:hC;return{pages:I(E.pages,F,L),pageParams:I(E.pageParams,R,L)}};if(o&&l.length){const E=o==="backward",R=E?kC:ny,N={pages:l,pageParams:u},T=R(i,N);c=await _(N,T,E)}else{const E=e??l.length;do{const R=h===0?u[0]??i.initialPageParam:ny(i,c);if(h>0&&R==null)break;c=await _(c,R),h++}while(h<E)}return c};t.options.persister?t.fetchFn=()=>{var S,C;return(C=(S=t.options).persister)==null?void 0:C.call(S,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function ny(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function kC(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var Nl,Ir,ln,qi,Mr,Ks,Gx,jC=(Gx=class extends aw{constructor(t){super();Pe(this,Mr);Pe(this,Nl);Pe(this,Ir);Pe(this,ln);Pe(this,qi);ye(this,Nl,t.client),this.mutationId=t.mutationId,ye(this,ln,t.mutationCache),ye(this,Ir,[]),this.state=t.state||uw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,Ir).includes(t)||(D(this,Ir).push(t),this.clearGcTimeout(),D(this,ln).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Ir,D(this,Ir).filter(n=>n!==t)),this.scheduleGc(),D(this,ln).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Ir).length||(this.state.status==="pending"?this.scheduleGc():D(this,ln).remove(this))}continue(){var t;return((t=D(this,qi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,h,m,v,y,x,w,k,S,C,P,_,E,R,N,T,O;const n=()=>{Ke(this,Mr,Ks).call(this,{type:"continue"})},i={client:D(this,Nl),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,qi,ow({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(F,L)=>{Ke(this,Mr,Ks).call(this,{type:"failed",failureCount:F,error:L})},onPause:()=>{Ke(this,Mr,Ks).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,ln).canRun(this)}));const o=this.state.status==="pending",l=!D(this,qi).canStart();try{if(o)n();else{Ke(this,Mr,Ks).call(this,{type:"pending",variables:t,isPaused:l}),D(this,ln).config.onMutate&&await D(this,ln).config.onMutate(t,this,i);const L=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,i));L!==this.state.context&&Ke(this,Mr,Ks).call(this,{type:"pending",context:L,variables:t,isPaused:l})}const F=await D(this,qi).start();return await((m=(h=D(this,ln).config).onSuccess)==null?void 0:m.call(h,F,t,this.state.context,this,i)),await((y=(v=this.options).onSuccess)==null?void 0:y.call(v,F,t,this.state.context,i)),await((w=(x=D(this,ln).config).onSettled)==null?void 0:w.call(x,F,null,this.state.variables,this.state.context,this,i)),await((S=(k=this.options).onSettled)==null?void 0:S.call(k,F,null,t,this.state.context,i)),Ke(this,Mr,Ks).call(this,{type:"success",data:F}),F}catch(F){try{await((P=(C=D(this,ln).config).onError)==null?void 0:P.call(C,F,t,this.state.context,this,i))}catch(L){Promise.reject(L)}try{await((E=(_=this.options).onError)==null?void 0:E.call(_,F,t,this.state.context,i))}catch(L){Promise.reject(L)}try{await((N=(R=D(this,ln).config).onSettled)==null?void 0:N.call(R,void 0,F,this.state.variables,this.state.context,this,i))}catch(L){Promise.reject(L)}try{await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,F,t,this.state.context,i))}catch(L){Promise.reject(L)}throw Ke(this,Mr,Ks).call(this,{type:"error",error:F}),F}finally{D(this,ln).runNext(this)}}},Nl=new WeakMap,Ir=new WeakMap,ln=new WeakMap,qi=new WeakMap,Mr=new WeakSet,Ks=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Kt.batch(()=>{D(this,Ir).forEach(i=>{i.onMutationUpdate(t)}),D(this,ln).notify({mutation:this,type:"updated",action:t})})},Gx);function uw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ls,xr,Tl,Yx,EC=(Yx=class extends da{constructor(t={}){super();Pe(this,ls);Pe(this,xr);Pe(this,Tl);this.config=t,ye(this,ls,new Set),ye(this,xr,new Map),ye(this,Tl,0)}build(t,n,i){const o=new jC({client:t,mutationCache:this,mutationId:++Wc(this,Tl)._,options:t.defaultMutationOptions(n),state:i});return this.add(o),o}add(t){D(this,ls).add(t);const n=Kc(t);if(typeof n=="string"){const i=D(this,xr).get(n);i?i.push(t):D(this,xr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,ls).delete(t)){const n=Kc(t);if(typeof n=="string"){const i=D(this,xr).get(n);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&D(this,xr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Kc(t);if(typeof n=="string"){const i=D(this,xr).get(n),o=i==null?void 0:i.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i;const n=Kc(t);if(typeof n=="string"){const o=(i=D(this,xr).get(n))==null?void 0:i.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{D(this,ls).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,ls).clear(),D(this,xr).clear()})}getAll(){return Array.from(D(this,ls))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Zv(n,i))}findAll(t={}){return this.getAll().filter(n=>Zv(t,n))}notify(t){Kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Kt.batch(()=>Promise.all(t.map(n=>n.continue().catch(vn))))}},ls=new WeakMap,xr=new WeakMap,Tl=new WeakMap,Yx);function Kc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var cs,ni,jn,us,ps,ru,Dh,Xx,RC=(Xx=class extends da{constructor(n,i){super();Pe(this,ps);Pe(this,cs);Pe(this,ni);Pe(this,jn);Pe(this,us);ye(this,cs,n),this.setOptions(i),this.bindMethods(),Ke(this,ps,ru).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const i=this.options;this.options=D(this,cs).defaultMutationOptions(n),du(this.options,i)||D(this,cs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,jn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Ji(i.mutationKey)!==Ji(this.options.mutationKey)?this.reset():((o=D(this,jn))==null?void 0:o.state.status)==="pending"&&D(this,jn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=D(this,jn))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,ps,ru).call(this),Ke(this,ps,Dh).call(this,n)}getCurrentResult(){return D(this,ni)}reset(){var n;(n=D(this,jn))==null||n.removeObserver(this),ye(this,jn,void 0),Ke(this,ps,ru).call(this),Ke(this,ps,Dh).call(this)}mutate(n,i){var o;return ye(this,us,i),(o=D(this,jn))==null||o.removeObserver(this),ye(this,jn,D(this,cs).getMutationCache().build(D(this,cs),this.options)),D(this,jn).addObserver(this),D(this,jn).execute(n)}},cs=new WeakMap,ni=new WeakMap,jn=new WeakMap,us=new WeakMap,ps=new WeakSet,ru=function(){var i;const n=((i=D(this,jn))==null?void 0:i.state)??uw();ye(this,ni,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Dh=function(n){Kt.batch(()=>{var i,o,l,u,c,h,m,v;if(D(this,us)&&this.hasListeners()){const y=D(this,ni).variables,x=D(this,ni).context,w={client:D(this,cs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(i=D(this,us)).onSuccess)==null||o.call(i,n.data,y,x,w)}catch(k){Promise.reject(k)}try{(u=(l=D(this,us)).onSettled)==null||u.call(l,n.data,null,y,x,w)}catch(k){Promise.reject(k)}}else if((n==null?void 0:n.type)==="error"){try{(h=(c=D(this,us)).onError)==null||h.call(c,n.error,y,x,w)}catch(k){Promise.reject(k)}try{(v=(m=D(this,us)).onSettled)==null||v.call(m,void 0,n.error,y,x,w)}catch(k){Promise.reject(k)}}}this.listeners.forEach(y=>{y(D(this,ni))})})},Xx),Lr,Jx,PC=(Jx=class extends da{constructor(t={}){super();Pe(this,Lr);this.config=t,ye(this,Lr,new Map)}build(t,n,i){const o=n.queryKey,l=n.queryHash??hp(o,n);let u=this.get(l);return u||(u=new SC({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){D(this,Lr).has(t.queryHash)||(D(this,Lr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,Lr).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,Lr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,Lr).get(t)}getAll(){return[...D(this,Lr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Qv(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Qv(t,i)):n}notify(t){Kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Lr=new WeakMap,Jx),At,ri,si,Jo,ea,ii,ta,na,ew,NC=(ew=class{constructor(e={}){Pe(this,At);Pe(this,ri);Pe(this,si);Pe(this,Jo);Pe(this,ea);Pe(this,ii);Pe(this,ta);Pe(this,na);ye(this,At,e.queryCache||new PC),ye(this,ri,e.mutationCache||new EC),ye(this,si,e.defaultOptions||{}),ye(this,Jo,new Map),ye(this,ea,new Map),ye(this,ii,0)}mount(){Wc(this,ii)._++,D(this,ii)===1&&(ye(this,ta,gp.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,At).onFocus())})),ye(this,na,fu.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,At).onOnline())})))}unmount(){var e,t;Wc(this,ii)._--,D(this,ii)===0&&((e=D(this,ta))==null||e.call(this),ye(this,ta,void 0),(t=D(this,na))==null||t.call(this),ye(this,na,void 0))}isFetching(e){return D(this,At).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,ri).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,At).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,At).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ci(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return D(this,At).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),o=D(this,At).get(i.queryHash),l=o==null?void 0:o.state.data,u=uC(t,l);if(u!==void 0)return D(this,At).build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Kt.batch(()=>D(this,At).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,At).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,At);Kt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,At);return Kt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Kt.batch(()=>D(this,At).findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(vn).catch(vn)}invalidateQueries(e,t={}){return Kt.batch(()=>(D(this,At).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Kt.batch(()=>D(this,At).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(vn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,At).build(this,t);return n.isStaleByTime(ci(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vn).catch(vn)}fetchInfiniteQuery(e){return e.behavior=ty(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vn).catch(vn)}ensureInfiniteQueryData(e){return e.behavior=ty(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fu.isOnline()?D(this,ri).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,At)}getMutationCache(){return D(this,ri)}getDefaultOptions(){return D(this,si)}setDefaultOptions(e){ye(this,si,e)}setQueryDefaults(e,t){D(this,Jo).set(Ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,Jo).values()],n={};return t.forEach(i=>{pl(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){D(this,ea).set(Ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,ea).values()],n={};return t.forEach(i=>{pl(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,si).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,si).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,At).clear(),D(this,ri).clear()}},At=new WeakMap,ri=new WeakMap,si=new WeakMap,Jo=new WeakMap,ea=new WeakMap,ii=new WeakMap,ta=new WeakMap,na=new WeakMap,ew),dw=b.createContext(void 0),xs=e=>{const t=b.useContext(dw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},TC=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(dw.Provider,{value:e,children:t})),fw=b.createContext(!1),OC=()=>b.useContext(fw);fw.Provider;function AC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IC=b.createContext(AC()),MC=()=>b.useContext(IC),LC=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?mp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},FC=e=>{b.useEffect(()=>{e.clearReset()},[e])},DC=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||mp(n,[e.error,i])),zC=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},VC=(e,t)=>e.isLoading&&e.isFetching&&!t,$C=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ry=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function BC(e,t,n){var x,w,k,S;const i=OC(),o=MC(),l=xs(),u=l.defaultQueryOptions(e);(w=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||w.call(x,u);const c=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",zC(u),LC(u,o,c),FC(o);const h=!l.getQueryCache().get(u.queryHash),[m]=b.useState(()=>new t(l,u)),v=m.getOptimisticResult(u),y=!i&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const P=y?m.subscribe(Kt.batchCalls(C)):vn;return m.updateResult(),P},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),b.useEffect(()=>{m.setOptions(u)},[u,m]),$C(u,v))throw ry(u,m,o);if(DC({result:v,errorResetBoundary:o,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw v.error;if((S=(k=l.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,v),u.experimental_prefetchInRender&&!Xi&&VC(v,i)){const C=h?ry(u,m,o):c==null?void 0:c.promise;C==null||C.catch(vn).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?v:m.trackResult(v)}function Vu(e,t){return BC(e,bC)}function ws(e,t){const n=xs(),[i]=b.useState(()=>new RC(n,e));b.useEffect(()=>{i.setOptions(e)},[i,e]);const o=b.useSyncExternalStore(b.useCallback(u=>i.subscribe(Kt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=b.useCallback((u,c)=>{i.mutate(u,c).catch(vn)},[i]);if(o.error&&mp(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}var Ct=(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))(Ct||{});function hw({update:e,notify:t,unwatched:n}){return{link:i,unlink:o,propagate:l,checkDirty:u,shallowPropagate:c};function i(m,v,y){const x=v.depsTail;if(x!==void 0&&x.dep===m)return;const w=x!==void 0?x.nextDep:v.deps;if(w!==void 0&&w.dep===m){w.version=y,v.depsTail=w;return}const k=m.subsTail;if(k!==void 0&&k.version===y&&k.sub===v)return;const S=v.depsTail=m.subsTail={version:y,dep:m,sub:v,prevDep:x,nextDep:w,prevSub:k,nextSub:void 0};w!==void 0&&(w.prevDep=S),x!==void 0?x.nextDep=S:v.deps=S,k!==void 0?k.nextSub=S:m.subs=S}function o(m,v=m.sub){const y=m.dep,x=m.prevDep,w=m.nextDep,k=m.nextSub,S=m.prevSub;return w!==void 0?w.prevDep=x:v.depsTail=x,x!==void 0?x.nextDep=w:v.deps=w,k!==void 0?k.prevSub=S:y.subsTail=S,S!==void 0?S.nextSub=k:(y.subs=k)===void 0&&n(y),w}function l(m){let v=m.nextSub,y;e:do{const x=m.sub;let w=x.flags;if(w&60?w&12?w&4?!(w&48)&&h(m,x)?(x.flags=w|40,w&=1):w=0:x.flags=w&-9|32:w=0:x.flags=w|32,w&2&&t(x),w&1){const k=x.subs;if(k!==void 0){const S=(m=k).nextSub;S!==void 0&&(y={value:v,prev:y},v=S);continue}}if((m=v)!==void 0){v=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){v=m.nextSub;continue e}break}while(!0)}function u(m,v){let y,x=0,w=!1;e:do{const k=m.dep,S=k.flags;if(v.flags&16)w=!0;else if((S&17)===17){if(e(k)){const C=k.subs;C.nextSub!==void 0&&c(C),w=!0}}else if((S&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=k.deps,v=k,++x;continue}if(!w){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;x--;){const C=v.subs,P=C.nextSub!==void 0;if(P?(m=y.value,y=y.prev):m=C,w){if(e(v)){P&&c(C),v=m.sub;continue}w=!1}else v.flags&=-33;v=m.sub;const _=m.nextDep;if(_!==void 0){m=_;continue e}}return w}while(!0)}function c(m){do{const v=m.sub,y=v.flags;(y&48)===32&&(v.flags=y|16,(y&6)===2&&t(v))}while((m=m.nextSub)!==void 0)}function h(m,v){let y=v.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}let yp=0,Li=0,ul=0;const ds=[],{link:bA,unlink:pw,propagate:CA,checkDirty:UC,shallowPropagate:_A}=hw({update(e){return e.depsTail!==void 0?QC(e):ZC(e)},notify(e){var i;let t=ul,n=t;do if(ds[t++]=e,e.flags&=-3,e=(i=e.subs)==null?void 0:i.sub,e===void 0||!(e.flags&2))break;while(!0);for(ul=t;n<--t;){const o=ds[n];ds[n++]=ds[t],ds[t]=o}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,$u(e)):YC.call(e)}});function WC(){return yp}function HC(){++yp}function KC(){--yp||GC()}function QC(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,$u(e)}}function ZC(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function qC(e){const t=e.flags;if(t&16||t&32&&UC(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,$u(e)}}else e.flags=2}function GC(){try{for(;Li<ul;){const e=ds[Li];ds[Li++]=void 0,qC(e)}}finally{for(;Li<ul;){const e=ds[Li];ds[Li++]=void 0,e.flags|=10}Li=0,ul=0}}function YC(){this.depsTail=void 0,this.flags=0,$u(this);const e=this.subs;e!==void 0&&pw(e)}function $u(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=pw(n,e)}function mw(e,t,n){var l,u,c;const i=typeof e=="object",o=i?e:void 0;return{next:(l=i?e.next:e)==null?void 0:l.bind(o),error:(u=i?e.error:t)==null?void 0:u.bind(o),complete:(c=i?e.complete:n)==null?void 0:c.bind(o)}}const zh=[];let su=0;const{link:sy,unlink:XC,propagate:JC,checkDirty:gw,shallowPropagate:iy}=hw({update(e){return e._update()},notify(e){zh[Vh++]=e,e.flags&=~Ct.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ct.Mutable|Ct.Dirty,hu(e))}});let Qc=0,Vh=0,Or;function hu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=XC(n,e)}function vw(){if(!(WC()>0)){for(;Qc<Vh;){const e=zh[Qc];zh[Qc++]=void 0,e.notify()}Qc=0,Vh=0}}function e_(e,t){const n=typeof e=="function",i=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Ct.None:Ct.Mutable,get(){return Or!==void 0&&sy(o,Or,su),o._snapshot},subscribe(l){const u=mw(l),c={current:!1},h=t_(()=>{var m;o.get(),c.current?(m=u.next)==null||m.call(u,o._snapshot):c.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(l){const u=Or,c=Object.is;Or=o,++su,o.depsTail=void 0,n&&(o.flags=Ct.Mutable|Ct.RecursedCheck);try{const h=o._snapshot,m=typeof l=="function"?l(h):l===void 0&&n?i(h):l;return h===void 0||!c(h,m)?(o._snapshot=m,!0):!1}finally{Or=u,n&&(o.flags&=~Ct.RecursedCheck),hu(o)}}};return n?(o.flags=Ct.Mutable|Ct.Dirty,o.get=function(){const l=o.flags;if(l&Ct.Dirty||l&Ct.Pending&&gw(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&iy(u)}}else l&Ct.Pending&&(o.flags=l&~Ct.Pending);return Or!==void 0&&sy(o,Or,su),o._snapshot}):o.set=function(l){if(o._update(l)){const u=o.subs;u!==void 0&&(JC(u),iy(u),vw())}},o}function t_(e){const t=()=>{const i=Or;Or=n,++su,n.depsTail=void 0,n.flags=Ct.Watching|Ct.RecursedCheck;try{return e()}finally{Or=i,n.flags&=~Ct.RecursedCheck,hu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ct.Watching|Ct.RecursedCheck,notify(){const i=this.flags;i&Ct.Dirty||i&Ct.Pending&&gw(this.deps,this)?t():this.flags=Ct.Watching},stop(){this.flags=Ct.None,this.depsTail=void 0,hu(this)}};return t(),n}class n_{constructor(t){this.atom=e_(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(mw(t))}}function r_(e){try{HC(),e()}finally{KC(),vw()}}const ui="__TSR_index",oy="popstate",ay="beforeunload";function s_(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:c,...h})=>{var x,w;if((c==null?void 0:c.ignoreBlocker)??!1){u();return}const v=((x=e.getBlockers)==null?void 0:x.call(e))??[],y=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&v.length&&y)for(const k of v){const S=pu(h.path,h.state);if(await k.blockerFn({currentLocation:t,nextLocation:S,action:h.type})){(w=e.onBlocked)==null||w.call(e);return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,c,h)=>{const m=t.state[ui];c=ly(m+1,c),l({task:()=>{e.pushState(u,c),i({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:c})},replace:(u,c,h)=>{const m=t.state[ui];c=ly(m,c),l({task:()=>{e.replaceState(u,c),i({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:c})},go:(u,c)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:c,type:"GO"})},back:u=>{l({task:()=>{e.back((u==null?void 0:u.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward((u==null?void 0:u.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ui]!==0,createHref:u=>e.createHref(u),block:u=>{var h;if(!e.setBlockers)return()=>{};const c=((h=e.getBlockers)==null?void 0:h.call(e))??[];return e.setBlockers([...c,u]),()=>{var v,y;const m=((v=e.getBlockers)==null?void 0:v.call(e))??[];(y=e.setBlockers)==null||y.call(e,m.filter(x=>x!==u))}},flush:()=>{var u;return(u=e.flush)==null?void 0:u.call(e)},destroy:()=>{var u;return(u=e.destroy)==null?void 0:u.call(e)},notify:i}}function ly(e,t){t||(t={});const n=xp();return{...t,key:n,__TSR_key:n,[ui]:e}}function i_(e){var F,L;const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let o=[];const l=()=>o,u=I=>o=I,c=(I=>I),h=(()=>pu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((F=t.history.state)!=null&&F.__TSR_key)&&!((L=t.history.state)!=null&&L.key)){const I=xp();t.history.replaceState({[ui]:0,key:I,__TSR_key:I},"")}let m=h(),v,y=!1,x=!1,w=!1,k=!1;const S=()=>m;let C,P;const _=()=>{C&&(O._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),O._ignoreSubscribers=!1,C=void 0,P=void 0,v=void 0)},E=(I,Q,U)=>{const ee=c(Q);P||(v=m),m=pu(Q,U),C={href:ee,state:U,isPush:(C==null?void 0:C.isPush)||I==="push"},P||(P=Promise.resolve().then(()=>_()))},R=I=>{m=h(),O.notify({type:I})},N=async()=>{if(x){x=!1;return}const I=h(),Q=I.state[ui]-m.state[ui],U=Q===1,ee=Q===-1,te=!U&&!ee||y;y=!1;const ie=te?"GO":ee?"BACK":"FORWARD",X=te?{type:"GO",index:Q}:{type:ee?"BACK":"FORWARD"};if(w)w=!1;else{const oe=l();if(typeof document<"u"&&oe.length){for(const B of oe)if(await B.blockerFn({currentLocation:m,nextLocation:I,action:ie})){x=!0,t.history.go(1),O.notify(X);return}}}m=h(),O.notify(X)},T=I=>{if(k){k=!1;return}let Q=!1;const U=l();if(typeof document<"u"&&U.length)for(const ee of U){const te=ee.enableBeforeUnload??!0;if(te===!0){Q=!0;break}if(typeof te=="function"&&te()===!0){Q=!0;break}}if(Q)return I.preventDefault(),I.returnValue=""},O=s_({getLocation:S,getLength:()=>t.history.length,pushState:(I,Q)=>E("push",I,Q),replaceState:(I,Q)=>E("replace",I,Q),back:I=>(I&&(w=!0),k=!0,t.history.back()),forward:I=>{I&&(w=!0),k=!0,t.history.forward()},go:I=>{y=!0,t.history.go(I)},createHref:I=>c(I),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(ay,T,{capture:!0}),t.removeEventListener(oy,N)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(ay,T,{capture:!0}),t.addEventListener(oy,N),t.history.pushState=function(...I){const Q=n.apply(t.history,I);return O._ignoreSubscribers||R("PUSH"),Q},t.history.replaceState=function(...I){const Q=i.apply(t.history,I);return O._ignoreSubscribers||R("REPLACE"),Q},O}function o_(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function pu(e,t){const n=o_(e),i=n.indexOf("#"),o=n.indexOf("?"),l=xp();return{href:n,pathname:n.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:n.length),hash:i>-1?n.substring(i):"",search:o>-1?n.slice(o,i===-1?void 0:i):"",state:t||{[ui]:0,key:l,__TSR_key:l}}}function xp(){return(Math.random()+1).toString(36).substring(7)}const a_=!1;function dl(e){let t;return r_(()=>{t=e()}),t}function ml(e){return e[e.length-1]}function l_(e){return typeof e=="function"}function oi(e,t){return l_(e)?e(t):e}const c_=Object.prototype.hasOwnProperty,cy=Object.prototype.propertyIsEnumerable;function Fn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,o=fy(e)&&fy(i);if(!o&&!(mu(e)&&mu(i)))return i;const l=o?e:uy(e);if(!l)return i;const u=o?i:uy(i);if(!u)return i;const c=l.length,h=u.length,m=o?new Array(h):{};let v=0;for(let y=0;y<h;y++){const x=o?y:u[y],w=e[x],k=i[x];if(w===k){m[x]=w,(o?y<c:c_.call(e,x))&&v++;continue}if(w===null||k===null||typeof w!="object"||typeof k!="object"){m[x]=k;continue}const S=Fn(w,k,n+1);m[x]=S,S===w&&v++}return c===h&&v===c?e:m}function uy(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!cy.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const i=t;for(const o of n){if(!cy.call(e,o))return!1;i.push(o)}return i}function mu(e){if(!dy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!dy(n)||!n.hasOwnProperty("isPrototypeOf"))}function dy(e){return Object.prototype.toString.call(e)==="[object Object]"}function fy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,o=e.length;i<o;i++)if(!Gi(e[i],t[i],n))return!1;return!0}if(mu(e)&&mu(t)){const i=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Gi(e[u],t[u],n))return!1;return!0}let o=0;if(!i)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>o||!Gi(e[u],t[u],n)))return!1;return o===l}return!1}function ra(e){let t,n;const i=new Promise((o,l)=>{t=o,n=l});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,t(o),e==null||e(o)},i.reject=o=>{i.status="rejected",n(o)},i}function Vo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function u_(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function hy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return u_(t)}const d_=["http:","https:","mailto:","tel:"];function gu(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ja(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,i="",o;for(;(o=t.exec(e))!==null;)i+=hy(e.slice(n,o.index))+o[0],n=t.lastIndex;i=i+hy(n?e.slice(n):e);let l=!1;return i.startsWith("//")&&(l=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:l}}function f_(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var h_="Invariant failed";function ms(e,t){if(!e)throw new Error(h_)}function vu(e){const t=new Map;let n,i;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const h=n;t.delete(h.key),h.next&&(n=h.next,h.next.prev=void 0),h===i&&(i=void 0)}const c=t.get(l);if(c)c.value=u,o(c);else{const h={key:l,value:u,prev:i};i&&(i.next=h),i=h,n||(n=h),t.set(l,h)}},clear(){t.clear(),n=void 0,i=void 0}}}const sa=0,eo=1,to=2,gl=3,Di=4,yw=5;function p_(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function wp(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),o=i===-1?e.length:i,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=sa,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const c=e.length;return n[0]=to,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(l.charCodeAt(0)===36)return n[0]=eo,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=p_(l);if(u){const[c,h]=u,m=l.charCodeAt(c+1);if(m===45){if(c+2<l.length&&l.charCodeAt(c+2)===36){const v=c+3,y=h;if(v<y)return n[0]=gl,n[1]=t+c,n[2]=t+v,n[3]=t+y,n[4]=t+h+1,n[5]=o,n}}else if(m===36){const v=c+1,y=c+2;return y===h?(n[0]=to,n[1]=t+c,n[2]=t+v,n[3]=t+y,n[4]=t+h+1,n[5]=e.length,n):(n[0]=eo,n[1]=t+c,n[2]=t+y,n[3]=t+h,n[4]=t+h+1,n[5]=o,n)}}return n[0]=sa,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Bu(e,t,n,i,o,l,u){var h,m,v,y,x,w,k,S,C,P,_,E,R;u==null||u(n);let c=i;{const N=n.fullPath??n.from,T=N.length,O=((h=n.options)==null?void 0:h.caseSensitive)??e,F=!!((v=(m=n.options)==null?void 0:m.params)!=null&&v.parse&&((x=(y=n.options)==null?void 0:y.skipRouteOnParseError)!=null&&x.params));for(;c<T;){const I=wp(N,c,t);let Q;const U=c,ee=I[5];switch(c=ee+1,l++,I[0]){case sa:{const ie=N.substring(I[2],I[3]);if(O){const X=(w=o.static)==null?void 0:w.get(ie);if(X)Q=X;else{o.static??(o.static=new Map);const oe=zi(n.fullPath??n.from);oe.parent=o,oe.depth=l,Q=oe,o.static.set(ie,oe)}}else{const X=ie.toLowerCase(),oe=(k=o.staticInsensitive)==null?void 0:k.get(X);if(oe)Q=oe;else{o.staticInsensitive??(o.staticInsensitive=new Map);const B=zi(n.fullPath??n.from);B.parent=o,B.depth=l,Q=B,o.staticInsensitive.set(X,B)}}break}case eo:{const ie=N.substring(U,I[1]),X=N.substring(I[4],ee),oe=O&&!!(ie||X),B=ie?oe?ie:ie.toLowerCase():void 0,J=X?oe?X:X.toLowerCase():void 0,Z=!F&&((S=o.dynamic)==null?void 0:S.find(M=>!M.skipOnParamError&&M.caseSensitive===oe&&M.prefix===B&&M.suffix===J));if(Z)Q=Z;else{const M=Xf(eo,n.fullPath??n.from,oe,B,J);Q=M,M.depth=l,M.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(M)}break}case gl:{const ie=N.substring(U,I[1]),X=N.substring(I[4],ee),oe=O&&!!(ie||X),B=ie?oe?ie:ie.toLowerCase():void 0,J=X?oe?X:X.toLowerCase():void 0,Z=!F&&((C=o.optional)==null?void 0:C.find(M=>!M.skipOnParamError&&M.caseSensitive===oe&&M.prefix===B&&M.suffix===J));if(Z)Q=Z;else{const M=Xf(gl,n.fullPath??n.from,oe,B,J);Q=M,M.parent=o,M.depth=l,o.optional??(o.optional=[]),o.optional.push(M)}break}case to:{const ie=N.substring(U,I[1]),X=N.substring(I[4],ee),oe=O&&!!(ie||X),B=ie?oe?ie:ie.toLowerCase():void 0,J=X?oe?X:X.toLowerCase():void 0,Z=Xf(to,n.fullPath??n.from,oe,B,J);Q=Z,Z.parent=o,Z.depth=l,o.wildcard??(o.wildcard=[]),o.wildcard.push(Z)}}o=Q}if(F&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const I=zi(n.fullPath??n.from);I.kind=yw,I.parent=o,l++,I.depth=l,o.pathless??(o.pathless=[]),o.pathless.push(I),o=I}const L=(n.path||!n.children)&&!n.isRoot;if(L&&N.endsWith("/")){const I=zi(n.fullPath??n.from);I.kind=Di,I.parent=o,l++,I.depth=l,o.index=I,o=I}o.parse=((_=(P=n.options)==null?void 0:P.params)==null?void 0:_.parse)??null,o.skipOnParamError=F,o.parsingPriority=((R=(E=n.options)==null?void 0:E.skipRouteOnParseError)==null?void 0:R.priority)??0,L&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const N of n.children)Bu(e,t,N,c,o,l,u)}function Yf(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Zs(e){var t,n,i;if(e.pathless)for(const o of e.pathless)Zs(o);if(e.static)for(const o of e.static.values())Zs(o);if(e.staticInsensitive)for(const o of e.staticInsensitive.values())Zs(o);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Yf);for(const o of e.dynamic)Zs(o)}if((n=e.optional)!=null&&n.length){e.optional.sort(Yf);for(const o of e.optional)Zs(o)}if((i=e.wildcard)!=null&&i.length){e.wildcard.sort(Yf);for(const o of e.wildcard)Zs(o)}}function zi(e){return{kind:sa,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Xf(e,t,n,i,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:o}}function m_(e,t){const n=zi("/"),i=new Uint16Array(6);for(const o of e)Bu(!1,i,o,1,n,0);Zs(n),t.masksTree=n,t.flatCache=vu(1e3)}function g_(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const i=Sp(e,t.masksTree);return t.flatCache.set(e,i),i}function v_(e,t,n,i,o){e||(e="/"),i||(i="/");const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=zi("/");const c=new Uint16Array(6);Bu(t,c,{from:e},1,u,0),o.singleCache.set(l,u)}return Sp(i,u,n)}function y_(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,o=t.matchCache.get(i);if(o!==void 0)return o;e||(e="/");let l;try{l=Sp(e,t.segmentTree,n)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=S_(l.route)),t.matchCache.set(i,l),l}function x_(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function w_(e,t=!1,n){const i=zi(e.fullPath),o=new Uint16Array(6),l={},u={};let c=0;return Bu(t,o,e,1,i,0,m=>{if(n==null||n(m,c),ms(!(m.id in l),`Duplicate routes found with id: ${String(m.id)}`),l[m.id]=m,c!==0&&m.path){const v=x_(m.fullPath);(!u[v]||m.fullPath.endsWith("/"))&&(u[v]=m)}c++}),Zs(i),{processedTree:{segmentTree:i,singleCache:vu(1e3),matchCache:vu(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Sp(e,t,n=!1){const i=e.split("/"),o=C_(e,i,t,n);if(!o)return null;const[l]=xw(e,i,o);return{route:o.node.route,rawParams:l,parsedParams:o.parsedParams}}function xw(e,t,n){var v,y,x,w,k,S,C,P,_,E;const i=b_(n.node);let o=null;const l={};let u=((v=n.extract)==null?void 0:v.part)??0,c=((y=n.extract)==null?void 0:y.node)??0,h=((x=n.extract)==null?void 0:x.path)??0,m=((w=n.extract)==null?void 0:w.segment)??0;for(;c<i.length;u++,c++,h++,m++){const R=i[c];if(R.kind===Di)break;if(R.kind===yw){m--,u--,h--;continue}const N=t[u],T=h;if(N&&(h+=N.length),R.kind===eo){o??(o=n.node.fullPath.split("/"));const O=o[m],F=((k=R.prefix)==null?void 0:k.length)??0;if(O.charCodeAt(F)===123){const I=((S=R.suffix)==null?void 0:S.length)??0,Q=O.substring(F+2,O.length-I-1),U=N.substring(F,N.length-I);l[Q]=decodeURIComponent(U)}else{const I=O.substring(1);l[I]=decodeURIComponent(N)}}else if(R.kind===gl){if(n.skipped&1<<c){u--,h=T-1;continue}o??(o=n.node.fullPath.split("/"));const O=o[m],F=((C=R.prefix)==null?void 0:C.length)??0,L=((P=R.suffix)==null?void 0:P.length)??0,I=O.substring(F+3,O.length-L-1),Q=R.suffix||R.prefix?N.substring(F,N.length-L):N;Q&&(l[I]=decodeURIComponent(Q))}else if(R.kind===to){const O=R,F=e.substring(T+(((_=O.prefix)==null?void 0:_.length)??0),e.length-(((E=O.suffix)==null?void 0:E.length)??0)),L=decodeURIComponent(F);l["*"]=L,l._splat=L;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:c,path:h,segment:m}]}function S_(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function b_(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function C_(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!ml(t),l=o&&e!=="/",u=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,m=null,v=null;for(;c.length;){const y=c.pop(),{node:x,index:w,skipped:k,depth:S,statics:C,dynamics:P,optionals:_}=y;let{extract:E,rawParams:R,parsedParams:N}=y;if(x.skipOnParamError){if(!Jf(e,t,y))continue;R=y.rawParams,E=y.extract,N=y.parsedParams}i&&x.route&&x.kind!==Di&&el(m,y)&&(m=y);const T=w===u;if(T&&(x.route&&!l&&el(v,y)&&(v=y),!x.optional&&!x.wildcard&&!x.index&&!x.pathless))continue;const O=T?void 0:t[w];let F;if(T&&x.index){const L={node:x.index,index:w,skipped:k,depth:S+1,statics:C,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N};let I=!0;if(x.index.skipOnParamError&&(Jf(e,t,L)||(I=!1)),I){if(C===u&&!P&&!_&&!k)return L;el(v,L)&&(v=L)}}if(x.wildcard&&el(h,y))for(const L of x.wildcard){const{prefix:I,suffix:Q}=L;if(I&&(T||!(L.caseSensitive?O:F??(F=O.toLowerCase())).startsWith(I)))continue;if(Q){if(T)continue;const ee=t.slice(w).join("/").slice(-Q.length);if((L.caseSensitive?ee:ee.toLowerCase())!==Q)continue}const U={node:L,index:u,skipped:k,depth:S,statics:C,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N};if(!(L.skipOnParamError&&!Jf(e,t,U))){h=U;break}}if(x.optional){const L=k|1<<S,I=S+1;for(let Q=x.optional.length-1;Q>=0;Q--){const U=x.optional[Q];c.push({node:U,index:w,skipped:L,depth:I,statics:C,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N})}if(!T)for(let Q=x.optional.length-1;Q>=0;Q--){const U=x.optional[Q],{prefix:ee,suffix:te}=U;if(ee||te){const ie=U.caseSensitive?O:F??(F=O.toLowerCase());if(ee&&!ie.startsWith(ee)||te&&!ie.endsWith(te))continue}c.push({node:U,index:w+1,skipped:k,depth:I,statics:C,dynamics:P,optionals:_+1,extract:E,rawParams:R,parsedParams:N})}}if(!T&&x.dynamic&&O)for(let L=x.dynamic.length-1;L>=0;L--){const I=x.dynamic[L],{prefix:Q,suffix:U}=I;if(Q||U){const ee=I.caseSensitive?O:F??(F=O.toLowerCase());if(Q&&!ee.startsWith(Q)||U&&!ee.endsWith(U))continue}c.push({node:I,index:w+1,skipped:k,depth:S+1,statics:C,dynamics:P+1,optionals:_,extract:E,rawParams:R,parsedParams:N})}if(!T&&x.staticInsensitive){const L=x.staticInsensitive.get(F??(F=O.toLowerCase()));L&&c.push({node:L,index:w+1,skipped:k,depth:S+1,statics:C+1,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N})}if(!T&&x.static){const L=x.static.get(O);L&&c.push({node:L,index:w+1,skipped:k,depth:S+1,statics:C+1,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N})}if(x.pathless){const L=S+1;for(let I=x.pathless.length-1;I>=0;I--){const Q=x.pathless[I];c.push({node:Q,index:w,skipped:k,depth:L,statics:C,dynamics:P,optionals:_,extract:E,rawParams:R,parsedParams:N})}}}if(v&&h)return el(h,v)?v:h;if(v)return v;if(h)return h;if(i&&m){let y=m.index;for(let w=0;w<m.index;w++)y+=t[w].length;const x=y===e.length?"/":e.slice(y);return m.rawParams??(m.rawParams={}),m.rawParams["**"]=decodeURIComponent(x),m}return null}function Jf(e,t,n){try{const[i,o]=xw(e,t,n);n.rawParams=i,n.extract=o;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function el(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Di)>(e.node.kind===Di)||t.node.kind===Di==(e.node.kind===Di)&&t.depth>e.depth))):!0}function iu(e){return bp(e.filter(t=>t!==void 0).join("/"))}function bp(e){return e.replace(/\/{2,}/g,"/")}function ww(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fs(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Sw(e){return fs(ww(e))}function yu(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function __(e,t,n){return yu(e,n)===yu(t,n)}function k_({base:e,to:t,trailingSlash:n="never",cache:i}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(i){u=o?t:l?e:e+"\0"+t;const y=i.get(u);if(y)return y}let c;if(l)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&ml(c)==="";)c.pop();const y=t.split("/");for(let x=0,w=y.length;x<w;x++){const k=y[x];k===""?x?x===w-1&&c.push(k):c=[k]:k===".."?c.pop():k==="."||c.push(k)}}c.length>1&&(ml(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));let h,m="";for(let y=0;y<c.length;y++){y>0&&(m+="/");const x=c[y];if(!x)continue;h=wp(x,0,h);const w=h[0];if(w===sa){m+=x;continue}const k=h[5],S=x.substring(0,h[1]),C=x.substring(h[4],k),P=x.substring(h[2],h[3]);w===eo?m+=S||C?`${S}{$${P}}${C}`:`$${P}`:w===to?m+=S||C?`${S}{$}${C}`:"$":m+=`${S}{-$${P}}${C}`}m=bp(m);const v=m||"/";return u&&i&&i.set(u,v),v}function j_(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(n,"g");return o=>o.replace(i,l=>t.get(l)??l)}function eh(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(o=>py(o,n)).join("/"):py(i,n)}function th({path:e,params:t,decoder:n,...i}){let o=!1;const l={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:o};const u=e.length;let c=0,h,m="";for(;c<u;){const y=c;h=wp(e,y,h);const x=h[5];if(c=x+1,y===x)continue;const w=h[0];if(w===sa){m+="/"+e.substring(y,x);continue}if(w===to){const k=t._splat;l._splat=k,l["*"]=k;const S=e.substring(y,h[1]),C=e.substring(h[4],x);if(!k){o=!0,(S||C)&&(m+="/"+S+C);continue}const P=eh("_splat",t,n);m+="/"+S+P+C;continue}if(w===eo){const k=e.substring(h[2],h[3]);!o&&!(k in t)&&(o=!0),l[k]=t[k];const S=e.substring(y,h[1]),C=e.substring(h[4],x),P=eh(k,t,n)??"undefined";m+="/"+S+P+C;continue}if(w===gl){const k=e.substring(h[2],h[3]),S=t[k];if(S==null)continue;l[k]=S;const C=e.substring(y,h[1]),P=e.substring(h[4],x),_=eh(k,t,n)??"";m+="/"+C+_+P;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:l,interpolatedPath:m||"/",isMissingParams:o}}function py(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Vn(e){return!!(e!=null&&e.isNotFound)}function E_(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const $h="tsr-scroll-restoration-v1_3",R_=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function P_(){const e=E_();if(!e)return null;const t=e.getItem($h);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=oi(i,n)||n;try{e.setItem($h,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Zc=P_(),N_=e=>e.state.__TSR_key||e.href;function T_(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let xu=!1;function O_({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:o,location:l}){var m,v;let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(y){console.error(y);return}const c=t||((m=window.history.state)==null?void 0:m.__TSR_key),h=u[c];xu=!0;e:{if(i&&h&&Object.keys(h).length>0){for(const w in h){const k=h[w];if(w==="window")window.scrollTo({top:k.scrollY,left:k.scrollX,behavior:n});else if(w){const S=document.querySelector(w);S&&(S.scrollLeft=k.scrollX,S.scrollTop=k.scrollY)}}break e}const y=(l??window.location).hash.split("#",2)[1];if(y){const w=((v=window.history.state)==null?void 0:v.__hashScrollIntoViewOptions)??!0;if(w){const k=document.getElementById(y);k&&k.scrollIntoView(w)}break e}const x={top:0,left:0,behavior:n};if(window.scrollTo(x),o)for(const w of o){if(w==="window")continue;const k=typeof w=="function"?w():document.querySelector(w);k&&k.scrollTo(x)}}xu=!1}function A_(e,t){if(!Zc||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Zc))return;e.isScrollRestorationSetup=!0,xu=!1;const i=e.options.getScrollRestorationKey||N_;window.history.scrollRestoration="manual";const o=l=>{if(xu||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const h=l.target.getAttribute("data-scroll-restoration-id");h?u=`[data-scroll-restoration-id="${h}"]`:u=T_(l.target)}const c=i(e.state.location);Zc.set(h=>{const m=h[c]||(h[c]={}),v=m[u]||(m[u]={});if(u==="window")v.scrollX=window.scrollX||0,v.scrollY=window.scrollY||0;else if(u){const y=document.querySelector(u);y&&(v.scrollX=y.scrollLeft||0,v.scrollY=y.scrollTop||0)}return h})};typeof document<"u"&&document.addEventListener("scroll",R_(o,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(O_({storageKey:$h,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Zc.set(c=>(c[u]||(c[u]={}),c)))})}function I_(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function M_(e,t=String){const n=new URLSearchParams;for(const i in e){const o=e[i];o!==void 0&&n.set(i,t(o))}return n.toString()}function nh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function L_(e){const t=new URLSearchParams(e),n={};for(const[i,o]of t.entries()){const l=n[i];l==null?n[i]=nh(o):Array.isArray(l)?l.push(nh(o)):n[i]=[l,nh(o)]}return n}const F_=z_(JSON.parse),D_=V_(JSON.stringify,JSON.parse);function z_(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=L_(t);for(const i in n){const o=n[i];if(typeof o=="string")try{n[i]=e(o)}catch{}}return n}}function V_(e,t){const n=typeof t=="function";function i(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=M_(o,i);return l?`?${l}`:""}}const rr="__root__";function $_(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 t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function sr(e){return e instanceof Response&&!!e.options}const ou=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Uu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),$o=(e,t,n=!0)=>{const i={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const c=e.router.getMatch(u.id);c&&Object.assign(i,c.__routeContext,c.__beforeLoadContext)}return i},bw=(e,t,n)=>{var u;const i=e.router.routesById[t.routeId??""]??e.router.routeTree;!i.options.notFoundComponent&&((u=e.router.options)!=null&&u.defaultNotFoundComponent)&&(i.options.notFoundComponent=e.router.options.defaultNotFoundComponent);const o=n==="BEFORE_LOAD"&&i.parentRoute;o||ms(i.options.notFoundComponent);const l=e.matches.find(c=>c.routeId===i.id);ms(l,"Could not find match for route: "+i.id),e.updateMatch(l.id,c=>({...c,status:"notFound",error:t,isFetching:!1})),o&&(t.routeId=i.parentRoute.id,bw(e,t,n))},ai=(e,t,n,i)=>{var o,l,u;if(!(!sr(n)&&!Vn(n))){if(sr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(o=t._nonReactive.beforeLoadPromise)==null||o.resolve(),(l=t._nonReactive.loaderPromise)==null||l.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const c=sr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,h=>({...h,status:c,context:$o(e,t.index),isFetching:!1,error:n})),Vn(n)&&!n.routeId&&(n.routeId=t.routeId),(u=t._nonReactive.loadPromise)==null||u.resolve()}throw sr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(bw(e,n,i),n)}},Cw=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,tl=(e,t,n,i)=>{var c,h;const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),ai(e,e.router.getMatch(o),n,i);try{(h=(c=u.options).onError)==null||h.call(c,n)}catch(m){n=m,ai(e,e.router.getMatch(o),n,i)}e.updateMatch(o,m=>{var v,y;return(v=m._nonReactive.beforeLoadPromise)==null||v.resolve(),m._nonReactive.beforeLoadPromise=void 0,(y=m._nonReactive.loadPromise)==null||y.resolve(),{...m,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},_w=(e,t,n,i)=>{var u;if(i._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Uu(e,t)&&(n.options.loader||n.options.beforeLoad||Ew(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??((u=e.router.options)==null?void 0:u.defaultPendingComponent)))){const c=setTimeout(()=>{ou(e)},o);i._nonReactive.pendingTimeout=c}},B_=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;_w(e,t,n,i);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&ai(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(o):o()},U_=(e,t,n,i)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=ra(()=>{l==null||l.resolve()});const{paramsError:u,searchError:c}=o;u&&tl(e,n,u,"PARSE_PARAMS"),c&&tl(e,n,c,"VALIDATE_SEARCH"),_w(e,t,i,o);const h=new AbortController;let m=!1;const v=()=>{m||(m=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:h})))},y=()=>{var R;(R=o._nonReactive.beforeLoadPromise)==null||R.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!i.options.beforeLoad){dl(()=>{v(),y()});return}o._nonReactive.beforeLoadPromise=ra();const x={...$o(e,n,!1),...o.__routeContext},{search:w,params:k,cause:S}=o,C=Uu(e,t),P={search:w,abortController:h,params:k,preload:C,context:x,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":S,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},_=R=>{if(R===void 0){dl(()=>{v(),y()});return}(sr(R)||Vn(R))&&(v(),tl(e,n,R,"BEFORE_LOAD")),dl(()=>{v(),e.updateMatch(t,N=>({...N,__beforeLoadContext:R})),y()})};let E;try{if(E=i.options.beforeLoad(P),Vo(E))return v(),E.catch(R=>{tl(e,n,R,"BEFORE_LOAD")}).then(_)}catch(R){v(),tl(e,n,R,"BEFORE_LOAD")}_(E)},W_=(e,t)=>{const{id:n,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i],l=()=>c(),u=()=>U_(e,n,t,o),c=()=>{if(Cw(e,n))return;const h=B_(e,n,o);return Vo(h)?h.then(u):u()};return l()},H_=(e,t,n)=>{var l,u,c,h,m,v;const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([(u=(l=n.options).head)==null?void 0:u.call(l,o),(h=(c=n.options).scripts)==null?void 0:h.call(c,o),(v=(m=n.options).headers)==null?void 0:v.call(m,o)]).then(([y,x,w])=>{const k=y==null?void 0:y.meta,S=y==null?void 0:y.links,C=y==null?void 0:y.scripts,P=y==null?void 0:y.styles;return{meta:k,links:S,headScripts:C,headers:w,scripts:x,styles:P}})},kw=(e,t,n,i)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:c,cause:h}=e.router.getMatch(t),m=$o(e,n),v=Uu(e,t);return{params:l,deps:u,preload:!!v,parentMatchPromise:o,abortController:c,context:m,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:v?"preload":h,route:i,...e.router.options.additionalContext}},my=async(e,t,n,i)=>{var o,l,u,c,h,m,v;try{const y=e.router.getMatch(t);try{(!(a_??e.router.isServer)||y.ssr===!0)&&jw(i);const x=(l=(o=i.options).loader)==null?void 0:l.call(o,kw(e,t,n,i)),w=i.options.loader&&Vo(x);if(!!(w||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||y._nonReactive.minPendingPromise)&&e.updateMatch(t,C=>({...C,isFetching:"loader"})),i.options.loader){const C=w?await x:x;ai(e,e.router.getMatch(t),C),C!==void 0&&e.updateMatch(t,P=>({...P,loaderData:C}))}i._lazyPromise&&await i._lazyPromise;const S=y._nonReactive.minPendingPromise;S&&await S,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,C=>({...C,error:void 0,context:$o(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(x){let w=x;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(t,S=>({...S,status:S.status==="pending"?"success":S.status,isFetching:!1,context:$o(e,n)}));return}const k=y._nonReactive.minPendingPromise;k&&await k,Vn(x)&&await((h=(c=i.options.notFoundComponent)==null?void 0:c.preload)==null?void 0:h.call(c)),ai(e,e.router.getMatch(t),x);try{(v=(m=i.options).onError)==null||v.call(m,x)}catch(S){w=S,ai(e,e.router.getMatch(t),S)}e.updateMatch(t,S=>({...S,error:w,context:$o(e,n),status:"error",isFetching:!1}))}}catch(y){const x=e.router.getMatch(t);x&&(x._nonReactive.loaderPromise=void 0),ai(e,x,y)}},K_=async(e,t)=>{var v,y;async function n(x,w,k,S){const C=Date.now()-w.updatedAt,P=x?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,_=S.options.shouldReload,E=typeof _=="function"?_(kw(e,i,t,S)):_,{status:R,invalid:N}=k;l=R==="success"&&(N||(E??C>P)),x&&S.options.preload===!1||(l&&!e.sync?(u=!0,(async()=>{var T,O;try{await my(e,i,t,S);const F=e.router.getMatch(i);(T=F._nonReactive.loaderPromise)==null||T.resolve(),(O=F._nonReactive.loadPromise)==null||O.resolve(),F._nonReactive.loaderPromise=void 0}catch(F){sr(F)&&await e.router.navigate(F.options)}})()):(R!=="success"||l&&e.sync)&&await my(e,i,t,S))}const{id:i,routeId:o}=e.matches[t];let l=!1,u=!1;const c=e.router.looseRoutesById[o];if(!Cw(e,i)){const x=e.router.getMatch(i),w=Uu(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload)return x;await x._nonReactive.loaderPromise;const k=e.router.getMatch(i),S=k._nonReactive.error||k.error;S&&ai(e,k,S),k.status==="pending"&&await n(w,x,k,c)}else{const k=w&&!e.router.state.matches.some(C=>C.id===i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=ra(),k!==S.preload&&e.updateMatch(i,C=>({...C,preload:k})),await n(w,x,S,c)}}const h=e.router.getMatch(i);u||((v=h._nonReactive.loaderPromise)==null||v.resolve(),(y=h._nonReactive.loadPromise)==null||y.resolve()),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,u||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const m=u?h.isFetching:!1;return m!==h.isFetching||h.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:m,invalid:!1})),e.router.getMatch(i)):h};async function gy(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&ou(t);try{for(let c=0;c<t.matches.length;c++){const h=W_(t,c);Vo(h)&&await h}const n=t.firstBadMatchIndex??t.matches.length;for(let c=0;c<n;c++)t.matchPromises.push(K_(t,c));const o=(await Promise.allSettled(t.matchPromises)).filter(c=>c.status==="rejected").map(c=>c.reason);let l;for(const c of o){if(sr(c))throw c;!l&&Vn(c)&&(l=c)}for(const c of t.matches){const{id:h,routeId:m}=c,v=t.router.looseRoutesById[m];try{const y=H_(t,h,v);if(y){const x=await y;t.updateMatch(h,w=>({...w,...x}))}}catch(y){console.error(`Error executing head for route ${m}:`,y)}}if(l)throw l;const u=ou(t);Vo(u)&&await u}catch(n){if(Vn(n)&&!t.preload){const i=ou(t);throw Vo(i)&&await i,n}if(sr(n))throw n}return t.matches}async function jw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var i;const n=[];for(const o of Rw){const l=(i=e.options[o])==null?void 0:i.preload;l&&n.push(l())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Ew(e){var t;for(const n of Rw)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Rw=["component","errorComponent","pendingComponent","notFoundComponent"];function Q_(e){return{input:({url:t})=>{for(const n of e)t=Bh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Pw(e[n],t);return t}}}function Z_(e){const t=Sw(e.basepath),n=`/${t}`,i=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const c=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return c===o?u.pathname="/":c.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=iu(["/",t,u.pathname]),u)}}function Bh(e,t){var i;const n=(i=e==null?void 0:e.input)==null?void 0:i.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Pw(e,t){var i;const n=(i=e==null?void 0:e.output)==null?void 0:i.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Yi(e){const t=e.resolvedLocation,n=e.location,i=(t==null?void 0:t.pathname)!==n.pathname,o=(t==null?void 0:t.href)!==n.href,l=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:o,hashChanged:l}}function q_(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class G_{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var x;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,o=this.basepath??(i==null?void 0:i.basepath)??"/",l=this.basepath===void 0,u=i==null?void 0:i.rewrite;if(this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=j_(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=i_()),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 w;this.resolvePathCache=vu(1e3),w=this.buildRouteTree(),this.setRoutes(w)}!this.__store&&this.latestLocation&&(this.__store=new n_(X_(this.latestLocation)),A_(this));let c=!1;const h=this.options.basepath??"/",m=this.options.rewrite;if(l||o!==h||u!==m){this.basepath=h;const w=[],k=Sw(h);k&&k!=="/"&&w.push(Z_({basepath:h})),m&&w.push(m),this.rewrite=w.length===0?void 0:w.length===1?w[0]:Q_(w),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&this.__store.setState(w=>({...w,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof((x=window.CSS)==null?void 0:x.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 n=w_(this.routeTree,this.options.caseSensitive,(i,o)=>{i.init({originalIndex:o})});return this.options.routeMasks&&m_(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,i)=>{const o={eventType:n,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const o=({pathname:h,search:m,hash:v,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const _=this.options.parseSearch(m),E=this.options.stringifySearch(_);return{href:h+E+v,publicHref:y,pathname:Ja(h).path,external:!1,searchStr:E,search:Fn(i==null?void 0:i.search,_),hash:Ja(v.slice(1)).path,state:Fn(i==null?void 0:i.state,x)}}const w=new URL(y,this.origin),k=Bh(this.rewrite,w),S=this.options.parseSearch(k.search),C=this.options.stringifySearch(S);return k.search=C,{href:k.href.replace(k.origin,""),publicHref:y,pathname:Ja(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:C,search:Fn(i==null?void 0:i.search,S),hash:Ja(k.hash.slice(1)).path,state:Fn(i==null?void 0:i.state,x)}},l=o(n),{__tempLocation:u,__tempKey:c}=l.state;if(u&&(!c||c===this.tempLocationKey)){const h=o(u);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathWithBase=(n,i)=>k_({base:n,to:bp(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},o):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>J_({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{var ee,te;const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(u);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??c.fullPath,m=this.resolvePathWithBase(h,"."),v=c.search,y={...c.params},x=l.to?this.resolvePathWithBase(m,`${l.to}`):this.resolvePathWithBase(m,"."),w=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,oi(l.params,y)),k=th({path:x,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,S=this.getMatchedRoutes(k);let C=S.matchedRoutes;(S.foundRoute?S.foundRoute.path!=="/"&&S.routeParams["**"]:fs(k))&&this.options.notFoundRoute&&(C=[...C,this.options.notFoundRoute]);let _=!1;if(Object.keys(w).length>0)for(const ie of C){const X=((ee=ie.options.params)==null?void 0:ee.stringify)??ie.options.stringifyParams;X&&(_=!0,Object.assign(w,X(w)))}const E=n.leaveParams?x:Ja(_?th({path:x,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:k).path;let R=v;if(n._includeValidateSearch&&((te=this.options.search)!=null&&te.strict)){const ie={};C.forEach(X=>{if(X.options.validateSearch)try{Object.assign(ie,au(X.options.validateSearch,{...ie,...R}))}catch{}}),R=ie}R=ek({search:R,dest:l,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),R=Fn(v,R);const N=this.options.stringifySearch(R),T=l.hash===!0?u.hash:l.hash?oi(l.hash,u.hash):void 0,O=T?`#${T}`:"";let F=l.state===!0?u.state:l.state?oi(l.state,u.state):{};F=Fn(u.state,F);const L=`${E}${N}${O}`;let I,Q,U=!1;if(this.rewrite){const ie=new URL(L,this.origin),X=Pw(this.rewrite,ie);I=ie.href.replace(ie.origin,""),X.origin!==this.origin?(Q=X.href,U=!0):Q=X.pathname+X.search+X.hash}else I=f_(L),Q=I;return{publicHref:Q,href:I,pathname:E,search:R,searchStr:N,state:F,hash:T??"",external:U,unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const c=i(l);let h=u?i(u):void 0;if(!h){const m={};if(this.options.routeMasks){const v=g_(c.pathname,this.processedTree);if(v){Object.assign(m,v.rawParams);const{from:y,params:x,...w}=v.route,k=x===!1||x===null?{}:(x??!0)===!0?m:Object.assign(m,oi(x,m));u={from:n.from,...w,params:k},h=i(u)}}}return h&&(c.maskedLocation=h),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...o})=>{const l=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(v=>{o.state[v]=this.latestLocation.state[v]});const m=Gi(o.state,this.latestLocation.state);return h.forEach(v=>{delete o.state[v]}),m},u=fs(this.latestLocation.href)===fs(o.href),c=this.commitLocationPromise;if(this.commitLocationPromise=ra(()=>{c==null||c.resolve()}),u&&l())this.load();else{let{maskedLocation:h,hashScrollIntoView:m,...v}=o;h&&(v={...h,state:{...h.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=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:i})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:c,...h}={})=>{if(c){const y=this.history.location.state.__TSR_index,x=pu(c,{__TSR_index:n?y:y+1}),w=new URL(x.pathname,this.origin),k=Bh(this.rewrite,w);h.to=k.pathname,h.search=this.options.parseSearch(x.search),h.hash=x.hash.slice(1)}const m=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:n,reloadDocument:i,href:o,publicHref:l,...u})=>{var h;let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!i&&(i=!0),i){if(n!==void 0||!o){const v=this.buildLocation({to:n,...u});o=o??v.publicHref,l=l??v.publicHref}const m=!c&&l?l:o;if(gu(m,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const v=this.history,y=((h=v.getBlockers)==null?void 0:h.call(v))??[];for(const x of y)if(x!=null&&x.blockerFn&&await x.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(m):window.location.href=m,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let i,o,l;for(l=new Promise(c=>{this.startTransition(async()=>{var h;try{this.beforeLoad();const m=this.latestLocation,v=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Yi({resolvedLocation:v,location:m})}),this.emit({type:"onBeforeLoad",...Yi({resolvedLocation:v,location:m})}),await gy({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],x=[],w=[];dl(()=>{this.__store.setState(k=>{const S=k.matches,C=k.pendingMatches||k.matches;return y=S.filter(P=>!C.some(_=>_.id===P.id)),x=C.filter(P=>!S.some(_=>_.id===P.id)),w=C.filter(P=>S.some(_=>_.id===P.id)),{...k,isLoading:!1,loadedAt:Date.now(),matches:C,pendingMatches:void 0,cachedMatches:[...k.cachedMatches,...y.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[x,"onEnter"],[w,"onStay"]].forEach(([k,S])=>{k.forEach(C=>{var P,_;(_=(P=this.looseRoutesById[C.routeId].options)[S])==null||_.call(P,C)})})})})}})}catch(m){sr(m)?(i=m,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Vn(m)&&(o=m),this.__store.setState(v=>({...v,statusCode:i?i.status:o?404:v.matches.some(y=>y.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(c=>c.status==="error")&&(u=500),u!==void 0&&this.__store.setState(c=>({...c,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,c=typeof i.types=="function"?i.types(Yi({resolvedLocation:u,location:l})):i.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{var l;const o=(l=this.state.pendingMatches)!=null&&l.some(u=>u.id===n)?"pendingMatches":this.state.matches.some(u=>u.id===n)?"matches":this.state.cachedMatches.some(u=>u.id===n)?"cachedMatches":"";o&&(o==="cachedMatches"?this.__store.setState(u=>({...u,cachedMatches:q_(u.cachedMatches.map(c=>c.id===n?i(c):c))})):this.__store.setState(u=>{var c;return{...u,[o]:(c=u[o])==null?void 0:c.map(h=>h.id===n?i(h):h)}}))})},this.getMatch=n=>{var o;const i=l=>l.id===n;return this.state.cachedMatches.find(i)??((o=this.state.pendingMatches)==null?void 0:o.find(i))??this.state.matches.find(i)},this.invalidate=n=>{const i=o=>{var l;return((l=n==null?void 0:n.filter)==null?void 0:l.call(n,o))??!0?{...o,invalid:!0,...n!=null&&n.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.__store.setState(o=>{var l;return{...o,matches:o.matches.map(i),cachedMatches:o.cachedMatches.map(i),pendingMatches:(l=o.pendingMatches)==null?void 0:l.map(i)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const i=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),l=this.getParsedLocationHref(o);n.options.href=l,n.headers.set("Location",l)}else if(i)try{const o=new URL(i);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}if(n.options.href&&!n.options._builtLocation&&gu(n.options.href,this.protocolAllowlist))throw new Error(`Redirect blocked: unsafe protocol in href "${n.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n==null?void 0:n.filter;i!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!i(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const l=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=jw,this.preloadRoute=async n=>{const i=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),u=new Set([...l,...this.state.cachedMatches.map(c=>c.id)]);dl(()=>{o.forEach(c=>{u.has(c.id)||this.__store.setState(h=>({...h,cachedMatches:[...h.cachedMatches,c]}))})});try{return o=await gy({router:this,matches:o,location:i,preload:!0,updateMatch:(c,h)=>{l.has(c)?o=o.map(m=>m.id===c?h(m):m):this.updateMatch(c,h)}}),o}catch(c){if(sr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:i});Vn(c)||console.error(c);return}},this.matchRoute=(n,i)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(i!=null&&i.pending&&this.state.status!=="pending")return!1;const c=((i==null?void 0:i.pending)===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,h=v_(l.pathname,(i==null?void 0:i.caseSensitive)??!1,(i==null?void 0:i.fuzzy)??!1,c.pathname,this.processedTree);return!h||n.params&&!Gi(h.rawParams,n.params,{partial:!0})?!1:(i==null?void 0:i.includeSearch)??!0?Gi(c.search,l.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??D_,parseSearch:t.parseSearch??F_,protocolAllowlist:t.protocolAllowlist??d_}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:i}){this.routesById=t,this.routesByPath=n,this.processedTree=i;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(t){return(t==null?void 0:t.id)?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){var x,w;const i=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l,parsedParams:u}=i;let{matchedRoutes:c}=i,h=!1;(o?o.path!=="/"&&l["**"]:fs(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:h=!0);const m=h?nk(this.options.notFoundMode,c):void 0,v=new Array(c.length),y=new Map(this.state.matches.map(k=>[k.routeId,k]));for(let k=0;k<c.length;k++){const S=c[k],C=v[k-1];let P,_,E;{const X=(C==null?void 0:C.search)??t.search,oe=(C==null?void 0:C._strictSearch)??void 0;try{const B=au(S.options.validateSearch,{...X})??void 0;P={...X,...B},_={...oe,...B},E=void 0}catch(B){let J=B;if(B instanceof wu||(J=new wu(B.message,{cause:B})),n!=null&&n.throwOnError)throw J;P=X,_={},E=J}}const R=((w=(x=S.options).loaderDeps)==null?void 0:w.call(x,{search:P}))??"",N=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:O}=th({path:S.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),F=S.id+T+N,L=this.getMatch(F),I=y.get(S.id),Q=(L==null?void 0:L._strictParams)??O;let U;if(!L)try{vy(S,O,u,Q)}catch(X){if(Vn(X)||sr(X)?U=X:U=new Y_(X.message,{cause:X}),n!=null&&n.throwOnError)throw U}Object.assign(l,Q);const ee=I?"stay":"enter";let te;if(L)te={...L,cause:ee,params:(I==null?void 0:I.params)??l,_strictParams:Q,search:Fn(I?I.search:L.search,P),_strictSearch:_};else{const X=S.options.loader||S.options.beforeLoad||S.lazyFn||Ew(S)?"pending":"success";te={id:F,ssr:S.options.ssr,index:k,routeId:S.id,params:(I==null?void 0:I.params)??l,_strictParams:Q,pathname:T,updatedAt:Date.now(),search:I?Fn(I.search,P):P,_strictSearch:_,searchError:void 0,status:X,isFetching:!1,error:void 0,paramsError:U,__routeContext:void 0,_nonReactive:{loadPromise:ra()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ee,loaderDeps:I?Fn(I.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:S.options.staticData||{},fullPath:S.fullPath}}n!=null&&n.preload||(te.globalNotFound=m===S.id),te.searchError=E;const ie=this.getParentContext(C);te.context={...ie,...te.__routeContext,...te.__beforeLoadContext},v[k]=te}for(let k=0;k<v.length;k++){const S=v[k],C=this.looseRoutesById[S.routeId],P=this.getMatch(S.id),_=y.get(S.routeId);if(S.params=_?Fn(_.params,l):l,!P){const E=v[k-1],R=this.getParentContext(E);if(C.options.context){const N={deps:S.loaderDeps,params:S.params,context:R??{},location:t,navigate:T=>this.navigate({...T,_fromLocation:t}),buildLocation:this.buildLocation,cause:S.cause,abortController:S.abortController,preload:!!S.preload,matches:v,routeId:C.id};S.__routeContext=C.options.context(N)??void 0}S.context={...R,...S.__routeContext,...S.__beforeLoadContext}}}return v}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:i,parsedParams:o}=this.getMatchedRoutes(t.pathname),l=ml(n),u={...t.search};for(const v of n)try{Object.assign(u,au(v.options.validateSearch,u))}catch{}const c=ml(this.state.matches),h=c&&c.routeId===l.id&&t.pathname===this.state.location.pathname;let m;if(h)m=c.params;else{const v={...i};for(const y of n)try{vy(y,i,o??{},v)}catch{}m=v}return{matchedRoutes:n,fullPath:l.fullPath,search:u,params:m}}}class wu extends Error{}class Y_ extends Error{}function X_(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function au(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new wu("Async validation not supported");if(n.issues)throw new wu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function J_({pathname:e,routesById:t,processedTree:n}){const i={},o=fs(e);let l,u;const c=y_(o,n,!0);return c&&(l=c.route,Object.assign(i,c.rawParams),u=Object.assign({},c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t[rr]],routeParams:i,foundRoute:l,parsedParams:u}}function ek({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){return tk(n)(e,t,i??!1)}function tk(e){var o;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)(o=l.options.search)!=null&&o.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:h})=>{let m=c;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(m=l.options.preSearchFilters.reduce((y,x)=>x(y),c));const v=h(m);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,x)=>x(y),v):v};t.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:h})=>{const m=h(c);if(!t._includeValidateSearch)return m;try{return{...m,...au(l.options.validateSearch,m)??void 0}}catch{return m}};t.middlewares.push(u)}}const n=({search:l})=>{const u=t.dest;return u.search?u.search===!0?l:oi(u.search,l):{}};t.middlewares.push(n);const i=(l,u,c)=>{if(l>=c.length)return u;const h=c[l];return h({search:u,next:v=>i(l+1,v,c)})};return function(u,c,h){return t.dest=c,t._includeValidateSearch=h,i(0,u,t.middlewares)}}function nk(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.children)return i.id}return rr}function vy(e,t,n,i){var l;const o=((l=e.options.params)==null?void 0:l.parse)??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const u in t)u in n&&(i[u]=n[u]);else{const u=o(i);Object.assign(i,u)}}const rk="Error preloading route! ☝️";class Nw{constructor(t){if(this.init=n=>{var m,v;this.originalIndex=n.originalIndex;const i=this.options,o=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(v=(m=this.options).getParentRoute)==null?void 0:v.call(m),o?this._path=rr:this.parentRoute||ms(!1);let l=o?rr:i==null?void 0:i.path;l&&l!=="/"&&(l=ww(l));const u=(i==null?void 0:i.id)||l;let c=o?rr:iu([this.parentRoute.id===rr?"":this.parentRoute.id,u]);l===rr&&(l="/"),c!==rr&&(c=iu(["/",c]));const h=c===rr?"/":iu([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=h,this._to=fs(h)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>$_({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class sk extends Nw{constructor(t){super(t)}}const qc=typeof window<"u"?b.useLayoutEffect:b.useEffect;function rh(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ik(e,t,n={},i={}){b.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,i.disabled,e])}function ok(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function Cp(e){const t=e.errorComponent??_p;return f.jsx(ak,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?b.createElement(t,{error:n,reset:i}):e.children})}class ak extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function _p({error:e}){const[t,n]=b.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),t?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function lk({children:e,fallback:t=null}){return Tw()?f.jsx(st.Fragment,{children:e}):f.jsx(st.Fragment,{children:t})}function Tw(){return st.useSyncExternalStore(ck,()=>!0,()=>!1)}function ck(){return()=>{}}var sh={exports:{}},ih={},oh={exports:{}},ah={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var yy;function uk(){if(yy)return ah;yy=1;var e=ua();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(y,x){var w=x(),k=i({inst:{value:w,getSnapshot:x}}),S=k[0].inst,C=k[1];return l(function(){S.value=w,S.getSnapshot=x,h(S)&&C({inst:S})},[y,w,x]),o(function(){return h(S)&&C({inst:S}),y(function(){h(S)&&C({inst:S})})},[y]),u(w),w}function h(y){var x=y.getSnapshot;y=y.value;try{var w=x();return!n(y,w)}catch{return!0}}function m(y,x){return x()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:c;return ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,ah}var xy;function dk(){return xy||(xy=1,oh.exports=uk()),oh.exports}/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var wy;function fk(){if(wy)return ih;wy=1;var e=ua(),t=dk();function n(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,c=e.useMemo,h=e.useDebugValue;return ih.useSyncExternalStoreWithSelector=function(m,v,y,x,w){var k=l(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function P(T){if(!_){if(_=!0,E=T,T=x(T),w!==void 0&&S.hasValue){var O=S.value;if(w(O,T))return R=O}return R=T}if(O=R,i(E,T))return O;var F=x(T);return w!==void 0&&w(O,F)?(E=T,O):(E=T,R=F)}var _=!1,E,R,N=y===void 0?null:y;return[function(){return P(v())},N===null?void 0:function(){return P(N())}]},[v,y,x,w]);var C=o(m,k[0],k[1]);return u(function(){S.hasValue=!0,S.value=C},[C]),h(C),C},ih}var Sy;function hk(){return Sy||(Sy=1,sh.exports=fk()),sh.exports}var pk=hk();function mk(e,t){return e===t}function gk(e,t,n=mk){const i=b.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(u);return c},[e]),o=b.useCallback(()=>e==null?void 0:e.get(),[e]);return pk.useSyncExternalStoreWithSelector(i,o,o,t,n)}const lh=b.createContext(null);function Ow(){return typeof document>"u"?lh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=lh,lh)}function Hn(e){const t=b.useContext(Ow());return e==null||e.warn,t}function ir(e){const t=Hn({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,i=b.useRef(void 0);return gk(n.__store,o=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Fn(i.current,e.select(o));return i.current=l,l}return e.select(o)}return o})}const Wu=b.createContext(void 0),vk=b.createContext(void 0);function $r(e){const t=b.useContext(e.from?vk:Wu);return ir({select:i=>{const o=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(ms(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function kp(e){return $r({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function jp(e){const{select:t,...n}=e;return $r({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function Hu(e){return $r({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ep(e){return $r({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Rp(e){const t=Hn();return b.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}var fa=tw();const yk=zu(fa);function xk(e,t){const n=Hn(),i=ok(t),{activeProps:o,inactiveProps:l,activeOptions:u,to:c,preload:h,preloadDelay:m,hashScrollIntoView:v,replace:y,startTransition:x,resetScroll:w,viewTransition:k,children:S,target:C,disabled:P,style:_,className:E,onClick:R,onFocus:N,onMouseEnter:T,onMouseLeave:O,onTouchStart:F,ignoreBlocker:L,params:I,search:Q,hash:U,state:ee,mask:te,reloadDocument:ie,unsafeRelative:X,from:oe,_fromLocation:B,...J}=e,Z=Tw(),M=ir({select:re=>{const pe=re.matches[re.matches.length-1];return{search:pe==null?void 0:pe.search,hash:re.location.hash,path:pe==null?void 0:pe.pathname}},structuralSharing:!0}),G=e.from,Re=b.useMemo(()=>({...e,from:G}),[n,M,G,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=b.useMemo(()=>n.buildLocation({...Re}),[n,Re]),Ne=ge.maskedLocation?ge.maskedLocation.publicHref:ge.publicHref,ne=ge.maskedLocation?ge.maskedLocation.external:ge.external,se=b.useMemo(()=>kk(Ne,ne,n.history,P),[P,ne,Ne,n.history]),ve=b.useMemo(()=>{if(se!=null&&se.external)return gu(se.href,n.protocolAllowlist)?void 0:se.href;if(!jk(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),gu(c,n.protocolAllowlist)?void 0:c}catch{}},[c,se,n.protocolAllowlist]),Oe=ir({select:re=>{if(ve)return!1;if(u!=null&&u.exact){if(!__(re.location.pathname,ge.pathname,n.basepath))return!1}else{const pe=yu(re.location.pathname,n.basepath),Me=yu(ge.pathname,n.basepath);if(!(pe.startsWith(Me)&&(pe.length===Me.length||pe[Me.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!Gi(re.location.search,ge.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?Z&&re.location.hash===ge.hash:!0}}),Te=Oe?oi(o,{})??wk:ch,Le=Oe?ch:oi(l,{})??ch,Ue=[E,Te.className,Le.className].filter(Boolean).join(" "),dt=(_||Te.style||Le.style)&&{..._,...Te.style,...Le.style},[Mt,tn]=b.useState(!1),Yt=b.useRef(!1),Dt=e.reloadDocument||ve?!1:h??n.options.defaultPreload,et=m??n.options.defaultPreloadDelay??0,Nt=b.useCallback(()=>{n.preloadRoute({...Re,_builtLocation:ge}).catch(re=>{console.warn(re),console.warn(rk)})},[n,Re,ge]),Nn=b.useCallback(re=>{re!=null&&re.isIntersecting&&Nt()},[Nt]);ik(i,Nn,_k,{disabled:!!P||Dt!=="viewport"}),b.useEffect(()=>{Yt.current||!P&&Dt==="render"&&(Nt(),Yt.current=!0)},[P,Nt,Dt]);const z=re=>{const pe=re.currentTarget.getAttribute("target"),Me=C!==void 0?C:pe;if(!P&&!Ek(re)&&!re.defaultPrevented&&(!Me||Me==="_self")&&re.button===0){re.preventDefault(),fa.flushSync(()=>{tn(!0)});const $e=n.subscribe("onResolved",()=>{$e(),tn(!1)});n.navigate({...Re,replace:y,resetScroll:w,hashScrollIntoView:v,startTransition:x,viewTransition:k,ignoreBlocker:L})}};if(ve)return{...J,ref:i,href:ve,...S&&{children:S},...C&&{target:C},...P&&{disabled:P},..._&&{style:_},...E&&{className:E},...R&&{onClick:R},...N&&{onFocus:N},...T&&{onMouseEnter:T},...O&&{onMouseLeave:O},...F&&{onTouchStart:F}};const H=re=>{P||Dt&&Nt()},Y=H,me=re=>{if(!(P||!Dt))if(!et)Nt();else{const pe=re.target;if(nl.has(pe))return;const Me=setTimeout(()=>{nl.delete(pe),Nt()},et);nl.set(pe,Me)}},ue=re=>{if(P||!Dt||!et)return;const pe=re.target,Me=nl.get(pe);Me&&(clearTimeout(Me),nl.delete(pe))};return{...J,...Te,...Le,href:se==null?void 0:se.href,ref:i,onClick:rl([R,z]),onFocus:rl([N,H]),onMouseEnter:rl([T,me]),onMouseLeave:rl([O,ue]),onTouchStart:rl([F,Y]),disabled:!!P,target:C,...dt&&{style:dt},...Ue&&{className:Ue},...P&&Sk,...Oe&&bk,...Z&&Mt&&Ck}}const ch={},wk={className:"active"},Sk={role:"link","aria-disabled":!0},bk={"data-status":"active","aria-current":"page"},Ck={"data-transitioning":"transitioning"},nl=new WeakMap,_k={rootMargin:"100px"},rl=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function kk(e,t,n,i){if(!i)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function jk(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Aw=b.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:o,...l}=xk(i,t),u=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!n){const{disabled:c,...h}=l;return b.createElement("a",h,u)}return b.createElement(n,l,u)});function Ek(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class Rk extends Nw{constructor(t){super(t),this.useMatch=n=>$r({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>$r({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Hu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>jp({...n,from:this.id}),this.useLoaderData=n=>kp({...n,from:this.id}),this.useNavigate=()=>Rp({from:this.fullPath}),this.Link=st.forwardRef((n,i)=>f.jsx(Aw,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function _r(e){return new Rk(e)}class Pk extends sk{constructor(t){super(t),this.useMatch=n=>$r({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>$r({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Hu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>jp({...n,from:this.id}),this.useLoaderData=n=>kp({...n,from:this.id}),this.useNavigate=()=>Rp({from:this.fullPath}),this.Link=st.forwardRef((n,i)=>f.jsx(Aw,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Nk(e){return new Pk(e)}function by(e){return typeof e=="object"?new Cy(e,{silent:!0}).createRoute(e):new Cy(e,{silent:!0}).createRoute}class Cy{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const o=_r(i);return o.isRoot=!1,o},this.silent=n==null?void 0:n.silent}}class _y{constructor(t){this.useMatch=n=>$r({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>$r({from:this.options.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>Hu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>jp({...n,from:this.options.id}),this.useLoaderData=n=>kp({...n,from:this.options.id}),this.useNavigate=()=>{const n=Hn();return Rp({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function ky(e){return typeof e=="object"?new _y(e):t=>new _y({id:e,...t})}function Tk(){const e=Hn(),t=b.useRef({router:e,mounted:!1}),[n,i]=b.useState(!1),{hasPendingMatches:o,isLoading:l}=ir({select:y=>({isLoading:y.isLoading,hasPendingMatches:y.matches.some(x=>x.status==="pending")}),structuralSharing:!0}),u=rh(l),c=l||n||o,h=rh(c),m=l||o,v=rh(m);return e.startTransition=y=>{i(!0),b.startTransition(()=>{y(),i(!1)})},b.useEffect(()=>{const y=e.history.subscribe(e.load),x=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fs(e.latestLocation.publicHref)!==fs(x.publicHref)&&e.commitLocation({...x,replace:!0}),()=>{y()}},[e,e.history]),qc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(x){console.error(x)}})()},[e]),qc(()=>{u&&!l&&e.emit({type:"onLoad",...Yi(e.state)})},[u,e,l]),qc(()=>{v&&!m&&e.emit({type:"onBeforeRouteMount",...Yi(e.state)})},[m,v,e]),qc(()=>{if(h&&!c){const y=Yi(e.state);e.emit({type:"onResolved",...y}),e.__store.setState(x=>({...x,status:"idle",resolvedLocation:x.location})),y.hrefChanged&&I_(e)}},[c,h,e]),null}function Ok(e){const t=ir({select:n=>`not-found-${n.location.pathname}-${n.status}`});return f.jsx(Cp,{getResetKey:()=>t,onCatch:(n,i)=>{var o;if(Vn(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Vn(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function Ak(){return f.jsx("p",{children:"Not Found"})}function Fo(e){return f.jsx(f.Fragment,{children:e.children})}function Iw(e,t,n){return t.options.notFoundComponent?f.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...n}):f.jsx(Ak,{})}function Ik(){return Hn().isScrollRestoring,null}const Mw=b.memo(function({matchId:t}){var S,C;const n=Hn(),i=ir({select:P=>{var R;const _=P.matches.findIndex(N=>N.id===t),E=P.matches[_];return ms(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending,resetKey:P.loadedAt,parentRouteId:(R=P.matches[_-1])==null?void 0:R.routeId}},structuralSharing:!0}),o=n.routesById[i.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?f.jsx(l,{}):null,c=o.options.errorComponent??n.options.defaultErrorComponent,h=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((S=n.options.notFoundRoute)==null?void 0:S.options.component):o.options.notFoundComponent,v=i.ssr===!1||i.ssr==="data-only",y=(!o.isRoot||o.options.wrapInSuspense||v)&&(o.options.wrapInSuspense??l??(((C=o.options.errorComponent)==null?void 0:C.preload)||v))?b.Suspense:Fo,x=c?Cp:Fo,w=m?Ok:Fo,k=o.isRoot?o.options.shellComponent??Fo:Fo;return f.jsxs(k,{children:[f.jsx(Wu.Provider,{value:t,children:f.jsx(y,{fallback:u,children:f.jsx(x,{getResetKey:()=>i.resetKey,errorComponent:c||_p,onCatch:(P,_)=>{if(Vn(P))throw P;h==null||h(P,_)},children:f.jsx(w,{fallback:P=>{if(!m||P.routeId&&P.routeId!==i.routeId||!P.routeId&&!o.isRoot)throw P;return b.createElement(m,P)},children:v||i._displayPending?f.jsx(lk,{fallback:u,children:f.jsx(jy,{matchId:t})}):f.jsx(jy,{matchId:t})})})})}),i.parentRouteId===rr&&n.options.scrollRestoration?f.jsxs(f.Fragment,{children:[f.jsx(Mk,{}),f.jsx(Ik,{})]}):null]})});function Mk(){const e=Hn(),t=b.useRef(void 0);return f.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Yi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const jy=b.memo(function({matchId:t}){var h,m,v,y;const n=Hn(),{match:i,key:o,routeId:l}=ir({select:x=>{const w=x.matches.find(_=>_.id===t),k=w.routeId,S=n.routesById[k].options.remountDeps??n.options.defaultRemountDeps,C=S==null?void 0:S({routeId:k,loaderDeps:w.loaderDeps,params:w._strictParams,search:w._strictSearch});return{key:C?JSON.stringify(C):void 0,routeId:k,match:{id:w.id,status:w.status,error:w.error,invalid:w.invalid,_forcePending:w._forcePending,_displayPending:w._displayPending}}},structuralSharing:!0}),u=n.routesById[l],c=b.useMemo(()=>{const x=u.options.component??n.options.defaultComponent;return x?f.jsx(x,{},o):f.jsx(Lw,{})},[o,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw(h=n.getMatch(i.id))==null?void 0:h._nonReactive.displayPendingPromise;if(i._forcePending)throw(m=n.getMatch(i.id))==null?void 0:m._nonReactive.minPendingPromise;if(i.status==="pending"){const x=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(x){const w=n.getMatch(i.id);if(w&&!w._nonReactive.minPendingPromise){const k=ra();w._nonReactive.minPendingPromise=k,setTimeout(()=>{k.resolve(),w._nonReactive.minPendingPromise=void 0},x)}}throw(v=n.getMatch(i.id))==null?void 0:v._nonReactive.loadPromise}if(i.status==="notFound")return ms(Vn(i.error)),Iw(n,u,i.error);if(i.status==="redirected")throw ms(sr(i.error)),(y=n.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise;if(i.status==="error")throw i.error;return c}),Lw=b.memo(function(){const t=Hn(),n=b.useContext(Wu),i=ir({select:m=>{var v;return(v=m.matches.find(y=>y.id===n))==null?void 0:v.routeId}}),o=t.routesById[i],l=ir({select:m=>{const y=m.matches.find(x=>x.id===n);return ms(y),y.globalNotFound}}),u=ir({select:m=>{var x;const v=m.matches,y=v.findIndex(w=>w.id===n);return(x=v[y+1])==null?void 0:x.id}}),c=t.options.defaultPendingComponent?f.jsx(t.options.defaultPendingComponent,{}):null;if(l)return Iw(t,o,void 0);if(!u)return null;const h=f.jsx(Mw,{matchId:u});return i===rr?f.jsx(b.Suspense,{fallback:c,children:h}):h});function Lk(){const e=Hn(),n=e.routesById[rr].options.pendingComponent??e.options.defaultPendingComponent,i=n?f.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?Fo:b.Suspense,l=f.jsxs(o,{fallback:i,children:[f.jsx(Tk,{}),f.jsx(Fk,{})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:l}):l}function Fk(){const e=Hn(),t=ir({select:o=>{var l;return(l=o.matches[0])==null?void 0:l.id}}),n=ir({select:o=>o.loadedAt}),i=t?f.jsx(Mw,{matchId:t}):null;return f.jsx(Wu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Cp,{getResetKey:()=>n,errorComponent:_p,onCatch:o=>{o.message||o.toString()},children:i})})}const Dk=e=>new zk(e);class zk extends G_{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=by,globalThis.createLazyFileRoute=ky):typeof window<"u"&&(window.createFileRoute=by,window.createLazyFileRoute=ky);function Vk({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=Ow(),o=f.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?f.jsx(e.options.Wrap,{children:o}):o}function $k({router:e,...t}){return f.jsx(Vk,{router:e,...t,children:f.jsx(Lk,{})})}/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const Bk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fw=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/var Uk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Wk=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:u,...c},h)=>b.createElement("svg",{ref:h,...Uk,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Fw("lucide",o),...c},[...u.map(([m,v])=>b.createElement(m,v)),...Array.isArray(l)?l:[l]]));/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const qe=(e,t)=>{const n=b.forwardRef(({className:i,...o},l)=>b.createElement(Wk,{ref:l,iconNode:t,className:Fw(`lucide-${Bk(e)}`,i),...o}));return n.displayName=`${e}`,n};/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Hk=qe("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Kk=qe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Ku=qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Qk=qe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Zk=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Dw=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const qk=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Pp=qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Ol=qe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Gk=qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const zw=qe("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const ha=qe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Su=qe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Yk=qe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Xk=qe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Vw=qe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const $w=qe("FileOutput",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const Bw=qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const Jk=qe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Br=qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const ej=qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const hi=qe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Uh=qe("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Uw=qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const tj=qe("RectangleEllipsis",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const nj=qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const Ww=qe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const Hw=qe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const rj=qe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Kw=qe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const sj=qe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Qw=qe("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const Al=qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const ij=qe("Unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const oj=qe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const aj=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Zw(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Zw(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function qw(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zw(e))&&(i&&(i+=" "),i+=t);return i}const Np="-",lj=e=>{const t=uj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{const c=u.split(Np);return c[0]===""&&c.length!==1&&c.shift(),Gw(c,t)||cj(u)},getConflictingClassGroupIds:(u,c)=>{const h=n[u]||[];return c&&i[u]?[...h,...i[u]]:h}}},Gw=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),o=i?Gw(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const l=e.join(Np);return(u=t.validators.find(({validator:c})=>c(l)))==null?void 0:u.classGroupId},Ey=/^\[(.+)\]$/,cj=e=>{if(Ey.test(e)){const t=Ey.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uj=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return fj(Object.entries(e.classGroups),n).forEach(([l,u])=>{Wh(u,i,l,t)}),i},Wh=(e,t,n,i)=>{e.forEach(o=>{if(typeof o=="string"){const l=o===""?t:Ry(t,o);l.classGroupId=n;return}if(typeof o=="function"){if(dj(o)){Wh(o(i),t,n,i);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,u])=>{Wh(u,Ry(t,l),n,i)})})},Ry=(e,t)=>{let n=e;return t.split(Np).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},dj=e=>e.isThemeGetter,fj=(e,t)=>t?e.map(([n,i])=>{const o=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,c])=>[t+u,c])):l);return[n,o]}):e,hj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const o=(l,u)=>{n.set(l,u),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let u=n.get(l);if(u!==void 0)return u;if((u=i.get(l))!==void 0)return o(l,u),u},set(l,u){n.has(l)?n.set(l,u):o(l,u)}}},Yw="!",pj=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,o=t[0],l=t.length,u=c=>{const h=[];let m=0,v=0,y;for(let C=0;C<c.length;C++){let P=c[C];if(m===0){if(P===o&&(i||c.slice(C,C+l)===t)){h.push(c.slice(v,C)),v=C+l;continue}if(P==="/"){y=C;continue}}P==="["?m++:P==="]"&&m--}const x=h.length===0?c:c.substring(v),w=x.startsWith(Yw),k=w?x.substring(1):x,S=y&&y>v?y-v:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:u}):u},mj=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},gj=e=>({cache:hj(e.cacheSize),parseClassName:pj(e),...lj(e)}),vj=/\s+/,yj=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o}=t,l=[],u=e.trim().split(vj);let c="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{modifiers:v,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:w}=n(m);let k=!!w,S=i(k?x.substring(0,w):x);if(!S){if(!k){c=m+(c.length>0?" "+c:c);continue}if(S=i(x),!S){c=m+(c.length>0?" "+c:c);continue}k=!1}const C=mj(v).join(":"),P=y?C+Yw:C,_=P+S;if(l.includes(_))continue;l.push(_);const E=o(S,k);for(let R=0;R<E.length;++R){const N=E[R];l.push(P+N)}c=m+(c.length>0?" "+c:c)}return c};function xj(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xw(t))&&(i&&(i+=" "),i+=n);return i}const Xw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Xw(e[i]))&&(n&&(n+=" "),n+=t);return n};function wj(e,...t){let n,i,o,l=u;function u(h){const m=t.reduce((v,y)=>y(v),e());return n=gj(m),i=n.cache.get,o=n.cache.set,l=c,c(h)}function c(h){const m=i(h);if(m)return m;const v=yj(h,n);return o(h,v),v}return function(){return l(xj.apply(null,arguments))}}const St=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sj=/^\d+\/\d+$/,bj=new Set(["px","full","screen"]),Cj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_j=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ej=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ns=e=>Bo(e)||bj.has(e)||Sj.test(e),Us=e=>pa(e,"length",Mj),Bo=e=>!!e&&!Number.isNaN(Number(e)),uh=e=>pa(e,"number",Bo),sl=e=>!!e&&Number.isInteger(Number(e)),Rj=e=>e.endsWith("%")&&Bo(e.slice(0,-1)),We=e=>Jw.test(e),Ws=e=>Cj.test(e),Pj=new Set(["length","size","percentage"]),Nj=e=>pa(e,Pj,e0),Tj=e=>pa(e,"position",e0),Oj=new Set(["image","url"]),Aj=e=>pa(e,Oj,Fj),Ij=e=>pa(e,"",Lj),il=()=>!0,pa=(e,t,n)=>{const i=Jw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},Mj=e=>_j.test(e)&&!kj.test(e),e0=()=>!1,Lj=e=>jj.test(e),Fj=e=>Ej.test(e),Dj=()=>{const e=St("colors"),t=St("spacing"),n=St("blur"),i=St("brightness"),o=St("borderColor"),l=St("borderRadius"),u=St("borderSpacing"),c=St("borderWidth"),h=St("contrast"),m=St("grayscale"),v=St("hueRotate"),y=St("invert"),x=St("gap"),w=St("gradientColorStops"),k=St("gradientColorStopPositions"),S=St("inset"),C=St("margin"),P=St("opacity"),_=St("padding"),E=St("saturate"),R=St("scale"),N=St("sepia"),T=St("skew"),O=St("space"),F=St("translate"),L=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",We,t],U=()=>[We,t],ee=()=>["",ns,Us],te=()=>["auto",Bo,We],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",We],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Bo,We];return{cacheSize:500,separator:":",theme:{colors:[il],spacing:[ns,Us],blur:["none","",Ws,We],brightness:M(),borderColor:[e],borderRadius:["none","","full",Ws,We],borderSpacing:U(),borderWidth:ee(),contrast:M(),grayscale:J(),hueRotate:M(),invert:J(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[Rj,Us],inset:Q(),margin:Q(),opacity:M(),padding:U(),saturate:M(),scale:M(),sepia:J(),skew:M(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",We]}],container:["container"],columns:[{columns:[Ws]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),We]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sl,We]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",We]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",sl,We]}],"grid-cols":[{"grid-cols":[il]}],"col-start-end":[{col:["auto",{span:["full",sl,We]},We]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[il]}],"row-start-end":[{row:["auto",{span:[sl,We]},We]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",We]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",We]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",We,t]}],"min-w":[{"min-w":[We,t,"min","max","fit"]}],"max-w":[{"max-w":[We,t,"none","full","min","max","fit","prose",{screen:[Ws]},Ws]}],h:[{h:[We,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[We,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ws,Us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uh]}],"font-family":[{font:[il]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",We]}],"line-clamp":[{"line-clamp":["none",Bo,uh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ns,We]}],"list-image":[{"list-image":["none",We]}],"list-style-type":[{list:["none","disc","decimal",We]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ns,Us]}],"underline-offset":[{"underline-offset":["auto",ns,We]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",We]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),Tj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Nj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Aj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:X()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[ns,We]}],"outline-w":[{outline:[ns,Us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[ns,Us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ws,Ij]}],"shadow-color":[{shadow:[il]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Ws,We]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[y]}],saturate:[{saturate:[E]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",We]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",We]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",We]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[sl,We]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",We]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",We]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",We]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ns,Us,uh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zj=wj(Dj);function pt(...e){return zj(qw(e))}const Py=e=>{let t;const n=new Set,i=(m,v)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const x=t;t=v??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(w=>w(t,x))}},o=()=>t,c={setState:i,getState:o,getInitialState:()=>h,subscribe:m=>(n.add(m),()=>n.delete(m))},h=t=e(i,o,c);return c},Vj=(e=>e?Py(e):Py),$j=e=>e;function Bj(e,t=$j){const n=st.useSyncExternalStore(e.subscribe,st.useCallback(()=>t(e.getState()),[e,t]),st.useCallback(()=>t(e.getInitialState()),[e,t]));return st.useDebugValue(n),n}const Ny=e=>{const t=Vj(e),n=i=>Bj(t,i);return Object.assign(n,t),n},Uj=(e=>e?Ny(e):Ny);function Ty(e){e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}const Hh=Uj(e=>({sidebarCollapsed:!1,darkMode:!1,toggleSidebar:()=>e(t=>({sidebarCollapsed:!t.sidebarCollapsed})),toggleDarkMode:()=>e(t=>{const n=!t.darkMode;return Ty(n),localStorage.setItem("mcpspec-theme",n?"dark":"light"),{darkMode:n}}),initTheme:()=>{const t=localStorage.getItem("mcpspec-theme");let n;t?n=t==="dark":n=window.matchMedia("(prefers-color-scheme: dark)").matches,Ty(n),e({darkMode:n})}})),Wj=[{href:"/",label:"Dashboard",icon:Jk},{href:"/servers",label:"Servers",icon:Ww},{href:"/collections",label:"Collections",icon:Bw},{href:"/runs",label:"Runs",icon:hi},{href:"/inspect",label:"Inspect",icon:nj},{href:"/audit",label:"Audit",icon:Hw},{href:"/benchmark",label:"Benchmark",icon:Qw},{href:"/docs",label:"Docs",icon:$w},{href:"/score",label:"Score",icon:Kw}];function Hj({currentPath:e,onNavigate:t}){const n=Hh(o=>o.darkMode),i=Hh(o=>o.toggleDarkMode);return f.jsxs("aside",{className:"flex h-full w-56 flex-col border-r bg-card",children:[f.jsx("div",{className:"flex h-14 items-center border-b px-4",children:f.jsx("h1",{className:"text-lg font-bold text-primary",children:"MCPSpec"})}),f.jsx("nav",{className:"flex-1 space-y-1 p-2",children:Wj.map(o=>{const l=e===o.href||o.href!=="/"&&e.startsWith(o.href);return f.jsxs("button",{onClick:()=>t(o.href),className:pt("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",l?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[f.jsx(o.icon,{className:"h-4 w-4"}),o.label]},o.href)})}),f.jsxs("div",{className:"border-t p-4",children:[f.jsxs("button",{onClick:i,className:"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",children:[n?f.jsx(sj,{className:"h-4 w-4"}):f.jsx(ej,{className:"h-4 w-4"}),n?"Light Mode":"Dark Mode"]}),f.jsx("div",{className:"mt-2 px-3 text-xs text-muted-foreground",children:"v1.0.0"})]})]})}function Kj({children:e,currentPath:t,onNavigate:n}){return f.jsxs("div",{className:"flex h-screen",children:[f.jsx(Hj,{currentPath:t,onNavigate:n}),f.jsx("main",{className:"flex-1 overflow-auto p-6",children:e})]})}const it=b.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:pt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));it.displayName="Card";const Rt=b.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:pt("flex flex-col space-y-1.5 p-6",e),...t}));Rt.displayName="CardHeader";const Pt=b.forwardRef(({className:e,...t},n)=>f.jsx("h3",{ref:n,className:pt("text-2xl font-semibold leading-none tracking-tight",e),...t}));Pt.displayName="CardTitle";const Qj=b.forwardRef(({className:e,...t},n)=>f.jsx("p",{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));Qj.displayName="CardDescription";const ot=b.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:pt("p-6 pt-0",e),...t}));ot.displayName="CardContent";function Oy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tp(...e){return t=>{let n=!1;const i=e.map(o=>{const l=Oy(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():Oy(e[o],null)}}}}function It(...e){return b.useCallback(Tp(...e),e)}var Zj=Symbol.for("react.lazy"),bu=fp[" use ".trim().toString()];function qj(e){return typeof e=="object"&&e!==null&&"then"in e}function t0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Zj&&"_payload"in e&&qj(e._payload)}function Gj(e){const t=Xj(e),n=b.forwardRef((i,o)=>{let{children:l,...u}=i;t0(l)&&typeof bu=="function"&&(l=bu(l._payload));const c=b.Children.toArray(l),h=c.find(eE);if(h){const m=h.props.children,v=c.map(y=>y===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:y);return f.jsx(t,{...u,ref:o,children:b.isValidElement(m)?b.cloneElement(m,void 0,v):null})}return f.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var Yj=Gj("Slot");function Xj(e){const t=b.forwardRef((n,i)=>{let{children:o,...l}=n;if(t0(o)&&typeof bu=="function"&&(o=bu(o._payload)),b.isValidElement(o)){const u=nE(o),c=tE(l,o.props);return o.type!==b.Fragment&&(c.ref=i?Tp(i,u):u),b.cloneElement(o,c)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jj=Symbol("radix.slottable");function eE(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jj}function tE(e,t){const n={...t};for(const i in t){const o=e[i],l=t[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...c)=>{const h=l(...c);return o(...c),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function nE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ay=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Iy=qw,n0=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return Iy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(m=>{const v=n==null?void 0:n[m],y=l==null?void 0:l[m];if(v===null)return null;const x=Ay(v)||Ay(y);return o[m][x]}),c=n&&Object.entries(n).reduce((m,v)=>{let[y,x]=v;return x===void 0||(m[y]=x),m},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,v)=>{let{class:y,className:x,...w}=v;return Object.entries(w).every(k=>{let[S,C]=k;return Array.isArray(C)?C.includes({...l,...c}[S]):{...l,...c}[S]===C})?[...m,y,x]:m},[]);return Iy(e,u,h,n==null?void 0:n.class,n==null?void 0:n.className)},rE=n0("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),He=b.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...o},l)=>{const u=i?Yj:"button";return f.jsx(u,{className:pt(rE({variant:t,size:n,className:e})),ref:l,...o})});He.displayName="Button";const sE=n0("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800",warning:"border-transparent bg-yellow-100 text-yellow-800"}},defaultVariants:{variant:"default"}});function ut({className:e,variant:t,...n}){return f.jsx("div",{className:pt(sE({variant:t}),e),...n})}const iE="/api";async function Ye(e,t){const n=await fetch(`${iE}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const i=await n.json().catch(()=>({message:n.statusText}));throw new Error(i.message??`Request failed: ${n.status}`)}return n.json()}const lt={servers:{list:()=>Ye("/servers"),get:e=>Ye(`/servers/${e}`),create:e=>Ye("/servers",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>Ye(`/servers/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>Ye(`/servers/${e}`,{method:"DELETE"}),test:e=>Ye(`/servers/${e}/test`,{method:"POST"})},collections:{list:()=>Ye("/collections"),get:e=>Ye(`/collections/${e}`),create:e=>Ye("/collections",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>Ye(`/collections/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>Ye(`/collections/${e}`,{method:"DELETE"}),validate:e=>Ye(`/collections/${e}/validate`,{method:"POST"})},runs:{list:e=>Ye(`/runs${e?`?limit=${e}`:""}`),get:e=>Ye(`/runs/${e}`),trigger:e=>Ye("/runs",{method:"POST",body:JSON.stringify(e)}),delete:e=>Ye(`/runs/${e}`,{method:"DELETE"})},inspect:{connect:e=>Ye("/inspect/connect",{method:"POST",body:JSON.stringify(e)}),tools:e=>Ye("/inspect/tools",{method:"POST",body:JSON.stringify({sessionId:e})}),call:(e,t,n)=>Ye("/inspect/call",{method:"POST",body:JSON.stringify({sessionId:e,tool:t,input:n})}),resources:e=>Ye("/inspect/resources",{method:"POST",body:JSON.stringify({sessionId:e})}),messages:(e,t)=>Ye("/inspect/messages",{method:"POST",body:JSON.stringify({sessionId:e,after:t})}),disconnect:e=>Ye("/inspect/disconnect",{method:"POST",body:JSON.stringify({sessionId:e})})},audit:{start:e=>Ye("/audit/start",{method:"POST",body:JSON.stringify(e)}),dryRun:e=>Ye("/audit/dry-run",{method:"POST",body:JSON.stringify(e)}),status:e=>Ye(`/audit/status/${e}`),result:e=>Ye(`/audit/result/${e}`),stop:e=>Ye(`/audit/stop/${e}`,{method:"POST"})},benchmark:{start:e=>Ye("/benchmark/start",{method:"POST",body:JSON.stringify(e)}),status:e=>Ye(`/benchmark/status/${e}`),result:e=>Ye(`/benchmark/result/${e}`),tools:e=>Ye(`/benchmark/tools/${e}`),stop:e=>Ye(`/benchmark/stop/${e}`,{method:"POST"})},docs:{generate:e=>Ye("/docs/generate",{method:"POST",body:JSON.stringify(e)})},score:{calculate:e=>Ye("/score/calculate",{method:"POST",body:JSON.stringify(e)}),badge:e=>Ye("/score/badge",{method:"POST",body:JSON.stringify({score:e})})}};function Qu(){return Vu({queryKey:["servers"],queryFn:()=>lt.servers.list()})}function oE(){const e=xs();return ws({mutationFn:t=>lt.servers.create(t),onSuccess:()=>e.invalidateQueries({queryKey:["servers"]})})}function aE(){const e=xs();return ws({mutationFn:t=>lt.servers.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["servers"]})})}function lE(){return ws({mutationFn:e=>lt.servers.test(e)})}function Op(){return Vu({queryKey:["collections"],queryFn:()=>lt.collections.list()})}function cE(){const e=xs();return ws({mutationFn:t=>lt.collections.create(t),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function uE(){const e=xs();return ws({mutationFn:({id:t,data:n})=>lt.collections.update(t,n),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function dE(){const e=xs();return ws({mutationFn:t=>lt.collections.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function fE(){return ws({mutationFn:e=>lt.collections.validate(e)})}function r0(e){return Vu({queryKey:["runs",e],queryFn:()=>lt.runs.list(e),refetchInterval:5e3})}function hE(e){return Vu({queryKey:["runs",e],queryFn:()=>lt.runs.get(e),enabled:!!e,refetchInterval:t=>{var i,o;return((o=(i=t.state.data)==null?void 0:i.data)==null?void 0:o.status)==="running"?2e3:!1}})}function s0(){const e=xs();return ws({mutationFn:t=>lt.runs.trigger(t),onSuccess:()=>e.invalidateQueries({queryKey:["runs"]})})}function pE(){const e=xs();return ws({mutationFn:t=>lt.runs.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["runs"]})})}function mE({status:e}){switch(e){case"completed":return f.jsxs(ut,{variant:"success",children:[f.jsx(Ol,{className:"mr-1 h-3 w-3"}),"Completed"]});case"failed":return f.jsxs(ut,{variant:"destructive",children:[f.jsx(ha,{className:"mr-1 h-3 w-3"}),"Failed"]});case"running":return f.jsxs(ut,{variant:"warning",children:[f.jsx(Pp,{className:"mr-1 h-3 w-3"}),"Running"]});default:return f.jsx(ut,{variant:"secondary",children:e})}}function gE(){var i,o,l,u,c;const e=Qu(),t=Op(),n=r0(5);return f.jsxs("div",{className:"space-y-6",children:[f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),f.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[f.jsxs(it,{children:[f.jsxs(Rt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[f.jsx(Pt,{className:"text-sm font-medium",children:"Servers"}),f.jsx(Ww,{className:"h-4 w-4 text-muted-foreground"})]}),f.jsx(ot,{children:f.jsx("div",{className:"text-2xl font-bold",children:((i=e.data)==null?void 0:i.total)??0})})]}),f.jsxs(it,{children:[f.jsxs(Rt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[f.jsx(Pt,{className:"text-sm font-medium",children:"Collections"}),f.jsx(Bw,{className:"h-4 w-4 text-muted-foreground"})]}),f.jsx(ot,{children:f.jsx("div",{className:"text-2xl font-bold",children:((o=t.data)==null?void 0:o.total)??0})})]}),f.jsxs(it,{children:[f.jsxs(Rt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[f.jsx(Pt,{className:"text-sm font-medium",children:"Test Runs"}),f.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),f.jsx(ot,{children:f.jsx("div",{className:"text-2xl font-bold",children:((l=n.data)==null?void 0:l.total)??0})})]})]}),f.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{className:"text-lg",children:"Quick Actions"})}),f.jsxs(ot,{className:"flex flex-wrap gap-2",children:[f.jsx(He,{size:"sm",onClick:()=>hs.navigate({to:"/servers"}),children:"Add Server"}),f.jsx(He,{size:"sm",variant:"outline",onClick:()=>hs.navigate({to:"/collections"}),children:"New Collection"}),f.jsx(He,{size:"sm",variant:"outline",onClick:()=>hs.navigate({to:"/inspect"}),children:"Inspect Server"})]})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{className:"text-lg",children:"Recent Runs"})}),f.jsx(ot,{children:((u=n.data)==null?void 0:u.data.length)===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No test runs yet"}):f.jsx("div",{className:"space-y-2",children:(c=n.data)==null?void 0:c.data.map(h=>f.jsxs("div",{className:"flex items-center justify-between rounded-md border p-2 cursor-pointer hover:bg-muted/50",onClick:()=>hs.navigate({to:"/runs/$runId",params:{runId:h.id}}),children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:h.collectionName}),f.jsx("p",{className:"text-xs text-muted-foreground",children:h.duration?`${h.duration}ms`:"In progress..."})]}),f.jsx(mE,{status:h.status})]},h.id))})})]})]})]})}const Zu=b.forwardRef(({className:e,...t},n)=>f.jsx("div",{className:"relative w-full overflow-auto",children:f.jsx("table",{ref:n,className:pt("w-full caption-bottom text-sm",e),...t})}));Zu.displayName="Table";const qu=b.forwardRef(({className:e,...t},n)=>f.jsx("thead",{ref:n,className:pt("[&_tr]:border-b",e),...t}));qu.displayName="TableHeader";const Gu=b.forwardRef(({className:e,...t},n)=>f.jsx("tbody",{ref:n,className:pt("[&_tr:last-child]:border-0",e),...t}));Gu.displayName="TableBody";const no=b.forwardRef(({className:e,...t},n)=>f.jsx("tr",{ref:n,className:pt("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));no.displayName="TableRow";const cn=b.forwardRef(({className:e,...t},n)=>f.jsx("th",{ref:n,className:pt("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));cn.displayName="TableHead";const un=b.forwardRef(({className:e,...t},n)=>f.jsx("td",{ref:n,className:pt("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));un.displayName="TableCell";function Je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vE(e,t){const n=b.createContext(t),i=l=>{const{children:u,...c}=l,h=b.useMemo(()=>c,Object.values(c));return f.jsx(n.Provider,{value:h,children:u})};i.displayName=e+"Provider";function o(l){const u=b.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,o]}function ma(e,t=[]){let n=[];function i(l,u){const c=b.createContext(u),h=n.length;n=[...n,u];const m=y=>{var P;const{scope:x,children:w,...k}=y,S=((P=x==null?void 0:x[e])==null?void 0:P[h])||c,C=b.useMemo(()=>k,Object.values(k));return f.jsx(S.Provider,{value:C,children:w})};m.displayName=l+"Provider";function v(y,x){var S;const w=((S=x==null?void 0:x[e])==null?void 0:S[h])||c,k=b.useContext(w);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[m,v]}const o=()=>{const l=n.map(u=>b.createContext(u));return function(c){const h=(c==null?void 0:c[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...c,[e]:h}}),[c,h])}};return o.scopeName=e,[i,yE(o,...t)]}function yE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=i.reduce((c,{useScope:h,scopeName:m})=>{const y=h(l)[`__scope${m}`];return{...c,...y}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var dn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},xE=fp[" useId ".trim().toString()]||(()=>{}),wE=0;function di(e){const[t,n]=b.useState(xE());return dn(()=>{n(i=>i??String(wE++))},[e]),t?`radix-${t}`:""}var SE=fp[" useInsertionEffect ".trim().toString()]||dn;function vl({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[o,l,u]=bE({defaultProp:t,onChange:n}),c=e!==void 0,h=c?e:o;{const v=b.useRef(e!==void 0);b.useEffect(()=>{const y=v.current;y!==c&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=c},[c,i])}const m=b.useCallback(v=>{var y;if(c){const x=CE(v)?v(e):v;x!==e&&((y=u.current)==null||y.call(u,x))}else l(v)},[c,e,l,u]);return[h,m]}function bE({defaultProp:e,onChange:t}){const[n,i]=b.useState(e),o=b.useRef(n),l=b.useRef(t);return SE(()=>{l.current=t},[t]),b.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,i,l]}function CE(e){return typeof e=="function"}function yl(e){const t=_E(e),n=b.forwardRef((i,o)=>{const{children:l,...u}=i,c=b.Children.toArray(l),h=c.find(jE);if(h){const m=h.props.children,v=c.map(y=>y===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:y);return f.jsx(t,{...u,ref:o,children:b.isValidElement(m)?b.cloneElement(m,void 0,v):null})}return f.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function _E(e){const t=b.forwardRef((n,i)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const u=RE(o),c=EE(l,o.props);return o.type!==b.Fragment&&(c.ref=i?Tp(i,u):u),b.cloneElement(o,c)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kE=Symbol("radix.slottable");function jE(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kE}function EE(e,t){const n={...t};for(const i in t){const o=e[i],l=t[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...c)=>{const h=l(...c);return o(...c),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function RE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ct=PE.reduce((e,t)=>{const n=yl(`Primitive.${t}`),i=b.forwardRef((o,l)=>{const{asChild:u,...c}=o,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(h,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function NE(e,t){e&&fa.flushSync(()=>e.dispatchEvent(t))}function pi(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function TE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e);b.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var OE="DismissableLayer",Kh="dismissableLayer.update",AE="dismissableLayer.pointerDownOutside",IE="dismissableLayer.focusOutside",My,i0=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ap=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:c,...h}=e,m=b.useContext(i0),[v,y]=b.useState(null),x=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=b.useState({}),k=It(t,O=>y(O)),S=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(C),_=v?S.indexOf(v):-1,E=m.layersWithOutsidePointerEventsDisabled.size>0,R=_>=P,N=FE(O=>{const F=O.target,L=[...m.branches].some(I=>I.contains(F));!R||L||(o==null||o(O),u==null||u(O),O.defaultPrevented||c==null||c())},x),T=DE(O=>{const F=O.target;[...m.branches].some(I=>I.contains(F))||(l==null||l(O),u==null||u(O),O.defaultPrevented||c==null||c())},x);return TE(O=>{_===m.layers.size-1&&(i==null||i(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},x),b.useEffect(()=>{if(v)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(My=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),Ly(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=My)}},[v,x,n,m]),b.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),Ly())},[v,m]),b.useEffect(()=>{const O=()=>w({});return document.addEventListener(Kh,O),()=>document.removeEventListener(Kh,O)},[]),f.jsx(ct.div,{...h,ref:k,style:{pointerEvents:E?R?"auto":"none":void 0,...e.style},onFocusCapture:Je(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Je(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Je(e.onPointerDownCapture,N.onPointerDownCapture)})});Ap.displayName=OE;var ME="DismissableLayerBranch",LE=b.forwardRef((e,t)=>{const n=b.useContext(i0),i=b.useRef(null),o=It(t,i);return b.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),f.jsx(ct.div,{...e,ref:o})});LE.displayName=ME;function FE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e),i=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const l=c=>{if(c.target&&!i.current){let h=function(){o0(AE,n,m,{discrete:!0})};const m={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function DE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e),i=b.useRef(!1);return b.useEffect(()=>{const o=l=>{l.target&&!i.current&&o0(IE,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Ly(){const e=new CustomEvent(Kh);document.dispatchEvent(e)}function o0(e,t,n,{discrete:i}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?NE(o,l):o.dispatchEvent(l)}var dh="focusScope.autoFocusOnMount",fh="focusScope.autoFocusOnUnmount",Fy={bubbles:!1,cancelable:!0},zE="FocusScope",Ip=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=e,[c,h]=b.useState(null),m=pi(o),v=pi(l),y=b.useRef(null),x=It(t,S=>h(S)),w=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let S=function(E){if(w.paused||!c)return;const R=E.target;c.contains(R)?y.current=R:Qs(y.current,{select:!0})},C=function(E){if(w.paused||!c)return;const R=E.relatedTarget;R!==null&&(c.contains(R)||Qs(y.current,{select:!0}))},P=function(E){if(document.activeElement===document.body)for(const N of E)N.removedNodes.length>0&&Qs(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const _=new MutationObserver(P);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),_.disconnect()}}},[i,c,w.paused]),b.useEffect(()=>{if(c){zy.add(w);const S=document.activeElement;if(!c.contains(S)){const P=new CustomEvent(dh,Fy);c.addEventListener(dh,m),c.dispatchEvent(P),P.defaultPrevented||(VE(HE(a0(c)),{select:!0}),document.activeElement===S&&Qs(c))}return()=>{c.removeEventListener(dh,m),setTimeout(()=>{const P=new CustomEvent(fh,Fy);c.addEventListener(fh,v),c.dispatchEvent(P),P.defaultPrevented||Qs(S??document.body,{select:!0}),c.removeEventListener(fh,v),zy.remove(w)},0)}}},[c,m,v,w]);const k=b.useCallback(S=>{if(!n&&!i||w.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(C&&P){const _=S.currentTarget,[E,R]=$E(_);E&&R?!S.shiftKey&&P===R?(S.preventDefault(),n&&Qs(E,{select:!0})):S.shiftKey&&P===E&&(S.preventDefault(),n&&Qs(R,{select:!0})):P===_&&S.preventDefault()}},[n,i,w.paused]);return f.jsx(ct.div,{tabIndex:-1,...u,ref:x,onKeyDown:k})});Ip.displayName=zE;function VE(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Qs(i,{select:t}),document.activeElement!==n)return}function $E(e){const t=a0(e),n=Dy(t,e),i=Dy(t.reverse(),e);return[n,i]}function a0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dy(e,t){for(const n of e)if(!BE(n,{upTo:t}))return n}function BE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function UE(e){return e instanceof HTMLInputElement&&"select"in e}function Qs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&UE(e)&&t&&e.select()}}var zy=WE();function WE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Vy(e,t),e.unshift(t)},remove(t){var n;e=Vy(e,t),(n=e[0])==null||n.resume()}}}function Vy(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function HE(e){return e.filter(t=>t.tagName!=="A")}var KE="Portal",Mp=b.forwardRef((e,t)=>{var c;const{container:n,...i}=e,[o,l]=b.useState(!1);dn(()=>l(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?yk.createPortal(f.jsx(ct.div,{...i,ref:t}),u):null});Mp.displayName=KE;function QE(e,t){return b.useReducer((n,i)=>t[n][i]??n,e)}var Il=e=>{const{present:t,children:n}=e,i=ZE(t),o=typeof n=="function"?n({present:i.isPresent}):b.Children.only(n),l=It(i.ref,qE(o));return typeof n=="function"||i.isPresent?b.cloneElement(o,{ref:l}):null};Il.displayName="Presence";function ZE(e){const[t,n]=b.useState(),i=b.useRef(null),o=b.useRef(e),l=b.useRef("none"),u=e?"mounted":"unmounted",[c,h]=QE(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const m=Gc(i.current);l.current=c==="mounted"?m:"none"},[c]),dn(()=>{const m=i.current,v=o.current;if(v!==e){const x=l.current,w=Gc(m);e?h("MOUNT"):w==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(v&&x!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),dn(()=>{if(t){let m;const v=t.ownerDocument.defaultView??window,y=w=>{const S=Gc(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&S&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",m=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=w=>{w.target===t&&(l.current=Gc(i.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{v.clearTimeout(m),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(m=>{i.current=m?getComputedStyle(m):null,n(m)},[])}}function Gc(e){return(e==null?void 0:e.animationName)||"none"}function qE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hh=0;function l0(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$y()),document.body.insertAdjacentElement("beforeend",e[1]??$y()),hh++,()=>{hh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hh--}},[])}function $y(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Fr=function(){return Fr=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Fr.apply(this,arguments)};function c0(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function GE(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,l;i<o;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var lu="right-scroll-bar-position",cu="width-before-scroll-bar",YE="with-scroll-bars-hidden",XE="--removed-body-scroll-bar-size";function ph(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function JE(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=t,n.facade}var eR=typeof window<"u"?b.useLayoutEffect:b.useEffect,By=new WeakMap;function tR(e,t){var n=JE(null,function(i){return e.forEach(function(o){return ph(o,i)})});return eR(function(){var i=By.get(n);if(i){var o=new Set(i),l=new Set(e),u=n.current;o.forEach(function(c){l.has(c)||ph(c,null)}),l.forEach(function(c){o.has(c)||ph(c,u)})}By.set(n,e)},[e]),n}function nR(e){return e}function rR(e,t){t===void 0&&(t=nR);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,i);return n.push(u),function(){n=n.filter(function(c){return c!==u})}},assignSyncMedium:function(l){for(i=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var u=[];if(n.length){var c=n;n=[],c.forEach(l),u=n}var h=function(){var v=u;u=[],v.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(v){u.push(v),m()},filter:function(v){return u=u.filter(v),n}}}};return o}function sR(e){e===void 0&&(e={});var t=rR(null);return t.options=Fr({async:!0,ssr:!1},e),t}var u0=function(e){var t=e.sideCar,n=c0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,Fr({},n))};u0.isSideCarExport=!0;function iR(e,t){return e.useMedium(t),u0}var d0=sR(),mh=function(){},Yu=b.forwardRef(function(e,t){var n=b.useRef(null),i=b.useState({onScrollCapture:mh,onWheelCapture:mh,onTouchMoveCapture:mh}),o=i[0],l=i[1],u=e.forwardProps,c=e.children,h=e.className,m=e.removeScrollBar,v=e.enabled,y=e.shards,x=e.sideCar,w=e.noRelative,k=e.noIsolation,S=e.inert,C=e.allowPinchZoom,P=e.as,_=P===void 0?"div":P,E=e.gapMode,R=c0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=x,T=tR([n,t]),O=Fr(Fr({},R),o);return b.createElement(b.Fragment,null,v&&b.createElement(N,{sideCar:d0,removeScrollBar:m,shards:y,noRelative:w,noIsolation:k,inert:S,setCallbacks:l,allowPinchZoom:!!C,lockRef:n,gapMode:E}),u?b.cloneElement(b.Children.only(c),Fr(Fr({},O),{ref:T})):b.createElement(_,Fr({},O,{className:h,ref:T}),c))});Yu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yu.classNames={fullWidth:cu,zeroRight:lu};var oR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oR();return t&&e.setAttribute("nonce",t),e}function lR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aR())&&(lR(t,n),cR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dR=function(){var e=uR();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},f0=function(){var e=dR(),t=function(n){var i=n.styles,o=n.dynamic;return e(i,o),null};return t},fR={left:0,top:0,right:0,gap:0},gh=function(e){return parseInt(e||"",10)||0},hR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gh(n),gh(i),gh(o)]},pR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fR;var t=hR(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},mR=f0(),Uo="data-scroll-locked",gR=function(e,t,n,i){var o=e.left,l=e.top,u=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
257
|
+
.`.concat(YE,` {
|
|
258
|
+
overflow: hidden `).concat(i,`;
|
|
259
|
+
padding-right: `).concat(c,"px ").concat(i,`;
|
|
260
|
+
}
|
|
261
|
+
body[`).concat(Uo,`] {
|
|
262
|
+
overflow: hidden `).concat(i,`;
|
|
263
|
+
overscroll-behavior: contain;
|
|
264
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
265
|
+
padding-left: `.concat(o,`px;
|
|
266
|
+
padding-top: `).concat(l,`px;
|
|
267
|
+
padding-right: `).concat(u,`px;
|
|
268
|
+
margin-left:0;
|
|
269
|
+
margin-top:0;
|
|
270
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
271
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.`).concat(lu,` {
|
|
275
|
+
right: `).concat(c,"px ").concat(i,`;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.`).concat(cu,` {
|
|
279
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.`).concat(lu," .").concat(lu,` {
|
|
283
|
+
right: 0 `).concat(i,`;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.`).concat(cu," .").concat(cu,` {
|
|
287
|
+
margin-right: 0 `).concat(i,`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
body[`).concat(Uo,`] {
|
|
291
|
+
`).concat(XE,": ").concat(c,`px;
|
|
292
|
+
}
|
|
293
|
+
`)},Uy=function(){var e=parseInt(document.body.getAttribute(Uo)||"0",10);return isFinite(e)?e:0},vR=function(){b.useEffect(function(){return document.body.setAttribute(Uo,(Uy()+1).toString()),function(){var e=Uy()-1;e<=0?document.body.removeAttribute(Uo):document.body.setAttribute(Uo,e.toString())}},[])},yR=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;vR();var l=b.useMemo(function(){return pR(o)},[o]);return b.createElement(mR,{styles:gR(l,!t,o,n?"":"!important")})},Qh=!1;if(typeof window<"u")try{var Yc=Object.defineProperty({},"passive",{get:function(){return Qh=!0,!0}});window.addEventListener("test",Yc,Yc),window.removeEventListener("test",Yc,Yc)}catch{Qh=!1}var Ao=Qh?{passive:!1}:!1,xR=function(e){return e.tagName==="TEXTAREA"},h0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xR(e)&&n[t]==="visible")},wR=function(e){return h0(e,"overflowY")},SR=function(e){return h0(e,"overflowX")},Wy=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=p0(e,i);if(o){var l=m0(e,i),u=l[1],c=l[2];if(u>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},bR=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},CR=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},p0=function(e,t){return e==="v"?wR(t):SR(t)},m0=function(e,t){return e==="v"?bR(t):CR(t)},_R=function(e,t){return e==="h"&&t==="rtl"?-1:1},kR=function(e,t,n,i,o){var l=_R(e,window.getComputedStyle(t).direction),u=l*i,c=n.target,h=t.contains(c),m=!1,v=u>0,y=0,x=0;do{if(!c)break;var w=m0(e,c),k=w[0],S=w[1],C=w[2],P=S-C-l*k;(k||P)&&p0(e,c)&&(y+=P,x+=k);var _=c.parentNode;c=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!h&&c!==document.body||h&&(t.contains(c)||t===c));return(v&&Math.abs(y)<1||!v&&Math.abs(x)<1)&&(m=!0),m},Xc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hy=function(e){return[e.deltaX,e.deltaY]},Ky=function(e){return e&&"current"in e?e.current:e},jR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ER=function(e){return`
|
|
294
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
295
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
296
|
+
`)},RR=0,Io=[];function PR(e){var t=b.useRef([]),n=b.useRef([0,0]),i=b.useRef(),o=b.useState(RR++)[0],l=b.useState(f0)[0],u=b.useRef(e);b.useEffect(function(){u.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var S=GE([e.lockRef.current],(e.shards||[]).map(Ky),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=b.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!u.current.allowPinchZoom;var P=Xc(S),_=n.current,E="deltaX"in S?S.deltaX:_[0]-P[0],R="deltaY"in S?S.deltaY:_[1]-P[1],N,T=S.target,O=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in S&&O==="h"&&T.type==="range")return!1;var F=window.getSelection(),L=F&&F.anchorNode,I=L?L===T||L.contains(T):!1;if(I)return!1;var Q=Wy(O,T);if(!Q)return!0;if(Q?N=O:(N=O==="v"?"h":"v",Q=Wy(O,T)),!Q)return!1;if(!i.current&&"changedTouches"in S&&(E||R)&&(i.current=N),!N)return!0;var U=i.current||N;return kR(U,C,S,U==="h"?E:R)},[]),h=b.useCallback(function(S){var C=S;if(!(!Io.length||Io[Io.length-1]!==l)){var P="deltaY"in C?Hy(C):Xc(C),_=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&jR(N.delta,P)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var E=(u.current.shards||[]).map(Ky).filter(Boolean).filter(function(N){return N.contains(C.target)}),R=E.length>0?c(C,E[0]):!u.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),m=b.useCallback(function(S,C,P,_){var E={name:S,delta:C,target:P,should:_,shadowParent:NR(P)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(R){return R!==E})},1)},[]),v=b.useCallback(function(S){n.current=Xc(S),i.current=void 0},[]),y=b.useCallback(function(S){m(S.type,Hy(S),S.target,c(S,e.lockRef.current))},[]),x=b.useCallback(function(S){m(S.type,Xc(S),S.target,c(S,e.lockRef.current))},[]);b.useEffect(function(){return Io.push(l),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",h,Ao),document.addEventListener("touchmove",h,Ao),document.addEventListener("touchstart",v,Ao),function(){Io=Io.filter(function(S){return S!==l}),document.removeEventListener("wheel",h,Ao),document.removeEventListener("touchmove",h,Ao),document.removeEventListener("touchstart",v,Ao)}},[]);var w=e.removeScrollBar,k=e.inert;return b.createElement(b.Fragment,null,k?b.createElement(l,{styles:ER(o)}):null,w?b.createElement(yR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const TR=iR(d0,PR);var Lp=b.forwardRef(function(e,t){return b.createElement(Yu,Fr({},e,{ref:t,sideCar:TR}))});Lp.classNames=Yu.classNames;var OR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mo=new WeakMap,Jc=new WeakMap,eu={},vh=0,g0=function(e){return e&&(e.host||g0(e.parentNode))},AR=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=g0(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},IR=function(e,t,n,i){var o=AR(t,Array.isArray(e)?e:[e]);eu[n]||(eu[n]=new WeakMap);var l=eu[n],u=[],c=new Set,h=new Set(o),m=function(y){!y||c.has(y)||(c.add(y),m(y.parentNode))};o.forEach(m);var v=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(x){if(c.has(x))v(x);else try{var w=x.getAttribute(i),k=w!==null&&w!=="false",S=(Mo.get(x)||0)+1,C=(l.get(x)||0)+1;Mo.set(x,S),l.set(x,C),u.push(x),S===1&&k&&Jc.set(x,!0),C===1&&x.setAttribute(n,"true"),k||x.setAttribute(i,"true")}catch(P){console.error("aria-hidden: cannot operate on ",x,P)}})};return v(t),c.clear(),vh++,function(){u.forEach(function(y){var x=Mo.get(y)-1,w=l.get(y)-1;Mo.set(y,x),l.set(y,w),x||(Jc.has(y)||y.removeAttribute(i),Jc.delete(y)),w||y.removeAttribute(n)}),vh--,vh||(Mo=new WeakMap,Mo=new WeakMap,Jc=new WeakMap,eu={})}},v0=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=OR(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),IR(i,o,n,"aria-hidden")):function(){return null}},Xu="Dialog",[y0]=ma(Xu),[MR,kr]=y0(Xu),x0=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,c=b.useRef(null),h=b.useRef(null),[m,v]=vl({prop:i,defaultProp:o??!1,onChange:l,caller:Xu});return f.jsx(MR,{scope:t,triggerRef:c,contentRef:h,contentId:di(),titleId:di(),descriptionId:di(),open:m,onOpenChange:v,onOpenToggle:b.useCallback(()=>v(y=>!y),[v]),modal:u,children:n})};x0.displayName=Xu;var w0="DialogTrigger",S0=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=kr(w0,n),l=It(t,o.triggerRef);return f.jsx(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zp(o.open),...i,ref:l,onClick:Je(e.onClick,o.onOpenToggle)})});S0.displayName=w0;var Fp="DialogPortal",[LR,b0]=y0(Fp,{forceMount:void 0}),C0=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:o}=e,l=kr(Fp,t);return f.jsx(LR,{scope:t,forceMount:n,children:b.Children.map(i,u=>f.jsx(Il,{present:n||l.open,children:f.jsx(Mp,{asChild:!0,container:o,children:u})}))})};C0.displayName=Fp;var Cu="DialogOverlay",_0=b.forwardRef((e,t)=>{const n=b0(Cu,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,l=kr(Cu,e.__scopeDialog);return l.modal?f.jsx(Il,{present:i||l.open,children:f.jsx(DR,{...o,ref:t})}):null});_0.displayName=Cu;var FR=yl("DialogOverlay.RemoveScroll"),DR=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=kr(Cu,n);return f.jsx(Lp,{as:FR,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(ct.div,{"data-state":zp(o.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),ro="DialogContent",k0=b.forwardRef((e,t)=>{const n=b0(ro,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,l=kr(ro,e.__scopeDialog);return f.jsx(Il,{present:i||l.open,children:l.modal?f.jsx(zR,{...o,ref:t}):f.jsx(VR,{...o,ref:t})})});k0.displayName=ro;var zR=b.forwardRef((e,t)=>{const n=kr(ro,e.__scopeDialog),i=b.useRef(null),o=It(t,n.contentRef,i);return b.useEffect(()=>{const l=i.current;if(l)return v0(l)},[]),f.jsx(j0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Je(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&l.preventDefault()}),onFocusOutside:Je(e.onFocusOutside,l=>l.preventDefault())})}),VR=b.forwardRef((e,t)=>{const n=kr(ro,e.__scopeDialog),i=b.useRef(!1),o=b.useRef(!1);return f.jsx(j0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,l),l.defaultPrevented||(i.current||(c=n.triggerRef.current)==null||c.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var h,m;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((m=n.triggerRef.current)==null?void 0:m.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),j0=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=e,c=kr(ro,n),h=b.useRef(null),m=It(t,h);return l0(),f.jsxs(f.Fragment,{children:[f.jsx(Ip,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:f.jsx(Ap,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":zp(c.open),...u,ref:m,onDismiss:()=>c.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx($R,{titleId:c.titleId}),f.jsx(UR,{contentRef:h,descriptionId:c.descriptionId})]})]})}),Dp="DialogTitle",E0=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=kr(Dp,n);return f.jsx(ct.h2,{id:o.titleId,...i,ref:t})});E0.displayName=Dp;var R0="DialogDescription",P0=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=kr(R0,n);return f.jsx(ct.p,{id:o.descriptionId,...i,ref:t})});P0.displayName=R0;var N0="DialogClose",T0=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=kr(N0,n);return f.jsx(ct.button,{type:"button",...i,ref:t,onClick:Je(e.onClick,()=>o.onOpenChange(!1))})});T0.displayName=N0;function zp(e){return e?"open":"closed"}var O0="DialogTitleWarning",[kA,A0]=vE(O0,{contentName:ro,titleName:Dp,docsSlug:"dialog"}),$R=({titleId:e})=>{const t=A0(O0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
297
|
+
|
|
298
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
299
|
+
|
|
300
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},BR="DialogDescriptionWarning",UR=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${A0(BR).contentName}}.`;return b.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},WR=x0,HR=S0,KR=C0,QR=_0,ZR=k0,qR=E0,GR=P0,YR=T0;const _u=WR,Vp=HR,XR=KR,I0=b.forwardRef(({className:e,...t},n)=>f.jsx(QR,{ref:n,className:pt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));I0.displayName="DialogOverlay";const xl=b.forwardRef(({className:e,children:t,...n},i)=>f.jsxs(XR,{children:[f.jsx(I0,{}),f.jsxs(ZR,{ref:i,className:pt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,f.jsxs(YR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[f.jsx(aj,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xl.displayName="DialogContent";const ku=({className:e,...t})=>f.jsx("div",{className:pt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),wl=b.forwardRef(({className:e,...t},n)=>f.jsx(qR,{ref:n,className:pt("text-lg font-semibold leading-none tracking-tight",e),...t}));wl.displayName="DialogTitle";const JR=b.forwardRef(({className:e,...t},n)=>f.jsx(GR,{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));JR.displayName="DialogDescription";var Ml=e=>e.type==="checkbox",Vi=e=>e instanceof Date,En=e=>e==null;const M0=e=>typeof e=="object";var Bt=e=>!En(e)&&!Array.isArray(e)&&M0(e)&&!Vi(e),eP=e=>Bt(e)&&e.target?Ml(e.target)?e.target.checked:e.target.value:e,tP=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,nP=(e,t)=>e.has(tP(t)),rP=e=>{const t=e.constructor&&e.constructor.prototype;return Bt(t)&&t.hasOwnProperty("isPrototypeOf")},$p=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ht(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if($p&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Bt(e)&&rP(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=Ht(e[o]));return i}var Ju=e=>/^\w*$/.test(e),Et=e=>e===void 0,Bp=e=>Array.isArray(e)?e.filter(Boolean):[],Up=e=>Bp(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{if(!t||!Bt(e))return n;const i=(Ju(t)?[t]:Up(t)).reduce((o,l)=>En(o)?o:o[l],e);return Et(i)||i===e?Et(e[t])?n:e[t]:i},Ar=e=>typeof e=="boolean",wr=e=>typeof e=="function",gt=(e,t,n)=>{let i=-1;const o=Ju(t)?[t]:Up(t),l=o.length,u=l-1;for(;++i<l;){const c=o[i];let h=n;if(i!==u){const m=e[c];h=Bt(m)||Array.isArray(m)?m:isNaN(+o[i+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=h,e=e[c]}};const Qy={BLUR:"blur",FOCUS_OUT:"focusout"},Sr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},rs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},sP=st.createContext(null);sP.displayName="HookFormControlContext";var iP=(e,t,n,i=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const u=l;return t._proxyFormState[u]!==Sr.all&&(t._proxyFormState[u]=!i||Sr.all),e[u]}});return o};const oP=typeof window<"u"?st.useLayoutEffect:st.useEffect;var zn=e=>typeof e=="string",aP=(e,t,n,i,o)=>zn(e)?(i&&t.watch.add(e),Ce(n,e,o)):Array.isArray(e)?e.map(l=>(i&&t.watch.add(l),Ce(n,l))):(i&&(t.watchAll=!0),n),Zh=e=>En(e)||!M0(e);function Gs(e,t,n=new WeakSet){if(Zh(e)||Zh(t))return Object.is(e,t);if(Vi(e)&&Vi(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of i){const u=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const c=t[l];if(Vi(u)&&Vi(c)||Bt(u)&&Bt(c)||Array.isArray(u)&&Array.isArray(c)?!Gs(u,c,n):!Object.is(u,c))return!1}}return!0}const lP=st.createContext(null);lP.displayName="HookFormContext";var L0=(e,t,n,i,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:o||!0}}:{},fl=e=>Array.isArray(e)?e:[e],Zy=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function F0(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const o=e[i],l=t[i];if(o&&Bt(o)&&l){const u=F0(o,l);Bt(u)&&(n[i]=u)}else e[i]&&(n[i]=l)}return n}var gn=e=>Bt(e)&&!Object.keys(e).length,Wp=e=>e.type==="file",ju=e=>{if(!$p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},D0=e=>e.type==="select-multiple",Hp=e=>e.type==="radio",cP=e=>Hp(e)||Ml(e),yh=e=>ju(e)&&e.isConnected;function uP(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=Et(e)?i++:e[t[i++]];return e}function dP(e){for(const t in e)if(e.hasOwnProperty(t)&&!Et(e[t]))return!1;return!0}function Vt(e,t){const n=Array.isArray(t)?t:Ju(t)?[t]:Up(t),i=n.length===1?e:uP(e,n),o=n.length-1,l=n[o];return i&&delete i[l],o!==0&&(Bt(i)&&gn(i)||Array.isArray(i)&&dP(i))&&Vt(e,n.slice(0,-1)),e}var fP=e=>{for(const t in e)if(wr(e[t]))return!0;return!1};function z0(e){return Array.isArray(e)||Bt(e)&&!fP(e)}function qh(e,t={}){for(const n in e){const i=e[n];z0(i)?(t[n]=Array.isArray(i)?[]:{},qh(i,t[n])):Et(i)||(t[n]=!0)}return t}function Do(e,t,n){n||(n=qh(t));for(const i in e){const o=e[i];if(z0(o))Et(t)||Zh(n[i])?n[i]=qh(o,Array.isArray(o)?[]:{}):Do(o,En(t)?{}:t[i],n[i]);else{const l=t[i];n[i]=!Gs(o,l)}}return n}const qy={value:!1,isValid:!1},Gy={value:!0,isValid:!0};var V0=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Et(e[0].attributes.value)?Et(e[0].value)||e[0].value===""?Gy:{value:e[0].value,isValid:!0}:Gy:qy}return qy},$0=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>Et(e)?e:t?e===""?NaN:e&&+e:n&&zn(e)?new Date(e):i?i(e):e;const Yy={isValid:!1,value:null};var B0=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Yy):Yy;function Xy(e){const t=e.ref;return Wp(t)?t.files:Hp(t)?B0(e.refs).value:D0(t)?[...t.selectedOptions].map(({value:n})=>n):Ml(t)?V0(e.refs).value:$0(Et(t.value)?e.ref.value:t.value,e)}var hP=(e,t,n,i)=>{const o={};for(const l of e){const u=Ce(t,l);u&>(o,l,u._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:i}},Eu=e=>e instanceof RegExp,ol=e=>Et(e)?e:Eu(e)?e.source:Bt(e)?Eu(e.value)?e.value.source:e.value:e,Jy=e=>({isOnSubmit:!e||e===Sr.onSubmit,isOnBlur:e===Sr.onBlur,isOnChange:e===Sr.onChange,isOnAll:e===Sr.all,isOnTouch:e===Sr.onTouched});const ex="AsyncFunction";var pP=e=>!!e&&!!e.validate&&!!(wr(e.validate)&&e.validate.constructor.name===ex||Bt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ex)),mP=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),tx=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const hl=(e,t,n,i)=>{for(const o of n||Object.keys(e)){const l=Ce(e,o);if(l){const{_f:u,...c}=l;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o)&&!i)return!0;if(u.ref&&t(u.ref,u.name)&&!i)return!0;if(hl(c,t))break}else if(Bt(c)&&hl(c,t))break}}};function nx(e,t,n){const i=Ce(e,n);if(i||Ju(n))return{error:i,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),u=Ce(t,l),c=Ce(e,l);if(u&&!Array.isArray(u)&&n!==l)return{name:n};if(c&&c.type)return{name:l,error:c};if(c&&c.root&&c.root.type)return{name:`${l}.root`,error:c.root};o.pop()}return{name:n}}var gP=(e,t,n,i)=>{n(e);const{name:o,...l}=e;return gn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(u=>t[u]===(!i||Sr.all))},vP=(e,t,n)=>!e||!t||e===t||fl(e).some(i=>i&&(n?i===t:i.startsWith(t)||t.startsWith(i))),yP=(e,t,n,i,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?i.isOnBlur:o.isOnBlur)?!e:(n?i.isOnChange:o.isOnChange)?e:!0,xP=(e,t)=>!Bp(Ce(e,t)).length&&Vt(e,t),wP=(e,t,n)=>{const i=fl(Ce(e,n));return gt(i,"root",t[n]),gt(e,n,i),e};function rx(e,t,n="validate"){if(zn(e)||Array.isArray(e)&&e.every(zn)||Ar(e)&&!e)return{type:n,message:zn(e)?e:"",ref:t}}var Lo=e=>Bt(e)&&!Eu(e)?e:{value:e,message:""},sx=async(e,t,n,i,o,l)=>{const{ref:u,refs:c,required:h,maxLength:m,minLength:v,min:y,max:x,pattern:w,validate:k,name:S,valueAsNumber:C,mount:P}=e._f,_=Ce(n,S);if(!P||t.has(S))return{};const E=c?c[0]:u,R=U=>{o&&E.reportValidity&&(E.setCustomValidity(Ar(U)?"":U||""),E.reportValidity())},N={},T=Hp(u),O=Ml(u),F=T||O,L=(C||Wp(u))&&Et(u.value)&&Et(_)||ju(u)&&u.value===""||_===""||Array.isArray(_)&&!_.length,I=L0.bind(null,S,i,N),Q=(U,ee,te,ie=rs.maxLength,X=rs.minLength)=>{const oe=U?ee:te;N[S]={type:U?ie:X,message:oe,ref:u,...I(U?ie:X,oe)}};if(l?!Array.isArray(_)||!_.length:h&&(!F&&(L||En(_))||Ar(_)&&!_||O&&!V0(c).isValid||T&&!B0(c).isValid)){const{value:U,message:ee}=zn(h)?{value:!!h,message:h}:Lo(h);if(U&&(N[S]={type:rs.required,message:ee,ref:E,...I(rs.required,ee)},!i))return R(ee),N}if(!L&&(!En(y)||!En(x))){let U,ee;const te=Lo(x),ie=Lo(y);if(!En(_)&&!isNaN(_)){const X=u.valueAsNumber||_&&+_;En(te.value)||(U=X>te.value),En(ie.value)||(ee=X<ie.value)}else{const X=u.valueAsDate||new Date(_),oe=Z=>new Date(new Date().toDateString()+" "+Z),B=u.type=="time",J=u.type=="week";zn(te.value)&&_&&(U=B?oe(_)>oe(te.value):J?_>te.value:X>new Date(te.value)),zn(ie.value)&&_&&(ee=B?oe(_)<oe(ie.value):J?_<ie.value:X<new Date(ie.value))}if((U||ee)&&(Q(!!U,te.message,ie.message,rs.max,rs.min),!i))return R(N[S].message),N}if((m||v)&&!L&&(zn(_)||l&&Array.isArray(_))){const U=Lo(m),ee=Lo(v),te=!En(U.value)&&_.length>+U.value,ie=!En(ee.value)&&_.length<+ee.value;if((te||ie)&&(Q(te,U.message,ee.message),!i))return R(N[S].message),N}if(w&&!L&&zn(_)){const{value:U,message:ee}=Lo(w);if(Eu(U)&&!_.match(U)&&(N[S]={type:rs.pattern,message:ee,ref:u,...I(rs.pattern,ee)},!i))return R(ee),N}if(k){if(wr(k)){const U=await k(_,n),ee=rx(U,E);if(ee&&(N[S]={...ee,...I(rs.validate,ee.message)},!i))return R(ee.message),N}else if(Bt(k)){let U={};for(const ee in k){if(!gn(U)&&!i)break;const te=rx(await k[ee](_,n),E,ee);te&&(U={...te,...I(ee,te.message)},R(te.message),i&&(N[S]=U))}if(!gn(U)&&(N[S]={ref:E,...U},!i))return N}}return R(!0),N};const SP={mode:Sr.onSubmit,reValidateMode:Sr.onChange,shouldFocusError:!0};function bP(e={}){let t={...SP,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},o=Bt(t.defaultValues)||Bt(t.values)?Ht(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:Ht(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},h,m=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},y={...v};let x={...y};const w={array:Zy(),state:Zy()},k=t.criteriaMode===Sr.all,S=z=>H=>{clearTimeout(m),m=setTimeout(z,H)},C=async z=>{if(!u.keepIsValid&&!t.disabled&&(y.isValid||x.isValid||z)){let H;t.resolver?(H=gn((await F()).errors),P()):H=await I(i,!0),H!==n.isValid&&w.state.next({isValid:H})}},P=(z,H)=>{!t.disabled&&(y.isValidating||y.validatingFields||x.isValidating||x.validatingFields)&&((z||Array.from(c.mount)).forEach(Y=>{Y&&(H?gt(n.validatingFields,Y,H):Vt(n.validatingFields,Y))}),w.state.next({validatingFields:n.validatingFields,isValidating:!gn(n.validatingFields)}))},_=(z,H=[],Y,me,ue=!0,re=!0)=>{if(me&&Y&&!t.disabled){if(u.action=!0,re&&Array.isArray(Ce(i,z))){const pe=Y(Ce(i,z),me.argA,me.argB);ue&>(i,z,pe)}if(re&&Array.isArray(Ce(n.errors,z))){const pe=Y(Ce(n.errors,z),me.argA,me.argB);ue&>(n.errors,z,pe),xP(n.errors,z)}if((y.touchedFields||x.touchedFields)&&re&&Array.isArray(Ce(n.touchedFields,z))){const pe=Y(Ce(n.touchedFields,z),me.argA,me.argB);ue&>(n.touchedFields,z,pe)}(y.dirtyFields||x.dirtyFields)&&(n.dirtyFields=Do(o,l)),w.state.next({name:z,isDirty:U(z,H),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(l,z,H)},E=(z,H)=>{gt(n.errors,z,H),w.state.next({errors:n.errors})},R=z=>{n.errors=z,w.state.next({errors:n.errors,isValid:!1})},N=(z,H,Y,me)=>{const ue=Ce(i,z);if(ue){const re=Ce(l,z,Et(Y)?Ce(o,z):Y);Et(re)||me&&me.defaultChecked||H?gt(l,z,H?re:Xy(ue._f)):ie(z,re),u.mount&&!u.action&&C()}},T=(z,H,Y,me,ue)=>{let re=!1,pe=!1;const Me={name:z};if(!t.disabled){if(!Y||me){(y.isDirty||x.isDirty)&&(pe=n.isDirty,n.isDirty=Me.isDirty=U(),re=pe!==Me.isDirty);const $e=Gs(Ce(o,z),H);pe=!!Ce(n.dirtyFields,z),$e?Vt(n.dirtyFields,z):gt(n.dirtyFields,z,!0),Me.dirtyFields=n.dirtyFields,re=re||(y.dirtyFields||x.dirtyFields)&&pe!==!$e}if(Y){const $e=Ce(n.touchedFields,z);$e||(gt(n.touchedFields,z,Y),Me.touchedFields=n.touchedFields,re=re||(y.touchedFields||x.touchedFields)&&$e!==Y)}re&&ue&&w.state.next(Me)}return re?Me:{}},O=(z,H,Y,me)=>{const ue=Ce(n.errors,z),re=(y.isValid||x.isValid)&&Ar(H)&&n.isValid!==H;if(t.delayError&&Y?(h=S(()=>E(z,Y)),h(t.delayError)):(clearTimeout(m),h=null,Y?gt(n.errors,z,Y):Vt(n.errors,z)),(Y?!Gs(ue,Y):ue)||!gn(me)||re){const pe={...me,...re&&Ar(H)?{isValid:H}:{},errors:n.errors,name:z};n={...n,...pe},w.state.next(pe)}},F=async z=>(P(z,!0),await t.resolver(l,t.context,hP(z||c.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),L=async z=>{const{errors:H}=await F(z);if(P(z),z)for(const Y of z){const me=Ce(H,Y);me?gt(n.errors,Y,me):Vt(n.errors,Y)}else n.errors=H;return H},I=async(z,H,Y={valid:!0})=>{for(const me in z){const ue=z[me];if(ue){const{_f:re,...pe}=ue;if(re){const Me=c.array.has(re.name),$e=ue._f&&pP(ue._f);$e&&y.validatingFields&&P([re.name],!0);const _t=await sx(ue,c.disabled,l,k,t.shouldUseNativeValidation&&!H,Me);if($e&&y.validatingFields&&P([re.name]),_t[re.name]&&(Y.valid=!1,H||e.shouldUseNativeValidation))break;!H&&(Ce(_t,re.name)?Me?wP(n.errors,_t,re.name):gt(n.errors,re.name,_t[re.name]):Vt(n.errors,re.name))}!gn(pe)&&await I(pe,H,Y)}}return Y.valid},Q=()=>{for(const z of c.unMount){const H=Ce(i,z);H&&(H._f.refs?H._f.refs.every(Y=>!yh(Y)):!yh(H._f.ref))&&ve(z)}c.unMount=new Set},U=(z,H)=>!t.disabled&&(z&&H&>(l,z,H),!Gs(M(),o)),ee=(z,H,Y)=>aP(z,c,{...u.mount?l:Et(H)?o:zn(z)?{[z]:H}:H},Y,H),te=z=>Bp(Ce(u.mount?l:o,z,t.shouldUnregister?Ce(o,z,[]):[])),ie=(z,H,Y={})=>{const me=Ce(i,z);let ue=H;if(me){const re=me._f;re&&(!re.disabled&>(l,z,$0(H,re)),ue=ju(re.ref)&&En(H)?"":H,D0(re.ref)?[...re.ref.options].forEach(pe=>pe.selected=ue.includes(pe.value)):re.refs?Ml(re.ref)?re.refs.forEach(pe=>{(!pe.defaultChecked||!pe.disabled)&&(Array.isArray(ue)?pe.checked=!!ue.find(Me=>Me===pe.value):pe.checked=ue===pe.value||!!ue)}):re.refs.forEach(pe=>pe.checked=pe.value===ue):Wp(re.ref)?re.ref.value="":(re.ref.value=ue,re.ref.type||w.state.next({name:z,values:Ht(l)})))}(Y.shouldDirty||Y.shouldTouch)&&T(z,ue,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&Z(z)},X=(z,H,Y)=>{for(const me in H){if(!H.hasOwnProperty(me))return;const ue=H[me],re=z+"."+me,pe=Ce(i,re);(c.array.has(z)||Bt(ue)||pe&&!pe._f)&&!Vi(ue)?X(re,ue,Y):ie(re,ue,Y)}},oe=(z,H,Y={})=>{const me=Ce(i,z),ue=c.array.has(z),re=Ht(H);gt(l,z,re),ue?(w.array.next({name:z,values:Ht(l)}),(y.isDirty||y.dirtyFields||x.isDirty||x.dirtyFields)&&Y.shouldDirty&&w.state.next({name:z,dirtyFields:Do(o,l),isDirty:U(z,re)})):me&&!me._f&&!En(re)?X(z,re,Y):ie(z,re,Y),tx(z,c)?w.state.next({...n,name:z,values:Ht(l)}):w.state.next({name:u.mount?z:void 0,values:Ht(l)})},B=async z=>{u.mount=!0;const H=z.target;let Y=H.name,me=!0;const ue=Ce(i,Y),re=$e=>{me=Number.isNaN($e)||Vi($e)&&isNaN($e.getTime())||Gs($e,Ce(l,Y,$e))},pe=Jy(t.mode),Me=Jy(t.reValidateMode);if(ue){let $e,_t;const fn=H.type?Xy(ue._f):eP(z),Kn=z.type===Qy.BLUR||z.type===Qy.FOCUS_OUT,lo=!mP(ue._f)&&!t.resolver&&!Ce(n.errors,Y)&&!ue._f.deps||yP(Kn,Ce(n.touchedFields,Y),n.isSubmitted,Me,pe),he=tx(Y,c,Kn);gt(l,Y,fn),Kn?(!H||!H.readOnly)&&(ue._f.onBlur&&ue._f.onBlur(z),h&&h(0)):ue._f.onChange&&ue._f.onChange(z);const Ge=T(Y,fn,Kn),Ve=!gn(Ge)||he;if(!Kn&&w.state.next({name:Y,type:z.type,values:Ht(l)}),lo)return(y.isValid||x.isValid)&&(t.mode==="onBlur"?Kn&&C():Kn||C()),Ve&&w.state.next({name:Y,...he?{}:Ge});if(!Kn&&he&&w.state.next({...n}),t.resolver){const{errors:Be}=await F([Y]);if(P([Y]),re(fn),me){const vt=nx(n.errors,i,Y),Tt=nx(Be,i,vt.name||Y);$e=Tt.error,Y=Tt.name,_t=gn(Be)}}else P([Y],!0),$e=(await sx(ue,c.disabled,l,k,t.shouldUseNativeValidation))[Y],P([Y]),re(fn),me&&($e?_t=!1:(y.isValid||x.isValid)&&(_t=await I(i,!0)));me&&(ue._f.deps&&(!Array.isArray(ue._f.deps)||ue._f.deps.length>0)&&Z(ue._f.deps),O(Y,_t,$e,Ge))}},J=(z,H)=>{if(Ce(n.errors,H)&&z.focus)return z.focus(),1},Z=async(z,H={})=>{let Y,me;const ue=fl(z);if(t.resolver){const re=await L(Et(z)?z:ue);Y=gn(re),me=z?!ue.some(pe=>Ce(re,pe)):Y}else z?(me=(await Promise.all(ue.map(async re=>{const pe=Ce(i,re);return await I(pe&&pe._f?{[re]:pe}:pe)}))).every(Boolean),!(!me&&!n.isValid)&&C()):me=Y=await I(i);return w.state.next({...!zn(z)||(y.isValid||x.isValid)&&Y!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:Y}:{},errors:n.errors}),H.shouldFocus&&!me&&hl(i,J,z?ue:c.mount),me},M=(z,H)=>{let Y={...u.mount?l:o};return H&&(Y=F0(H.dirtyFields?n.dirtyFields:n.touchedFields,Y)),Et(z)?Y:zn(z)?Ce(Y,z):z.map(me=>Ce(Y,me))},G=(z,H)=>({invalid:!!Ce((H||n).errors,z),isDirty:!!Ce((H||n).dirtyFields,z),error:Ce((H||n).errors,z),isValidating:!!Ce(n.validatingFields,z),isTouched:!!Ce((H||n).touchedFields,z)}),Re=z=>{z&&fl(z).forEach(H=>Vt(n.errors,H)),w.state.next({errors:z?n.errors:{}})},ge=(z,H,Y)=>{const me=(Ce(i,z,{_f:{}})._f||{}).ref,ue=Ce(n.errors,z)||{},{ref:re,message:pe,type:Me,...$e}=ue;gt(n.errors,z,{...$e,...H,ref:me}),w.state.next({name:z,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&me&&me.focus&&me.focus()},Ne=(z,H)=>wr(z)?w.state.subscribe({next:Y=>"values"in Y&&z(ee(void 0,H),Y)}):ee(z,H,!0),ne=z=>w.state.subscribe({next:H=>{vP(z.name,H.name,z.exact)&&gP(H,z.formState||y,et,z.reRenderRoot)&&z.callback({values:{...l},...n,...H,defaultValues:o})}}).unsubscribe,se=z=>(u.mount=!0,x={...x,...z.formState},ne({...z,formState:{...v,...z.formState}})),ve=(z,H={})=>{for(const Y of z?fl(z):c.mount)c.mount.delete(Y),c.array.delete(Y),H.keepValue||(Vt(i,Y),Vt(l,Y)),!H.keepError&&Vt(n.errors,Y),!H.keepDirty&&Vt(n.dirtyFields,Y),!H.keepTouched&&Vt(n.touchedFields,Y),!H.keepIsValidating&&Vt(n.validatingFields,Y),!t.shouldUnregister&&!H.keepDefaultValue&&Vt(o,Y);w.state.next({values:Ht(l)}),w.state.next({...n,...H.keepDirty?{isDirty:U()}:{}}),!H.keepIsValid&&C()},Oe=({disabled:z,name:H})=>{if(Ar(z)&&u.mount||z||c.disabled.has(H)){const ue=c.disabled.has(H)!==!!z;z?c.disabled.add(H):c.disabled.delete(H),ue&&u.mount&&!u.action&&C()}},Te=(z,H={})=>{let Y=Ce(i,z);const me=Ar(H.disabled)||Ar(t.disabled);return gt(i,z,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:z}},name:z,mount:!0,...H}}),c.mount.add(z),Y?Oe({disabled:Ar(H.disabled)?H.disabled:t.disabled,name:z}):N(z,!0,H.value),{...me?{disabled:H.disabled||t.disabled}:{},...t.progressive?{required:!!H.required,min:ol(H.min),max:ol(H.max),minLength:ol(H.minLength),maxLength:ol(H.maxLength),pattern:ol(H.pattern)}:{},name:z,onChange:B,onBlur:B,ref:ue=>{if(ue){Te(z,H),Y=Ce(i,z);const re=Et(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,pe=cP(re),Me=Y._f.refs||[];if(pe?Me.find($e=>$e===re):re===Y._f.ref)return;gt(i,z,{_f:{...Y._f,...pe?{refs:[...Me.filter(yh),re,...Array.isArray(Ce(o,z))?[{}]:[]],ref:{type:re.type,name:z}}:{ref:re}}}),N(z,!1,void 0,re)}else Y=Ce(i,z,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||H.shouldUnregister)&&!(nP(c.array,z)&&u.action)&&c.unMount.add(z)}}},Le=()=>t.shouldFocusError&&hl(i,J,c.mount),Ue=z=>{Ar(z)&&(w.state.next({disabled:z}),hl(i,(H,Y)=>{const me=Ce(i,Y);me&&(H.disabled=me._f.disabled||z,Array.isArray(me._f.refs)&&me._f.refs.forEach(ue=>{ue.disabled=me._f.disabled||z}))},0,!1))},dt=(z,H)=>async Y=>{let me;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let ue=Ht(l);if(w.state.next({isSubmitting:!0}),t.resolver){const{errors:re,values:pe}=await F();P(),n.errors=re,ue=Ht(pe)}else await I(i);if(c.disabled.size)for(const re of c.disabled)Vt(ue,re);if(Vt(n.errors,"root"),gn(n.errors)){w.state.next({errors:{}});try{await z(ue,Y)}catch(re){me=re}}else H&&await H({...n.errors},Y),Le(),setTimeout(Le);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:gn(n.errors)&&!me,submitCount:n.submitCount+1,errors:n.errors}),me)throw me},Mt=(z,H={})=>{Ce(i,z)&&(Et(H.defaultValue)?oe(z,Ht(Ce(o,z))):(oe(z,H.defaultValue),gt(o,z,Ht(H.defaultValue))),H.keepTouched||Vt(n.touchedFields,z),H.keepDirty||(Vt(n.dirtyFields,z),n.isDirty=H.defaultValue?U(z,Ht(Ce(o,z))):U()),H.keepError||(Vt(n.errors,z),y.isValid&&C()),w.state.next({...n}))},tn=(z,H={})=>{const Y=z?Ht(z):o,me=Ht(Y),ue=gn(z),re=ue?o:me;if(H.keepDefaultValues||(o=Y),!H.keepValues){if(H.keepDirtyValues){const pe=new Set([...c.mount,...Object.keys(Do(o,l))]);for(const Me of Array.from(pe)){const $e=Ce(n.dirtyFields,Me),_t=Ce(l,Me),fn=Ce(re,Me);$e&&!Et(_t)?gt(re,Me,_t):!$e&&!Et(fn)&&oe(Me,fn)}}else{if($p&&Et(z))for(const pe of c.mount){const Me=Ce(i,pe);if(Me&&Me._f){const $e=Array.isArray(Me._f.refs)?Me._f.refs[0]:Me._f.ref;if(ju($e)){const _t=$e.closest("form");if(_t){_t.reset();break}}}}if(H.keepFieldsRef)for(const pe of c.mount)oe(pe,Ce(re,pe));else i={}}l=t.shouldUnregister?H.keepDefaultValues?Ht(o):{}:Ht(re),w.array.next({values:{...re}}),w.state.next({values:{...re}})}c={mount:H.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!y.isValid||!!H.keepIsValid||!!H.keepDirtyValues||!t.shouldUnregister&&!gn(re),u.watch=!!t.shouldUnregister,u.keepIsValid=!!H.keepIsValid,u.action=!1,H.keepErrors||(n.errors={}),w.state.next({submitCount:H.keepSubmitCount?n.submitCount:0,isDirty:ue?!1:H.keepDirty?n.isDirty:!!(H.keepDefaultValues&&!Gs(z,o)),isSubmitted:H.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ue?{}:H.keepDirtyValues?H.keepDefaultValues&&l?Do(o,l):n.dirtyFields:H.keepDefaultValues&&z?Do(o,z):H.keepDirty?n.dirtyFields:{},touchedFields:H.keepTouched?n.touchedFields:{},errors:H.keepErrors?n.errors:{},isSubmitSuccessful:H.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Yt=(z,H)=>tn(wr(z)?z(l):z,{...t.resetOptions,...H}),Dt=(z,H={})=>{const Y=Ce(i,z),me=Y&&Y._f;if(me){const ue=me.refs?me.refs[0]:me.ref;ue.focus&&setTimeout(()=>{ue.focus(),H.shouldSelect&&wr(ue.select)&&ue.select()})}},et=z=>{n={...n,...z}},Nn={control:{register:Te,unregister:ve,getFieldState:G,handleSubmit:dt,setError:ge,_subscribe:ne,_runSchema:F,_updateIsValidating:P,_focusError:Le,_getWatch:ee,_getDirty:U,_setValid:C,_setFieldArray:_,_setDisabledField:Oe,_setErrors:R,_getFieldArray:te,_reset:tn,_resetDefaultValues:()=>wr(t.defaultValues)&&t.defaultValues().then(z=>{Yt(z,t.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:Q,_disableForm:Ue,_subjects:w,_proxyFormState:y,get _fields(){return i},get _formValues(){return l},get _state(){return u},set _state(z){u=z},get _defaultValues(){return o},get _names(){return c},set _names(z){c=z},get _formState(){return n},get _options(){return t},set _options(z){t={...t,...z}}},subscribe:se,trigger:Z,register:Te,handleSubmit:dt,watch:Ne,setValue:oe,getValues:M,reset:Yt,resetField:Mt,clearErrors:Re,unregister:ve,setError:ge,setFocus:Dt,getFieldState:G};return{...Nn,formControl:Nn}}function CP(e={}){const t=st.useRef(void 0),n=st.useRef(void 0),[i,o]=st.useState({isDirty:!1,isValidating:!1,isLoading:wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:wr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!wr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...c}=bP(e);t.current={...c,formState:i}}const l=t.current.control;return l._options=e,oP(()=>{const u=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),l._formState.isReady=!0,u},[l]),st.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),st.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),st.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),st.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),st.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==i.isDirty&&l._subjects.state.next({isDirty:u})}},[l,i.isDirty]),st.useEffect(()=>{var u;e.values&&!Gs(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(c=>({...c}))):l._resetDefaultValues()},[l,e.values]),st.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=st.useMemo(()=>iP(i,l),[l,i]),t.current}const ix=(e,t,n)=>{if(e&&"reportValidity"in e){const i=Ce(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},U0=(e,t)=>{for(const n in t.fields){const i=t.fields[n];i&&i.ref&&"reportValidity"in i.ref?ix(i.ref,n,e):i.refs&&i.refs.forEach(o=>ix(o,n,e))}},_P=(e,t)=>{t.shouldUseNativeValidation&&U0(e,t);const n={};for(const i in e){const o=Ce(t.fields,i),l=Object.assign(e[i]||{},{ref:o&&o.ref});if(kP(t.names||Object.keys(e),i)){const u=Object.assign({},Ce(n,i));gt(u,"root",l),gt(n,i,u)}else gt(n,i,l)}return n},kP=(e,t)=>e.some(n=>n.startsWith(t+"."));var jP=function(e,t){for(var n={};e.length;){var i=e[0],o=i.code,l=i.message,u=i.path.join(".");if(!n[u])if("unionErrors"in i){var c=i.unionErrors[0].errors[0];n[u]={message:c.message,type:c.code}}else n[u]={message:l,type:o};if("unionErrors"in i&&i.unionErrors.forEach(function(v){return v.errors.forEach(function(y){return e.push(y)})}),t){var h=n[u].types,m=h&&h[i.code];n[u]=L0(u,t,n,o,m?[].concat(m,i.message):i.message)}e.shift()}return n},EP=function(e,t,n){return n===void 0&&(n={}),function(i,o,l){try{return Promise.resolve((function(u,c){try{var h=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(m){return l.shouldUseNativeValidation&&U0({},l),{errors:{},values:n.raw?i:m}})}catch(m){return c(m)}return h&&h.then?h.then(void 0,c):h})(0,function(u){if((function(c){return Array.isArray(c==null?void 0:c.errors)})(u))return{values:{},errors:_P(jP(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}}},at;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),u={};for(const c of l)u[c]=o[c];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function i(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=i,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(at||(at={}));var ox;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ox||(ox={}));const ke=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qs=e=>{switch(typeof e){case"undefined":return ke.undefined;case"string":return ke.string;case"number":return Number.isNaN(e)?ke.nan:ke.number;case"boolean":return ke.boolean;case"function":return ke.function;case"bigint":return ke.bigint;case"symbol":return ke.symbol;case"object":return Array.isArray(e)?ke.array:e===null?ke.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ke.promise:typeof Map<"u"&&e instanceof Map?ke.map:typeof Set<"u"&&e instanceof Set?ke.set:typeof Date<"u"&&e instanceof Date?ke.date:ke.object;default:return ke.unknown}},fe=at.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class gs extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},i={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)i._errors.push(n(u));else{let c=i,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(u))):c[m]=c[m]||{_errors:[]},c=c[m],h++}}};return o(this),i}static assert(t){if(!(t instanceof gs))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},i=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else i.push(t(o));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}gs.create=e=>new gs(e);const Gh=(e,t)=>{let n;switch(e.code){case fe.invalid_type:e.received===ke.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case fe.invalid_union:n="Invalid input";break;case fe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case fe.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:n="Invalid function arguments";break;case fe.invalid_return_type:n="Invalid function return type";break;case fe.invalid_date:n="Invalid date";break;case fe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case fe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case fe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case fe.custom:n="Invalid input";break;case fe.invalid_intersection_types:n="Intersection results could not be merged";break;case fe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let RP=Gh;function PP(){return RP}const NP=e=>{const{data:t,path:n,errorMaps:i,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let c="";const h=i.filter(m=>!!m).slice().reverse();for(const m of h)c=m(u,{data:t,defaultError:c}).message;return{...o,path:l,message:c}};function we(e,t){const n=PP(),i=NP({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Gh?void 0:Gh].filter(o=>!!o)});e.common.issues.push(i)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const i=[];for(const o of n){if(o.status==="aborted")return De;o.status==="dirty"&&t.dirty(),i.push(o.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,n){const i=[];for(const o of n){const l=await o.key,u=await o.value;i.push({key:l,value:u})}return Bn.mergeObjectSync(t,i)}static mergeObjectSync(t,n){const i={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return De;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(i[l.value]=u.value)}return{status:t.value,value:i}}}const De=Object.freeze({status:"aborted"}),ll=e=>({status:"dirty",value:e}),or=e=>({status:"valid",value:e}),ax=e=>e.status==="aborted",lx=e=>e.status==="dirty",ia=e=>e.status==="valid",Ru=e=>typeof Promise<"u"&&e instanceof Promise;var Ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ee||(Ee={}));class mi{constructor(t,n,i,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=i,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cx=(e,t)=>{if(ia(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new gs(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:o}=e;if(t&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,c)=>{const{message:h}=e;return u.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:h??i??c.defaultError}:u.code!=="invalid_type"?{message:c.defaultError}:{message:h??n??c.defaultError}},description:o}}class nt{get description(){return this._def.description}_getType(t){return qs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:qs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bn,ctx:{common:t.parent.common,data:t.data,parsedType:qs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ru(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const i=this.safeParse(t,n);if(i.success)return i.data;throw i.error}safeParse(t,n){const i={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qs(t)},o=this._parseSync({data:t,path:i.path,parent:i});return cx(i,o)}"~validate"(t){var i,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qs(t)};if(!this["~standard"].async)try{const l=this._parseSync({data:t,path:[],parent:n});return ia(l)?{value:l.value}:{issues:n.common.issues}}catch(l){(o=(i=l==null?void 0:l.message)==null?void 0:i.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(l=>ia(l)?{value:l.value}:{issues:n.common.issues})}async parseAsync(t,n){const i=await this.safeParseAsync(t,n);if(i.success)return i.data;throw i.error}async safeParseAsync(t,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qs(t)},o=this._parse({data:t,path:i.path,parent:i}),l=await(Ru(o)?o:Promise.resolve(o));return cx(i,l)}refine(t,n){const i=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),c=()=>l.addIssue({code:fe.custom,...i(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(t,n){return this._refinement((i,o)=>t(i)?!0:(o.addIssue(typeof n=="function"?n(i,o):n),!1))}_refinement(t){return new aa({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return fi.create(this,this._def)}nullable(){return la.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zr.create(this)}promise(){return Ou.create(this,this._def)}or(t){return Nu.create([this,t],this._def)}and(t){return Tu.create(this,t,this._def)}transform(t){return new aa({...Ze(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Xh({...Ze(this._def),innerType:this,defaultValue:n,typeName:ze.ZodDefault})}brand(){return new JP({typeName:ze.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Jh({...Ze(this._def),innerType:this,catchValue:n,typeName:ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Kp.create(this,t)}readonly(){return ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const TP=/^c[^\s-]{8,}$/i,OP=/^[0-9a-z]+$/,AP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,MP=/^[a-z0-9_-]{21}$/i,LP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,FP=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,DP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xh;const VP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$P=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,BP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,UP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,WP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,HP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",KP=new RegExp(`^${W0}$`);function H0(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function QP(e){return new RegExp(`^${H0(e)}$`)}function ZP(e){let t=`${W0}T${H0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function qP(e,t){return!!((t==="v4"||!t)&&VP.test(e)||(t==="v6"||!t)&&BP.test(e))}function GP(e,t){if(!LP.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(i));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function YP(e,t){return!!((t==="v4"||!t)&&$P.test(e)||(t==="v6"||!t)&&UP.test(e))}class li extends nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ke.string){const l=this._getOrReturnCtx(t);return we(l,{code:fe.invalid_type,expected:ke.string,received:l.parsedType}),De}const i=new Bn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:fe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:fe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,c=t.data.length<l.value;(u||c)&&(o=this._getOrReturnCtx(t,o),u?we(o,{code:fe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):c&&we(o,{code:fe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")DP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"email",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")xh||(xh=new RegExp(zP,"u")),xh.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"emoji",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")IP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"uuid",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")MP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"nanoid",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")TP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")OP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid2",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")AP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ulid",code:fe.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),we(o,{validation:"url",code:fe.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"regex",code:fe.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?ZP(l).test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?KP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?QP(l).test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:fe.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?FP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"duration",code:fe.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?qP(t.data,l.version)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ip",code:fe.invalid_string,message:l.message}),i.dirty()):l.kind==="jwt"?GP(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"jwt",code:fe.invalid_string,message:l.message}),i.dirty()):l.kind==="cidr"?YP(t.data,l.version)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cidr",code:fe.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?WP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"base64",code:fe.invalid_string,message:l.message}),i.dirty()):l.kind==="base64url"?HP.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"base64url",code:fe.invalid_string,message:l.message}),i.dirty()):at.assertNever(l);return{status:i.value,value:t.data}}_regex(t,n,i){return this.refinement(o=>t.test(o),{validation:n,code:fe.invalid_string,...Ee.errToObj(i)})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ee.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ee.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ee.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ee.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ee.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ee.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ee.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ee.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ee.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ee.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ee.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ee.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ee.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ee.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ee.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ee.errToObj(n)})}nonempty(t){return this.min(1,Ee.errToObj(t))}trim(){return new li({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new li({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new li({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}li.create=e=>new li({checks:[],typeName:ze.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function XP(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,o=n>i?n:i,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class Sl extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ke.number){const l=this._getOrReturnCtx(t);return we(l,{code:fe.invalid_type,expected:ke.number,received:l.parsedType}),De}let i;const o=new Bn;for(const l of this._def.checks)l.kind==="int"?at.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:fe.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?XP(t.data,l.value)!==0&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:fe.not_finite,message:l.message}),o.dirty()):at.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,i,o){return new Sl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:Ee.toString(o)}]})}_addCheck(t){return new Sl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&at.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Sl.create=e=>new Sl({checks:[],typeName:ze.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class bl extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ke.bigint)return this._getInvalidInput(t);let i;const o=new Bn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),we(i,{code:fe.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):at.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return we(n,{code:fe.invalid_type,expected:ke.bigint,received:n.parsedType}),De}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,i,o){return new bl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:Ee.toString(o)}]})}_addCheck(t){return new bl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}bl.create=e=>new bl({checks:[],typeName:ze.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class ux extends nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ke.boolean){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.boolean,received:i.parsedType}),De}return or(t.data)}}ux.create=e=>new ux({typeName:ze.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Pu extends nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ke.date){const l=this._getOrReturnCtx(t);return we(l,{code:fe.invalid_type,expected:ke.date,received:l.parsedType}),De}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return we(l,{code:fe.invalid_date}),De}const i=new Bn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:fe.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:fe.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):at.assertNever(l);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Pu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ee.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ee.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Pu.create=e=>new Pu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ze.ZodDate,...Ze(e)});class dx extends nt{_parse(t){if(this._getType(t)!==ke.symbol){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.symbol,received:i.parsedType}),De}return or(t.data)}}dx.create=e=>new dx({typeName:ze.ZodSymbol,...Ze(e)});class fx extends nt{_parse(t){if(this._getType(t)!==ke.undefined){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.undefined,received:i.parsedType}),De}return or(t.data)}}fx.create=e=>new fx({typeName:ze.ZodUndefined,...Ze(e)});class hx extends nt{_parse(t){if(this._getType(t)!==ke.null){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.null,received:i.parsedType}),De}return or(t.data)}}hx.create=e=>new hx({typeName:ze.ZodNull,...Ze(e)});class px extends nt{constructor(){super(...arguments),this._any=!0}_parse(t){return or(t.data)}}px.create=e=>new px({typeName:ze.ZodAny,...Ze(e)});class mx extends nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return or(t.data)}}mx.create=e=>new mx({typeName:ze.ZodUnknown,...Ze(e)});class gi extends nt{_parse(t){const n=this._getOrReturnCtx(t);return we(n,{code:fe.invalid_type,expected:ke.never,received:n.parsedType}),De}}gi.create=e=>new gi({typeName:ze.ZodNever,...Ze(e)});class gx extends nt{_parse(t){if(this._getType(t)!==ke.undefined){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.void,received:i.parsedType}),De}return or(t.data)}}gx.create=e=>new gx({typeName:ze.ZodVoid,...Ze(e)});class zr extends nt{_parse(t){const{ctx:n,status:i}=this._processInputParams(t),o=this._def;if(n.parsedType!==ke.array)return we(n,{code:fe.invalid_type,expected:ke.array,received:n.parsedType}),De;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(u||c)&&(we(n,{code:u?fe.too_big:fe.too_small,minimum:c?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(we(n,{code:fe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(we(n,{code:fe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((u,c)=>o.type._parseAsync(new mi(n,u,n.path,c)))).then(u=>Bn.mergeArray(i,u));const l=[...n.data].map((u,c)=>o.type._parseSync(new mi(n,u,n.path,c)));return Bn.mergeArray(i,l)}get element(){return this._def.type}min(t,n){return new zr({...this._def,minLength:{value:t,message:Ee.toString(n)}})}max(t,n){return new zr({...this._def,maxLength:{value:t,message:Ee.toString(n)}})}length(t,n){return new zr({...this._def,exactLength:{value:t,message:Ee.toString(n)}})}nonempty(t){return this.min(1,t)}}zr.create=(e,t)=>new zr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...Ze(t)});function zo(e){if(e instanceof $t){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=fi.create(zo(i))}return new $t({...e._def,shape:()=>t})}else return e instanceof zr?new zr({...e._def,type:zo(e.element)}):e instanceof fi?fi.create(zo(e.unwrap())):e instanceof la?la.create(zo(e.unwrap())):e instanceof so?so.create(e.items.map(t=>zo(t))):e}class $t extends nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=at.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ke.object){const m=this._getOrReturnCtx(t);return we(m,{code:fe.invalid_type,expected:ke.object,received:m.parsedType}),De}const{status:i,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof gi&&this._def.unknownKeys==="strip"))for(const m in o.data)u.includes(m)||c.push(m);const h=[];for(const m of u){const v=l[m],y=o.data[m];h.push({key:{status:"valid",value:m},value:v._parse(new mi(o,y,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof gi){const m=this._def.unknownKeys;if(m==="passthrough")for(const v of c)h.push({key:{status:"valid",value:v},value:{status:"valid",value:o.data[v]}});else if(m==="strict")c.length>0&&(we(o,{code:fe.unrecognized_keys,keys:c}),i.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const v of c){const y=o.data[v];h.push({key:{status:"valid",value:v},value:m._parse(new mi(o,y,o.path,v)),alwaysSet:v in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const v of h){const y=await v.key,x=await v.value;m.push({key:y,value:x,alwaysSet:v.alwaysSet})}return m}).then(m=>Bn.mergeObjectSync(i,m)):Bn.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(t){return Ee.errToObj,new $t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,i)=>{var l,u;const o=((u=(l=this._def).errorMap)==null?void 0:u.call(l,n,i).message)??i.defaultError;return n.code==="unrecognized_keys"?{message:Ee.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(t){return new $t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new $t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new $t({...this._def,catchall:t})}pick(t){const n={};for(const i of at.objectKeys(t))t[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new $t({...this._def,shape:()=>n})}omit(t){const n={};for(const i of at.objectKeys(this.shape))t[i]||(n[i]=this.shape[i]);return new $t({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};for(const i of at.objectKeys(this.shape)){const o=this.shape[i];t&&!t[i]?n[i]=o:n[i]=o.optional()}return new $t({...this._def,shape:()=>n})}required(t){const n={};for(const i of at.objectKeys(this.shape))if(t&&!t[i])n[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof fi;)l=l._def.innerType;n[i]=l}return new $t({...this._def,shape:()=>n})}keyof(){return K0(at.objectKeys(this.shape))}}$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:gi.create(),typeName:ze.ZodObject,...Ze(t)});$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:gi.create(),typeName:ze.ZodObject,...Ze(t)});$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:gi.create(),typeName:ze.ZodObject,...Ze(t)});class Nu extends nt{_parse(t){const{ctx:n}=this._processInputParams(t),i=this._def.options;function o(l){for(const c of l)if(c.result.status==="valid")return c.result;for(const c of l)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const u=l.map(c=>new gs(c.ctx.common.issues));return we(n,{code:fe.invalid_union,unionErrors:u}),De}if(n.common.async)return Promise.all(i.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const h of i){const m={...n,common:{...n.common,issues:[]},parent:null},v=h._parseSync({data:n.data,path:n.path,parent:m});if(v.status==="valid")return v;v.status==="dirty"&&!l&&(l={result:v,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const c=u.map(h=>new gs(h));return we(n,{code:fe.invalid_union,unionErrors:c}),De}}get options(){return this._def.options}}Nu.create=(e,t)=>new Nu({options:e,typeName:ze.ZodUnion,...Ze(t)});function Yh(e,t){const n=qs(e),i=qs(t);if(e===t)return{valid:!0,data:e};if(n===ke.object&&i===ke.object){const o=at.objectKeys(t),l=at.objectKeys(e).filter(c=>o.indexOf(c)!==-1),u={...e,...t};for(const c of l){const h=Yh(e[c],t[c]);if(!h.valid)return{valid:!1};u[c]=h.data}return{valid:!0,data:u}}else if(n===ke.array&&i===ke.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],c=t[l],h=Yh(u,c);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return n===ke.date&&i===ke.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Tu extends nt{_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=(l,u)=>{if(ax(l)||ax(u))return De;const c=Yh(l.value,u.value);return c.valid?((lx(l)||lx(u))&&n.dirty(),{status:n.value,value:c.data}):(we(i,{code:fe.invalid_intersection_types}),De)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Tu.create=(e,t,n)=>new Tu({left:e,right:t,typeName:ze.ZodIntersection,...Ze(n)});class so extends nt{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ke.array)return we(i,{code:fe.invalid_type,expected:ke.array,received:i.parsedType}),De;if(i.data.length<this._def.items.length)return we(i,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&i.data.length>this._def.items.length&&(we(i,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...i.data].map((u,c)=>{const h=this._def.items[c]||this._def.rest;return h?h._parse(new mi(i,u,i.path,c)):null}).filter(u=>!!u);return i.common.async?Promise.all(l).then(u=>Bn.mergeArray(n,u)):Bn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new so({...this._def,rest:t})}}so.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new so({items:e,typeName:ze.ZodTuple,rest:null,...Ze(t)})};class vx extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ke.map)return we(i,{code:fe.invalid_type,expected:ke.map,received:i.parsedType}),De;const o=this._def.keyType,l=this._def.valueType,u=[...i.data.entries()].map(([c,h],m)=>({key:o._parse(new mi(i,c,i.path,[m,"key"])),value:l._parse(new mi(i,h,i.path,[m,"value"]))}));if(i.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,v=await h.value;if(m.status==="aborted"||v.status==="aborted")return De;(m.status==="dirty"||v.status==="dirty")&&n.dirty(),c.set(m.value,v.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const h of u){const m=h.key,v=h.value;if(m.status==="aborted"||v.status==="aborted")return De;(m.status==="dirty"||v.status==="dirty")&&n.dirty(),c.set(m.value,v.value)}return{status:n.value,value:c}}}}vx.create=(e,t,n)=>new vx({valueType:t,keyType:e,typeName:ze.ZodMap,...Ze(n)});class Cl extends nt{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ke.set)return we(i,{code:fe.invalid_type,expected:ke.set,received:i.parsedType}),De;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(we(i,{code:fe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(we(i,{code:fe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const v of h){if(v.status==="aborted")return De;v.status==="dirty"&&n.dirty(),m.add(v.value)}return{status:n.value,value:m}}const c=[...i.data.values()].map((h,m)=>l._parse(new mi(i,h,i.path,m)));return i.common.async?Promise.all(c).then(h=>u(h)):u(c)}min(t,n){return new Cl({...this._def,minSize:{value:t,message:Ee.toString(n)}})}max(t,n){return new Cl({...this._def,maxSize:{value:t,message:Ee.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Cl.create=(e,t)=>new Cl({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...Ze(t)});class yx extends nt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}yx.create=(e,t)=>new yx({getter:e,typeName:ze.ZodLazy,...Ze(t)});class xx extends nt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return we(n,{received:n.data,code:fe.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}xx.create=(e,t)=>new xx({value:e,typeName:ze.ZodLiteral,...Ze(t)});function K0(e,t){return new oa({values:e,typeName:ze.ZodEnum,...Ze(t)})}class oa extends nt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),i=this._def.values;return we(n,{expected:at.joinValues(i),received:n.parsedType,code:fe.invalid_type}),De}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),i=this._def.values;return we(n,{received:n.data,code:fe.invalid_enum_value,options:i}),De}return or(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return oa.create(t,{...this._def,...n})}exclude(t,n=this._def){return oa.create(this.options.filter(i=>!t.includes(i)),{...this._def,...n})}}oa.create=K0;class wx extends nt{_parse(t){const n=at.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==ke.string&&i.parsedType!==ke.number){const o=at.objectValues(n);return we(i,{expected:at.joinValues(o),received:i.parsedType,code:fe.invalid_type}),De}if(this._cache||(this._cache=new Set(at.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=at.objectValues(n);return we(i,{received:i.data,code:fe.invalid_enum_value,options:o}),De}return or(t.data)}get enum(){return this._def.values}}wx.create=(e,t)=>new wx({values:e,typeName:ze.ZodNativeEnum,...Ze(t)});class Ou extends nt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ke.promise&&n.common.async===!1)return we(n,{code:fe.invalid_type,expected:ke.promise,received:n.parsedType}),De;const i=n.parsedType===ke.promise?n.data:Promise.resolve(n.data);return or(i.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ou.create=(e,t)=>new Ou({type:e,typeName:ze.ZodPromise,...Ze(t)});class aa extends nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{we(i,u),u.fatal?n.abort():n.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(i.data,l);if(i.common.async)return Promise.resolve(u).then(async c=>{if(n.value==="aborted")return De;const h=await this._def.schema._parseAsync({data:c,path:i.path,parent:i});return h.status==="aborted"?De:h.status==="dirty"||n.value==="dirty"?ll(h.value):h});{if(n.value==="aborted")return De;const c=this._def.schema._parseSync({data:u,path:i.path,parent:i});return c.status==="aborted"?De:c.status==="dirty"||n.value==="dirty"?ll(c.value):c}}if(o.type==="refinement"){const u=c=>{const h=o.refinement(c,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?De:(c.status==="dirty"&&n.dirty(),u(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>c.status==="aborted"?De:(c.status==="dirty"&&n.dirty(),u(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ia(u))return De;const c=o.transform(u.value,l);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>ia(u)?Promise.resolve(o.transform(u.value,l)).then(c=>({status:n.value,value:c})):De);at.assertNever(o)}}aa.create=(e,t,n)=>new aa({schema:e,typeName:ze.ZodEffects,effect:t,...Ze(n)});aa.createWithPreprocess=(e,t,n)=>new aa({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...Ze(n)});class fi extends nt{_parse(t){return this._getType(t)===ke.undefined?or(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}fi.create=(e,t)=>new fi({innerType:e,typeName:ze.ZodOptional,...Ze(t)});class la extends nt{_parse(t){return this._getType(t)===ke.null?or(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}la.create=(e,t)=>new la({innerType:e,typeName:ze.ZodNullable,...Ze(t)});class Xh extends nt{_parse(t){const{ctx:n}=this._processInputParams(t);let i=n.data;return n.parsedType===ke.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Xh.create=(e,t)=>new Xh({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Jh extends nt{_parse(t){const{ctx:n}=this._processInputParams(t),i={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Ru(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new gs(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gs(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Jh.create=(e,t)=>new Jh({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class Sx extends nt{_parse(t){if(this._getType(t)!==ke.nan){const i=this._getOrReturnCtx(t);return we(i,{code:fe.invalid_type,expected:ke.nan,received:i.parsedType}),De}return{status:"valid",value:t.data}}}Sx.create=e=>new Sx({typeName:ze.ZodNaN,...Ze(e)});class JP extends nt{_parse(t){const{ctx:n}=this._processInputParams(t),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Kp extends nt{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?De:l.status==="dirty"?(n.dirty(),ll(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?De:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(t,n){return new Kp({in:t,out:n,typeName:ze.ZodPipeline})}}class ep extends nt{_parse(t){const n=this._def.innerType._parse(t),i=o=>(ia(o)&&(o.value=Object.freeze(o.value)),o);return Ru(n)?n.then(o=>i(o)):i(n)}unwrap(){return this._def.innerType}}ep.create=(e,t)=>new ep({innerType:e,typeName:ze.ZodReadonly,...Ze(t)});var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const tu=li.create;gi.create;zr.create;const eN=$t.create;Nu.create;Tu.create;so.create;const tN=oa.create;Ou.create;fi.create;la.create;const en=b.forwardRef(({className:e,type:t,...n},i)=>f.jsx("input",{type:t,className:pt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...n}));en.displayName="Input";function bx(e,[t,n]){return Math.min(n,Math.max(t,e))}function Q0(e){const t=e+"CollectionProvider",[n,i]=ma(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=S=>{const{scope:C,children:P}=S,_=st.useRef(null),E=st.useRef(new Map).current;return f.jsx(o,{scope:C,itemMap:E,collectionRef:_,children:P})};u.displayName=t;const c=e+"CollectionSlot",h=yl(c),m=st.forwardRef((S,C)=>{const{scope:P,children:_}=S,E=l(c,P),R=It(C,E.collectionRef);return f.jsx(h,{ref:R,children:_})});m.displayName=c;const v=e+"CollectionItemSlot",y="data-radix-collection-item",x=yl(v),w=st.forwardRef((S,C)=>{const{scope:P,children:_,...E}=S,R=st.useRef(null),N=It(C,R),T=l(v,P);return st.useEffect(()=>(T.itemMap.set(R,{ref:R,...E}),()=>void T.itemMap.delete(R))),f.jsx(x,{[y]:"",ref:N,children:_})});w.displayName=v;function k(S){const C=l(e+"CollectionConsumer",S);return st.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const E=Array.from(_.querySelectorAll(`[${y}]`));return Array.from(C.itemMap.values()).sort((T,O)=>E.indexOf(T.ref.current)-E.indexOf(O.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:u,Slot:m,ItemSlot:w},k,i]}var nN=b.createContext(void 0);function Qp(e){const t=b.useContext(nN);return e||t||"ltr"}const rN=["top","right","bottom","left"],vi=Math.min,Dn=Math.max,Au=Math.round,nu=Math.floor,Vr=e=>({x:e,y:e}),sN={left:"right",right:"left",bottom:"top",top:"bottom"},iN={start:"end",end:"start"};function tp(e,t,n){return Dn(e,vi(t,n))}function vs(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function ga(e){return e.split("-")[1]}function Zp(e){return e==="x"?"y":"x"}function qp(e){return e==="y"?"height":"width"}const oN=new Set(["top","bottom"]);function Dr(e){return oN.has(ys(e))?"y":"x"}function Gp(e){return Zp(Dr(e))}function aN(e,t,n){n===void 0&&(n=!1);const i=ga(e),o=Gp(e),l=qp(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Iu(u)),[u,Iu(u)]}function lN(e){const t=Iu(e);return[np(e),t,np(t)]}function np(e){return e.replace(/start|end/g,t=>iN[t])}const Cx=["left","right"],_x=["right","left"],cN=["top","bottom"],uN=["bottom","top"];function dN(e,t,n){switch(e){case"top":case"bottom":return n?t?_x:Cx:t?Cx:_x;case"left":case"right":return t?cN:uN;default:return[]}}function fN(e,t,n,i){const o=ga(e);let l=dN(ys(e),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(np)))),l}function Iu(e){return e.replace(/left|right|bottom|top/g,t=>sN[t])}function hN(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z0(e){return typeof e!="number"?hN(e):{top:e,right:e,bottom:e,left:e}}function Mu(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function kx(e,t,n){let{reference:i,floating:o}=e;const l=Dr(t),u=Gp(t),c=qp(u),h=ys(t),m=l==="y",v=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,x=i[c]/2-o[c]/2;let w;switch(h){case"top":w={x:v,y:i.y-o.height};break;case"bottom":w={x:v,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-o.width,y};break;default:w={x:i.x,y:i.y}}switch(ga(t)){case"start":w[u]-=x*(n&&m?-1:1);break;case"end":w[u]+=x*(n&&m?-1:1);break}return w}async function pN(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:l,rects:u,elements:c,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:y="floating",altBoundary:x=!1,padding:w=0}=vs(t,e),k=Z0(w),C=c[x?y==="floating"?"reference":"floating":y],P=Mu(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:m,rootBoundary:v,strategy:h})),_=y==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),R=await(l.isElement==null?void 0:l.isElement(E))?await(l.getScale==null?void 0:l.getScale(E))||{x:1,y:1}:{x:1,y:1},N=Mu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:E,strategy:h}):_);return{top:(P.top-N.top+k.top)/R.y,bottom:(N.bottom-P.bottom+k.bottom)/R.y,left:(P.left-N.left+k.left)/R.x,right:(N.right-P.right+k.right)/R.x}}const mN=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,c=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:v,y}=kx(m,i,h),x=i,w={},k=0;for(let C=0;C<c.length;C++){var S;const{name:P,fn:_}=c[C],{x:E,y:R,data:N,reset:T}=await _({x:v,y,initialPlacement:i,placement:x,strategy:o,middlewareData:w,rects:m,platform:{...u,detectOverflow:(S=u.detectOverflow)!=null?S:pN},elements:{reference:e,floating:t}});v=E??v,y=R??y,w={...w,[P]:{...w[P],...N}},T&&k<=50&&(k++,typeof T=="object"&&(T.placement&&(x=T.placement),T.rects&&(m=T.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:v,y}=kx(m,x,h)),C=-1)}return{x:v,y,placement:x,strategy:o,middlewareData:w}},gN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:u,elements:c,middlewareData:h}=t,{element:m,padding:v=0}=vs(e,t)||{};if(m==null)return{};const y=Z0(v),x={x:n,y:i},w=Gp(o),k=qp(w),S=await u.getDimensions(m),C=w==="y",P=C?"top":"left",_=C?"bottom":"right",E=C?"clientHeight":"clientWidth",R=l.reference[k]+l.reference[w]-x[w]-l.floating[k],N=x[w]-l.reference[w],T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let O=T?T[E]:0;(!O||!await(u.isElement==null?void 0:u.isElement(T)))&&(O=c.floating[E]||l.floating[k]);const F=R/2-N/2,L=O/2-S[k]/2-1,I=vi(y[P],L),Q=vi(y[_],L),U=I,ee=O-S[k]-Q,te=O/2-S[k]/2+F,ie=tp(U,te,ee),X=!h.arrow&&ga(o)!=null&&te!==ie&&l.reference[k]/2-(te<U?I:Q)-S[k]/2<0,oe=X?te<U?te-U:te-ee:0;return{[w]:x[w]+oe,data:{[w]:ie,centerOffset:te-ie-oe,...X&&{alignmentOffset:oe}},reset:X}}}),vN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:c,platform:h,elements:m}=t,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...C}=vs(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const P=ys(o),_=Dr(c),E=ys(c)===c,R=await(h.isRTL==null?void 0:h.isRTL(m.floating)),N=x||(E||!S?[Iu(c)]:lN(c)),T=k!=="none";!x&&T&&N.push(...fN(c,S,k,R));const O=[c,...N],F=await h.detectOverflow(t,C),L=[];let I=((i=l.flip)==null?void 0:i.overflows)||[];if(v&&L.push(F[P]),y){const te=aN(o,u,R);L.push(F[te[0]],F[te[1]])}if(I=[...I,{placement:o,overflows:L}],!L.every(te=>te<=0)){var Q,U;const te=(((Q=l.flip)==null?void 0:Q.index)||0)+1,ie=O[te];if(ie&&(!(y==="alignment"?_!==Dr(ie):!1)||I.every(B=>Dr(B.placement)===_?B.overflows[0]>0:!0)))return{data:{index:te,overflows:I},reset:{placement:ie}};let X=(U=I.filter(oe=>oe.overflows[0]<=0).sort((oe,B)=>oe.overflows[1]-B.overflows[1])[0])==null?void 0:U.placement;if(!X)switch(w){case"bestFit":{var ee;const oe=(ee=I.filter(B=>{if(T){const J=Dr(B.placement);return J===_||J==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(J=>J>0).reduce((J,Z)=>J+Z,0)]).sort((B,J)=>B[1]-J[1])[0])==null?void 0:ee[0];oe&&(X=oe);break}case"initialPlacement":X=c;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function jx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ex(e){return rN.some(t=>e[t]>=0)}const yN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...l}=vs(e,t);switch(o){case"referenceHidden":{const u=await i.detectOverflow(t,{...l,elementContext:"reference"}),c=jx(u,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ex(c)}}}case"escaped":{const u=await i.detectOverflow(t,{...l,altBoundary:!0}),c=jx(u,n.floating);return{data:{escapedOffsets:c,escaped:Ex(c)}}}default:return{}}}}},q0=new Set(["left","top"]);async function xN(e,t){const{placement:n,platform:i,elements:o}=e,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=ys(n),c=ga(n),h=Dr(n)==="y",m=q0.has(u)?-1:1,v=l&&h?-1:1,y=vs(t,e);let{mainAxis:x,crossAxis:w,alignmentAxis:k}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&typeof k=="number"&&(w=c==="end"?k*-1:k),h?{x:w*v,y:x*m}:{x:x*m,y:w*v}}const wN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:l,placement:u,middlewareData:c}=t,h=await xN(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:l+h.y,data:{...h,placement:u}}}}},SN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o,platform:l}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:h={fn:P=>{let{x:_,y:E}=P;return{x:_,y:E}}},...m}=vs(e,t),v={x:n,y:i},y=await l.detectOverflow(t,m),x=Dr(ys(o)),w=Zp(x);let k=v[w],S=v[x];if(u){const P=w==="y"?"top":"left",_=w==="y"?"bottom":"right",E=k+y[P],R=k-y[_];k=tp(E,k,R)}if(c){const P=x==="y"?"top":"left",_=x==="y"?"bottom":"right",E=S+y[P],R=S-y[_];S=tp(E,S,R)}const C=h.fn({...t,[w]:k,[x]:S});return{...C,data:{x:C.x-n,y:C.y-i,enabled:{[w]:u,[x]:c}}}}}},bN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=t,{offset:c=0,mainAxis:h=!0,crossAxis:m=!0}=vs(e,t),v={x:n,y:i},y=Dr(o),x=Zp(y);let w=v[x],k=v[y];const S=vs(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const E=x==="y"?"height":"width",R=l.reference[x]-l.floating[E]+C.mainAxis,N=l.reference[x]+l.reference[E]-C.mainAxis;w<R?w=R:w>N&&(w=N)}if(m){var P,_;const E=x==="y"?"width":"height",R=q0.has(ys(o)),N=l.reference[y]-l.floating[E]+(R&&((P=u.offset)==null?void 0:P[y])||0)+(R?0:C.crossAxis),T=l.reference[y]+l.reference[E]+(R?0:((_=u.offset)==null?void 0:_[y])||0)-(R?C.crossAxis:0);k<N?k=N:k>T&&(k=T)}return{[x]:w,[y]:k}}}},CN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:l,platform:u,elements:c}=t,{apply:h=()=>{},...m}=vs(e,t),v=await u.detectOverflow(t,m),y=ys(o),x=ga(o),w=Dr(o)==="y",{width:k,height:S}=l.floating;let C,P;y==="top"||y==="bottom"?(C=y,P=x===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(P=y,C=x==="end"?"top":"bottom");const _=S-v.top-v.bottom,E=k-v.left-v.right,R=vi(S-v[C],_),N=vi(k-v[P],E),T=!t.middlewareData.shift;let O=R,F=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=E),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(O=_),T&&!x){const I=Dn(v.left,0),Q=Dn(v.right,0),U=Dn(v.top,0),ee=Dn(v.bottom,0);w?F=k-2*(I!==0||Q!==0?I+Q:Dn(v.left,v.right)):O=S-2*(U!==0||ee!==0?U+ee:Dn(v.top,v.bottom))}await h({...t,availableWidth:F,availableHeight:O});const L=await u.getDimensions(c.floating);return k!==L.width||S!==L.height?{reset:{rects:!0}}:{}}}};function ed(){return typeof window<"u"}function va(e){return G0(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(G0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function G0(e){return ed()?e instanceof Node||e instanceof $n(e).Node:!1}function br(e){return ed()?e instanceof Element||e instanceof $n(e).Element:!1}function Ur(e){return ed()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function Rx(e){return!ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}const _N=new Set(["inline","contents"]);function Ll(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!_N.has(o)}const kN=new Set(["table","td","th"]);function jN(e){return kN.has(va(e))}const EN=[":popover-open",":modal"];function td(e){return EN.some(t=>{try{return e.matches(t)}catch{return!1}})}const RN=["transform","translate","scale","rotate","perspective"],PN=["transform","translate","scale","rotate","perspective","filter"],NN=["paint","layout","strict","content"];function Yp(e){const t=Xp(),n=br(e)?Cr(e):e;return RN.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||PN.some(i=>(n.willChange||"").includes(i))||NN.some(i=>(n.contain||"").includes(i))}function TN(e){let t=yi(e);for(;Ur(t)&&!ca(t);){if(Yp(t))return t;if(td(t))return null;t=yi(t)}return null}function Xp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ON=new Set(["html","body","#document"]);function ca(e){return ON.has(va(e))}function Cr(e){return $n(e).getComputedStyle(e)}function nd(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yi(e){if(va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rx(e)&&e.host||Wr(e);return Rx(t)?t.host:t}function Y0(e){const t=yi(e);return ca(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ur(t)&&Ll(t)?t:Y0(t)}function _l(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Y0(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),u=$n(o);if(l){const c=rp(u);return t.concat(u,u.visualViewport||[],Ll(o)?o:[],c&&n?_l(c):[])}return t.concat(o,_l(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X0(e){const t=Cr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Ur(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:i,c=Au(n)!==l||Au(i)!==u;return c&&(n=l,i=u),{width:n,height:i,$:c}}function Jp(e){return br(e)?e:e.contextElement}function Wo(e){const t=Jp(e);if(!Ur(t))return Vr(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:l}=X0(t);let u=(l?Au(n.width):n.width)/i,c=(l?Au(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const AN=Vr(0);function J0(e){const t=$n(e);return!Xp()||!t.visualViewport?AN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function io(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Jp(e);let u=Vr(1);t&&(i?br(i)&&(u=Wo(i)):u=Wo(e));const c=IN(l,n,i)?J0(l):Vr(0);let h=(o.left+c.x)/u.x,m=(o.top+c.y)/u.y,v=o.width/u.x,y=o.height/u.y;if(l){const x=$n(l),w=i&&br(i)?$n(i):i;let k=x,S=rp(k);for(;S&&i&&w!==k;){const C=Wo(S),P=S.getBoundingClientRect(),_=Cr(S),E=P.left+(S.clientLeft+parseFloat(_.paddingLeft))*C.x,R=P.top+(S.clientTop+parseFloat(_.paddingTop))*C.y;h*=C.x,m*=C.y,v*=C.x,y*=C.y,h+=E,m+=R,k=$n(S),S=rp(k)}}return Mu({width:v,height:y,x:h,y:m})}function rd(e,t){const n=nd(e).scrollLeft;return t?t.left+n:io(Wr(e)).left+n}function eS(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-rd(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function MN(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const l=o==="fixed",u=Wr(i),c=t?td(t.floating):!1;if(i===u||c&&l)return n;let h={scrollLeft:0,scrollTop:0},m=Vr(1);const v=Vr(0),y=Ur(i);if((y||!y&&!l)&&((va(i)!=="body"||Ll(u))&&(h=nd(i)),Ur(i))){const w=io(i);m=Wo(i),v.x=w.x+i.clientLeft,v.y=w.y+i.clientTop}const x=u&&!y&&!l?eS(u,h):Vr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+v.x+x.x,y:n.y*m.y-h.scrollTop*m.y+v.y+x.y}}function LN(e){return Array.from(e.getClientRects())}function FN(e){const t=Wr(e),n=nd(e),i=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Dn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+rd(e);const c=-n.scrollTop;return Cr(i).direction==="rtl"&&(u+=Dn(t.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:c}}const Px=25;function DN(e,t){const n=$n(e),i=Wr(e),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,c=0,h=0;if(o){l=o.width,u=o.height;const v=Xp();(!v||v&&t==="fixed")&&(c=o.offsetLeft,h=o.offsetTop)}const m=rd(i);if(m<=0){const v=i.ownerDocument,y=v.body,x=getComputedStyle(y),w=v.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,k=Math.abs(i.clientWidth-y.clientWidth-w);k<=Px&&(l-=k)}else m<=Px&&(l+=m);return{width:l,height:u,x:c,y:h}}const zN=new Set(["absolute","fixed"]);function VN(e,t){const n=io(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,l=Ur(e)?Wo(e):Vr(1),u=e.clientWidth*l.x,c=e.clientHeight*l.y,h=o*l.x,m=i*l.y;return{width:u,height:c,x:h,y:m}}function Nx(e,t,n){let i;if(t==="viewport")i=DN(e,n);else if(t==="document")i=FN(Wr(e));else if(br(t))i=VN(t,n);else{const o=J0(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Mu(i)}function tS(e,t){const n=yi(e);return n===t||!br(n)||ca(n)?!1:Cr(n).position==="fixed"||tS(n,t)}function $N(e,t){const n=t.get(e);if(n)return n;let i=_l(e,[],!1).filter(c=>br(c)&&va(c)!=="body"),o=null;const l=Cr(e).position==="fixed";let u=l?yi(e):e;for(;br(u)&&!ca(u);){const c=Cr(u),h=Yp(u);!h&&c.position==="fixed"&&(o=null),(l?!h&&!o:!h&&c.position==="static"&&!!o&&zN.has(o.position)||Ll(u)&&!h&&tS(e,u))?i=i.filter(v=>v!==u):o=c,u=yi(u)}return t.set(e,i),i}function BN(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const u=[...n==="clippingAncestors"?td(t)?[]:$N(t,this._c):[].concat(n),i],c=u[0],h=u.reduce((m,v)=>{const y=Nx(t,v,o);return m.top=Dn(y.top,m.top),m.right=vi(y.right,m.right),m.bottom=vi(y.bottom,m.bottom),m.left=Dn(y.left,m.left),m},Nx(t,c,o));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function UN(e){const{width:t,height:n}=X0(e);return{width:t,height:n}}function WN(e,t,n){const i=Ur(t),o=Wr(t),l=n==="fixed",u=io(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const h=Vr(0);function m(){h.x=rd(o)}if(i||!i&&!l)if((va(t)!=="body"||Ll(o))&&(c=nd(t)),i){const w=io(t,!0,l,t);h.x=w.x+t.clientLeft,h.y=w.y+t.clientTop}else o&&m();l&&!i&&o&&m();const v=o&&!i&&!l?eS(o,c):Vr(0),y=u.left+c.scrollLeft-h.x-v.x,x=u.top+c.scrollTop-h.y-v.y;return{x:y,y:x,width:u.width,height:u.height}}function wh(e){return Cr(e).position==="static"}function Tx(e,t){if(!Ur(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function nS(e,t){const n=$n(e);if(td(e))return n;if(!Ur(e)){let o=yi(e);for(;o&&!ca(o);){if(br(o)&&!wh(o))return o;o=yi(o)}return n}let i=Tx(e,t);for(;i&&jN(i)&&wh(i);)i=Tx(i,t);return i&&ca(i)&&wh(i)&&!Yp(i)?n:i||TN(e)||n}const HN=async function(e){const t=this.getOffsetParent||nS,n=this.getDimensions,i=await n(e.floating);return{reference:WN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function KN(e){return Cr(e).direction==="rtl"}const QN={convertOffsetParentRelativeRectToViewportRelativeRect:MN,getDocumentElement:Wr,getClippingRect:BN,getOffsetParent:nS,getElementRects:HN,getClientRects:LN,getDimensions:UN,getScale:Wo,isElement:br,isRTL:KN};function rS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZN(e,t){let n=null,i;const o=Wr(e);function l(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function u(c,h){c===void 0&&(c=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:v,top:y,width:x,height:w}=m;if(c||t(),!x||!w)return;const k=nu(y),S=nu(o.clientWidth-(v+x)),C=nu(o.clientHeight-(y+w)),P=nu(v),E={rootMargin:-k+"px "+-S+"px "+-C+"px "+-P+"px",threshold:Dn(0,vi(1,h))||1};let R=!0;function N(T){const O=T[0].intersectionRatio;if(O!==h){if(!R)return u();O?u(!1,O):i=setTimeout(()=>{u(!1,1e-7)},1e3)}O===1&&!rS(m,e.getBoundingClientRect())&&u(),R=!1}try{n=new IntersectionObserver(N,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,E)}n.observe(e)}return u(!0),l}function qN(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,m=Jp(e),v=o||l?[...m?_l(m):[],..._l(t)]:[];v.forEach(P=>{o&&P.addEventListener("scroll",n,{passive:!0}),l&&P.addEventListener("resize",n)});const y=m&&c?ZN(m,n):null;let x=-1,w=null;u&&(w=new ResizeObserver(P=>{let[_]=P;_&&_.target===m&&w&&(w.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var E;(E=w)==null||E.observe(t)})),n()}),m&&!h&&w.observe(m),w.observe(t));let k,S=h?io(e):null;h&&C();function C(){const P=io(e);S&&!rS(S,P)&&n(),S=P,k=requestAnimationFrame(C)}return n(),()=>{var P;v.forEach(_=>{o&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),y==null||y(),(P=w)==null||P.disconnect(),w=null,h&&cancelAnimationFrame(k)}}const GN=wN,YN=SN,XN=vN,JN=CN,eT=yN,Ox=gN,tT=bN,nT=(e,t,n)=>{const i=new Map,o={platform:QN,...n},l={...o.platform,_c:i};return mN(e,t,{...o,platform:l})};var rT=typeof document<"u",sT=function(){},uu=rT?b.useLayoutEffect:sT;function Lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Lu(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&e.$$typeof)&&!Lu(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function sS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ax(e,t){const n=sS(e);return Math.round(t*n)/n}function Sh(e){const t=b.useRef(e);return uu(()=>{t.current=e}),t}function iT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:h,open:m}=e,[v,y]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,w]=b.useState(i);Lu(x,i)||w(i);const[k,S]=b.useState(null),[C,P]=b.useState(null),_=b.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),E=b.useCallback(B=>{B!==O.current&&(O.current=B,P(B))},[]),R=l||k,N=u||C,T=b.useRef(null),O=b.useRef(null),F=b.useRef(v),L=h!=null,I=Sh(h),Q=Sh(o),U=Sh(m),ee=b.useCallback(()=>{if(!T.current||!O.current)return;const B={placement:t,strategy:n,middleware:x};Q.current&&(B.platform=Q.current),nT(T.current,O.current,B).then(J=>{const Z={...J,isPositioned:U.current!==!1};te.current&&!Lu(F.current,Z)&&(F.current=Z,fa.flushSync(()=>{y(Z)}))})},[x,t,n,Q,U]);uu(()=>{m===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,y(B=>({...B,isPositioned:!1})))},[m]);const te=b.useRef(!1);uu(()=>(te.current=!0,()=>{te.current=!1}),[]),uu(()=>{if(R&&(T.current=R),N&&(O.current=N),R&&N){if(I.current)return I.current(R,N,ee);ee()}},[R,N,ee,I,L]);const ie=b.useMemo(()=>({reference:T,floating:O,setReference:_,setFloating:E}),[_,E]),X=b.useMemo(()=>({reference:R,floating:N}),[R,N]),oe=b.useMemo(()=>{const B={position:n,left:0,top:0};if(!X.floating)return B;const J=Ax(X.floating,v.x),Z=Ax(X.floating,v.y);return c?{...B,transform:"translate("+J+"px, "+Z+"px)",...sS(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:Z}},[n,c,X.floating,v.x,v.y]);return b.useMemo(()=>({...v,update:ee,refs:ie,elements:X,floatingStyles:oe}),[v,ee,ie,X,oe])}const oT=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?Ox({element:i.current,padding:o}).fn(n):{}:i?Ox({element:i,padding:o}).fn(n):{}}}},aT=(e,t)=>({...GN(e),options:[e,t]}),lT=(e,t)=>({...YN(e),options:[e,t]}),cT=(e,t)=>({...tT(e),options:[e,t]}),uT=(e,t)=>({...XN(e),options:[e,t]}),dT=(e,t)=>({...JN(e),options:[e,t]}),fT=(e,t)=>({...eT(e),options:[e,t]}),hT=(e,t)=>({...oT(e),options:[e,t]});var pT="Arrow",iS=b.forwardRef((e,t)=>{const{children:n,width:i=10,height:o=5,...l}=e;return f.jsx(ct.svg,{...l,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});iS.displayName=pT;var mT=iS;function gT(e){const[t,n]=b.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,c;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,c=m.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var em="Popper",[oS,aS]=ma(em),[vT,lS]=oS(em),cS=e=>{const{__scopePopper:t,children:n}=e,[i,o]=b.useState(null);return f.jsx(vT,{scope:t,anchor:i,onAnchorChange:o,children:n})};cS.displayName=em;var uS="PopperAnchor",dS=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...o}=e,l=lS(uS,n),u=b.useRef(null),c=It(t,u),h=b.useRef(null);return b.useEffect(()=>{const m=h.current;h.current=(i==null?void 0:i.current)||u.current,m!==h.current&&l.onAnchorChange(h.current)}),i?null:f.jsx(ct.div,{...o,ref:c})});dS.displayName=uS;var tm="PopperContent",[yT,xT]=oS(tm),fS=b.forwardRef((e,t)=>{var se,ve,Oe,Te,Le,Ue;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:x=!1,updatePositionStrategy:w="optimized",onPlaced:k,...S}=e,C=lS(tm,n),[P,_]=b.useState(null),E=It(t,dt=>_(dt)),[R,N]=b.useState(null),T=gT(R),O=(T==null?void 0:T.width)??0,F=(T==null?void 0:T.height)??0,L=i+(l!=="center"?"-"+l:""),I=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},Q=Array.isArray(m)?m:[m],U=Q.length>0,ee={padding:I,boundary:Q.filter(ST),altBoundary:U},{refs:te,floatingStyles:ie,placement:X,isPositioned:oe,middlewareData:B}=iT({strategy:"fixed",placement:L,whileElementsMounted:(...dt)=>qN(...dt,{animationFrame:w==="always"}),elements:{reference:C.anchor},middleware:[aT({mainAxis:o+F,alignmentAxis:u}),h&&lT({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?cT():void 0,...ee}),h&&uT({...ee}),dT({...ee,apply:({elements:dt,rects:Mt,availableWidth:tn,availableHeight:Yt})=>{const{width:Dt,height:et}=Mt.reference,Nt=dt.floating.style;Nt.setProperty("--radix-popper-available-width",`${tn}px`),Nt.setProperty("--radix-popper-available-height",`${Yt}px`),Nt.setProperty("--radix-popper-anchor-width",`${Dt}px`),Nt.setProperty("--radix-popper-anchor-height",`${et}px`)}}),R&&hT({element:R,padding:c}),bT({arrowWidth:O,arrowHeight:F}),x&&fT({strategy:"referenceHidden",...ee})]}),[J,Z]=mS(X),M=pi(k);dn(()=>{oe&&(M==null||M())},[oe,M]);const G=(se=B.arrow)==null?void 0:se.x,Re=(ve=B.arrow)==null?void 0:ve.y,ge=((Oe=B.arrow)==null?void 0:Oe.centerOffset)!==0,[Ne,ne]=b.useState();return dn(()=>{P&&ne(window.getComputedStyle(P).zIndex)},[P]),f.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:oe?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(Te=B.transformOrigin)==null?void 0:Te.x,(Le=B.transformOrigin)==null?void 0:Le.y].join(" "),...((Ue=B.hide)==null?void 0:Ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(yT,{scope:n,placedSide:J,onArrowChange:N,arrowX:G,arrowY:Re,shouldHideArrow:ge,children:f.jsx(ct.div,{"data-side":J,"data-align":Z,...S,ref:E,style:{...S.style,animation:oe?void 0:"none"}})})})});fS.displayName=tm;var hS="PopperArrow",wT={top:"bottom",right:"left",bottom:"top",left:"right"},pS=b.forwardRef(function(t,n){const{__scopePopper:i,...o}=t,l=xT(hS,i),u=wT[l.placedSide];return f.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:f.jsx(mT,{...o,ref:n,style:{...o.style,display:"block"}})})});pS.displayName=hS;function ST(e){return e!==null}var bT=e=>({name:"transformOrigin",options:e,fn(t){var C,P,_;const{placement:n,rects:i,middlewareData:o}=t,u=((C=o.arrow)==null?void 0:C.centerOffset)!==0,c=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,v]=mS(n),y={start:"0%",center:"50%",end:"100%"}[v],x=(((P=o.arrow)==null?void 0:P.x)??0)+c/2,w=(((_=o.arrow)==null?void 0:_.y)??0)+h/2;let k="",S="";return m==="bottom"?(k=u?y:`${x}px`,S=`${-h}px`):m==="top"?(k=u?y:`${x}px`,S=`${i.floating.height+h}px`):m==="right"?(k=`${-h}px`,S=u?y:`${w}px`):m==="left"&&(k=`${i.floating.width+h}px`,S=u?y:`${w}px`),{data:{x:k,y:S}}}});function mS(e){const[t,n="center"]=e.split("-");return[t,n]}var CT=cS,_T=dS,kT=fS,jT=pS;function ET(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),RT="VisuallyHidden",PT=b.forwardRef((e,t)=>f.jsx(ct.span,{...e,ref:t,style:{...gS,...e.style}}));PT.displayName=RT;var NT=[" ","Enter","ArrowUp","ArrowDown"],TT=[" ","Enter"],oo="Select",[sd,id,OT]=Q0(oo),[ya]=ma(oo,[OT,aS]),od=aS(),[AT,xi]=ya(oo),[IT,MT]=ya(oo),vS=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:o,onOpenChange:l,value:u,defaultValue:c,onValueChange:h,dir:m,name:v,autoComplete:y,disabled:x,required:w,form:k}=e,S=od(t),[C,P]=b.useState(null),[_,E]=b.useState(null),[R,N]=b.useState(!1),T=Qp(m),[O,F]=vl({prop:i,defaultProp:o??!1,onChange:l,caller:oo}),[L,I]=vl({prop:u,defaultProp:c,onChange:h,caller:oo}),Q=b.useRef(null),U=C?k||!!C.closest("form"):!0,[ee,te]=b.useState(new Set),ie=Array.from(ee).map(X=>X.props.value).join(";");return f.jsx(CT,{...S,children:f.jsxs(AT,{required:w,scope:t,trigger:C,onTriggerChange:P,valueNode:_,onValueNodeChange:E,valueNodeHasChildren:R,onValueNodeHasChildrenChange:N,contentId:di(),value:L,onValueChange:I,open:O,onOpenChange:F,dir:T,triggerPointerDownPosRef:Q,disabled:x,children:[f.jsx(sd.Provider,{scope:t,children:f.jsx(IT,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(X=>{te(oe=>new Set(oe).add(X))},[]),onNativeOptionRemove:b.useCallback(X=>{te(oe=>{const B=new Set(oe);return B.delete(X),B})},[]),children:n})}),U?f.jsxs(FS,{"aria-hidden":!0,required:w,tabIndex:-1,name:v,autoComplete:y,value:L,onChange:X=>I(X.target.value),disabled:x,form:k,children:[L===void 0?f.jsx("option",{value:""}):null,Array.from(ee)]},ie):null]})})};vS.displayName=oo;var yS="SelectTrigger",xS=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...o}=e,l=od(n),u=xi(yS,n),c=u.disabled||i,h=It(t,u.onTriggerChange),m=id(n),v=b.useRef("touch"),[y,x,w]=zS(S=>{const C=m().filter(E=>!E.disabled),P=C.find(E=>E.value===u.value),_=VS(C,S,P);_!==void 0&&u.onValueChange(_.value)}),k=S=>{c||(u.onOpenChange(!0),w()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return f.jsx(_T,{asChild:!0,...l,children:f.jsx(ct.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":DS(u.value)?"":void 0,...o,ref:h,onClick:Je(o.onClick,S=>{S.currentTarget.focus(),v.current!=="mouse"&&k(S)}),onPointerDown:Je(o.onPointerDown,S=>{v.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(k(S),S.preventDefault())}),onKeyDown:Je(o.onKeyDown,S=>{const C=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(C&&S.key===" ")&&NT.includes(S.key)&&(k(),S.preventDefault())})})})});xS.displayName=yS;var wS="SelectValue",SS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:u="",...c}=e,h=xi(wS,n),{onValueNodeHasChildrenChange:m}=h,v=l!==void 0,y=It(t,h.onValueNodeChange);return dn(()=>{m(v)},[m,v]),f.jsx(ct.span,{...c,ref:y,style:{pointerEvents:"none"},children:DS(h.value)?f.jsx(f.Fragment,{children:u}):l})});SS.displayName=wS;var LT="SelectIcon",bS=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...o}=e;return f.jsx(ct.span,{"aria-hidden":!0,...o,ref:t,children:i||"▼"})});bS.displayName=LT;var FT="SelectPortal",CS=e=>f.jsx(Mp,{asChild:!0,...e});CS.displayName=FT;var ao="SelectContent",_S=b.forwardRef((e,t)=>{const n=xi(ao,e.__scopeSelect),[i,o]=b.useState();if(dn(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?fa.createPortal(f.jsx(kS,{scope:e.__scopeSelect,children:f.jsx(sd.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),l):null}return f.jsx(jS,{...e,ref:t})});_S.displayName=ao;var vr=10,[kS,wi]=ya(ao),DT="SelectContentImpl",zT=yl("SelectContent.RemoveScroll"),jS=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:u,side:c,sideOffset:h,align:m,alignOffset:v,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:k,hideWhenDetached:S,avoidCollisions:C,...P}=e,_=xi(ao,n),[E,R]=b.useState(null),[N,T]=b.useState(null),O=It(t,se=>R(se)),[F,L]=b.useState(null),[I,Q]=b.useState(null),U=id(n),[ee,te]=b.useState(!1),ie=b.useRef(!1);b.useEffect(()=>{if(E)return v0(E)},[E]),l0();const X=b.useCallback(se=>{const[ve,...Oe]=U().map(Ue=>Ue.ref.current),[Te]=Oe.slice(-1),Le=document.activeElement;for(const Ue of se)if(Ue===Le||(Ue==null||Ue.scrollIntoView({block:"nearest"}),Ue===ve&&N&&(N.scrollTop=0),Ue===Te&&N&&(N.scrollTop=N.scrollHeight),Ue==null||Ue.focus(),document.activeElement!==Le))return},[U,N]),oe=b.useCallback(()=>X([F,E]),[X,F,E]);b.useEffect(()=>{ee&&oe()},[ee,oe]);const{onOpenChange:B,triggerPointerDownPosRef:J}=_;b.useEffect(()=>{if(E){let se={x:0,y:0};const ve=Te=>{var Le,Ue;se={x:Math.abs(Math.round(Te.pageX)-(((Le=J.current)==null?void 0:Le.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((Ue=J.current)==null?void 0:Ue.y)??0))}},Oe=Te=>{se.x<=10&&se.y<=10?Te.preventDefault():E.contains(Te.target)||B(!1),document.removeEventListener("pointermove",ve),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[E,B,J]),b.useEffect(()=>{const se=()=>B(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[B]);const[Z,M]=zS(se=>{const ve=U().filter(Le=>!Le.disabled),Oe=ve.find(Le=>Le.ref.current===document.activeElement),Te=VS(ve,se,Oe);Te&&setTimeout(()=>Te.ref.current.focus())}),G=b.useCallback((se,ve,Oe)=>{const Te=!ie.current&&!Oe;(_.value!==void 0&&_.value===ve||Te)&&(L(se),Te&&(ie.current=!0))},[_.value]),Re=b.useCallback(()=>E==null?void 0:E.focus(),[E]),ge=b.useCallback((se,ve,Oe)=>{const Te=!ie.current&&!Oe;(_.value!==void 0&&_.value===ve||Te)&&Q(se)},[_.value]),Ne=i==="popper"?sp:ES,ne=Ne===sp?{side:c,sideOffset:h,align:m,alignOffset:v,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:k,hideWhenDetached:S,avoidCollisions:C}:{};return f.jsx(kS,{scope:n,content:E,viewport:N,onViewportChange:T,itemRefCallback:G,selectedItem:F,onItemLeave:Re,itemTextRefCallback:ge,focusSelectedItem:oe,selectedItemText:I,position:i,isPositioned:ee,searchRef:Z,children:f.jsx(Lp,{as:zT,allowPinchZoom:!0,children:f.jsx(Ip,{asChild:!0,trapped:_.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:Je(o,se=>{var ve;(ve=_.trigger)==null||ve.focus({preventScroll:!0}),se.preventDefault()}),children:f.jsx(Ap,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:f.jsx(Ne,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:se=>se.preventDefault(),...P,...ne,onPlaced:()=>te(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...P.style},onKeyDown:Je(P.onKeyDown,se=>{const ve=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ve&&se.key.length===1&&M(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let Te=U().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);if(["ArrowUp","End"].includes(se.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Le=se.target,Ue=Te.indexOf(Le);Te=Te.slice(Ue+1)}setTimeout(()=>X(Te)),se.preventDefault()}})})})})})})});jS.displayName=DT;var VT="SelectItemAlignedPosition",ES=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...o}=e,l=xi(ao,n),u=wi(ao,n),[c,h]=b.useState(null),[m,v]=b.useState(null),y=It(t,O=>v(O)),x=id(n),w=b.useRef(!1),k=b.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:P,focusSelectedItem:_}=u,E=b.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&m&&S&&C&&P){const O=l.trigger.getBoundingClientRect(),F=m.getBoundingClientRect(),L=l.valueNode.getBoundingClientRect(),I=P.getBoundingClientRect();if(l.dir!=="rtl"){const Le=I.left-F.left,Ue=L.left-Le,dt=O.left-Ue,Mt=O.width+dt,tn=Math.max(Mt,F.width),Yt=window.innerWidth-vr,Dt=bx(Ue,[vr,Math.max(vr,Yt-tn)]);c.style.minWidth=Mt+"px",c.style.left=Dt+"px"}else{const Le=F.right-I.right,Ue=window.innerWidth-L.right-Le,dt=window.innerWidth-O.right-Ue,Mt=O.width+dt,tn=Math.max(Mt,F.width),Yt=window.innerWidth-vr,Dt=bx(Ue,[vr,Math.max(vr,Yt-tn)]);c.style.minWidth=Mt+"px",c.style.right=Dt+"px"}const Q=x(),U=window.innerHeight-vr*2,ee=S.scrollHeight,te=window.getComputedStyle(m),ie=parseInt(te.borderTopWidth,10),X=parseInt(te.paddingTop,10),oe=parseInt(te.borderBottomWidth,10),B=parseInt(te.paddingBottom,10),J=ie+X+ee+B+oe,Z=Math.min(C.offsetHeight*5,J),M=window.getComputedStyle(S),G=parseInt(M.paddingTop,10),Re=parseInt(M.paddingBottom,10),ge=O.top+O.height/2-vr,Ne=U-ge,ne=C.offsetHeight/2,se=C.offsetTop+ne,ve=ie+X+se,Oe=J-ve;if(ve<=ge){const Le=Q.length>0&&C===Q[Q.length-1].ref.current;c.style.bottom="0px";const Ue=m.clientHeight-S.offsetTop-S.offsetHeight,dt=Math.max(Ne,ne+(Le?Re:0)+Ue+oe),Mt=ve+dt;c.style.height=Mt+"px"}else{const Le=Q.length>0&&C===Q[0].ref.current;c.style.top="0px";const dt=Math.max(ge,ie+S.offsetTop+(Le?G:0)+ne)+Oe;c.style.height=dt+"px",S.scrollTop=ve-ge+S.offsetTop}c.style.margin=`${vr}px 0`,c.style.minHeight=Z+"px",c.style.maxHeight=U+"px",i==null||i(),requestAnimationFrame(()=>w.current=!0)}},[x,l.trigger,l.valueNode,c,m,S,C,P,l.dir,i]);dn(()=>E(),[E]);const[R,N]=b.useState();dn(()=>{m&&N(window.getComputedStyle(m).zIndex)},[m]);const T=b.useCallback(O=>{O&&k.current===!0&&(E(),_==null||_(),k.current=!1)},[E,_]);return f.jsx(BT,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:w,onScrollButtonChange:T,children:f.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:f.jsx(ct.div,{...o,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ES.displayName=VT;var $T="SelectPopperPosition",sp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=vr,...l}=e,u=od(n);return f.jsx(kT,{...u,...l,ref:t,align:i,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sp.displayName=$T;var[BT,nm]=ya(ao,{}),ip="SelectViewport",RS=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...o}=e,l=wi(ip,n),u=nm(ip,n),c=It(t,l.onViewportChange),h=b.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),f.jsx(sd.Slot,{scope:n,children:f.jsx(ct.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Je(o.onScroll,m=>{const v=m.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:x}=u;if(x!=null&&x.current&&y){const w=Math.abs(h.current-v.scrollTop);if(w>0){const k=window.innerHeight-vr*2,S=parseFloat(y.style.minHeight),C=parseFloat(y.style.height),P=Math.max(S,C);if(P<k){const _=P+w,E=Math.min(k,_),R=_-E;y.style.height=E+"px",y.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,y.style.justifyContent="flex-end")}}}h.current=v.scrollTop})})})]})});RS.displayName=ip;var PS="SelectGroup",[UT,WT]=ya(PS),HT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=di();return f.jsx(UT,{scope:n,id:o,children:f.jsx(ct.div,{role:"group","aria-labelledby":o,...i,ref:t})})});HT.displayName=PS;var NS="SelectLabel",KT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=WT(NS,n);return f.jsx(ct.div,{id:o.id,...i,ref:t})});KT.displayName=NS;var Fu="SelectItem",[QT,TS]=ya(Fu),OS=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...u}=e,c=xi(Fu,n),h=wi(Fu,n),m=c.value===i,[v,y]=b.useState(l??""),[x,w]=b.useState(!1),k=It(t,_=>{var E;return(E=h.itemRefCallback)==null?void 0:E.call(h,_,i,o)}),S=di(),C=b.useRef("touch"),P=()=>{o||(c.onValueChange(i),c.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(QT,{scope:n,value:i,disabled:o,textId:S,isSelected:m,onItemTextChange:b.useCallback(_=>{y(E=>E||((_==null?void 0:_.textContent)??"").trim())},[]),children:f.jsx(sd.ItemSlot,{scope:n,value:i,disabled:o,textValue:v,children:f.jsx(ct.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:k,onFocus:Je(u.onFocus,()=>w(!0)),onBlur:Je(u.onBlur,()=>w(!1)),onClick:Je(u.onClick,()=>{C.current!=="mouse"&&P()}),onPointerUp:Je(u.onPointerUp,()=>{C.current==="mouse"&&P()}),onPointerDown:Je(u.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:Je(u.onPointerMove,_=>{var E;C.current=_.pointerType,o?(E=h.onItemLeave)==null||E.call(h):C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(u.onPointerLeave,_=>{var E;_.currentTarget===document.activeElement&&((E=h.onItemLeave)==null||E.call(h))}),onKeyDown:Je(u.onKeyDown,_=>{var R;((R=h.searchRef)==null?void 0:R.current)!==""&&_.key===" "||(TT.includes(_.key)&&P(),_.key===" "&&_.preventDefault())})})})})});OS.displayName=Fu;var cl="SelectItemText",AS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:o,...l}=e,u=xi(cl,n),c=wi(cl,n),h=TS(cl,n),m=MT(cl,n),[v,y]=b.useState(null),x=It(t,P=>y(P),h.onItemTextChange,P=>{var _;return(_=c.itemTextRefCallback)==null?void 0:_.call(c,P,h.value,h.disabled)}),w=v==null?void 0:v.textContent,k=b.useMemo(()=>f.jsx("option",{value:h.value,disabled:h.disabled,children:w},h.value),[h.disabled,h.value,w]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=m;return dn(()=>(S(k),()=>C(k)),[S,C,k]),f.jsxs(f.Fragment,{children:[f.jsx(ct.span,{id:h.textId,...l,ref:x}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?fa.createPortal(l.children,u.valueNode):null]})});AS.displayName=cl;var IS="SelectItemIndicator",MS=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return TS(IS,n).isSelected?f.jsx(ct.span,{"aria-hidden":!0,...i,ref:t}):null});MS.displayName=IS;var op="SelectScrollUpButton",ZT=b.forwardRef((e,t)=>{const n=wi(op,e.__scopeSelect),i=nm(op,e.__scopeSelect),[o,l]=b.useState(!1),u=It(t,i.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const m=h.scrollTop>0;l(m)};const h=n.viewport;return c(),h.addEventListener("scroll",c),()=>h.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?f.jsx(LS,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:h}=n;c&&h&&(c.scrollTop=c.scrollTop-h.offsetHeight)}}):null});ZT.displayName=op;var ap="SelectScrollDownButton",qT=b.forwardRef((e,t)=>{const n=wi(ap,e.__scopeSelect),i=nm(ap,e.__scopeSelect),[o,l]=b.useState(!1),u=It(t,i.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const m=h.scrollHeight-h.clientHeight,v=Math.ceil(h.scrollTop)<m;l(v)};const h=n.viewport;return c(),h.addEventListener("scroll",c),()=>h.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?f.jsx(LS,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:h}=n;c&&h&&(c.scrollTop=c.scrollTop+h.offsetHeight)}}):null});qT.displayName=ap;var LS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=e,l=wi("SelectScrollButton",n),u=b.useRef(null),c=id(n),h=b.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return b.useEffect(()=>()=>h(),[h]),dn(()=>{var v;const m=c().find(y=>y.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),f.jsx(ct.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Je(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Je(o.onPointerMove,()=>{var m;(m=l.onItemLeave)==null||m.call(l),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Je(o.onPointerLeave,()=>{h()})})}),GT="SelectSeparator",YT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return f.jsx(ct.div,{"aria-hidden":!0,...i,ref:t})});YT.displayName=GT;var lp="SelectArrow",XT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=od(n),l=xi(lp,n),u=wi(lp,n);return l.open&&u.position==="popper"?f.jsx(jT,{...o,...i,ref:t}):null});XT.displayName=lp;var JT="SelectBubbleInput",FS=b.forwardRef(({__scopeSelect:e,value:t,...n},i)=>{const o=b.useRef(null),l=It(i,o),u=ET(t);return b.useEffect(()=>{const c=o.current;if(!c)return;const h=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&v){const y=new Event("change",{bubbles:!0});v.call(c,t),c.dispatchEvent(y)}},[u,t]),f.jsx(ct.select,{...n,style:{...gS,...n.style},ref:l,defaultValue:t})});FS.displayName=JT;function DS(e){return e===""||e===void 0}function zS(e){const t=pi(e),n=b.useRef(""),i=b.useRef(0),o=b.useCallback(u=>{const c=n.current+u;t(c),(function h(m){n.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(c)},[t]),l=b.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function VS(e,t,n){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=eO(e,Math.max(l,0));o.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}function eO(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var tO=vS,nO=xS,rO=SS,sO=bS,iO=CS,oO=_S,aO=RS,lO=OS,cO=AS,uO=MS;const Un=tO,Wn=rO,Rn=b.forwardRef(({className:e,children:t,...n},i)=>f.jsxs(nO,{ref:i,className:pt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,f.jsx(sO,{asChild:!0,children:f.jsx(Dw,{className:"h-4 w-4 opacity-50"})})]}));Rn.displayName="SelectTrigger";const Pn=b.forwardRef(({className:e,children:t,position:n="popper",...i},o)=>f.jsx(iO,{children:f.jsx(oO,{ref:o,className:pt("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-background text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:f.jsx(aO,{className:pt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Pn.displayName="SelectContent";const ft=b.forwardRef(({className:e,children:t,...n},i)=>f.jsxs(lO,{ref:i,className:pt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(uO,{children:f.jsx(Zk,{className:"h-4 w-4"})})}),f.jsx(cO,{children:t})]}));ft.displayName="SelectItem";const dO=eN({name:tu().min(1,"Name is required"),transport:tN(["stdio","sse","streamable-http"]),command:tu().optional(),args:tu().optional(),url:tu().optional()});function fO({defaultValues:e,onSubmit:t,loading:n}){const i=CP({resolver:EP(dO),defaultValues:{name:"",transport:"stdio",...e}}),o=i.watch("transport");function l(u){t({name:u.name,transport:u.transport,command:u.command||void 0,args:u.args?u.args.split(",").map(c=>c.trim()).filter(Boolean):void 0,url:u.url||void 0})}return f.jsxs("form",{onSubmit:i.handleSubmit(l),className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Name"}),f.jsx(en,{...i.register("name"),placeholder:"My MCP Server"}),i.formState.errors.name&&f.jsx("p",{className:"text-sm text-destructive mt-1",children:i.formState.errors.name.message})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Transport"}),f.jsxs(Un,{value:o,onValueChange:u=>i.setValue("transport",u),children:[f.jsx(Rn,{children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"stdio",children:"stdio"}),f.jsx(ft,{value:"sse",children:"SSE"}),f.jsx(ft,{value:"streamable-http",children:"Streamable HTTP"})]})]})]}),o==="stdio"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Command"}),f.jsx(en,{...i.register("command"),placeholder:"npx"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Arguments (comma-separated)"}),f.jsx(en,{...i.register("args"),placeholder:"@modelcontextprotocol/server-filesystem, /tmp"})]})]}):f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"URL"}),f.jsx(en,{...i.register("url"),placeholder:"http://localhost:3000/sse"})]}),f.jsx(He,{type:"submit",disabled:n,className:"w-full",children:n?"Saving...":"Save Server"})]})}function hO(){var y,x;const[e,t]=b.useState(!1),[n,i]=b.useState(null),[o,l]=b.useState({}),u=Qu(),c=oE(),h=aE(),m=lE();async function v(w){i(w);try{const k=await m.mutateAsync(w);l(S=>({...S,[w]:k.data}))}catch{l(k=>({...k,[w]:{connected:!1,error:"Request failed"}}))}i(null)}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Servers"}),f.jsxs(_u,{open:e,onOpenChange:t,children:[f.jsx(Vp,{asChild:!0,children:f.jsxs(He,{children:[f.jsx(Uw,{className:"mr-2 h-4 w-4"}),"Add Server"]})}),f.jsxs(xl,{children:[f.jsx(ku,{children:f.jsx(wl,{children:"Add Server Connection"})}),f.jsx(fO,{loading:c.isPending,onSubmit:async w=>{await c.mutateAsync(w),t(!1)}})]})]})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Saved Connections"})}),f.jsx(ot,{children:((y=u.data)==null?void 0:y.data.length)===0?f.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No servers configured yet"}):f.jsxs(Zu,{children:[f.jsx(qu,{children:f.jsxs(no,{children:[f.jsx(cn,{children:"Name"}),f.jsx(cn,{children:"Transport"}),f.jsx(cn,{children:"Endpoint"}),f.jsx(cn,{children:"Status"}),f.jsx(cn,{className:"text-right",children:"Actions"})]})}),f.jsx(Gu,{children:(x=u.data)==null?void 0:x.data.map(w=>{var k;return f.jsxs(no,{children:[f.jsx(un,{className:"font-medium",children:w.name}),f.jsx(un,{children:f.jsx(ut,{variant:"outline",children:w.transport})}),f.jsx(un,{className:"text-sm text-muted-foreground",children:w.command?`${w.command} ${((k=w.args)==null?void 0:k.join(" "))??""}`:w.url??"-"}),f.jsx(un,{children:o[w.id]?o[w.id].connected?f.jsxs(ut,{variant:"success",children:["Connected (",o[w.id].toolCount," tools)"]}):f.jsx(ut,{variant:"destructive",children:o[w.id].error??"Failed"}):null}),f.jsxs(un,{className:"text-right space-x-2",children:[f.jsx(He,{size:"sm",variant:"outline",onClick:()=>v(w.id),disabled:n===w.id,children:n===w.id?f.jsx(Br,{className:"h-4 w-4 animate-spin"}):f.jsx(oj,{className:"h-4 w-4"})}),f.jsx(He,{size:"sm",variant:"ghost",onClick:()=>h.mutate(w.id),children:f.jsx(Al,{className:"h-4 w-4 text-destructive"})})]})]},w.id)})})]})})]})]})}var _n={},Ix;function pO(){if(Ix)return _n;Ix=1;var e=_n&&_n.__assign||function(){return e=Object.assign||function(N){for(var T,O=1,F=arguments.length;O<F;O++){T=arguments[O];for(var L in T)Object.prototype.hasOwnProperty.call(T,L)&&(N[L]=T[L])}return N},e.apply(this,arguments)},t=_n&&_n.__createBinding||(Object.create?(function(N,T,O,F){F===void 0&&(F=O);var L=Object.getOwnPropertyDescriptor(T,O);(!L||("get"in L?!T.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return T[O]}}),Object.defineProperty(N,F,L)}):(function(N,T,O,F){F===void 0&&(F=O),N[F]=T[O]})),n=_n&&_n.__setModuleDefault||(Object.create?(function(N,T){Object.defineProperty(N,"default",{enumerable:!0,value:T})}):function(N,T){N.default=T}),i=_n&&_n.__importStar||function(N){if(N&&N.__esModule)return N;var T={};if(N!=null)for(var O in N)O!=="default"&&Object.prototype.hasOwnProperty.call(N,O)&&t(T,N,O);return n(T,N),T},o=_n&&_n.__rest||function(N,T){var O={};for(var F in N)Object.prototype.hasOwnProperty.call(N,F)&&T.indexOf(F)<0&&(O[F]=N[F]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,F=Object.getOwnPropertySymbols(N);L<F.length;L++)T.indexOf(F[L])<0&&Object.prototype.propertyIsEnumerable.call(N,F[L])&&(O[F[L]]=N[F[L]]);return O};Object.defineProperty(_n,"__esModule",{value:!0});var l=i(ua()),u=89,c=90,h=77,m=57,v=219,y=222,x=192,w=100,k=3e3,S=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),C=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),P="npm__react-simple-code-editor__textarea",_=`
|
|
301
|
+
/**
|
|
302
|
+
* Reset the text fill color so that placeholder is visible
|
|
303
|
+
*/
|
|
304
|
+
.`.concat(P,`:empty {
|
|
305
|
+
-webkit-text-fill-color: inherit !important;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Hack to apply on some CSS on IE10 and IE11
|
|
310
|
+
*/
|
|
311
|
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
312
|
+
/**
|
|
313
|
+
* IE doesn't support '-webkit-text-fill-color'
|
|
314
|
+
* So we use 'color: transparent' to make the text transparent on IE
|
|
315
|
+
* Unlike other browsers, it doesn't affect caret color in IE
|
|
316
|
+
*/
|
|
317
|
+
.`).concat(P,` {
|
|
318
|
+
color: transparent !important;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.`).concat(P,`::selection {
|
|
322
|
+
background-color: #accef7 !important;
|
|
323
|
+
color: transparent !important;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
`),E=l.forwardRef(function(T,O){var F=T.autoFocus,L=T.disabled,I=T.form,Q=T.highlight,U=T.ignoreTabKey,ee=U===void 0?!1:U,te=T.insertSpaces,ie=te===void 0?!0:te,X=T.maxLength,oe=T.minLength,B=T.name,J=T.onBlur,Z=T.onClick,M=T.onFocus,G=T.onKeyDown,Re=T.onKeyUp,ge=T.onValueChange,Ne=T.padding,ne=Ne===void 0?0:Ne,se=T.placeholder,ve=T.preClassName,Oe=T.readOnly,Te=T.required,Le=T.style,Ue=T.tabSize,dt=Ue===void 0?2:Ue,Mt=T.textareaClassName,tn=T.textareaId,Yt=T.value,Dt=o(T,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),et=l.useRef({stack:[],offset:-1}),Nt=l.useRef(null),Nn=l.useState(!0),z=Nn[0],H=Nn[1],Y={paddingTop:typeof ne=="object"?ne.top:ne,paddingRight:typeof ne=="object"?ne.right:ne,paddingBottom:typeof ne=="object"?ne.bottom:ne,paddingLeft:typeof ne=="object"?ne.left:ne},me=Q(Yt),ue=function(he,Ge){return he.substring(0,Ge).split(`
|
|
327
|
+
`)},re=l.useCallback(function(he,Ge){var Ve,Be,vt;Ge===void 0&&(Ge=!1);var Tt=et.current,Tn=Tt.stack,Qn=Tt.offset;if(Tn.length&&Qn>-1){et.current.stack=Tn.slice(0,Qn+1);var Zn=et.current.stack.length;if(Zn>w){var Hr=Zn-w;et.current.stack=Tn.slice(Hr,Zn),et.current.offset=Math.max(et.current.offset-Hr,0)}}var On=Date.now();if(Ge){var ar=et.current.stack[et.current.offset];if(ar&&On-ar.timestamp<k){var Ss=/[^a-z0-9]([a-z0-9]+)$/i,nn=(Ve=ue(ar.value,ar.selectionStart).pop())===null||Ve===void 0?void 0:Ve.match(Ss),Kr=(Be=ue(he.value,he.selectionStart).pop())===null||Be===void 0?void 0:Be.match(Ss);if(nn!=null&&nn[1]&&(!((vt=Kr==null?void 0:Kr[1])===null||vt===void 0)&&vt.startsWith(nn[1]))){et.current.stack[et.current.offset]=e(e({},he),{timestamp:On});return}}}et.current.stack.push(e(e({},he),{timestamp:On})),et.current.offset++},[]),pe=l.useCallback(function(){var he=Nt.current;if(he){var Ge=he.value,Ve=he.selectionStart,Be=he.selectionEnd;re({value:Ge,selectionStart:Ve,selectionEnd:Be})}},[re]),Me=function(he){var Ge=Nt.current;Ge&&(Ge.value=he.value,Ge.selectionStart=he.selectionStart,Ge.selectionEnd=he.selectionEnd,ge==null||ge(he.value))},$e=function(he){var Ge=Nt.current,Ve=et.current.stack[et.current.offset];Ve&&Ge&&(et.current.stack[et.current.offset]=e(e({},Ve),{selectionStart:Ge.selectionStart,selectionEnd:Ge.selectionEnd})),re(he),Me(he)},_t=function(){var he=et.current,Ge=he.stack,Ve=he.offset,Be=Ge[Ve-1];Be&&(Me(Be),et.current.offset=Math.max(Ve-1,0))},fn=function(){var he=et.current,Ge=he.stack,Ve=he.offset,Be=Ge[Ve+1];Be&&(Me(Be),et.current.offset=Math.min(Ve+1,Ge.length-1))},Kn=function(he){if(!(G&&(G(he),he.defaultPrevented))){he.key==="Escape"&&he.currentTarget.blur();var Ge=he.currentTarget,Ve=Ge.value,Be=Ge.selectionStart,vt=Ge.selectionEnd,Tt=(ie?" ":" ").repeat(dt);if(he.key==="Tab"&&!ee&&z)if(he.preventDefault(),he.shiftKey){var Tn=ue(Ve,Be),Qn=Tn.length-1,Zn=ue(Ve,vt).length-1,Hr=Ve.split(`
|
|
328
|
+
`).map(function(cr,Si){return Si>=Qn&&Si<=Zn&&cr.startsWith(Tt)?cr.substring(Tt.length):cr}).join(`
|
|
329
|
+
`);if(Ve!==Hr){var On=Tn[Qn];$e({value:Hr,selectionStart:On!=null&&On.startsWith(Tt)?Be-Tt.length:Be,selectionEnd:vt-(Ve.length-Hr.length)})}}else if(Be!==vt){var Tn=ue(Ve,Be),ar=Tn.length-1,Ss=ue(Ve,vt).length-1,On=Tn[ar];$e({value:Ve.split(`
|
|
330
|
+
`).map(function(bi,co){return co>=ar&&co<=Ss?Tt+bi:bi}).join(`
|
|
331
|
+
`),selectionStart:On&&/\S/.test(On)?Be+Tt.length:Be,selectionEnd:vt+Tt.length*(Ss-ar+1)})}else{var nn=Be+Tt.length;$e({value:Ve.substring(0,Be)+Tt+Ve.substring(vt),selectionStart:nn,selectionEnd:nn})}else if(he.key==="Backspace"){var Kr=Be!==vt,Dl=Ve.substring(0,Be);if(Dl.endsWith(Tt)&&!Kr){he.preventDefault();var nn=Be-Tt.length;$e({value:Ve.substring(0,Be-Tt.length)+Ve.substring(vt),selectionStart:nn,selectionEnd:nn})}}else if(he.key==="Enter"){if(Be===vt){var Qr=ue(Ve,Be).pop(),bs=Qr==null?void 0:Qr.match(/^\s+/);if(bs!=null&&bs[0]){he.preventDefault();var Cs=`
|
|
332
|
+
`+bs[0],nn=Be+Cs.length;$e({value:Ve.substring(0,Be)+Cs+Ve.substring(vt),selectionStart:nn,selectionEnd:nn})}}}else if(he.keyCode===m||he.keyCode===v||he.keyCode===y||he.keyCode===x){var lr=void 0;he.keyCode===m&&he.shiftKey?lr=["(",")"]:he.keyCode===v?he.shiftKey?lr=["{","}"]:lr=["[","]"]:he.keyCode===y?he.shiftKey?lr=['"','"']:lr=["'","'"]:he.keyCode===x&&!he.shiftKey&&(lr=["`","`"]),Be!==vt&&lr&&(he.preventDefault(),$e({value:Ve.substring(0,Be)+lr[0]+Ve.substring(Be,vt)+lr[1]+Ve.substring(vt),selectionStart:Be,selectionEnd:vt+2}))}else(C?he.metaKey&&he.keyCode===c:he.ctrlKey&&he.keyCode===c)&&!he.shiftKey&&!he.altKey?(he.preventDefault(),_t()):(C?he.metaKey&&he.keyCode===c&&he.shiftKey:S?he.ctrlKey&&he.keyCode===u:he.ctrlKey&&he.keyCode===c&&he.shiftKey)&&!he.altKey?(he.preventDefault(),fn()):he.keyCode===h&&he.ctrlKey&&(!C||he.shiftKey)&&(he.preventDefault(),H(function(cr){return!cr}))}},lo=function(he){var Ge=he.currentTarget,Ve=Ge.value,Be=Ge.selectionStart,vt=Ge.selectionEnd;re({value:Ve,selectionStart:Be,selectionEnd:vt},!0),ge(Ve)};return l.useEffect(function(){pe()},[pe]),l.useImperativeHandle(O,function(){return{get session(){return{history:et.current}},set session(he){et.current=he.history}}},[]),l.createElement("div",e({},Dt,{style:e(e({},R.container),Le)}),l.createElement("pre",e({className:ve,"aria-hidden":"true",style:e(e(e({},R.editor),R.highlight),Y)},typeof me=="string"?{dangerouslySetInnerHTML:{__html:me+"<br />"}}:{children:me})),l.createElement("textarea",{ref:function(he){return Nt.current=he},style:e(e(e({},R.editor),R.textarea),Y),className:P+(Mt?" ".concat(Mt):""),id:tn,value:Yt,onChange:lo,onKeyDown:Kn,onClick:Z,onKeyUp:Re,onFocus:M,onBlur:J,disabled:L,form:I,maxLength:X,minLength:oe,name:B,placeholder:se,readOnly:Oe,required:Te,autoFocus:F,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:_}}))}),R={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};return _n.default=E,_n}var mO=pO();const gO=zu(mO);var bh={exports:{}},Mx;function vO(){return Mx||(Mx=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
333
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
334
|
+
*
|
|
335
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
336
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
337
|
+
* @namespace
|
|
338
|
+
* @public
|
|
339
|
+
*/var n=(function(i){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,u={},c={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function _(E){return E instanceof h?new h(E.type,_(E.content),E.alias):Array.isArray(E)?E.map(_):E.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(_){return Object.prototype.toString.call(_).slice(8,-1)},objId:function(_){return _.__id||Object.defineProperty(_,"__id",{value:++l}),_.__id},clone:function _(E,R){R=R||{};var N,T;switch(c.util.type(E)){case"Object":if(T=c.util.objId(E),R[T])return R[T];N={},R[T]=N;for(var O in E)E.hasOwnProperty(O)&&(N[O]=_(E[O],R));return N;case"Array":return T=c.util.objId(E),R[T]?R[T]:(N=[],R[T]=N,E.forEach(function(F,L){N[L]=_(F,R)}),N);default:return E}},getLanguage:function(_){for(;_;){var E=o.exec(_.className);if(E)return E[1].toLowerCase();_=_.parentElement}return"none"},setLanguage:function(_,E){_.className=_.className.replace(RegExp(o,"gi"),""),_.classList.add("language-"+E)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(N){var _=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(_){var E=document.getElementsByTagName("script");for(var R in E)if(E[R].src==_)return E[R]}return null}},isActive:function(_,E,R){for(var N="no-"+E;_;){var T=_.classList;if(T.contains(E))return!0;if(T.contains(N))return!1;_=_.parentElement}return!!R}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(_,E){var R=c.util.clone(c.languages[_]);for(var N in E)R[N]=E[N];return R},insertBefore:function(_,E,R,N){N=N||c.languages;var T=N[_],O={};for(var F in T)if(T.hasOwnProperty(F)){if(F==E)for(var L in R)R.hasOwnProperty(L)&&(O[L]=R[L]);R.hasOwnProperty(F)||(O[F]=T[F])}var I=N[_];return N[_]=O,c.languages.DFS(c.languages,function(Q,U){U===I&&Q!=_&&(this[Q]=O)}),O},DFS:function _(E,R,N,T){T=T||{};var O=c.util.objId;for(var F in E)if(E.hasOwnProperty(F)){R.call(E,F,E[F],N||F);var L=E[F],I=c.util.type(L);I==="Object"&&!T[O(L)]?(T[O(L)]=!0,_(L,R,null,T)):I==="Array"&&!T[O(L)]&&(T[O(L)]=!0,_(L,R,F,T))}}},plugins:{},highlightAll:function(_,E){c.highlightAllUnder(document,_,E)},highlightAllUnder:function(_,E,R){var N={callback:R,container:_,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),c.hooks.run("before-all-elements-highlight",N);for(var T=0,O;O=N.elements[T++];)c.highlightElement(O,E===!0,N.callback)},highlightElement:function(_,E,R){var N=c.util.getLanguage(_),T=c.languages[N];c.util.setLanguage(_,N);var O=_.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(O,N);var F=_.textContent,L={element:_,language:N,grammar:T,code:F};function I(U){L.highlightedCode=U,c.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,c.hooks.run("after-highlight",L),c.hooks.run("complete",L),R&&R.call(L.element)}if(c.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){c.hooks.run("complete",L),R&&R.call(L.element);return}if(c.hooks.run("before-highlight",L),!L.grammar){I(c.util.encode(L.code));return}if(E&&i.Worker){var Q=new Worker(c.filename);Q.onmessage=function(U){I(U.data)},Q.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else I(c.highlight(L.code,L.grammar,L.language))},highlight:function(_,E,R){var N={code:_,grammar:E,language:R};if(c.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=c.tokenize(N.code,N.grammar),c.hooks.run("after-tokenize",N),h.stringify(c.util.encode(N.tokens),N.language)},tokenize:function(_,E){var R=E.rest;if(R){for(var N in R)E[N]=R[N];delete E.rest}var T=new y;return x(T,T.head,_),v(_,T,E,T.head,0),k(T)},hooks:{all:{},add:function(_,E){var R=c.hooks.all;R[_]=R[_]||[],R[_].push(E)},run:function(_,E){var R=c.hooks.all[_];if(!(!R||!R.length))for(var N=0,T;T=R[N++];)T(E)}},Token:h};i.Prism=c;function h(_,E,R,N){this.type=_,this.content=E,this.alias=R,this.length=(N||"").length|0}h.stringify=function _(E,R){if(typeof E=="string")return E;if(Array.isArray(E)){var N="";return E.forEach(function(I){N+=_(I,R)}),N}var T={type:E.type,content:_(E.content,R),tag:"span",classes:["token",E.type],attributes:{},language:R},O=E.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(T.classes,O):T.classes.push(O)),c.hooks.run("wrap",T);var F="";for(var L in T.attributes)F+=" "+L+'="'+(T.attributes[L]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+F+">"+T.content+"</"+T.tag+">"};function m(_,E,R,N){_.lastIndex=E;var T=_.exec(R);if(T&&N&&T[1]){var O=T[1].length;T.index+=O,T[0]=T[0].slice(O)}return T}function v(_,E,R,N,T,O){for(var F in R)if(!(!R.hasOwnProperty(F)||!R[F])){var L=R[F];L=Array.isArray(L)?L:[L];for(var I=0;I<L.length;++I){if(O&&O.cause==F+","+I)return;var Q=L[I],U=Q.inside,ee=!!Q.lookbehind,te=!!Q.greedy,ie=Q.alias;if(te&&!Q.pattern.global){var X=Q.pattern.toString().match(/[imsuy]*$/)[0];Q.pattern=RegExp(Q.pattern.source,X+"g")}for(var oe=Q.pattern||Q,B=N.next,J=T;B!==E.tail&&!(O&&J>=O.reach);J+=B.value.length,B=B.next){var Z=B.value;if(E.length>_.length)return;if(!(Z instanceof h)){var M=1,G;if(te){if(G=m(oe,J,_,ee),!G||G.index>=_.length)break;var ne=G.index,Re=G.index+G[0].length,ge=J;for(ge+=B.value.length;ne>=ge;)B=B.next,ge+=B.value.length;if(ge-=B.value.length,J=ge,B.value instanceof h)continue;for(var Ne=B;Ne!==E.tail&&(ge<Re||typeof Ne.value=="string");Ne=Ne.next)M++,ge+=Ne.value.length;M--,Z=_.slice(J,ge),G.index-=J}else if(G=m(oe,0,Z,ee),!G)continue;var ne=G.index,se=G[0],ve=Z.slice(0,ne),Oe=Z.slice(ne+se.length),Te=J+Z.length;O&&Te>O.reach&&(O.reach=Te);var Le=B.prev;ve&&(Le=x(E,Le,ve),J+=ve.length),w(E,Le,M);var Ue=new h(F,U?c.tokenize(se,U):se,ie,se);if(B=x(E,Le,Ue),Oe&&x(E,B,Oe),M>1){var dt={cause:F+","+I,reach:Te};v(_,E,R,B.prev,J,dt),O&&dt.reach>O.reach&&(O.reach=dt.reach)}}}}}}function y(){var _={value:null,prev:null,next:null},E={value:null,prev:_,next:null};_.next=E,this.head=_,this.tail=E,this.length=0}function x(_,E,R){var N=E.next,T={value:R,prev:E,next:N};return E.next=T,N.prev=T,_.length++,T}function w(_,E,R){for(var N=E.next,T=0;T<R&&N!==_.tail;T++)N=N.next;E.next=N,N.prev=E,_.length-=T}function k(_){for(var E=[],R=_.head.next;R!==_.tail;)E.push(R.value),R=R.next;return E}if(!i.document)return i.addEventListener&&(c.disableWorkerMessageHandler||i.addEventListener("message",function(_){var E=JSON.parse(_.data),R=E.language,N=E.code,T=E.immediateClose;i.postMessage(c.highlight(N,c.languages[R],R)),T&&i.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function C(){c.manual||c.highlightAll()}if(!c.manual){var P=document.readyState;P==="loading"||P==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",C):window.requestAnimationFrame?window.requestAnimationFrame(C):window.setTimeout(C,16)}return c})(t);e.exports&&(e.exports=n),typeof Fv<"u"&&(Fv.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,l){var u={};u["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[l]},u.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:u}};c["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var h={};h[o]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:c},n.languages.insertBefore("markup","cdata",h)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(i){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",o=function(S,C){return"✖ Error "+S+" while fetching file: "+C},l="✖ Error: File does not exist or is empty",u={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",h="loading",m="loaded",v="failed",y="pre[data-src]:not(["+c+'="'+m+'"]):not(['+c+'="'+h+'"])';function x(S,C,P){var _=new XMLHttpRequest;_.open("GET",S,!0),_.onreadystatechange=function(){_.readyState==4&&(_.status<400&&_.responseText?C(_.responseText):_.status>=400?P(o(_.status,_.statusText)):P(l))},_.send(null)}function w(S){var C=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(C){var P=Number(C[1]),_=C[2],E=C[3];return _?E?[P,Number(E)]:[P,void 0]:[P,P]}}n.hooks.add("before-highlightall",function(S){S.selector+=", "+y}),n.hooks.add("before-sanity-check",function(S){var C=S.element;if(C.matches(y)){S.code="",C.setAttribute(c,h);var P=C.appendChild(document.createElement("CODE"));P.textContent=i;var _=C.getAttribute("data-src"),E=S.language;if(E==="none"){var R=(/\.(\w+)$/.exec(_)||[,"none"])[1];E=u[R]||R}n.util.setLanguage(P,E),n.util.setLanguage(C,E);var N=n.plugins.autoloader;N&&N.loadLanguages(E),x(_,function(T){C.setAttribute(c,m);var O=w(C.getAttribute("data-range"));if(O){var F=T.split(/\r\n?|\n/g),L=O[0],I=O[1]==null?F.length:O[1];L<0&&(L+=F.length),L=Math.max(0,Math.min(L-1,F.length)),I<0&&(I+=F.length),I=Math.max(0,Math.min(I,F.length)),T=F.slice(L,I).join(`
|
|
340
|
+
`),C.hasAttribute("data-start")||C.setAttribute("data-start",String(L+1))}P.textContent=T,n.highlightElement(P)},function(T){C.setAttribute(c,v),P.textContent=T})}}),n.plugins.fileHighlight={highlight:function(C){for(var P=(C||document).querySelectorAll(y),_=0,E;E=P[_++];)n.highlightElement(E)}};var k=!1;n.fileHighlight=function(){k||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),k=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(bh)),bh.exports}var yO=vO();const Lx=zu(yO);(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(c,h){h=(h||"").replace(/m/g,"")+"m";var m=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return c});return RegExp(m,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(l),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);function Fx({value:e,onChange:t,onValidate:n,onSave:i,onRun:o,validating:l,saving:u}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"rounded-md border bg-background",children:f.jsx(gO,{value:e,onValueChange:t,highlight:c=>Lx.highlight(c,Lx.languages.yaml,"yaml"),padding:16,style:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',fontSize:13,minHeight:300}})}),f.jsxs("div",{className:"flex gap-2",children:[n&&f.jsx(He,{size:"sm",variant:"outline",onClick:n,disabled:l,children:l?"Validating...":"Validate"}),i&&f.jsx(He,{size:"sm",onClick:i,disabled:u,children:u?"Saving...":"Save"}),o&&f.jsx(He,{size:"sm",variant:"secondary",onClick:o,children:"Run"})]})]})}const Dx=`name: My Tests
|
|
341
|
+
server: npx @modelcontextprotocol/server-filesystem /tmp
|
|
342
|
+
|
|
343
|
+
tests:
|
|
344
|
+
- name: List tools
|
|
345
|
+
call: list_directory
|
|
346
|
+
with:
|
|
347
|
+
path: /tmp
|
|
348
|
+
expect:
|
|
349
|
+
- exists: $.content
|
|
350
|
+
`;function xO(){var N,T;const[e,t]=b.useState(!1),[n,i]=b.useState(null),[o,l]=b.useState(""),[u,c]=b.useState(Dx),[h,m]=b.useState(""),[v,y]=b.useState(null),x=Op(),w=cE(),k=uE(),S=dE(),C=fE(),P=s0();async function _(){await w.mutateAsync({name:o,yaml:u}),t(!1),l(""),c(Dx)}async function E(O){const F=await C.mutateAsync(O);y(F.data)}async function R(O){const F=await P.mutateAsync({collectionId:O});hs.navigate({to:"/runs/$runId",params:{runId:F.data.id}})}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Collections"}),f.jsxs(_u,{open:e,onOpenChange:t,children:[f.jsx(Vp,{asChild:!0,children:f.jsxs(He,{children:[f.jsx(Uw,{className:"mr-2 h-4 w-4"}),"New Collection"]})}),f.jsxs(xl,{className:"max-w-2xl",children:[f.jsx(ku,{children:f.jsx(wl,{children:"Create Collection"})}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Name"}),f.jsx(en,{value:o,onChange:O=>l(O.target.value),placeholder:"Collection name"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"YAML"}),f.jsx(Fx,{value:u,onChange:c})]}),f.jsx(He,{onClick:_,disabled:!o||w.isPending,className:"w-full",children:w.isPending?"Creating...":"Create Collection"})]})]})]})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Saved Collections"})}),f.jsx(ot,{children:((N=x.data)==null?void 0:N.data.length)===0?f.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No collections yet"}):f.jsxs(Zu,{children:[f.jsx(qu,{children:f.jsxs(no,{children:[f.jsx(cn,{children:"Name"}),f.jsx(cn,{children:"Description"}),f.jsx(cn,{children:"Updated"}),f.jsx(cn,{className:"text-right",children:"Actions"})]})}),f.jsx(Gu,{children:(T=x.data)==null?void 0:T.data.map(O=>f.jsxs(no,{children:[f.jsx(un,{className:"font-medium",children:O.name}),f.jsx(un,{className:"text-sm text-muted-foreground",children:O.description??"-"}),f.jsx(un,{className:"text-sm text-muted-foreground",children:new Date(O.updatedAt).toLocaleDateString()}),f.jsxs(un,{className:"text-right space-x-2",children:[f.jsx(He,{size:"sm",variant:"outline",onClick:()=>{i(O.id),m(O.yaml)},children:f.jsx(rj,{className:"h-4 w-4"})}),f.jsx(He,{size:"sm",variant:"secondary",onClick:()=>R(O.id),children:f.jsx(hi,{className:"h-4 w-4"})}),f.jsx(He,{size:"sm",variant:"ghost",onClick:()=>S.mutate(O.id),children:f.jsx(Al,{className:"h-4 w-4 text-destructive"})})]})]},O.id))})]})})]}),f.jsx(_u,{open:!!n,onOpenChange:O=>{O||i(null)},children:f.jsxs(xl,{className:"max-w-2xl",children:[f.jsx(ku,{children:f.jsx(wl,{children:"Edit Collection"})}),f.jsx(Fx,{value:h,onChange:m,onValidate:()=>n&&E(n),validating:C.isPending,onSave:async()=>{n&&(await k.mutateAsync({id:n,data:{yaml:h}}),i(null))},saving:k.isPending,onRun:()=>n&&R(n)}),v&&f.jsx("div",{className:"flex items-center gap-2 mt-2",children:v.valid?f.jsxs(ut,{variant:"success",children:[f.jsx(Ol,{className:"mr-1 h-3 w-3"}),"Valid"]}):f.jsxs(ut,{variant:"destructive",children:[f.jsx(ha,{className:"mr-1 h-3 w-3"}),"Invalid"]})})]})})]})}function wO({status:e}){switch(e){case"completed":return f.jsxs(ut,{variant:"success",children:[f.jsx(Ol,{className:"mr-1 h-3 w-3"}),"Completed"]});case"failed":return f.jsxs(ut,{variant:"destructive",children:[f.jsx(ha,{className:"mr-1 h-3 w-3"}),"Failed"]});case"running":return f.jsxs(ut,{variant:"warning",children:[f.jsx(Su,{className:"mr-1 h-3 w-3 animate-spin"}),"Running"]});case"cancelled":return f.jsxs(ut,{variant:"secondary",children:[f.jsx(Pp,{className:"mr-1 h-3 w-3"}),"Cancelled"]});default:return f.jsx(ut,{variant:"secondary",children:e})}}function SO(){var m,v,y;const[e,t]=b.useState(!1),[n,i]=b.useState(""),o=r0(),l=Op(),u=s0(),c=pE();async function h(){if(!n)return;const x=await u.mutateAsync({collectionId:n});t(!1),hs.navigate({to:"/runs/$runId",params:{runId:x.data.id}})}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Test Runs"}),f.jsxs(_u,{open:e,onOpenChange:t,children:[f.jsx(Vp,{asChild:!0,children:f.jsxs(He,{children:[f.jsx(hi,{className:"mr-2 h-4 w-4"}),"Run Collection"]})}),f.jsxs(xl,{children:[f.jsx(ku,{children:f.jsx(wl,{children:"Run Collection"})}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Collection"}),f.jsxs(Un,{value:n,onValueChange:i,children:[f.jsx(Rn,{children:f.jsx(Wn,{placeholder:"Select a collection"})}),f.jsx(Pn,{children:(m=l.data)==null?void 0:m.data.map(x=>f.jsx(ft,{value:x.id,children:x.name},x.id))})]})]}),f.jsx(He,{onClick:h,disabled:!n||u.isPending,className:"w-full",children:u.isPending?"Starting...":"Start Run"})]})]})]})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Run History"})}),f.jsx(ot,{children:((v=o.data)==null?void 0:v.data.length)===0?f.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No runs yet"}):f.jsxs(Zu,{children:[f.jsx(qu,{children:f.jsxs(no,{children:[f.jsx(cn,{children:"Collection"}),f.jsx(cn,{children:"Status"}),f.jsx(cn,{children:"Tests"}),f.jsx(cn,{children:"Duration"}),f.jsx(cn,{children:"Started"}),f.jsx(cn,{className:"text-right",children:"Actions"})]})}),f.jsx(Gu,{children:(y=o.data)==null?void 0:y.data.map(x=>f.jsxs(no,{className:"cursor-pointer",onClick:()=>hs.navigate({to:"/runs/$runId",params:{runId:x.id}}),children:[f.jsx(un,{className:"font-medium",children:x.collectionName}),f.jsx(un,{children:f.jsx(wO,{status:x.status})}),f.jsx(un,{children:x.summary?f.jsxs("span",{className:"text-sm",children:[f.jsx("span",{className:"text-green-600",children:x.summary.passed})," / ",f.jsx("span",{children:x.summary.total}),x.summary.failed>0&&f.jsxs("span",{className:"text-red-600",children:[" (",x.summary.failed," failed)"]})]}):"-"}),f.jsx(un,{children:x.duration?`${x.duration}ms`:"-"}),f.jsx(un,{className:"text-sm text-muted-foreground",children:new Date(x.startedAt).toLocaleString()}),f.jsx(un,{className:"text-right",onClick:w=>w.stopPropagation(),children:f.jsx(He,{size:"sm",variant:"ghost",onClick:()=>c.mutate(x.id),children:f.jsx(Al,{className:"h-4 w-4 text-destructive"})})})]},x.id))})]})})]})]})}function bO({status:e}){switch(e){case"passed":return f.jsx(Ol,{className:"h-4 w-4 text-green-600"});case"failed":return f.jsx(ha,{className:"h-4 w-4 text-red-600"});case"error":return f.jsx(Pp,{className:"h-4 w-4 text-red-600"});case"skipped":return f.jsx(Su,{className:"h-4 w-4 text-yellow-600"});default:return null}}function CO({result:e}){const[t,n]=b.useState(!1);return f.jsxs("div",{className:"rounded-md border p-3 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>n(!t),children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(bO,{status:e.status}),f.jsx("span",{className:"text-sm font-medium",children:e.testName})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.duration,"ms"]}),f.jsx(ut,{variant:e.status==="passed"?"success":e.status==="failed"?"destructive":"secondary",children:e.status})]})]}),t&&f.jsxs("div",{className:"mt-3 space-y-2 text-sm",children:[e.error&&f.jsx("div",{className:"rounded bg-red-50 p-2 text-red-700 font-mono text-xs",children:e.error}),e.assertions.length>0&&f.jsxs("div",{className:"space-y-1",children:[f.jsx("p",{className:"font-medium text-xs text-muted-foreground",children:"Assertions:"}),e.assertions.map((i,o)=>f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.passed?f.jsx(Ol,{className:"h-3 w-3 text-green-600"}):f.jsx(ha,{className:"h-3 w-3 text-red-600"}),f.jsx("span",{children:i.message})]},o))]})]})]})}function _O(){const{runId:e}=Hu({from:"/runs/$runId"}),{data:t,isLoading:n}=hE(e),i=t==null?void 0:t.data;return n?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx(Su,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):i?f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs(He,{variant:"ghost",size:"sm",onClick:()=>hs.navigate({to:"/runs"}),children:[f.jsx(Ku,{className:"h-4 w-4 mr-1"}),"Back"]}),f.jsx("h2",{className:"text-2xl font-bold",children:i.collectionName}),f.jsx(ut,{variant:i.status==="completed"?"success":i.status==="failed"?"destructive":"warning",children:i.status})]}),i.summary&&f.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-5",children:[f.jsx(it,{children:f.jsxs(ot,{className:"pt-4 text-center",children:[f.jsx("p",{className:"text-2xl font-bold",children:i.summary.total}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Total"})]})}),f.jsx(it,{children:f.jsxs(ot,{className:"pt-4 text-center",children:[f.jsx("p",{className:"text-2xl font-bold text-green-600",children:i.summary.passed}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Passed"})]})}),f.jsx(it,{children:f.jsxs(ot,{className:"pt-4 text-center",children:[f.jsx("p",{className:"text-2xl font-bold text-red-600",children:i.summary.failed}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Failed"})]})}),f.jsx(it,{children:f.jsxs(ot,{className:"pt-4 text-center",children:[f.jsx("p",{className:"text-2xl font-bold text-yellow-600",children:i.summary.skipped}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Skipped"})]})}),f.jsx(it,{children:f.jsxs(ot,{className:"pt-4 text-center",children:[f.jsxs("p",{className:"text-2xl font-bold",children:[i.summary.duration,"ms"]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Duration"})]})})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Test Results"})}),f.jsx(ot,{className:"space-y-2",children:i.results&&i.results.length>0?i.results.map((o,l)=>f.jsx(CO,{result:o},l)):i.status==="running"?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-4 justify-center",children:[f.jsx(Su,{className:"h-4 w-4 animate-spin"}),"Running tests..."]}):f.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No results"})})]})]}):f.jsx("p",{className:"text-muted-foreground",children:"Run not found"})}var Ch="rovingFocusGroup.onEntryFocus",kO={bubbles:!1,cancelable:!0},Fl="RovingFocusGroup",[cp,$S,jO]=Q0(Fl),[EO,BS]=ma(Fl,[jO]),[RO,PO]=EO(Fl),US=b.forwardRef((e,t)=>f.jsx(cp.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(cp.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(NO,{...e,ref:t})})}));US.displayName=Fl;var NO=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:v=!1,...y}=e,x=b.useRef(null),w=It(t,x),k=Qp(l),[S,C]=vl({prop:u,defaultProp:c??null,onChange:h,caller:Fl}),[P,_]=b.useState(!1),E=pi(m),R=$S(n),N=b.useRef(!1),[T,O]=b.useState(0);return b.useEffect(()=>{const F=x.current;if(F)return F.addEventListener(Ch,E),()=>F.removeEventListener(Ch,E)},[E]),f.jsx(RO,{scope:n,orientation:i,dir:k,loop:o,currentTabStopId:S,onItemFocus:b.useCallback(F=>C(F),[C]),onItemShiftTab:b.useCallback(()=>_(!0),[]),onFocusableItemAdd:b.useCallback(()=>O(F=>F+1),[]),onFocusableItemRemove:b.useCallback(()=>O(F=>F-1),[]),children:f.jsx(ct.div,{tabIndex:P||T===0?-1:0,"data-orientation":i,...y,ref:w,style:{outline:"none",...e.style},onMouseDown:Je(e.onMouseDown,()=>{N.current=!0}),onFocus:Je(e.onFocus,F=>{const L=!N.current;if(F.target===F.currentTarget&&L&&!P){const I=new CustomEvent(Ch,kO);if(F.currentTarget.dispatchEvent(I),!I.defaultPrevented){const Q=R().filter(X=>X.focusable),U=Q.find(X=>X.active),ee=Q.find(X=>X.id===S),ie=[U,ee,...Q].filter(Boolean).map(X=>X.ref.current);KS(ie,v)}}N.current=!1}),onBlur:Je(e.onBlur,()=>_(!1))})})}),WS="RovingFocusGroupItem",HS=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:u,...c}=e,h=di(),m=l||h,v=PO(WS,n),y=v.currentTabStopId===m,x=$S(n),{onFocusableItemAdd:w,onFocusableItemRemove:k,currentTabStopId:S}=v;return b.useEffect(()=>{if(i)return w(),()=>k()},[i,w,k]),f.jsx(cp.ItemSlot,{scope:n,id:m,focusable:i,active:o,children:f.jsx(ct.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...c,ref:t,onMouseDown:Je(e.onMouseDown,C=>{i?v.onItemFocus(m):C.preventDefault()}),onFocus:Je(e.onFocus,()=>v.onItemFocus(m)),onKeyDown:Je(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){v.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const P=AO(C,v.orientation,v.dir);if(P!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let E=x().filter(R=>R.focusable).map(R=>R.ref.current);if(P==="last")E.reverse();else if(P==="prev"||P==="next"){P==="prev"&&E.reverse();const R=E.indexOf(C.currentTarget);E=v.loop?IO(E,R+1):E.slice(R+1)}setTimeout(()=>KS(E))}}),children:typeof u=="function"?u({isCurrentTabStop:y,hasTabStop:S!=null}):u})})});HS.displayName=WS;var TO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AO(e,t,n){const i=OO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return TO[i]}function KS(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function IO(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var MO=US,LO=HS,ad="Tabs",[FO]=ma(ad,[BS]),QS=BS(),[DO,rm]=FO(ad),ZS=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:u="horizontal",dir:c,activationMode:h="automatic",...m}=e,v=Qp(c),[y,x]=vl({prop:i,onChange:o,defaultProp:l??"",caller:ad});return f.jsx(DO,{scope:n,baseId:di(),value:y,onValueChange:x,orientation:u,dir:v,activationMode:h,children:f.jsx(ct.div,{dir:v,"data-orientation":u,...m,ref:t})})});ZS.displayName=ad;var qS="TabsList",GS=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...o}=e,l=rm(qS,n),u=QS(n);return f.jsx(MO,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:f.jsx(ct.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:t})})});GS.displayName=qS;var YS="TabsTrigger",XS=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=e,u=rm(YS,n),c=QS(n),h=tb(u.baseId,i),m=nb(u.baseId,i),v=i===u.value;return f.jsx(LO,{asChild:!0,...c,focusable:!o,active:v,children:f.jsx(ct.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":m,"data-state":v?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...l,ref:t,onMouseDown:Je(e.onMouseDown,y=>{!o&&y.button===0&&y.ctrlKey===!1?u.onValueChange(i):y.preventDefault()}),onKeyDown:Je(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&u.onValueChange(i)}),onFocus:Je(e.onFocus,()=>{const y=u.activationMode!=="manual";!v&&!o&&y&&u.onValueChange(i)})})})});XS.displayName=YS;var JS="TabsContent",eb=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...u}=e,c=rm(JS,n),h=tb(c.baseId,i),m=nb(c.baseId,i),v=i===c.value,y=b.useRef(v);return b.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),f.jsx(Il,{present:o||v,children:({present:x})=>f.jsx(ct.div,{"data-state":v?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":h,hidden:!x,id:m,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:y.current?"0s":void 0},children:x&&l})})});eb.displayName=JS;function tb(e,t){return`${e}-trigger-${t}`}function nb(e,t){return`${e}-content-${t}`}var zO=ZS,VO=GS,$O=XS,BO=eb;const up=zO,Du=b.forwardRef(({className:e,...t},n)=>f.jsx(VO,{ref:n,className:pt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Du.displayName="TabsList";const is=b.forwardRef(({className:e,...t},n)=>f.jsx($O,{ref:n,className:pt("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));is.displayName="TabsTrigger";const os=b.forwardRef(({className:e,...t},n)=>f.jsx(BO,{ref:n,className:pt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));os.displayName="TabsContent";const kl=b.forwardRef(({className:e,...t},n)=>f.jsx("textarea",{className:pt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));kl.displayName="Textarea";const rb=b.forwardRef(({className:e,...t},n)=>f.jsx("input",{type:"checkbox",className:pt("h-4 w-4 shrink-0 rounded border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));rb.displayName="Checkbox";const jl=b.forwardRef(({className:e,...t},n)=>f.jsx("label",{className:pt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),ref:n,...t}));jl.displayName="Label";function UO(e,t){return e.default!==void 0?e.default:e.type==="boolean"?!1:e.type==="number"||e.type==="integer"?t?0:"":(e.type==="object"||e.type==="array","")}function WO(e,t){const n={};for(const[i,o]of Object.entries(e))n[i]=UO(o,t.includes(i));return n}function zx(e,t){if(t.type==="number"||t.type==="integer"){const i=String(e);if(i==="")return;const o=Number(i);return isNaN(o)?void 0:o}if(t.type==="boolean")return!!e;if(t.type==="object"||t.type==="array"){const i=String(e).trim();if(!i)return;try{return JSON.parse(i)}catch{return}}const n=String(e);return n===""?void 0:n}function HO(e){return!!(e.maxLength&&e.maxLength>200||e.format==="textarea")}function KO(e){return e.format==="uri"||e.format==="url"?"url":e.format==="email"?"email":e.format==="date"?"date":e.format==="date-time"?"datetime-local":"text"}function QO({name:e,prop:t,required:n,value:i,onChange:o}){const l=`field-${e}`,u=f.jsxs(jl,{htmlFor:l,children:[e,n&&f.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),c=t.description?f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.description}):null;return t.enum&&t.enum.length>0?f.jsxs("div",{className:"space-y-1.5",children:[u,f.jsxs(Un,{value:String(i??""),onValueChange:h=>o(e,h),children:[f.jsx(Rn,{id:l,children:f.jsx(Wn,{placeholder:`Select ${e}`})}),f.jsx(Pn,{children:t.enum.map(h=>f.jsx(ft,{value:h,children:h},h))})]}),c]}):t.type==="boolean"?f.jsxs("div",{className:"space-y-1.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(rb,{id:l,checked:!!i,onChange:h=>o(e,h.target.checked)}),f.jsxs(jl,{htmlFor:l,children:[e,n&&f.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]})]}),c]}):t.type==="number"||t.type==="integer"?f.jsxs("div",{className:"space-y-1.5",children:[u,f.jsx(en,{id:l,type:"number",value:i===void 0?"":String(i),onChange:h=>o(e,h.target.value),min:t.minimum,max:t.maximum,step:t.type==="integer"?1:void 0,required:n}),c]}):t.type==="object"||t.type==="array"||t.type&&!["string","number","integer","boolean"].includes(t.type)?f.jsxs("div",{className:"space-y-1.5",children:[u,f.jsx(kl,{id:l,value:String(i??""),onChange:h=>o(e,h.target.value),className:"font-mono text-xs",rows:3,placeholder:t.type==="array"?'["item1", "item2"]':'{"key": "value"}',required:n}),c]}):HO(t)?f.jsxs("div",{className:"space-y-1.5",children:[u,f.jsx(kl,{id:l,value:String(i??""),onChange:h=>o(e,h.target.value),rows:3,minLength:t.minLength,maxLength:t.maxLength,required:n}),c]}):f.jsxs("div",{className:"space-y-1.5",children:[u,f.jsx(en,{id:l,type:KO(t),value:String(i??""),onChange:h=>o(e,h.target.value),minLength:t.minLength,maxLength:t.maxLength,required:n}),c]})}function ZO({schema:e,onSubmit:t,loading:n}){const i=e.properties??{},o=e.required??[],l=Object.keys(i),[u,c]=b.useState(()=>WO(i,o)),[h,m]=b.useState(!1),[v,y]=b.useState("{}"),x=b.useCallback((C,P)=>{c(_=>({..._,[C]:P}))},[]);function w(C){if(C.preventDefault(),h){try{t(JSON.parse(v))}catch{}return}const P={};for(const[_,E]of Object.entries(i)){const R=zx(u[_],E);R!==void 0&&(P[_]=R)}t(P)}function k(){const C={};for(const[P,_]of Object.entries(i)){const E=zx(u[P],_);E!==void 0&&(C[P]=E)}y(JSON.stringify(C,null,2)),m(!0)}function S(){try{const C=JSON.parse(v);typeof C=="object"&&C!==null&&c(P=>({...P,...C}))}catch{}m(!1)}return l.length===0?f.jsxs("form",{onSubmit:w,className:"space-y-4",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(jl,{children:"Input (JSON)"}),f.jsx(kl,{value:v,onChange:C=>y(C.target.value),className:"font-mono text-xs",rows:4})]}),f.jsxs(He,{type:"submit",disabled:n,children:[n?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(hi,{className:"mr-2 h-4 w-4"}),"Call Tool"]})]}):f.jsxs("form",{onSubmit:w,className:"space-y-4",children:[h?f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(jl,{children:"Input (JSON)"}),f.jsx(kl,{value:v,onChange:C=>y(C.target.value),className:"font-mono text-xs",rows:8})]}):f.jsx("div",{className:"space-y-3",children:l.map(C=>f.jsx(QO,{name:C,prop:i[C],required:o.includes(C),value:u[C],onChange:x},C))}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(He,{type:"submit",disabled:n,children:[n?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(hi,{className:"mr-2 h-4 w-4"}),"Call Tool"]}),f.jsx("button",{type:"button",onClick:h?S:k,className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:h?f.jsxs(f.Fragment,{children:[f.jsx(tj,{className:"h-3.5 w-3.5"}),"Form view"]}):f.jsxs(f.Fragment,{children:[f.jsx(Yk,{className:"h-3.5 w-3.5"}),"Raw JSON"]})})]})]})}function sm({data:e}){return f.jsx("pre",{className:"rounded-md border bg-muted/50 p-4 text-xs font-mono overflow-auto max-h-96",children:JSON.stringify(e,null,2)})}function qO({sessionId:e,tools:t}){const[n,i]=b.useState(""),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState(!1),v=t.find(w=>w.name===n);async function y(w){if(n){m(!0),c(null),l(null);try{const k=await lt.inspect.call(e,n,w);l(k.data)}catch(k){c(k instanceof Error?k.message:"Call failed")}m(!1)}}const x=(v==null?void 0:v.inputSchema)??{type:"object",properties:{}};return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Tool"}),f.jsxs(Un,{value:n,onValueChange:w=>{i(w),l(null),c(null)},children:[f.jsx(Rn,{children:f.jsx(Wn,{placeholder:"Select a tool"})}),f.jsx(Pn,{children:t.map(w=>f.jsx(ft,{value:w.name,children:w.name},w.name))})]}),(v==null?void 0:v.description)&&f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:v.description})]}),v&&f.jsx(ZO,{schema:x,onSubmit:y,loading:h},v.name),u!=null&&f.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:u}),o!=null&&f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium",children:"Result"}),f.jsx(sm,{data:o})]})]})}function GO({entries:e}){const[t,n]=b.useState(null),[i,o]=b.useState("all"),[l,u]=b.useState(""),[c,h]=b.useState(!0),[m,v]=b.useState(0),y=b.useRef(null),x=m?e.filter(k=>k.timestamp>m):e;b.useEffect(()=>{c&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[x,c]);const w=x.filter(k=>!(i!=="all"&&k.direction!==i||l&&!(k.method??"").toLowerCase().includes(l.toLowerCase())));return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsxs(Un,{value:i,onValueChange:k=>o(k),children:[f.jsx(Rn,{className:"w-[130px]",children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"all",children:"All"}),f.jsx(ft,{value:"outgoing",children:"Outgoing"}),f.jsx(ft,{value:"incoming",children:"Incoming"})]})]}),f.jsx(en,{className:"w-[200px]",placeholder:"Filter by method...",value:l,onChange:k=>u(k.target.value)}),f.jsx("div",{className:"flex-1"}),f.jsx(He,{size:"sm",variant:c?"default":"outline",onClick:()=>h(!c),title:"Auto-scroll",children:f.jsx(Hk,{className:"h-4 w-4"})}),f.jsx(He,{size:"sm",variant:"outline",onClick:()=>v(Date.now()),title:"Clear log",children:f.jsx(Al,{className:"h-4 w-4"})}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[w.length," / ",x.length," messages"]})]}),f.jsx("div",{ref:y,className:"rounded-md border overflow-auto max-h-[600px]",children:f.jsx(sb,{entries:w,expandedId:t,onToggle:k=>n(t===k?null:k)})})]})}function sb({entries:e,expandedId:t,onToggle:n}){return f.jsxs("table",{className:"w-full text-xs",children:[f.jsx("thead",{className:"sticky top-0 bg-muted/80 backdrop-blur",children:f.jsxs("tr",{className:"border-b",children:[f.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Time"}),f.jsx("th",{className:"text-left px-3 py-2 font-medium w-10",children:"Dir"}),f.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Method"}),f.jsx("th",{className:"text-left px-3 py-2 font-medium w-16",children:"ID"}),f.jsx("th",{className:"text-right px-3 py-2 font-medium w-16",children:"RTT"}),f.jsx("th",{className:"text-right px-3 py-2 font-medium w-16",children:"Size"})]})}),f.jsx("tbody",{children:e.length===0?f.jsx("tr",{children:f.jsx("td",{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"No protocol messages yet."})}):e.map(i=>f.jsx("tr",{className:"group",children:f.jsxs("td",{colSpan:6,className:"p-0",children:[f.jsx("button",{onClick:()=>n==null?void 0:n(i.id),className:"w-full text-left hover:bg-muted/50 transition-colors",children:f.jsxs("div",{className:"grid grid-cols-[auto_40px_1fr_64px_64px_64px] items-center px-3 py-1.5",children:[f.jsx("span",{className:"font-mono text-muted-foreground pr-3",children:YO(i.timestamp)}),f.jsx("span",{children:i.direction==="outgoing"?f.jsx(Qk,{className:"h-3 w-3 text-blue-500"}):f.jsx(Kk,{className:`h-3 w-3 ${i.isError?"text-red-500":"text-green-500"}`})}),f.jsx("span",{className:"truncate",children:i.method?f.jsx("span",{className:"font-medium",children:i.method}):i.isError?f.jsx(ut,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"error"}):f.jsx("span",{className:"text-muted-foreground",children:"response"})}),f.jsx("span",{className:"text-right font-mono text-muted-foreground",children:i.jsonrpcId!=null?String(i.jsonrpcId):""}),f.jsx("span",{className:"text-right font-mono text-muted-foreground",children:i.roundTripMs!=null?`${i.roundTripMs}ms`:""}),f.jsx("span",{className:"text-right font-mono text-muted-foreground",children:JO(XO(i.message))})]})}),t===i.id&&f.jsx("div",{className:"px-3 pb-3",children:f.jsx(sm,{data:i.message})})]})},i.id))})]})}function YO(e){return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function XO(e){try{return new Blob([JSON.stringify(e)]).size}catch{return 0}}function JO(e){return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}const Vx=20;function eA({entries:e}){const[t,n]=b.useState(null),[i,o]=b.useState(0),l=b.useRef(null),c=(i?e.filter(h=>h.timestamp>i):e).slice(-Vx);return b.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:["Protocol Log (last ",Vx,")"]}),f.jsx(He,{size:"sm",variant:"ghost",onClick:()=>o(Date.now()),title:"Clear log",className:"h-6 px-2",children:f.jsx(Al,{className:"h-3 w-3"})})]}),f.jsx("div",{ref:l,className:"rounded-md border overflow-auto max-h-[250px]",children:f.jsx(sb,{entries:c,expandedId:t,onToggle:h=>n(t===h?null:h)})})]})}function ld({url:e,onMessage:t,enabled:n=!0}){const i=b.useRef(null),o=b.useRef(0),l=b.useRef(),[u,c]=b.useState(!1),h=e??`ws://${window.location.host}/ws`,m=b.useCallback(()=>{var w;if(((w=i.current)==null?void 0:w.readyState)===WebSocket.OPEN)return;const x=new WebSocket(h);x.onopen=()=>{c(!0),o.current=0},x.onmessage=k=>{try{const S=JSON.parse(k.data);t==null||t(S)}catch{}},x.onclose=()=>{c(!1);const k=Math.min(1e3*2**o.current,3e4);o.current++,o.current<10&&(l.current=setTimeout(m,k))},x.onerror=()=>{x.close()},i.current=x},[h,t]);b.useEffect(()=>(n&&m(),()=>{var x;clearTimeout(l.current),(x=i.current)==null||x.close()}),[n,m]);const v=b.useCallback(x=>{const w=i.current;(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify({type:"subscribe",channel:x}))},[]),y=b.useCallback(x=>{const w=i.current;(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify({type:"unsubscribe",channel:x}))},[]);return{connected:u,subscribe:v,unsubscribe:y}}const $x=1e4;function tA(e){const[t,n]=b.useState([]);b.useEffect(()=>{if(!e){n([]);return}lt.inspect.messages(e).then(h=>{n(h.data)}).catch(()=>{})},[e]);const i=b.useCallback(h=>{if(e&&h.type==="event"&&h.event==="protocol-message"&&h.channel===`inspect:${e}`){const m=h.data;n(v=>{const y=[...v,m];return y.length>$x?y.slice(y.length-$x):y})}},[e]),{subscribe:o,unsubscribe:l,connected:u}=ld({onMessage:i,enabled:!!e});b.useEffect(()=>(u&&e&&o(`inspect:${e}`),()=>{e&&l(`inspect:${e}`)}),[u,e,o,l]);const c=b.useCallback(()=>n([]),[]);return{entries:t,clear:c}}function nA(){var F;const[e,t]=b.useState("saved"),[n,i]=b.useState(""),[o,l]=b.useState(""),[u,c]=b.useState(""),[h,m]=b.useState("stdio"),[v,y]=b.useState(null),[x,w]=b.useState(!1),[k,S]=b.useState([]),[C,P]=b.useState([]),[_,E]=b.useState(null),R=Qu(),{entries:N}=tA(v);async function T(){var L;w(!0),E(null);try{let I;if(e==="saved"){const te=(L=R.data)==null?void 0:L.data.find(ie=>ie.id===n);if(!te)throw new Error("Server not found");I={transport:te.transport,command:te.command,args:te.args,url:te.url,env:te.env}}else if(h==="stdio"){const te=o.split(/\s+/);I={transport:"stdio",command:te[0],args:te.slice(1)}}else I={transport:h,url:u};const Q=await lt.inspect.connect(I);y(Q.data.sessionId);const[U,ee]=await Promise.all([lt.inspect.tools(Q.data.sessionId),lt.inspect.resources(Q.data.sessionId).catch(()=>({data:[]}))]);S(U.data),P(ee.data)}catch(I){E(I instanceof Error?I.message:"Connection failed")}w(!1)}async function O(){v&&(await lt.inspect.disconnect(v).catch(()=>{}),y(null),S([]),P([]))}return f.jsxs("div",{className:"space-y-6",children:[f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Inspector"}),v?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(ut,{variant:"success",children:"Connected"}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[k.length," tools, ",C.length," resources"]}),f.jsxs(He,{size:"sm",variant:"outline",onClick:O,children:[f.jsx(ij,{className:"mr-2 h-4 w-4"}),"Disconnect"]})]}),f.jsxs(up,{defaultValue:"tools",children:[f.jsxs(Du,{children:[f.jsxs(is,{value:"tools",children:["Tools (",k.length,")"]}),f.jsxs(is,{value:"resources",children:["Resources (",C.length,")"]}),f.jsx(is,{value:"call",children:"Call Tool"}),f.jsx(is,{value:"protocol",children:"Protocol Log"})]}),f.jsx(os,{value:"tools",className:"mt-4 space-y-3",children:k.map(L=>f.jsx(it,{children:f.jsxs(ot,{className:"pt-4",children:[f.jsx("p",{className:"font-medium text-sm",children:L.name}),L.description&&f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:L.description}),L.inputSchema&&f.jsxs("details",{className:"mt-2",children:[f.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer",children:"Input Schema"}),f.jsx(sm,{data:L.inputSchema})]})]})},L.name))}),f.jsx(os,{value:"resources",className:"mt-4 space-y-3",children:C.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No resources exposed"}):C.map(L=>f.jsx(it,{children:f.jsxs(ot,{className:"pt-4",children:[f.jsx("p",{className:"font-medium text-sm",children:L.name??L.uri}),f.jsx("p",{className:"text-xs text-muted-foreground",children:L.uri}),L.description&&f.jsx("p",{className:"text-xs mt-1",children:L.description})]})},L.uri))}),f.jsxs(os,{value:"call",className:"mt-4 space-y-4",children:[f.jsx(it,{children:f.jsx(ot,{className:"pt-4",children:f.jsx(qO,{sessionId:v,tools:k})})}),f.jsx(eA,{entries:N})]}),f.jsx(os,{value:"protocol",className:"mt-4",children:f.jsx(it,{children:f.jsx(ot,{className:"pt-4",children:f.jsx(GO,{entries:N})})})})]})]}):f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Connect to Server"})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs(up,{value:e,onValueChange:L=>t(L),children:[f.jsxs(Du,{children:[f.jsx(is,{value:"saved",children:"Saved Server"}),f.jsx(is,{value:"custom",children:"Custom"})]}),f.jsx(os,{value:"saved",className:"space-y-3 mt-3",children:f.jsxs(Un,{value:n,onValueChange:i,children:[f.jsx(Rn,{children:f.jsx(Wn,{placeholder:"Select a server"})}),f.jsx(Pn,{children:(F=R.data)==null?void 0:F.data.map(L=>f.jsxs(ft,{value:L.id,children:[L.name," (",L.transport,")"]},L.id))})]})}),f.jsxs(os,{value:"custom",className:"space-y-3 mt-3",children:[f.jsxs(Un,{value:h,onValueChange:L=>m(L),children:[f.jsx(Rn,{children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"stdio",children:"stdio"}),f.jsx(ft,{value:"sse",children:"SSE"}),f.jsx(ft,{value:"streamable-http",children:"Streamable HTTP"})]})]}),h==="stdio"?f.jsx(en,{value:o,onChange:L=>l(L.target.value),placeholder:"npx @modelcontextprotocol/server-filesystem /tmp"}):f.jsx(en,{value:u,onChange:L=>c(L.target.value),placeholder:"http://localhost:3000/sse"})]})]}),_&&f.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:_}),f.jsxs(He,{onClick:T,disabled:x,className:"w-full",children:[x?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(Uh,{className:"mr-2 h-4 w-4"}),"Connect"]})]})]})]})}function cd({title:e="Connect to Server",buttonLabel:t,onConnect:n,connecting:i,error:o,children:l,secondaryAction:u}){var T;const[c,h]=b.useState("saved"),[m,v]=b.useState(""),[y,x]=b.useState(""),[w,k]=b.useState(""),[S,C]=b.useState("stdio"),P=Qu();function _(){var O;if(c==="saved"){const F=(O=P.data)==null?void 0:O.data.find(L=>L.id===m);return F?{transport:F.transport,command:F.command,args:F.args,url:F.url,env:F.env}:null}else if(S==="stdio"){const F=y.split(/\s+/);return{transport:"stdio",command:F[0],args:F.slice(1)}}else return{transport:S,url:w}}async function E(){const O=_();O&&await n(O)}async function R(){if(!u)return;const O=_();O&&await u.onClick(O)}const N=c==="saved"?!!m:S==="stdio"?!!y:!!w;return f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:e})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs(up,{value:c,onValueChange:O=>h(O),children:[f.jsxs(Du,{children:[f.jsx(is,{value:"saved",children:"Saved Server"}),f.jsx(is,{value:"custom",children:"Custom"})]}),f.jsx(os,{value:"saved",className:"space-y-3 mt-3",children:f.jsxs(Un,{value:m,onValueChange:v,children:[f.jsx(Rn,{children:f.jsx(Wn,{placeholder:"Select a server"})}),f.jsx(Pn,{children:(T=P.data)==null?void 0:T.data.map(O=>f.jsxs(ft,{value:O.id,children:[O.name," (",O.transport,")"]},O.id))})]})}),f.jsxs(os,{value:"custom",className:"space-y-3 mt-3",children:[f.jsxs(Un,{value:S,onValueChange:O=>C(O),children:[f.jsx(Rn,{children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"stdio",children:"stdio"}),f.jsx(ft,{value:"sse",children:"SSE"}),f.jsx(ft,{value:"streamable-http",children:"Streamable HTTP"})]})]}),S==="stdio"?f.jsx(en,{value:y,onChange:O=>x(O.target.value),placeholder:"npx @modelcontextprotocol/server-filesystem /tmp"}):f.jsx(en,{value:w,onChange:O=>k(O.target.value),placeholder:"http://localhost:3000/sse"})]})]}),l,o&&f.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:o}),f.jsxs("div",{className:u?"flex gap-2":"",children:[u&&f.jsxs(He,{variant:"outline",onClick:R,disabled:u.loading||i||!N,className:"flex-1",children:[u.loading?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(Uh,{className:"mr-2 h-4 w-4"}),u.label]}),f.jsxs(He,{onClick:E,disabled:i||!N,className:u?"flex-1":"w-full",children:[i?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(Uh,{className:"mr-2 h-4 w-4"}),t??"Connect & Start"]})]})]})]})}const _h={critical:"bg-red-600 text-white",high:"bg-red-500 text-white",medium:"bg-orange-500 text-white",low:"bg-yellow-500 text-black",info:"bg-blue-500 text-white"};function rA(){const[e,t]=b.useState("setup"),[n,i]=b.useState("passive"),[o,l]=b.useState(""),[u,c]=b.useState(!1),[h,m]=b.useState(null),[v,y]=b.useState(null),[x,w]=b.useState(!1),[k,S]=b.useState(null),[C,P]=b.useState(null),[_,E]=b.useState(null),[R,N]=b.useState(0),[T,O]=b.useState(0),[F,L]=b.useState([]),[I,Q]=b.useState(null),[U,ee]=b.useState("all"),[te,ie]=b.useState(null),X=b.useCallback(ne=>{if(!(ne.type!=="event"||!v||ne.channel!==`scan:${v}`))switch(ne.event){case"rule-start":{const se=ne.data;E(se.ruleName);break}case"rule-complete":{N(se=>se+1);break}case"finding":{const se=ne.data;L(ve=>[...ve,se.finding]);break}case"completed":{v&<.audit.result(v).then(se=>{Q(se.data),t("results")}).catch(()=>{t("results")});break}case"error":{const se=ne.data;m(se.message),t("setup");break}}},[v]),{subscribe:oe,connected:B}=ld({onMessage:X,enabled:!!v});b.useEffect(()=>{B&&v&&oe(`scan:${v}`)},[B,v,oe]);function J(){const ne=o.trim();if(ne)return ne.split(",").map(se=>se.trim()).filter(Boolean)}async function Z(ne){w(!0),m(null);try{const se=await lt.audit.dryRun({...ne,mode:n,excludeTools:J()});S(se.data),P(ne),t("preview")}catch(se){m(se instanceof Error?se.message:"Failed to run dry-run preview")}w(!1)}async function M(ne){c(!0),m(null),L([]),N(0),E(null);try{const se=await lt.audit.start({...ne,mode:n,excludeTools:J()});y(se.data.sessionId);const ve=await lt.audit.status(se.data.sessionId);ve.data.progress&&O(ve.data.progress.totalRules),t("scanning")}catch(se){m(se instanceof Error?se.message:"Failed to start audit")}c(!1)}async function G(){C&&await M(C)}async function Re(){v&&(await lt.audit.stop(v).catch(()=>{}),y(null),t("setup"))}function ge(){y(null),Q(null),L([]),N(0),E(null),m(null),S(null),P(null),t("setup")}const Ne=(I==null?void 0:I.findings.filter(ne=>U==="all"||ne.severity===U))??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Hw,{className:"h-8 w-8 text-primary"}),f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Security Audit"})]}),e==="setup"&&f.jsxs(cd,{title:"Start Security Audit",buttonLabel:"Start Scan",onConnect:M,connecting:u,error:h,secondaryAction:{label:"Preview Scan",loading:x,onClick:Z},children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Scan Mode"}),f.jsxs(Un,{value:n,onValueChange:ne=>i(ne),children:[f.jsx(Rn,{children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"passive",children:"Passive (safe, read-only probes)"}),f.jsx(ft,{value:"active",children:"Active (sends test payloads)"}),f.jsx(ft,{value:"aggressive",children:"Aggressive (extensive probing)"})]})]}),n!=="passive"&&f.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-300",children:[f.jsx("strong",{children:"Warning:"})," ",n==="active"?"Active":"Aggressive"," mode sends potentially harmful payloads. Only use against test environments."]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Exclude Tools"}),f.jsx(en,{value:o,onChange:ne=>l(ne.target.value),placeholder:"tool1, tool2, ... (comma-separated)"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Tools to skip during scanning. Destructive-sounding tools are auto-skipped in active/aggressive mode."})]})]}),e==="preview"&&k&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Pt,{children:"Scan Preview"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs(He,{variant:"outline",size:"sm",onClick:()=>t("setup"),children:[f.jsx(Ku,{className:"mr-2 h-4 w-4"}),"Back"]}),f.jsxs(He,{size:"sm",onClick:G,disabled:u,children:[u?f.jsx(Br,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(hi,{className:"mr-2 h-4 w-4"}),"Run Scan"]})]})]})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs(ut,{variant:"outline",children:[k.mode," mode"]}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[k.tools.filter(ne=>ne.included).length," of ",k.tools.length," tools will be scanned"]}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[k.rules.length," rule",k.rules.length!==1?"s":""]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-sm font-medium",children:"Rules"}),f.jsx("div",{className:"flex gap-2 flex-wrap",children:k.rules.map(ne=>f.jsx(ut,{variant:"secondary",children:ne},ne))})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-sm font-medium",children:"Tools"}),f.jsxs("div",{className:"rounded-md border divide-y",children:[k.tools.map(ne=>f.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[ne.included?f.jsx(Gk,{className:"h-4 w-4 text-green-600 flex-shrink-0"}):f.jsx(ha,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),f.jsx("span",{className:ne.included?"text-sm":"text-sm text-muted-foreground line-through",children:ne.name}),ne.reason&&f.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ne.reason})]},ne.name)),k.tools.length===0&&f.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No tools found on server"})]})]})]})]}),e==="scanning"&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(Pt,{className:"flex items-center gap-2",children:[f.jsx(Br,{className:"h-5 w-5 animate-spin"}),"Scanning..."]}),f.jsxs(He,{variant:"outline",size:"sm",onClick:Re,children:[f.jsx(zw,{className:"mr-2 h-4 w-4"}),"Stop"]})]})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[f.jsx("span",{children:_?`Running: ${_}`:"Starting..."}),f.jsxs("span",{children:[R," / ",T," rules"]})]}),f.jsx("div",{className:"h-2 w-full rounded-full bg-muted",children:f.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:T>0?`${R/T*100}%`:"0%"}})})]}),f.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["critical","high","medium","low","info"].map(ne=>{const se=F.filter(ve=>ve.severity===ne).length;return se===0?null:f.jsxs(ut,{className:_h[ne],children:[ne,": ",se]},ne)}),F.length===0&&f.jsx("span",{className:"text-sm text-muted-foreground",children:"No findings yet"})]})]})]}),e==="results"&&I&&f.jsxs(f.Fragment,{children:[f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(Pt,{children:["Scan Results - ",I.serverName]}),f.jsx(He,{variant:"outline",size:"sm",onClick:ge,children:"New Scan"})]})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Mode:"}),f.jsx(ut,{variant:"outline",children:I.mode}),f.jsx("span",{className:"text-sm font-medium ml-4",children:"Total Findings:"}),f.jsx(ut,{variant:"secondary",children:I.summary.totalFindings})]}),f.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["critical","high","medium","low","info"].map(ne=>{const se=I.summary.bySeverity[ne];return se===0?null:f.jsxs(ut,{className:_h[ne],children:[ne,": ",se]},ne)}),I.summary.totalFindings===0&&f.jsx("span",{className:"text-sm text-green-600 font-medium",children:"No vulnerabilities found"})]})]})]}),I.findings.length>0&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Pt,{children:"Findings"}),f.jsxs(Un,{value:U,onValueChange:ee,children:[f.jsx(Rn,{className:"w-40",children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"all",children:"All Severities"}),f.jsx(ft,{value:"critical",children:"Critical"}),f.jsx(ft,{value:"high",children:"High"}),f.jsx(ft,{value:"medium",children:"Medium"}),f.jsx(ft,{value:"low",children:"Low"}),f.jsx(ft,{value:"info",children:"Info"})]})]})]})}),f.jsx(ot,{children:f.jsx("div",{className:"space-y-2",children:Ne.map(ne=>f.jsxs("div",{className:"rounded-md border",children:[f.jsxs("button",{className:"flex w-full items-center gap-3 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>ie(te===ne.id?null:ne.id),children:[te===ne.id?f.jsx(Dw,{className:"h-4 w-4 flex-shrink-0"}):f.jsx(qk,{className:"h-4 w-4 flex-shrink-0"}),f.jsx(ut,{className:`${_h[ne.severity]} flex-shrink-0`,children:ne.severity}),f.jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:ne.rule}),f.jsx("span",{className:"text-sm font-medium truncate",children:ne.title})]}),te===ne.id&&f.jsxs("div",{className:"border-t px-3 py-3 space-y-2 bg-muted/20",children:[f.jsx("p",{className:"text-sm",children:ne.description}),ne.evidence&&f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Evidence"}),f.jsx("pre",{className:"rounded bg-muted p-2 text-xs overflow-x-auto",children:ne.evidence})]}),ne.remediation&&f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Remediation"}),f.jsx("p",{className:"text-sm",children:ne.remediation})]})]})]},ne.id))})})]})]})]})}function sA(){const[e,t]=b.useState("connect"),[n,i]=b.useState(!1),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState([]),[v,y]=b.useState(""),[x,w]=b.useState("{}"),[k,S]=b.useState("100"),[C,P]=b.useState("5"),[_,E]=b.useState(null),[R,N]=b.useState("warmup"),[T,O]=b.useState(0),[F,L]=b.useState(0),[I,Q]=b.useState(null),U=b.useCallback(Z=>{if(!(Z.type!=="event"||!_||Z.channel!==`benchmark:${_}`))switch(Z.event){case"warmup-start":{N("warmup");break}case"iteration":{const M=Z.data;N("measuring"),O(M.iteration);break}case"completed":{const M=Z.data;Q(M.result),t("results");break}case"error":{const M=Z.data;l(M.message),t("connect");break}}},[_]),{subscribe:ee,connected:te}=ld({onMessage:U,enabled:!!_});b.useEffect(()=>{te&&_&&ee(`benchmark:${_}`)},[te,_,ee]);async function ie(Z){i(!0),l(null);try{const M=await lt.inspect.connect({transport:Z.transport,command:Z.command,args:Z.args,url:Z.url,env:Z.env}),G=await lt.inspect.tools(M.data.sessionId);m(G.data),c(Z),await lt.inspect.disconnect(M.data.sessionId).catch(()=>{}),G.data.length>0&&y(G.data[0].name),t("setup")}catch(M){l(M instanceof Error?M.message:"Failed to connect")}i(!1)}async function X(){if(!(!u||!v)){l(null),O(0),L(parseInt(k,10)),N("warmup");try{let Z={};try{Z=JSON.parse(x)}catch{l("Invalid JSON in tool arguments");return}const M=await lt.benchmark.start({...u,tool:v,toolArgs:Z,iterations:parseInt(k,10),warmup:parseInt(C,10)});E(M.data.sessionId),t("running")}catch(Z){l(Z instanceof Error?Z.message:"Failed to start benchmark")}}}async function oe(){_&&(await lt.benchmark.stop(_).catch(()=>{}),E(null),t("setup"))}function B(){E(null),Q(null),O(0),l(null),t("connect"),c(null),m([]),y("")}function J(Z){return Z.toFixed(2)}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Qw,{className:"h-8 w-8 text-primary"}),f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Performance Benchmark"})]}),e==="connect"&&f.jsx(cd,{title:"Connect to Server",onConnect:ie,connecting:n,error:o}),e==="setup"&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Pt,{children:"Configure Benchmark"}),f.jsxs(ut,{variant:"success",children:[h.length," tools available"]})]})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Tool"}),f.jsxs(Un,{value:v,onValueChange:y,children:[f.jsx(Rn,{children:f.jsx(Wn,{placeholder:"Select a tool"})}),f.jsx(Pn,{children:h.map(Z=>f.jsxs(ft,{value:Z.name,children:[Z.name,Z.description?` - ${Z.description}`:""]},Z.name))})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Tool Arguments (JSON)"}),f.jsx(en,{value:x,onChange:Z=>w(Z.target.value),placeholder:'{"path": "/tmp"}',className:"font-mono text-sm"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Iterations"}),f.jsx(en,{type:"number",value:k,onChange:Z=>S(Z.target.value),min:"1"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Warmup Iterations"}),f.jsx(en,{type:"number",value:C,onChange:Z=>P(Z.target.value),min:"0"})]})]}),o&&f.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:o}),f.jsxs(He,{onClick:X,disabled:!v,className:"w-full",children:[f.jsx(hi,{className:"mr-2 h-4 w-4"}),"Run Benchmark"]})]})]}),e==="running"&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(Pt,{className:"flex items-center gap-2",children:[f.jsx(Br,{className:"h-5 w-5 animate-spin"}),"Running Benchmark"]}),f.jsxs(He,{variant:"outline",size:"sm",onClick:oe,children:[f.jsx(zw,{className:"mr-2 h-4 w-4"}),"Stop"]})]})}),f.jsxs(ot,{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Tool:"}),f.jsx(ut,{variant:"outline",children:v}),f.jsx("span",{className:"text-sm font-medium ml-4",children:"Phase:"}),f.jsx(ut,{variant:R==="warmup"?"secondary":"default",children:R==="warmup"?"Warmup":"Measuring"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[f.jsx("span",{children:R==="warmup"?"Warming up...":`Iteration ${T} / ${F}`}),F>0&&R==="measuring"&&f.jsxs("span",{children:[(T/F*100).toFixed(0),"%"]})]}),f.jsx("div",{className:"h-2 w-full rounded-full bg-muted",children:f.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:R==="warmup"?"0%":F>0?`${T/F*100}%`:"0%"}})})]})]})]}),e==="results"&&I&&f.jsx(f.Fragment,{children:f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(Pt,{children:["Benchmark Results - ",I.toolName]}),f.jsx(He,{variant:"outline",size:"sm",onClick:B,children:"New Benchmark"})]})}),f.jsxs(ot,{className:"space-y-6",children:[f.jsxs("div",{className:"flex gap-3 flex-wrap",children:[f.jsxs(ut,{variant:"outline",children:[I.iterations," iterations"]}),f.jsxs(ut,{variant:"outline",children:[I.errors," errors"]}),I.iterations>0&&f.jsxs(ut,{variant:"outline",children:[(I.errors/I.iterations*100).toFixed(1),"% error rate"]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[f.jsx(Hs,{label:"Min",value:`${J(I.stats.min)} ms`}),f.jsx(Hs,{label:"Max",value:`${J(I.stats.max)} ms`}),f.jsx(Hs,{label:"Mean",value:`${J(I.stats.mean)} ms`}),f.jsx(Hs,{label:"Median",value:`${J(I.stats.median)} ms`}),f.jsx(Hs,{label:"P95",value:`${J(I.stats.p95)} ms`}),f.jsx(Hs,{label:"P99",value:`${J(I.stats.p99)} ms`}),f.jsx(Hs,{label:"Std Dev",value:`${J(I.stats.stddev)} ms`}),f.jsx(Hs,{label:"Throughput",value:(()=>{const Z=new Date(I.startedAt).getTime(),G=(new Date(I.completedAt).getTime()-Z)/1e3;return G>0?`${(I.iterations/G).toFixed(1)} calls/sec`:"N/A"})()})]})]})]})})]})}function Hs({label:e,value:t}){return f.jsxs("div",{className:"rounded-md border p-3",children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:e}),f.jsx("p",{className:"text-lg font-semibold",children:t})]})}function iA(){const[e,t]=b.useState("setup"),[n,i]=b.useState("markdown"),[o,l]=b.useState(!1),[u,c]=b.useState(null),[h,m]=b.useState(""),[v,y]=b.useState(!1);async function x(C){l(!0),c(null);try{const P=await lt.docs.generate({...C,format:n});m(P.data.content),t("results")}catch(P){c(P instanceof Error?P.message:"Failed to generate documentation")}l(!1)}function w(){navigator.clipboard.writeText(h),y(!0),setTimeout(()=>y(!1),2e3)}function k(){const C=n==="html"?"index.html":"README.md",P=n==="html"?"text/html":"text/markdown",_=new Blob([h],{type:P}),E=URL.createObjectURL(_),R=document.createElement("a");R.href=E,R.download=C,R.click(),URL.revokeObjectURL(E)}function S(){t("setup"),m(""),c(null)}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx($w,{className:"h-8 w-8 text-primary"}),f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Documentation"})]}),e==="setup"&&f.jsx(cd,{title:"Generate Documentation",onConnect:x,connecting:o,error:u,children:f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium",children:"Output Format"}),f.jsxs(Un,{value:n,onValueChange:C=>i(C),children:[f.jsx(Rn,{children:f.jsx(Wn,{})}),f.jsxs(Pn,{children:[f.jsx(ft,{value:"markdown",children:"Markdown"}),f.jsx(ft,{value:"html",children:"HTML"})]})]})]})}),e==="results"&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs(Pt,{children:["Generated Documentation (",n.toUpperCase(),")"]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs(He,{variant:"outline",size:"sm",onClick:w,children:[f.jsx(Xk,{className:"mr-2 h-4 w-4"}),v?"Copied!":"Copy"]}),f.jsxs(He,{variant:"outline",size:"sm",onClick:k,children:[f.jsx(Vw,{className:"mr-2 h-4 w-4"}),"Download"]}),f.jsxs(He,{variant:"outline",size:"sm",onClick:S,children:[f.jsx(Ku,{className:"mr-2 h-4 w-4"}),"Back"]})]})]})}),f.jsx(ot,{children:f.jsx("pre",{className:"max-h-[600px] overflow-auto rounded-md bg-muted p-4 text-sm",children:f.jsx("code",{children:h})})})]})]})}function oA(e){return e>=80?"bg-green-500":e>=60?"bg-yellow-500":"bg-red-500"}function Bx(e){return e>=80?"text-green-600":e>=60?"text-yellow-600":"text-red-600"}const Ux={documentation:"Documentation",schemaQuality:"Schema Quality",errorHandling:"Error Handling",responsiveness:"Responsiveness",security:"Security"};function aA(){const[e,t]=b.useState("setup"),[n,i]=b.useState(!1),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState(null),[v,y]=b.useState(null),x=b.useCallback(_=>{if(!(_.type!=="event"||!h||!_.channel.startsWith(`score:${h}`)))switch(_.event){case"category-start":{const E=_.data;c(E.category);break}}},[h]),{subscribe:w,connected:k}=ld({onMessage:x,enabled:!!h&&e==="calculating"});b.useEffect(()=>{k&&h&&w(`score:${h}`)},[k,h,w]);async function S(_){i(!0),l(null),c(null),t("calculating");try{const E=await lt.score.calculate(_);m(E.data.sessionId),y(E.data.score),t("results")}catch(E){l(E instanceof Error?E.message:"Failed to calculate score"),t("setup")}i(!1)}async function C(){if(v)try{const _=await lt.score.badge(v),E=new Blob([_.data.svg],{type:"image/svg+xml"}),R=URL.createObjectURL(E),N=document.createElement("a");N.href=R,N.download="mcp-score-badge.svg",N.click(),URL.revokeObjectURL(R)}catch{}}function P(){t("setup"),y(null),m(null),l(null),c(null)}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Kw,{className:"h-8 w-8 text-primary"}),f.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"MCP Score"})]}),e==="setup"&&f.jsx(cd,{title:"Calculate MCP Score",onConnect:S,connecting:n,error:o}),e==="calculating"&&f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs(Pt,{className:"flex items-center gap-2",children:[f.jsx(Br,{className:"h-5 w-5 animate-spin"}),"Calculating Score..."]})}),f.jsx(ot,{children:f.jsx("p",{className:"text-sm text-muted-foreground",children:u?`Evaluating ${Ux[u]??u}...`:"Connecting to server..."})})]}),e==="results"&&v&&f.jsxs(f.Fragment,{children:[f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Pt,{children:"Overall Score"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs(He,{variant:"outline",size:"sm",onClick:C,children:[f.jsx(Vw,{className:"mr-2 h-4 w-4"}),"Download Badge"]}),f.jsxs(He,{variant:"outline",size:"sm",onClick:P,children:[f.jsx(Ku,{className:"mr-2 h-4 w-4"}),"Back"]})]})]})}),f.jsx(ot,{children:f.jsx("div",{className:"flex items-center justify-center py-4",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:`text-6xl font-bold ${Bx(v.overall)}`,children:v.overall}),f.jsx("div",{className:"text-lg text-muted-foreground mt-1",children:"out of 100"})]})})})]}),f.jsxs(it,{children:[f.jsx(Rt,{children:f.jsx(Pt,{children:"Category Breakdown"})}),f.jsx(ot,{className:"space-y-4",children:Object.entries(v.categories).map(([_,E])=>f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{className:"font-medium",children:Ux[_]??_}),f.jsxs("span",{className:Bx(E),children:[E,"/100"]})]}),f.jsx("div",{className:"h-3 w-full rounded-full bg-muted",children:f.jsx("div",{className:`h-3 rounded-full transition-all ${oA(E)}`,style:{width:`${E}%`}})})]},_))})]})]})]})}const jr=Nk({component:function(){const t=Hn(),n=t.state.location.pathname;return f.jsx(Kj,{currentPath:n,onNavigate:i=>t.navigate({to:i}),children:f.jsx(Lw,{})})}}),lA=_r({getParentRoute:()=>jr,path:"/",component:gE}),cA=_r({getParentRoute:()=>jr,path:"/servers",component:hO}),uA=_r({getParentRoute:()=>jr,path:"/collections",component:xO}),dA=_r({getParentRoute:()=>jr,path:"/runs",component:SO}),fA=_r({getParentRoute:()=>jr,path:"/runs/$runId",component:_O}),hA=_r({getParentRoute:()=>jr,path:"/inspect",component:nA}),pA=_r({getParentRoute:()=>jr,path:"/audit",component:rA}),mA=_r({getParentRoute:()=>jr,path:"/benchmark",component:sA}),gA=_r({getParentRoute:()=>jr,path:"/docs",component:iA}),vA=_r({getParentRoute:()=>jr,path:"/score",component:aA}),yA=jr.addChildren([lA,cA,uA,dA,fA,hA,pA,mA,gA,vA]),hs=Dk({routeTree:yA});Hh.getState().initTheme();const xA=new NC({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}});oC.createRoot(document.getElementById("root")).render(f.jsx(b.StrictMode,{children:f.jsx(TC,{client:xA,children:f.jsx($k,{router:hs})})}));
|
|
351
|
+
//# sourceMappingURL=index-DxT3O3nb.js.map
|